/* ══════════════════════════════════════════════════════════════════
   Kalmat — "Black Lacquer & Champagne Gold" preview
   Palette derived from the logo (champagne-gold quill, royal-purple K).
   ══════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, Latin, SIL OFL) — same pair as the app: Fraunces headings, Inter text ── */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 500 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
/* metric-matched fallbacks so the swap does not shift layout */
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia"); size-adjust: 102%; ascent-override: 94%; descent-override: 24%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }

/* ── Tokens ── */
:root {
  --lacquer-0: #07060A;
  --lacquer-1: #0E0C12;
  --lacquer-2: #16131C;
  --hairline: #2A2432;
  --ivory: #F3EDE2;
  --ivory-dim: #D6CEC1;
  --ash: #A69FAE;
  --gold: #C9A45C;
  --gold-hi: #E8CD8E;
  --gold-lo: #8C6A2F;
  --aubergine: #2B1B3D;
  --amethyst: #6B4E9B;
  --up: #3F9A7B;
  --down: #B0485A;

  --f-display: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --f-text: "Inter", "Inter Fallback", "Segoe UI", Arial, system-ui, sans-serif;
  --f-mono: var(--f-text);   /* labels read in the text face now (the thin mono was hard to read) */

  /* surfaces behind text (scrims, cards) as RGB triplets so each theme can swap them */
  --scrim-rgb: 7, 6, 10; --card-a-rgb: 22, 19, 28; --card-b-rgb: 14, 12, 18;
  --btn-gold: #C9A45C; --btn-gold-hi: #E8CD8E; --on-gold: #1A1206;
  --nav-solid: rgba(var(--card-b-rgb), .72);
  --vignette: rgba(0, 0, 0, .55);
  --msg-bad: #E88C98; --msg-ok: #7FD3AE;
  color-scheme: dark;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 72px; --s9: 112px; --s10: 168px;
  --r-sharp: 2px; --r-card: 6px; --r-pill: 999px;
  --max: 1200px;
  --section-y: var(--s10);

  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-precise: cubic-bezier(0.2, 0, 0, 1);
  --t-hover: 160ms; --t-ui: 320ms; --t-enter: 700ms; --t-section: 1200ms;

  --card-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 30px 60px -30px rgba(0, 0, 0, .8);
  --gold-edge: rgba(201, 164, 92, .45);
}
/* ── Themes (html[data-theme], shared with the app; set before first paint by /js/theme-early.js) ── */
html[data-theme="light"] {
  --lacquer-0: #F7F2E6; --lacquer-1: #FFFDF8; --lacquer-2: #FBF6EC; --hairline: #E0D4BC;
  --ivory: #1B1622; --ivory-dim: #3F3847; --ash: #5F5767;
  --gold: #7E5E25; --gold-hi: #6B4F1F; --gold-lo: #B8975A;
  --gold-edge: rgba(126, 94, 37, .42);
  --up: #1F7A5C; --down: #A33A4C;
  --scrim-rgb: 247, 242, 230; --card-a-rgb: 255, 253, 248; --card-b-rgb: 251, 246, 236;
  --nav-solid: rgba(255, 253, 248, .86);
  --vignette: rgba(90, 64, 20, .10);
  --card-shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 24px 48px -28px rgba(60, 40, 10, .28);
  --msg-bad: #A33A4C; --msg-ok: #1F7A5C;
  color-scheme: light;
}
html[data-theme="ultra-dark"] {
  --lacquer-0: #000000; --lacquer-1: #050407; --lacquer-2: #0A090D; --hairline: #1E1A24;
  --scrim-rgb: 0, 0, 0; --card-a-rgb: 10, 9, 13; --card-b-rgb: 5, 4, 7;
  --nav-solid: rgba(0, 0, 0, .78);
}
@media (max-width: 1024px) { :root { --section-y: var(--s9); } }
@media (max-width: 768px) { :root { --section-y: var(--s8); } }

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--lacquer-0); color: var(--ivory); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--lacquer-0); color: var(--ivory);
  font-family: var(--f-text); font-size: 16px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--r-sharp); box-shadow: 0 0 0 4px var(--lacquer-0); }
::selection { background: rgba(201, 164, 92, .35); color: var(--ivory); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--btn-gold); color: var(--on-gold); padding: 8px 14px; border-radius: var(--r-sharp); z-index: 100; }
.skip:focus { left: 12px; }

/* ── Type scale ── */
.display-xl {
  font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 96;
  font-size: clamp(52px, 8.2vw, 124px); line-height: 0.98; letter-spacing: -0.02em;
}
.display-l {
  font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 72;
  font-size: clamp(38px, 5vw, 76px); line-height: 1.04; letter-spacing: -0.015em;
}
.body-l { font-size: 19px; line-height: 1.6; color: var(--ivory-dim); max-width: 34em; }
.label {
  font-family: var(--f-text); font-size: 12.5px; line-height: 1.4; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}
.data { font-family: var(--f-text); font-size: 14px; letter-spacing: 0.02em; color: var(--ash); font-variant-numeric: tabular-nums; }
.fine { font-size: 14px; line-height: 1.6; color: var(--ash); }
em.gold { font-style: normal; color: var(--gold); }
.roman { font-family: var(--f-display); font-size: 15px; letter-spacing: 0; margin-right: .6em; color: var(--gold-hi); }

/* ── Layout ── */
.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; position: relative; }
@media (max-width: 768px) { .shell { padding: 0 20px; } }
main, .footer { position: relative; z-index: 2; }
html, body { overflow-x: clip; }
section { padding: var(--section-y) 0; position: relative; }

/* text over the scene gets a local lacquer scrim for contrast */
.scrim { position: relative; isolation: isolate; }
.scrim::before {
  content: ""; position: absolute; inset: -48px -64px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--scrim-rgb), .78), rgba(var(--scrim-rgb), .55) 60%, rgba(var(--scrim-rgb), 0));
}
@media (max-width: 768px) { .scrim::before { inset: -32px -20px; } }

/* ── Decorative layers ── */
.lux-poster, .lux-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
}
.lux-poster { object-fit: cover; object-position: 70% 50%; opacity: .9; transition: opacity 900ms var(--ease-in-out); }
.lux-poster.is-missing { display: none; }
.lux-canvas { opacity: 0; transition: opacity 900ms var(--ease-in-out); }
.lux-canvas.is-live { opacity: var(--scene-o, 1); }
html.scene-rest .lux-canvas.is-live { opacity: .0; }
html.scene-rest .lux-poster { opacity: 0; }
html.past-hero:not(.scene-live) .lux-poster { opacity: 0; }
.lux-canvas.is-live ~ .lux-poster, html.scene-live .lux-poster { opacity: 0; }
.lux-grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Tier B/C: CSS vignette + grain instead of the WebGL post pass */
html[data-tier="b"] .lux-grain, html[data-tier="c"] .lux-grain { opacity: .05; animation: grain 1.2s steps(3) infinite; }
html[data-tier="b"] body::after, html[data-tier="c"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 55%, var(--vignette) 100%);
}
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -2%); } }

/* poster capture mode (?poster=1): scene only */
html.poster-mode main, html.poster-mode .nav, html.poster-mode .footer, html.poster-mode .lux-grain { visibility: hidden; }
html.poster-mode body::after { display: none; }

/* ── Nav ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background var(--t-ui) var(--ease-precise), border-color var(--t-ui) var(--ease-precise), backdrop-filter var(--t-ui); border-bottom: 1px solid transparent; }
.nav.is-solid { background: var(--nav-solid); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-bottom-color: var(--hairline); }
.nav-inner { max-width: var(--max); margin: 0 auto; height: 72px; padding: 0 24px; display: flex; align-items: center; gap: var(--s6); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--f-text); font-weight: 600; font-size: 14px; letter-spacing: 0.22em; color: var(--ivory); }
.nav-links { display: flex; gap: var(--s6); margin-left: auto; font-size: 14.5px; color: var(--ivory-dim); }
.nav-links a { position: relative; padding: 6px 0; transition: color var(--t-hover) var(--ease-precise); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform var(--t-ui) var(--ease-out-quint); }
.nav-links a:hover { color: var(--ivory); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: var(--s5); margin-left: var(--s6); }
.nav-signin { font-size: 14.5px; color: var(--ivory-dim); padding: 8px 2px; transition: color var(--t-hover) var(--ease-precise); }
.nav-signin:hover { color: var(--gold-hi); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-actions { margin-left: auto; gap: var(--s4); } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px;
  font-family: var(--f-text); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; border-radius: var(--r-sharp);
  transition: background var(--t-hover) var(--ease-precise), color var(--t-hover) var(--ease-precise), border-color var(--t-hover) var(--ease-precise), box-shadow var(--t-hover) var(--ease-precise);
  cursor: pointer; white-space: nowrap;
}
.btn-gold { background: var(--btn-gold); color: var(--on-gold); border: 1px solid var(--btn-gold); }
.btn-gold:hover { background: var(--btn-gold-hi); border-color: var(--btn-gold-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-outline { border: 1px solid var(--gold-edge); color: var(--ivory); background: rgba(var(--scrim-rgb), .35); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-hi); }
.nav-cta { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-text { position: relative; min-height: 48px; padding: 0 4px; color: var(--ivory); }
.btn-text::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 12px; height: 1px; background: var(--gold-edge); transform-origin: right; transition: transform var(--t-ui) var(--ease-out-quint), background var(--t-ui); }
.btn-text:hover::after { background: var(--gold); transform: scaleX(.35); transform-origin: left; }

/* ── Hero ── */
.hero { min-height: min(100svh, 920px); display: flex; align-items: center; padding: 120px 0 var(--s8); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.hero-copy { display: grid; gap: var(--s5); align-content: start; }
.hero-h1 { display: grid; gap: var(--s5); margin: 0; font-weight: 500; }
.hero-h1 > .label { color: var(--gold); display: block; }
.hero-h1 > .display-xl { display: block; }
.hero-sub { max-width: 30em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); align-items: center; margin-top: var(--s2); }
.hero-ctas.center { justify-content: center; }
.brokers { margin-top: var(--s4); font-size: 13px; letter-spacing: 0.12em; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { align-items: flex-end; padding-top: 42vh; }
}
/* gold sheen: the word is painted solid gold at first paint; a narrow highlight sweeps once on top */
.sheen {
  background-image: linear-gradient(100deg, var(--gold) 0%, var(--gold) 40%, #FFF3D1 50%, var(--gold) 60%, var(--gold) 100%);
  background-size: 250% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: var(--gold);
  -webkit-text-fill-color: transparent;
}
html.do-sheen .sheen { animation: sheen 1400ms var(--ease-in-out) 1 forwards; }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: 0% 0; } }

/* ── Proof numerals ── */
.proof { padding: var(--s8) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: linear-gradient(180deg, rgba(var(--scrim-rgb), .35), rgba(var(--scrim-rgb), .8) 22%, rgba(var(--scrim-rgb), .8) 78%, rgba(var(--scrim-rgb), .35)); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.proof-item { display: grid; gap: var(--s3); justify-items: start; }
.numeral {
  font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 96;
  font-size: clamp(56px, 7vw, 108px); line-height: 1; letter-spacing: -0.02em; color: var(--ivory);
  font-variant-numeric: lining-nums tabular-nums;
}
.proof-item .label { color: var(--ivory-dim); }
@media (max-width: 640px) { .proof-grid { grid-template-columns: 1fr; gap: var(--s6); } }

/* ── Chapters ── */
.chapter-head { display: grid; gap: var(--s4); max-width: 820px; margin-bottom: var(--s8); }
.chapter-head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.chapter-head .body-l { margin-top: var(--s2); }
/* small labels sit in the corner of their block's scrim, where it fades, and over bright candles — each gets a scrim of its own */
.chapter-head > .label, .hero-h1 > .label, .score-copy > .label { justify-self: start; }
.chapter-head.center > .label { justify-self: center; }
.chapter-head > .label, .hero-h1 > .label, .score-copy > .label { position: relative; }
.chapter-head > .label::before, .hero-h1 > .label::before, .score-copy > .label::before {
  content: ""; position: absolute; inset: -16px -30px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--scrim-rgb), .97), rgba(var(--scrim-rgb), .88) 66%, rgba(var(--scrim-rgb), 0));
}
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.highlight {
  position: relative; padding: var(--s6) var(--s5) var(--s5); border: 1px solid var(--hairline); border-radius: var(--r-card);
  background: linear-gradient(180deg, rgba(var(--card-a-rgb), .88), rgba(var(--card-b-rgb), .92)); box-shadow: var(--card-shadow);
  display: grid; gap: var(--s3); align-content: start;
  transition: border-color var(--t-ui) var(--ease-precise), transform var(--t-ui) var(--ease-precise);
}
.highlight:hover { border-color: var(--gold-edge); }
.highlight h3 { font-family: var(--f-text); font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; color: var(--ivory); }
.highlight p { color: var(--ivory-dim); font-size: 16px; }
.ico { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.ico path, .ico circle, .ico rect { stroke-dasharray: 80; stroke-dashoffset: 0; }
html.motion .reveal:not(.in) .ico path, html.motion .reveal:not(.in) .ico circle, html.motion .reveal:not(.in) .ico rect { stroke-dashoffset: 80; }
html.motion .reveal.in .ico path, html.motion .reveal.in .ico circle, html.motion .reveal.in .ico rect { transition: stroke-dashoffset 900ms var(--ease-out-quint) 200ms; }
@media (max-width: 960px) { .highlights { grid-template-columns: 1fr; } }

/* ── Score dial ── */
.score-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s8); align-items: center; }
.score-copy { display: grid; gap: var(--s4); }
.dial { position: relative; margin: 0; width: min(380px, 80vw); justify-self: center; aspect-ratio: 1; }
.dial svg { width: 100%; height: 100%; display: block; }
#dialTicks line { stroke: var(--gold-lo); stroke-width: 1; }
#dialTicks line.major { stroke: var(--gold); stroke-width: 1.4; }
#dialArc { transition: stroke-dasharray 1800ms var(--ease-out-quint); }
.dial-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; pointer-events: none; }
.dial-num { font-family: var(--f-display); font-size: clamp(64px, 9vw, 96px); line-height: 1; color: var(--ivory); font-variant-numeric: lining-nums tabular-nums; }
.dial-center .label { color: var(--ivory-dim); }
@media (max-width: 900px) { .score-grid { grid-template-columns: 1fr; } }

/* ── Footer ── */
.footer { border-top: 1px solid var(--hairline); padding: var(--s8) 0 var(--s6); background: var(--lacquer-0); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: var(--s6); }
.footer nav { display: grid; gap: 10px; align-content: start; font-size: 14.5px; color: var(--ivory-dim); }
.footer nav a:hover { color: var(--gold-hi); }
.footer .label { color: var(--ash); margin-bottom: 4px; }
.brand-line { display: flex; align-items: center; gap: 10px; font-family: var(--f-text); font-weight: 600; letter-spacing: 0.22em; font-size: 14px; margin-bottom: var(--s4); }
.copyright { margin-top: var(--s7); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Reveal choreography (only when motion is allowed; content is never hidden without JS) ── */
html.motion .reveal { opacity: .001; transform: translateY(24px); transition: opacity var(--t-enter) var(--ease-out-quint), transform var(--t-enter) var(--ease-out-quint); transition-delay: calc(var(--d, 0) * 70ms); }
html.motion .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ══ Live-site content in the lacquer design ══ */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fx-grid, .bg-chart { display: none !important; }   /* legacy layers appended by /js/index.js */
.tagline { font-family: var(--f-text); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-top: auto; padding-top: var(--s2); }

/* hero additions */
.hero-lead { font-family: var(--f-display); font-style: normal; font-weight: 500; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; color: var(--ivory); }
.hero { position: relative; }
.drag-hint { position: absolute; right: 17%; bottom: 13%; color: var(--ivory-dim); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; font-weight: 600; margin: 0; padding: 7px 14px; border: 1px solid var(--hairline); border-radius: var(--r-pill); background: rgba(var(--scrim-rgb), .88); opacity: 0; transition: opacity 900ms var(--ease-in-out); }
html.scene-live .drag-hint { opacity: 1; }   /* only when there is a coin to drag */
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-dim); padding: 4px 10px; border-radius: var(--r-pill); background: rgba(var(--scrim-rgb), .75); }
html.motion .scroll-cue { animation: cue 2.4s var(--ease-in-out) infinite; }
@keyframes cue { 0%, 100% { transform: translate(-50%, 0); opacity: .55; } 50% { transform: translate(-50%, 8px); opacity: 1; } }
[data-coin-drag] { touch-action: pan-y; }
@media (pointer: fine) { html.scene-live [data-coin-drag] { cursor: grab; } html.scene-live.is-dragging, html.scene-live.is-dragging [data-coin-drag] { cursor: grabbing; } }
@media (max-width: 900px) { .drag-hint { display: none; } }

/* hero board: the live chips + a ticker that can be paused */
.board { position: relative; z-index: 2; padding-bottom: var(--s6); }
.chips { display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: flex-start; }
.chip { font-size: 13.5px; color: var(--ivory-dim); border: 1px solid var(--hairline); background: rgba(var(--scrim-rgb), .78); border-radius: var(--r-pill); padding: 8px 16px; line-height: 1.4; }
.chip strong { color: var(--gold-hi); font-weight: 600; }
.marquee { position: relative; margin-top: var(--s7); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: rgba(var(--scrim-rgb), .82); overflow: hidden; }
.marquee-track { display: flex; gap: 54px; width: max-content; padding: 16px 0; font-family: var(--f-text); font-size: 12.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ivory-dim); white-space: nowrap; }
.marquee-track span { display: inline-flex; gap: 22px; }
.marquee-track i { font-style: normal; color: var(--gold); }
html.motion .marquee-track { animation: marq 48s linear infinite; }
.marquee.is-paused .marquee-track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }
.marquee-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold-edge); background: var(--lacquer-0); cursor: pointer; padding: 0; }
.marquee-toggle svg { width: 14px; height: 14px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.marquee-toggle .i-play { display: none; }
.marquee.is-paused .marquee-toggle .i-play { display: inline; }
.marquee.is-paused .marquee-toggle .i-pause { display: none; }
html:not(.motion) .marquee-toggle { display: none; }

/* I · the coin chapter: copy left, medallion right (phones: medallion above) */
.coin { min-height: 88svh; display: flex; align-items: center; }
.coin-copy { max-width: 480px; margin-bottom: 0; }
@media (max-width: 900px) { .coin { align-items: flex-end; padding-top: 48vh; } }

/* II · how the gate works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); counter-reset: step; }
.step { position: relative; display: grid; gap: var(--s3); align-content: start; padding: var(--s6) var(--s5) var(--s5); border: 1px solid var(--hairline); border-radius: var(--r-card); background: linear-gradient(180deg, rgba(var(--card-a-rgb), .9), rgba(var(--card-b-rgb), .94)); box-shadow: var(--card-shadow); }
.step h3 { font-family: var(--f-text); font-size: 21px; font-weight: 600; color: var(--ivory); }
.step p { color: var(--ivory-dim); }
.step-n { color: var(--gold); letter-spacing: 0.2em; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: calc(-1 * var(--s5)); width: var(--s5); height: 1px; background: linear-gradient(90deg, var(--gold-edge), var(--gold)); }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr; } .step:not(:last-child)::after { display: none; } }

/* III · features: six cards + the three numbers */
.highlight p.tagline, .mini p.tagline, .step p.tagline { font-size: 12px; line-height: 1.5; color: var(--gold); }
.numbers { margin-top: var(--s8); padding-top: var(--s7); border-top: 1px solid var(--hairline); }
.numbers .proof-item .label { color: var(--ivory-dim); }

/* IV · toolkit: four pillars of compact cards */
.pillar { display: flex; align-items: center; gap: var(--s4); margin: var(--s8) 0 var(--s5); padding: 10px 0; background: linear-gradient(90deg, rgba(var(--scrim-rgb), .94), rgba(var(--scrim-rgb), .94) 45%, rgba(var(--scrim-rgb), 0)); font-family: var(--f-text); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-hi); }
.chapter-head + .pillar { margin-top: 0; }
.pillar::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-edge), rgba(42, 36, 50, .6) 45%, transparent); }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s4); }
.mini { display: grid; gap: var(--s3); align-content: start; padding: var(--s5); border: 1px solid var(--hairline); border-radius: var(--r-card); background: rgba(var(--card-b-rgb), .92); transition: border-color var(--t-ui) var(--ease-precise); }
.mini:hover { border-color: var(--gold-edge); }
.mini h4 { margin: 0; font-family: var(--f-text); font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ivory); }
.mini p { color: var(--ivory-dim); font-size: 15px; line-height: 1.6; }
.mini .ico { width: 24px; height: 24px; }
.device { margin: var(--s8) auto 0; max-width: 920px; border-radius: 10px; padding: 10px; background: linear-gradient(160deg, #1D1924, #0B0910); border: 1px solid var(--hairline); box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(232, 205, 142, .18); }
.device img { border-radius: 4px; width: 100%; height: auto; }
.device figcaption { margin: 10px 4px 2px; color: var(--ivory-dim); }
.device.is-missing { display: none; }

/* V · score */
.dial-cap { position: absolute; left: 0; right: 0; bottom: -28px; text-align: center; color: var(--ivory-dim); }

/* VI · trust */
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.trust { display: grid; gap: var(--s3); align-content: start; padding: var(--s6) var(--s5) var(--s5); border: 1px solid var(--hairline); border-radius: var(--r-card); background: linear-gradient(180deg, rgba(var(--card-a-rgb), .9), rgba(var(--card-b-rgb), .94)); box-shadow: var(--card-shadow); }
.trust h3 { font-family: var(--f-text); font-size: 20px; font-weight: 600; color: var(--ivory); }
.trust p { color: var(--ivory-dim); }
@media (max-width: 900px) { .trust-grid { grid-template-columns: 1fr; } }

/* VII · FAQ */
.faq { max-width: 900px; border-bottom: 1px solid var(--hairline); background: rgba(var(--scrim-rgb), .86); }
.faq-item { border-top: 1px solid var(--hairline); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s5); padding: var(--s5) var(--s2); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font-family: var(--f-text); font-size: 18px; font-weight: 600; color: var(--ivory); }
.faq-item p { padding: 0 var(--s2) var(--s5); color: var(--ivory-dim); max-width: 60em; }
.faq-plus { margin-left: auto; flex: none; width: 18px; height: 18px; position: relative; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--gold); transition: transform var(--t-ui) var(--ease-out-quint); }
.faq-plus::after { transform: rotate(90deg); }
.faq-item[open] .faq-plus::after { transform: rotate(0deg); }

/* sign in / start free — the live auth card, restyled */
.auth { min-height: 100svh; display: flex; align-items: center; }
.auth-shell { display: grid; place-items: center; }
.card.auth-card, .card.modal-card {
  width: min(440px, 100%); text-align: center; padding: var(--s7) var(--s6); border: 1px solid var(--hairline); border-radius: var(--r-card);
  background: linear-gradient(180deg, rgba(var(--card-a-rgb), .96), rgba(var(--card-b-rgb), .97)); box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(232, 205, 142, .12);
  transition: transform var(--t-ui) var(--ease-precise);
}
.auth-logo { width: 64px; height: 64px; margin: 0 auto var(--s4); }
.auth-title { font-family: var(--f-display); font-size: 30px; line-height: 1.15; color: var(--ivory); }
.auth-sub { margin-top: var(--s2); color: var(--ivory-dim); font-size: 15px; }
.tabs { display: flex; gap: 4px; padding: 4px; margin: var(--s5) 0 var(--s4); border: 1px solid var(--hairline); border-radius: var(--r-sharp); background: rgba(255, 255, 255, .02); }
.tab { flex: 1; padding: 10px; font-family: var(--f-text); font-weight: 600; font-size: 14px; color: var(--ivory-dim); background: transparent; border: 0; border-radius: var(--r-sharp); cursor: pointer; transition: background var(--t-hover), color var(--t-hover); }
.tab.active { background: var(--btn-gold); color: var(--on-gold); }
.auth-card input, .modal-card select {
  width: 100%; margin: 7px 0; padding: 14px 16px; font-family: var(--f-text); font-size: 15px; color: var(--ivory);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--hairline); border-radius: var(--r-sharp); transition: border-color var(--t-hover), box-shadow var(--t-hover);
}
.auth-card input::placeholder { color: var(--ash); }
.auth-card input:focus, .modal-card select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 92, .18); }
.modal-card select { margin: var(--s5) 0 var(--s2); }
.modal-card select option { background: var(--lacquer-2); color: var(--ivory); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; padding: 0; }
.pw-eye svg { width: 18px; height: 18px; fill: none; stroke: var(--ash); stroke-width: 1.6; }
.pw-eye:hover svg, .pw-eye.on svg { stroke: var(--gold); }
.auth-submit { width: 100%; margin-top: var(--s3); }
.auth-forgot { margin-top: var(--s4); background: none; border: 0; padding: 6px; color: var(--gold-hi); font-family: var(--f-text); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold-edge); }
.msg { min-height: 20px; margin-top: var(--s3); font-size: 14px; color: var(--msg-bad); }
.msg.ok { color: var(--msg-ok); }
.auth-note { margin-top: var(--s3); }
#twofaStep .auth-forgot { display: block; margin-left: auto; margin-right: auto; }
.auth-2fa-lead { margin: 0 0 var(--s3); color: var(--ivory-dim, #cfc6b0); font-size: 15px; line-height: 1.5; }
#twofaCode { letter-spacing: .3em; text-align: center; font-size: 20px; }
.modal { position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; background: rgba(0, 0, 0, .8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); padding: 20px; }
@media (max-width: 600px) { .auth-card input { font-size: 16px; } .card.auth-card, .card.modal-card { padding: var(--s6) var(--s5); } }

/* ══ Theme switch (nav) — cycles dark → light → ultra-dark, shared with the app ══ */
.theme-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: var(--r-pill); background: rgba(var(--scrim-rgb), .55); color: var(--ivory-dim); font-family: var(--f-text); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color var(--t-hover) var(--ease-precise), color var(--t-hover) var(--ease-precise); }
.theme-btn:hover { border-color: var(--gold-edge); color: var(--ivory); }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.theme-btn .ti { display: none; }
html:not([data-theme]) .theme-btn .ti-dark, html[data-theme="dark"] .theme-btn .ti-dark,
html[data-theme="light"] .theme-btn .ti-light, html[data-theme="ultra-dark"] .theme-btn .ti-ultra { display: inline; }
@media (max-width: 520px) { .theme-btn { padding: 0; width: 38px; justify-content: center; } .theme-btn-txt { display: none; } }

/* light: the lacquer poster is a night render — the live scene repaints itself in ivory instead */
html[data-theme="light"] .lux-poster { display: none; }
html[data-theme="light"] body { background: radial-gradient(1100px 600px at 80% -10%, rgba(201, 164, 92, .14), transparent 62%), var(--lacquer-0); }
html[data-theme="light"] .device { background: linear-gradient(160deg, #2A2431, #141119); border-color: #CDBF9F; box-shadow: 0 50px 100px -40px rgba(60, 40, 10, .45), inset 0 1px 0 rgba(232, 205, 142, .18); }
html[data-theme="light"] .device figcaption { color: #D6CEC1; }   /* the bezel stays dark in every theme */
html[data-theme="light"] .modal { background: rgba(40, 30, 15, .45); }
html[data-theme="light"] .auth-card input, html[data-theme="light"] .modal-card select { background: #FFFFFF; }
html[data-theme="light"] .sheen { background-image: linear-gradient(100deg, var(--gold) 0%, var(--gold) 40%, #C9A45C 50%, var(--gold) 60%, var(--gold) 100%); }
.theme-btn .ti-ultra path { fill: var(--gold); }
.nav-signin { white-space: nowrap; }
@media (max-width: 520px) {
  .nav-inner { padding: 0 16px; gap: 12px; }
  .nav-actions { gap: 10px; }
  .brand { gap: 8px; letter-spacing: 0.16em; }
  .nav-cta { padding: 0 14px; }
}

/* ── The Shadow Book · proof band ── */
.proof-band-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s7); align-items: center; }
.shadow-card { margin: 0; padding: var(--s5); border: 1px solid var(--hairline); border-radius: var(--r-card); background: linear-gradient(180deg, rgba(var(--card-a-rgb), .92), rgba(var(--card-b-rgb), .96)); box-shadow: var(--card-shadow); display: grid; gap: var(--s4); }
.shadow-card figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.shadow-card .data { color: var(--ivory-dim); }
.shadow-rows { display: grid; gap: 0; }
.shadow-rows li { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--hairline); font-size: 15px; color: var(--ivory); }
.shadow-rows .why { color: var(--ash); font-size: 13px; text-align: right; }
.shadow-rows .num { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 62px; text-align: right; }
.shadow-rows .num.down { color: var(--down); } .shadow-rows .num.up { color: var(--up); }
.shadow-total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding-top: var(--s2); }
.numeral-s { font-family: var(--f-display); font-weight: 500; font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--gold-hi); font-variant-numeric: lining-nums tabular-nums; }
.shadow-card .fine { color: var(--ash); font-size: 12.5px; }
@media (max-width: 900px) { .proof-band-grid { grid-template-columns: 1fr; gap: var(--s6); } }
@media (max-width: 480px) { .shadow-rows li { grid-template-columns: 1fr auto; } .shadow-rows .why { grid-column: 1 / -1; text-align: left; } }

/* ── Hero trust line (under the two CTAs) ── */
.hero-trust { margin-top: calc(-1 * var(--s3)); font-size: 14.5px; line-height: 1.6; color: var(--ivory-dim); }
.hero-trust i { font-style: normal; color: var(--gold); padding: 0 6px; }

/* ── Trust band (right after "How the gate works") ── */
.trust-band { padding: var(--s6) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: rgba(var(--scrim-rgb), .82); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); }
.trust-inner > .label { flex: none; }
.trust-list { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); flex: 1 1 520px; }
.trust-list li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.5; color: var(--ivory); }
.trust-list li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 11px; height: 6px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.trust-band .btn-text { flex: none; white-space: nowrap; }
@media (max-width: 640px) { .trust-list { flex-direction: column; gap: var(--s2); flex-basis: 100%; } }

/* ── Final CTA band ── */
.cta-band { padding: var(--section-y) 0; border-top: 1px solid var(--hairline); }
.cta-band-inner { display: grid; gap: var(--s5); justify-items: center; text-align: center; max-width: 900px; margin-left: auto; margin-right: auto; }
.cta-band .hero-ctas { justify-content: center; }
.cta-band .fine { color: var(--ash); }

/* ── Continue with Google (branding: white button, Google "G", dark text) ── */
.auth-or { display: flex; align-items: center; gap: var(--s3); margin: var(--s3) 0; color: var(--ash); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 16px; border: 1px solid #DADCE0; border-radius: var(--r-sharp); background: #FFFFFF; color: #1F1F1F; font-weight: 600; font-size: 15px; text-decoration: none; transition: box-shadow var(--t-hover), background var(--t-hover); }
.btn-google:hover { background: #F7F8F8; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.btn-google .g-logo { width: 20px; height: 20px; flex: none; }
.btn-google[hidden], .auth-or[hidden] { display: none; }
