/*
  Dungle design tokens – "speels modern" (eerste versie, fase 2a).
  Eén bron voor startpagina, playtest, Studio, mobiele app en (afgeleid) de pdf's.
  Bron: src/Dungle.UI/wwwroot/css/tokens.css (design/tokens.css is de kopie van het prototype).

  Regels:
  - Componenten gebruiken enkel de "rol"-tokens (--color-surface, --color-text, ...), nooit de palet-tokens rechtstreeks.
  - Tekstkleuren halen minstens WCAG AA (4,5:1) op hun ondergrond; zie styleguide.html.
  - Lettertypes worden in het product zelf gehost (geen Google Fonts-CDN, GDPR): ../fonts, variabele woff2 (latin),
    SIL Open Font License 1.1 (OFL-Fredoka.txt, OFL-Nunito.txt). Bron: fontsource.
*/

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Palet (vaste kleuren) ---------- */
  --palette-violet-50: #F3F1FF;
  --palette-violet-100: #E4E1FA;
  --palette-violet-300: #A29BFE;
  --palette-violet-500: #6C5CE7;
  --palette-violet-700: #4B3BC4;
  --palette-violet-900: #2A2170;

  --palette-coral-100: #FFE5E0;
  --palette-coral-400: #FF7A59;
  --palette-coral-700: #A8361E;

  --palette-mint-100: #D9F7EF;
  --palette-mint-400: #2EC4A6;
  --palette-mint-700: #0F7A62;

  --palette-sun-100: #FFF3CC;
  --palette-sun-400: #FFC93C;
  --palette-sun-800: #7A5300;

  --palette-ink-900: #1F2340;
  --palette-ink-700: #3A3F66;
  --palette-ink-500: #62668A; /* minstens 4,5:1 op violet-50 en cloud-100 (Lighthouse, 28/11/2026) */
  --palette-slate-500: #5B5F97;
  --palette-slate-700: #3F4378;

  --palette-cloud-0: #FFFFFF;
  --palette-cloud-50: #F7F8FC;
  --palette-cloud-100: #EEF1FA;
  --palette-cloud-200: #DDE2F0;

  --palette-night-950: #12142A;
  --palette-night-900: #191C38;
  --palette-night-800: #23274A;
  --palette-night-700: #30355E;

  /* ---------- Rollen: licht thema ---------- */
  --color-page: var(--palette-cloud-50);
  --color-surface: var(--palette-cloud-0);
  --color-surface-muted: var(--palette-violet-50);
  --color-border: var(--palette-cloud-200);

  --color-text: var(--palette-ink-900);
  --color-text-muted: var(--palette-ink-500);
  --color-heading: var(--palette-violet-700);

  --color-primary: var(--palette-violet-500);
  --color-primary-hover: var(--palette-violet-700);
  --color-on-primary: var(--palette-cloud-0);
  --color-focus: var(--palette-sun-400);

  --color-badge-background: var(--palette-sun-100);
  --color-badge-text: var(--palette-sun-800);

  /* Kaart */
  --color-floor: var(--palette-cloud-100);
  --color-wall: var(--palette-slate-500);
  --color-chest: var(--palette-coral-400);
  --color-monster: var(--palette-violet-500);
  --color-treasure: var(--palette-sun-400);
  --color-decor: var(--palette-mint-400);
  /* Iconen hebben een inktrand; op een donkere ondergrond krijgen ze een lichte "sticker"-rand. */
  --icon-halo: drop-shadow(0 0 0 transparent);

  /* Deductierooster: kleur + vorm (✗ ✓ ?), nooit kleur alleen */
  --color-mark-no-background: var(--palette-coral-100);
  --color-mark-no-text: var(--palette-coral-700);
  --color-mark-yes-background: var(--palette-mint-100);
  --color-mark-yes-text: var(--palette-mint-700);
  --color-mark-maybe-background: var(--palette-sun-100);
  --color-mark-maybe-text: var(--palette-sun-800);
  --color-mark-empty-background: var(--palette-cloud-100);

  --color-success: var(--palette-mint-700);
  --color-danger: var(--palette-coral-700);

  /* ---------- Typografie ---------- */
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-size-small: 0.875rem;
  --font-size-body: 1rem;
  --font-size-large: 1.125rem;
  --font-size-title: 1.5rem;
  --font-size-hero: clamp(2.25rem, 6vw, 3.75rem);
  --line-height-body: 1.6;

  /* ---------- Vorm en ruimte ---------- */
  --radius-small: 10px;
  --radius-medium: 14px;
  --radius-large: 20px;
  --radius-pill: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --shadow-soft: 0 1px 2px rgba(31, 35, 64, 0.06), 0 6px 18px rgba(31, 35, 64, 0.08);
  --touch-target: 44px;

  /* ---------- Beweging ---------- */
  --motion-fast: 120ms;
  --motion-base: 220ms;
  --motion-playful: 420ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Rollen: donker thema (handmatig gekozen of volgens het systeem) ---------- */
:root[data-theme="dark"] {
  --color-page: var(--palette-night-950);
  --color-surface: var(--palette-night-900);
  --color-surface-muted: var(--palette-night-800);
  --color-border: var(--palette-night-700);

  --color-text: #F4F5FF;
  --color-text-muted: #B4B8D6;
  --color-heading: var(--palette-violet-300);

  --color-primary: var(--palette-violet-300);
  --color-primary-hover: #C3BEFF;
  --color-on-primary: var(--palette-night-950);

  --color-badge-background: #3D3214;
  --color-badge-text: #FFD970;

  --color-floor: var(--palette-night-800);
  --color-wall: #7A80C4;
  --icon-halo: drop-shadow(0 0 1px #F4F5FF) drop-shadow(0 0 1px #F4F5FF);

  --color-mark-no-background: #4A2420;
  --color-mark-no-text: #FFB3A1;
  --color-mark-yes-background: #12392F;
  --color-mark-yes-text: #7FE6CC;
  --color-mark-maybe-background: #3D3214;
  --color-mark-maybe-text: #FFD970;
  --color-mark-empty-background: var(--palette-night-800);

  --color-success: #7FE6CC;
  --color-danger: #FFB3A1;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-page: var(--palette-night-950);
    --color-surface: var(--palette-night-900);
    --color-surface-muted: var(--palette-night-800);
    --color-border: var(--palette-night-700);
    --color-text: #F4F5FF;
    --color-text-muted: #B4B8D6;
    --color-heading: var(--palette-violet-300);
    --color-primary: var(--palette-violet-300);
    --color-primary-hover: #C3BEFF;
    --color-on-primary: var(--palette-night-950);
    --color-badge-background: #3D3214;
    --color-badge-text: #FFD970;
    --color-floor: var(--palette-night-800);
    --color-wall: #7A80C4;
    --icon-halo: drop-shadow(0 0 1px #F4F5FF) drop-shadow(0 0 1px #F4F5FF);
    --color-mark-no-background: #4A2420;
    --color-mark-no-text: #FFB3A1;
    --color-mark-yes-background: #12392F;
    --color-mark-yes-text: #7FE6CC;
    --color-mark-maybe-background: #3D3214;
    --color-mark-maybe-text: #FFD970;
    --color-mark-empty-background: var(--palette-night-800);
    --color-success: #7FE6CC;
    --color-danger: #FFB3A1;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-base: 0ms;
    --motion-playful: 0ms;
  }
}
