:root {
  --ink: rgb(246, 242, 233);
  --ink-2: rgba(246, 242, 233, .72);
  --ink-3: rgba(246, 242, 233, .5);
  --glass: rgba(14, 16, 15, .62);
  --glass-2: rgba(14, 16, 15, .82);
  --line: rgba(246, 242, 233, .12);
  --gold: rgb(232, 196, 124);
  --gold-ink: rgb(28, 22, 10);
  --r: 16px;
  --blur: saturate(140%) blur(18px);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: rgb(13, 15, 14); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; display: block; opacity: 0; transition: opacity 1.2s ease; }
body.ready #stage { opacity: 1; }
#poster { position: fixed; inset: 0; background: rgb(13, 15, 14) center / cover no-repeat; transition: opacity 1.2s ease; }
#poster.has { animation: drift 40s ease-in-out infinite alternate; }
body.ready #poster { opacity: 0; pointer-events: none; }
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
/* the left edge darkens behind the hero so the text reads over any frame */
#veil { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 9, 9, .78) 0%, rgba(8, 9, 9, .45) 38%, rgba(8, 9, 9, 0) 62%), linear-gradient(0deg, rgba(8, 9, 9, .5), rgba(8, 9, 9, 0) 22%); transition: opacity .8s; }
body.exploring #veil, body.touring #veil { opacity: .35; }

/* header */
#top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; z-index: 20; pointer-events: none; }
#top > * { pointer-events: auto; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.brand .mark { font: 800 19px/1.1 var(--display); letter-spacing: -.01em; }
.brand .sub { font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
.top-actions { display: flex; gap: 8px; }

/* buttons */
.primary, .ghost, .pill { border-radius: 999px; padding: 12px 22px; font-weight: 600; border: 1px solid transparent; transition: transform .15s, background .2s, border-color .2s; white-space: nowrap; }
.primary { background: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 30px rgba(232, 196, 124, .25); }
.primary:hover { transform: translateY(-1px); background: rgb(240, 208, 142); }
.primary .play { font-size: 12px; margin-right: 6px; }
.ghost { background: rgba(246, 242, 233, .06); border-color: var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.ghost:hover { background: rgba(246, 242, 233, .12); }
.pill { padding: 9px 18px; background: var(--ink); color: rgb(13, 15, 14); }
#top .ghost { padding: 9px 16px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* hero */
#hero { position: fixed; left: clamp(16px, 5vw, 72px); top: 50%; transform: translateY(-46%); width: min(600px, calc(100% - 32px)); z-index: 10; transition: opacity .6s, transform .6s; }
#hero.gone { opacity: 0; transform: translateY(-40%); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(232, 196, 124, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(232, 196, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 196, 124, 0); } }
h1 { font: 800 clamp(34px, 5.2vw, 60px)/1.02 var(--display); letter-spacing: -.025em; margin: 0 0 18px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--gold); }
.lead { font-size: clamp(16px, 1.5vw, 18.5px); color: var(--ink-2); margin: 0 0 26px; max-width: 520px; text-wrap: pretty; }
.stats { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(4, auto); gap: 8px 26px; justify-content: start; }
.stats li { display: flex; flex-direction: column; opacity: 0; transform: translateY(8px); animation: rise .6s forwards; }
.stats li:nth-child(2) { animation-delay: .12s; } .stats li:nth-child(3) { animation-delay: .24s; } .stats li:nth-child(4) { animation-delay: .36s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.stats b { font: 700 26px/1.1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12.5px; color: var(--ink-3); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.load { margin-top: 22px; max-width: 420px; transition: opacity .6s; }
.load.done { opacity: 0; }
.load .track { height: 3px; border-radius: 2px; background: rgba(246, 242, 233, .14); overflow: hidden; }
.load .fill { height: 100%; width: 0; background: var(--gold); transition: width .4s; }
.load .fill.indet { width: 30%; animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { from { margin-left: -30%; } to { margin-left: 100%; } }
.load p { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.by { margin: 26px 0 0; font-size: 13px; color: var(--ink-3); }

/* chapter card */
#chapter, #end { position: fixed; z-index: 12; left: clamp(16px, 4vw, 48px); bottom: 96px; width: min(440px, calc(100% - 32px)); padding: 20px 22px 0; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden; animation: card .5s ease; }
#end { padding-bottom: 20px; width: min(520px, calc(100% - 32px)); }
@keyframes card { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ch-head { display: flex; justify-content: space-between; align-items: center; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
#chapter h2, #end h2 { font: 700 23px/1.2 var(--display); letter-spacing: -.015em; margin: 8px 0 8px; }
#chapter p { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; }
#chapter .ch-fact { color: var(--ink); font-weight: 600; border-left: 2px solid var(--gold); padding-left: 10px; }
#chapter .ch-fact:empty, #chapter .ch-note:empty { display: none; }
#chapter .ch-note { font-size: 12px; color: var(--ink-3); }
.ch-foot { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 14px; }
.dots { display: flex; gap: 6px; }
.dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(246, 242, 233, .25); }
.dots button.on { background: var(--gold); width: 22px; border-radius: 4px; }
.ch-nav { display: flex; gap: 6px; }
.icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(246, 242, 233, .06); font-size: 14px; }
.icon:hover { background: rgba(246, 242, 233, .14); }
.primary-ico { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.x { border: 0; background: none; color: var(--ink-3); font-size: 15px; padding: 4px; }
.x:hover { color: var(--ink); }
.ch-progress { height: 2px; margin: 0 -22px; background: rgba(246, 242, 233, .08); }
#ch-bar { height: 100%; width: 0; background: var(--gold); }
#end p { color: var(--ink-2); margin: 0 0 18px; }

/* dock */
#dock { position: fixed; z-index: 15; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); animation: card .5s ease; max-width: calc(100% - 24px); }
.dock-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: none; font-size: 13.5px; font-weight: 500; }
.dock-btn span { font-size: 13px; opacity: .9; }
.dock-btn em { font-style: normal; font-variant-numeric: tabular-nums; }
.dock-btn:hover, .dock-btn[aria-expanded="true"] { background: rgba(246, 242, 233, .1); }
#d-tour { background: var(--gold); color: var(--gold-ink); font-weight: 600; }
.sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.speed { display: flex; background: rgba(246, 242, 233, .06); border-radius: 999px; padding: 3px; }
.speed button { border: 0; background: none; border-radius: 999px; padding: 5px 9px; font-size: 12px; color: var(--ink-2); }
.speed button.on { background: rgba(246, 242, 233, .16); color: var(--ink); }
.pop-wrap { position: relative; }
.pop { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); min-width: 240px; padding: 10px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
.pop label { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.pop label:hover { background: rgba(246, 242, 233, .07); }
.pop small { margin-left: auto; color: var(--ink-3); font-size: 11.5px; }
.pop small.busy { color: var(--gold); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.pop-h { margin: 2px 8px 6px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.pop input { accent-color: var(--gold); }
.places { right: 0; left: auto; transform: none; bottom: 64px; max-height: 50vh; overflow: auto; position: fixed; right: max(12px, calc(50% - 330px)); }
.places button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font-size: 13.5px; }
.places button:hover { background: rgba(246, 242, 233, .08); }

#hint { position: fixed; z-index: 11; left: 50%; top: 84px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); animation: card .4s; }

/* drawers */
.drawer { position: fixed; z-index: 30; top: 12px; right: 12px; bottom: 12px; width: min(460px, calc(100% - 24px)); overflow: auto; padding: 26px 28px; border-radius: 20px; background: rgba(14, 16, 15, .9); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 20px 80px rgba(0, 0, 0, .5); animation: slide .35s ease; }
@keyframes slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.drawer > .x { position: absolute; top: 16px; right: 16px; }
.drawer h2 { font: 700 24px/1.2 var(--display); letter-spacing: -.015em; margin: 0 0 18px; }
.pipe { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.pipe li { counter-increment: s; position: relative; padding: 0 0 18px 40px; border-left: 1px solid var(--line); margin-left: 13px; }
.pipe li:last-child { border-left-color: transparent; }
.pipe li::before { content: counter(s); position: absolute; left: -14px; top: -2px; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: rgb(30, 28, 22); border: 1px solid var(--gold); color: var(--gold); font-size: 12px; font-weight: 700; }
.pipe b { font: 700 15.5px var(--display); }
.pipe p { margin: 4px 0 8px; color: var(--ink-2); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips i { font-style: normal; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(246, 242, 233, .07); border: 1px solid var(--line); color: var(--ink-2); }
.fine { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
#c-pitch { color: var(--ink-2); }
.links { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.links a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; text-decoration: none; background: rgba(246, 242, 233, .05); border: 1px solid var(--line); font-weight: 500; }
.links a:hover { background: rgba(246, 242, 233, .1); border-color: rgba(232, 196, 124, .5); }
.links a .k { width: 22px; text-align: center; color: var(--gold); }

#fine { position: fixed; z-index: 5; left: 16px; bottom: 10px; margin: 0; font-size: 11px; color: rgba(246, 242, 233, .5); text-shadow: 0 1px 4px rgba(0, 0, 0, .6); pointer-events: none; max-width: calc(50% - 340px); }
@media (max-width: 1100px) { #fine { display: none; } }

/* phones */
@media (max-width: 760px) {
  #top { padding: 12px 16px; }
  #open-how { display: none; }
  #hero { top: auto; bottom: 16px; transform: none; }
  #hero.gone { transform: translateY(16px); }
  #veil { background: linear-gradient(0deg, rgba(8, 9, 9, .88) 0%, rgba(8, 9, 9, .55) 45%, rgba(8, 9, 9, 0) 75%); }
  .stats { grid-template-columns: repeat(2, auto); gap: 8px 22px; margin-bottom: 20px; }
  .stats b { font-size: 21px; }
  .lead { margin-bottom: 18px; }
  .by { display: none; }
  #chapter, #end { left: 12px; right: 12px; width: auto; bottom: 74px; }
  .dock-btn em { display: none; }
  .dock-btn { padding: 0 11px; }
  #d-tour em { display: inline; }
  .speed button[data-speed="10"] { display: none; }
  #fine { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.drawer .eyebrow { padding-right: 32px; }

/* the reel (?reel=1, tools/demo_export/demo_reel.py): no controls, every fade driven by the script */
body.reel *, body.reel *::before { animation: none !important; transition: none !important; }
body.reel #stage, body.reel #veil { opacity: 1; }
body.reel #poster, body.reel .top-actions, body.reel #dock, body.reel #chapter, body.reel #end, body.reel #fine, body.reel #hint, body.reel .load, body.reel .cta-row .ghost { display: none !important; }
body.reel .stats li { opacity: 1; transform: none; }
#reelcap, #reelend { display: none; }
body.reel #reelcap { display: block; position: fixed; z-index: 12; left: clamp(24px, 4.5vw, 80px); bottom: clamp(40px, 8vh, 96px); max-width: min(760px, calc(100% - 48px)); padding: 22px 28px 22px 26px; border-radius: 18px; background: rgba(14, 16, 15, .66); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-left: 3px solid var(--gold); }
#reelcap .k { display: block; font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
#reelcap b { display: block; font: 800 clamp(30px, 3.4vw, 46px)/1.1 var(--display); letter-spacing: -.02em; margin: 8px 0 8px; }
#reelcap p { margin: 0; font-size: clamp(17px, 1.6vw, 22px); color: var(--ink-2); }
body.reel #reelend { display: grid; place-content: center; text-align: center; position: fixed; inset: 0; z-index: 25; background: radial-gradient(ellipse at center, rgba(13, 15, 14, .86), rgba(13, 15, 14, .97)); }
#reelend .k { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
#reelend h2 { margin: 14px 0 6px; font: 800 clamp(44px, 6vw, 84px)/1 var(--display); letter-spacing: -.03em; }
#reelend .s { margin: 0; font-size: clamp(18px, 2vw, 26px); color: var(--ink-2); }
#reelend .u { margin: 28px auto 0; padding: 12px 26px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font: 700 clamp(17px, 1.7vw, 23px) var(--sans); }

/* the activity pill: models still arriving after the first picture */
#activity { position: fixed; z-index: 16; left: 50%; top: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; padding: 8px 16px 8px 12px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; max-width: calc(100% - 220px); overflow: hidden; text-overflow: ellipsis; }
#activity .spin { flex: none; width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(232, 196, 124, .25); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { #activity { top: auto; bottom: 74px; max-width: calc(100% - 32px); } body.touring #activity { bottom: auto; top: 64px; } }
