/* ============================================================
   Shared design tokens for the Aves website.

   Sourced by:
     - index3.html        (landing page) via <link rel="stylesheet" href="tokens.css">
     - docs/theme/custom  (mdBook docs) via additional-css in book.toml
   The docs copy is a symlink at docs/theme/tokens.css → ../../tokens.css.

   Two theming mechanisms are supported simultaneously:
     - Landing page: no class on <html>. Defaults to dark via :root,
       auto-switches to light via the prefers-color-scheme media query.
     - mdBook: applies .light or .navy on <html>. The .navy class shares
       the dark values; .light overrides to the light palette.
   ============================================================ */

/* ---- Font stacks (theme-independent) ---------------------- */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, Charter, "Iowan Old Style", "Apple Garamond",
                "Hoefler Text", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
}

/* ---- Dark theme (landing default + mdBook .navy) ---------- */

:root,
.navy {
  --bg: #0e0c0a;
  --bg-alt: #14110e;
  --fg: #efece6;
  --fg-soft: #cdc8be;
  --muted: #7a7470;
  --faint: #1f1c18;
  --rule: #211e1a;
  --accent: #d96f47;
  --accent-dim: #b8512a;
  --code-bg: #0a0907;
  --code-fg: #efece6;
  --code-border: #1d1a16;
}

/* ---- Light theme (mdBook .light) -------------------------- */

.light {
  --bg: #f6f1e7;
  --bg-alt: #ede7d6;
  --fg: #1a1714;
  --fg-soft: #2e2a25;
  --muted: #6e6660;
  --faint: #ddd4be;
  --rule: #d8cdb3;
  --accent: #b04a23;
  --accent-dim: #8a3915;
  --code-bg: #0c0a08;
  --code-fg: #efece6;
  --code-border: #0c0a08;
}

/* ---- Light theme (landing auto-switch via system pref) ---- */

@media (prefers-color-scheme: light) {
  :root:not(.navy):not(.light) {
    --bg: #f6f1e7;
    --bg-alt: #ede7d6;
    --fg: #1a1714;
    --fg-soft: #2e2a25;
    --muted: #6e6660;
    --faint: #ddd4be;
    --rule: #d8cdb3;
    --accent: #b04a23;
    --accent-dim: #8a3915;
    --code-bg: #0c0a08;
    --code-fg: #efece6;
    --code-border: #0c0a08;
  }
}
