/* ============================================================
   LUXURY SALES — DESIGN SYSTEM
   Canvas: warm near-black. One rationed gold gradient.
   Voices: Fraunces roman (structure display) · Fraunces italic
   (the closer) · Manrope (UI) · JetBrains Mono (evidence) ·
   Caveat (margin notes) · Inter (body).
   Motion: ls-* vocabulary. Transform/opacity only — the foil
   sheen (background-position on clipped text) and the reveal
   blur are the two sanctioned exceptions.
   Progressive enhancement: initial-hidden states are gated on
   html.js so the page is fully rendered without JavaScript.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* canvas */
  --bg: #0B0908;            /* warm near-black */
  --bg-raise: #110E0B;
  --bg-deep: #070605;
  --surface: rgba(24, 20, 15, 0.58);
  --surface-solid: #151109;
  --hairline: rgba(245, 237, 219, 0.08);
  --hairline-strong: rgba(245, 237, 219, 0.16);

  /* ink */
  --ink: #F5EFE2;           /* warm ivory */
  --ink-dim: #B9AF9C;
  --ink-faint: #877D69;
  --ink-faint-raised: #948A75; /* ≥4.5:1 for small mono labels on raised card surfaces */

  /* the gold system — one gradient, rationed */
  --gold: #D4AF37;
  --champagne: #F5E1A4;
  --gold-deep: #9C7A1E;
  --grad: linear-gradient(115deg, #F5E1A4 0%, #D4AF37 55%, #F5E1A4 110%);
  --grad-btn: linear-gradient(115deg, #E9C767, #B8912C);

  /* supporting accents (use sparingly) */
  --green: #86C79A;         /* money confirmations */
  --red: #E08B7B;           /* honest "not for you" marks */

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-wipe: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-loop: cubic-bezier(0.65, 0, 0.35, 1);

  --radius: 14px; --radius-card: 20px; --radius-lg: 28px;
  --nav-h: 76px; --wrap: 1200px;

  /* type voices */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', -apple-system, 'Segoe UI', Helvetica, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --font-hand: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
  --font-body: 'Inter', -apple-system, 'Segoe UI', Helvetica, sans-serif;

  /* the "expensive card" trick: layered depth + 1px inset ivory hairline on top */
  --shadow-card: 0 1px 0 0 rgba(245, 239, 226, 0.05) inset,
                 0 16px 40px -20px rgba(0, 0, 0, 0.85),
                 0 3px 10px -4px rgba(0, 0, 0, 0.6);
  --shadow-raised: 0 1px 0 0 rgba(245, 239, 226, 0.07) inset,
                   0 28px 60px -24px rgba(0, 0, 0, 0.92),
                   0 6px 16px -8px rgba(0, 0, 0, 0.7);

  /* gold glow — primary CTAs + hero ONLY. Nowhere else. */
  --glow-gold: 0 10px 34px -10px rgba(212, 175, 55, 0.45);
  --glow-gold-lift: 0 14px 44px -8px rgba(212, 175, 55, 0.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(212, 175, 55, 0.32); color: #FFF9EA; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.section { padding-block: clamp(90px, 12vw, 160px); position: relative; }
.section-tight { padding-block: clamp(48px, 7vw, 96px); }

/* ---------- Texture ---------- */
/* Film grain: fixed, tiny tiled SVG noise, 2–3% opacity. One per page, right after <body>. */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
/* Faint radial gold vignette — heroes only. Position inside a position:relative hero. */
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 62% 48% at 50% 32%, rgba(212, 175, 55, 0.075), transparent 70%);
}
/* Hairline utilities */
.hr { border: 0; height: 1px; background: var(--hairline); }
.hr-strong { border: 0; height: 1px; background: var(--hairline-strong); }
.hr-gold { border: 0; height: 1px; background: var(--grad); opacity: 0.6; }

/* ---------- Type voices ---------- */
/* Eyebrow — "No. 0X — Title" in letterspaced mono caps, .idx in gold, rule lines. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 3vw, 28px);
}
.eyebrow .idx { color: var(--gold); }
.eyebrow::after { content: ''; height: 1px; width: 56px; background: var(--hairline-strong); }
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { content: ''; height: 1px; width: 56px; background: var(--hairline-strong); }
/* Number stamp: the serial-press moment when the eyebrow reveals */
html.js .eyebrow.is-in .idx,
html.js [data-reveal].is-in .eyebrow .idx { animation: ls-stamp-no 0.55s var(--ease-out) both; animation-delay: calc(var(--d, 0s) + 0.1s); }

/* Display headline: Fraunces roman ivory + gold italic clause (the closer) */
.ls-head {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.ls-head .clause, .clause {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-right: 0.09em; /* keep italic tails out of the clip */
}
.ls-head .clause { font-size: 1.04em; }

.lede {
  color: var(--ink-dim);
  font-size: clamp(1.02rem, 1.5vw, 1.17rem);
  line-height: 1.7;
  max-width: 620px;
  text-wrap: pretty;
}
.lede strong { color: var(--ink); font-family: var(--font-mono); font-weight: 600; font-size: 0.94em; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hand { font-family: var(--font-hand); font-weight: 600; color: var(--ink-dim); }

/* Static gold gradient text */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
/* Foil: gold text with a slow occasional sheen pass (~8s cycle, subtle).
   Sanctioned background-position exception. Gate with [data-ambient] on the
   element or a wrapper so it pauses offscreen. */
.foil {
  background: linear-gradient(115deg,
    #D4AF37 0%, #F5E1A4 22%, #D4AF37 40%,
    #FFF3D0 50%,
    #D4AF37 60%, #F5E1A4 78%, #D4AF37 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: ls-foil 8s var(--ease-loop) infinite;
  padding-right: 0.09em;
}

/* ---------- Buttons ---------- */
.btn {
  --press: 0.965;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 16px 30px; border-radius: 999px;
  transition: transform 0.34s var(--ease-out), box-shadow 0.34s var(--ease-out),
              background-color 0.34s var(--ease-out), border-color 0.34s var(--ease-out),
              color 0.34s var(--ease-out);
  white-space: nowrap;
  min-height: 48px;
}
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
.btn:active { transform: scale(var(--press)); }
.btn .arr { transition: transform 0.34s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary {
  background: var(--grad-btn);
  color: #171106;
  box-shadow: var(--glow-gold);
}
.btn-primary:hover { box-shadow: var(--glow-gold-lift); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  background: rgba(245, 239, 226, 0.02);
}
.btn-ghost:hover { background: rgba(245, 239, 226, 0.06); border-color: rgba(245, 237, 219, 0.28); transform: translateY(-2px); }
.btn-sm { padding: 11px 20px; font-size: 0.86rem; min-height: 40px; }
.btn-lg { padding: 19px 38px; font-size: 1.02rem; }

/* ---------- Cards & chips ---------- */
/* Opaque layered surface — no backdrop-filter on cards (GPU cost, near-zero
   gain on near-black). The inset ivory hairline is the "expensive" cue. */
.card {
  background: linear-gradient(180deg, rgba(26, 21, 15, 0.94), rgba(16, 13, 9, 0.94));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(245, 239, 226, 0.03);
  color: var(--ink-dim);
  white-space: nowrap;
}
.chip.win { color: var(--green); border-color: rgba(134, 199, 154, 0.3); }
.chip.good { border-color: rgba(134, 199, 154, 0.35); color: var(--green); background: rgba(134, 199, 154, 0.06); }
.chip.bad { border-color: rgba(224, 139, 123, 0.35); color: var(--red); background: rgba(224, 139, 123, 0.05); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.dot.live { animation: ls-pulse 2.2s var(--ease-loop) infinite; }
.dot.gold { background: var(--gold); }

/* ---------- Avatars (gradient initial tiles, gold/champagne/bronze family) ---------- */
.ava {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 800; font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: #201806; flex: none;
  border: 2px solid var(--bg);
  background: linear-gradient(135deg, #F5E1A4, #D4AF37);
}
.ava.v2 { background: linear-gradient(135deg, #E9C767, #9C7A1E); }
.ava.v3 { background: linear-gradient(135deg, #D9B65C, #8A6A1C); color: #FBF4E0; }
.ava.v4 { background: linear-gradient(135deg, #F2D488, #B8912C); }
.ava.v5 { background: linear-gradient(135deg, #C9A64A, #7C5E16); color: #FBF4E0; }
.ava.v6 { background: linear-gradient(135deg, #F5E7C0, #CBA43C); }

/* Avatar strip: overlapping tiles that fan out on reveal.
   Usage: <span class="ava-strip" data-reveal="fade"><span class="ava">..</span>…</span> */
.ava-strip { display: inline-flex; }
.ava-strip .ava + .ava { margin-left: -12px; }
html.js .ava-strip .ava { transition: transform 0.7s var(--ease-out); }
html.js .ava-strip:not(.is-in) .ava:nth-child(2) { transform: translateX(-32px); }
html.js .ava-strip:not(.is-in) .ava:nth-child(3) { transform: translateX(-64px); }
html.js .ava-strip:not(.is-in) .ava:nth-child(4) { transform: translateX(-96px); }
html.js .ava-strip:not(.is-in) .ava:nth-child(5) { transform: translateX(-128px); }
html.js .ava-strip:not(.is-in) .ava:nth-child(6) { transform: translateX(-160px); }
.ava-strip.is-in .ava:nth-child(2) { transition-delay: 0.05s; }
.ava-strip.is-in .ava:nth-child(3) { transition-delay: 0.1s; }
.ava-strip.is-in .ava:nth-child(4) { transition-delay: 0.15s; }
.ava-strip.is-in .ava:nth-child(5) { transition-delay: 0.2s; }
.ava-strip.is-in .ava:nth-child(6) { transition-delay: 0.25s; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  display: flex; justify-content: center;
  padding: 14px clamp(14px, 3vw, 28px) 0;
  pointer-events: none;
}
.nav-shell {
  pointer-events: auto;
  position: relative;
  width: 100%; max-width: 1080px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
  /* backdrop-filter and box-shadow deliberately NOT transitioned — both repaint
     beyond the element every frame; they snap in under the background-color fade. */
}
.nav.is-scrolled .nav-shell {
  background: rgba(14, 11, 8, 0.74);
  border-color: var(--hairline);
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-logo { display: flex; align-items: center; gap: 11px; }
.nav-logo svg, .nav-logo img { width: 34px; height: 34px; flex: none; }
.nav-logo .wd { font-family: var(--font-display); font-weight: 500; font-size: 1.08rem; letter-spacing: 0.01em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.9rem;
  color: var(--ink-dim); padding: 9px 15px; border-radius: 999px;
  transition: color 0.3s, background-color 0.3s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); background: rgba(245, 239, 226, 0.06); }
/* Gold scroll-progress hairline — JS drives --scroll-p */
.nav-progress {
  position: absolute; left: 24px; right: 24px; bottom: -1px; height: 1px;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(var(--scroll-p, 0));
  opacity: 0; transition: opacity 0.4s;
}
.nav.is-scrolled .nav-progress { opacity: 0.9; }

.nav-burger { display: none; width: 44px; height: 44px; border-radius: 50%; position: relative; }
.nav-burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform 0.4s var(--ease-out), opacity 0.3s, top 0.4s var(--ease-out);
}
.nav-burger span:nth-child(1) { top: 16px; }
.nav-burger span:nth-child(2) { top: 22px; }
.nav-burger span:nth-child(3) { top: 28px; }
body.nav-open .nav-burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-burger span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

.nav-sheet {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(9, 7, 5, 0.93);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  display: flex; flex-direction: column; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}
body.nav-open .nav-sheet { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }
.nav-sheet a.big {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 9vw, 3rem); line-height: 1.3;
  padding: 10px 8px; border-bottom: 1px solid var(--hairline);
  display: flex; align-items: baseline; gap: 16px;
  transform: translateY(24px); opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.nav-sheet a.big .no { font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold); }
body.nav-open .nav-sheet a.big { transform: none; opacity: 1; }
body.nav-open .nav-sheet a.big:nth-child(1) { transition-delay: 0.08s; }
body.nav-open .nav-sheet a.big:nth-child(2) { transition-delay: 0.14s; }
body.nav-open .nav-sheet a.big:nth-child(3) { transition-delay: 0.2s; }
body.nav-open .nav-sheet a.big:nth-child(4) { transition-delay: 0.26s; }
body.nav-open .nav-sheet a.big:nth-child(5) { transition-delay: 0.32s; }
.nav-sheet .sheet-cta { margin-top: 36px; opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease-out) 0.4s, transform 0.6s var(--ease-out) 0.4s; }
body.nav-open .nav-sheet .sheet-cta { opacity: 1; transform: none; }

/* ---------- Win-ticker tape (marquee) ---------- */
.tape {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-block: 15px;
  overflow: hidden;
  position: relative;
  background: rgba(245, 239, 226, 0.014);
}
.tape-track {
  display: flex; gap: 0; width: max-content;
  animation: ls-marquee var(--dur, 46s) linear infinite;
}
.tape[data-paused] .tape-track, .tape[data-paused] .tape-track * { animation-play-state: paused; }
/* §3.7: pause on hover so a scrolling win can be read (hover-capable devices only) */
@media (hover: hover) {
  .tape:hover .tape-track, .tape:hover .tape-track * { animation-play-state: paused; }
}
.tape-half { display: flex; align-items: center; }
.tape-item {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  color: var(--ink-dim); padding-inline: 26px;
  white-space: nowrap;
}
.tape-item .sep { color: var(--gold); }
.tape-item strong { color: var(--ink); font-weight: 600; }
.tape-item .up { color: var(--green); }
.tape.rev .tape-track { animation-direction: reverse; }

/* ---------- Wire receipt (signature artifact) ---------- */
.wire {
  background: linear-gradient(180deg, #16110A 0%, #100C07 100%);
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-raised);
  font-family: var(--font-mono);
  overflow: hidden;
  position: relative;
}
.wire-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px dashed var(--hairline-strong);
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint);
}
.wire-head .status { display: flex; align-items: center; gap: 8px; color: var(--green); }
.wire-body { padding: 20px; display: grid; gap: 10px; }
.wire-row {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 0.83rem; color: var(--ink-dim);
}
.wire-row .leader { flex: 1; border-bottom: 1px dotted rgba(245, 237, 219, 0.18); transform: translateY(-4px); }
.wire-row .val { color: var(--ink); font-weight: 600; }
.wire-row .val.up { color: var(--green); }
.wire-amount {
  font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); line-height: 1.1; padding-block: 6px;
}
.wire-amount .cur { color: var(--green); }
.wire-foot { padding: 12px 20px 18px; border-top: 1px dashed var(--hairline-strong); font-size: 0.7rem; color: var(--ink-faint); display: flex; justify-content: space-between; gap: 12px; }
/* Green "WIRE RECEIVED" stamp — slams in with slight rotation (JS adds .is-landed) */
.wire-stamp {
  position: absolute; right: 18px; top: 50%;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.3em;
  color: var(--green); border: 2px solid var(--green); border-radius: 8px;
  padding: 7px 13px 7px 16px; transform: rotate(-8deg) scale(2.4); opacity: 0;
  text-transform: uppercase;
}
.wire-stamp.is-landed { animation: ls-stamp 0.55s var(--ease-out) forwards; }

/* ---------- Toast (floating live card) ---------- */
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(180deg, rgba(28, 23, 16, 0.94), rgba(18, 14, 10, 0.94));
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 13px 17px;
  box-shadow: var(--shadow-card);
}
.toast .t-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.t-icon.green { background: rgba(134, 199, 154, 0.13); color: var(--green); }
.t-icon.gold { background: rgba(212, 175, 55, 0.13); color: var(--gold); }
.t-icon.ivory { background: rgba(245, 239, 226, 0.08); color: var(--ink); }
.t-icon.bronze { background: rgba(156, 122, 30, 0.16); color: #CBA43C; }
.toast .t-body { min-width: 0; }
.toast .t-title { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint-raised); margin-bottom: 3px; }
.toast .t-line { font-family: var(--font-sans); font-weight: 600; font-size: 0.92rem; color: var(--ink); line-height: 1.35; }
.toast .t-sub { font-size: 0.78rem; color: var(--ink-dim); margin-top: 2px; }
.toast .amount { font-family: var(--font-mono); font-weight: 700; font-size: 1.35rem; color: var(--green); letter-spacing: -0.01em; }
.toast .reacts { display: flex; gap: 6px; margin-top: 8px; }
.toast .react {
  font-size: 0.72rem; font-family: var(--font-mono);
  border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 3px 9px;
  background: rgba(245, 239, 226, 0.03); color: var(--ink-dim);
}

/* ---------- Quote attribution (shared) ---------- */
.quote-meta { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.quote-meta .qm-name { font-family: var(--font-sans); font-weight: 700; font-size: 0.95rem; }
.quote-meta .qm-role { font-size: 0.8rem; color: var(--ink-faint); font-family: var(--font-mono); }
.quote-meta .chip { margin-left: auto; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  background: var(--bg-deep);
  padding: clamp(56px, 8vw, 92px) 0 40px;
  position: relative; overflow: hidden;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: clamp(24px, 4vw, 56px); margin-bottom: 64px; position: relative; z-index: 1; }
.footer h4 { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px; }
.footer-col { display: grid; gap: 11px; align-content: start; justify-items: start; }
.footer-col a { color: var(--ink-dim); font-size: 0.94rem; transition: color 0.3s; position: relative; }
.footer-col a:hover { color: var(--ink); }
.footer-col a::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease-out);
}
.footer-col a:hover::after { transform: scaleX(1); }
.footer-mark { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.footer-mark svg, .footer-mark img { width: 42px; height: 42px; flex: none; }
.footer-mark .wd { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; }
.footer-tag { color: var(--ink-dim); font-size: 0.94rem; max-width: 300px; line-height: 1.6; }
.footer-meta {
  border-top: 1px solid var(--hairline); padding-top: 26px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint);
  position: relative; z-index: 1;
}
/* Ghost giant word — gold at ~6–8% */
.footer-ghost {
  position: absolute; inset-inline: 0; bottom: -0.24em; pointer-events: none;
  font-family: var(--font-display); font-weight: 600; text-align: center;
  font-size: clamp(7rem, 24vw, 20rem); line-height: 0.8; letter-spacing: -0.02em;
  color: transparent;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.075), rgba(212, 175, 55, 0));
  -webkit-background-clip: text; background-clip: text;
  user-select: none;
}

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--hairline); position: relative; }
/* Gold rule draws across the opened item */
.faq-item::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 0.8s var(--ease-wipe);
}
.faq-item.is-open::before { transform: scaleX(1); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  text-align: left; padding: 26px 4px;
  font-family: var(--font-sans); font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.25rem);
  transition: color 0.3s;
}
.faq-q:hover { color: var(--champagne); }
.faq-q .fx { width: 34px; height: 34px; flex: none; border: 1px solid var(--hairline-strong); border-radius: 50%; position: relative; transition: transform 0.5s var(--ease-out), border-color 0.3s, background-color 0.3s; }
.faq-q .fx::before, .faq-q .fx::after { content: ''; position: absolute; inset: 0; margin: auto; background: var(--ink); }
.faq-q .fx::before { width: 12px; height: 1.6px; }
.faq-q .fx::after { width: 1.6px; height: 12px; transition: transform 0.5s var(--ease-out); }
.faq-item.is-open .fx { transform: rotate(180deg); background: rgba(212, 175, 55, 0.1); border-color: rgba(212, 175, 55, 0.4); }
.faq-item.is-open .fx::after { transform: scaleY(0); }
.faq-a {
  display: grid; grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.6s var(--ease-out), visibility 0s linear 0.6s;
}
.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.6s var(--ease-out);
}
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--ink-dim); padding: 0 4px 28px; max-width: 640px; line-height: 1.7; }
.faq-a a { color: var(--champagne); }

/* ---------- Handwritten margin note (Caveat, gold) ---------- */
.note {
  font-family: var(--font-hand); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--gold); transform: rotate(-3deg); display: inline-block;
}
.note-arrow { width: 34px; height: 40px; stroke: var(--gold); fill: none; stroke-width: 2; stroke-linecap: round; opacity: 0.85; }

/* ---------- Slack-style wins wall ---------- */
.wins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(36px, 5vw, 56px); }
.win-card { padding: 0; overflow: hidden; }
.win-head {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 18px; border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint-raised);
}
.win-head .hash { color: var(--gold); font-weight: 700; }
.win-body { padding: 18px; }
.win-msg { display: flex; gap: 12px; }
.win-msg .ava { width: 38px; height: 38px; border-radius: 10px; font-size: 0.72rem; }
.win-msg .wm-name { font-family: var(--font-sans); font-weight: 700; font-size: 0.9rem; }
.win-msg .wm-name .badge {
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em;
  background: rgba(212, 175, 55, 0.12); color: var(--gold);
  border-radius: 5px; padding: 2px 7px; margin-left: 7px; text-transform: uppercase; vertical-align: 2px;
}
.win-msg .wm-text { font-size: 0.9rem; color: var(--ink-dim); margin-top: 4px; line-height: 1.55; }
.win-msg .wm-text strong { color: var(--ink); }
.win-reacts { display: flex; gap: 7px; margin-top: 13px; flex-wrap: wrap; }
.win-react {
  font-family: var(--font-mono); font-size: 0.72rem;
  border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 4px 10px;
  background: rgba(245, 239, 226, 0.03); color: var(--ink-dim);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, background-color 0.3s;
  cursor: default;
}
.win-react:hover { transform: scale(1.12); border-color: rgba(212, 175, 55, 0.5); background: rgba(212, 175, 55, 0.07); }

/* ---------- Tabs (legal + anywhere) ---------- */
.tabbar { display: inline-flex; gap: 6px; border: 1px solid var(--hairline); border-radius: 999px; padding: 5px; background: rgba(245, 239, 226, 0.02); }
.tab-btn {
  font-family: var(--font-sans); font-weight: 700; font-size: 0.9rem;
  padding: 10px 24px; border-radius: 999px; color: var(--ink-dim);
  transition: color 0.3s, background-color 0.3s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.is-active { color: #171106; background: var(--grad-btn); }
[data-panel] { display: none; }
[data-panel].is-active { display: block; }

/* ---------- Swipe rail ---------- */
.rail { position: relative; }
.rail-track {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-block: 4px; padding-inline: 2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; flex: none; }
.rail-arrows { display: flex; gap: 10px; }
.rail-prev, .rail-next {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hairline-strong); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.3s, border-color 0.3s, opacity 0.3s, transform 0.34s var(--ease-out);
}
.rail-prev:hover, .rail-next:hover { background: rgba(245, 239, 226, 0.06); transform: translateY(-2px); }
.rail-prev[disabled], .rail-next[disabled] { opacity: 0.3; pointer-events: none; }

/* ---------- Module deck (sticky stack) ---------- */
.deck { display: grid; gap: 20px; margin-top: clamp(36px, 5vw, 60px); }
.deck-card {
  position: sticky;
  top: calc(var(--nav-h) + 20px + var(--stack, 0px));
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-strong);
  padding: clamp(28px, 4.5vw, 56px);
  min-height: clamp(320px, 46vh, 420px);
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 32px; align-items: center;
  overflow: hidden;
  background: linear-gradient(150deg, var(--tint-a, #1A140B), var(--tint-b, #0E0B07));
  box-shadow: var(--shadow-raised);
  transform-origin: center top;
}
/* Dim overlay — JS drives --dim (opacity, not filter: cheap on large cards) */
.deck-card::after {
  content: ''; position: absolute; inset: 0; z-index: 3;
  background: #070605; opacity: var(--dim, 0);
  pointer-events: none; border-radius: inherit;
}
.deck-card .ghost-no {
  position: absolute; right: -0.04em; bottom: -0.22em;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(7rem, 19vw, 14rem); line-height: 0.8; letter-spacing: -0.02em;
  color: rgba(245, 237, 219, 0.05); user-select: none; pointer-events: none;
}
.deck-card .eyebrow { margin-bottom: 14px; color: var(--ink-faint-raised); }
.deck-card .eyebrow::after { background: rgba(245, 237, 219, 0.2); }
.deck-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 2.3rem); letter-spacing: -0.01em; line-height: 1.12; margin-bottom: 14px; }
.deck-desc { color: var(--ink-dim); max-width: 480px; }
.deck-lessons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.deck-lesson {
  font-family: var(--font-mono); font-size: 0.72rem;
  border: 1px solid rgba(245, 237, 219, 0.14); border-radius: 8px;
  padding: 6px 11px; color: var(--ink-dim); background: rgba(0, 0, 0, 0.18);
}
.deck-visual { display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.deck-visual svg { width: min(200px, 100%); height: auto; opacity: 0.9; }
.dc-1 { --tint-a: #1B150C; --tint-b: #0E0B07; }
.dc-2 { --tint-a: #1A1109; --tint-b: #0D0906; }
.dc-3 { --tint-a: #16130A; --tint-b: #0B0906; }
.dc-4 { --tint-a: #221709; --tint-b: #100C07; }

/* ---------- Thread (vertical timeline, gold line draws + nodes ignite) ---------- */
.thread { position: relative; margin-top: clamp(44px, 6vw, 72px); }
.thread-line {
  position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px;
  background: var(--hairline);
}
.thread-line i {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--champagne), var(--gold));
  transform-origin: top;
  transform: scaleY(var(--p, 0));
}
.thread-item { position: relative; padding: 0 0 clamp(40px, 6vw, 62px) clamp(60px, 7vw, 84px); }
.thread-item:last-child { padding-bottom: 0; }
.thread-node {
  position: absolute; left: 8px; top: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--hairline-strong); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.thread-node i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); transition: background-color 0.4s; }
.thread-item.is-lit .thread-node { border-color: var(--gold); box-shadow: 0 0 16px rgba(212, 175, 55, 0.35); }
.thread-item.is-lit .thread-node i { background: var(--gold); }
.thread-week { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 8px; }
.thread-item h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.25rem, 2.4vw, 1.7rem); letter-spacing: -0.005em; margin-bottom: 8px; }
.thread-item p { color: var(--ink-dim); max-width: 560px; }

/* ---------- Race bars (10% vs 5%) ---------- */
.race { display: grid; gap: 26px; }
.race-row { display: grid; gap: 10px; }
.race-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.race-head strong { color: var(--ink); font-weight: 700; }
.race-head .race-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.race-head .race-amt.gold { color: var(--gold); }
.race-track {
  height: 16px; border-radius: 999px; overflow: hidden; position: relative;
  border: 1px solid var(--hairline); background: rgba(245, 239, 226, 0.03);
}
.race-fill {
  position: absolute; inset: 0; border-radius: 999px;
  transform-origin: left;
  background: rgba(245, 239, 226, 0.16);
}
html.js .race-fill { transform: scaleX(0); }  /* JS drives; no-JS lands full bars */
.race-fill.gold { background: var(--grad-btn); }

/* ---------- Booking calendar card (the one light element) ---------- */
.cal-card {
  background: #fff; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-raised);
}
.cal-card .cal-fallback {
  padding: 48px 32px; text-align: center; color: #4A4438;
  font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.7;
}

/* ============================================================
   MOTION VOCABULARY
   ============================================================ */

/* Reveals — 22px y-drift + opacity + blur(6px)→0 (the luxury feel).
   Initial hidden state gated on html.js: no-JS lands fully rendered. */
html.js [data-reveal] {
  opacity: 0; transform: translateY(22px); filter: blur(6px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
  /* no will-change here: pre-promoting every idle reveal candidate holds
     compositor layers from first paint — browsers promote at transition start */
}
html.js [data-reveal="fade"] { transform: none; filter: none; }   /* cheap variant for large containers */
html.js [data-reveal="left"] { transform: translateX(-34px); }
html.js [data-reveal="right"] { transform: translateX(34px); }
html.js [data-reveal="pop"] { transform: scale(0.86); transition-duration: 0.7s; }
html.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* Line wipes — clipped spans rise out of masks.
   <h1 class="ls-lines"><span class="ls-line"><span style="--i:0">…</span></span>…</h1> */
.ls-lines .ls-line { display: block; overflow: hidden; padding-block: 0.09em 0.18em; margin-block: -0.09em -0.18em; }
html.js .ls-lines .ls-line > span {
  display: block; transform: translateY(130%);
  transition: transform 1.05s var(--ease-wipe);
  transition-delay: calc(var(--i, 0) * 0.11s + var(--d, 0s));
}
html.js .ls-lines.is-in .ls-line > span { transform: none; }

/* Keyframes */
@keyframes ls-marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes ls-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--tilt, 0deg)); }
  25% { transform: translate3d(calc(var(--amp, 10px) * 1), calc(var(--amp, 10px) * -0.62), 0) rotate(calc(var(--tilt, 0deg) + 0.6deg)); }
  50% { transform: translate3d(0, calc(var(--amp, 10px) * -1), 0) rotate(var(--tilt, 0deg)); }
  75% { transform: translate3d(calc(var(--amp, 10px) * -1), calc(var(--amp, 10px) * -0.4), 0) rotate(calc(var(--tilt, 0deg) - 0.6deg)); }
}
@keyframes ls-foil { 0%, 52% { background-position: 100% 0; } 88%, 100% { background-position: 0% 0; } }
@keyframes ls-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(134, 199, 154, 0.55); }
  55% { box-shadow: 0 0 0 7px rgba(134, 199, 154, 0); }
}
@keyframes ls-caret { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes ls-stamp {
  from { opacity: 0; transform: rotate(-19deg) scale(2.4); }
  62% { opacity: 1; transform: rotate(-5deg) scale(0.94); }
  to { opacity: 1; transform: rotate(-8deg) scale(1); }
}
@keyframes ls-stamp-no {
  from { letter-spacing: 0.5em; opacity: 0; }
  to { letter-spacing: 0.22em; opacity: 1; }
}
@keyframes ls-spin { to { transform: rotate(360deg); } }
@keyframes ls-fall { 0% { transform: translateY(-8px); opacity: 0; } 30% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
@keyframes ls-beam { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes ls-draw { to { stroke-dashoffset: 0; } }
@keyframes ls-sheen { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(230%) skewX(-18deg); } }

/* Drift helper: .drift on floating cards; tune --amp/--tilt/--spd/--ad inline */
.drift { animation: ls-drift var(--spd, 7.2s) ease-in-out infinite; animation-delay: var(--ad, 0s); }

/* Ambient pause hook (JS stamps data-paused when offscreen / tab hidden).
   Pseudo-elements listed explicitly: animation-play-state is not inherited
   and `*` never matches ::before/::after — without these, .beam::before
   would keep rotating offscreen. */
[data-ambient][data-paused], [data-ambient][data-paused] *,
[data-ambient][data-paused]::before, [data-ambient][data-paused]::after,
[data-ambient][data-paused] *::before, [data-ambient][data-paused] *::after { animation-play-state: paused !important; }

/* ---------- Border beam ----------
   Slowly rotating conic gold beam masked to a 1px ring.
   Host must be OPAQUE-friendly: ::after re-paints the card surface 1px inset,
   leaving only the ring sliver of the rotating square visible. Transform-only.
   Give the host [data-ambient] so the beam pauses offscreen.
   Do NOT combine .beam with [data-tilt] (both claim ::after).
   Keep hosts wider than ~0.6× their height (the 200% square must cover corners). */
.beam { position: relative; overflow: hidden; }
.beam::before {
  content: ''; position: absolute; z-index: 0;
  left: 50%; top: 50%; width: 200%; aspect-ratio: 1;
  background: conic-gradient(from 0deg,
    transparent 0deg, transparent 296deg,
    rgba(212, 175, 55, 0.25) 318deg,
    #F5E1A4 340deg,
    rgba(212, 175, 55, 0.25) 352deg,
    transparent 360deg);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: ls-beam 9s linear infinite;
}
.beam::after {
  content: ''; position: absolute; z-index: 1; inset: 1px;
  border-radius: inherit;
  background: var(--beam-cover, linear-gradient(180deg, #1A150F, #100D09));
}
.beam > * { position: relative; z-index: 2; }

/* ---------- 3D tilt (desktop fine-pointer only; JS sets --rx/--ry/--gx/--gy/--go) ---------- */
@media (hover: hover) and (pointer: fine) {
  html.js [data-tilt],
  html.js [data-reveal].is-in[data-tilt] {
    position: relative;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.6s var(--ease-out);
  }
  html.js [data-tilt].is-tilting { transition: transform 0.12s linear; will-change: transform; }
  html.js [data-tilt]::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%),
                rgba(245, 225, 164, 0.13), transparent 62%);
    opacity: var(--go, 0);
    transition: opacity 0.35s var(--ease-out);
    pointer-events: none;
  }
}

/* ---------- Cursor aura (desktop garnish; JS creates/moves it) ---------- */
.aura {
  position: fixed; left: 0; top: 0; z-index: 55;
  width: 300px; height: 300px; border-radius: 50%;
  margin: -150px 0 0 -150px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.13), transparent 64%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  will-change: transform;
}
.aura.is-on { opacity: 1; }
@media (hover: none), (pointer: coarse) { .aura { display: none; } }

/* ---------- Preloader ----------
   Sequence (JS-driven classes on .preloader): .is-live (draw) →
   .is-sheen (gold sweep) → .is-open (curtain split, body gets .ls-ready) →
   .is-done (removed from flow). Total ≤ 1.1s, once per session. */
.preloader { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; }
html:not(.js) .preloader { display: none; }               /* no-JS: never cover the page */
html.ls-seen .preloader { display: none; }                /* repeat visit: head inline script
                                                             kills it before the deferred engine runs */
.preloader .pre-pane { position: absolute; top: 0; bottom: 0; width: 50.5%; background: var(--bg-deep); }
.preloader .pre-pane.l { left: 0; }
.preloader .pre-pane.r { right: 0; }
.preloader.is-open { pointer-events: none; }              /* opening curtain never blocks clicks */
.preloader.is-open .pre-pane { transition: transform 0.4s var(--ease-wipe); }
.preloader.is-open .pre-pane.l { transform: translateX(-101%); }
.preloader.is-open .pre-pane.r { transform: translateX(101%); }
.preloader .pre-mark { position: relative; z-index: 2; width: clamp(76px, 12vw, 112px); overflow: hidden; }
.preloader .pre-mark svg { width: 100%; height: auto; }
.preloader .mono-path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.preloader.is-live .mono-path {
  animation: ls-draw 0.5s var(--ease-wipe) forwards;
  animation-delay: calc(var(--i, 0) * 0.12s);
}
.preloader .pre-mark::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 220, 0.5) 50%, transparent 62%);
  transform: translateX(-130%) skewX(-18deg);
}
.preloader.is-sheen .pre-mark::after { animation: ls-sheen 0.38s var(--ease-out) forwards; }
.preloader.is-open .pre-mark { opacity: 0; transform: scale(0.94); transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out); }
.preloader.is-done { display: none; visibility: hidden; }
body.ls-veiled { overflow: hidden; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .wins { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}
@media (max-width: 800px) {
  .deck-card { grid-template-columns: 1fr; min-height: 0; gap: 16px; }
  .deck-visual { display: none; }
  .deck-card .ghost-no { font-size: 8rem; opacity: 0.7; }
}
@media (max-width: 768px) {
  .nav-links, .nav .btn-nav-cta { display: none; }
  .nav-burger { display: block; }
  .nav-shell { padding: 8px 8px 8px 16px; }
}
@media (min-width: 769px) { .nav-sheet { display: none; } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .btn { width: 100%; }
  .btn-inline { width: auto; }
  .drift { --amp: 5px; } /* halve drift amplitude under a thumb */
}

/* ---------- No-JS: land JS-driven accents on their complete frame ---------- */
html:not(.js) .thread-line i { transform: scaleY(1); }
html:not(.js) .thread-node { border-color: var(--gold); box-shadow: 0 0 16px rgba(212, 175, 55, 0.35); }  /* nodes land lit, matching the drawn line */
html:not(.js) .thread-node i { background: var(--gold); }
html:not(.js) .wire-stamp { opacity: 1; transform: rotate(-8deg) scale(1); }
html:not(.js) [data-panel] { display: block; }  /* tabs degrade to stacked documents */
html:not(.js) .faq-a { grid-template-rows: 1fr; visibility: visible; }  /* accordion degrades to stacked Q&A */
html:not(.js) .nav-burger, html:not(.js) .rail-arrows { display: none; }  /* controls with no listeners */

/* ---------- Reduced motion: land EVERYTHING, move NOTHING ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail-track { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }
  html.js [data-reveal], html.js .ls-lines .ls-line > span { opacity: 1 !important; transform: none !important; filter: none !important; }
  html.js .ava-strip .ava { transform: none !important; }
  html.js .eyebrow .idx { animation: none !important; opacity: 1 !important; letter-spacing: 0.22em !important; }
  .wire-stamp { opacity: 1; transform: rotate(-8deg) scale(1); }
  .foil { background-position: 50% 0; animation: none !important; }
  .drift, .tape-track, .beam::before, .dot.live { animation: none !important; }
  .race-fill, html.js .race-fill { transform: scaleX(1); } /* JS also lands exact shares inline; harmless default */
  .preloader { display: none !important; }
  .aura { display: none !important; }
  html.js [data-tilt] { transform: none !important; }
  html.js [data-tilt]::after { display: none; }
  .thread-line i { transform: scaleY(1); }
  .deck-card { transform: none !important; }
  .deck-card::after { opacity: 0 !important; }
}

/* ============================================================
   §9 SCROLL-CHOREOGRAPHY PRIMITIVES (v2)
   Everything below animates ONLY opacity and the INDEPENDENT
   translate / rotate / scale properties — never the `transform`
   property (sole exceptions: the .tape lean + .vel-skew, which are
   wrapper-only utilities) — so primitives compose with reveal/drift/
   tilt transforms instead of being clobbered by `transform: none`
   resets. No will-change anywhere: independent properties ride the
   compositor on their own. Reduced motion + no-JS land every
   primitive on its finished frame (defaults resolve to resting
   values; the engine feeds --p: 1 / --vel: 0 when reduced).
   ============================================================ */

/* ---------- 9.1 Scroll velocity (--vel, written on <html> by the engine) ----------
   -1..1, smoothed, snaps to exact 0 at rest. 0 under reduced motion / no-JS.
   The .tape container leans with velocity; the marquee keyframe on
   .tape-track is untouched. .vel-skew = generic wrapper utility. */
.tape { transform: skewX(calc(var(--vel, 0) * -3.5deg)); }
.vel-skew { transform: skewX(calc(var(--vel, 0) * var(--vk, -3deg))); }

/* ---------- 9.2 Parallax depth (.pz-*) ----------
   Layers ride the nearest [data-scrub] ancestor's --p via the independent
   translate property. Negative amp = layer moves up (or left) as you
   scroll down. Hosts need position sanity (positioned ancestor for
   absolute layers) and an ancestor with overflow: clip. Zero at --p 0.5. */
@media (prefers-reduced-motion: no-preference) {
  .pz-1, .pz-2, .pz-3, .pz-4 { translate: 0 calc((var(--p, 0.5) - 0.5) * var(--pz-amp, -24px)); }
  .pz-1 { --pz-amp: -24px; }
  .pz-2 { --pz-amp: -44px; }
  .pz-3 { --pz-amp: -70px; }
  .pz-4 { --pz-amp: -100px; }
  .pz-x-1, .pz-x-2 { translate: calc((var(--p, 0.5) - 0.5) * var(--pz-amp, -24px)) 0; }
  .pz-x-1 { --pz-amp: -24px; }
  .pz-x-2 { --pz-amp: -44px; }
}

/* ---------- 9.3 Pin scenes ----------
   .pin-scene reserves the scroll track (--pin-h); .pin-stage stays pinned
   while the track scrolls by. Put data-scrub="pin" on the .pin-scene so
   --p spans the whole pinned traversal (available to every descendant).
   No-JS / reduced motion collapse the track so content flows normally. */
.pin-scene { position: relative; height: var(--pin-h, 220vh); }
.pin-scene > .pin-stage {
  position: sticky; top: 0;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  overflow: clip;
}
html:not(.js) .pin-scene { height: auto; }
html:not(.js) .pin-scene > .pin-stage { position: static; min-height: 0; }

/* ---------- 9.4 Ghost numerals ----------
   Huge mono numerals behind content, sub-perceptual gold→ivory text fill,
   drifting horizontally on --p. Markup: aria-hidden="true"; host section
   needs position: relative + overflow: clip; overlapping content needs
   position: relative to paint above. */
.ghost-num {
  position: absolute; z-index: 0;
  pointer-events: none; user-select: none;
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(9rem, 22vw, 20rem);
  line-height: 0.8; letter-spacing: -0.06em;
  color: transparent;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.07), rgba(245, 239, 226, 0.05));
  -webkit-background-clip: text; background-clip: text;
}
@media (prefers-reduced-motion: no-preference) {
  .ghost-num { translate: calc((var(--p, 0.5) - 0.5) * var(--gn-amp, -120px)) 0; }
}

/* ---------- 9.5 Scrub-drawn rules ----------
   Hairlines that draw across as you scroll (independent scale, x only).
   No-JS / no scrub ancestor: --p defaults to 1 → fully drawn. */
.rule-draw { transform-origin: left center; scale: var(--p, 1) 1; }

/* ---------- 9.6 Word cascade (.ls-words) ----------
   Hand-authored word spans (outer = mask, inner = rising word with --wi).
   Reveal mode: engine adds .is-in (observed like .ls-lines; joins
   data-stagger groups; honors --d). Scrub mode: data-scrub on the
   .ls-words itself, or .ls-words-scrub when riding an ancestor's --p. */
.ls-words > span {
  display: inline-block; overflow: clip;
  padding-block: 0.09em 0.18em; margin-block: -0.09em -0.18em;
  vertical-align: bottom;
}
.ls-words > span > span { display: inline-block; }
html.js .ls-words > span > span {
  translate: 0 118%;
  transition: translate 0.85s var(--ease-wipe);
  transition-delay: calc(var(--wi, 0) * 0.05s + var(--d, 0s));
}
html.js .ls-words.is-in > span > span { translate: 0 0; }
/* Scrub-driven variant — must stay AFTER the .is-in rule (same specificity) */
html.js .ls-words[data-scrub] > span > span,
html.js .ls-words.ls-words-scrub > span > span {
  transition: none;
  --wp: clamp(0, calc((var(--p, 0) - var(--wi, 0) * 0.04) * 2.6), 1);
  translate: 0 calc((1 - var(--wp)) * 112%);
  opacity: var(--wp);
}

/* ---------- 9.7 Scene bloom ----------
   Cinematic section entrance: scale 0.92→1, opacity 0.4→1 on --p.
   Defaults land the final frame with no scrub ancestor / no JS. */
.bloom {
  scale: calc(0.92 + clamp(0, var(--p, 1), 1) * 0.08);
  opacity: calc(0.4 + clamp(0, var(--p, 1), 1) * 0.6);
}

/* ---------- 9.8 Tilt-rotate on scrub ----------
   Receipts/cards that straighten as they print: --roll at --p 0 → 0deg
   at --p 1. Defaults land straight (rotate 0) without scrub / JS. */
.roll-in { rotate: calc((1 - clamp(0, var(--p, 1), 1)) * var(--roll, -4deg)); }

/* ---------- 9.9 Reduced motion: primitives land finals, move nothing ---------- */
@media (prefers-reduced-motion: reduce) {
  .tape, .vel-skew { transform: none !important; }
  .pz-1, .pz-2, .pz-3, .pz-4, .pz-x-1, .pz-x-2, .ghost-num { translate: none !important; }
  .pin-scene { height: auto; }
  .pin-scene > .pin-stage { position: static; min-height: 0; }
  .rule-draw { scale: 1 1 !important; }
  html.js .ls-words > span > span { translate: 0 0 !important; opacity: 1 !important; transition: none !important; }
  .bloom { scale: none !important; opacity: 1 !important; }
  .roll-in { rotate: none !important; }
}
