:root { color-scheme: dark; --night: #080f12; --gold: #d5b47a; --paper: #f1e7d5; --muted: #bcbdb4; --display: 'Cinzel', Georgia, serif; --text: 'Alegreya', Georgia, serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { margin: 0; color: var(--paper); font: 400 19px/1.65 var(--text); background: var(--night); }
::selection { background: #d5b47a; color: #10181a; }
a { color: inherit; text-underline-offset: 5px; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.skip { position: fixed; top: 12px; left: 16px; z-index: 50; padding: 12px; background: var(--night); transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-nav { position: absolute; inset: 0 0 auto; z-index: 15; height: 90px; padding: 0 4vw; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid #d5b47a25; background: linear-gradient(#080f1288, transparent); }
.wordmark { font: 600 13px/1.3 var(--display); letter-spacing: .16em; text-decoration: none; }
.wordmark span { margin-right: 12px; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { font: 500 10px/1.5 var(--display); text-decoration: none; text-transform: uppercase; letter-spacing: .14em; }
.nav-links a:last-child { padding: 12px 18px; border: 1px solid #d5b47a77; }
.progress-track { position: fixed; inset: 0 0 auto; height: 2px; z-index: 30; pointer-events: none; }
.progress-fill { height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.hero { position: relative; isolation: isolate; min-height: 780px; height: 100svh; display: grid; align-items: center; padding: 150px max(8vw, 24px) 125px; overflow: hidden; }
.hero-art { position: absolute; z-index: -3; inset: -5%; background: url('img/story-lantern-road.webp') center / cover; }
.hero::before { content: ''; position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, #060d16b3, #060d1644 66%, #060d1622), linear-gradient(0deg, var(--night), transparent 35%, #080f1222); }
.hero-content { max-width: 780px; text-align: center; width: 63%; }
.eyebrow { color: var(--gold); font: 500 10px/1.6 var(--display); letter-spacing: .25em; text-transform: uppercase; margin: 0 0 28px; }
h1 { margin: 0; }
h1 img { width: 650px; height: auto; filter: drop-shadow(0 8px 30px #000a); }
.hero-tagline { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.4; font-style: italic; max-width: 28ch; margin: 28px auto 32px; text-shadow: 0 2px 20px #000; }
.btn { display: inline-flex; gap: 24px; justify-content: center; align-items: center; color: var(--paper); padding: 18px 25px; background: #0b151a66; border: 1px solid #d5b47a99; font: 500 11px/1.3 var(--display); letter-spacing: .12em; text-decoration: none; cursor: pointer; transition: background .25s, box-shadow .25s, transform .25s; }
.btn:hover { background: #d5b47a22; transform: translateY(-2px); box-shadow: 0 4px 25px #d5b47a11; }
.btn-lit { background: linear-gradient(110deg,#b98b4b,#f0d799,#c49a59); color: #24190c; border-color: #ebcc8b; }
.btn-lit:hover { background: #f0d799; color: #24190c; box-shadow: 0 0 35px #d5b47a33; }
.btn[aria-disabled='true'] { opacity: .6; cursor: not-allowed; }
.hero-note { font-size: 13px; letter-spacing: .07em; color: #c4c5bb; margin: 25px 0 0; }
.hero-bottom { position: absolute; bottom: 34px; left: 4vw; right: 4vw; display: flex; justify-content: space-between; align-items: end; }
.hero-bottom p { font: 500 9px/1.8 var(--display); letter-spacing: .15em; margin: 0 140px 0 0; color: #c0c1b4; }
.scroll-cue { color: var(--gold); text-decoration: none; font: 500 9px/1.7 var(--display); letter-spacing: .2em; }
.scroll-cue::after { content: ''; display: inline-block; width: 55px; height: 1px; background: linear-gradient(var(--gold),#d5b47a33); vertical-align: middle; margin-left: 18px; }
.motion-toggle { position: fixed; z-index: 25; bottom: 22px; right: 24px; color: #e2d6bd; padding: 9px 13px; background: #080f12c9; border: 1px solid #d5b47a44; font: 500 9px/1.5 var(--display); letter-spacing: .08em; cursor: pointer; backdrop-filter: blur(8px); }
.motion-toggle:hover { border-color: var(--gold); }
.particles { position: fixed; inset: 0; z-index: 3; pointer-events: none; width: 100%; height: 100%; }
.chapter-rail { position: fixed; z-index: 20; right: 28px; top: 50%; transform: translateY(-50%); display: grid; gap: 12px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s; }
body.in-story .chapter-rail { opacity: 1; visibility: visible; pointer-events: auto; }
.chapter-rail a { position: relative; display: grid; place-items: center; width: 32px; height: 32px; font: 500 9px/1 var(--display); text-decoration: none; color: #d0c5b1; border: 1px solid transparent; background: #08101570; }
.chapter-rail a[aria-current='step'] { border-color: var(--gold); color: #f4d294; background: #0c181dcc; }
.chapter-rail a span { position: absolute; right: 44px; white-space: nowrap; padding: 5px 9px; background: #080f12dd; opacity: 0; pointer-events: none; }
.chapter-rail a:hover span, .chapter-rail a:focus-visible span { opacity: 1; }
.chapter { position: relative; isolation: isolate; background: var(--night); }
.scene { position: sticky; top: 0; height: 100svh; min-height: 580px; overflow: hidden; z-index: -1; }
.scene-art { position: absolute; inset: -7% -2%; width: 104%; height: 114%; max-width: none; object-fit: cover; object-position: var(--focus, 50% 50%); }
.scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #080e16e0, #080e1688 36%, #080e1614 73%), linear-gradient(180deg, var(--night), transparent 18%, transparent 75%, var(--night)); }
.chapter[data-side='right'] .scene::after { background: linear-gradient(270deg, #080e16e0, #080e1688 36%, #080e1614 73%), linear-gradient(180deg, var(--night), transparent 18%, transparent 75%, var(--night)); }
.scene-mist { position: absolute; inset: 30% -20% -20%; opacity: .35; background: radial-gradient(ellipse at 30% 50%, #9faebd44, transparent 40%), radial-gradient(ellipse at 70% 80%, #8b9ca22b, transparent 45%); filter: blur(25px); }
.scene-art-alternate { opacity: 0; }
.chapter-dark .scene { background: radial-gradient(ellipse at 65% 50%, #142126, #080f12 65%); }
.chapter-dark .scene-mist { opacity: .6; }
#fog .scene-art { filter: brightness(.7) saturate(.65); }
.story-copy { position: relative; margin-top: -100svh; z-index: 4; padding: 0 9vw; }
.story-beat { min-height: 82svh; display: flex; flex-direction: column; justify-content: center; width: min(520px, 47%); padding: 100px 0; }
.story-beat + .story-beat { min-height: 70svh; padding-top: 70px; padding-bottom: 140px; }
.chapter[data-side='right'] .story-beat { margin-left: auto; }
.chapter-index { display: flex; align-items: center; gap: 16px; }
.chapter-index::before { content: ''; display: block; width: 35px; height: 1px; background: var(--gold); }
h2 { font: 500 clamp(36px, 4.1vw, 62px)/1.13 var(--display); letter-spacing: -.025em; margin: 0 0 30px; color: #f1e5cd; text-wrap: balance; }
.story-beat p:not(.eyebrow) { font-size: clamp(23px, 2.25vw, 32px); line-height: 1.5; margin: 0 0 24px; text-shadow: 0 2px 18px #0008; }
.story-beat em { color: #efd19b; font-style: italic; }
.story-beat .last-line { color: #f4d49b; font-style: italic; }
.beat-ornament { color: var(--gold); margin-bottom: 25px; font-size: 20px; }
.scene-caption { position: absolute; bottom: 30px; right: 9vw; color: #dddbcfaa; font: 500 8px/1.5 var(--display); letter-spacing: .17em; text-transform: uppercase; }
.chapter[data-side='right'] .scene-caption { right: auto; left: 9vw; }
.epilogue { position: relative; z-index: 4; padding: 120px 24px 100px; text-align: center; background: linear-gradient(#080f12d9,#080f12df),url('img/story-morning.webp') center / cover; border-bottom: 1px solid #d5b47a25; }
.epilogue-inner { max-width: 750px; margin: auto; }
.epilogue h2 { font-size: clamp(38px, 5vw, 70px); }
.epilogue .invitation { font-size: 26px; font-style: italic; max-width: 35ch; margin: 0 auto 35px; }
.status { font-size: 15px; color: var(--muted); display: flex; justify-content: center; gap: 10px; align-items: center; margin-top: 28px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #93968b; }
.status[data-state='up'] .dot { background: #9bc69a; box-shadow: 0 0 9px #9bc69a66; }
.status[data-state='down'] .dot { background: #bb8d74; }
.fine { font-size: 15px; color: var(--muted); max-width: 52ch; margin: 20px auto; }
.practical { max-width: 1050px; margin: 0 auto; padding: 60px 30px 75px; position: relative; z-index: 4; }
details { border-block: 1px solid #d5b47a33; }
details + details { border-top: 0; }
summary { cursor: pointer; padding: 25px 0; font: 500 13px/1.5 var(--display); letter-spacing: .08em; color: var(--gold); }
.details-body { padding: 0 0 32px; color: var(--muted); }
.details-body h3 { color: var(--paper); font: 500 17px/1.4 var(--display); margin-top: 25px; }
.details-body strong { color: var(--paper); }
.details-body li { margin-bottom: 12px; }
.features-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; }
.features-columns ul { list-style: none; padding: 0; }
.features-columns li strong { display: block; }
footer { position: relative; z-index: 4; padding: 24px 5vw 70px; border-top: 1px solid #d5b47a22; display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: #9ea59d; }
footer a { color: var(--gold); }
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .hero-content { animation: arrival 1.7s cubic-bezier(.16,1,.3,1) both; }
  html:not(.motion-paused) .scene-mist { animation: mist 24s ease-in-out infinite alternate; }
  .motion-enabled .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s, transform 1.1s cubic-bezier(.16,1,.3,1); }
  .motion-enabled .reveal.is-visible { opacity: 1; transform: none; }
}
@keyframes arrival { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes mist { from { transform: translateX(-4%); } to { transform: translateX(5%); } }
.chapter:not(.is-near) .scene-mist { animation-play-state: paused !important; }
html.motion-paused { scroll-behavior: auto; }
html.motion-paused *, html.motion-paused *::after { animation: none !important; transition: none !important; }
html.motion-paused .reveal { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .hero-content { width: 90%; max-width: 620px; }
  .hero { justify-items: center; }
  .hero::before { background: linear-gradient(#080f1222,#080f1288 55%,var(--night)); }
  .chapter-rail { right: 10px; gap: 7px; }
  .chapter-rail a { width: 26px; height: 26px; font-size: 8px; }
  .story-copy { padding-inline: 7vw; }
  .story-beat { width: min(500px, 72%); }
  .chapter[data-side='right'] .story-beat { margin-right: 4vw; }
}
@media (max-width: 600px) {
  .site-nav { height: 72px; padding-inline: 20px; }
  .wordmark { font-size: 10px; letter-spacing: .08em; }
  .wordmark span { margin-right: 5px; }
  .nav-links { gap: 0; }
  .nav-links a:first-child { display: none; }
  .nav-links a:last-child { padding: 10px 12px; font-size: 8px; }
  .hero { min-height: 720px; padding: 130px 22px 140px; }
  .hero-content { width: 100%; }
  .hero .eyebrow { font-size: 8px; letter-spacing: .17em; }
  .hero-art { background-position: 65% center; }
  .hero-tagline { font-size: 25px; max-width: 24ch; }
  .hero-note { font-size: 11px; }
  .hero-bottom { left: 24px; right: 24px; bottom: 80px; }
  .hero-bottom p { display: none; }
  .motion-toggle { bottom: 16px; right: 16px; }
  .chapter-rail { right: 5px; }
  .chapter-rail a { width: 22px; height: 28px; }
  .chapter-rail a span { display: none; }
  .scene { min-height: 0; }
  .scene-art { object-position: var(--mobile-focus, var(--focus, 50% 50%)); }
  .scene::after, .chapter[data-side='right'] .scene::after { background: linear-gradient(90deg,#080e16c9,#080e1677 85%),linear-gradient(var(--night),transparent 20%,transparent 70%,var(--night)); }
  .story-copy { padding-left: 25px; padding-right: 43px; }
  .story-beat { width: 100%; min-height: 85svh; padding-block: 100px 70px; }
  .chapter[data-side='right'] .story-beat { margin: 0; }
  .story-beat + .story-beat { min-height: 75svh; padding-block: 60px 110px; }
  .story-beat p:not(.eyebrow) { font-size: 25px; line-height: 1.5; }
  .eyebrow { font-size: 9px; letter-spacing: .17em; margin-bottom: 25px; }
  h2 { font-size: 37px; }
  .scene-caption { display: none; }
  .epilogue { padding: 90px 25px 70px; }
  .epilogue .invitation { font-size: 24px; }
  .features-columns { grid-template-columns: 1fr; gap: 0; }
  .practical { padding: 35px 25px 50px; }
  footer { display: block; padding-inline: 25px; }
  footer a { display: inline-block; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::after { animation: none !important; transition: none !important; }
  .scene-art, .hero-art { transform: none !important; }
  .reveal { opacity: 1; transform: none; }
}
