/* Healthscape design tokens. Every color, font, size and radius on the site comes from here,
   so re-theming the site means editing this one file. */
:root {
  /* Brand ramp: Northwestern purple (from the original Healthscape site) */
  --purple-100: #f2eef9;
  --purple-200: #e4def0;
  --purple-300: #cbbfe3;
  --purple-400: #a998cf;
  --purple-500: #836eaa;
  --purple-600: #5f3f96;
  --purple-700: #4e2a84;
  --purple-800: #401f68;
  --purple-1000: #22103b;
  --purple-bright: #8a5cd6;

  /* Neutrals: warm paper and ink */
  --paper: #fbf9f5;
  --cream: #f3efe8;
  --cream-2: #e9e3d8;
  --ink: #1d1a22;
  --ink-2: #57525f;     /* secondary text, 7:1 on paper */
  --ink-3: #6f6a77;     /* tertiary/meta text, 4.9:1 on paper */
  --line: #ddd6ca;
  --scrim: rgba(20, 14, 30, .55);

  /* Per-page theme (episode pages may override these five via their `theme` field) */
  --theme-background: var(--brand-bg-light, var(--paper));
  --theme-foreground: var(--ink);
  --theme-accent-hi: var(--brand-hi-light, var(--purple-300));
  --theme-accent-med: var(--purple-500);
  --theme-accent-lo: var(--brand-lo-light, var(--purple-700));

  /* Semantic aliases used by components */
  --bg: var(--theme-background);
  --fg: var(--theme-foreground);
  --surface: var(--cream);
  --accent: var(--theme-accent-lo);
  --accent-ink: #ffffff;
  --link: var(--theme-accent-lo);
  --focus: var(--purple-bright);
  --tagline: var(--purple-700);

  /* Type (all free on Google Fonts):
     Playfair Display - wordmark; Instrument Serif - display headings; Newsreader - body text;
     Archivo (variable width) - UI at 100%, condensed meta at 75%, the wide wordmark at 125% */
  --font-heading: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-wordmark: "Playfair Display", Georgia, serif;
  --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --stretch-display: 75%;
  --stretch-wordmark: 125%;

  --text-base: 1.0625rem;          /* 17px */
  --text-sm: .9375rem;
  --text-xs: .8125rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --text-3xl: clamp(2.5rem, 1.5rem + 4.2vw, 4.75rem);
  --text-hero: clamp(3rem, 1.2rem + 8vw, 8.5rem);
  --leading-body: 1.5;
  --leading-heading: 1.1;
  --tracking-display: .03em;

  /* Spacing scale (space-4xs .. space-4xl) */
  --space-4xs: .25rem;
  --space-3xs: .5rem;
  --space-2xs: .75rem;
  --space-xs: 1rem;
  --space-s: 1.5rem;
  --space-m: 2rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 5rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Radii. Artwork has no radius; buttons are pills. */
  --radius-xs: 4px;
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  --btn-height: 3.125rem;          /* 50px */
  --btn-height-sm: 2.5rem;
  --nav-height: 4.5rem;
  --player-height: 4.5rem;
  --max: 90rem;
  --measure: 40rem;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: .2s;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141118;
    --cream: #1e1a24;
    --cream-2: #2a2531;
    --ink: #f3f0ea;
    --ink-2: #c4bfcc;
    --ink-3: #a8a2b1;
    --line: #36303f;
    --scrim: rgba(0, 0, 0, .7);
    --theme-background: var(--brand-bg-dark, var(--paper));
    --theme-accent-hi: var(--brand-hi-dark, var(--purple-700));
    --theme-accent-med: var(--purple-500);
    --theme-accent-lo: var(--brand-lo-dark, #c2adf0);
    --accent-ink: #1a0f2b;
    --focus: #c2adf0;
    --tagline: #c2adf0;
    color-scheme: dark;
  }
}
