/* Capa de navegación. Conserva el arte de los seis controles aprobados. */
html{scroll-behavior:auto;scrollbar-gutter:stable}
body{background:#100e0b;overflow-x:clip}
body.locked{overflow:hidden;height:100svh}
.locked #path{height:100svh;overflow:hidden}
button,a{-webkit-tap-highlight-color:transparent}
.skip-link{position:fixed;z-index:100;top:12px;left:12px;padding:12px 18px;background:#e8faff;color:#102128;transform:translateY(-160%)}
.skip-link:focus{transform:none}
.preview-stage{position:fixed!important;inset:0 0 auto;min-height:0!important;height:var(--scene-height,100svh)!important;transform:translateY(var(--scene-top,0px));pointer-events:none;z-index:0}
#room{pointer-events:none}
#preview .room-fallback{object-fit:cover}
.hub{position:absolute;inset:0;opacity:var(--hub-alpha,1);pointer-events:none}
.hub .access{pointer-events:auto}
.hub .introduction h2{font-size:clamp(26px,2.8vw,36px);line-height:1.14;letter-spacing:-.035em;margin:0 0 10px;font-weight:650}
.hub .introduction{top:76px}
.hub .bottom{pointer-events:auto}
.hub .bottom .continue{display:inline-flex;align-items:center;gap:12px;min-height:44px;font-size:12px;border-bottom:1px solid #bff4fa90;text-decoration:none;text-shadow:0 1px 3px #000}
.brand-entry{position:absolute;z-index:12;transform:translate(-50%,-50%);width:min(430px,82vw);left:50%;top:50%;border:0;padding:0;background:transparent;min-height:44px;pointer-events:auto;line-height:0}
.brand-entry img{display:block;width:100%;height:auto}
[data-renderer=webgl] .brand-entry img{opacity:0}
.invitation{position:absolute;left:50%;bottom:12%;width:90%;transform:translateX(-50%);text-align:center;z-index:10;text-shadow:0 1px 2px #000,0 2px 4px #000}
.invitation p{margin:0 0 12px;font-size:14px}.invitation .eyebrow{font-size:10px}
.invitation span{display:block;width:56px;height:1px;margin:20px auto;background:linear-gradient(90deg,transparent,#c3f9ff,transparent)}
.welcome{position:absolute;left:clamp(20px,4vw,64px);bottom:clamp(92px,11vh,130px);width:min(540px,47vw);text-shadow:0 1px 2px #000,0 2px 4px #000,0 0 3px #000;opacity:var(--welcome-alpha,0)}
.welcome h1{font-size:clamp(28px,3.2vw,47px);line-height:1.12;letter-spacing:-.035em;margin:0 0 22px}
.welcome>p:last-child{font-size:16px;line-height:1.7;margin:0}
.route-header{position:fixed;z-index:12;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:18px 24px;gap:18px;pointer-events:none}
.route-header a,.route-header button{pointer-events:auto}
.route-header img{display:block;width:150px;height:auto}
.route-header nav{display:flex;align-items:center;gap:22px}
.route-header nav a,.route-header button{background:none;border:0;border-bottom:1px solid #d0f4f980;color:#fff;text-decoration:none;min-height:44px;display:inline-flex;align-items:center;font-size:11px;font-weight:600;text-shadow:0 1px 2px #000,0 2px 4px #000;padding:6px 0}
.route-header a:hover,.route-header button:hover{color:#c4f9ff}
.scroll-hint{position:fixed;z-index:12;bottom:20px;left:28px;font-size:12px;text-shadow:0 1px 2px #000,0 2px 4px #000;pointer-events:none;max-width:55vw}
.scroll-hint span{font-size:24px;vertical-align:middle;margin-right:8px}
.read-mode{position:fixed;right:24px;bottom:20px;z-index:14;background:#102024c2;border:1px solid #bad9dc66;min-height:44px;padding:10px 14px;font-size:11px;color:#fff}
#path{position:relative;z-index:2;pointer-events:none}
#path a,#path button{pointer-events:auto}
.entry-zone{height:300svh}
.hub-zone{height:calc(var(--hub-height,1000px) + 65svh)}
.route-stop{position:relative;height:165svh;scroll-margin-top:0;isolation:isolate;pointer-events:none}
.stop-content{position:sticky;top:10svh;min-height:80svh;max-width:1440px;margin:0 auto;padding:8svh 6vw;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:6vw;color:#fff;text-shadow:0 1px 2px #000,0 2px 4px #000,0 0 3px #000}
.stop-art{position:relative;aspect-ratio:744/276;min-width:0;transform:translateY(calc((1 - var(--arrival,1))*40px)) rotate(calc((1 - var(--arrival,1))*-4deg));opacity:var(--arrival,1);filter:drop-shadow(0 8px 9px #0003)}
.stop-art .control-art{position:absolute;inset:0;width:100%;height:100%;max-width:none}
.stop-copy{min-width:0;opacity:var(--arrival,1);transform:translateY(calc((1 - var(--arrival,1))*30px))}
.stop-copy h2,.route-end h2{font-size:clamp(30px,3.5vw,50px);line-height:1.1;letter-spacing:-.035em;margin:0 0 22px}
.stop-copy>p:not(.eyebrow){font-size:clamp(16px,1.35vw,19px);line-height:1.7;margin:0 0 24px}
.stop-copy .eyebrow{font-size:10px}
.stop-actions{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center}
.text-action{display:inline-flex;align-items:center;justify-content:space-between;gap:20px;min-height:48px;max-width:100%;background:none;border:0;border-bottom:1px solid #ceeff4bd;text-decoration:none;color:#fff;padding:10px 0;font-size:14px;font-weight:650;text-shadow:0 1px 3px #000}
.text-action span{color:#baf6ff;transition:transform .3s}
.text-action:hover span,.text-action:focus-visible span{transform:translate(4px,-3px)}
.back-to-room{min-height:44px;display:inline-flex;align-items:center;font-size:12px;color:#e0f5f7;text-underline-offset:6px;text-shadow:0 1px 3px #000}
.route-end{min-height:100svh;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:100px 24px 80px;text-shadow:0 1px 2px #000,0 2px 4px #000}
.route-end p:not(.eyebrow){max-width:540px;font-size:18px;line-height:1.7}
/* El diálogo tiene su propio desplazamiento; el documento general se congela. */
body.in-experience .route-header,body.in-experience .hub,body.in-experience .welcome,body.in-experience #path,body.in-experience .scroll-hint,body.in-experience .read-mode{visibility:hidden}
#experience{position:fixed;inset:0;margin:0;border:0;width:100%;height:100%;max-width:none;max-height:none;padding:0;background:transparent;color:#fff;overflow-y:auto;overflow-x:clip;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y}
#experience::backdrop{background:#070c103b}
.experience-head{position:sticky;top:0;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:80px;padding:16px 26px;background:linear-gradient(#080c0eb8,transparent);pointer-events:none}
.experience-head img{width:145px;height:auto}
.experience-head button{pointer-events:auto;min-height:44px;background:none;border:0;border-bottom:1px solid #cff7ffad;color:#fff;padding:8px 0;font-size:13px;font-weight:650;text-shadow:0 1px 3px #000}
.experience-art{position:fixed;top:32%;left:4vw;width:48vw;aspect-ratio:744/276;pointer-events:none;z-index:2;transform:translateY(calc(var(--inner-drift,0)*-30px)) rotate(calc(var(--inner-drift,0)*-2deg))}
.experience-art .control-art{position:absolute;inset:0;width:100%;height:100%}
.experience-chapters{position:relative;z-index:3}
.chapter{min-height:92svh;margin-left:55%;width:39%;max-width:600px;display:flex;flex-direction:column;justify-content:center;padding:70px 0 100px;text-shadow:0 1px 2px #000,0 2px 4px #000,0 0 3px #000;scroll-margin-top:90px}
.chapter h2,.chapter h3{font-size:clamp(28px,3vw,44px);line-height:1.14;letter-spacing:-.035em;margin:0 0 24px}
.chapter p:not(.eyebrow){font-size:18px;line-height:1.75;margin:0 0 24px;overflow-wrap:break-word}
.chapter .chapter-direction{font-size:12px!important;color:#d4f9ff}
.chapter.ending{min-height:80svh}
.chapter.ending p{font-size:16px}
.experience-meter{position:fixed;bottom:0;left:0;right:0;height:2px;background:#aadce321;z-index:9;pointer-events:none}
.experience-meter span{display:block;width:100%;height:100%;background:#a8f1ff;transform-origin:left;transform:scaleX(var(--inner-progress,0));box-shadow:0 0 8px #63dcef}
.no-script{position:fixed;inset:auto 24px 24px;background:#14252a;padding:20px;z-index:30}
.reading .entry-zone{height:0}.reading #preview{transform:none!important}
.reading .route-stop{height:auto;min-height:100svh}.reading .stop-content{position:relative;top:0;opacity:1;min-height:100svh}
.reading .stop-copy,.reading .stop-art{opacity:1!important;transform:none!important}
.reading .read-mode{display:none}
.reading .hub-zone{height:calc(var(--hub-height) + 20px)}
@media(max-width:900px){
 .route-header{padding:14px 20px;gap:12px}.route-header img{width:125px}.route-header nav{gap:14px}.route-header nav a,.route-header button{font-size:10px}
 .stop-content{gap:4vw;padding:10svh 5vw}.stop-copy h2{font-size:32px}.stop-copy>p:not(.eyebrow){font-size:16px}
 .hub .introduction{top:88px}.hub .introduction h2{font-size:28px}
 .chapter{margin-left:51%;width:44%}.chapter p:not(.eyebrow){font-size:16px}.experience-art{left:0;width:50vw}
}
@media(max-width:600px){
 .route-header{padding:12px 16px;align-items:center}.route-header img{width:108px}.route-header nav{gap:12px;justify-content:flex-end;max-width:190px;flex-wrap:nowrap}.route-header nav a{display:none}.route-header button{font-size:9px;line-height:1.35;min-height:44px;max-width:82px;text-align:left}
 .hub .introduction{top:88px}.hub .introduction h2{font-size:26px}.hub .introduction>p:last-child{max-width:290px;margin:auto}
 .hub .bottom{left:16px;right:16px;gap:12px}.hub .bottom p{font-size:9px;max-width:180px}.hub .bottom small{font-size:8px}.hub .bottom .continue{font-size:10px;white-space:nowrap;gap:5px}
 .welcome{left:20px;width:calc(100% - 40px);bottom:105px}.welcome h1{font-size:32px}.welcome>p:last-child{font-size:15px}
 .scroll-hint{left:18px;bottom:20px;font-size:10px;max-width:54vw}.read-mode{right:16px;font-size:10px;padding:10px}
 .route-stop{height:155svh}.stop-content{top:10svh;min-height:85svh;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:24px;padding:30px 24px 70px}
 .stop-art{width:100%;max-width:430px;align-self:center;flex-shrink:0}.stop-copy h2{font-size:32px;margin-bottom:18px}.stop-copy>p:not(.eyebrow){font-size:16px;line-height:1.65;margin-bottom:18px}.stop-copy .eyebrow{font-size:8px}
 .text-action{font-size:14px}.stop-actions{gap:12px 22px}.route-end h2{font-size:34px}
 .experience-head{padding:12px 18px;min-height:74px}.experience-head img{width:116px}.experience-head button{font-size:11px}
 .experience-art{top:110px;left:16px;width:calc(100% - 32px);max-width:430px}
 .chapter{margin:0;width:100%;max-width:none;min-height:100svh;justify-content:center;padding:calc(160px + (100vw - 32px)*.371) 24px 70px}
 .chapter h2,.chapter h3{font-size:30px;margin-bottom:20px}.chapter p:not(.eyebrow){font-size:16px;line-height:1.75}
 .chapter.ending{min-height:100svh}
}
@media(max-height:600px) and (min-width:601px){.stop-content{top:60px;padding:35px 6vw}.stop-copy h2{font-size:30px}.stop-copy>p:not(.eyebrow){font-size:14px}.experience-art{top:34%}.chapter{min-height:110svh;padding-top:100px}.chapter h2,.chapter h3{font-size:28px}.chapter p:not(.eyebrow){font-size:15px}}
@media(prefers-reduced-motion:reduce){.text-action span{transition:none}.stop-art,.stop-copy,.experience-art{transform:none!important}}

/* Automatización pertenece a la misma sala: el diálogo es transparente y
   aporta foco y desplazamiento independiente, no sustituye el escenario. */
body.spatial-experience .hub{visibility:visible!important;opacity:calc(var(--hub-alpha,0)*(1 - var(--station-departure,0)))}
body.spatial-experience #path{visibility:visible!important;opacity:calc(1 - var(--station-departure,0))}
#experience[data-spatial]::backdrop{background:transparent}
#experience[data-spatial][data-travelling=true]{overflow:hidden}
#experience[data-spatial] .experience-head{background:none;text-shadow:0 1px 3px #000}
#experience[data-spatial] .experience-art{display:none}
#experience[data-spatial] .experience-chapters{opacity:var(--station-arrived,0)}
.automation-label{position:fixed;left:28px;top:94px;z-index:5;max-width:50vw;text-shadow:0 1px 3px #000,0 0 5px #000}
.automation-label h2{font-size:17px;font-weight:600;margin:0;line-height:1.4}
.automation-chapter{position:relative;min-height:155svh;pointer-events:none}
.automation-chapter:last-child{min-height:305svh}
.automation-copy{position:fixed;right:4vw;bottom:17svh;width:min(340px,27vw);pointer-events:auto;color:#fff;text-shadow:0 1px 1px #000,0 -1px 1px #000,1px 0 1px #000,-1px 0 1px #000,0 2px 4px #000;will-change:opacity,transform}
.automation-copy .eyebrow{font-size:9px;line-height:1.7;color:#c2f5f8}
.automation-copy h3{font-size:clamp(25px,2.5vw,37px);line-height:1.15;letter-spacing:-.025em;margin:0 0 20px}
.automation-copy>p:not(.eyebrow){font-size:16px;line-height:1.75;margin:0 0 20px}
.automation-copy .automation-direction{font-size:11px!important;color:#d8f5f6}
.automation-copy .text-action{width:100%;font-size:13px;margin:4px 0;gap:10px}
.automation-chapter[inert] .automation-copy{pointer-events:none}
@media(max-width:900px){
 .automation-label{left:22px;top:88px;max-width:calc(100% - 44px)}
 .automation-label h2{font-size:14px}
 .automation-copy{left:24px;right:24px;bottom:9svh;width:auto;max-width:530px}
 .automation-copy h3{font-size:28px;max-width:400px;margin-bottom:14px}
 .automation-copy>p:not(.eyebrow){font-size:15px;line-height:1.7;max-width:480px;margin-bottom:14px}
 .automation-copy .text-action{max-width:380px}
}
@media(max-width:600px){
 .automation-label{left:22px;top:82px}.automation-label h2{font-size:13px}
 .automation-copy{bottom:7svh;left:22px;right:22px;max-width:none}
 .automation-copy h3{font-size:26px;line-height:1.17}
 .automation-copy>p:not(.eyebrow){font-size:15px;line-height:1.65}
 .automation-copy .eyebrow{font-size:8px;margin-bottom:10px}
 .automation-copy .text-action{min-height:44px}
 .automation-chapter:last-child .text-action:last-child{display:none}
}
@media(max-height:600px) and (min-width:901px){.automation-label{top:78px}.automation-copy{bottom:9svh;width:28vw}.automation-copy h3{font-size:25px}.automation-copy>p:not(.eyebrow){font-size:14px;line-height:1.6}}

/* El interior usa el lateral libre del encuadre; no cubre los instrumentos. */
#experience[data-spatial] .automation-copy{left:3.5vw;right:auto;bottom:10svh;width:min(345px,27vw)}
#experience[data-spatial][data-portal=true] .automation-copy{left:auto;right:3.5vw;bottom:13svh;width:min(310px,24vw)}
#experience[data-spatial] .automation-label h2{font-size:14px}
@media(max-width:900px){#experience[data-spatial] .automation-copy,#experience[data-spatial][data-portal=true] .automation-copy{left:24px;right:24px;width:auto;max-width:510px;bottom:6svh}}
@media(max-width:600px){#experience[data-spatial] .automation-copy,#experience[data-spatial][data-portal=true] .automation-copy{left:22px;right:22px;max-width:none;bottom:5svh}#experience[data-spatial] .automation-copy h3{font-size:25px}#experience[data-spatial] .automation-label{top:76px}}

#experience[data-spatial][data-portal=false] .automation-direction{display:none}

body.spatial-experience{width:100vw!important}
#experience[data-spatial]{width:100vw;scrollbar-gutter:auto}

html.spatial-open{scrollbar-gutter:auto}

/* El cierre deja libre el tablero del resultado y conserva la cotización a su lado. */
@media(min-width:901px){#experience[data-spatial][data-phase="1"] .automation-copy{left:auto;right:3.5vw}#experience[data-spatial][data-phase="4"] .automation-copy{left:auto;right:3.5vw;bottom:5svh}}

.automation-load{display:none;position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:9;margin:0;color:#d7f7fa;font-size:12px;text-shadow:0 1px 3px #000;white-space:nowrap;pointer-events:none}
#experience[data-travelling=true] .automation-load{display:block}
