/* ==========================================================================================
   Evotec Fachdomain-Kit · kit.css · Stand 26.09.2026
   Abgeleitet aus style.css von www.evotec-gmbh.de (?v=20260911duo, 1744 Zeilen, bytegleich
   mit live am 25.09.2026, erhebung/evotec-aktuell/). Gleiche Tokens, Schriften, Abstaende,
   Schatten und Bewegung; gestrichen: Ladeblende, Sprachwahl, Karten-/YouTube-Platzhalter,
   Stellenkarten, Domain-Linkkreis, Cursor-Gluehen. Reparaturen F1-F14 aus
   erhebung/KIT-EMPFEHLUNG.md sind eingearbeitet (Stichwort "F<n>" im Kommentar).
   Regeln fuer alle Bauer: keine Inline-Styles, keine neuen !important, Raster immer
   minmax(0,1fr), gerade Spaltenzahlen auf dem iPhone Duo (Falz x = 475).
   ========================================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------------------------
   :root traegt die Dunkel-Werte als Rueckfall (ohne data-theme waeren sonst alle Tokens
   undefiniert, DESIGN-DNA 2.1). theme-start.js setzt data-theme vor dem ersten Zeichnen. */
:root {
    --orange: #E8720C;
    --orange-light: #F5922E;
    --orange-dark: #C45E0A;
    --orange-glow: rgba(232, 114, 12, 0.12);
    --bg-primary: #000000;
    --bg-secondary: #0A0A0A;
    --bg-card: #111111;
    --bg-elevated: #1A1A1A;
    --text-primary: #F0F0F0;
    --text-secondary: #A0A0A0;
    /* Reparatur 26.09.: #666 hatte auf #000-#1A1A1A nur 3,3-3,7 : 1; #8A8A8A >= 5,0 : 1 (WCAG AA 4,5 : 1) */
    --text-muted: #8A8A8A;
    --border: #1F1F1F;
    --border-hover: #333333;
    --glass-bg: rgba(17, 17, 17, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --kopf-bg: rgba(0, 0, 0, 0.92);
    --menue-bg: #15171c;
    --menue-rand: rgba(255, 255, 255, 0.14);
    --menue-text: #cfd3da;
    --menue-hover: rgba(255, 255, 255, 0.07);
    --blick-bg: rgba(10, 10, 10, 0.62);
    /* Orange als TEXT (Links, Umriss-Knoepfe, Titelzeilen): im Dunkelmodus das Markenorange (6,8 : 1 auf #000),
       im Hellmodus dunkler (siehe [data-theme="light"]). Orange als FLAECHE mit weisser Schrift (Knoepfe, Auswahl):
       #B85A0A (4,66 : 1 mit Weiss; #E8720C hatte 3,07 : 1). Markenentscheidung: Rueckweg = --orange-flaeche: #E8720C. */
    --orange-text: #E8720C;
    --orange-text-hover: #F5922E;
    --orange-flaeche: #B85A0A;
    --orange-flaeche-hover: #A04E09;
    --erfolg: #10B981;
    --fehler: #EF4444;
    --warnung: #F59E0B;
    --radius-s: 4px;
    --radius-m: 8px;
    --radius-l: 12px;
    --schatten-karte: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(232, 114, 12, 0.08);
    --muster-bild: url('/bilder/fraesbahn-dunkel.svg');
    color-scheme: dark;
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #0A0A0A;
    --bg-card: #111111;
    --bg-elevated: #1A1A1A;
    --text-primary: #F0F0F0;
    --text-secondary: #A0A0A0;
    --text-muted: #8A8A8A;
    --border: #1F1F1F;
    --border-hover: #333333;
    --glass-bg: rgba(17, 17, 17, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --kopf-bg: rgba(0, 0, 0, 0.92);
    --menue-bg: #15171c;
    --menue-rand: rgba(255, 255, 255, 0.14);
    --menue-text: #cfd3da;
    --menue-hover: rgba(255, 255, 255, 0.07);
    --blick-bg: rgba(10, 10, 10, 0.62);
    --orange-text: #E8720C;
    --orange-text-hover: #F5922E;
    --orange-flaeche: #B85A0A;
    --orange-flaeche-hover: #A04E09;
    --muster-bild: url('/bilder/fraesbahn-dunkel.svg');
    color-scheme: dark;
}

[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-card: #FFFFFF;
    --bg-elevated: #F0F0F0;
    --text-primary: #111111;
    --text-secondary: #555555;
    /* Reparatur 26.09.: #999 hatte 2,6-2,9 : 1; #6B6B6B >= 4,7 : 1 auf #FFF, #F5F5F5 und #F0F0F0 */
    --text-muted: #6B6B6B;
    /* Orange als Text im Hellmodus: #B35400 (5,0 : 1 auf Weiss, 4,6 : 1 auf #F5F5F5); Flaechen bleiben wie oben */
    --orange-text: #B35400;
    --orange-text-hover: #8F4300;
    --border: #E0E0E0;
    --border-hover: #CCCCCC;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.08);
    --kopf-bg: rgba(255, 255, 255, 0.92);
    /* F6: Klappmenue und Seitenleiste folgen im Hellmodus den Tokens (Vorlage: immer dunkel) */
    --menue-bg: #FFFFFF;
    --menue-rand: rgba(0, 0, 0, 0.12);
    --menue-text: #333333;
    --menue-hover: rgba(232, 114, 12, 0.08);
    --blick-bg: rgba(255, 255, 255, 0.78);
    --schatten-karte: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 40px rgba(232, 114, 12, 0.08);
    --muster-bild: url('/bilder/fraesbahn-hell.svg');
    color-scheme: light;
}

/* ---------- 2. Grundlage ---------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    /* overflow-x NUR am body, nie an html: sonst klebt die Kopfzeile in WebKit nicht mehr (Risiko R3) */
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', system-ui, sans-serif; line-height: 1.2; }
a { color: var(--orange-text); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--orange-text-hover); }
img, svg, video { max-width: 100%; height: auto; }
img { display: inline-block; }
strong, b { font-weight: 700; }
sup { font-size: 0.7em; line-height: 0; }
code, kbd { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.9em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* [hidden] gewinnt gegen jede Klassenregel (display:flex/grid ...) - hohe Spezifitaet statt !important */
[hidden]:not(#kit-nie-vergeben) { display: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
/* Sicherheitsnetz gegen waagerechten Ueberlauf (iOS zoomt sonst heraus): main schneidet ab, statt die
   Seite zu verbreitern. main ist KEIN Vorfahr der klebenden Kopfzeile (Risiko R3 bleibt gewahrt).
   screens.js meldet abgeschnittene Elemente trotzdem als Befund. */
main { display: block; overflow-x: hidden; overflow-x: clip; }

/* F9: sichtbarer Tastaturfokus */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

.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: -9999px; top: 8px; z-index: 100002;
    background: var(--orange-flaeche); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
    font-family: 'Space Grotesk', sans-serif; font-weight: 600;
}
.skip-link:focus { left: 16px; color: #fff; }

/* ---------- 3. Topbar ------------------------------------------------------------------- */
.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar a { color: var(--text-secondary); }
.topbar a:hover { color: var(--orange-text); }
.topbar-contact { display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline; }
/* "Vertrieb / Anfragen:" vor Telefon und E-Mail (BAU-FESTLEGUNG 4); auf Telefonen ausgeblendet, dort steht es im Fuss */
.topbar-label { color: var(--text-muted); margin-right: -12px; }
@media (max-width: 1024px) { .topbar-label { display: none; } }
/* Telefone: Topbar hoechstens zweizeilig (GEMEINSAM kopf.topbar.mobil) - Absender oben, Telefon und E-Mail darunter.
   Gemessen: bei 13,6 px brauchen beide Links 323 px und brachen bei 320/360 px in eine dritte Zeile um. */
@media (max-width: 470px) { .topbar .container { padding-left: max(16px, calc(env(safe-area-inset-left) + 8px)); padding-right: max(16px, calc(env(safe-area-inset-right) + 8px)); } }
@media (max-width: 370px) { .topbar { font-size: 0.74rem; padding: 8px 0; } .topbar .container { gap: 4px; } .topbar-contact { gap: 2px 10px; } }

/* ---------- 4. Kopfzeile ---------------------------------------------------------------- */
.kopf {
    background: var(--kopf-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s, padding 0.3s;
}
.kopf .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.kopf.scrolled { padding: 10px 0; }

/* Logo: Evotec-Bildmarke + zweizeiliges Themenetikett. Eigene Klasse .logo-text statt
   .logo span (F11: die Vorlage blendet .logo span unter 1100 px und die Schrift unter 360 px aus). */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    flex: 0 1 auto;
}
.logo:hover { color: var(--text-primary); }
.logo img { height: 30px; width: auto; flex-shrink: 0; display: block; }
.logo-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.08; min-width: 0; }
.logo-z1 {
    font-size: clamp(0.8rem, 3.6vw, 1rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.logo-z2 {
    font-size: clamp(0.55rem, 2.4vw, 0.66rem);
    font-weight: 600;
    color: var(--orange-text);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-right { display: flex; align-items: center; gap: 24px; flex: 0 0 auto; }

.hauptnav { display: flex; gap: 28px; align-items: center; }
.hauptnav > a, .nav-dd-btn {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}
.hauptnav > a:hover, .nav-dd-btn:hover { color: var(--text-primary); }
.hauptnav > a[aria-current="page"], .nav-dd-btn.aktiv { color: var(--text-primary); }
.hauptnav > a:not(.btn)::after, .nav-dd-btn::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--orange); transition: width 0.3s;
}
.hauptnav > a:not(.btn):hover::after, .hauptnav > a[aria-current="page"]::after,
.nav-dd-btn:hover::after, .nav-dd-btn.aktiv::after { width: 100%; }
.hauptnav > a.btn { color: #fff; }
.hauptnav .nav-cta { padding: 9px 22px; }

/* Klappmenue (z. B. "Wissen"): Oeffnen per Klick/Tastatur (kit.js) und per Hover auf Zeigergeraeten */
.nav-dd { position: relative; display: inline-flex; }
.nav-dd-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: none; padding: 0; line-height: inherit; font-family: inherit;
}
.nav-dd-btn svg { transition: transform 0.25s; }
.nav-dd.open .nav-dd-btn svg { transform: rotate(180deg); }
.nav-dd-menu { position: absolute; left: 0; top: 100%; padding-top: 12px; display: none; z-index: 250; }
.nav-dd.open .nav-dd-menu { display: block; }
.nav-dd-menu-inner {
    min-width: 220px;
    background: var(--menue-bg);
    border: 1px solid var(--menue-rand);
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    padding: 6px;
}
.nav-dd-menu a {
    display: block; padding: 9px 12px; border-radius: 6px;
    color: var(--menue-text); font-size: 0.88rem; white-space: nowrap;
}
.nav-dd-menu a:hover, .nav-dd-menu a[aria-current="page"] { background: var(--menue-hover); color: var(--orange-text); }
@media (hover: hover) {
    .nav-dd:hover .nav-dd-menu { display: block; }
    .nav-dd:hover .nav-dd-btn svg { transform: rotate(180deg); }
}

/* Hell/Dunkel-Schalter: Haken = hell (wie Vorlage). SVG-Symbole statt Glyphen aus der Systemschrift.
   Die ganze Beschriftung ist 44 x 44 px gross (Tippziel). */
.theme-switch-wrap { display: flex; align-items: center; flex-shrink: 0; }
.theme-switch {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; cursor: pointer; flex-shrink: 0;
}
.theme-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.theme-slider {
    position: relative; display: block; width: 44px; height: 24px;
    border-radius: 24px; background: var(--orange); transition: background 0.3s;
}
.theme-knopf {
    position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; color: var(--orange-text);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
}
.theme-knopf svg { width: 12px; height: 12px; }
.theme-knopf .icon-sonne { display: none; }
.theme-switch input:checked + .theme-slider .theme-knopf { transform: translateX(20px); }
.theme-switch input:checked + .theme-slider .icon-sonne { display: block; }
.theme-switch input:checked + .theme-slider .icon-mond { display: none; }
.theme-switch input:focus-visible + .theme-slider { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Burger */
.mobile-toggle {
    display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 44px; height: 44px; background: none; border: none; padding: 0; flex-shrink: 0;
}
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); transition: transform 0.3s, opacity 0.3s; }
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Seitenleiste (von kit.js aus der Navigation gebaut, direktes Kind von body) - F6 auf Tokens */
.mobile-sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 10100;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.mobile-sidebar-overlay.active { opacity: 1; visibility: visible; }
.mobile-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 300px; max-width: 86vw;
    background: var(--bg-card); z-index: 10150;
    display: flex; flex-direction: column;
    padding: 16px 0 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
    border-left: 1px solid var(--border);
}
.mobile-sidebar.active { transform: translateX(0); visibility: visible; }
.mobile-sidebar-close {
    align-self: flex-end; background: none; border: none; color: var(--text-primary);
    width: 44px; height: 44px; margin-right: 12px; display: flex; align-items: center; justify-content: center;
}
.mobile-sidebar-close svg { width: 22px; height: 22px; }
.mobile-sidebar a {
    display: block; padding: 15px 24px; color: var(--text-primary);
    font-size: 1rem; border-bottom: 1px solid var(--border);
    transition: background 0.2s, color 0.2s;
}
.mobile-sidebar a:hover, .mobile-sidebar a[aria-current="page"] { color: var(--orange-text); background: var(--orange-glow); }
.mobile-sidebar a.unterpunkt { padding-left: 44px; font-size: 0.92rem; color: var(--text-secondary); }
.mobile-sidebar .mobile-sidebar-gruppe {
    padding: 14px 24px 6px; font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--orange-text); font-family: 'Space Grotesk', sans-serif; font-weight: 600;
}
.mobile-sidebar a.mobile-sidebar-cta {
    background: var(--orange-flaeche); color: #fff; text-align: center;
    border-radius: var(--radius-m); margin: 16px 24px; border-bottom: none; font-weight: 600;
}
.mobile-sidebar a.mobile-sidebar-cta:hover { background: var(--orange-flaeche-hover); color: #fff; }
.mobile-sidebar-footer { margin-top: auto; padding: 20px 24px; border-top: 1px solid var(--border); font-size: 0.85rem; }
.mobile-sidebar-footer a { display: inline; padding: 0; border: none; color: var(--text-secondary); font-size: 0.85rem; }
.mobile-sidebar-footer .phone { display: block; color: var(--orange-text); font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
body.nav-open { overflow: hidden; }

/* ---------- 5. Knoepfe ------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px;
    padding: 12px 28px;
    border-radius: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s, color 0.3s, border-color 0.3s;
}
/* Reparatur 26.09. (Kontrast): Knopfflaeche --orange-flaeche (Weiss 4,66 : 1), Umriss-Knopf in --orange-text */
.btn-primary { background: var(--orange-flaeche); color: #fff; }
.btn-primary:hover { background: var(--orange-flaeche-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 30px rgba(232, 114, 12, 0.35); }
.btn-outline { background: transparent; color: var(--orange-text); border: 2px solid var(--orange-text); }
.btn-outline:hover { background: var(--orange-flaeche); border-color: var(--orange-flaeche); color: #fff; box-shadow: 0 8px 30px rgba(232, 114, 12, 0.25); }
.btn-klein { min-height: 40px; padding: 8px 18px; font-size: 0.88rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.textknopf {
    background: none; border: none; padding: 0; color: var(--orange-text);
    font-family: inherit; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.textknopf:hover { color: var(--orange-text-hover); }

/* ---------- 6. Hero mit Rendering-Buehne --------------------------------------------------
   Aufbau: .hero > .hero-buehne (Bild als CSS-Hintergrund, je Thema und Hochformat eigene Datei,
   gesetzt in site.css) + .hero-schleier (Lesbarkeit) + .container > .hero-raster
   (.hero-text mit H1, Unterzeile, Knoepfen und "Auf einen Blick" | optional .hero-figur).
   Das Teil der Renderings steht rechts ("links Platz fuer Text", bilder/BILDWERK.md), darum liegt
   die Tafel links unter den Knoepfen und bleibt im ersten Bildschirm. */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: min(88vh, 860px);
    padding: 48px 0 64px;
    border-bottom: 1px solid var(--border);
}
.hero-buehne {
    position: absolute; inset: 0; z-index: -3;
    background-color: var(--bg-primary);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 70% 50%;
    transform-origin: 70% 50%;
}
.hero-buehne.studiofahrt { animation: studiofahrt 24s ease-in-out infinite alternate; }
.hero-buehne.ken-burns { animation: kenBurns 20s ease-in-out infinite alternate; }
@keyframes studiofahrt { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.15); } }
.hero-muster {
    position: absolute; inset: 0; z-index: -3;
    background-color: var(--bg-primary);
    background-image: radial-gradient(ellipse at 78% 30%, rgba(232, 114, 12, 0.14), transparent 55%), var(--muster-bild);
    background-size: auto, 520px;
    background-repeat: no-repeat, repeat;
}
.hero-schleier {
    position: absolute; inset: 0; z-index: -2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.66) 40%, rgba(0, 0, 0, 0.12) 70%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 72%, var(--bg-primary) 100%);
}
/* F5: Hellmodus-Schleier kraeftiger als in der Vorlage (dort 30-60 % Weiss, Unterzeile kaum lesbar) */
[data-theme="light"] .hero-schleier {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.8) 40%, rgba(255, 255, 255, 0.16) 70%, rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0) 72%, var(--bg-primary) 100%);
}
/* static: die Legende (.buehne-legende im figure.hero-bild, ab 1025 px display: contents) sitzt oben rechts am Abschnitt */
.hero .container { position: static; width: 100%; }
.hero-raster {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 48px;
    align-items: center;
}
.hero-text { max-width: 640px; min-width: 0; }
.hero-label {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--orange-text);
    margin-bottom: 18px;
    border-left: 3px solid var(--orange);
    padding-left: 12px;
}
/* F4: kein nowrap, Schrift mit clamp(), Umbruch ausgewogen.
   Reparatur 26.09.: Die animierte Zeile steht NICHT mehr in der H1 (sonst liest ein rendernder Crawler eine halbe H1), sondern
   als eigenes Element .tw-zeile (aria-hidden) direkt darunter, gleich gross gesetzt; die H1 traegt das Startwort als sr-only. */
.hero-titel { margin-bottom: 18px; }
.hero h1, .hero .tw-zeile {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: clamp(2rem, 4.8vw, 3.6rem);
    font-weight: 700;
    line-height: 1.05;
}
.hero h1 {
    margin-bottom: 0;
    white-space: normal;
    text-wrap: balance;
    overflow-wrap: break-word;
}
.hero .tw-zeile { display: block; color: var(--orange-text); min-height: 1.05em; white-space: nowrap; margin: 0; }
.typewriter-cursor {
    display: inline-block; width: 3px; height: 0.9em; background: var(--orange);
    margin-left: 4px; vertical-align: -0.08em; animation: twBlink 0.8s infinite;
}
@keyframes twBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.hero-unterzeile {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 26px;
}
[data-theme="light"] .hero-unterzeile { color: #333333; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-figur { min-width: 0; margin: 0; }
.hero-figur > svg, .hero-figur > img, .hero-figur .figur-inhalt,
.hero-figur .svg-einbettung, .hero-figur .svg-einbettung > svg { display: block; width: 100%; height: auto; max-width: 100%; }
/* Eingebettete SVG ({{svg:name}}) sind Blockelemente; ohne width-Attribut fuellen sie die Breite (kein Ueberlauf) */
.svg-einbettung { display: block; max-width: 100%; }
.svg-einbettung > svg { display: block; max-width: 100%; height: auto; }
.hero-figur figcaption, .buehne-legende-text { font-size: 0.78rem; color: var(--text-secondary); margin-top: 10px; }
/* Hero-Bild als eigener Block (bis 1024 px); ab 1025 px ohne eigene Box (display: contents): die Flaeche entfaellt, die
   Legende steht oben rechts auf dem Hintergrundbild. Reparatur 26.09. (Befund technik-design + Orchestrator Punkt 1). */
.hero-bild { display: contents; }
.hero-bild-flaeche { display: none; }
.buehne-legende {
    position: absolute; z-index: 1;
    right: max(24px, calc(env(safe-area-inset-right) + 8px));
    top: 18px;
    font-size: 0.75rem; letter-spacing: 0.03em; line-height: 1.4;
    color: var(--text-secondary);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 5px 12px;
    border-radius: 999px;
    max-width: calc(100% - 48px);
}
[data-theme="light"] .buehne-legende { color: #333333; }

/* "Auf einen Blick" (Einkaufsfakten im ersten Bildschirm, KONZEPT 5.3 Nr. 2) */
.blick {
    margin-top: 30px;
    max-width: 580px;
    background: var(--blick-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-l);
    padding: 16px 20px 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.blick-titel {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--orange-text); margin-bottom: 6px;
}
.blick table { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.45; }
.blick th {
    text-align: left; vertical-align: top; font-weight: 500; color: var(--text-secondary);
    padding: 7px 14px 7px 0; white-space: nowrap; width: 1%;
}
.blick td { vertical-align: top; padding: 7px 0; color: var(--text-primary); overflow-wrap: anywhere; }
.blick tr + tr th, .blick tr + tr td { border-top: 1px solid var(--glass-border); }
.blick a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }

.scroll-indicator {
    position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.scroll-indicator span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); }
.scroll-indicator svg { width: 20px; height: 20px; color: var(--orange-text); animation: scrollBounce 2s ease-in-out infinite; }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- 7. Seitenkopf der Unterseiten und Rechtsseiten -------------------------------- */
.page-header {
    padding: 56px 0 40px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.page-header-bg {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(ellipse at 85% 0%, rgba(232, 114, 12, 0.12), transparent 60%), var(--muster-bild);
    background-size: auto, 520px;
    background-repeat: no-repeat, repeat;
    opacity: 0.9;
}
.page-header h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); margin-bottom: 10px; max-width: 900px; overflow-wrap: break-word; }
.page-header-unterzeile { color: var(--text-secondary); max-width: 760px; font-size: 1.05rem; }
.brotkrumen { margin-bottom: 14px; font-size: 0.82rem; color: var(--text-muted); }
.brotkrumen ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.brotkrumen li { display: inline-flex; align-items: center; gap: 6px; }
.brotkrumen li + li::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid var(--text-muted); border-top: 1.5px solid var(--text-muted); transform: rotate(45deg); }
.brotkrumen a { color: var(--text-secondary); }
.brotkrumen a:hover { color: var(--orange-text); }
.brotkrumen [aria-current="page"] { color: var(--text-secondary); }

.page-content { padding: 56px 0 72px; }
.page-content .container { max-width: 800px; }
.page-content h2 { font-size: 1.4rem; margin: 36px 0 12px; color: var(--orange-text); }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.page-content p { color: var(--text-secondary); margin-bottom: 12px; font-size: 0.97rem; }
.page-content ul, .page-content ol { color: var(--text-secondary); margin: 0 0 12px; padding-left: 24px; font-size: 0.97rem; }
.page-content li { margin-bottom: 4px; }
.page-content address { font-style: normal; color: var(--text-secondary); margin-bottom: 12px; }
.rechtstext-kopf {
    border-left: 3px solid var(--orange); padding: 12px 16px; margin-bottom: 28px;
    background: var(--bg-secondary); color: var(--text-secondary); font-size: 0.95rem; border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

/* ---------- 8. Abschnitte ---------------------------------------------------------------- */
section { padding: 80px 0; }
.abschnitt-alt { background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.abschnitt-eng { padding: 48px 0; }
.section-header { text-align: center; margin: 0 auto 56px; max-width: 760px; }
.section-header.links { text-align: left; margin-left: 0; }
.section-header h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 12px; overflow-wrap: break-word; }
.section-header p { color: var(--text-secondary); font-size: 1rem; max-width: 640px; margin: 0 auto; }
.section-header.links p { margin-left: 0; }
.section-line { width: 48px; height: 3px; background: var(--orange); margin: 16px auto 0; }
.section-header.links .section-line { margin-left: 0; }

.fliesstext { max-width: 780px; }
.fliesstext.mitte { margin: 0 auto; }
.fliesstext h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0 0 14px; }
.fliesstext h3 { font-size: 1.15rem; margin: 26px 0 8px; }
.fliesstext p, .fliesstext li { color: var(--text-secondary); }
.fliesstext p { margin-bottom: 14px; }
.fliesstext ul, .fliesstext ol { padding-left: 22px; margin-bottom: 14px; }
.fliesstext li { margin-bottom: 6px; }
.fliesstext strong { color: var(--text-primary); }
.fliesstext a { text-decoration: underline; text-decoration-color: rgba(232, 114, 12, 0.4); text-underline-offset: 3px; }

.zwei-spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; align-items: start; }
.einleitung { font-size: 1.1rem; color: var(--text-secondary); max-width: 760px; }

.hinweis {
    border: 1px solid var(--border); border-left: 3px solid var(--orange);
    background: var(--bg-card); border-radius: var(--radius-s);
    padding: 16px 20px; margin: 20px 0; color: var(--text-secondary); font-size: 0.95rem;
}
.hinweis strong { color: var(--text-primary); }
.hinweis-warnung { border-left-color: var(--warnung); }
.quelle { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.quelle a { color: var(--text-secondary); text-decoration: underline; }
.klein { font-size: 0.85rem; }
.stand-zeile { margin-top: 28px; font-size: 0.85rem; color: var(--text-muted); }
.gepruefte-zeile {
    margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--border);
    font-size: 0.85rem; color: var(--text-secondary);
}

/* Listen mit Symbolen (CSS-Grafik statt Emoji) */
.haken-liste, .nicht-liste, .strich-liste { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.haken-liste li, .nicht-liste li, .strich-liste li { position: relative; padding-left: 28px; color: var(--text-secondary); }
.haken-liste li::before {
    content: ''; position: absolute; left: 3px; top: 0.42em; width: 12px; height: 7px;
    border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg);
}
.nicht-liste li::before, .nicht-liste li::after {
    content: ''; position: absolute; left: 2px; top: 0.72em; width: 14px; height: 2px; background: var(--text-muted);
}
.nicht-liste li::before { transform: rotate(45deg); }
.nicht-liste li::after { transform: rotate(-45deg); }
.strich-liste li::before { content: ''; position: absolute; left: 4px; top: 0.78em; width: 10px; height: 2px; background: var(--orange); }
.schritte { list-style: none; counter-reset: schritt; display: grid; gap: 18px; padding: 0; }
.schritte > li { counter-increment: schritt; position: relative; padding-left: 52px; color: var(--text-secondary); }
.schritte > li::before {
    content: counter(schritt); position: absolute; left: 0; top: -2px; width: 36px; height: 36px;
    border-radius: 50%; border: 2px solid var(--orange); color: var(--orange-text);
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.schritte > li strong { color: var(--text-primary); display: block; }

/* ---------- 9. Karten -------------------------------------------------------------------- */
.vorteile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.vorteile-grid.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vorteile-grid.vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vorteil-card {
    position: relative; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-s);
    padding: 32px; transition: border-color 0.3s, opacity 0.6s ease, transform 0.6s ease;
}
.vorteil-card:hover { border-color: rgba(232, 114, 12, 0.4); }
.vorteil-card::before {
    content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(232, 114, 12, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.3s;
    left: var(--mouse-x, 50%); top: var(--mouse-y, 50%);
}
.vorteil-card:hover::before { opacity: 1; }
.vorteil-card > * { position: relative; z-index: 1; }
.vorteil-number { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--orange-text); opacity: 0.4; margin-bottom: 12px; }
.vorteil-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.vorteil-card p { color: var(--text-secondary); font-size: 0.92rem; }
.vorteil-card .karten-link { display: inline-block; margin-top: 12px; font-size: 0.88rem; font-weight: 600; }
.karten-icon { width: 40px; height: 40px; color: var(--orange-text); margin-bottom: 14px; }

.tilt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; perspective: 1000px; }
.tilt-grid.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tilt-card {
    position: relative; overflow: hidden;
    background: var(--glass-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); border-radius: var(--radius-l);
    padding: 36px 28px; transition: transform 0.1s ease-out, box-shadow 0.3s; transform-style: preserve-3d;
}
.tilt-card::before {
    content: ''; position: absolute; width: 250px; height: 250px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(232, 114, 12, 0.15) 0%, transparent 70%);
    transform: translate(var(--mouse-x, -999px), var(--mouse-y, -999px)) translate(-50%, -50%);
    transition: opacity 0.3s; opacity: 0;
}
.tilt-card:hover::before { opacity: 1; }
.tilt-card:hover { box-shadow: var(--schatten-karte); }
.tilt-card > * { position: relative; }
.tilt-card-number { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--orange-text); opacity: 0.25; margin-bottom: 12px; }
.tilt-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.tilt-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* Wendekarten nur fuer Zusatzwissen (nie fuer Einkaufsfakten, EK-M8); per Tastatur drehbar */
.flip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; perspective: 800px; }
.flip-card {
    height: 190px; cursor: pointer; position: relative; transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); border-radius: var(--radius-m);
}
.flip-card.gedreht { transform: rotateY(180deg); }
@media (hover: hover) { .flip-card:hover { transform: rotateY(180deg); } }
.flip-card-front, .flip-card-back {
    position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    border-radius: var(--radius-m); border: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center;
}
.flip-card-front { background: var(--bg-card); }
.flip-card-front h3 { font-size: 1rem; margin-bottom: 4px; }
.flip-card-front p { color: var(--text-muted); font-size: 0.8rem; }
.flip-card-back { background: var(--orange-flaeche); color: #fff; transform: rotateY(180deg); }
.flip-card-back p { font-size: 0.87rem; line-height: 1.5; }

.leistungen-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.leistungen-text h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 16px; }
.leistungen-text > p { color: var(--text-secondary); margin-bottom: 20px; }
.leistungen-list { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.leistungen-list li { color: var(--text-secondary); padding-left: 20px; position: relative; font-size: 0.97rem; }
.leistungen-list li::before { content: ''; position: absolute; left: 0; top: 0.8em; width: 8px; height: 2px; background: var(--orange); }
.leistungen-image { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--border); background: var(--bg-elevated); }
.leistungen-image img { width: 100%; height: auto; display: block; }

.cross-links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cross-link-card {
    position: relative; overflow: hidden; display: block;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-s);
    padding: 18px 20px; transition: border-color 0.3s;
}
.cross-link-card:hover { border-color: var(--orange); }
.cross-link-card::before {
    content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(232, 114, 12, 0.12) 0%, transparent 70%);
    transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.3s;
    left: var(--mouse-x, 50%); top: var(--mouse-y, 50%);
}
.cross-link-card:hover::before { opacity: 1; }
.cross-link-card > * { position: relative; z-index: 1; }
.cross-link-card h3, .cross-link-card h4 { font-size: 1rem; margin-bottom: 4px; }
.cross-link-card p { font-size: 0.88rem; color: var(--text-secondary); }
.cl-domain { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); }

/* Kennzahlen: nur belegte Werte, immer 4 Kacheln (F3: clamp statt Silbentrennung "German|y") */
.stats { padding: 44px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.stats .container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.stat-item { text-align: center; padding: 12px; }
.stat-value {
    font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.3rem, 5.2vw, 1.8rem); font-weight: 700;
    color: var(--orange-text); margin-bottom: 4px; hyphens: manual; white-space: nowrap;
}
.stat-label { color: var(--text-secondary); font-size: 0.87rem; }
.stat-value.counting { animation: statPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes statPop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* Zeitleiste (hoechstens 6 Schritte, R7: jede .timeline wird einzeln beobachtet) */
.timeline-section { background: var(--bg-secondary); overflow: hidden; }
.timeline { display: flex; justify-content: space-between; position: relative; max-width: 1000px; margin: 0 auto; padding: 40px 0; list-style: none; }
.timeline::before { content: ''; position: absolute; top: 49px; left: 0; right: 0; height: 2px; background: var(--border); }
.timeline-line { position: absolute; top: 49px; left: 0; height: 2px; background: var(--orange); width: 0; transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.timeline.visible .timeline-line { width: 100%; }
.timeline-step { position: relative; z-index: 2; text-align: center; flex: 1 1 0; min-width: 0; padding: 0 6px; opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s; }
.timeline.visible .timeline-step { opacity: 1; transform: none; }
.timeline.visible .timeline-step:nth-child(3) { transition-delay: 0.15s; }
.timeline.visible .timeline-step:nth-child(4) { transition-delay: 0.3s; }
.timeline.visible .timeline-step:nth-child(5) { transition-delay: 0.45s; }
.timeline.visible .timeline-step:nth-child(6) { transition-delay: 0.6s; }
.timeline.visible .timeline-step:nth-child(7) { transition-delay: 0.75s; }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-primary); border: 3px solid var(--orange); margin: 0 auto 12px; }
.timeline.visible .timeline-dot { animation: dotPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes dotPop { from { transform: scale(0); } to { transform: scale(1); } }
.timeline-step h3, .timeline-step h4 { font-size: 0.88rem; margin-bottom: 4px; }
.timeline-step p { font-size: 0.78rem; color: var(--text-muted); }
html:not(.js) .timeline-step { opacity: 1; transform: none; }

/* Tabellen: breite Tabellen scrollen in ihrem Rahmen, nie die Seite (kein Ueberlauf bei 320 px) */
.tabelle-rahmen { position: relative; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-m); margin: 18px 0; }
table.tabelle { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--bg-card); }
table.tabelle caption { caption-side: top; text-align: left; padding: 12px 14px 4px; font-weight: 600; color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; }
table.tabelle th, table.tabelle td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.tabelle thead th { background: var(--bg-elevated); color: var(--text-primary); font-weight: 600; font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; white-space: nowrap; }
table.tabelle tbody th { color: var(--text-primary); font-weight: 600; }
table.tabelle td { color: var(--text-secondary); }
table.tabelle tr:last-child th, table.tabelle tr:last-child td { border-bottom: none; }
table.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Abbildungen. Renderings IMMER als <figure class="rendering"> mit sichtbarer Legende
   "Rendering eines Beispielteils ..." (KONZEPT 11.1, pruefe.py prueft das). */
figure.figur, figure.rendering, figure.skizze { margin: 24px 0; }
figure.figur img, figure.rendering img, figure.skizze img, figure.skizze svg, figure.figur svg {
    display: block; width: 100%; height: auto; border-radius: var(--radius-m);
}
figure.rendering img { background: var(--bg-elevated); border: 1px solid var(--border); }
figure.figur figcaption, figure.rendering figcaption, figure.skizze figcaption {
    margin-top: 10px; font-size: 0.82rem; color: var(--text-secondary);
}
figure.rendering figcaption::before {
    content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px;
    background: var(--orange); margin-right: 8px; vertical-align: 1px;
}
.svg-thema { color: var(--text-primary); }
.svg-thema .akzent { color: var(--orange-text); }

/* ---------- 10. FAQ (F13: Hoehe aus scrollHeight, <button> + aria-expanded) -------------- */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; transition: border-color 0.3s; }
.faq-item.active { border-color: rgba(232, 114, 12, 0.45); }
.faq-frage { margin: 0; font-size: 1rem; }
.faq-question {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 24px; min-height: 44px; background: none; border: none; text-align: left;
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.97rem; color: var(--text-primary);
    transition: color 0.3s;
}
.faq-question:hover { color: var(--orange-text); }
.faq-arrow { flex-shrink: 0; width: 14px; height: 14px; color: var(--text-muted); transition: transform 0.3s; }
.faq-item.active .faq-arrow { transform: rotate(180deg); color: var(--orange-text); }
.faq-answer { overflow: hidden; }
.js .faq-answer { max-height: 0; transition: max-height 0.35s ease, visibility 0s linear 0.35s; }
/* Reparatur 26.09.: eingeklappte Antworten sind unsichtbar - Links darin bekommen keinen (unsichtbaren) Tastaturfokus */
.js .faq-item:not(.active) .faq-answer { visibility: hidden; }
.js .faq-item.active .faq-answer { transition: max-height 0.35s ease, visibility 0s linear 0s; }
.faq-answer-inner { padding: 0 24px 20px; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }
.faq-answer-inner p + p { margin-top: 10px; }
.faq-answer-inner a { color: var(--orange-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 11. CTA-Band ------------------------------------------------------------------ */
.cta-section { padding: 80px 0; text-align: center; position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--border); }
.cta-bg {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: var(--muster-bild); background-size: 520px; background-repeat: repeat; opacity: 0.55;
}
.cta-bg.motiv { background-size: cover; background-position: 70% 50%; background-repeat: no-repeat; opacity: 0.12; }
.cta-section h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 12px; overflow-wrap: break-word; }
.cta-section .cta-text { color: var(--text-secondary); font-size: 1.05rem; margin: 0 auto 30px; max-width: 580px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-contact { margin-top: 26px; display: flex; gap: 12px 32px; justify-content: center; flex-wrap: wrap; color: var(--text-secondary); font-size: 0.9rem; }
.cta-contact a { color: var(--text-secondary); }
.cta-contact a:hover { color: var(--orange-text); }

/* ---------- 12. Absender-Block, Transparenz, "Was wir nicht machen" ------------------------- */
.absender { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: start; }
.absender-karte {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-l);
    padding: 26px 28px;
}
.absender-karte h3 { font-size: 1rem; margin-bottom: 10px; }
.absender-karte p, .absender-karte li { color: var(--text-secondary); font-size: 0.93rem; }
.transparenz { border-left: 3px solid var(--orange); padding: 4px 0 4px 16px; color: var(--text-secondary); margin-top: 18px; }
.nicht-machen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }

/* ---------- 13. Werkzeuge (gemeinsame Hülle; Rechenkern je Domain) --------------------------- */
.werkzeug {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-l);
    padding: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.werkzeug-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 18px; }
.werkzeug-kopf h2, .werkzeug-kopf h3 { font-size: 1.3rem; }
.werkzeug-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; align-items: start; }
.werkzeug-eingaben, .werkzeug-ergebnis { min-width: 0; }
.werkzeug-ergebnis { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 20px; }
.werkzeug-ergebnis[aria-busy="true"] { opacity: 0.6; }
.werkzeug-hinweis { font-size: 0.85rem; color: var(--text-secondary); margin-top: 14px; }
.werkzeug-fuss { font-size: 0.82rem; color: var(--text-muted); margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
.werkzeug-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.werkzeug-buehne { border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--bg-card); padding: 26px 28px; }
.anfrage-baustein {
    white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem;
    background: var(--bg-primary); border: 1px dashed var(--border-hover); border-radius: var(--radius-s); padding: 14px; color: var(--text-secondary);
}
.ampel { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; }
.ampel::before { content: ''; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); }
.ampel-gruen::before { background: var(--erfolg); }
.ampel-gelb::before { background: var(--warnung); }
.ampel-rot::before { background: var(--fehler); }
.stufe { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }
.stufe::before { content: ''; width: 10px; height: 10px; flex-shrink: 0; border: 2px solid var(--text-secondary); }
.stufe-geometrie::before { background: var(--text-secondary); }
.stufe-norm::before { background: var(--text-secondary); border-radius: 2px; transform: scale(0.8); }
.stufe-faustregel::before { background: transparent; }
.stufe-evotec::before { background: var(--orange); border-color: var(--orange); border-radius: 50%; }

/* ---------- 14. Formulare (Kontakt, Bestellweg, Werkzeuge) -------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.kontakt-einleitung { margin-bottom: 26px; }
.kontakt-einleitung p { color: var(--text-secondary); margin-bottom: 12px; font-size: 0.97rem; }
.contact-form { scroll-margin-top: 90px; }
.contact-info h2 { font-size: 1.5rem; margin-bottom: 14px; }
.contact-info p { color: var(--text-secondary); margin-bottom: 14px; font-size: 0.95rem; }
.contact-detail { padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-detail strong {
    display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin-bottom: 4px; font-weight: 600;
}
.contact-detail span, .contact-detail a, .contact-detail address { font-size: 1rem; font-style: normal; }
.was-uns-hilft { margin-top: 26px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 20px 22px; }
.was-uns-hilft h3 { font-size: 1rem; margin-bottom: 12px; }
.contact-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 32px; min-width: 0; }
.contact-form h2 { font-size: 1.35rem; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-group { margin-bottom: 16px; min-width: 0; }
.form-group > label, .form-label { display: block; font-size: 0.87rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group textarea,
.form-group select,
.feld {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 11px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem; /* >= 16 px: iOS zoomt sonst beim Antippen (Vorlage: 15,2 px) */
    line-height: 1.4;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus, .feld:focus {
    outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232, 114, 12, 0.15);
}
.form-group input:user-invalid, .form-group textarea:user-invalid, .form-group select:user-invalid { border-color: var(--fehler); }
.form-group textarea { resize: vertical; min-height: 140px; }
/* F1: Datei-Feld darf das Raster nicht aufspreizen (Vorlage: +29 px bei 320 px) */
.form-group input[type="file"] { padding: 10px; font-size: 1rem; cursor: pointer; color: var(--text-secondary); }
.form-group input[type="file"]::file-selector-button {
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.88rem; color: var(--orange-text);
    background: transparent; border: 2px solid var(--orange-text); border-radius: 6px; padding: 7px 14px; margin-right: 12px;
    cursor: pointer; transition: background 0.2s, color 0.2s;
}
.form-group input[type="file"]::file-selector-button:hover { background: var(--orange-flaeche); border-color: var(--orange-flaeche); color: #fff; }
.datei-liste { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.datei-liste li { display: flex; justify-content: space-between; gap: 12px; color: var(--text-secondary); overflow-wrap: anywhere; }
.datei-liste li.falsch { color: var(--fehler); }
.datei-liste .groesse { white-space: nowrap; color: var(--text-muted); }
.datei-meldung { margin-top: 8px; font-size: 0.9rem; color: var(--fehler); }
.datei-meldung:empty { display: none; }
/* F2: Einwilligungszeile als Flex mit Text in einem <span> */
.form-check, .form-group > label.form-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 0.93rem; font-weight: 400; color: var(--text-secondary); margin-bottom: 0; }
.form-check input { flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--orange); }
.form-check span { min-width: 0; }
.form-submit { margin-top: 10px; }
.form-note, .form-hinweis { font-size: 0.83rem; color: var(--text-muted); margin-top: 12px; }
.form-hinweis a { color: var(--text-secondary); text-decoration: underline; }
.form-rechtstext { margin-top: 18px; font-size: 0.82rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 14px; }
.form-rechtstext p + p { margin-top: 8px; }
.form-rechtstext a { color: var(--text-secondary); text-decoration: underline; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
details.zusatzangaben { border: 1px solid var(--border); border-radius: var(--radius-s); margin: 4px 0 16px; background: var(--bg-primary); }
details.zusatzangaben summary {
    cursor: pointer; padding: 12px 16px; font-weight: 600; font-family: 'Space Grotesk', sans-serif; font-size: 0.93rem;
    list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px;
}
details.zusatzangaben summary::-webkit-details-marker { display: none; }
details.zusatzangaben summary::after {
    content: ''; width: 8px; height: 8px; border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange);
    transform: rotate(45deg); transition: transform 0.25s; margin-left: 12px; flex-shrink: 0;
}
details.zusatzangaben[open] summary::after { transform: rotate(-135deg); }
details.zusatzangaben .zusatz-inhalt { padding: 4px 16px 6px; }
/* Rueckmeldungen: ohne JavaScript per :target sichtbar (send-mail.php haengt #fehler-<grund> an) */
.form-status { display: none; border-radius: var(--radius-m); padding: 14px 18px; margin-bottom: 20px; font-size: 0.95rem; border-left: 4px solid var(--fehler); background: rgba(239, 68, 68, 0.1); color: var(--text-primary); }
.form-status:target, .form-status.zeigen { display: block; }
.form-status.erfolg { border-left-color: var(--erfolg); background: rgba(16, 185, 129, 0.1); }
.form-status strong { display: block; margin-bottom: 2px; }
.werkzeug-uebernahme { display: none; scroll-margin-top: 90px; }
.werkzeug-uebernahme.zeigen { display: block; border-left-color: var(--orange); background: var(--orange-glow); }

/* Danke-Seite */
.danke-nummer {
    display: inline-flex; flex-direction: column; gap: 4px; margin: 24px 0; padding: 18px 26px;
    border: 1px solid var(--orange); border-radius: var(--radius-l); background: var(--orange-glow);
}
/* Platz fuer die Nummer ist reserviert (kein Layoutsprung, CLS), sichtbar erst mit gueltiger Nummer */
.js .nur-mit-nummer.wartet { visibility: hidden; }
.danke-nummer .label { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); }
/* Hoehe der (anfangs leeren) Nummernzeile fest reservieren: sonst schiebt das Einsetzen der Nummer alles
   darunter um eine Zeile nach unten (gemessen CLS 0,257 bei 768 px). */
.danke-nummer .nummer { display: block; min-height: 1.3em; line-height: 1.3; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 5vw, 2rem); color: var(--text-primary); letter-spacing: 0.04em; overflow-wrap: anywhere; }

/* 404 */
.fehler-seite { padding: 72px 0 88px; }
.fehler-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.fehler-seite .fehler-code { font-family: 'Space Grotesk', sans-serif; font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 700; color: var(--orange-text); line-height: 1; margin-bottom: 12px; }
.fehler-seite h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 14px; }
.fehler-seite p { color: var(--text-secondary); margin-bottom: 18px; }
.fehler-links { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 22px 0 20px; }
.fehler-links a {
    display: flex; align-items: center; min-height: 48px; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius-s); background: var(--bg-card); color: var(--text-primary); font-weight: 500;
}
.fehler-links a:hover { border-color: var(--orange); color: var(--orange-text); }
.fehler-svg { color: var(--text-secondary); }
.fehler-svg .akzent { color: var(--orange-text); }

/* ---------- 15. Mega-Footer (4 Spalten, genau ein Markenlink, kein Domain-Linkkreis) ------- */
.mega-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 60px 0 24px; }
.mega-footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; margin-bottom: 44px; }
.mega-footer-grid.drei { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr); }
.mega-footer-about .logo { margin-bottom: 14px; }
.mega-footer-about p { color: var(--text-secondary); font-size: 0.87rem; margin-bottom: 10px; }
.mega-footer-about address { font-style: normal; color: var(--text-secondary); font-size: 0.87rem; margin-bottom: 10px; }
/* Fussspalte "Ueber diese Fachseite" (GEMEINSAM footer.spalten[0]): Titel unter dem Logo, ISO-Satz mit Geltungsbereich */
.fuss-titel-ueber { margin: 4px 0 10px; }
.mega-footer-about .fuss-iso { font-size: 0.8rem; color: var(--text-muted); }
.fuss-label { color: var(--text-muted); font-size: 0.8rem; }
.fuss-titel {
    font-family: 'Space Grotesk', sans-serif; font-size: 0.8rem; margin-bottom: 14px;
    text-transform: uppercase; letter-spacing: 1.5px; color: var(--orange-text); font-weight: 600;
}
.mega-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 4px; padding: 0; }
.mega-footer-col ul a, .mega-footer-col .consent-link {
    display: inline-block; padding: 3px 0; color: var(--text-secondary); font-size: 0.85rem;
    transition: color 0.2s, padding-left 0.2s;
}
.mega-footer-col ul a:hover, .mega-footer-col .consent-link:hover { color: var(--orange-text); padding-left: 4px; }
.consent-link { background: none; border: none; font-family: inherit; text-align: left; cursor: pointer; }
.fuss-b2b { margin-top: 14px; font-size: 0.8rem; color: var(--text-muted); }
.fuss-marke { margin-top: 10px; font-size: 0.85rem; color: var(--text-secondary); }
.fuss-marke a { color: var(--text-primary); white-space: nowrap; }
.fuss-marke a:hover { color: var(--orange-text); }
.mega-footer-bottom {
    border-top: 1px solid var(--border); padding-top: 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    color: var(--text-muted); font-size: 0.8rem;
}
.mega-footer-legal { list-style: none; display: flex; gap: 24px; padding: 0; }
.mega-footer-bottom a { color: var(--text-muted); }
.mega-footer-bottom a:hover { color: var(--orange-text); }

/* ---------- 16. Bewegung, Fortschritt, Filmkorn, Nach oben --------------------------------- */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 100%;
    transform-origin: 0 50%; transform: scaleX(0);
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    z-index: 10000; box-shadow: 0 0 10px rgba(232, 114, 12, 0.5); pointer-events: none;
}
.grain {
    position: fixed; inset: 0; pointer-events: none; z-index: 9998; opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat; background-size: 200px;
}
/* R8: Einblenden nur, wenn JavaScript laeuft (html.js aus theme-start.js) */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal-left { opacity: 0; transform: translateX(-60px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal-right { opacity: 0; transform: translateX(60px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.visible, .js .reveal-left.visible, .js .reveal-right.visible { opacity: 1; transform: none; }
/* Unter 1100 px seitlich eingeblendete Elemente senkrecht einfahren: translateX(60px) ragte vor dem
   Einblenden ueber den Rand und verbreiterte auf Telefonen die Seite (gemessen: 390 -> 426 px). */
@media (max-width: 1100px) {
    .js .reveal-left:not(.visible), .js .reveal-right:not(.visible) { transform: translateY(40px); }
}
.js .vorteile-grid .vorteil-card { opacity: 0; transform: translateY(30px); }
.js .vorteile-grid.visible .vorteil-card { opacity: 1; transform: none; }
.vorteile-grid .vorteil-card:nth-child(2) { transition-delay: 0.12s; }
.vorteile-grid .vorteil-card:nth-child(3) { transition-delay: 0.24s; }
.vorteile-grid .vorteil-card:nth-child(4) { transition-delay: 0.36s; }
.vorteile-grid .vorteil-card:nth-child(5) { transition-delay: 0.48s; }
.vorteile-grid .vorteil-card:nth-child(6) { transition-delay: 0.6s; }
.js .section-line { width: 0; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.js .section-line.visible { width: 48px; }
.img-reveal { position: relative; overflow: hidden; }
.js .img-reveal::after {
    content: ''; position: absolute; inset: 0; background: var(--orange); z-index: 2;
    transform: scaleX(1); transform-origin: right; transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.js .img-reveal.visible::after { transform: scaleX(0); }
.js .img-reveal img { transform: scale(1.15); transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.js .img-reveal.visible img { transform: scale(1); }

.scroll-top {
    position: fixed; bottom: 32px; right: 32px; width: 44px; height: 44px;
    background: var(--orange-flaeche); color: #fff; border: none; border-radius: 50%;
    z-index: 9997; display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(20px); pointer-events: none;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 16px rgba(232, 114, 12, 0.3);
}
.scroll-top.show { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { box-shadow: 0 8px 30px rgba(232, 114, 12, 0.5); transform: translateY(-2px); }
.scroll-top svg { width: 20px; height: 20px; }

/* Lightbox (F12: jede Kachel mit .lightbox-trigger; schliesst per Overlay, x und Escape) */
.lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92); z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-overlay img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-m); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); transform: scale(0.94); transition: transform 0.3s; }
.lightbox-overlay.active img { transform: scale(1); }
.lightbox-close {
    position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right));
    width: 44px; height: 44px; background: none; border: none; color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.15); }
.lightbox-close svg { width: 24px; height: 24px; }
.lightbox-trigger { cursor: zoom-in; border: none; padding: 0; background: none; display: block; width: 100%; border-radius: var(--radius-m); transition: transform 0.3s, box-shadow 0.3s; }
.lightbox-trigger:hover { transform: scale(1.01); box-shadow: 0 8px 30px rgba(232, 114, 12, 0.2); }

/* Galerie mit Filter, horizontale Kartenleiste (wie Vorlage) */
.gallery-filter { display: flex; gap: 8px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.gallery-filter button {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
    padding: 8px 20px; min-height: 40px; border-radius: 20px; font-size: 0.87rem; transition: all 0.3s;
}
.gallery-filter button.active, .gallery-filter button:hover { background: var(--orange-flaeche); color: #fff; border-color: var(--orange-flaeche); }
.masonry-grid { columns: 3; column-gap: 16px; }
.masonry-item { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--border); position: relative; }
.masonry-item img { width: 100%; display: block; }
.masonry-item.hidden { display: none; }
.hscroll-track {
    display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; padding-bottom: 18px;
}
.hscroll-card { flex: 0 0 340px; max-width: 86%; scroll-snap-align: start; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; }
.hscroll-card-body { padding: 22px; }
.hscroll-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.hscroll-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ---------- 17. Einwilligung (Banner + Zahnrad), Texte aus kit.js --------------------------- */
.consent-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.consent-overlay.show { opacity: 1; visibility: visible; }
.consent-box {
    background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-m);
    width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.consent-header { padding: 22px 24px 0; display: flex; align-items: center; gap: 12px; }
.consent-header svg { flex-shrink: 0; width: 24px; height: 24px; color: var(--orange-text); }
.consent-header h2 { font-size: 1.12rem; font-weight: 700; }
.consent-body { padding: 14px 24px 6px; }
.consent-body > p { font-size: 0.87rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; }
.consent-body > p a { color: var(--orange-text); text-decoration: underline; }
.consent-category { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.consent-cat-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bg-elevated); }
.consent-cat-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.consent-cat-name { font-family: 'Space Grotesk', sans-serif; font-size: 0.92rem; font-weight: 600; }
.consent-cat-badge { font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 3px; background: rgba(232, 114, 12, 0.15); color: var(--orange-text); font-family: 'Space Grotesk', sans-serif; }
.consent-cat-desc { padding: 10px 14px 12px; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }
.consent-toggle { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.consent-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.consent-toggle input:disabled { cursor: not-allowed; }
.consent-toggle-slider { position: absolute; inset: 0; background: #555; border-radius: 26px; transition: background 0.2s; pointer-events: none; }
.consent-toggle-slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.consent-toggle input:checked + .consent-toggle-slider { background: var(--orange); }
.consent-toggle input:checked + .consent-toggle-slider::before { transform: translateX(18px); }
.consent-toggle input:disabled + .consent-toggle-slider { opacity: 0.6; }
.consent-toggle input:focus-visible + .consent-toggle-slider { outline: 2px solid var(--orange); outline-offset: 2px; }
/* "Alle ablehnen" und "Alle akzeptieren" gleichwertig: gleiche Groesse, gleiche Farbe, erste Ebene */
/* Reparatur 26.09.: Knoepfe kleben am unteren Rand der scrollenden Box - auf Telefonen (320 x 568 bis 390 x 844) ist die
   Wahl ohne Scrollen sichtbar; der Text laeuft darueber. Die Beschreibung „Notwendig“ ist zugeklappt (Details). */
.consent-buttons {
    padding: 10px 24px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    position: sticky; bottom: 0; z-index: 1; background: var(--bg-card); border-top: 1px solid var(--border);
}
.consent-details summary {
    cursor: pointer; list-style: none; padding: 8px 14px 10px; font-size: 0.8rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px; min-height: 36px;
}
.consent-details summary::-webkit-details-marker { display: none; }
.consent-details summary::before {
    content: ''; width: 7px; height: 7px; border-right: 2px solid var(--orange-text); border-bottom: 2px solid var(--orange-text);
    transform: rotate(-45deg); transition: transform 0.2s; flex-shrink: 0;
}
.consent-details[open] summary::before { transform: rotate(45deg); }
.consent-details .consent-cat-desc { padding-top: 0; }
.consent-btn {
    min-height: 46px; padding: 11px 16px; border-radius: 6px;
    font-family: 'Space Grotesk', sans-serif; font-size: 0.93rem; font-weight: 600;
    border: 2px solid var(--orange-flaeche); text-align: center; transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.consent-btn-wahl { background: var(--orange-flaeche); color: #fff; }
.consent-btn-wahl:hover { background: var(--orange-flaeche-hover); border-color: var(--orange-flaeche-hover); box-shadow: 0 4px 16px rgba(232, 114, 12, 0.3); }
.consent-btn-speichern { grid-column: 1 / -1; background: transparent; color: var(--text-primary); border-color: var(--border-hover); }
.consent-btn-speichern:hover { border-color: var(--orange-text); color: var(--orange-text); }
.consent-footer { padding: 12px 24px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 14px; flex-wrap: wrap; }
.consent-footer a { color: var(--text-secondary); text-decoration: underline; }
.consent-settings-btn {
    position: fixed; bottom: 20px; left: 20px; width: 44px; height: 44px; z-index: 9997;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--text-muted);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2); transition: border-color 0.2s, color 0.2s;
}
.consent-settings-btn:hover { border-color: var(--orange); color: var(--orange-text); }
@media (max-width: 1024px) { .consent-settings-btn { display: none; } }
.consent-settings-btn svg { width: 18px; height: 18px; }

/* ---------- 18. Umbrueche ------------------------------------------------------------------ */
@media (min-width: 1025px) and (max-width: 1100px) {
    .hauptnav { gap: 18px; }
    .hauptnav > a, .nav-dd-btn { font-size: 0.85rem; }
    .header-right { gap: 16px; }
}
@media (max-width: 1024px) {
    /* Burger ab 1024 px (Vorlage 768 px): die Navigationspunkte der Fachdomains sind laenger
       ("Legierungs-Wahlhilfe", "Platten und Gehaeuse"); so bleibt die Kopfzeile ohne Verdichtung einreihig. */
    .hauptnav { display: none; }
    .mobile-toggle { display: flex; }
    .header-right { gap: 8px; }
    .hero-raster { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hero-text { max-width: 720px; }
    /* Reparatur 26.09.: das Rendering liegt nicht mehr hinter Text und Knoepfen, sondern als eigener Block darunter */
    .hero.hero-mit-bild { min-height: 0; padding: 36px 0 48px; }
    .hero-mit-bild .hero-buehne, .hero-mit-bild .hero-schleier { display: none; }
    .hero-bild {
        display: block; position: relative; margin: 26px 0 0; border-radius: var(--radius-l); overflow: hidden;
        border: 1px solid var(--border); background: var(--bg-card); box-shadow: var(--schatten-karte);
    }
    .hero-bild-flaeche { display: block; aspect-ratio: 16 / 10; background-repeat: no-repeat; background-color: var(--bg-card); }
    .hero-bild .buehne-legende { top: auto; right: auto; left: 12px; bottom: 12px; max-width: calc(100% - 24px); }
    .hero-mit-bild .blick { margin-top: 22px; }
    .contact-form { order: -1; }
    .vorteile-grid, .tilt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vorteile-grid.vier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .flip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leistungen-content, .contact-grid, .absender, .nicht-machen { grid-template-columns: minmax(0, 1fr); }
    .masonry-grid { columns: 2; }
    .mega-footer-grid, .mega-footer-grid.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fehler-raster { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1025px) {
    .mobile-sidebar, .mobile-sidebar-overlay { display: none; }
}
@media (max-width: 768px) {
    section { padding: 64px 0; }
    .topbar .container { justify-content: center; text-align: center; }
    .topbar-contact { gap: 6px 14px; justify-content: center; }
    .kopf { padding: 8px 0; }
    .kopf.scrolled { padding: 6px 0; }
    .kopf .container { gap: 10px; flex-wrap: wrap; row-gap: 6px; }
    .logo { gap: 7px; }
    .logo img { height: 22px; }
    .header-right { gap: 4px; margin-left: auto; }
    .hero { min-height: 0; padding: 36px 0 56px; }
    .hero-schleier {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.78) 80%, var(--bg-primary) 100%);
    }
    [data-theme="light"] .hero-schleier {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.78) 45%, rgba(255, 255, 255, 0.9) 80%, var(--bg-primary) 100%);
    }
    .blick { margin-top: 26px; }
    .scroll-indicator { display: none; }
    .vorteile-grid, .vorteile-grid.zwei, .vorteile-grid.vier, .tilt-grid, .tilt-grid.zwei { grid-template-columns: minmax(0, 1fr); }
    .zwei-spalten, .werkzeug-raster, .cross-links-grid { grid-template-columns: minmax(0, 1fr); }
    .stats .container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .contact-form, .werkzeug { padding: 22px; }
    .timeline { flex-direction: column; gap: 22px; padding: 16px 0; }
    .timeline::before, .timeline-line { display: none; }
    .timeline-step { opacity: 1; transform: none; }
    .masonry-grid { columns: 1; }
    .mega-footer-grid, .mega-footer-grid.drei { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .section-header { margin-bottom: 40px; }
}
@media (max-width: 560px) {
    h1, h2, h3, h4, p, li, dd, dt, figcaption, td, th, .faq-question span, .stat-label {
        overflow-wrap: break-word; word-break: break-word;
    }
    h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; }
    .blick table, .blick tbody, .blick tr, .blick th, .blick td { display: block; width: auto; }
    .blick tr { padding: 8px 0; }
    .blick tr + tr { border-top: 1px solid var(--glass-border); }
    .blick th, .blick td { padding: 0; }
    .blick tr + tr th, .blick tr + tr td { border-top: none; }
    .blick th { font-size: 0.78rem; letter-spacing: 0.02em; margin-bottom: 1px; }
    .fehler-links { grid-template-columns: minmax(0, 1fr); }
    .consent-buttons { grid-template-columns: minmax(0, 1fr); }
    .consent-btn-speichern { grid-column: auto; }
    .flip-grid { grid-template-columns: minmax(0, 1fr); }
    .flip-card { height: 170px; }
}
@media (max-width: 480px) {
    .consent-overlay { padding: 0; align-items: flex-end; }
    .consent-box { border-radius: var(--radius-m) var(--radius-m) 0 0; max-height: 92vh; }
}
@media (max-width: 470px) {
    .kopf .container { padding-left: 16px; padding-right: 16px; }
}
/* Telefon quer (niedrig): Burger wie Hochformat; das Hero-Bild flacher, damit es nicht hoeher als der Bildschirm wird */
@media (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: 0; }
    .hero-bild-flaeche { aspect-ratio: 21 / 9; }
}

/* ---------- 19. Duo-Schicht (iPhone Duo, 11.09.2026; aus der Vorlage uebernommen) ---------- */
@supports (height: 100dvh) {
    .hero { min-height: min(88dvh, 860px); }
    .consent-box { max-height: 90dvh; }
    .lightbox-overlay img { max-height: 88dvh; }
}
@media (max-width: 768px) {
    @supports (height: 100dvh) { .hero { min-height: 0; } }
}
@supports (padding: max(0px, env(safe-area-inset-left))) {
    .container {
        padding-left: max(24px, calc(env(safe-area-inset-left) + 8px));
        padding-right: max(24px, calc(env(safe-area-inset-right) + 8px));
    }
    @media (max-width: 470px) {
        .kopf .container {
            padding-left: max(16px, calc(env(safe-area-inset-left) + 8px));
            padding-right: max(16px, calc(env(safe-area-inset-right) + 8px));
        }
    }
    .mobile-sidebar { padding-right: calc(env(safe-area-inset-right) + 4px); }
    .scroll-top {
        right: max(32px, calc(env(safe-area-inset-right) + 12px));
        bottom: max(32px, calc(env(safe-area-inset-bottom) + 12px));
    }
    .consent-settings-btn {
        left: max(20px, calc(env(safe-area-inset-left) + 8px));
        bottom: max(20px, calc(env(safe-area-inset-bottom) + 8px));
    }
    .consent-overlay { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    footer.mega-footer, .mega-footer { padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px)); }
}
/* Innenflaeche aufgeklappt (beide Lagen) */
@media (min-width: 600px) and (max-width: 1000px) and (min-height: 560px) {
    .hero h1, .hero .tw-zeile { font-size: 3.1rem; }
    .section-header h2 { font-size: 2rem; }
    .mobile-sidebar a { padding-top: 17px; padding-bottom: 17px; }
    .mobile-sidebar { width: 360px; max-width: 62vw; }
    .mega-footer-col ul a { padding: 7px 0; }
}
/* Aufgeklappt quer (951 x 669): gerade Spaltenzahlen, Mittelrinne auf der Falz */
@media (min-width: 640px) and (max-width: 1000px) and (min-height: 560px) and (orientation: landscape) {
    .hero-raster { grid-template-columns: minmax(0, 1fr); }
    .leistungen-content, .contact-grid, .absender, .nicht-machen, .zwei-spalten, .werkzeug-raster, .fehler-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
    .stats .container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
    .vorteile-grid, .vorteile-grid.zwei, .vorteile-grid.vier, .tilt-grid, .tilt-grid.zwei, .flip-grid, .cross-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
    .mega-footer-grid, .mega-footer-grid.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; }
    .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .hero-buttons, .cta-buttons { gap: 44px; }
    .gallery-filter { justify-content: flex-start; }
}
/* Aufgeklappt hoch (669 x 951) */
@media (min-width: 600px) and (max-width: 900px) and (min-height: 560px) and (orientation: portrait) {
    .vorteile-grid, .vorteile-grid.zwei, .vorteile-grid.vier, .tilt-grid, .flip-grid, .cross-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .stats .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mega-footer-grid, .mega-footer-grid.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
    .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

/* ---------- 20. F8: Bewegung reduzieren (steht nach allen Animationsregeln) ---------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001ms; animation-iteration-count: 1; transition-duration: 0.001ms; scroll-behavior: auto; }
    .hero-buehne.studiofahrt, .hero-buehne.ken-burns, .scroll-indicator svg, .typewriter-cursor { animation: none; }
    .js .reveal, .js .reveal-left, .js .reveal-right, .js .vorteile-grid .vorteil-card { opacity: 1; transform: none; }
    .js .section-line { width: 48px; }
    .js .img-reveal::after { transform: scaleX(0); }
    .js .img-reveal img { transform: none; }
    .timeline-step { opacity: 1; transform: none; }
    .timeline-line { width: 100%; }
}

/* ---------- 21. Druck (Werkzeug-Ergebnis, AGB, Danke-Seite) --------------------------------- */
.druck-kopf { display: none; }
@media print {
    /* Reparatur 26.09.: „Ergebnis drucken“ setzt body.druck-ergebnis - gedruckt wird nur der Abschnitt mit der Klasse
       druck-ziel (das Werkzeug), mit Druckzeile (Werkzeug, Adresse, Datum) statt der ganzen Seite. */
    body.druck-ergebnis main > section:not(.druck-ziel), body.druck-ergebnis main > .container,
    body.druck-ergebnis .werkzeug-eingaben, body.druck-ergebnis .werkzeug-kopf .w3-kopfzeile { display: none; }
    body.druck-ergebnis .druck-kopf { display: block; font-size: 10pt; color: #000; margin-bottom: 8pt; }
    body.druck-ergebnis .werkzeug-raster { display: block; }
    :root, [data-theme="dark"], [data-theme="light"] {
        --bg-primary: #fff; --bg-secondary: #fff; --bg-card: #fff; --bg-elevated: #f3f3f3;
        --text-primary: #000; --text-secondary: #222; --text-muted: #555; --border: #bbb;
    }
    body { background: #fff; color: #000; }
    .topbar, .kopf, .mega-footer, .cta-section, .scroll-top, .scroll-progress, .grain, .consent-overlay,
    .consent-settings-btn, .mobile-sidebar, .mobile-sidebar-overlay, .hero-buehne, .hero-schleier,
    .hero-muster, .werkzeug-knoepfe, .nicht-drucken, .brotkrumen, .page-header-bg, .skip-link { display: none; }
    .hero { min-height: 0; padding: 0 0 12px; }
    section, .page-content { padding: 12px 0; }
    .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; }
    a { color: #000; text-decoration: underline; }
    .werkzeug, .werkzeug-ergebnis { box-shadow: none; border-color: #999; }
    .js .faq-answer, .faq-answer { max-height: none; }
    .js .faq-item .faq-answer { visibility: visible; }
}
