/* Squadbook site. Tokens first; components consume tokens only. */
:root {
  color-scheme: dark;
  --felt-900: #0b1410;
  --felt-800: #0f1a15;
  --felt-700: #16241d;
  --felt-600: #1e3027;
  --line: #243329;
  --line-strong: #2f4438;
  --ink: #f1eee6;
  --ink-2: #c9cfc9;
  --ink-muted: #8a9a90;
  --gold: #f2c14e;
  --gold-deep: #d9a83a;
  --on-gold: #1a1503;
  --green-live: #57f287;
  --red-life: #ff6b6b;

  --bg: var(--felt-800);
  --surface-1: var(--felt-700);
  --surface-2: var(--felt-600);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-muted);
  --border: var(--line);
  --bg-accent: var(--gold);
  --text-accent: var(--gold);
  --on-accent: var(--on-gold);

  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --radius: 6px;
  --radius-lg: 12px;
  --measure: 62ch;
  --dur: 180ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--text-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

.wrap { width: min(1120px, 100% - 2 * var(--space-6)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.02; text-wrap: balance; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.75rem, 2rem + 4vw, 5.25rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0; color: var(--text-secondary); }
.lede { font-size: 1.2rem; max-width: var(--measure); }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: var(--space-6) 0; gap: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--text-primary); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.01em; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: var(--space-6); align-items: center; }
.nav a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--text-primary); }

/* Buttons: exactly one filled per view */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.8rem 1.25rem; border-radius: var(--radius); font-weight: 600; text-decoration: none; font-size: 1rem; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--bg-accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--gold-deep); transform: translateY(-1px); }
.btn-ghost { color: var(--text-primary); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-1); }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-12); align-items: center; padding: var(--space-12) 0 var(--space-16); }
.hero-copy { display: flex; flex-direction: column; gap: var(--space-6); }
.hero-copy h1 em { font-style: normal; color: var(--gold); }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.hero-note { font-size: 0.9rem; color: var(--text-muted); }

/* The card replica: proportions borrowed from Discord's embed, colors from the token layer */
.card { background: var(--felt-900); border: 1px solid var(--border); border-left: 4px solid var(--green-live); border-radius: var(--radius); padding: var(--space-4) var(--space-4) var(--space-3); font-size: 0.95rem; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); animation: rise 600ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card-title { font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-3); font-family: var(--font-body); }
.seat { display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--space-2); align-items: baseline; padding: 0.2rem 0; color: var(--text-secondary); }
.seat b { color: var(--text-primary); font-weight: 600; }
.seat .life { color: var(--red-life); }
.seat .turn { color: var(--gold); font-style: italic; }
.card-meta { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; display: grid; gap: 0.15rem; }
.card-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--space-3); }
.fake-btn { font-size: 0.8rem; padding: 0.35rem 0.7rem; border-radius: 4px; background: #2b3a31; color: var(--text-primary); border: 1px solid var(--line-strong); }
.fake-btn.danger { background: #5b2b2b; border-color: #7a3a3a; }
.fake-btn.success { background: #24523a; border-color: #2f6b4a; }
.fake-btn.primary { background: #3a4d8a; border-color: #4a62ad; }
.card-footer { margin-top: var(--space-3); font-size: 0.75rem; color: var(--text-muted); }

/* Ledger: what it tracks, as a real table not a card grid */
section { padding: var(--space-16) 0; border-top: 1px solid var(--border); }
.section-head { display: grid; gap: var(--space-3); max-width: var(--measure); margin-bottom: var(--space-8); }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th, .ledger td { text-align: left; padding: var(--space-4) var(--space-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.ledger th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.ledger td:first-child { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.ledger td { color: var(--text-secondary); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Games row */
.games { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.game { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.4rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-secondary); }
.game.more { color: var(--text-muted); border-style: dashed; }

/* Two-up: TTS + achievements */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); }
.two > div { display: grid; gap: var(--space-4); align-content: start; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { display: inline-flex; gap: 0.4rem; align-items: center; padding: 0.35rem 0.7rem; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; color: var(--text-secondary); }
.chip b { color: var(--text-primary); font-weight: 600; }
ol.steps { margin: 0; padding-left: 1.25rem; color: var(--text-secondary); display: grid; gap: var(--space-2); }
ol.steps li::marker { font-family: var(--font-mono); color: var(--gold); }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-1); padding: 0.1em 0.4em; border-radius: 4px; color: var(--text-primary); }

/* Price */
.price { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.plan { padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; gap: var(--space-3); align-content: start; }
.plan.pro { border-color: var(--gold); }
.plan .amount { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; }
.plan ul { margin: 0; padding-left: 1.1rem; color: var(--text-secondary); display: grid; gap: 0.35rem; }

/* CTA + footer */
.cta { text-align: left; display: grid; gap: var(--space-6); justify-items: start; }
footer { padding: var(--space-8) 0 var(--space-12); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); justify-content: space-between; }
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--text-primary); }
.footer-links { display: flex; gap: var(--space-6); flex-wrap: wrap; }

/* Legal pages */
.doc { max-width: 68ch; padding: var(--space-12) 0 var(--space-24); display: grid; gap: var(--space-4); }
.doc h1 { font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); }
.doc h2 { font-size: 1.6rem; margin-top: var(--space-6); }
.doc ul, .doc ol { margin: 0; padding-left: 1.25rem; color: var(--text-secondary); display: grid; gap: 0.35rem; }
.doc-meta { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: var(--space-8); padding-top: var(--space-6); }
  .two, .price { grid-template-columns: 1fr; }
  .nav { display: none; }
}
