/* Tokens are documented in DESIGN.md — change them there first, then here. */
:root {
  --bg: #0a0908;
  --bg-raised: #131110;
  --ink: #f2ede6;
  --ink-dim: rgba(242, 237, 230, 0.56);
  --line: rgba(242, 237, 230, 0.12);
  --accent: #e8a26a;

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(20px, 4vw, 64px);
  --radius: 999px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--bg); color: var(--ink); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--accent); }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0;
}
h2 { font-size: clamp(40px, 6vw, 96px); }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 20px;
}

/* --- Nav ---------------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  mix-blend-mode: difference;
}
.brand { font-family: var(--font-display); font-size: 26px; }
.brand sup { font-size: 10px; margin-left: 2px; }
.nav-links { display: flex; gap: 36px; font-size: 14px; }
.nav-links a { opacity: 0.7; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost { border: 1px solid currentColor; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-solid { background: var(--ink); color: var(--bg); padding: 18px 32px; font-size: 15px; }
.btn-solid:hover { background: var(--accent); }

/* --- Sequence ----------------------------------------------------------------------------- */
.sequence { position: relative; height: var(--length, 500vh); }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
}
.stage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, transparent 40%, var(--bg) 100%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%);
}

.beat {
  position: absolute;
  z-index: 2;
  opacity: 0;
  will-change: opacity, transform, filter;
  max-width: 520px;
}
.beat p:not(.eyebrow) { color: var(--ink-dim); font-size: 17px; max-width: 360px; margin: 24px 0 0; }
.beat h2 { font-size: clamp(36px, 4.6vw, 72px); }

.beat-hero {
  inset: auto var(--pad) 14vh;
  max-width: none;
}
.hero-title { font-size: clamp(64px, 12vw, 200px); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span { display: inline-block; }

.beat-left { left: var(--pad); top: 50%; translate: 0 -50%; }
.beat-right { right: var(--pad); top: 50%; translate: 0 -50%; text-align: right; }
.beat-right p:not(.eyebrow) { margin-left: auto; }
.beat-center { left: 50%; bottom: 12vh; translate: -50% 0; text-align: center; }

.stage-hud {
  position: absolute;
  z-index: 3;
  left: var(--pad);
  right: var(--pad);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.stage-hud b { color: var(--ink); font-weight: 500; }
.hud-bar { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.hud-bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }

.loader {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  transition: opacity 0.6s 0.3s;
}
.loader span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  transition: transform 0.2s linear;
}
.loader.is-done { opacity: 0; }

/* --- Statement ---------------------------------------------------------------------------- */
.statement { padding: 24vh var(--pad) 20vh; max-width: 1400px; margin: 0 auto; }
.statement-text {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}
.word { display: inline-block; }

/* --- Specs -------------------------------------------------------------------------------- */
.specs { padding: 10vh var(--pad) 20vh; border-top: 1px solid var(--line); }
.specs-head { display: flex; flex-direction: column; margin-bottom: 10vh; }
.specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.spec {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 36px 24px 0 0;
  border-right: 1px solid var(--line);
  margin-right: 24px;
}
.spec:last-child { border-right: 0; margin-right: 0; }
.spec-num {
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 120px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.spec-num small { font-size: 0.3em; margin-left: 6px; color: var(--ink-dim); font-family: var(--font-body); }
.spec-label { color: var(--ink-dim); font-size: 14px; }

/* --- Marquee ------------------------------------------------------------------------------ */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 3vh 0; }
.marquee-track {
  display: flex;
  gap: 4vw;
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 150px);
  font-style: italic;
  animation: marquee 30s linear infinite;
}
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- CTA / footer ------------------------------------------------------------------------- */
.cta { padding: 24vh var(--pad); text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta h2 { margin-bottom: 48px; font-size: clamp(48px, 8vw, 140px); }
.footer {
  display: flex;
  justify-content: space-between;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-dim);
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .beat-left, .beat-right { left: var(--pad); right: var(--pad); top: auto; bottom: 16vh; translate: none; text-align: left; }
  .beat-right p:not(.eyebrow) { margin-left: 0; }
  .beat-center { width: calc(100% - 2 * var(--pad)); }
  .specs-grid { grid-template-columns: 1fr 1fr; }
  .spec:nth-child(2) { border-right: 0; margin-right: 0; }
  .spec { padding-bottom: 36px; }
  .footer { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
