/* Site-specific styles. Loads tokens from styles/tokens.css. */
@import url("./tokens.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: #0A0A0A;
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── shared tokens ──────────────────────────────────── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--accent-gold);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent-gold); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ── nav ────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  background: linear-gradient(180deg, rgba(10,10,10,.85), rgba(10,10,10,0));
  backdrop-filter: blur(8px);
}
.nav .brand { display: flex; align-items: center; gap: 12px; }
.nav .brand img { width: 32px; height: 32px; }
.nav .brand-name {
  font-weight: 900; letter-spacing: .15em; text-transform: uppercase;
  font-size: 14px;
}
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; }
.nav-links a { color: var(--fg-secondary); transition: color .2s; }
.nav-links a:hover { color: var(--fg-primary); }
.nav .cta {
  background: var(--accent-gold); color: #0F0F0F;
  font-weight: 700; padding: 10px 18px; border-radius: 8px;
  font-size: 13px; letter-spacing: .04em;
}
@media (max-width: 720px) { .nav-links a:not(.cta) { display: none; } }

/* ── hero ───────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image: url("../public/menu_bg.png");
  background-size: cover; background-position: center;
  filter: saturate(1.05) contrast(1.05);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(0,0,0,.3), rgba(0,0,0,.85) 70%),
    linear-gradient(180deg, rgba(10,10,10,.4), rgba(10,10,10,.95));
}
.hero-content { position: relative; z-index: 1; max-width: 780px; }
.hero h1 {
  font-size: clamp(56px, 9vw, 124px);
  font-weight: 900; letter-spacing: .03em;
  line-height: .95; text-transform: uppercase;
  margin: 18px 0 24px;
}
.hero h1 .red { color: var(--accent-red); }
.hero .lede {
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--fg-primary); max-width: 620px;
  line-height: 1.4; margin-bottom: 14px;
  text-wrap: pretty;
}
.hero .sublede {
  font-size: 16px; color: var(--fg-secondary);
  max-width: 560px; margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-primary {
  background: var(--accent-gold); color: #0F0F0F;
  height: 56px; padding: 0 28px; border-radius: 12px;
  font-weight: 700; font-size: 16px; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 12px;
  border: 0; cursor: pointer;
  box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.1) inset;
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 50px rgba(242,201,76,.25), 0 0 0 1px rgba(255,255,255,.15) inset; }
.btn-secondary {
  background: transparent; color: var(--fg-primary);
  height: 56px; padding: 0 24px; border-radius: 12px;
  font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid rgba(160,200,235,.28); cursor: pointer;
}
.btn-secondary:hover { border-color: var(--fg-primary); }

/* hero floating stat strip */
.hero-stats {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 1;
  border-top: 1px solid rgba(160,200,235,.14);
  background: rgba(10,10,10,.7); backdrop-filter: blur(10px);
  padding: 18px 32px;
  display: flex; justify-content: space-around; gap: 16px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.hero-stats .item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 100px; }
.hero-stats .v { font-size: clamp(22px, 3vw, 32px); font-weight: 700; color: var(--fg-primary); letter-spacing: -.01em; }
.hero-stats .l { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-secondary); font-weight: 600; }
.hero-stats .v.gold { color: var(--accent-gold); }
.hero-stats .v.red  { color: var(--candle-down); }

/* ── ticker tape ────────────────────────────────────── */
.ticker-tape {
  background: #0D1117; border-top: 1px solid #30363D; border-bottom: 1px solid #30363D;
  overflow: hidden; padding: 14px 0;
}
.tape-track { display: flex; gap: 48px; white-space: nowrap; animation: scroll 80s linear infinite; }
.tape-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 14px; color: #8B949E;
  font-variant-numeric: tabular-nums;
}
.tape-item .sym { color: #E6EEF7; font-weight: 700; }
.tape-item .up { color: #3FB950; }
.tape-item .dn { color: #F85149; }
@keyframes scroll { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* ── sections ───────────────────────────────────────── */
section { padding: 120px 0; position: relative; }
section.dark   { background: #0F0F0F; }
section.darker { background: #0A0A0A; }

.section-head { max-width: 780px; margin-bottom: 64px; }
.section-head h2 {
  font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -.01em;
  line-height: 1.05; margin: 14px 0 18px;
  text-wrap: balance;
}
.section-head p { font-size: 20px; color: var(--fg-secondary); line-height: 1.5; max-width: 640px; }

/* ── pillars (3 USPs) ───────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 920px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--surface-1);
  border: 1px solid rgba(160,200,235,.14);
  border-radius: 16px; padding: 32px;
  position: relative; overflow: hidden;
}
.pillar .num-label {
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted);
  letter-spacing: .2em;
}
.pillar h3 {
  font-size: 28px; font-weight: 700; line-height: 1.15;
  margin: 24px 0 12px; letter-spacing: -.005em;
}
.pillar .big {
  font-size: 64px; font-weight: 900; line-height: 1;
  color: var(--accent-gold); margin: 16px 0 10px;
  letter-spacing: -.01em;
}
.pillar .big-sub { font-size: 14px; color: var(--fg-secondary); letter-spacing: .04em; }
.pillar p { color: var(--fg-secondary); font-size: 16px; margin: 16px 0 0; line-height: 1.5; }
.pillar.feature { background: linear-gradient(180deg, #1A0E0A, #0F0F0F); border-color: rgba(199,48,48,.4); }
.pillar.feature .big { color: var(--accent-red); }

/* ── timeline (the run) ─────────────────────────────── */
.timeline-block {
  background: linear-gradient(180deg, #14181F, #0D1117);
  border: 1px solid #30363D; border-radius: 16px;
  padding: 40px; margin-top: 40px; overflow: hidden;
}
.timeline-block .meta {
  display: flex; gap: 32px; flex-wrap: wrap;
  font-variant-numeric: tabular-nums; margin-bottom: 28px;
}
.timeline-block .meta .k { font-size: 11px; letter-spacing: .18em; color: #8B949E; text-transform: uppercase; font-weight: 600; }
.timeline-block .meta .v { font-size: 22px; font-weight: 700; color: #E6EEF7; }
.timeline-block .meta .v.warn { color: var(--candle-down); }

/* SPX chart svg */
.spx-chart { width: 100%; height: auto; }

/* ── characters ─────────────────────────────────────── */
.characters {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
@media (max-width: 920px) { .characters { grid-template-columns: repeat(2, 1fr); } }
.char {
  background: var(--surface-1); border: 1px solid rgba(160,200,235,.14);
  border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s;
}
.char:hover { border-color: var(--accent-gold); transform: translateY(-3px); }
.char .img { aspect-ratio: 1; overflow: hidden; }
.char .img img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05); }
.char .body { padding: 18px; }
.char .name { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.char .role { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--accent-gold); font-weight: 600; }
.char .desk { font-size: 13px; color: var(--fg-secondary); margin-top: 8px; line-height: 1.4; }

/* ── lessons grid ───────────────────────────────────── */
.lessons-meta { display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px; }
.lessons-meta .count { font-size: 64px; font-weight: 900; color: var(--accent-gold); letter-spacing: -.02em; line-height: 1; }
.lessons-meta .label { font-size: 16px; color: var(--fg-secondary); }

.lesson-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 920px) { .lesson-grid { grid-template-columns: repeat(2, 1fr); } }
.lesson-cat { background: var(--surface-1); border: 1px solid rgba(160,200,235,.14); border-radius: 12px; padding: 20px; }
.lesson-cat .h {
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent-gold); font-weight: 700; margin-bottom: 10px;
  display: flex; justify-content: space-between;
}
.lesson-cat .h .n { color: var(--fg-muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; }
.lesson-cat ul { margin: 0; padding: 0; list-style: none; }
.lesson-cat li { font-size: 14px; color: var(--fg-secondary); padding: 5px 0; }

/* ── thesis ─────────────────────────────────────────── */
.thesis {
  background: linear-gradient(180deg, #0F0F0F, #1A0E0A);
  position: relative;
  text-align: center;
}
.thesis-quote {
  font-family: var(--font-body);
  font-size: clamp(28px, 4vw, 56px); font-weight: 700; line-height: 1.15;
  letter-spacing: -.005em;
  max-width: 1000px; margin: 0 auto;
  text-wrap: balance;
}
.thesis-quote .red { color: var(--accent-red); }
.thesis-quote .gold { color: var(--accent-gold); }
.thesis-attr {
  margin-top: 32px; font-size: 13px;
  letter-spacing: .18em; color: var(--fg-secondary);
  text-transform: uppercase; font-weight: 600;
}

/* ── ticker board (60+) ─────────────────────────────── */
.ticker-board {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 4px; font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 920px) { .ticker-board { grid-template-columns: repeat(3, 1fr); } }
.tb-cell {
  background: #0D1117; border: 1px solid #21262D;
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px;
}
.tb-cell .s { color: #E6EEF7; font-weight: 700; font-size: 14px; }
.tb-cell .n { color: #8B949E; font-size: 10px; letter-spacing: .04em; }
.tb-cell .p { font-size: 12px; }
.tb-cell .p.up { color: #3FB950; }
.tb-cell .p.dn { color: #F85149; }

/* ── household ledger ─────────────────────────────── */
.ledger-section { padding: 110px 0; }
.ledger-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center;
}
@media (max-width: 920px) { .ledger-grid { grid-template-columns: 1fr; gap: 40px; } }
.ledger-copy h2 {
  font-size: clamp(36px, 4.6vw, 60px); font-weight: 800;
  letter-spacing: -.01em; line-height: 1.05;
  margin: 14px 0 22px; text-wrap: balance;
}
.ledger-copy h2 .red { color: var(--accent-red); }
.ledger-copy p {
  font-size: 19px; color: var(--fg-secondary); line-height: 1.5;
  max-width: 520px;
}
.ledger-copy .ledger-foot {
  margin-top: 20px; font-size: 14px; color: var(--fg-muted);
  letter-spacing: .04em; padding-top: 16px;
  border-top: 1px solid rgba(160,200,235,.14);
}
.ledger-copy .ledger-foot .num { color: var(--fg-primary); font-weight: 700; }

.ledger-doc {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #1A1A1A, #141414);
  border: 1px solid rgba(160,200,235,.18);
  border-radius: 6px; padding: 28px 32px;
  font-family: var(--font-mono);
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.4);
  position: relative;
  transform: rotate(-.4deg);
}
.ledger-doc-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid rgba(160,200,235,.14);
  padding-bottom: 16px; margin-bottom: 18px;
}
.ledger-doc-title {
  font-size: 16px; font-weight: 700; letter-spacing: .12em;
  color: var(--fg-primary); margin-top: 6px;
}
.ledger-doc-stamp {
  border: 2px solid var(--accent-red); color: var(--accent-red);
  font-weight: 800; font-size: 13px; letter-spacing: .25em;
  padding: 6px 12px; border-radius: 3px;
  transform: rotate(6deg); margin-top: 4px;
  font-family: var(--font-body);
}

.ledger-rows .lr,
.ledger-total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; padding: 10px 0;
  border-bottom: 1px dashed rgba(160,200,235,.08);
}
.ledger-rows .lr:last-child { border-bottom: 0; }
.ledger-rows .lr-l { color: var(--fg-secondary); }
.ledger-rows .lr-v { color: var(--fg-primary); font-variant-numeric: tabular-nums; white-space: pre; }

.ledger-total {
  margin-top: 12px; padding: 16px 0 4px;
  border-top: 2px solid rgba(160,200,235,.18);
  border-bottom: 0; font-size: 16px;
}
.ledger-total .lr-l {
  color: var(--fg-primary); text-transform: uppercase;
  letter-spacing: .12em; font-weight: 700; font-size: 12px;
  font-family: var(--font-body);
}
.ledger-total .lr-v {
  font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: 22px; white-space: pre;
}
.ledger-total .lr-v.red { color: var(--accent-red); }

.ledger-warning {
  margin-top: 16px; padding: 10px 14px;
  background: rgba(199,48,48,.08);
  border-left: 2px solid var(--accent-red);
  font-family: var(--font-body); font-size: 12px;
  letter-spacing: .04em; color: #E0B5B5;
  border-radius: 2px;
}

/* ── final cta ──────────────────────────────────────── */
.final-cta {
  text-align: center; padding: 120px 32px;
  background-image: url("../public/char_select_bg.png");
  background-size: cover; background-position: center;
  position: relative;
}
.final-cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,10,.6), rgba(10,10,10,.95));
}
.final-cta > * { position: relative; }
.final-cta h2 {
  font-size: clamp(48px, 7vw, 96px); font-weight: 900;
  letter-spacing: .02em; text-transform: uppercase; line-height: .95;
  margin: 18px 0 28px;
}
.final-cta h2 .red { color: var(--accent-red); }
.final-cta p { color: var(--fg-secondary); max-width: 540px; margin: 0 auto 40px; font-size: 18px; }

/* ── candlestick cursor trail ──────────────────────── */
#candle-trail {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ── footer ─────────────────────────────────────────── */
footer {
  background: #050505; padding: 48px 32px 32px;
  border-top: 1px solid rgba(160,200,235,.1);
  font-size: 13px; color: var(--fg-secondary);
}
.footer-row { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row .brand { display: flex; align-items: center; gap: 10px; }
.footer-row .brand img { width: 24px; height: 24px; }
.footer-row a { color: var(--fg-secondary); margin-left: 18px; }
.footer-row a:hover { color: var(--fg-primary); }
.footer-fineprint { max-width: 1240px; margin: 32px auto 0; font-size: 11px; color: var(--fg-muted); letter-spacing: .04em; }
