/* Design tokens: the one place to change the site's look. See DESIGN-TOKENS.md.
   Primitives first (raw values), then semantic tokens (what a value is for). Pages and
   components use the semantic ones; a primitive is used directly only where no role fits.
   Breakpoints can't be custom properties inside @media: they are 720px (phone) and
   1000px (tablet), written as numbers in the media queries. */
:root {
  /* ── Primitives: colour ── */
  --c-paper: #f6f6f3;
  --c-black: #000;
  --c-white: #fff;
  --c-red: #e0321b;
  --c-green: #27b56c;
  --c-grey: #949492;
  --c-black-06: rgba(0,0,0,.06);
  --c-black-40: rgba(0,0,0,.4);
  --c-black-50: rgba(0,0,0,.5);
  --c-white-20: rgba(255,255,255,.2);
  --c-white-40: rgba(255,255,255,.4);

  /* ── Primitives: type ── */
  --font-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;                        /* subheads over paragraphs */
  --fs-display: clamp(56px, 9.5vw, 120px); /* section-sized numbers, the CTA */
  --fs-heading: 32px;                       /* labels, leads, quotes; 26px on phones */
  --fs-body: 18px;                          /* paragraphs, links, buttons; 16px on phones */
  --fs-note: 16px;                          /* a short note under a CTA, on phones too */
  --fs-small: 14px;                         /* photo credits, small captions */
  --lh-display: .9;
  --lh-heading: 1.1;
  --lh-body: 1.4;
  --lh-small: 1.2;
  --ls-display: -0.06em;
  --ls-heading: -0.05em;
  --underline-offset: 3px;

  /* ── Primitives: space (4px steps) ── */
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-96: 96px;

  /* ── Primitives: lines, corners, layers ── */
  --line: 1px;
  --radius-pill: 999px;
  --radius-card: 16px;
  --z-bar: 5;
  --z-sticky: 40;

  /* ── Primitives: motion ── */
  --dur-hover: 100ms;                        /* a link's fill rising */
  --dur-reveal: .5s;                         /* a note's text rising in */
  --dur-draw: .9s;                           /* an oval drawn round a note */
  --ease-out: cubic-bezier(.22, 1, .36, 1);  /* reveals */
  --ease-draw: cubic-bezier(.55, .05, .35, 1); /* ovals and leader lines drawn */
  --rise: 32px;                              /* how far revealed text rises */

  /* ── Semantic: colour ── */
  --bg: var(--c-paper);
  --text: var(--c-black);
  --text-muted: var(--c-black-40);
  --text-subtle: var(--c-black-50);
  --accent: var(--c-red);                    /* ovals, leader lines, kickers, numbers */
  --rule: var(--c-black);                    /* dividers */
  --link-fill: var(--c-red);                 /* a link's hover plate */
  --link-fill-text: var(--c-white);
  --nav-active: var(--c-red);                /* the case nav's section in view */
  --nav-hover-text: var(--c-red);
  --inverse-bg: var(--c-black);              /* selected switch tab, the CTA */
  --inverse-text: var(--c-paper);
  --media-bg: var(--c-black);                /* behind videos and dark tiles */
  --focus: var(--c-green);

  /* ── Semantic: layout ── */
  --page-max: 1440px;
  --pad: 18px;                               /* page side padding; 16px on phones */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --section-gap: var(--space-96);            /* between sections; 64px on phones */
  --block-gap: var(--space-32);              /* text ↔ picture inside a section */
  --inner-gap: var(--space-24);              /* a section's label ↔ the next block */
  --text-gap: var(--space-16);               /* paragraphs */
  --callout-max: 400px;

  /* ── Aliases kept for the Floorcheck case's older rules ── */
  --paper: var(--bg);
  --ink: var(--text);
  --red: var(--accent);
  --ink-soft: var(--text-muted);
  --night: var(--media-bg);
  --night-soft: var(--c-white-40);
  --green: var(--c-green);
  --tile: var(--c-grey);
  --sans: var(--font-sans);
  --mono: var(--font-mono);

  color-scheme: light;
}
@media (max-width: 720px) {
  :root {
    --fs-heading: 26px;
    --fs-body: 16px;
    --pad: 16px;
    --section-gap: var(--space-64);
  }
}
