/* ============================================================
   Speak To Freedom — Design Tokens (brand-agnostic primitives)
   Consumed by every library artifact. Brand layer maps these.
   ============================================================ */

:root {
  /* ---- Red scale (reconciled from 3 live sources) ---- */
  --red-vivid: #E0252B;   /* web / landing CTAs   */
  --red-coral: #E8554A;   /* email CTAs / warm    */
  --red-deep:  #c41e3a;   /* pitch / premium      */
  --red-glow:  #e63956;
  --red-dark:  #8b1528;
  --red-soft:  rgba(196, 30, 58, 0.15);

  /* ---- Neutrals ---- */
  --slate-navy: #2D3B4E;  /* light-theme chrome   */
  --ink:        #111827;
  --gray-700:   #374151;
  --gray-500:   #6b7280;
  --gray-400:   #9CA3AF;  /* placeholders/borders */
  --gray-200:   #e5e7eb;
  --gray-100:   #f3f4f6;
  --paper:      #ffffff;

  --black:       #0a0a0a;
  --black-light: #111111;
  --black-card:  #161616;
  --white:       #ffffff;
  --white-dim:   rgba(255,255,255,0.72);
  --white-muted: rgba(255,255,255,0.42);

  /* ---- Type ---- */
  --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --fs-xs: 0.78rem;  --fs-sm: 0.9rem;   --fs-base: 1rem;
  --fs-lg: 1.25rem;  --fs-xl: 1.6rem;   --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;    --fs-4xl: 4.25rem;
  --fw-light: 300; --fw-reg: 400; --fw-med: 500; --fw-semi: 600;
  --fw-bold: 700; --fw-black: 900;

  /* ---- Spacing / radius / motion ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --r-sm: 8px;  --r-md: 12px; --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(16,24,40,.08);
  --shadow-md: 0 8px 24px rgba(16,24,40,.12);
  --shadow-lg: 0 24px 60px rgba(16,24,40,.18);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Theme: light (default) ---- */
:root, [data-theme="light"] {
  --bg:        var(--paper);
  --bg-elev:   var(--gray-100);
  --fg:        var(--ink);
  --fg-dim:    var(--gray-500);
  --border:    var(--gray-200);
  --chrome-bg: var(--slate-navy);
  --chrome-fg: #ffffff;
  --cta-bg:    var(--red-vivid);
  --cta-fg:    #ffffff;
}

/* ---- Theme: dark ---- */
[data-theme="dark"] {
  --bg:        var(--black);
  --bg-elev:   var(--black-card);
  --fg:        var(--white);
  --fg-dim:    var(--white-dim);
  --border:    rgba(255,255,255,.12);
  --chrome-bg: var(--black-light);
  --chrome-fg: #ffffff;
  --cta-bg:    var(--red-coral);
  --cta-fg:    #ffffff;
}

/* ---- Primitive elements ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.font-display { font-family: var(--font-display); }

/* ---- Button primitives ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: var(--fw-bold);
  padding: 14px 28px; border-radius: var(--r-pill); border: none;
  cursor: pointer; text-decoration: none; font-size: var(--fs-base);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn-primary { background: var(--cta-bg); color: var(--cta-fg); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--border); }
.btn-block { width: 100%; }

/* ---- Input primitive ---- */
.field {
  width: 100%; padding: 16px 18px; font-size: var(--fs-base);
  font-family: var(--font-ui); color: var(--fg);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-md);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field::placeholder { color: var(--gray-400); }
.field:focus { outline: none; border-color: var(--cta-bg); box-shadow: 0 0 0 3px var(--red-soft); }
