/* Alive demo page. Tokens first; everything else reads them. */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
:root {
  --bg: #0e0f12; --bg2: #15171c; --ink: #f3ece1; --muted: #a9a298; --line: #2a2c33;
  --amber: #e9a55a; --ember: #c8643a; --glow: #f6d7a8;
  --r: 22px;
  --display: "Space Grotesk", system-ui, sans-serif; --body: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px; z-index: 20; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 12px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); }
.brand { font: 700 22px/1 var(--display); text-decoration: none; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-eye { width: 22px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #1b120c 0 28%, var(--amber) 30% 48%, var(--glow) 50%); box-shadow: 0 0 14px rgba(233, 165, 90, .45); }
.top nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); padding: 12px 0; }
.top nav a:hover { color: var(--ink); }
.cta, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px; border-radius: 999px; font: 600 15px/1.1 var(--body); text-decoration: none; cursor: pointer; border: 1px solid #3a3c44; background: transparent; color: var(--ink); }
.cta, .btn-solid { background: var(--amber); color: #1a1008; border-color: var(--amber); }
.btn:hover { border-color: var(--amber); }
.btn-solid:hover, .cta:hover { background: var(--glow); }

.kicker { margin: 0 0 14px; font: 600 13px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; }
h1 { margin: 0; font-weight: 700; font-size: clamp(52px, 8.4vw, 124px); line-height: .92; }
h1 em { font-style: normal; color: var(--glow); display: block; }
h2 { font-size: clamp(34px, 5vw, 64px); line-height: 1; margin: 0 0 18px; }
h3 { font-size: 22px; margin: 0 0 8px; }
.small { font-size: 14px; color: var(--muted); }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 24px clamp(24px, 5vw, 72px); align-items: center; padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 48px) 40px; min-height: calc(100svh - 70px); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 72% 40%, rgba(200, 100, 58, .22), transparent 70%), radial-gradient(40% 50% at 10% 90%, rgba(233, 165, 90, .08), transparent 70%); }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: #d6cfc4; max-width: 34em; margin: 24px 0 28px; }
.hero-acts { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; gap: 28px; margin: 36px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; gap: 2px; }
.facts dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font: 600 20px/1.2 var(--display); }

.portrait-wrap { display: grid; justify-items: center; gap: 10px; }
.portrait { position: relative; width: min(100%, 560px, calc((100svh - 150px) * 0.684)); aspect-ratio: 832 / 1216; --arch-x0: .09; --arch-x1: .91; --arch-top: .2195; touch-action: pan-y; border-radius: 12px; }
.portrait .arch { position: absolute; left: calc(var(--arch-x0) * 100%); right: calc((1 - var(--arch-x1)) * 100%); top: calc(var(--arch-top) * 100%); bottom: 0; border-radius: 9999px 9999px 0 0; background: radial-gradient(90% 60% at 50% 30%, #d9824c 0%, #8e3f22 45%, #2a1812 100%); box-shadow: inset 0 0 0 1px rgba(246, 215, 168, .35), 0 40px 120px -30px rgba(200, 100, 58, .55); }
.portrait .arch::after { content: ""; position: absolute; inset: 10px; border-radius: inherit; border: 1px solid rgba(246, 215, 168, .22); }
.portrait img, .portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.portrait canvas { opacity: 0; }
.alive-on > canvas, .alive-on canvas { opacity: 1; }
.alive-on .alive-poster { opacity: 0; }
.portrait-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; max-width: 30em; }

/* trail */
.trail-sec, .spin-sec, .how, .faq, .cast-tease { padding: clamp(56px, 8vw, 110px) clamp(16px, 4vw, 48px); }
.sec-head { max-width: 40em; }
.sec-head p:not(.kicker) { color: #d6cfc4; }
.trail { position: relative; margin-top: 28px; height: clamp(360px, 56vh, 560px); border-radius: var(--r); overflow: hidden; background: radial-gradient(70% 90% at 50% 100%, #2a1a14, var(--bg2) 70%); border: 1px solid var(--line); touch-action: pan-y; cursor: crosshair; }
.trail-layer { position: absolute; inset: 0; }
.alive-trail-item { position: absolute; left: 0; top: 0; border-radius: 12px; will-change: transform, opacity; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); pointer-events: none; }
.trail-hint { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 600 clamp(28px, 5vw, 64px)/1 var(--display); color: rgba(243, 236, 225, .12); letter-spacing: -0.03em; pointer-events: none; }
.trail-play { position: absolute; right: 16px; bottom: 16px; background: rgba(14, 15, 18, .7); z-index: 1001; }

/* spin */
.spin-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(24px, 5vw, 72px); align-items: center; background: linear-gradient(180deg, var(--bg), #16120f 50%, var(--bg)); }
.spin { position: relative; aspect-ratio: 1; width: min(100%, 560px); justify-self: center; display: grid; }
.spin canvas, .spin-poster { position: absolute; inset: 0 0 64px; width: 100%; height: calc(100% - 64px); object-fit: contain; }
.spin canvas { cursor: grab; touch-action: pan-y; z-index: 1; }
.spin.is-dragging canvas { cursor: grabbing; }
.spin::before { content: ""; position: absolute; left: 12%; right: 12%; bottom: 70px; height: 38%; border-radius: 50%; background: radial-gradient(closest-side, rgba(233, 165, 90, .22), transparent); }
.spin-range { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.spin-range span { display: flex; justify-content: space-between; }
.spin-range input { width: 100%; min-height: 44px; accent-color: var(--amber); }

.cast-tease { text-align: center; display: grid; justify-items: center; gap: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cast-tease p { max-width: 36em; color: #d6cfc4; margin: 0 0 18px; }

.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.cols article { padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg2); }
.cols p { margin: 0; color: #cfc8bd; }
.faq { max-width: 900px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font: 600 19px/1.3 var(--display); padding: 14px 0; min-height: 44px; }
.faq details p { margin: 0 0 16px; color: #cfc8bd; }
.foot { padding: 36px 16px 48px; text-align: center; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--ink); padding: 12px 4px; display: inline-block; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .top nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 16px; }
  .portrait-wrap { order: -1; }
  .portrait { width: min(100%, 420px, calc((72svh - 40px) * 0.684)); }
  .facts { gap: 18px; }
  .spin-sec { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
}
