/* Design tokens. Every colour, size and radius used on the site is defined here.
   Contrast pairs are verified by tests/data.test.mjs. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  font-stretch: 75% 100%;
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2-variations");
  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;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  font-stretch: 75% 100%;
  src: url("/assets/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  /* Colour */
  --color-bg: #050505;
  --color-surface: #0e1013;
  --color-surface-raised: #15181d;
  --color-text: #ffffff;
  --color-muted: #b7bec9;
  --color-accent: #1688ff;          /* lines, links and accent text on dark */
  --color-accent-strong: #0a63f0;   /* fills behind white text (buttons) */
  --color-accent-strong-hover: #0852c9;
  --color-on-accent: #ffffff;
  --color-focus: #5aa9ff;
  --color-border: rgba(255, 255, 255, 0.16);
  --color-border-strong: rgba(255, 255, 255, 0.72);
  --color-accent-line: rgba(22, 136, 255, 0.6);
  --color-accent-wash: rgba(22, 136, 255, 0.1);
  --color-grid: rgba(255, 255, 255, 0.045);
  --color-danger: #ff8a80;

  /* Type */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --stretch-display: 84%;
  --stretch-body: 100%;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  --text-2xl: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  --text-page: clamp(2.5rem, 1.5rem + 4vw, 4.75rem);
  --text-hero: clamp(3rem, 1.4rem + 6.6vw, 7rem);

  --leading-display: 0.98;
  --leading-heading: 1.12;
  --leading-body: 1.6;
  --measure: 66ch;

  /* Space */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-section: clamp(72px, 10vw, 140px);

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 30px;
  --radius-pill: 999px;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-height: 68px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration-fast: 160ms;
}
