/* 365SDX landing — the stadium board.
   Tokens mirror the app's theme (sharp_theme.dart / sharp_tokens.dart). */

@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --night: #090e20;
  --night-raised: #0f1630;
  --line: #222b4a;
  --text: #e8ecf8;
  --muted: #8b93b0;
  --gold: #ffc938;
  --on-gold: #1a1400;
  --blue: #6c8cff;
  --coral: #ff7a59;
  --up: #2ecc71;
  --down: #e74c3c;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a { color: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.bar, main > section, .footer {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Bar ─────────────────────────────────────────────── */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.wordmark-num { background: var(--gold); color: var(--on-gold); padding: 4px 8px 4px 7px; border-radius: 6px; }

/* ── Buttons ─────────────────────────────────────────── */

.button {
  display: inline-block;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  transition: transform 120ms ease, filter 120ms ease;
}

.button:hover { filter: brightness(1.06); }
.button:active { transform: translateY(1px); }

.button-quiet { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 9px 16px; }
.button-quiet:hover { border-color: var(--gold); filter: none; }

.link { color: var(--muted); text-underline-offset: 4px; }
.link:hover { color: var(--text); }

/* ── Hero ────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(32px, 7vw, 96px);
  padding-bottom: clamp(48px, 8vw, 112px);
}

h1, h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.005em;
  margin: 0;
}

h1 { font-size: clamp(40px, 6.2vw, 76px); max-width: 13ch; }

.lede { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); max-width: 52ch; margin: 22px 0 32px; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

/* ── The board ───────────────────────────────────────── */

.board {
  margin: 0;
  background: var(--night-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 14px;
}

.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }

.board-title { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 18px; }

.capture[hidden] { display: none; }
.capture { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.ring { width: 20px; height: 20px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.ring-fill { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 50.27; stroke-dashoffset: 0; }

.board-rows { list-style: none; margin: 0; padding: 0; }

.match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.match:first-child { border-top: 0; }

.match-teams { font-weight: 600; min-width: 0; }
.match-teams span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-meta { color: var(--muted); font-size: 13px; }

.spark { width: 84px; height: 30px; align-self: center; }
.spark polyline { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.odds { grid-column: 1 / -1; display: flex; gap: clamp(14px, 3vw, 28px); margin-top: 6px; }

.sel { display: flex; flex-direction: column; min-width: 0; }
.sel-label { color: var(--muted); font-size: 13px; }

.prob {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  transition: color 600ms ease;
}

.prob.up { color: var(--up); }
.prob.down { color: var(--down); }

/* One rolling digit: a column of 0–9 behind a one-character window. */
.digit { display: inline-block; height: 1em; overflow: hidden; }
.digit-strip { display: flex; flex-direction: column; transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }
.digit-strip span { height: 1em; line-height: 1; }

.board-caption { color: var(--muted); font-size: 13px; margin-top: 10px; }
.board-caption .example { color: var(--gold); }

/* ── Pillars ─────────────────────────────────────────── */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  padding-top: 40px;
  padding-bottom: 72px;
  border-top: 1px solid var(--line);
}

.pillar h2 { font-size: clamp(26px, 2.6vw, 32px); margin-bottom: 10px; }
.pillar p { color: var(--muted); margin: 0; max-width: 40ch; }

/* ── CLV ─────────────────────────────────────────────── */

.clv {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-top: 56px;
  padding-bottom: 72px;
  border-top: 1px solid var(--line);
}

.clv h2 { font-size: clamp(30px, 3.6vw, 44px); max-width: 18ch; margin-bottom: 16px; }
.clv p { color: var(--muted); max-width: 56ch; margin: 0; }
.clv em { color: var(--text); font-style: normal; font-weight: 600; }

.clv-chart { width: 100%; height: auto; }
.clv-chart .axis { stroke: var(--line); }
.clv-line { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.clv-taken { fill: var(--gold); }
.clv-close { fill: var(--blue); }
.clv-label { fill: var(--muted); font: 600 11px "Barlow", sans-serif; }

/* ── CTA + footer ────────────────────────────────────── */

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 48px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}

.cta h2 { font-size: clamp(28px, 3.4vw, 40px); }

.footer { border-top: 1px solid var(--line); padding-top: 28px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.responsible { max-width: 70ch; margin: 0 0 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
.footer-links a { color: var(--gold); text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.copyright { margin: 0; }

/* ── Narrow ──────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero, .clv { grid-template-columns: minmax(0, 1fr); }
  .pillars { grid-template-columns: minmax(0, 1fr); padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .digit-strip, .prob, .button { transition: none; }
}
