/* ============================================================
   GOLLBAU Mietgeräte – Design Tokens
   Ebenen: Primitive → Semantic → Component
   Themes: light (Default) / dark via [data-theme]
   ============================================================ */

/* ---------- Fonts (selbst gehostet, DSGVO-konform) ---------- */
@font-face {
  font-family: 'Lexend';
  src: url('/assets/fonts/lexend-v26-latin_latin-ext-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/assets/fonts/lexend-v26-latin_latin-ext-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/assets/fonts/lexend-v26-latin_latin-ext-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/assets/fonts/lexend-v26-latin_latin-ext-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/source-sans-3-v19-latin_latin-ext-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/source-sans-3-v19-latin_latin-ext-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/source-sans-3-v19-latin_latin-ext-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/source-sans-3-v19-latin_latin-ext-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* ---------- Primitive: Markenfarben ---------- */
  --green-500: #84BD00;          /* CI Grün */
  --green-600: #6fa000;
  --green-700: #587f00;
  --green-100: #eef7d8;
  --blue-800:  #003882;          /* CI Blau */
  --blue-900:  #002a61;
  --blue-700:  #0a4ba3;
  --blue-600:  #1560c4;
  --blue-100:  #e3ecf8;

  /* ---------- Primitive: Neutrale ---------- */
  --gray-0:   #ffffff;
  --gray-50:  #f7f9fb;
  --gray-100: #eef1f5;
  --gray-200: #dfe4ea;
  --gray-300: #c4ccd6;
  --gray-500: #6b7684;
  --gray-700: #3a4350;
  --gray-900: #16202e;

  /* ---------- Primitive: Typografie ---------- */
  --font-heading: 'Lexend', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --text-sm:  0.875rem;
  --text-base: 1rem;
  --text-lg:  1.125rem;
  --text-xl:  1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  /* ---------- Primitive: Abstände (4px-Raster) ---------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;

  /* ---------- Primitive: Sonstiges ---------- */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgb(0 20 50 / 0.08);
  --shadow-md: 0 4px 16px rgb(0 20 50 / 0.10);
  --shadow-lg: 0 12px 32px rgb(0 20 50 / 0.16);
  --transition: 180ms ease-out;

  /* z-Index-Skala */
  --z-header: 100;
  --z-drawer: 200;
  --z-toast: 1000;

  /* ---------- Semantic: Light Theme ---------- */
  --color-primary: var(--blue-800);
  --color-primary-hover: var(--blue-900);
  --color-on-primary: #ffffff;
  --color-accent: var(--green-500);
  --color-accent-hover: var(--green-600);
  --color-on-accent: #10230a;      /* dunkles Grün-Schwarz: Kontrast auf CI-Grün > 9:1 */
  --color-link: var(--blue-700);

  --bg: var(--gray-50);
  --surface: var(--gray-0);
  --surface-raised: var(--gray-0);
  --text: var(--gray-900);
  --text-muted: var(--gray-500);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);

  --success-bg: var(--green-100);
  --success-text: #3b5c00;
  --danger: #c62828;
  --danger-bg: #fdecea;

  /* ---------- Component ---------- */
  --btn-radius: var(--radius);
  --card-bg: var(--surface);
  --card-border: var(--border);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-md);
  --header-bg: rgb(255 255 255 / 0.92);
  --badge-bg: var(--color-accent);
  --badge-text: var(--color-on-accent);
  --input-bg: var(--gray-0);
  --input-border: var(--gray-300);
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
  --color-primary: #3d7dd8;
  --color-primary-hover: #5a93e4;
  --color-on-primary: #ffffff;
  --color-accent: var(--green-500);
  --color-accent-hover: #97d40e;
  --color-on-accent: #10230a;
  --color-link: #7fb0f0;

  --bg: #0d1420;
  --surface: #16202f;
  --surface-raised: #1d2a3d;
  --text: #e8edf4;
  --text-muted: #93a1b3;
  --border: #283850;
  --border-strong: #35496a;

  --success-bg: #1d2b10;
  --success-text: #a6d94e;
  --danger: #ef6a5f;
  --danger-bg: #341613;

  --card-bg: var(--surface);
  --card-border: var(--border);
  --card-shadow: 0 1px 3px rgb(0 0 0 / 0.4);
  --card-shadow-hover: 0 6px 20px rgb(0 0 0 / 0.5);
  --header-bg: rgb(13 20 32 / 0.92);
  --input-bg: #101a29;
  --input-border: #35496a;

  color-scheme: dark;
}
