/* Reach design tokens. The source of truth for DESIGN.md; pages use these, never raw values.
   Fonts: Sora (headings), Inter (everything else), JetBrains Mono (small technical labels). */

/* [data-tokens="base"] puts these values back on a part of a page that sets its own (v2's top bar). */
:root, [data-tokens="base"] {
  /* Fonts */
  --font-heading: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* Color: light theme (default) */
  --bg: #f6f8fb;
  --bg-veil: rgb(246 248 251 / 0.8);
  --sky: #86c3fb;
  --surface: #ffffff;
  --text: #0b1220;
  --text-muted: #4f5b70;
  --line: rgb(11 18 32 / 0.09);
  --accent: #158af3;
  --accent-fill: #0d72d9;
  --on-accent: #ffffff;
  --live: #e5484d;
  --money: #0f9f5a;
  --shadow: 0 18px 40px -18px rgb(11 18 32 / 0.35);
  --shadow-lift: 0 26px 50px -18px rgb(11 18 32 / 0.45);
  --tint: #e2effd;                      /* hover and selected fills, icon tiles */
  --sticker-line: rgb(11 18 32 / 0.6);  /* outline of floating panels (top bar, menus) */
  /* Footer and its dithered crowd. Light mode prints navy dots on pale blue paper; dark mode
     lights pale dots on a near-black screen. The footer background is always --crowd-paper. */
  --crowd-paper: #e9f1fb;
  --crowd-ink: #0b1a33;
  --crowd-accent: #158af3;
  /* Roster stage: the panel the creator grid sits on */
  --stage: #ffffff;
  --stage-line: rgb(11 18 32 / 0.08);
  --stage-text: #0b1220;
  --stage-hairline: rgb(11 18 32 / 0.08);  /* inner edge of each photo */
  --stage-well: #eef2f8;                    /* behind a photo while it loads */
  --stage-shadow: 0 30px 60px -30px rgb(11 18 32 / 0.28);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 80px;
  --space-11: 120px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --content: 1280px;

  /* Motion: the sliding buttons' swap */
  --slide-motion: 0.7s cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #070b14;
  --bg-veil: rgb(7 11 20 / 0.8);
  --sky: #10335e;
  --surface: #0e1524;
  --text: #f2f5fa;
  --text-muted: #a3aec2;
  --line: rgb(255 255 255 / 0.09);
  --accent: #3a9df7;
  --accent-fill: #158af3;
  --money: #46e08a;
  --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.8);
  --shadow-lift: 0 26px 50px -18px rgb(0 0 0 / 0.9);
  --tint: rgb(58 157 247 / 0.16);
  --sticker-line: rgb(255 255 255 / 0.18);
  --stage: #0b1120;
  --stage-line: rgb(255 255 255 / 0.07);
  --stage-text: #e6ecf5;
  --stage-hairline: rgb(255 255 255 / 0.08);
  --stage-well: rgb(255 255 255 / 0.04);
  --stage-shadow: 0 30px 60px -24px rgb(0 0 0 / 0.9);
  --crowd-paper: #070b14;
  --crowd-ink: #e6ecf5;
  --crowd-accent: #3a9df7;
  color-scheme: dark;
}

/* Type scale: one class per role in DESIGN.md. Sizes shrink on phones through clamp(). */
.text-display { font: 700 clamp(40px, 5.6vw, 72px) / 1.05 var(--font-heading); letter-spacing: -0.03em; text-wrap: balance; }
.text-loud { font: 800 clamp(40px, 5.6vw, 72px) / 1 var(--font-body); letter-spacing: -0.03em; text-wrap: balance; }
.text-h1 { font: 600 clamp(32px, 3.8vw, 48px) / 1.08 var(--font-heading); letter-spacing: -0.04em; text-wrap: balance; }
.text-page-title { font: 600 clamp(30px, 3.3vw, 42px) / 1.15 var(--font-heading); letter-spacing: -0.02em; text-wrap: balance; }
.text-h2 { font: 600 clamp(26px, 2.8vw, 36px) / 1.08 var(--font-heading); letter-spacing: -0.04em; text-wrap: balance; }
.text-h3 { font: 600 clamp(24px, 2.5vw, 32px) / 1.2 var(--font-heading); letter-spacing: -0.04em; text-wrap: balance; }
.text-title { font: 500 20px / 1.3 var(--font-body); letter-spacing: -0.01em; }
.text-stat { font: 500 24px / 1.2 var(--font-body); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.text-lead { font: 400 17px / 1.6 var(--font-body); }
.text-body { font: 400 16px / 1.5 var(--font-body); letter-spacing: -0.01em; }
.text-button { font: 600 16px / 1.25 var(--font-body); letter-spacing: -0.01em; }
.text-small { font: 400 13px / 1.5 var(--font-body); letter-spacing: -0.01em; }
.text-nav { font: 500 13px / 1.5 var(--font-body); letter-spacing: -0.01em; }
.text-caption { font: 400 12px / 1.35 var(--font-body); letter-spacing: -0.01em; }
.text-badge { font: 500 11px / 1.3 var(--font-body); letter-spacing: -0.01em; }
.text-mono { font: 600 12px / 1.4 var(--font-mono); letter-spacing: 0.04em; }

/* Extruded display (Streamable's 3D lettering, done in CSS). One or two words per page at most. */
.extruded {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #ffffff;
  -webkit-text-stroke: 0.04em var(--accent-fill);
  text-shadow:
    0.01em 0.01em 0 var(--accent-fill), 0.02em 0.02em 0 var(--accent-fill), 0.03em 0.03em 0 var(--accent-fill),
    0.04em 0.04em 0 var(--accent-fill), 0.05em 0.05em 0 var(--accent-fill), 0.06em 0.06em 0 var(--accent-fill),
    0.07em 0.07em 0 var(--accent-fill), 0.08em 0.08em 0 var(--accent-fill), 0.09em 0.09em 0 var(--accent-fill),
    0.10em 0.10em 0 var(--accent-fill), 0.11em 0.11em 0 var(--accent-fill), 0.12em 0.12em 0 var(--accent-fill),
    0.13em 0.13em 0 var(--accent-fill), 0.14em 0.14em 0 var(--accent-fill), 0.15em 0.15em 0 var(--accent-fill),
    0.16em 0.16em 0 var(--accent-fill), 0.17em 0.17em 0 var(--accent-fill), 0.18em 0.18em 0 var(--accent-fill);
}
