/* ==========================================================================
   T.H.G.S. Systems - Design Tokens
   Tech. Highspeed. Growth. Systems. - "Wir gestalten Systeme."
   Kompiliert aus tokens/tokens.json. Nicht manuell divergieren lassen.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600;700&family=Manrope:wght@400;600;700&display=swap');

/* --- Hell-Theme (Basis) -------------------------------------------------- */
:root {
  --surface-page:   #ffffff;
  --surface-card:   #ffffff;
  --surface-sunken: #f3f6fa;
  --border-subtle:  #e2e7f0;

  --ink-900: #101b30;
  --ink-600: #4b5872;
  --ink-400: #8892a6;

  --brand-navy:  #101b30;
  --on-navy:     #ffffff;
  --brand-blue:  #1d6fc4;
  --on-blue:     #ffffff;
  --brand-green: #5fbf3a;
  --on-green:    #0b1526;

  --state-error: #d64545;

  /* Familien: display zeigt Haltung, sans wird gelesen. Nie vermischen. */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-sans:    'Manrope', 'Segoe UI', system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-md:   14px;
  --radius-lg:   24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 27, 48, 0.06), 0 1px 3px rgba(16, 27, 48, 0.08);
  --shadow-md: 0 4px 12px rgba(16, 27, 48, 0.10), 0 2px 4px rgba(16, 27, 48, 0.06);
  --shadow-lg: 0 18px 48px rgba(16, 27, 48, 0.18), 0 6px 12px rgba(16, 27, 48, 0.08);
}

/* --- Dunkel-Theme -------------------------------------------------------- */
/* brand-blue und brand-green werden aufgehellt, damit sie auf dunklem Grund
   denselben visuellen Kontrast liefern. Hell-Werte nie wiederverwenden. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --surface-page:   #0b1526;
    --surface-card:   #101b30;
    --surface-sunken: #0a121f;
    --border-subtle:  #1c2a44;

    --ink-900: #f3f6fa;
    --ink-600: #b7c1d6;
    --ink-400: #7a879f;

    --brand-navy:  #24365c;
    --on-navy:     #ffffff;
    --brand-blue:  #4c93de;
    --on-blue:     #0b1526;
    --brand-green: #7ed957;
    --on-green:    #0b1526;

    --state-error: #ff6b6b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.40), 0 1px 3px rgba(0, 0, 0, 0.30);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55), 0 6px 12px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme='dark'] {
  --surface-page:   #0b1526;
  --surface-card:   #101b30;
  --surface-sunken: #0a121f;
  --border-subtle:  #1c2a44;

  --ink-900: #f3f6fa;
  --ink-600: #b7c1d6;
  --ink-400: #7a879f;

  --brand-navy:  #24365c;
  --on-navy:     #ffffff;
  --brand-blue:  #4c93de;
  --on-blue:     #0b1526;
  --brand-green: #7ed957;
  --on-green:    #0b1526;

  --state-error: #ff6b6b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.40), 0 1px 3px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55), 0 6px 12px rgba(0, 0, 0, 0.35);
}

/* --- Type-Styles --------------------------------------------------------- */
.display-lg,
.display-md,
.h1, .h2, .h3 {
  font-family: var(--font-display);
  color: var(--ink-900);
  margin: 0;
}

.display-lg { font-size: 56px; line-height: 60px; font-weight: 700; }
.display-md { font-size: 40px; line-height: 46px; font-weight: 700; }
.h1         { font-size: 32px; line-height: 38px; font-weight: 700; }
.h2         { font-size: 24px; line-height: 30px; font-weight: 700; }
.h3         { font-size: 20px; line-height: 26px; font-weight: 600; }

.body-lg, .body, .body-sm, .label, .eyebrow {
  font-family: var(--font-sans);
  margin: 0;
}

.body-lg { font-size: 18px; line-height: 28px; font-weight: 400; color: var(--ink-900); }
.body    { font-size: 16px; line-height: 26px; font-weight: 400; color: var(--ink-900); }
.body-sm { font-size: 14px; line-height: 22px; font-weight: 400; color: var(--ink-600); }
.label   { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-900); }

/* Kicker-Zeilen: immer GROSSBUCHSTABEN mit Punkt-Trennung. Nie im Fliesstext. */
.eyebrow {
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-600);
}

/* --- Zustaende ----------------------------------------------------------- */
/* Fokus-Ringe sind immer brand-blue, 2px, mit 2px Abstand zum Element. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Deaktiviert: ink-400 auf surface-sunken, nie reduzierte Deckkraft. */
:where(button, input, select, textarea):disabled,
[aria-disabled='true'] {
  color: var(--ink-400);
  background: var(--surface-sunken);
  border-color: var(--border-subtle);
  cursor: not-allowed;
}
