/* KCU / Trama viva — web direction, 2026-09-29.
   A separate layer keeps the approved content and spatial routing intact. */
:root {
  --navy: #173f59;
  --navy2: #102e42;
  --cream: #f5f1e8;
  --paper: #fffdfa;
  --ink: #193343;
  --line: #d5d9d2;
  --page-gutter: clamp(24px, 6.5vw, 104px);
  --content-max: 1440px;
  --ease-scene: cubic-bezier(.22, 1, .36, 1);
}
html { scroll-padding-top: 104px; }
body { background: var(--cream); }
.site-shell { overflow: clip; }
.site-header {
  position: sticky;
  top: 0;
  height: 88px;
  padding-inline: var(--page-gutter);
  background: var(--navy2);
  z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.brand { width: 182px; }
.header-note { color: #e7eeec; letter-spacing: .16em; }
.explore-toggle { min-height: 45px; border-color: rgba(255,255,255,.42); }
.explore-toggle:focus-visible, .map-word:focus-visible { outline-color: #e2bb73; }
.explore-toggle span:last-child { transition: transform .35s var(--ease-scene); }
.explore-toggle[aria-expanded=true] span:last-child { transform: rotate(45deg); }
h1,h2,h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.hero { background: var(--navy); }
.home-hero, .interior-hero, .section-pad, .site-footer {
  padding-left: max(var(--page-gutter), calc((100vw - var(--content-max))/2));
  padding-right: max(var(--page-gutter), calc((100vw - var(--content-max))/2));
}
.home-hero {
  min-height: min(760px, calc(100svh - 88px));
  grid-template-columns: minmax(0,1.06fr) minmax(0,.94fr);
  gap: clamp(38px,5vw,78px);
  padding-top: clamp(68px,8vw,112px);
  padding-bottom: clamp(68px,8vw,112px);
}
.home-hero:before,.interior-hero:before {
  width: min(50vw,680px); height: min(50vw,680px);
  top: -38%; left: -23%;
  box-shadow: none;
}
.home-hero:after {
  content: ""; position: absolute; z-index: -1;
  width: 40vw; height: 1px; right: -8vw; bottom: 11%;
  background: linear-gradient(90deg, transparent,rgba(180,135,58,.4),transparent);
  transform: rotate(-28deg);
}
.hero-copy { max-width: 690px; min-width: 0; }
.home-hero h1 {
  font-size: clamp(3.75rem,5.7vw,6.8rem);
  line-height: .99; letter-spacing: -.015em;
  margin: 27px 0 31px;
  max-width: 12.2ch;
}
.hero-copy>p { max-width: 53ch; line-height: 1.65; }
.hero-actions { gap: 24px; }
.button {
  border-radius: 0;
  min-height: 56px;
  transition: transform .35s var(--ease-scene),background .25s,color .25s;
}
.button:hover { transform: translateY(-3px); }
.button-gold { background: #c49b51; color: #102e42; }
.button-gold:hover { background: #e1bb72; }
.hero-visual { height: clamp(450px,43vw,620px); }
.photo-frame {
  clip-path: polygon(0 0,100% 0,100% 88%,88% 100%,0 100%);
  border-radius: 0;
}
.photo-frame:after { background: linear-gradient(0deg,rgba(13,44,65,.28),transparent 38%); }
.orbit-label { font-family: var(--body); font-size: .8rem; letter-spacing: .015em; }
.orbit-top { top: 32px; right: 0; }
.orbit-bottom { bottom: 34px; left: -18px; }
.photo-index { bottom: 12px; left: 16px; background: rgba(10,38,55,.88); }
.intro-section {
  grid-template-columns: minmax(170px,.42fr) minmax(0,1fr);
  gap: clamp(40px,9vw,150px);
  border-bottom: 1px solid var(--line);
}
.intro-section h2 { max-width: 11ch; }
.intro-section p { max-width: 62ch; }
.two-panels { padding-left: 0; padding-right: 0; }
.two-panels article:first-child { padding-left: max(var(--page-gutter),calc((100vw - var(--content-max))/2)); }
.two-panels article:first-child h2 { max-width: 13ch; }
.closing-band { background: #e6eae5; }
.closing-band p { max-width: 21ch; }
.site-footer { min-height: 172px; }
.interior-hero {
  min-height: 490px;
  grid-template-columns: minmax(0,1.25fr) minmax(210px,.52fr);
  padding-top: clamp(62px,7vw,100px);
  padding-bottom: clamp(70px,7vw,100px);
}
.interior-hero h1 { font-size: clamp(3.5rem,6vw,6.7rem); line-height: .99; letter-spacing: -.012em; }
.hero-index { padding-left: clamp(26px,4vw,60px); }
.hero-index span { line-height: .82; }
.section-heading {
  display: grid; grid-template-columns: minmax(130px,.45fr) minmax(0,1.45fr) minmax(190px,.65fr);
  align-items: end; gap: clamp(20px,3vw,48px);
}
.section-heading h2 { margin: 0; max-width: 13ch; }
.section-heading p { margin: 0; }
.zones-grid { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 20px; }
.zone-card,.zone-card:nth-child(4),.zone-card:nth-child(5) { grid-column: span 4; }
.zone-card:nth-child(4),.zone-card:nth-child(5) { grid-column: span 6; }
.zone-card { border: 1px solid #d5d9d2; }
.zone-card:hover,.zone-card[aria-expanded=true] {
  transform: translateY(-5px); box-shadow: 0 16px 35px rgba(16,46,66,.12);
}
.zone-photo { height: clamp(190px,18vw,270px); }
.zone-label {
  font-size: clamp(1.9rem,2.4vw,2.8rem);
  padding: 24px 58px 29px 25px;
  min-height: 112px;
  overflow-wrap: anywhere;
}
.zone-card:nth-child(n+4) .zone-photo { height: clamp(210px,21vw,300px); }
.zone-stage { margin-top: 28px; scroll-margin-top: 110px; }
.zone-panel { padding: clamp(32px,5vw,72px); animation: panel-enter .55s var(--ease-scene) both; }
.zone-panel h2 { max-width: 17ch; }
.service-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 36px; }
.service-row-name { overflow-wrap: anywhere; }
.nojs-services { margin-top: 36px; padding: 32px; background: var(--paper); }
.nojs-services h2 { margin-bottom: 14px; }
.nojs-services .service-row { border-top: 1px solid var(--line); }
.project { gap: clamp(38px,6vw,100px); }
.project-visual,.project-typographic { height: clamp(320px,31vw,490px); }
.project-visual { padding: clamp(18px,3vw,44px); overflow: hidden; min-width: 0; }
.project-visual a { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.project-visual img { width: auto; max-width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.project>div { min-width: 0; }
.project h2 { max-width: 15ch; }
.detail-hero {
  grid-template-columns: minmax(0,1.1fr) minmax(320px,.82fr);
  gap: clamp(50px,6vw,110px);
}
.detail-visual { min-width: 0; height: 420px; }
.detail-visual>span { right: 0; }
.detail-body { grid-template-columns: minmax(190px,.42fr) minmax(0,1fr); gap: clamp(45px,9vw,150px); }
.editorial-block { grid-template-columns: minmax(170px,.42fr) minmax(0,1fr); }
.contact-grid { gap: clamp(50px,7vw,110px); }

/* Motion supports meaning: entrance, spatial travel and a selected detail. */
@keyframes hero-enter { from {opacity:.55;transform:translateY(16px)} to {opacity:1;transform:none} }
@keyframes visual-enter { from {opacity:.45;transform:translateY(20px) scale(1.02)} to {opacity:1;transform:none} }
@keyframes panel-enter { from {opacity:0;transform:translateY(18px)} to {opacity:1;transform:none} }
@keyframes map-draw { from {opacity:0;transform:scale(.87)} to {opacity:1;transform:scale(1)} }
@keyframes word-enter { from {opacity:0;filter:blur(5px)} to {opacity:1;filter:blur(0)} }
.home-hero .hero-copy,.interior-hero>div:first-child { animation: hero-enter .82s var(--ease-scene) both; }
.home-hero .hero-visual,.detail-visual { animation: visual-enter 1s .12s var(--ease-scene) both; }
.motion-ready .reveal { opacity: 1; transform: translateY(12px); transition: transform .65s var(--ease-scene); }
.motion-ready .reveal.in-view { opacity: 1; transform: none; }
.zone-card picture img,.project-visual img { transition: transform .65s var(--ease-scene); }
.zone-card:hover picture img,.project-visual a:hover img { transform: scale(1.035); }
.is-leaving .site-shell { transform: translate(var(--travel-x,0),var(--travel-y,0)) scale(.99); }
.transition-veil { background: #102e42; }
.is-arriving .site-shell { animation-duration: .6s; }

@media(max-width:1100px) {
  .home-hero { gap: 32px; }
  .home-hero h1 { font-size: clamp(3.35rem,5.6vw,5.2rem); }
  .orbit-bottom { left: 0; }
  .section-heading { grid-template-columns: minmax(100px,.4fr) minmax(0,1fr); }
  .section-heading p { grid-column: 2; }
  .zones-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .zone-card,.zone-card:nth-child(4),.zone-card:nth-child(5) { grid-column: span 1; }
  .zone-card:last-child { grid-column: 1/-1; }
}
@media(max-width:760px) {
  :root { --page-gutter: 22px; }
  html { scroll-padding-top: 79px; }
  .site-header { height: 76px; }
  .brand { width: 152px; }
  .home-hero { min-height: auto; display: flex; flex-direction: column; gap: 42px; padding-top: 57px; padding-bottom: 72px; }
  .home-hero h1 { font-size: clamp(3.4rem,10.7vw,5.4rem); max-width: 12ch; }
  .hero-actions { align-items: flex-start; }
  .hero-visual { width: 100%; height: clamp(350px,82vw,530px); }
  .orbit-top { top: 20px; }
  .orbit-bottom { bottom: 40px; }
  .intro-section,.editorial-block { grid-template-columns: 1fr; gap: 20px; }
  .two-panels article:first-child { padding: 48px var(--page-gutter); }
  .interior-hero { display: block; min-height: auto; padding-top: 62px; padding-bottom: 74px; }
  .interior-hero h1 { font-size: clamp(3.55rem,10vw,5.6rem); max-width: 14ch; }
  .hero-index { margin-top: 55px; padding-left: 20px; }
  .hero-index span { font-size: 6.5rem; }
  .section-heading { display: block; }
  .section-heading h2 { margin: 15px 0; }
  .section-heading p { max-width: 35ch; }
  .zones-grid { grid-template-columns: 1fr; gap: 16px; }
  .zone-card,.zone-card:nth-child(4),.zone-card:nth-child(5),.zone-card:last-child { grid-column: 1; }
  .zone-photo,.zone-card:nth-child(n+4) .zone-photo { height: clamp(190px,58vw,280px); }
  .zone-label { min-height: 0; font-size: 2.15rem; }
  .zone-stage { scroll-margin-top: 90px; }
  .service-row { grid-template-columns: minmax(0,1fr) 28px; }
  .service-row-summary { grid-column: 1; grid-row: 2; }
  .service-row .arrow { grid-column: 2; grid-row: 1/3; }
  .detail-body,.contact-grid { grid-template-columns: 1fr; }
  .detail-hero { display: block; }
  .detail-aside { position: static; }
  .detail-visual { height: clamp(280px,70vw,390px); }
  .project { grid-template-columns: 1fr; gap: 26px; }
  .project:nth-child(even)>div:first-child { order: 0; }
  .project-visual,.project-typographic { height: clamp(260px,65vw,380px); }

}
@media(max-width:390px) {
  .home-hero h1 { font-size: 3.15rem; }
  .hero-visual { height: 340px; }
  .map-word,.map-word:nth-of-type(n) { font-size: 1.7rem; min-height: 105px; overflow-wrap: anywhere; }
  .button { width: 100%; }
}
@media(prefers-reduced-motion:reduce) {
  .home-hero .hero-copy,.interior-hero>div:first-child,
  .home-hero .hero-visual,.detail-visual,.zone-panel,
  .word-map.is-open .map-axis,.word-map.is-open .map-word { animation: none !important; }
  .motion-ready .reveal { opacity: 1; transform: none; }
  .zone-card:hover,.zone-card:hover picture img,.project-visual a:hover img { transform: none; }
}


/* Spatial frame: six quiet, typographic destinations stay in the scene. */
:root { --scene-gutter: clamp(148px,12vw,192px); --scene-x: 0px; }
.site-header { position: relative; padding-inline: var(--scene-gutter); }
.header-note { max-width: 24ch; text-align: right; }
.home-hero,.interior-hero,.section-pad,.site-footer {
  padding-left: max(var(--scene-gutter),calc((100vw - var(--content-max))/2));
  padding-right: max(var(--scene-gutter),calc((100vw - var(--content-max))/2));
}
.two-panels { padding-inline: 0; }
.two-panels article:first-child { padding-left: var(--scene-gutter); }
.two-panels article:last-child { margin-right: var(--scene-gutter); }
.site-footer { padding-bottom: 108px; }
.floating-nav { position: fixed; inset: 0; z-index: 60; pointer-events: none; background: none; border: 0; box-shadow: none; }
.floating-nav__link {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  pointer-events: auto; min-height: 44px; max-width: 136px; padding: 10px 7px;
  border: 0; border-radius: 0; box-shadow: none;
  background: radial-gradient(ellipse at center,rgba(16,46,66,.92) 30%,rgba(16,46,66,.78) 61%,transparent 75%);
  color: #f5f1e8; font-family: var(--heading); font-size: 1.11rem; font-weight: 500;
  line-height: 1.15; text-align: center; text-decoration: none;
  text-shadow: 0 1px 3px #102e42; transition: color .22s,transform .3s var(--ease-scene);
}
.floating-nav__link:hover { background: radial-gradient(ellipse at center,rgba(16,46,66,.94) 30%,rgba(16,46,66,.78) 61%,transparent 75%); color:#f2ce8b; transform: translateY(-2px); }
.floating-nav__link[aria-current=page] { color: #f2ce8b; background-color: transparent; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.floating-nav__link[aria-current=page]:before { display:none; }
.floating-nav__link[data-destination="Inicio"] { left:calc(50% - 36px); bottom:18px; }
.floating-nav__link[data-destination="Proyectos"] { left:calc(50% - 46px); top:22px; }
.floating-nav__link[data-destination="Sobre KCU"] { left:10px; top:calc(50% - 22px); }
.floating-nav__link[data-destination="Servicios"] { right:10px; top:calc(50% - 22px); }
.floating-nav__link[data-destination="Contacto"] { left:22px; bottom:18px; }
.floating-nav__link[data-destination="Cómo trabajamos"] { right:14px; bottom:18px; }
.floating-nav__link:focus-visible { outline:2px solid #e2bb73; outline-offset:2px; background:#102e42; }
.scene-viewport { position:relative; overflow:clip; touch-action:pan-y pinch-zoom; }
.scene-track { display:grid; grid-template-columns:repeat(3,100vw); width:300vw; align-items:start; transform:translate3d(calc(-100vw + var(--scene-x,0px)),0,0); }
.scene-column,.scene-column>.site-shell { width:100vw; min-width:0; }
.scene-column>.site-shell { overflow:clip; }
.scene-copy { pointer-events:auto!important; user-select:none; }
.scene-copy .reveal { opacity:1!important; transform:none!important; }
.scene-copy .hero-copy,.scene-copy .hero-visual,.scene-copy .interior-hero>div:first-child { animation:none!important; }
.has-scene-drift { cursor:grabbing; user-select:none; }
.home-hero .eyebrow { animation:hero-enter .6s .06s var(--ease-scene) both; }
.home-hero h1 { animation:hero-enter .8s .14s var(--ease-scene) both; }
.home-hero .hero-copy>p { animation:hero-enter .8s .24s var(--ease-scene) both; }
.home-hero .hero-actions { animation:hero-enter .8s .34s var(--ease-scene) both; }
.motion-ready .reveal { opacity:.15; transform:translateY(22px); transition:opacity .65s var(--ease-scene),transform .7s var(--ease-scene); }
.motion-ready .reveal.in-view { opacity:1; transform:none; }
.zone-panel:not([hidden]) { animation:panel-enter .55s var(--ease-scene) both; }
@media(min-width:761px) and (max-width:1100px) {
  :root { --scene-gutter:132px; }
  .home-hero { grid-template-columns:1fr; gap:42px; }
  .hero-copy { max-width:720px; }
  .hero-visual { height:440px; }
  .home-hero h1 { font-size:clamp(3.4rem,6vw,5.1rem); }
  .floating-nav__link { max-width:120px; font-size:1rem; }
  .detail-hero { grid-template-columns:1fr; }
  .detail-body { grid-template-columns:1fr; gap:30px; }
  .detail-aside { position:static; }
  .two-panels { grid-template-columns:1fr; }
  .two-panels article:last-child { margin-left:var(--scene-gutter); }
}
@media(max-width:760px) {
  :root { --scene-gutter:22px; }
  .site-header { height:76px; padding:14px 22px; }
  .header-note { display:none; }
  .floating-nav {
    inset:auto 0 0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
    gap:0 4px; padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    background:linear-gradient(0deg,rgba(16,46,66,.98) 72%,rgba(16,46,66,.82));
    border:0; border-radius:0; box-shadow:none; pointer-events:none;
  }
  .floating-nav .floating-nav__link {
    position:static; max-width:none; min-height:40px; padding:8px 2px;
    background:none; border:0; border-radius:0; box-shadow:none;
    font-size:1rem; line-height:1.15; white-space:nowrap; text-shadow:none;
  }
  .floating-nav__link[aria-current=page] { background:none; text-underline-offset:5px; }
  .site-footer { padding:36px 22px calc(156px + env(safe-area-inset-bottom)); }
  .home-hero,.interior-hero,.section-pad { padding-left:22px; padding-right:22px; }
  .two-panels { padding-inline:0; }
  .two-panels article:first-child { padding:48px 22px; }
  .two-panels article:last-child { margin:0; }
  .hero-visual { height:clamp(350px,82vw,530px); }
  .orbit-top { right:0; }.orbit-bottom { left:0; }
  html { scroll-padding-bottom:120px; }
  a,button,input,textarea { scroll-margin-bottom:125px; }
}
@media(max-width:360px) { .floating-nav .floating-nav__link { font-size:.88rem; } }
@media(prefers-reduced-motion:reduce) {
  .home-hero .eyebrow,.home-hero h1,.home-hero .hero-copy>p,.home-hero .hero-actions { animation:none!important; }
  .motion-ready .reveal { opacity:1; transform:none; }
  .floating-nav__link:hover { transform:none; }
}
/* Project material opens from its object, above the preserved scene. */
.project-viewer {
  position:fixed; inset:0; width:100vw; max-width:none; height:100dvh; max-height:none;
  margin:0; padding:clamp(60px,7vw,100px) clamp(22px,6vw,90px) 40px;
  border:0; background:rgba(10,31,44,.98); color:var(--cream); z-index:100;
  overflow:auto; overscroll-behavior:contain;
}
.project-viewer[open] { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px; animation:project-open .55s var(--ease-scene) both; transform-origin:var(--origin-x,50%) var(--origin-y,50%); }
.project-viewer::backdrop { background:rgba(10,31,44,.85); }
.project-viewer__close { position:fixed; top:20px; right:24px; border:0; border-bottom:1px solid #d3ad6b; border-radius:0; padding:10px 0; min-height:44px; background:none; color:var(--cream); font:inherit; cursor:pointer; }
.project-viewer__close:hover { color:#edc985; }
.project-viewer__image { display:block; max-width:100%; width:auto; min-height:0; max-height:calc(100dvh - 170px); object-fit:contain; }
.project-viewer__caption { margin:0; font-size:.9rem; color:#d4dedf; text-align:center; }
@keyframes project-open { from { opacity:0; transform:scale(.88); } to { opacity:1; transform:scale(1); } }
@media(prefers-reduced-motion:reduce) { .project-viewer[open] { animation:none; } }
body.project-is-open { overflow:hidden; }
/* Tile dimensions remain invariant while a new route settles into view. */
.is-arriving .scene-column > .site-shell { animation:scene-arrive .6s var(--ease-scene) both; }
@keyframes scene-arrive { from { opacity:.3; } to { opacity:1; } }
/* Travel grows toward the selected word; its point remains the visual anchor. */
.is-leaving .site-shell {
  transform-origin:var(--travel-origin-x,50%) var(--travel-origin-y,50%);
  transform:translate(var(--travel-x,0),var(--travel-y,0)) scale(1.035);
}
@media(prefers-reduced-motion:reduce) { .is-leaving .site-shell { transform:none; } }

/* Segunda ronda: marco persistente, tipográfico y anclado al viewport. */
:root { --frame-top-space: 160px; --frame-safe-x: clamp(22px,4.2vw,64px); --frame-safe-y: max(16px,env(safe-area-inset-top)); }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: kcu-page-out .38s cubic-bezier(.65,0,.35,1) both; }
::view-transition-new(root) { animation: kcu-page-in .42s cubic-bezier(.22,1,.36,1) both; }
@keyframes kcu-page-out { to { opacity:.35; transform:translateX(-2vw); } }
@keyframes kcu-page-in { from { opacity:.6; transform:translateX(2vw); } to { opacity:1; transform:none; } }
.site-header.floating-brand {
  position:fixed; z-index:110; top:var(--frame-safe-y); left:var(--frame-safe-x);
  width:auto; height:auto; padding:0; border:0; background:none; box-shadow:none;
}
.site-header.floating-brand .brand { display:block; width:clamp(130px,14vw,190px); filter:drop-shadow(0 0 1px #102e42) drop-shadow(0 2px 5px rgba(0,0,0,.55)); mix-blend-mode:difference; }
.scene-top-spacer { height:var(--frame-top-space); }
.floating-nav {
  position:fixed; z-index:110; inset:var(--frame-safe-y) var(--frame-safe-x) auto auto;
  display:flex; flex-direction:column; align-items:flex-end; gap:1px;
  width:max-content; max-width:min(42vw,260px); padding:0;
  border:0; border-radius:0; background:none; box-shadow:none; pointer-events:none;
}
.floating-nav .floating-nav__link {
  position:static; display:block; width:fit-content; max-width:100%; min-height:34px;
  padding:6px 0; border:0; border-radius:0; background:none; box-shadow:none;
  color:#fff; font-family:var(--heading); font-size:1.06rem; font-weight:500;
  line-height:1.15; text-align:right; text-decoration:none; text-shadow:0 1px 4px #102e42,0 0 1px #102e42;
  pointer-events:auto; transition:color .2s ease,opacity .2s ease,transform .2s ease;
}
.floating-nav .floating-nav__link:hover { background:none; color:#f2ce8b; transform:translateX(-3px); }
.floating-nav .floating-nav__link[aria-current="page"] { color:#f2ce8b; background:none; text-decoration:underline; text-underline-offset:5px; }
.floating-nav .floating-nav__link,.floating-hablemos,.floating-back-services { -webkit-text-stroke:.2px rgba(8,30,42,.85); }
.floating-nav .floating-nav__link,.floating-hablemos,.floating-back-services { mix-blend-mode:difference; }
.floating-nav .floating-nav__link:focus-visible,.floating-brand .brand:focus-visible,
.floating-hablemos:focus-visible,.floating-back-services:focus-visible { outline:2px solid #f2ce8b; outline-offset:5px; }
.floating-hablemos,.floating-back-services {
  position:fixed; z-index:110; bottom:max(18px,env(safe-area-inset-bottom));
  display:inline-flex; align-items:center; min-height:44px; padding:8px 0;
  border:0; border-radius:0; background:none; box-shadow:none;
  color:#fff; font:600 1.05rem/1.2 var(--heading); text-decoration:none;
  text-shadow:0 1px 4px #102e42,0 0 1px #102e42; transition:color .2s ease,transform .2s ease;
}
.floating-hablemos { right:var(--frame-safe-x); }
.floating-back-services { left:var(--frame-safe-x); }
.floating-hablemos:hover,.floating-back-services:hover { color:#f2ce8b; transform:translateY(-2px); }
.site-footer { padding-bottom:max(108px,calc(env(safe-area-inset-bottom) + 84px)); }
.services-hero { min-height:max(520px,calc(100svh - var(--frame-top-space) - 16px)); }
.services-hero .button { margin-top:22px; }
.detail-hero { scroll-margin-top:var(--frame-top-space); }
@media(max-width:1100px) and (min-width:761px) {
  :root { --frame-top-space:160px; --frame-safe-x:28px; }
  .floating-nav { max-width:210px; }
  .floating-nav .floating-nav__link { max-width:100%; font-size:1rem; }
  .services-hero { min-height:max(520px,calc(100svh - var(--frame-top-space) - 16px)); }
}
@media(max-width:760px) {
  :root { --frame-top-space:160px; --frame-safe-x:20px; }
  .site-header.floating-brand .brand { width:clamp(116px,34vw,142px); }
  .floating-nav { gap:0; max-width:48vw; }
  .floating-nav .floating-nav__link { min-height:34px; padding:4px 0; font-size:.91rem; white-space:normal; }
  .floating-hablemos,.floating-back-services { bottom:max(12px,env(safe-area-inset-bottom)); font-size:1rem; }
  .site-footer { padding-bottom:max(112px,calc(env(safe-area-inset-bottom) + 92px)); }
  .services-hero { min-height:max(520px,calc(100svh - var(--frame-top-space) - 8px)); }
}
@media(max-width:380px) {
  :root { --frame-top-space:160px; --frame-safe-x:15px; }
  .site-header.floating-brand .brand { width:116px; }
  .floating-nav .floating-nav__link { font-size:.84rem; }
}
@media(prefers-reduced-motion:reduce) {
  ::view-transition-old(root),::view-transition-new(root) { animation:none!important; }
  .floating-nav .floating-nav__link:hover,.floating-hablemos:hover,.floating-back-services:hover { transform:none; }
}

/* Stable type-only controls, neighbouring zone detail, official About mark. */
.about-mark .about-isotype { display:block; width:min(100%,300px); height:auto; aspect-ratio:1; object-fit:contain; margin:0 auto 32px; }
.portfolio-note { margin-top:28px; font-size:1rem; color:var(--muted); }
.portfolio-note a { color:inherit; text-decoration:underline; text-underline-offset:4px; text-decoration-color:var(--gold); }
.portfolio-note a:hover { color:var(--gold); }
.zone-stage {
  position:fixed; z-index:100; inset:0; margin:0; padding:var(--frame-top-space) var(--frame-safe-x) 100px;
  overflow:auto; overscroll-behavior:contain; background:var(--paper); visibility:hidden;
  transform:translateX(100%); transition:transform .45s cubic-bezier(.22,1,.36,1),visibility .45s;
}
.zone-is-open { overflow:hidden; }
.zone-is-open .zone-stage { visibility:visible; transform:translateX(0); }
.zone-stage .zone-prompt { display:none; }
.zone-stage .zone-panel { max-width:1100px; margin:0 auto; padding:36px clamp(20px,4vw,56px); border-top:3px solid var(--gold); }
.zone-stage .zone-panel[hidden] { display:none; }
.zone-stage .zone-panel-head { display:flex; justify-content:space-between; gap:24px; }
.zone-stage .zone-close { position:sticky; top:0; z-index:1; }
.site-shell h1,.site-shell h2,.site-shell h3,.site-shell a { scroll-margin-top:calc(var(--frame-top-space) + 16px); }
@media(max-width:760px) {
  :root { --frame-top-space:180px; }
  .zone-stage { padding-right:var(--frame-safe-x); padding-left:var(--frame-safe-x); }
  .zone-stage .zone-panel { padding:24px 20px; }
  .zone-stage .zone-panel h2 { font-size:clamp(2.2rem,8vw,3.4rem); overflow-wrap:normal; }
  .floating-back-services { max-width:58vw; font-size:.95rem; }
}
@media(prefers-reduced-motion:reduce) { .zone-stage { transition:none; } }


/* Preserve the complete artwork rather than cropping service-specific content. */
.hero-photo img,.detail-photo img,.zone-photo img,.panel-image picture img { object-fit:contain; background:#123d56; }
.hero-photo,.detail-photo,.zone-photo { display:block; width:100%; height:100%; }
@media(max-width:700px) {
 .hero-visual,.detail-visual { height:auto; min-height:0; }
 .hero-photo img,.detail-photo img { height:auto; width:100%; aspect-ratio:3/4; }
 .zone-card .zone-photo img { aspect-ratio:3/4; height:auto; }
}
html { scroll-behavior:auto; overscroll-behavior:none; }

.zone-stage { scroll-snap-type:y proximity; scroll-padding-top:var(--frame-top-space); }
.zone-stage .service-row { scroll-snap-align:start; scroll-snap-stop:always; }

/* Loading fonts and images must not move the resting cyclic frame. */
.scene-viewport,.scene-column,.site-shell { overflow-anchor:none; }


/* Route transition owns the entrance; do not animate its captured contents twice. */
html.route-arrival .home-hero .hero-copy,
html.route-arrival .home-hero .hero-visual,
html.route-arrival .home-hero .eyebrow,
html.route-arrival .home-hero h1,
html.route-arrival .home-hero .hero-copy > p,
html.route-arrival .home-hero .hero-actions,
html.route-arrival .interior-hero > div:first-child,
html.route-arrival .detail-visual {
  animation:none;
}

/* A return restores an already-open zone; opening it from the map still animates. */
.zone-stage.zone-restoring { transition:none; }
.zone-stage.zone-restoring .zone-panel:not([hidden]) { animation:none; }
