/* ==========================================================================
   The Wild Zoo — tokens.css
   Design tokens: light/dark themes, typography scale, spacing, elevation.
   Inspired by clean magazine themes (Astra-like clarity) — original work.
   ========================================================================== */

:root {
  /* ---- brand accents ---- */
  --c-accent: #0066cc;
  --c-accent-strong: #004f9e;
  --c-accent-soft: #e8f1fb;
  --c-emerald: #0f766e;
  --c-emerald-soft: #e6f4f1;
  --c-amber: #b45309;
  --c-violet: #7c3aed;
  --c-danger: #d92d20;

  /* ---- surfaces (light) ---- */
  --c-bg: #f8f9fa;
  --c-surface: #ffffff;
  --c-surface-2: #f2f4f7;
  --c-surface-3: #e9edf2;
  --c-border: #e4e8ee;
  --c-border-strong: #cfd6e0;

  /* ---- text (light) ---- */
  --c-text: #1b2430;
  --c-text-soft: #46586e;
  /* muted text is used at 11-13px, so it must still clear 4.5:1 on --c-surface-2 */
  --c-text-muted: #5b6a7e;
  --c-text-invert: #ffffff;
  /* label colour for filled buttons; dark text is used in the dark theme where
     the accent is light */
  --c-on-accent: #ffffff;

  /* ---- effects ---- */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .14);
  --ring: 0 0 0 3px rgba(0, 102, 204, .28);

  /* ---- typography ---- */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-ar: "Cairo", "Tajawal", "Noto Naskh Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-head: var(--font-sans);
  --fs-11: .6875rem;
  --fs-12: .75rem;
  --fs-13: .8125rem;
  --fs-14: .875rem;
  --fs-15: .9375rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-34: 2.125rem;
  --fs-42: 2.625rem;
  --lh-tight: 1.22;
  --lh-snug: 1.38;
  --lh-body: 1.72;

  /* ---- spacing / geometry ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* ---- layout ---- */
  --container: 1240px;
  --gutter: 24px;
  --sidebar-w: 320px;
  --header-h: 66px;
  --topbar-h: 34px;

  /* ---- motion ---- */
  --t-fast: .14s ease;
  --t: .22s cubic-bezier(.4, 0, .2, 1);

  color-scheme: light;
}

/* ==========================  DARK THEME  ================================= */
:root[data-theme="dark"] {
  --c-bg: #0e1420;
  --c-surface: #161e2c;
  --c-surface-2: #1c2536;
  --c-surface-3: #243044;
  --c-border: #26324a;
  --c-border-strong: #33425e;

  --c-text: #e9eef6;
  --c-text-soft: #b9c5d6;
  --c-text-muted: #93a2b8;
  --c-text-invert: #0e1420;

  --c-accent: #4c9dff;
  --c-accent-strong: #7ab8ff;
  --c-accent-soft: #12293f;
  /* the dark accent is light, so filled buttons take dark labels */
  --c-on-accent: #0e1420;
  --c-emerald: #34d3b4;
  --c-emerald-soft: #102b28;
  --c-amber: #f0a44a;
  --c-violet: #a882ff;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .5);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(76, 157, 255, .35);

  color-scheme: dark;
}

/* Category accents, theme-aware. The `-ink` values are the small-caps pill
   label colours and must clear 4.5:1 against their own 14-16% tint; the base
   values are used for chart marks and mini-thumbnails.
   NOTE: dark overrides MUST repeat the `:root` prefix — `:root` and
   `[data-theme="dark"]` have equal specificity (0,1,0), so without it the light
   palette wins in dark mode regardless of order. */
:root {
  --cat-wild: #0f766e;
  --cat-wild-ink: #0b5f59;
  --cat-care: #0066cc;
  --cat-care-ink: #0060c0;
  --cat-supplies: #9a3412;
  --cat-supplies-ink: #8f2f10;
  --cat-birds: #7c3aed;
  --cat-birds-ink: #6b24d6;
}
:root[data-theme="dark"] {
  --cat-wild: #34d3b4;
  --cat-wild-ink: #4fe0c3;
  --cat-care: #4c9dff;
  --cat-care-ink: #6cb0ff;
  --cat-supplies: #f0a44a;
  --cat-supplies-ink: #ffbb6b;
  --cat-birds: #c4a8ff;
  --cat-birds-ink: #d3bdff;
}
