/* ==========================================================================
   Siedepunkt-Rechner — Design Tokens ("Ember & Altitude")
   Warmes Glutorange (Sieden) + kühles Höhenblau (Berge) auf Schiefer-Neutralen.
   ========================================================================== */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f4f7f9;
  --color-surface: #ffffff;
  --color-surface-2: #eef2f5;
  --color-surface-offset: #e4e9ed;
  --color-surface-offset-2: #d9e0e5;
  --color-surface-dynamic: #cdd6dc;
  --color-divider: #dde3e7;
  --color-border: #d2d9de;

  /* Text */
  --color-text: #182027;
  --color-text-muted: #5a6670;
  --color-text-faint: #98a2aa;
  --color-text-inverse: #f7f9fa;

  /* Primary Accent — Ember (Sieden/Hitze) */
  --color-primary: #d9531f;
  --color-primary-hover: #b6431a;
  --color-primary-active: #8f3414;
  --color-primary-highlight: #fbe0d2;

  /* Secondary — Altitude (Höhe/Kälte), used sparingly for data viz */
  --color-altitude: #1c6e96;
  --color-altitude-hover: #155776;
  --color-altitude-active: #0f4058;
  --color-altitude-highlight: #d3e6ee;

  /* Semantic */
  --color-warning: #96591c;
  --color-warning-highlight: #f0ddc6;
  --color-error: #a12c46;
  --color-error-hover: #7d2137;
  --color-error-highlight: #f0d6dd;
  --color-success: #3f7a3a;
  --color-success-highlight: #d8e6d4;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — cool slate tint */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 235 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 235 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 235 / 0.16);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1180px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

[data-theme='dark'] {
  --color-bg: #10151a;
  --color-surface: #171d23;
  --color-surface-2: #1c2329;
  --color-surface-offset: #212930;
  --color-surface-offset-2: #283138;
  --color-surface-dynamic: #313b43;
  --color-divider: #232b31;
  --color-border: #2f3841;

  --color-text: #e4e9ec;
  --color-text-muted: #93a0aa;
  --color-text-faint: #5b6670;
  --color-text-inverse: #12171b;

  --color-primary: #ff8452;
  --color-primary-hover: #ff9a6d;
  --color-primary-active: #ffb08c;
  --color-primary-highlight: #3a2a20;

  --color-altitude: #6bb6dc;
  --color-altitude-hover: #8ec8e5;
  --color-altitude-active: #accfe6;
  --color-altitude-highlight: #1e333d;

  --color-warning: #d99a55;
  --color-warning-highlight: #3d3222;
  --color-error: #e2708c;
  --color-error-hover: #ea94a9;
  --color-error-highlight: #3a2530;
  --color-success: #8fc789;
  --color-success-highlight: #253524;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #10151a;
    --color-surface: #171d23;
    --color-surface-2: #1c2329;
    --color-surface-offset: #212930;
    --color-surface-offset-2: #283138;
    --color-surface-dynamic: #313b43;
    --color-divider: #232b31;
    --color-border: #2f3841;
    --color-text: #e4e9ec;
    --color-text-muted: #93a0aa;
    --color-text-faint: #5b6670;
    --color-text-inverse: #12171b;
    --color-primary: #ff8452;
    --color-primary-hover: #ff9a6d;
    --color-primary-active: #ffb08c;
    --color-primary-highlight: #3a2a20;
    --color-altitude: #6bb6dc;
    --color-altitude-hover: #8ec8e5;
    --color-altitude-active: #accfe6;
    --color-altitude-highlight: #1e333d;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
  }
}

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-hero: clamp(2.5rem, 1rem + 3.5vw, 4.25rem);

  /* Spacing (4px base) */
  --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;
  --space-32: 8rem;
}
