/* TopSchoolHub design tokens · based on concept B "Scoreboard" (approved 2026-11-29).
   Light theme only (MVP). All components read these custom properties; the theme (task 5.1)
   copies this file as-is. Breakpoints cannot be custom properties — see README.md. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* ---- Colour: neutrals ---- */
  --c-bg: #ffffff;          /* page */
  --c-surface: #f7f9fc;     /* table heads, map placeholder */
  --c-soft: #eef3fb;        /* stat tiles, tags, feature chips */
  --c-ink: #14213d;         /* body text, headings — 16.0:1 on white */
  --c-ink-2: #39445a;       /* secondary text, descriptions — 9.8:1 */
  --c-muted: #5a6478;       /* meta, captions — 6.0:1 (5.3:1 on --c-soft) */
  --c-line: #dfe5ee;        /* hairlines, card borders */
  --c-line-strong: #c3cddc; /* inputs, hover borders */

  /* ---- Colour: brand ---- */
  --c-brand: #0b3d91;       /* header band, link hover — 10.0:1 */
  --c-brand-2: #1554c0;     /* links, primary buttons — 6.9:1 */
  --c-brand-soft: #e4ecfa;  /* selected chip bg */
  --c-on-brand: #ffffff;
  --c-on-brand-muted: #d6e2f7; /* text on --c-brand — 7.7:1 */
  --c-mint: #5fe0a0;        /* wordmark top bar, decorative only */

  /* ---- Colour: score tiers (white text on all — ≥ 4.5:1) ---- */
  --c-score-excellent: #0e7a41; /* 9.0–10  · 5.4:1 */
  --c-score-great: #3a7d2c;     /* 8.0–8.9 · 5.1:1 */
  --c-score-good: #6b6a12;      /* 7.0–7.9 · 5.7:1 */
  --c-score-fair: #5a6478;      /* < 7.0   · 6.0:1 */
  --c-score-track: #e6ebf3;     /* rating bar background */

  /* ---- Colour: status ---- */
  --c-success: #13804a;     /* icons, fills, white text on it 5.0:1 */
  --c-success-ink: #0e6a3c; /* text on --c-success-bg — 6.0:1 */
  --c-success-bg: #e3f4ea;
  --c-warning: #9a5b00;     /* stars, "busy season" notes — 5.4:1 (4.9:1 on warning-bg) */
  --c-warning-bg: #fdf1dc;
  --c-danger: #b42318;
  --c-danger-bg: #fdecea;
  --c-focus: #f2a900;       /* focus ring, never removed */

  /* ---- Colour: footer ---- */
  --c-footer-bg: #0d1b33;
  --c-footer-text: #b8c3d6; /* 9.7:1 on footer bg */

  /* ---- Typography ---- */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: var(--font-sans); /* tabular figures via font-variant-numeric */

  --fs-xs: 0.75rem;    /* 12 — table heads, overlines, month cells */
  --fs-sm: 0.8125rem;  /* 13 — meta, breadcrumbs, captions */
  --fs-base: 0.9375rem;/* 15 — body (mobile & desktop) */
  --fs-md: 1.0625rem;  /* 17 — lead, h3 */
  --fs-lg: 1.25rem;    /* 20 — card titles on home */
  --fs-h2: clamp(1.25rem, 1rem + 1.2vw, 1.625rem);  /* 20 → 26 */
  --fs-h1: clamp(1.625rem, 1.1rem + 2.6vw, 2.5rem); /* 26 → 40 */
  --fs-display: clamp(1.875rem, 1.2rem + 3.4vw, 3rem); /* 30 → 48, home hero */

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-heavy: 800;

  --lh-tight: 1.2;
  --lh-heading: 1.25;
  --lh-body: 1.55;
  --ls-heading: -0.01em;
  --ls-caps: 0.05em;

  /* ---- Spacing (4 px grid) ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;

  /* ---- Radii ---- */
  --r-xs: 4px;   /* tags, month cells */
  --r-sm: 6px;   /* buttons, score badge, chips */
  --r-md: 8px;   /* cards, boxes, tables */
  --r-lg: 12px;  /* search panel, large badge */
  --r-pill: 999px;

  /* ---- Elevation ---- */
  --sh-1: 0 1px 2px rgba(20, 33, 61, 0.06);
  --sh-2: 0 2px 10px rgba(21, 84, 192, 0.1);   /* card hover */
  --sh-3: 0 8px 28px rgba(20, 33, 61, 0.16);   /* search panel, mega-menu */

  /* ---- Layout ---- */
  --w-max: 1200px;
  --w-prose: 760px;
  --w-aside: 320px;
  --gutter: 16px;
  --header-h: 58px;

  /* ---- Motion ---- */
  --t-fast: 120ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms linear; }
}
