/* ==========================================================================
   Design tokens
   Eén bron van waarheid. Alles in components.css en de Tailwind-config
   verwijst naar deze variabelen, zodat je later 1-op-1 kunt omzetten
   (CSS vars, Tailwind theme, Style Dictionary, etc.).
   ========================================================================== */

:root {
  /* --- Typografie ------------------------------------------------------- */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --text-2xs: 11px;  --lh-2xs: 16px;
  --text-xs:  12px;  --lh-xs:  16px;
  --text-sm:  13px;  --lh-sm:  20px;
  --text-base:14px;  --lh-base:22px;
  --text-md:  16px;  --lh-md:  24px;
  --text-lg:  18px;  --lh-lg:  26px;
  --text-xl:  22px;  --lh-xl:  30px;
  --text-2xl: 28px;  --lh-2xl: 34px;
  --text-3xl: 36px;  --lh-3xl: 42px;
  --text-4xl: 48px;  --lh-4xl: 52px;

  --tracking-tight: -0.02em;
  --tracking-snug:  -0.01em;
  --tracking-caps:   0.06em;

  /* --- Neutrals (licht, licht-warm grijs) ------------------------------ */
  --gray-0:   #FFFFFF;
  --gray-25:  #FCFCFB;
  --gray-50:  #F9F9F8;
  --gray-100: #F4F4F2;
  --gray-150: #EEEEEC;
  --gray-200: #E6E6E3;
  --gray-300: #D3D3CF;
  --gray-400: #A4A4A0;
  --gray-500: #7C7C78;
  --gray-600: #5E5E5A;
  --gray-700: #3F3F3C;
  --gray-800: #262624;
  --gray-900: #171716;
  --gray-950: #0E0E0D;

  /* --- Semantisch ------------------------------------------------------- */
  --bg:            var(--gray-50);    /* app-canvas: bijna wit */
  --surface:       var(--gray-0);     /* kaarten, panelen */
  --surface-2:     var(--gray-0);     /* rail + sidebar: wit */
  --surface-sunken:var(--gray-50);    /* stat-blokken, inputs */
  --surface-hover: var(--gray-100);
  --surface-active:var(--gray-150);
  --border:        var(--gray-150);
  --border-strong: var(--gray-200);

  --fg:            var(--gray-950);
  --fg-muted:      var(--gray-600);
  --fg-subtle:     var(--gray-400);
  --fg-inverse:    var(--gray-0);

  --primary:       var(--gray-950);
  --primary-hover: var(--gray-800);
  --primary-fg:    var(--gray-0);

  /* Accent is bewust neutraal: de interface is vrijwel monochroom.
     Kleur komt alleen terug als statusstip en bij fouten. */
  --accent:        var(--gray-900);
  --accent-hover:  var(--gray-800);
  --accent-soft:   var(--gray-100);
  --accent-fg:     var(--gray-900);
  --accent-rgb:    23, 23, 22;        /* voor schaduwen/rings met alpha */
  --accent-gradient: linear-gradient(180deg, #2E2E2C 0%, #0E0E0D 100%);
  --hero-gradient:   linear-gradient(135deg, #FFFFFF 0%, #F4F4F2 100%);

  /* Highlight: het énige kleuraccent. Spaarzaam gebruiken: Pro-tag,
     grafieklijn, ongelezen-stipjes, workspace-logo. Nooit voor knoppen. */
  --highlight:      #1D5C43;
  --highlight-soft: #E9F2ED;
  --highlight-fg:   #17503A;

  /* Fases op de tijdlijn (gedempt, alleen voor balken en statusstippen) */
  --ph-wv:   #C08A3E;
  --ph-prod: #4167D6;
  --ph-mont: #2F8A5F;

  /* Tag (zoals "Eigenaar", "Gast"): grijs vlak, kleine afronding */
  --tag-bg:        var(--gray-100);
  --tag-fg:        var(--gray-700);

  --success:       #1F8A4C;  --success-soft: #EBF6EF;  --success-fg: #17703C;
  --warning:       #D97706;  --warning-soft: #FFF5E3;  --warning-fg: #9A5404;
  --danger:        #E5484D;  --danger-soft:  #FDEEEE;  --danger-fg:  #B4282D;
  --info:          #3B82F6;  --info-soft:    #EEF4FE;  --info-fg:    #1D5BC4;

  /* --- Workspace-logo's: lichte tegel met een zachte kleurvlek ---------- */
  --ws-forest: #2F8A5F;
  --ws-amber:  #EE9A3F;
  --ws-blue:   #4D7CF3;
  --ws-black:  var(--gray-900);

  /* --- Spacing (4px grid) ---------------------------------------------- */
  --space-0: 0;     --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;  --space-8: 32px;
  --space-10: 40px; --space-12: 48px; --space-16: 64px;

  /* --- Radius ----------------------------------------------------------- */
  --radius-xs:  6px;
  --radius-sm:  8px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  18px;
  --radius-2xl: 24px;
  --radius-full: 999px;

  /* --- Schaduw ---------------------------------------------------------
     Gelaagd: een haarfijne rand (0 0 0 1px), een korte contactschaduw en
     een brede, zeer zachte ambient. Kaarten hebben géén CSS-border; de
     eerste laag is de rand, zodat schaduw en rand altijd samen kloppen. */
  --shadow-xs:   0 0 0 1px rgba(14, 20, 17, .05), 0 1px 1px rgba(14, 20, 17, .03);
  --shadow-sm:   0 0 0 1px rgba(14, 20, 17, .05), 0 1px 2px rgba(14, 20, 17, .03);
  --shadow-card: 0 0 0 1px rgba(14, 20, 17, .045), 0 1px 2px rgba(14, 20, 17, .025), 0 4px 8px -2px rgba(14, 20, 17, .02), 0 16px 32px -16px rgba(14, 20, 17, .06);
  --shadow-md:   0 0 0 1px rgba(14, 20, 17, .055), 0 2px 4px rgba(14, 20, 17, .03), 0 12px 24px -8px rgba(14, 20, 17, .07), 0 24px 48px -24px rgba(14, 20, 17, .08);
  --shadow-lg:   0 0 0 1px rgba(14, 20, 17, .06), 0 4px 8px -2px rgba(14, 20, 17, .04), 0 20px 40px -12px rgba(14, 20, 17, .12);
  --shadow-xl:   0 0 0 1px rgba(14, 20, 17, .06), 0 8px 16px -4px rgba(14, 20, 17, .05), 0 32px 64px -16px rgba(14, 20, 17, .18);
  --ring:        0 0 0 3px rgba(var(--accent-rgb), .08);
  --ring-danger: 0 0 0 3px rgba(229, 72, 77, .14);
  --ring-field:  0 0 0 4px rgba(14, 20, 17, .05);   /* zachte halo om een gefocust veld */

  /* --- Motion ----------------------------------------------------------- */
  --ease-out:    cubic-bezier(.22, 1, .36, 1);     /* standaard: snel in, zacht uit */
  --ease-in:     cubic-bezier(.55, 0, 1, .45);     /* elementen die weggaan */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);     /* verplaatsen op het scherm */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);  /* kleine overshoot: toggles, checks */

  --dur-instant: 80ms;   /* hover kleur, press */
  --dur-fast:    140ms;  /* tooltips, kleine state changes */
  --dur-base:    220ms;  /* dropdowns, tabs, toggles */
  --dur-slow:    360ms;  /* panelen, modals, module-wissel */
  --dur-slower:  560ms;  /* grafieken, progress, hero */
  --stagger:     35ms;   /* vertraging per item in een lijst */

  /* --- Layout ----------------------------------------------------------- */
  --rail-w:    68px;
  --sidebar-w: 256px;
  --topbar-h:  60px;
  --content-max: 1240px;

  /* --- Z-index ---------------------------------------------------------- */
  --z-sticky: 10; --z-dropdown: 40; --z-overlay: 60; --z-modal: 70; --z-toast: 80; --z-tooltip: 90;

  color-scheme: light;
}


@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant: 0ms; --dur-fast: 0ms; --dur-base: 0ms;
    --dur-slow: 0ms; --dur-slower: 0ms; --stagger: 0ms;
  }
}
