/* ─────────────────────────────────────────────────────────────────
   KolhozChain — Design Tokens
   Single source of truth for the brand's CSS variables, base type,
   and the global radius reset. Keep in sync with /design.md.

   Loaded by landing/index.html and landing/quiz.html (when wired up).
   Reference (not served): design-system/preview/*.html.
   Linked from: design-system/templates/*.html.

   Editorial constructivism: dusty paper grain, hard 0px corners,
   Soviet-poster red & mustard against near-black, Rodchenko display.
   ───────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Rodchenko';
  src: url('../raw/assets/Rodchenko-Regular.otf') format('opentype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Surfaces — almost-black with a warm sepia drift, never pure #000 */
  --bg: #0a0a0a;
  --surface-1: #141210;
  --surface-2: #1c1815;
  --surface-3: #261f1a;       /* chip / row hover — one notch warmer */
  --surface-deep: #0e0f11;    /* tier-items inner well */

  /* ── Hairlines */
  --border: #2a2520;
  --rule: #3a3430;

  /* ── Text — paper-cream against dark; never pure white */
  --text: #e8e4d9;
  --text-muted: #a09882;
  --text-faint: #665e50;

  /* ── Brand accents — Soviet poster palette */
  --primary: #c94d3a;         /* brick red — kolhoz, downvote, accent */
  --primary-deep: #831c12;    /* deep oxblood — S-tier, banners */
  --mustard: #f4dc8a;         /* mustard yellow — consensus, upvote, highlights */

  /* ── Inks */
  --ink-black: #0a0806;
  --paper: #e8e4d9;

  /* ── Type families
       Alias variables so templates / preview cards can reference one name
       rather than memorising the fallback chain. The live page still
       inlines the full chain in component CSS — these are documentation. */
  --font-display: 'Rodchenko', 'Bebas Neue', 'Antique Olive', Impact, sans-serif;
  --font-serif:   'Source Serif 4', Georgia, serif;
  --font-label:   'Space Grotesk', ui-monospace, monospace;
  --font-data:    'Inter', system-ui, sans-serif;

  /* ── Shared section-heading size. One clamp drives all four top-level
     headings (hero h1, tier h2, rules h2, theory h2) so they scale in
     lockstep from mobile to desktop. Floor keeps them readable on small
     phones; ceiling holds the editorial wide-screen feel. */
  --section-h: clamp(40px, 7.2vw, 84px);

  /* ── Spacing — 8pt rhythm */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 48px;
  --sp-9: 64px;
  --sp-10: 96px;

  /* ── Motion */
  --ease-default: cubic-bezier(.2,.7,.2,1);
  --dur-fast: 0.14s;
  --dur-base: 0.18s;
  --dur-slow: 0.35s;
}

* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Paper-grain overlay (SVG noise). Subtle, set-once. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.display { font-family: 'Rodchenko', 'Bebas Neue', 'Antique Olive', Impact, sans-serif; letter-spacing: -0.01em; text-transform: uppercase; line-height: 0.9; }
.label { font-family: 'Space Grotesk', ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.22em; font-weight: 700; font-size: 11px; }
.data { font-family: 'Inter', system-ui, sans-serif; }

a { color: inherit; text-decoration: none; }
