:root {
  --bg: #07080a; --ink: #f2efe9; --dim: #8d8a84; --faint: #3a3936; --gold: #c9a86a;
  --serif: "Iowan Old Style", "Palatino Nova", Palatino, Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: var(--sans); font-weight: 300; -webkit-font-smoothing: antialiased; }

/* the object, pinned */
#stage { position: fixed; inset: 0 0 0 34vw; transition: opacity .35s ease; }
#stage.swap { opacity: 0; }
/* no pointer events: the wheel must scroll the page, not the scan */
#gl { width: 100%; height: 100%; display: block; outline: none; pointer-events: none; }
/* same box as #stage, but above the vignette so labels stay crisp */
#callouts { position: fixed; inset: 0 0 0 34vw; width: 66vw; height: 100vh; z-index: 2; overflow: visible; pointer-events: none; }
#callouts .lead { fill: none; stroke: var(--gold); stroke-width: 1; }
#callouts .dot { fill: var(--gold); }
#callouts .ring { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .55; }
#callouts .cname { fill: var(--ink); font: 400 10px var(--sans); letter-spacing: .26em; text-transform: uppercase; }
#callouts .cdetail { fill: var(--dim); font: italic 400 13px var(--serif); letter-spacing: .02em; }
#vignette {
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0, var(--bg) 30vw, transparent 52vw),
    radial-gradient(ellipse 60% 70% at 67% 50%, transparent 55%, var(--bg) 100%);
}

#top {
  position: fixed; z-index: 5; top: 0; left: 0; right: 0; padding: 26px 40px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
}
.mark i { font-family: var(--serif); font-style: italic; letter-spacing: .05em; text-transform: none; font-size: 14px; color: var(--gold); margin-left: 6px; }
.link { color: var(--dim); text-decoration: none; transition: color .2s; }
.link:hover { color: var(--ink); }

#rail { position: fixed; z-index: 5; right: 28px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 11px; }
#rail a { width: 18px; height: 9px; display: block; position: relative; }
#rail a::after { content: ""; position: absolute; right: 0; top: 4px; height: 1px; width: 8px; background: var(--faint); transition: width .3s, background .3s; }
#rail a.on::after { width: 18px; background: var(--gold); }
#rail a:hover::after { background: var(--ink); }

#loading { position: fixed; z-index: 6; left: 40px; bottom: 34px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); transition: opacity .6s; }
#loading.done { opacity: 0; pointer-events: none; }
#loadingBar { width: 160px; height: 1px; background: var(--faint); margin-top: 10px; }
#loadingBar i { display: block; height: 1px; width: 0; background: var(--gold); transition: width .2s; }

/* chapters */
#chapters { position: relative; z-index: 3; pointer-events: none; }
.chapter { height: 170vh; }
.chapter:first-child { height: 130vh; }
.chapter:last-child { height: 120vh; }
.card {
  position: sticky; top: 0; height: 100vh; width: min(34vw, 470px); margin-left: 40px;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(18px); will-change: opacity, transform;
}
.eyebrow { font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); margin-bottom: 22px; }
.eyebrow span { color: var(--faint); margin-left: 10px; }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0 0 22px; line-height: 1.02; letter-spacing: -.01em; }
h1 { font-size: clamp(54px, 7.2vw, 112px); }
h2 { font-size: clamp(38px, 4.4vw, 68px); }
h1 em, h2 em { font-style: italic; color: var(--gold); }
.card p { font-size: 15px; line-height: 1.75; color: #b9b5ad; margin: 0 0 14px; max-width: 40ch; }
.card p.note { font-size: 11px; line-height: 1.6; color: var(--dim); letter-spacing: .02em; }
.specs { display: flex; gap: 34px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--faint); }
.spec b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.spec b small { font-family: var(--sans); font-size: 11px; letter-spacing: .1em; color: var(--dim); margin-left: 4px; }
.spec span { font-size: 9px; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); }
.keys { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.keys i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: baseline; }
.scrollcue { margin-top: 44px; font-size: 9px; letter-spacing: .34em; text-transform: uppercase; color: var(--dim); }
.scrollcue::after { content: ""; display: block; width: 1px; height: 44px; margin-top: 12px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(.35); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
.cta { pointer-events: auto; display: inline-block; margin-top: 26px; padding: 14px 26px; border: 1px solid var(--gold); color: var(--gold); text-decoration: none; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; transition: background .25s, color .25s; }
.cta:hover { background: var(--gold); color: var(--bg); }

@media (max-width: 820px) {
  #stage { inset: 0 0 38vh 0; }
  #callouts { inset: 0 0 38vh 0; width: 100vw; height: 62vh; }
  #vignette { background: linear-gradient(0deg, var(--bg) 0, var(--bg) 34vh, transparent 56vh); }
  .card { width: auto; margin: 0 22px; justify-content: flex-end; padding-bottom: 5vh; }
  h1 { font-size: 46px; } h2 { font-size: 32px; }
  .card p { font-size: 13px; }
  #rail { display: none; }
  #top { padding: 18px 22px; }
}
@media (prefers-reduced-motion: reduce) { .scrollcue::after { animation: none; } }
