/* Shared refinements: preserve the site's authored routes, palette and gestures. */
:root{--text-secondary:#4f5d53;--photo-ink:#101613;--photo-ink-alt:#ebede8;scrollbar-gutter:stable;}
[hidden]{display:none!important;}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
a:focus-visible,button:focus-visible,.project:focus-visible{outline:2px solid #3f654b;outline-offset:4px;}
body.page-secondary a{color:inherit;}
.contact-aside p.contact-note{font-size:13px;line-height:1.6;margin-top:40px;letter-spacing:normal;color:var(--text-secondary);}
.page-kicker,.small-uppercase,.service-index,.bottom-nav,.contact-addresses h2{color:var(--text-secondary);}
.page-hero h1{letter-spacing:-.04em;}.service-body h2,.visual-rule p{letter-spacing:-.035em;}
.continuation a,.stage4 a{color:inherit;display:inline-flex;align-items:center;gap:10px;min-height:44px;width:fit-content;text-decoration-thickness:1px;text-underline-offset:6px;}
body.page-home .image.project-art strong{color:#000;}
.project .photo strong,.project .exit-visual strong,.scroll-exit-photo strong{color:#000;}
.project .photo[data-placeholder]{color:var(--photo-ink);}
.project .photo[data-placeholder]:nth-of-type(even){color:var(--photo-ink-alt);}
.project .photo>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.project .photo:not([data-placeholder]) figcaption{color:#fff;background:rgba(16,22,19,.8);padding:6px 8px;z-index:1;}
.project .exit-visual{color:var(--photo-ink);}
.project .place,.project .status,.intro{color:var(--text-secondary);font-size:12px;line-height:1.45;}
.project .info h2{font-size:15px;line-height:1.3;}
.project .details{font-size:14px;line-height:1.55;}
.project .details dt,.project .mobile-specs dt{font-size:11px;color:var(--text-secondary);}
.project .details dd,.project .mobile-specs dd{font-size:13px;}
.project .photo figcaption{font-size:12px;line-height:1.4;letter-spacing:.02em;}
.project .info{overflow:visible;max-height:none;}
.project .rail{will-change:auto;}.project.open .rail{will-change:transform;}
.gallery-controls{position:absolute;top:calc(var(--y,0px) + 8px);right:24px;z-index:6;display:flex;gap:8px;opacity:0;pointer-events:none;}
.gallery-controls button{width:44px;height:44px;border:1px solid #4f5d53;background:#ebede8;color:#17221d;font:500 22px/1 Roboto,Arial,sans-serif;cursor:pointer;}
.gallery-controls button:disabled{opacity:.5;cursor:default;}
.gallery-controls:focus-within{opacity:1;pointer-events:auto;}
/* The close hit box has its own slot; it never covers the word Contacto. */
.menu-ready .io-menu.is-open .io-menu-item:last-child{margin-right:38px;}
.menu-ready .io-menu.is-open .io-menu-toggle{width:44px;}
@media(max-width:850px) and (orientation:portrait){
 .menu-ready .io-menu.is-open .io-menu-item:last-child{margin-right:0;}
 .menu-ready .io-menu-toggle,.menu-ready .io-menu.is-open .io-menu-toggle{width:44px;}
 /* Keep the original 5px word gap; only the slash closes the open menu. */
 .menu-ready .io-menu.is-open .io-menu-toggle{width:14px;height:29px;}
 .project .info h2{font-size:clamp(14px,3.5vw,18px);}
 .project .place{font-size:12px;line-height:1.4;}
 .project.open .info .place{font-size:12px;line-height:1.4;}
 .project .mobile-details .details{font-size:14px;line-height:1.5;}
 .project .mobile-details .details dt{font-size:11px;}
 .project .mobile-details{padding:16px;box-shadow:inset 3px 0 #708773;}
 .project .mobile-specs>div{gap:8px;}
 .gallery-controls{right:24px;}
}
/* Fallbacks remain useful if one script fails independently of another. */
html:not(.menu-ready) .site-header{position:relative!important;top:0!important;left:0;right:0;height:auto;min-height:0;padding:64px 22px 16px;pointer-events:auto;}
html:not(.menu-ready) .io-menu,html:not(.menu-ready) .io-menu-items{position:static;width:100%;height:auto;min-height:0;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;}
html:not(.menu-ready) .io-menu-item{position:static;transform:none;width:auto;min-height:44px;height:auto;pointer-events:auto;font-size:14px;}
html:not(.menu-ready) .io-menu-word{width:auto!important;height:auto;opacity:1;filter:none;transform:none;overflow:visible;}
html:not(.menu-ready) .io-menu-toggle,html:not(.menu-ready) .io-menu-slash{display:none;}
html:not(.projects-ready) .page-projects .project{margin:0 20px 44px;}
html:not(.projects-ready) .stage{height:auto;position:static;}
html:not(.projects-ready) .viewport{position:relative;inset:auto;height:clamp(200px,45vw,420px);}
html:not(.projects-ready) .rail{position:static;height:100%;transform:none;}
html:not(.projects-ready) .photo{width:100%;height:100%;flex:0 0 100%;}
html:not(.projects-ready) .photo:not(:first-child),html:not(.projects-ready) .cover{display:none;}
html:not(.projects-ready) .info{position:static;width:auto;max-height:none;overflow:visible;margin-bottom:20px;}
html:not(.projects-ready) .details{display:block;opacity:1;}
html:not(.projects-ready) .mobile-specs{display:none;}
html:not(.home-ready) .horizontal-section{height:auto;padding:70px 0;}
html:not(.home-ready) .sticky{position:static;height:auto;display:block;overflow:visible;}
html:not(.home-ready) .moving-title{position:static;margin:0 14px 25px;}
html:not(.home-ready) .track{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));box-sizing:border-box;}
html:not(.home-ready) .project{width:auto;}
html:not(.home-ready) .progress-wrap,html:not(.home-ready) .carousel-arrow,html:not(.home-ready) .carousel-dots{display:none;}
@media(prefers-reduced-motion:reduce){
 .hero{--fade-time:0ms;}
 .hero-slide,.io-menu-item,.io-menu-word,.io-menu-word-inner,.project .rail,.visit-hint,.site-header{transition:none!important;}
 .project-link .image strong{transition:none;}
}
:root{--photo-ink-alt:#fff;}
body.site-on-light .site-header,body.page-home.site-on-light .site-header{color:#101613!important;}
body.site-on-dark .io-menu-slash{filter:drop-shadow(0 1px 1px #101613);}

h1,h2{overflow-wrap:anywhere;}
@media(min-width:601px) and (max-width:850px) and (orientation:portrait){
 .project .photo strong{font-size:clamp(120px,calc(var(--photo-w)*.35),220px);}
}
@media(max-width:850px) and (orientation:portrait){
 .project .mobile-details{height:var(--photo-h);min-height:0;max-height:var(--photo-h);align-self:flex-start;overflow:clip;}
 .project.open .line{top:calc(var(--y) + var(--panel-h,var(--photo-h)) + 5px);}
}
.menu-ready .io-menu-item{font-size:12px;}
body.page-home .hero-project{font-size:12px;}
.page-projects footer small{font-size:12px;color:var(--text-secondary);}
/* Keyboard controls live beside the caption, never over the swipe surface. */
.gallery-controls{top:calc(var(--info-y,0px) + 30px);left:var(--info-left);right:auto;}
@media(pointer:coarse){:root{scrollbar-gutter:auto;}}
html:not(.menu-ready) .site-header,html:not(.menu-ready) body.page-home .site-header{color:#101613!important;}
html:not(.menu-ready) body.page-home .site-logo{color:#101613;}

@media(max-width:850px) and (orientation:portrait){
 .menu-ready .io-menu-item{height:2.5em;min-height:29px;}
 .menu-ready .io-menu.is-open .io-menu-item:nth-child(2){transform:translate(0,2.5em);}
 .menu-ready .io-menu.is-open .io-menu-item:nth-child(3){transform:translate(0,5em);}
 .menu-ready .io-menu.is-open .io-menu-item:nth-child(4){transform:translate(0,7.5em);}
}

@media(max-height:540px) and (orientation:landscape) and (pointer:coarse){
 .gallery-controls{top:calc(var(--stage) - 52px);}
}

/* Decorative arrows are vectors so missing font glyphs never show as boxes. */
.link-arrow{display:inline-block;width:.8em;height:.8em;vertical-align:baseline;flex-shrink:0;}
