/* Claru design tokens: the one place the fonts, colours, sizes and spacing live (help site blueprint, step 1).
   Loaded before site.css by the main site, the Studio pages and the help site, so a value is never typed twice.
   Dark is the default; :root[data-theme="light"] is the light palette (Studio and the help site switch it on).
   Rules for the values are in site.css's header and docs/plans/website_visual_unification_plan.md. */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../fonts/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2'), url('../fonts/AtkinsonHyperlegibleNext-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Bold is only used inside Easy Read samples (hard word + meaning, as in the PDF). */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'), url('../fonts/AtkinsonHyperlegibleNext-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;          /* dark scrollbars, date picker and tick boxes to match the page */
  --bg: #131217;
  --surface: #1F1B33;          /* colour fields, panels */
  --text: #ECEAF2;             /* 15.6:1 on --bg */
  --link: #a996ff;             /* claru-primary-light, 7.6:1 on --bg */
  --link-hover: #c9bdff;
  --brand: #7A5EFF;            /* claru-primary: shapes only (bands, bars, outlines) — 4.3:1 with white, never behind text */
  --focus: #2EE6D6;            /* claru-teal */
  /* Accent colours: the brand palette, used only in shapes (bars, outlines), never behind or as text, and never as the only clue.  Each is at least 4.3:1 against --bg (needs 3:1 for shapes, WCAG 1.4.11).  Claru blue #4A3FFF is left out: 3.1:1 is too close. */
  --accent-1: #7A5EFF; --accent-2: #2EE6D6; --accent-3: #FFD93D; --accent-4: #FF5E78; --accent-5: #4DFF73; --accent-6: #D44FFF;
  --line: #2E2B38;
  --line-strong: #8A859A;
  --paper: #fff;               /* Easy Read page samples */
  --ink: #000;
  --btn-bg: #a996ff;
  --btn-text: #131217;         /* 7.6:1 on --btn-bg */
  --btn-hover: #c9bdff;

  --size-body: 1.125rem;       /* 18px */
  --size-h3: 1.25rem;          /* 20px: sub-headings; the fourth and last text size (plan: docs/plans/website_visual_unification_plan.md) */
  --size-h2: 1.5rem;           /* 24px */
  --size-h1: 2.75rem;          /* 44px */
  --measure: 42rem;            /* reading width */
  --page: 72rem;
  --gutter: 40px;
  /* Vertical rhythm (Calum 2026-11-03: more space between sections, chosen carefully).  Only the gaps BETWEEN things grow;
     paragraphs, lists, table cells and form fields keep their spacing, so text still reads as one block.
     Hierarchy: section > sub-heading > paragraph.  Big gaps are 7rem; sub-headings stay at 3rem. */
  --space-section: 7rem;       /* between major sections (was 80px) */
  --space-hero: 6rem;          /* between the page header and the first section (was 80px) */
  --space-heading: 2.5rem;     /* below a section heading, before its first line (was 2rem) */
  --space-sub: 3rem;           /* above a sub-heading inside a section (unchanged: short sub-sections stay together) */
  --space-end: 8rem;           /* last section to the footer (was 96px) */
}

/* Phone: smaller gutter and heading, and the gaps between sections about two thirds. */
@media (max-width: 640px) {
  :root { --gutter: 16px; --size-h1: 2.25rem; }
  :root { --space-section: 4.5rem; --space-hero: 3.5rem; --space-heading: 2rem; --space-sub: 3rem; --space-end: 5rem; }
}

/* Light mode (the page default is dark, from site.css).  Same shapes; only the colours change.  Pairs checked by the browser check (axe). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FAFAF7; --surface: #FFFFFF; --text: #17171A; --link: #4A2FC0; --link-hover: #3E2A99;
  --line: #DEDCD4; --line-strong: #6B6878; --btn-bg: #5A3FD6; --btn-text: #FFFFFF; --btn-hover: #3E2A99; --focus: #5A3FD6;
}

:root { --acc-1: #7A5EFF; --acc-2: #2EE6D6; --acc-3: #FFD93D; --acc-4: #FF5E78; }
:root[data-theme="light"] { --acc-2: #0FA39A; --acc-3: #C99A00; --acc-4: #E0405C; }   /* shapes need 3:1 on the light ground */
