/* WR site design tokens, v1.0 (2026-11-29)
   Palette C as locked in brand round 2 (see BRAND_PALETTE.md). Fonts self-hosted, SIL Open Font License (fonts/OFL-*.txt).
   Dark mode: follows the OS (prefers-color-scheme) unless the page sets data-theme="light" or data-theme="dark" on <html>.
   Tokens only: no element styling here. The website build uses the semantic tokens (--color-*, --font-*, --step-*),
   not the raw palette (--wr-*), so a palette change happens in one place. */

/* ---------- fonts (paths relative to this file) ---------- */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* ---------- raw palette (do not use directly in components) ---------- */
  --wr-aubergine: #382540;
  --wr-lilac: #7B4597;
  --wr-text: #1F1824;
  --wr-bg: #F9F8FA;
  --wr-surface: #EFEBF2;
  --wr-muted: #615A69;
  --wr-border: #DDD6E3;
  --wr-dark: #1B1420;
  --wr-dark-surface: #271D2E;
  --wr-dark-border: #3A2E43;
  --wr-text-on-dark: #F3F0F6;
  --wr-muted-on-dark: #B3AABB;
  --wr-head-on-dark: #E9E1F0;
  --wr-lilac-on-dark: #CDA8E3;

  /* ---------- semantic colours: light (default) ---------- */
  color-scheme: light dark;
  --color-bg: var(--wr-bg);
  --color-surface: var(--wr-surface);
  --color-text: var(--wr-text);
  --color-muted: var(--wr-muted);
  --color-heading: var(--wr-aubergine);
  --color-border: var(--wr-border);
  --color-link: var(--wr-lilac);
  --color-accent: var(--wr-lilac);
  --color-btn-bg: var(--wr-aubergine);
  --color-btn-text: #FFFFFF;
  --color-btn2-bg: var(--wr-lilac);
  --color-btn2-text: #FFFFFF;
  --color-focus: var(--wr-lilac);
  --logo-letters: var(--wr-aubergine);
  --logo-bar: var(--wr-lilac);

  /* ---------- type ---------- */
  --font-heading: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --weight-body: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-heading: 700;
  /* fluid scale, 360px to 1200px viewport */
  --step--1: 0.875rem;                                               /* small print, captions: 14px */
  --step-0: clamp(1rem, 0.9732rem + 0.1190vw, 1.0625rem);            /* body: 16 to 17px */
  --step-1: clamp(1.1875rem, 1.1339rem + 0.2381vw, 1.3125rem);       /* h4, lead text: 19 to 21px */
  --step-2: clamp(1.375rem, 1.2679rem + 0.4762vw, 1.625rem);         /* h3: 22 to 26px */
  --step-3: clamp(1.625rem, 1.4643rem + 0.7143vw, 2rem);             /* h2: 26 to 32px */
  --step-4: clamp(1.875rem, 1.6071rem + 1.1905vw, 2.5rem);           /* h1: 30 to 40px */
  --step-5: clamp(2.25rem, 1.9286rem + 1.4286vw, 3rem);              /* hero only: 36 to 48px */
  --leading-body: 1.6;
  --leading-heading: 1.15;
  --tracking-heading: -0.01em;
  --measure: 68ch;                                                   /* max line length for body text */

  /* ---------- spacing (4px base) ---------- */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16: also the phone side gutter */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --container: 72rem;  /* 1152px content width */

  /* ---------- radius, borders, shadow, focus ---------- */
  --radius-sm: 4px;
  --radius-md: 6px;    /* buttons, inputs */
  --radius-lg: 12px;   /* cards, panels */
  --radius-pill: 999px;
  --border-width: 1px;
  --shadow-1: 0 1px 2px rgb(31 24 36 / 0.06), 0 2px 8px rgb(31 24 36 / 0.06);
  --focus-ring: 0 0 0 3px var(--color-focus);
}

/* ---------- semantic colours: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: var(--wr-dark);
    --color-surface: var(--wr-dark-surface);
    --color-text: var(--wr-text-on-dark);
    --color-muted: var(--wr-muted-on-dark);
    --color-heading: var(--wr-head-on-dark);
    --color-border: var(--wr-dark-border);
    --color-link: var(--wr-lilac-on-dark);
    --color-accent: var(--wr-lilac-on-dark);
    --color-btn-bg: var(--wr-lilac-on-dark);
    --color-btn-text: var(--wr-dark);
    --color-btn2-bg: transparent;
    --color-btn2-text: var(--wr-lilac-on-dark);
    --color-focus: var(--wr-lilac-on-dark);
    --logo-letters: var(--wr-text-on-dark);
    --logo-bar: var(--wr-lilac-on-dark);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: var(--wr-dark);
  --color-surface: var(--wr-dark-surface);
  --color-text: var(--wr-text-on-dark);
  --color-muted: var(--wr-muted-on-dark);
  --color-heading: var(--wr-head-on-dark);
  --color-border: var(--wr-dark-border);
  --color-link: var(--wr-lilac-on-dark);
  --color-accent: var(--wr-lilac-on-dark);
  --color-btn-bg: var(--wr-lilac-on-dark);
  --color-btn-text: var(--wr-dark);
  --color-btn2-bg: transparent;
  --color-btn2-text: var(--wr-lilac-on-dark);
  --color-focus: var(--wr-lilac-on-dark);
  --logo-letters: var(--wr-text-on-dark);
  --logo-bar: var(--wr-lilac-on-dark);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
}
:root[data-theme="light"] { color-scheme: light; }
