/* tokens.css — Design-Tokens (Struktur, NICHT über CMS editierbar)
   Palette: sachlich-institutionell (Teal/Beige), angelehnt an Behörden- und
   Dossier-Kontext. Keine externen Webfonts: reine System-Font-Stacks. */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f7f6f2;
  --color-surface: #f9f8f5;
  --color-surface-2: #fbfbf9;
  --color-surface-offset: #f3f0ec;
  --color-surface-offset-2: #edeae5;
  --color-divider: #dcd9d5;
  --color-border: #d4d1ca;

  /* Text */
  --color-text: #24221c;
  --color-text-muted: #6b6a65;
  --color-text-faint: #a9a8a2;
  --color-text-inverse: #f9f8f4;

  /* Primary accent (Teal) */
  --color-primary: #01696f;
  --color-primary-hover: #0c4e54;
  --color-primary-active: #0f3638;
  --color-primary-highlight: #cedcd8;

  /* Warning (Amber/Ocher — used for Nachtzeitfenster) */
  --color-warning: #a1650a;
  --color-warning-highlight: #ecdcc2;

  /* Error / Alert (Maroon — used for Nacht-Ereignisse) */
  --color-error: #a12c7b;
  --color-error-highlight: #e6d3e0;

  /* Success (used sparingly, e.g. Bestätigungsstatus) */
  --color-success: #437a22;
  --color-success-highlight: #dbe6d1;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(30, 28, 20, 0.06);
  --shadow-md: 0 4px 14px rgba(30, 28, 20, 0.08);
  --shadow-lg: 0 14px 36px rgba(30, 28, 20, 0.14);

  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 880px;
  --content-wide: 1200px;

  /* Systemschriften — keine externen Webfonts/CDNs */
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Georgia', 'Times New Roman', serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
}

[data-theme='dark'] {
  --color-bg: #171613;
  --color-surface: #1c1b18;
  --color-surface-2: #201f1c;
  --color-surface-offset: #1d1c19;
  --color-surface-offset-2: #23221e;
  --color-divider: #2a2925;
  --color-border: #3a3934;

  --color-text: #d6d4cd;
  --color-text-muted: #928f87;
  --color-text-faint: #625f58;
  --color-text-inverse: #201f1c;

  --color-primary: #57a3ad;
  --color-primary-hover: #78bcc4;
  --color-primary-active: #9ad2d8;
  --color-primary-highlight: #29393b;

  --color-warning: #d19a4c;
  --color-warning-highlight: #4a3c26;

  --color-error: #d878b3;
  --color-error-highlight: #47303e;

  --color-success: #85b768;
  --color-success-highlight: #2f3b26;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-bg: #171613;
    --color-surface: #1c1b18;
    --color-surface-2: #201f1c;
    --color-surface-offset: #1d1c19;
    --color-surface-offset-2: #23221e;
    --color-divider: #2a2925;
    --color-border: #3a3934;
    --color-text: #d6d4cd;
    --color-text-muted: #928f87;
    --color-text-faint: #625f58;
    --color-text-inverse: #201f1c;
    --color-primary: #57a3ad;
    --color-primary-hover: #78bcc4;
    --color-primary-active: #9ad2d8;
    --color-primary-highlight: #29393b;
    --color-warning: #d19a4c;
    --color-warning-highlight: #4a3c26;
    --color-error: #d878b3;
    --color-error-highlight: #47303e;
    --color-success: #85b768;
    --color-success-highlight: #2f3b26;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.45);
  }
}

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.83rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem);
  --text-2xl: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}
