/* V4: separate entrance and browsing states. Never put two video sections in one scroll stack. */
:root{--nav-height:72px}
html{scroll-behavior:auto}
#header{height:var(--nav-height);position:relative;z-index:40}
#header[hidden]{display:none!important;height:0!important}
.site-header,body[data-page="home"] .site-header{position:fixed;inset:0 0 auto;height:var(--nav-height);background:rgba(6,12,21,.97);border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}
body[data-page="home"] .site-header:after{display:none}
body[data-home-mode="browse"] #header{height:var(--nav-height)}
body[data-home-mode="hero"]{overflow-x:clip}
body[data-home-mode="hero"] #footer{display:none}
body[data-page="home"] .hero{height:100vh;height:100dvh;min-height:400px;isolation:isolate}
body[data-page="home"] .hero:before{content:none!important;background:none!important;filter:none!important}
body[data-page="home"] .hero-bg,body[data-page="home"] .hero-poster{object-fit:cover;object-position:50% 54%;height:100%;width:100%}
body[data-page="home"] .hero:after{background:linear-gradient(180deg,#060c1415,transparent 30%,transparent 72%,#03081026)}
body[data-page="home"] .hero-content{top:48%;width:min(1140px,calc(100% - 64px));transform:translate(-50%,-42%)}
body[data-page="home"] .hero-content:before{inset:-30px -60px -34px;background:radial-gradient(ellipse,#050d1ad9 0%,#050d1aae 32%,#05101b46 61%,transparent 78%);filter:none}
body[data-page="home"] .hero-tagline{font-size:clamp(23px,1.6vw,30px);letter-spacing:.08em;margin:8px 0 30px;line-height:1.5}
html[lang="en"] body[data-page="home"] .hero-tagline{font-size:clamp(23px,1.6vw,30px);letter-spacing:.012em;line-height:1.5}
body[data-page="home"] .hero-overline{margin-bottom:20px}
body[data-page="home"] .hero-scroll{left:auto;right:clamp(24px,4vw,88px);bottom:24px;transform:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding:11px 19px;background:#06111bcc;border:1px solid #b598614f;border-radius:5px;font-size:13px;line-height:1.3;letter-spacing:.12em;min-height:44px}
body[data-page="home"] .hero-scroll:hover{background:#121c29e6;border-color:#d5bd85}
body[data-page="home"] .hero-scroll .icon{height:16px;width:16px;animation:none}
.hero-utilities{position:absolute;bottom:29px;left:clamp(24px,4vw,88px);display:flex;gap:14px;align-items:center;z-index:4;color:#cbbb98;}
.hero-utility{font-size:13px;min-height:36px;padding:5px 0;background:transparent;color:#f1e8d6;border:0;cursor:pointer;text-shadow:0 1px 5px #000;white-space:nowrap}
.hero-utility:hover{text-decoration:underline;text-underline-offset:5px}
.hero-utility:focus-visible{outline:2px solid #e3c98d;outline-offset:5px}
body[data-home-mode="browse"] .home-search{padding-top:clamp(40px,6vh,70px)}
body[data-home-mode="browse"] #explore{scroll-margin-top:calc(var(--nav-height) + 20px)}
#chapterVeil{display:none!important}
.v4-scene-snapshot{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-height:none!important;margin:0!important;z-index:1000!important;pointer-events:none!important;overflow:hidden!important;min-height:0!important;}
.v4-return-snapshot{background:#07111d}
.v4-return-snapshot>img,.v4-return-snapshot>canvas{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.v4-return-snapshot:after{content:"";position:absolute;inset:0;background:rgba(5,12,22,var(--scene-shade,.16))}
body.v4-switching{overflow:hidden}
body[data-page="home"] #heroBrand:focus{outline:none}
@media(min-aspect-ratio:2/1){body[data-page="home"] .hero-bg,body[data-page="home"] .hero-poster{object-position:50% 60%}}
@media(max-height:800px) and (min-width:960px){
 body[data-page="home"] .hero-content{top:47%;transform:translate(-50%,-40%)}
 body[data-page="home"] .hero-tagline,html[lang="en"] body[data-page="home"] .hero-tagline{font-size:24px;margin:5px 0 20px}
 body[data-page="home"] .hero-overline{margin-bottom:15px}
 body[data-page="home"] .hero-scroll{bottom:17px}
 .hero-utilities{bottom:21px}
}
@media(max-height:600px){
 body[data-page="home"] .hero-content{top:46%;transform:translate(-50%,-42%)}
 body[data-page="home"] .hero-tagline,html[lang="en"] body[data-page="home"] .hero-tagline{font-size:20px;margin:4px 0 14px}
 body[data-page="home"] .hero-overline{font-size:12px;margin-bottom:8px}
 .hero-wordmark{width:min(40vw,510px)}
 body[data-page="home"] .hero-scroll{bottom:12px;font-size:12px;padding:8px 14px}
 .hero-utilities{bottom:14px}
}
@media(max-width:959px){
 body[data-page="home"] .hero-content{width:calc(100% - 40px)}
 body[data-page="home"] .hero-tagline,html[lang="en"] body[data-page="home"] .hero-tagline{font-size:clamp(18px,3vw,24px);max-width:100%;white-space:normal}
 .hero-utilities{left:18px;bottom:21px;gap:10px}
 body[data-page="home"] .hero-scroll{right:18px;bottom:18px;font-size:12px;padding:10px 13px}
}
@media(prefers-reduced-motion:reduce){.v4-scene-snapshot{display:none}}
