/* ==========================================================================
   AQUARIENPROFIS — DESIGN SYSTEM "MESSWERT"
   Technik-Relaunch
   --------------------------------------------------------------------------
   Positionierung: Messtechnik + Dosiertechnik für Meerwasseraquaristik.
   Tonalität: Laborgerät, nicht Deko. Datenvisualisierung ist die
   Designsprache (Messkurven, Skalen, Zielwertlinien) statt Riff-Kitsch.

   Struktur dieser Datei:
     1. Tokens (Farbe, Typo, Abstand, Radius, Schatten, Bewegung)
     2. Basis / Reset
     3. Layout-Hilfen (Container, Grid)
     4. Komponenten (Button, Card, Produktkachel, Messwert-Tile,
        Navigation, Footer, Formularfelder, Badge)
     5. Utilities

   Keine Build-Pflicht: reines CSS mit Custom Properties, direkt verlinkbar.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONTS (self-hosted, kein Google-Fonts-CDN-Abruf)
   Variable Fonts: je ein Latin- und ein Latin-Ext-Subset pro Familie deckt
   die genutzten Schnittweiten 400–700 ab. Quelle: Google Fonts, SIL OFL.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* --- Farbe: Flächen — VARIANTE A "Hell & technisch" (AKTIV, WEB-5219/5220)
     Board-Vorgabe: kein Schwarz. Kühles Off-White/Blaugrau statt
     Tiefwasser-Anthrazit-Dunkel: näher am bisherigen Laborgerät-Charakter,
     nur invertiert. Kein reines #fff als Grundfläche — Karten sind bewusst
     heller als der Hintergrund, die Tiefe kommt aus Schatten statt aus
     Kontraststufen (siehe Abschnitt Radius/Schatten unten). */
  --color-bg: #edf1f4;           /* Grundfläche — kühles Blaugrau, kein reines Weiß */
  --color-bg-rgb: 237, 241, 244; /* RGB-Tripel für rgba()-Verwendung (Header-Blur etc.) */
  --color-bg-raised: #e4e9ed;    /* Header/Footer-Fläche, leicht abgesetzt */
  --color-surface: #ffffff;      /* Karten, Kacheln — bewusst reines Weiß erlaubt hier (Karte, nicht Grundfläche) */
  --color-surface-2: #eef2f5;    /* verschachtelte Flächen, Hover innerhalb Karten */
  --color-border: #d7dee3;       /* Standard-Trennlinie, dezent — Struktur kommt primär vom Schatten */
  --color-border-strong: #b9c4cc;/* betonte Trennlinie, Tabellen, Eingabefelder */

  /* --- Farbe: Signal (Messwert-Akzent) — VARIANTE A -----------------------
     Ein einziger Akzentton, konsequent für "das ist ein Messwert / eine
     Handlung" reserviert. Kein zweiter bunter Akzent daneben. Tiefes
     Petrol statt Cyan: das bisherige Cyan (#22e6d2) fällt auf hellem
     Grund durch (2.4:1 gegen --color-bg — deutlich unter AA) und musste
     komplett neu gerechnet werden, nicht nur nachgedunkelt. */
  --color-signal: #005550;       /* Petrol/Tiefteal — Messwert, Primär-CTA */
  --color-signal-rgb: 0, 85, 80; /* RGB-Tripel für rgba()-Verwendung (Produktkachel-Muster etc.) */
  --color-signal-hover: #00726b; /* Primär-Button-Hover — auf hellem Grund muss Hover heller/klarer werden, nicht dunkler wie im alten Cyan-auf-Dunkel-Schema */
  --color-signal-dim: #3c7b77;   /* gedämpft — Sekundärlinien, Icons */
  --color-signal-bg: rgba(0, 85, 80, 0.08); /* Flächen-Tint, z.B. aktiver Nav-Punkt */
  --color-signal-border: rgba(0, 85, 80, 0.28);

  /* --- Farbe: Status — VARIANTE A ------------------------------------------ */
  --color-dev: #7a4e00;          /* Statusfarbe für "In Planung" — bewusst NICHT Signal-Petrol,
                                     damit der Entwicklungsstatus nie mit einem echten Messwert
                                     verwechselt wird */
  --color-dev-bg: rgba(122, 78, 0, 0.10);
  --color-dev-border: rgba(122, 78, 0, 0.35);
  --color-danger: #a32318;       /* Formularfehler */
  --color-danger-bg: rgba(163, 35, 24, 0.08);

  /* --- Farbe: Text — VARIANTE A ---------------------------------------------
     Kontrastwerte gegen --color-bg (#edf1f4) UND --color-surface (#ffffff),
     geprüft nach WCAG 2.1 (schlechterer der beiden Werte maßgeblich):
       --color-text            15.8 : 1  (AAA, normaler & großer Text)
       --color-text-secondary   6.3 : 1  (AA; 7.1:1 AAA gegen Karten)
       --color-text-tertiary    4.9 : 1  (AA, normaler Text; Mindestwert 4.5:1)
       --color-signal            5.8 : 1  (AA gegen Fläche; 6.6:1 gegen Karte)
       --color-dev                6.3 : 1  (AA gegen Fläche; 7.2:1 AAA gegen Karte)
       --color-danger              6.6 : 1  (AA gegen Fläche; 7.5:1 AAA gegen Karte)
     Nie unter --color-text-tertiary für Fließtext gehen; für Meta-Infos
     (Timestamps, Copyright) ist tertiary das Minimum, nicht der Standard. */
  --color-text: #12181d;
  --color-text-secondary: #4b5a63;
  --color-text-tertiary: #5c6b74;
  --color-text-on-signal: #f3fafa; /* helle Schrift auf Petrol-Flächen, Kontrast 8.2:1 AAA */

  /* ========================================================================
     VARIANTE B "Hell & warm" (INAKTIV — nicht gewählt, Referenz für WEB-5219)
     Wärmerer Grundton (Sand/Warmgrau statt Blaustich), Signalfarbe
     gedecktes Meerblau. Token-Namen identisch zu Variante A, nur Werte
     unterscheiden sich — reine Copy-Paste-Operation, keine Änderung an den
     Seiten nötig, falls das Board später umentscheidet.

  --color-bg: #f4eee6;
  --color-bg-rgb: 244, 238, 230;
  --color-bg-raised: #ece3d5;
  --color-surface: #fffcf7;
  --color-surface-2: #f2ebdf;
  --color-border: #e1d5c3;
  --color-border-strong: #c2b29a;

  --color-signal: #2b5f63;
  --color-signal-rgb: 43, 95, 99;
  --color-signal-hover: #356f74;
  --color-signal-dim: #5c8c8f;
  --color-signal-bg: rgba(43, 95, 99, 0.08);
  --color-signal-border: rgba(43, 95, 99, 0.28);

  --color-dev: #7c4a12;
  --color-dev-bg: rgba(124, 74, 18, 0.10);
  --color-dev-border: rgba(124, 74, 18, 0.35);
  --color-danger: #9c3324;
  --color-danger-bg: rgba(156, 51, 36, 0.08);

  --color-text: #241d14;
  --color-text-secondary: #5b4f3e;
  --color-text-tertiary: #6e6252;
  --color-text-on-signal: #fefdfb;
  ========================================================================== */

  /* --- Typografie -----------------------------------------------------
     Eine technische Grotesk für UI/Fließtext (Inter — sehr gute
     Lesbarkeit in kleinen Größen, native tabular-nums-Unterstützung).
     Eine zweite Grotesk mit mehr Charakter für Headlines (Space Grotesk —
     technisch, aber nicht neutral-langweilig).
     Eine Mono-Schrift ausschließlich für Messwerte/Readouts (JetBrains
     Mono) — verstärkt den "Laborgerät"-Charakter an der Stelle, wo es
     zählt, statt überall.
     Alle drei sind offen lizenziert (Google Fonts / SIL OFL) und
     selbst-hostbar für Performance-Budget (Lighthouse-Ziel ≥ 90). */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Fluid Type Scale — clamp() zwischen 360px und 1440px Viewport,
     damit die Hierarchie auf Mobil (ab 360px, siehe Abnahmekriterium)
     nicht bricht und auf Desktop nicht mickrig wirkt. */
  --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);   /* 12–13px: Meta, Labels */
  --text-sm:   clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);   /* 13–14px: Sekundärtext */
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);        /* 15–16px: Fließtext */
  --text-md:   clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);     /* 17–19px: Lead */
  --text-lg:   clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);       /* 20–24px: H4 */
  --text-xl:   clamp(1.5rem, 1.3rem + 1vw, 1.875rem);         /* 24–30px: H3 */
  --text-2xl:  clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem);       /* 30–40px: H2 */
  --text-3xl:  clamp(2.25rem, 1.7rem + 2.4vw, 3.5rem);        /* 36–56px: H1 */
  --text-4xl:  clamp(2.75rem, 1.9rem + 3.6vw, 4.75rem);       /* 44–76px: Hero */

  /* Messwert-Readout-Größen (Mono, eigene Skala — Zahlen brauchen mehr
     Platz als Fließtext, um auf dem Tile sofort ablesbar zu sein) */
  --text-readout-sm: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  --text-readout-lg: clamp(2.5rem, 2rem + 2.2vw, 3.75rem);

  --leading-tight: 1.15;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* --- Abstandsraster -----------------------------------------------------
     8px-Basis, konsequent für alle Innen-/Außenabstände. */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-7: 3rem;      /* 48px */
  --space-8: 4rem;      /* 64px */
  --space-9: 6rem;      /* 96px */
  --space-10: 8rem;     /* 128px */

  /* --- Radius / Schatten ----------------------------------------------
     Kleine Radien — technisch, kein "verspieltes" Rund. */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Hell statt dunkel dreht die Statik: auf dunklem Grund trug der 1px-
     Rahmen die Struktur, auf hellem Grund verschwimmt ein reiner Rahmen
     zwischen zwei fast gleich hellen Flächen. Der Schatten übernimmt jetzt
     die Führung (Karte, Produktkachel, Messwert-Tile, Header im Scroll). */
  --shadow-sm: 0 1px 2px rgba(18, 32, 38, 0.08), 0 1px 1px rgba(18, 32, 38, 0.04);
  --shadow-md: 0 8px 24px rgba(18, 32, 38, 0.10), 0 2px 6px rgba(18, 32, 38, 0.06);
  --shadow-signal-glow: 0 0 0 1px var(--color-signal-border), 0 0 24px rgba(var(--color-signal-rgb), 0.14);

  /* --- Bewegung -----------------------------------------------------------
     Sparsam, funktional (Brief §3). Keine Deko-Animation. */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 220ms;
  --duration-slow: 400ms;

  /* --- Layout --------------------------------------------------------- */
  --container-max: 1200px;
  --container-pad: var(--space-5);
  --header-height: 72px;
}

/* --------------------------------------------------------------------------
   2. BASIS / RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}
h1 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.005em; }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-4); color: var(--color-text-secondary); }
p.lead { font-size: var(--text-md); color: var(--color-text); }

a { color: var(--color-signal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sichtbarer Fokuszustand überall — Abnahmekriterium, kein Nacharbeits-Posten.
   Nie outline: none ohne Ersatz setzen. */
:focus-visible {
  outline: 2px solid var(--color-signal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Tabellarische Ziffern global für alles, was Messwerte/Zahlen zeigt */
.tabular-nums, .readout, table {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   3. LAYOUT-HILFEN
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--space-9); }
.section-tight { padding-block: var(--space-7); }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  :root { --container-pad: var(--space-4); }
}

.stack { display: flex; flex-direction: column; }
.cluster { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   4. KOMPONENTEN
   -------------------------------------------------------------------------- */

/* --- 4.1 Button ----------------------------------------------------------
   Primär: Signal-Cyan, gefüllt — für die eine gewünschte Handlung pro
   Ansicht (z. B. "Anfrage stellen"). Nie für einen
   Bestellvorgang, da v1 keinen Verkaufsabschluss hat (Brief §5.3). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
  min-height: 44px; /* Touch-Ziel */
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-signal);
  color: var(--color-text-on-signal);
}
.btn-primary:hover { background: var(--color-signal-hover); text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover { border-color: var(--color-signal); color: var(--color-signal); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--color-signal);
  padding-inline: var(--space-2);
}
.btn-ghost:hover { background: var(--color-signal-bg); text-decoration: none; }

.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* --- 4.2 Card -------------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm); /* trägt jetzt die Kartenwirkung, siehe Kommentar bei --shadow-sm */
}
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }

/* --- 4.3 Produktkachel ------------------------------------------------------
   Für Messgeräte/Dosiertechnik-Übersichten. Enthält verpflichtend eine
   Statusanzeige (Badge, siehe 4.6) — nie ein Produkt ohne Statusangabe. */
.product-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.product-tile:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); } /* Hover hebt jetzt per Schatten an statt nur den Rahmen abzudunkeln */

.product-tile__media {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(180deg, var(--color-surface-2), var(--color-bg-raised)),
    repeating-linear-gradient(90deg, rgba(var(--color-signal-rgb), 0.05) 0 1px, transparent 1px 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  overflow: hidden;
}
/* Stockbild-Platzhalter (WEB-5218): Bild ersetzt die Gradient-Fläche vollständig,
   statt sie zu überlagern — deshalb kein zusätzlicher Modifier nötig. */
.product-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-tile__body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.product-tile__category { font-size: var(--text-xs); color: var(--color-signal); text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--weight-semibold); }
.product-tile__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-semibold); margin: 0; }
.product-tile__desc { font-size: var(--text-sm); color: var(--color-text-secondary); margin: 0; flex: 1; }
.product-tile__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); }

/* --- 4.3b Seitenkopf-Medienband ----------------------------------------------
   Fuer Hero-Bilder auf Seiten ohne Produktkachel im Kopf (z.B. filtertechnik.html,
   die aktuell kein eigenes Bild-Slot im Markup hat, siehe WEB-5217/WEB-5218). */
.page-head__media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-6);
}
.page-head__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- 4.4 Messwert-Tile ------------------------------------------------------
   Zentrales Element der Datenvisualisierungs-Sprache (Brief §3). Zeigt
   einen aktuellen Wert groß in Mono/Tabular, Einheit, Label, optional
   einen Trend (Sparkline-Slot) und eine Zielwertlinie. */
.metric-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.metric-tile__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  font-weight: var(--weight-medium);
}
.metric-tile__value-row { display: flex; align-items: baseline; gap: var(--space-2); }
.metric-tile__value {
  font-family: var(--font-mono);
  font-size: var(--text-readout-lg);
  font-weight: var(--weight-medium);
  color: var(--color-signal);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.metric-tile__unit { font-family: var(--font-mono); font-size: var(--text-md); color: var(--color-text-secondary); }
.metric-tile__delta { font-size: var(--text-xs); font-family: var(--font-mono); padding: 0.15em 0.5em; border-radius: var(--radius-sm); }
.metric-tile__delta--stable { color: var(--color-text-tertiary); background: var(--color-surface-2); }
.metric-tile__delta--warn { color: var(--color-dev); background: var(--color-dev-bg); }

.metric-tile__spark { height: 40px; width: 100%; }
.metric-tile__spark path.line { fill: none; stroke: var(--color-signal); stroke-width: 1.5; }
.metric-tile__spark path.target { fill: none; stroke: var(--color-text-tertiary); stroke-width: 1; stroke-dasharray: 3 3; }
.metric-tile__spark path.fill { fill: var(--color-signal); opacity: 0.08; stroke: none; }

.metric-tile__footnote { font-size: var(--text-xs); color: var(--color-text-tertiary); }

/* --- 4.5 Navigation --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(var(--color-bg-rgb), 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm); /* auf hellem Grund reicht die Trennlinie allein nicht, Schatten hebt die Chrome-Ebene sichtbar vom Content ab */
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.site-logo { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-md); color: var(--color-text); }
.site-logo:hover { text-decoration: none; }
.site-logo__mark { width: 28px; height: 28px; color: var(--color-signal); }

.nav-main { display: flex; align-items: center; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.nav-main a { color: var(--color-text-secondary); font-size: var(--text-sm); font-weight: var(--weight-medium); padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.nav-main a:hover, .nav-main a[aria-current="page"] { color: var(--color-text); text-decoration: none; border-bottom-color: var(--color-signal); }

.nav-toggle { display: none; background: none; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); color: var(--color-text); width: 44px; height: 44px; align-items: center; justify-content: center; }

@media (max-width: 860px) {
  .nav-main { position: fixed; inset: var(--header-height) 0 0 0; background: var(--color-bg-raised); flex-direction: column; align-items: stretch; padding: var(--space-5); gap: 0; transform: translateX(100%); transition: transform var(--duration-base) var(--ease-standard); }
  .nav-main.is-open { transform: translateX(0); }
  .nav-main a { border-bottom: 1px solid var(--color-border); padding: var(--space-4) 0; width: 100%; }
  .nav-toggle { display: inline-flex; }
}

/* --- 4.6 Badge --------------------------------------------------------------
   Statusbadge ist Pflichtkomponente (Brief §5.1, Rev. 4 §0 Punkt 2) — jedes
   Produkt MUSS diese Badge mit dem einen zulässigen Wert tragen. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3em 0.65em;
  border-radius: var(--radius-sm);
  border: 1px solid;
  white-space: nowrap;
}
.badge-dev { color: var(--color-dev); background: var(--color-dev-bg); border-color: var(--color-dev-border); }
.badge-dev::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-live { color: var(--color-signal); background: var(--color-signal-bg); border-color: var(--color-signal-border); }
.badge-neutral { color: var(--color-text-secondary); background: var(--color-surface-2); border-color: var(--color-border); }

/* --- 4.7 Formularfelder ------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.field label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text); }
.field .hint { font-size: var(--text-xs); color: var(--color-text-tertiary); }
.field .error { font-size: var(--text-xs); color: var(--color-danger); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 0.75rem 1rem;
  min-height: 44px;
  transition: border-color var(--duration-fast) var(--ease-standard);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--color-text-tertiary); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  border-color: var(--color-signal);
  outline: 2px solid var(--color-signal);
  outline-offset: 1px;
}
.field.has-error input, .field.has-error textarea { border-color: var(--color-danger); }
.field.has-error .hint { display: none; }

/* Segmented control — B2C/B2B-Schalter im Kontaktformular (Brief, Seite kontakt.html) */
.segmented { display: inline-flex; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); overflow: hidden; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: 0.6rem 1.25rem; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text-secondary); cursor: pointer; }
.segmented input:checked + label { background: var(--color-signal-bg); color: var(--color-signal); }
.segmented input:focus-visible + label { outline: 2px solid var(--color-signal); outline-offset: -2px; }

.checkbox-row { display: flex; align-items: flex-start; gap: var(--space-2); }
.checkbox-row input { margin-top: 0.2em; width: 18px; height: 18px; accent-color: var(--color-signal); }
.checkbox-row label { font-size: var(--text-sm); color: var(--color-text-secondary); }

/* --- 4.8 Footer --------------------------------------------------------------
   Rechtsdaten müssen von jeder Seite erreichbar sein (Brief §2/§5.2) —
   Footer ist die einzige zulässige Stelle dafür, konsequent gleich auf
   allen Seiten. Anker-IDs impressum.html#impressum /
   impressum.html#datenschutz bleiben bestehen (nicht neu vergeben). */
.site-footer {
  background: var(--color-bg-raised);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8) var(--space-6);
}
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-6); margin-bottom: var(--space-7); }
.site-footer__heading { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-tertiary); margin-bottom: var(--space-3); }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__links a { color: var(--color-text-secondary); font-size: var(--text-sm); }
.site-footer__links a:hover { color: var(--color-signal); }
.site-footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--color-text-tertiary); }

@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* --------------------------------------------------------------------------
   5. UTILITIES
   -------------------------------------------------------------------------- */
.text-signal { color: var(--color-signal); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-3); top: -50px;
  background: var(--color-signal); color: var(--color-text-on-signal);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  z-index: 100; transition: top var(--duration-fast) var(--ease-standard);
}
.skip-link:focus { top: var(--space-3); }
