/* Penchant type system.
   Editorial split: Newsreader serif (weight 400, warm optical-size display) for
   every display headline; Work Sans humanist sans (400/500) for body, nav, UI;
   IBM Plex Mono for code. Display headlines never go bold — bigger before bolder.
   Alternate pairings remain available via data-type theme scopes below. */
:root {
  /* Families */
  --font-serif: 'Newsreader', 'Merriweather', Garamond, 'Times New Roman', serif;
  --font-sans: 'Work Sans', 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Weights */
  --fw-regular: 400; /* @kind font */
  --fw-medium: 500; /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold: 700; /* @kind font */

  /* Font sizes (type ramp) */
  --fs-display-xl: 64px;
  --fs-display-lg: 48px;
  --fs-display-md: 36px;
  --fs-display-sm: 28px;
  --fs-title-lg: 22px;
  --fs-title-md: 18px;
  --fs-title-sm: 16px;
  --fs-body-md: 16px;
  --fs-body-sm: 14px;
  --fs-caption: 13px;
  --fs-caption-uppercase: 12px;
  --fs-code: 14px;
  --fs-button: 14px;
  --fs-nav: 14px;

  /* Line heights (paired with the ramp above) */
  --lh-display-xl: 1.05; /* @kind font */
  --lh-display-lg: 1.1; /* @kind font */
  --lh-display-md: 1.15; /* @kind font */
  --lh-display-sm: 1.2; /* @kind font */
  --lh-title: 1.4; /* @kind font */
  --lh-title-lg: 1.3; /* @kind font */
  --lh-body: 1.55; /* @kind font */
  --lh-code: 1.6; /* @kind font */
  --lh-tight: 1; /* @kind font */

  /* Letter spacing (negative tracking is essential on display serif) */
  --ls-display-xl: -1.5px; /* @kind font */
  --ls-display-lg: -1px; /* @kind font */
  --ls-display-md: -0.5px; /* @kind font */
  --ls-display-sm: -0.3px; /* @kind font */
  --ls-normal: 0; /* @kind font */
  --ls-uppercase: 1.5px; /* @kind font */
}

/* ---------- Alternate type themes ----------
   The default (no attribute) is "Editorial": Merriweather + Source Sans 3.
   Opt into another clean, professional pairing by setting data-type on the
   root element, e.g. <html data-type="contemporary">. Only the display + body
   families change; the ramp, weights, tracking, and IBM Plex Mono are shared. */

/* Contemporary — crisp corporate editorial. Spectral is a refined text serif;
   IBM Plex Sans is a neutral, highly legible workhorse. */
[data-type="contemporary"] {
  --font-serif: 'Spectral', 'Merriweather', Garamond, 'Times New Roman', serif; /* @kind font */
  --font-sans: 'IBM Plex Sans', 'Source Sans 3', system-ui, sans-serif; /* @kind font */
}

/* Modern — sans-led and architectural. Space Grotesk sets display headlines;
   Public Sans (US Web Design System) carries body. Clean and confident. */
[data-type="modern"] {
  --font-serif: 'Space Grotesk', 'Source Sans 3', system-ui, sans-serif; /* @kind font */
  --font-sans: 'Public Sans', 'Source Sans 3', system-ui, sans-serif; /* @kind font */
}

/* Refined (default is now this pairing) — elegant literary. Newsreader is a warm
   optical-size serif; Work Sans is a quiet geometric-humanist body. Kept as an
   explicit theme scope too, so data-type="refined" matches the default. */
[data-type="refined"] {
  --font-serif: 'Newsreader', 'Merriweather', Garamond, 'Times New Roman', serif; /* @kind font */
  --font-sans: 'Work Sans', 'Source Sans 3', system-ui, sans-serif; /* @kind font */
}

/* Editorial — the original warm, literary pairing. Merriweather display serif
   over Source Sans 3 humanist body. */
[data-type="editorial"] {
  --font-serif: 'Merriweather', 'Libre Baskerville', Garamond, 'Times New Roman', serif; /* @kind font */
  --font-sans: 'Source Sans 3', system-ui, sans-serif; /* @kind font */
}
