/* ============================================================
   TWO PODIUMS — Design Tokens
   Civic / editorial identity: warm parchment surfaces, ink text,
   a single brass accent for trust + UI, and two neutral (non
   red/blue) hues to distinguish the Conservative and Progressive
   columns without partisan color-coding.
   ============================================================ */

:root {
  /* ---- Type scale (fluid, clamp-based) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6vw, 6.5rem);

  /* ---- Spacing (4px base) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---- Radius ---- */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ---- Motion ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 780px;
  --content-wide: 1180px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Erode', 'Iowan Old Style', Georgia, serif;
  --font-body: 'General Sans', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

:root,
[data-theme='light'] {
  /* Surfaces — warm parchment */
  --color-bg: #f9f5ec;
  --color-surface: #fefcf7;
  --color-surface-2: #fbf8f0;
  --color-surface-offset: #f1ead9;
  --color-surface-offset-2: #eae1cb;
  --color-divider: #e2d8bf;
  --color-border: #d6cab0;

  /* Text — warm ink */
  --color-text: #221d14;
  --color-text-muted: #6f6552;
  --color-text-faint: #a89b80;
  --color-text-inverse: #fbf7ec;

  /* Primary accent — brass / civic gold */
  --color-primary: #93641e;
  --color-primary-hover: #6f4c17;
  --color-primary-active: #573c13;
  --color-primary-highlight: #e9dcbe;

  /* Side A — Conservative (warm terracotta, not red) */
  --color-side-a: #9a4a30;
  --color-side-a-hover: #7d3a25;
  --color-side-a-tint: #f2e3da;
  --color-side-a-tint-strong: #e9d0c1;

  /* Side B — Progressive (deep slate teal, not blue) */
  --color-side-b: #2b5d5f;
  --color-side-b-hover: #204648;
  --color-side-b-tint: #dde9e7;
  --color-side-b-tint-strong: #c6dad7;

  /* Status */
  --color-success: #43683b;
  --color-warning: #96591c;
  --color-error: #963434;

  --shadow-sm: 0 1px 2px oklch(0.25 0.02 60 / 0.08);
  --shadow-md: 0 6px 20px oklch(0.25 0.02 60 / 0.10);
  --shadow-lg: 0 16px 40px oklch(0.25 0.02 60 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #16130d;
  --color-surface: #1c1911;
  --color-surface-2: #201d14;
  --color-surface-offset: #241f15;
  --color-surface-offset-2: #2b251a;
  --color-divider: #332c1e;
  --color-border: #3d3524;

  --color-text: #ece5d3;
  --color-text-muted: #a99d82;
  --color-text-faint: #776b53;
  --color-text-inverse: #221d14;

  --color-primary: #d3a44e;
  --color-primary-hover: #e3b968;
  --color-primary-active: #f0cb87;
  --color-primary-highlight: #4a3c22;

  --color-side-a: #d3846a;
  --color-side-a-hover: #e09c85;
  --color-side-a-tint: #35251f;
  --color-side-a-tint-strong: #472e24;

  --color-side-b: #6fb0ae;
  --color-side-b-hover: #8ec4c1;
  --color-side-b-tint: #1e2f2d;
  --color-side-b-tint-strong: #253d3a;

  --color-success: #7fae6f;
  --color-warning: #cf9450;
  --color-error: #cf7676;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #16130d;
    --color-surface: #1c1911;
    --color-surface-2: #201d14;
    --color-surface-offset: #241f15;
    --color-surface-offset-2: #2b251a;
    --color-divider: #332c1e;
    --color-border: #3d3524;
    --color-text: #ece5d3;
    --color-text-muted: #a99d82;
    --color-text-faint: #776b53;
    --color-text-inverse: #221d14;
    --color-primary: #d3a44e;
    --color-primary-hover: #e3b968;
    --color-primary-active: #f0cb87;
    --color-primary-highlight: #4a3c22;
    --color-side-a: #d3846a;
    --color-side-a-hover: #e09c85;
    --color-side-a-tint: #35251f;
    --color-side-a-tint-strong: #472e24;
    --color-side-b: #6fb0ae;
    --color-side-b-hover: #8ec4c1;
    --color-side-b-tint: #1e2f2d;
    --color-side-b-tint-strong: #253d3a;
    --color-success: #7fae6f;
    --color-warning: #cf9450;
    --color-error: #cf7676;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 6px 20px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
  }
}
