/*
 * Maat Software - designtokens (CONCEPT-huisstijl, goedkeuring Jan nodig).
 * Eén bron voor kleur, typografie, ruimte en vorm. Zie docs/huisstijl/huisstijl.md.
 * Contrastwaarden worden gecontroleerd door tests/MaatSoftware.Web.Tests/DesignTokenTests.cs.
 */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url("../fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/ibm-plex-sans-latin-wght-normal.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;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.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 dark;

  /* Kleur - lichte modus */
  --color-bg: #F5F7F8;            /* pagina-achtergrond, koel gebroken wit */
  --color-surface: #FCFDFD;       /* kaarten, panelen, invoervelden */
  --color-sunken: #E9EEF0;        /* afwisselende secties, verzonken vlakken */
  --color-text: #0F1F24;          /* lopende tekst en koppen */
  --color-text-muted: #46565C;    /* ondersteunende tekst */
  --color-base: #0E3B47;          /* diepe basistint: merk, primaire knop, links */
  --color-base-hover: #0A2C35;
  --color-on-base: #F5F7F8;       /* tekst op de basistint */
  --color-accent: #D9531A;        /* signaalaccent: verbindingen, focus, accentlijnen (geen lopende tekst) */
  --color-accent-text: #A93D0C;   /* accent als kleine tekst (eyebrows, labels) */
  --color-line: #C9D3D7;          /* decoratieve scheidingslijnen */
  --color-line-strong: #7A8A90;   /* randen van invoervelden en knoppen (UI, >= 3:1) */
  --color-error: #B3261E;
  --color-error-bg: #FBECEA;
  --color-success: #1E6B3A;
  --color-success-bg: #E5F2E9;
  --color-notice-bg: #FCEFE6;
  --color-focus: var(--color-accent);

  /* Typografie */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --text-h3: 1.1875rem;
  --text-h2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --text-h1: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  --leading-body: 1.6;
  --leading-heading: 1.15;
  --measure: 65ch;

  /* Ruimte (4px-raster) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --container: 74rem;
  --gutter: clamp(1rem, 0.6rem + 1.6vw, 2rem);

  /* Vorm: knoppen en velden 6px, kaarten en panelen 14px */
  --radius-sm: 6px;
  --radius-lg: 14px;
  --border-width: 1px;
  --focus-width: 3px;

  /* Beweging */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-reveal: 600ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Kleur - donkere modus */
    --color-bg: #0C1518;
    --color-surface: #122126;
    --color-sunken: #18292F;
    --color-text: #E4ECEE;
    --color-text-muted: #A3B4B9;
    --color-base: #8DCAD6;
    --color-base-hover: #A9D9E2;
    --color-on-base: #0C1518;
    --color-accent: #F27A3E;
    --color-accent-text: #F59866;
    --color-line: #2A3D44;
    --color-line-strong: #6D8189;
    --color-error: #F2958C;
    --color-error-bg: #2F1A19;
    --color-success: #8FD3A6;
    --color-success-bg: #142A1D;
    --color-notice-bg: #2B1E16;
  }
}
