/* ============================================================
   IHRCARPORT.EU — Design-System "Technisches Datenblatt"
   Engineering-Papier + Stahl-Tinte + Signal-Orange.
   Typo: Barlow Condensed (Display) · IBM Plex Sans (Text) · IBM Plex Mono (Messwerte)
   Verbindliche Referenz fuer alle Templates: STYLEGUIDE_DESIGN.md
   Namenskonvention (englische Hooks, BEM, alt -> neu): docs/NAMING.md
   ============================================================ */

/* ---------------------------------------------------------- Schriften
   Lokal gehostete Schriften (DSGVO: keine Google-CDN-Einbindung!).
   Dateien liegen unter static/fonts/ — Download via scripts/download_fonts.py.
   Lizenzen: SIL OFL (Barlow Condensed, IBM Plex).
   Hinweis: base.html laedt IBMPlexSans-400 und BarlowCondensed-700 per
   rel="preload" vor — deren URLs muessen zu den src-URLs hier passen. */

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/BarlowCondensed-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/BarlowCondensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/BarlowCondensed-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/IBMPlexSans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/IBMPlexSans-400i.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/IBMPlexSans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/IBMPlexSans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/IBMPlexMono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/IBMPlexMono-500.woff2') format('woff2');
}

:root {
  /* Farben */
  --paper: #F4F2EC;          /* warmes Zeichenpapier */
  --paper-deep: #EAE7DE;     /* abgesetzte Flaechen */
  --white: #FDFCFA;           /* Karten auf Papier */
  --line: #D9D4C7;           /* Haarlinien, Rahmen */
  --grid: rgba(30, 36, 44, .055);  /* Blueprint-Raster */
  --ink: #1E242C;           /* Stahl-Tinte: Text, dunkle Flaechen */
  --ink-70: #454E5B;        /* Sekundaertext */
  --ink-45: #666E7A;        /* Nebentext, Captions (WCAG AA auf Papier) */
  --steel-light: #E4E6E9;      /* helle Elemente auf Tinte */
  --accent: #E4570F;          /* Signal-Orange: CTA-Flaechen, Grafik-Akzente — SPARSAM */
  --accent-deep: #C2470A;     /* Hover */
  --accent-text: #A83E09;     /* Orange als TEXT auf Papier (WCAG AA, 5,6:1) */
  --accent-pale: #FBE9DE;    /* Hintergrund-Hinweise */
  --success: #2E7D4F;
  --error: #B3261E;

  /* Typografie */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-text: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Masse */
  --radius: 3px;              /* kantig — Stahlprofil, kein Spielzeug */
  --shadow: 0 1px 2px rgba(30,36,44,.07), 0 8px 24px -12px rgba(30,36,44,.18);
  --shadow-high: 0 2px 4px rgba(30,36,44,.08), 0 20px 48px -16px rgba(30,36,44,.28);
  --container: 1180px;
  --spacing: clamp(3.5rem, 8vw, 6.5rem);   /* vertikaler Sektionsabstand */
}

/* ---------------------------------------------------------- Reset-Basis */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
main a:not(.btn) { text-decoration-color: var(--accent); text-underline-offset: 3px; }
main a:not(.btn):hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

/* Skip-Link (base.html): visuell versteckt, erst bei Tastaturfokus sichtbar. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--steel-light);
  font-family: var(--font-text); font-size: .95rem;
  padding: .6rem 1.1rem; border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------- Typo-Klassen */
h1, h2, h3, .title-xl, .title-l, .title-m {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0 0 .5em;
}
.title-xl { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.title-l  { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.title-m  { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
.eyebrow {                                   /* kleine Zeile UEBER dem Titel */
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text);
  margin: 0 0 1rem;
}
.eyebrow::before { content: ''; width: 2.2em; height: 2px; background: var(--accent); }
.mono { font-family: var(--font-mono); }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-70); max-width: 46em; }
.subtext { font-size: .92rem; color: var(--ink-45); }
p { margin: 0 0 1em; }

/* ---------------------------------------------------------- Layout */
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.container.narrow { max-width: 820px; }
.section { padding-block: var(--spacing); }
.section--deep { background: var(--paper-deep); }
.section--dark { background: #0D1116; color: var(--steel-light); }  /* tiefer Dunkelton = .footer__regions (hell wie dunkel) */
.section--dark .lead { color: #B8BEC7; }
.section--grid {                          /* Blueprint-Millimeterpapier */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.grid-2 { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); }
.grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------- Bemassung (Signatur-Element)
   <div class="dimensions"><span class="dimensions__value">5,60 m</span></div>
   ergibt:  |——— 5,60 m ———|  wie in einer technischen Zeichnung */
.dimensions {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-mono); font-size: .82rem; color: var(--ink-70);
}
.dimensions::before, .dimensions::after {
  content: ''; flex: 1; height: 1px; background: var(--ink-45);
  position: relative; min-width: 1.5rem;
}
.dimensions { position: relative; }
.dimensions::before { box-shadow: inset 2px 0 0 var(--ink-45), inset 0 4px 0 -3px transparent; }
.dimensions::before { border-left: 1px solid var(--ink-45); height: 9px; background:
  linear-gradient(var(--ink-45), var(--ink-45)) center / 100% 1px no-repeat; }
.dimensions::after  { border-right: 1px solid var(--ink-45); height: 9px; background:
  linear-gradient(var(--ink-45), var(--ink-45)) center / 100% 1px no-repeat; }
.dimensions__value { white-space: nowrap; }

/* ---------------------------------------------------------- Pruefstempel (Trust-Badge)
   <span class="stamp"><b>250</b> kg/m² Schneelast</span> */
.stamp {
  display: inline-grid; place-content: center; text-align: center;
  width: 7.5rem; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--accent);
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
  transform: rotate(-7deg); padding: .8rem; line-height: 1.25;
}
.stamp b { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.section--dark .stamp { box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 5px var(--accent); }

/* ---------------------------------------------------------- Buttons */
.btn {
  display: inline-block; padding: .95rem 2.05rem;
  font-family: var(--font-display); font-size: 1.14rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
/* Button-Gruppe (Hero/Regionen): fester Abstand statt Leerzeichen, bricht sauber um */
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem .8rem; align-items: center; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--paper); }
.section--dark .btn--secondary { color: var(--steel-light); border-color: var(--steel-light); }
.section--dark .btn--secondary:hover { background: var(--steel-light); color: var(--ink); }
.btn--small { padding: .55rem 1.2rem; font-size: 1rem; }
.btn--wide { display: block; width: 100%; text-align: center; }
.btn[disabled], .btn.locked { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------- Karten */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card__inner { padding: clamp(1.2rem, 3vw, 1.8rem); }
.product-card { display: flex; flex-direction: column; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-high); }
.product-card__image { aspect-ratio: 4 / 2.6; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }
.product-card__inner { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.product-card .dimensions { margin-top: .2rem; }
.product-card__footer { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: .9rem; }

/* Preis-Auszeichnung */
.price { font-family: var(--font-mono); font-weight: 500; font-size: 1.5rem; white-space: nowrap; }
.price__from { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-45); display: block; }
.price__note { font-size: .72rem; color: var(--ink-45); display: block; }

/* ---------------------------------------------------------- Datenblatt (Spec-Tabelle) */
.spec-sheet { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-sheet th, .spec-sheet td { padding: .55rem .2rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-sheet th { font-weight: 600; width: 42%; color: var(--ink-70); }
.spec-sheet td { font-family: var(--font-mono); font-size: .88rem; }

/* Standard-Tabellen (Zonen, Admin) */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); }
.table th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em;
  font-size: .92rem; background: var(--ink); color: var(--steel-light); padding: .6rem .8rem; text-align: left; }
.table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.table .numeric { font-family: var(--font-mono); text-align: right; white-space: nowrap; }

/* Bestelltabellen mobil als Stapel statt Querscroll (Kasse/Danke: .table--stack,
   Warenkorb: .table--cart). Zeilen mit 4 Zellen = Produktzeile (Position volle
   Breite, darunter Menge · Einzelpreis · Summe); 2 Zellen = Label links, Betrag
   rechts; 1 Zelle (colspan 4) = Hinweiszeile. Zellenzahl per :nth-last-child. */
@media (max-width: 759px) {
  .table--stack thead, .table--cart thead { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table--stack, .table--stack tbody, .table--cart, .table--cart tbody { display: block; width: 100%; }
  .table--stack tr, .table--cart tr { display: flex; flex-wrap: wrap; justify-content: space-between;
    align-items: baseline; gap: .2rem .9rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .table--stack td, .table--cart td { display: block; padding: 0; border: 0; }
  .table--stack td.numeric, .table--cart td.numeric { white-space: nowrap; }
  .table--stack td::before, .table--cart td::before { font-family: var(--font-text); font-size: .72rem;
    text-transform: uppercase; letter-spacing: .08em; color: var(--ink-45); margin-right: .35rem; }
  /* Produktzeile (4 Zellen) */
  .table--stack td:first-child:nth-last-child(4) { flex: 1 1 100%; }
  .table--stack td:first-child:nth-last-child(4) ~ td:nth-child(2)::before { content: 'Menge'; }
  .table--stack td:first-child:nth-last-child(4) ~ td:nth-child(3)::before { content: 'Einzelpreis'; }
  .table--stack td:first-child:nth-last-child(4) ~ td:nth-child(4)::before { content: 'Summe'; }
  .table--stack td:first-child:nth-last-child(4) ~ td { flex: 0 1 auto; font-size: .92rem; }
  /* Hinweiszeile (1 Zelle, colspan 4) */
  .table--stack td:first-child:nth-last-child(1) { flex: 1 1 100%; text-align: right; }
  .table--stack tr.checkout-total, .table--stack tr.thanks-total { font-weight: 700;
    border-bottom: 2px solid var(--ink); font-size: 1.05rem; }
  /* Warenkorb (6 Zellen: Produkt, Ausstattung, Einzelpreis, Menge-Form, Summe, Entfernen) */
  .table--cart td:nth-child(1), .table--cart td:nth-child(2) { flex: 1 1 100%; }
  .table--cart td:nth-child(2) { font-size: .92rem; color: var(--ink-70); margin-top: -.1rem; }
  .table--cart td:nth-child(3)::before { content: 'Einzelpreis'; }
  .table--cart td:nth-child(5)::before { content: 'Summe'; }
  .table--cart td:nth-child(4), .table--cart td:nth-child(6) { flex: 1 1 100%; }
  .table--cart td:nth-child(6) { text-align: right; }
}

/* ---------------------------------------------------------- Formulare */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=number], .field input[type=password], .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale);
}
.field--error input, .field--error select, .field--error textarea { border-color: var(--error); }
.field__error { color: var(--error); font-size: .85rem; margin-top: .3rem; }
/* Checkboxen (Kasse: AGB, Montage, § 10 FAGG; Produktseite: Montage):
   eigenes, grosses Kaestchen mit klarem Rahmen statt Browser-Standard — mobil
   war das native Kaestchen kaum erkennbar. Das ganze Label ist Tippflaeche. */
.field--check { display: flex; gap: .8rem; align-items: flex-start; font-size: .95rem;
  padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); cursor: pointer; }
.field--check:has(input:checked) { border-color: var(--accent); }
.field--check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.field--check input { appearance: none; -webkit-appearance: none; width: 1.5rem; height: 1.5rem;
  margin: .05rem 0 0; flex-shrink: 0; border: 2px solid var(--ink-70); border-radius: 4px;
  background: var(--white); cursor: pointer; display: grid; place-content: center; }
.field--check input::before { content: ''; width: .9rem; height: .9rem; transform: scale(0);
  background: var(--accent); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.field--check input:checked { border-color: var(--accent); }
.field--check input:checked::before { transform: scale(1); }
.field--error .field--check { border-color: var(--error); }
.field--error .field--check input { border-color: var(--error); }
@media (max-width: 759px) {
  .field--check { font-size: 1rem; gap: .9rem; }
  .field--check input { width: 1.7rem; height: 1.7rem; }
}

/* Options-Auswahl im Konfigurator (Radio-Karten) */
.choice { display: grid; gap: .6rem; }
@media (min-width: 560px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice__option { position: relative; }
.choice__option input { position: absolute; opacity: 0; }
.choice__option label {
  display: flex; justify-content: space-between; gap: .8rem; align-items: baseline;
  padding: .8rem 1rem; background: var(--white); border: 2px solid var(--line);
  border-radius: var(--radius); cursor: pointer; font-size: .97rem; transition: border-color .12s ease;
}
.choice__option label:hover { border-color: var(--ink-45); }
.choice__option input:checked + label { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.choice__option input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice__surcharge { font-family: var(--font-mono); font-size: .84rem; color: var(--ink-70); white-space: nowrap; }

/* ---------------------------------------------------------- Hinweise */
.notice { padding: 1rem 1.2rem; border-left: 3px solid var(--ink-45);
  background: var(--white); border-radius: var(--radius); font-size: .95rem; }
.notice--accent { border-left-color: var(--accent); background: var(--accent-pale); }
.notice--success { border-left-color: var(--success); }
.notice--error { border-left-color: var(--error); }

/* ---------------------------------------------------------- Prozess-Schritte */
.steps { counter-reset: step; display: grid; gap: 1.2rem; padding: 0; margin: 0; list-style: none; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.steps li { counter-increment: step; position: relative; padding-top: 3rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--accent);
}
.steps h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.steps p { font-size: .95rem; color: var(--ink-70); margin: 0; }

/* ---------------------------------------------------------- Akkordeon (FAQ) */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; font-weight: 600;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-family: var(--font-mono); color: var(--accent); font-size: 1.2rem; }
.accordion details[open] summary::after { content: '–'; }
.accordion .accordion__content { padding: 0 0 1.1rem; color: var(--ink-70); }

/* ---------------------------------------------------------- Kopf: Topbar + Navbar */
.topbar { background: var(--ink); color: var(--steel-light); font-size: .78rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: .4rem; flex-wrap: wrap; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__note { letter-spacing: .06em; }
.topbar__contact { display: flex; gap: .6rem; }
@media (max-width: 560px) { .topbar__note { display: none; } .topbar__inner { justify-content: center; } }

.navbar { background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50; }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.2rem; }
.navbar__brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand__wordmark { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; letter-spacing: .02em; }
.brand__wordmark b { font-weight: 700; color: var(--accent); }
.brand__wordmark--light { color: var(--steel-light); }
.brand__eu { font-weight: 500; color: var(--ink-45); }
.brand__tagline { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-45); }
.navbar__links { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.6rem); list-style: none; margin: 0; padding: 0; }
.navbar__links a:not(.btn) {
  text-decoration: none; font-family: var(--font-display); font-weight: 600;
  font-size: 1.02rem; letter-spacing: .05em; text-transform: uppercase;
  padding-block: .4rem; border-bottom: 2px solid transparent;
}
.navbar__links a:not(.btn):hover { border-bottom-color: var(--accent); }
.nav-toggle, .nav-burger { display: none; }
@media (max-width: 900px) {
  /* Checkbox unsichtbar, aber fokussierbar (Tastatur-Bedienung, Review-Fix) */
  .nav-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .nav-toggle:focus-visible ~ .nav-burger { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav-burger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: .5rem; }
  .nav-burger span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: transform .18s ease, opacity .18s ease; }
  .navbar__links {
    display: none; position: absolute; inset: 100% 0 auto 0; flex-direction: column;
    align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1rem, 4vw, 2rem) 1.4rem; gap: .4rem; box-shadow: var(--shadow-high);
  }
  .navbar__links li { border-bottom: 1px solid var(--line); }
  .navbar__links li:last-child { border: none; padding-top: .6rem; }
  .nav-toggle:checked ~ .navbar__links { display: flex; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------------------------------------------------------- Breadcrumbs (base.html)
   Schmale Leiste unter dem Header, Trennzeichen › per CSS; Farben ueber die
   Tinte-Token, damit der Kontrast in hell UND dunkel stimmt (--ink-45 ist
   WCAG-AA gegen --paper). Generierte Trennzeichen mit leerem Alternativtext,
   damit Screenreader sie nicht vorlesen (Fallback ohne Slash-Syntax davor). */
.breadcrumb-bar { background: var(--paper); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem;
  list-style: none; margin: 0; padding-block: .55rem;
  font-size: .8rem; line-height: 1.5; color: var(--ink-45); }
.breadcrumb__item { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.breadcrumb__item + .breadcrumb__item::before { content: '›'; content: '›' / ''; color: var(--ink-45); }
.breadcrumb__link { color: inherit; text-decoration: none; }
.breadcrumb__link:hover, .breadcrumb__link:focus-visible { color: var(--accent-text); text-decoration: underline;
  text-underline-offset: 3px; }
.breadcrumb__current { color: var(--ink-70); }

/* ---------------------------------------------------------- Hero */
.hero { position: relative; overflow: hidden; }
.hero .container { position: relative; }
.hero__grid { position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}

/* Reales Referenzfoto als halbtransparente Backdrop im Hero — rechts verankert,
   blendet nach links (Text) und unten aus; Blueprint-Raster liegt darueber. */
.hero__photo { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url('/static/img/hero-carport.jpg');
  background-image: -webkit-image-set(
    url('/static/img/hero-carport.webp') type('image/webp'),
    url('/static/img/hero-carport.jpg') type('image/jpeg'));
  background-image: image-set(
    url('/static/img/hero-carport.webp') type('image/webp'),
    url('/static/img/hero-carport.jpg') type('image/jpeg'));
  background-position: center 42%; background-size: cover; background-repeat: no-repeat;
  opacity: .45; filter: saturate(.9) contrast(.97);
  -webkit-mask-image: linear-gradient(90deg, transparent 50%, #000 82%),
                      linear-gradient(180deg, #000 50%, transparent 94%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 50%, #000 82%),
              linear-gradient(180deg, #000 50%, transparent 94%);
  mask-composite: intersect;
}
@media (max-width: 759px) {
  /* Mobil steht der Text ueber dem Bild — dezenter halten, rechte Bildseite
     (Carport-Stuetzen/Haus) zeigen, nach oben ausblenden. */
  .hero__photo { opacity: .3; background-position: right center;
    -webkit-mask-image: linear-gradient(180deg, transparent 8%, #000 62%);
    mask-image: linear-gradient(180deg, transparent 8%, #000 62%);
    -webkit-mask-composite: source-over; mask-composite: add; }
}

/* ---------------------------------------------------------- Fussbereich */
.footer { --footer-text: #B8BEC7; --footer-line: #39414D; --footer-muted: #8B93A0;
  /* Zwei Footer-Zonen: --footer-top (Spalten, "Anderes von uns", Copyright) =
     Farbe der letzten Section; --footer-band (Regionen-Block) deutlich dunkler. */
  --footer-top: #1E242C; --footer-band: #0D1116;
  background: var(--footer-top); color: var(--footer-text); margin-top: var(--spacing); font-size: .93rem; }
/* Endet eine Seite mit einem dunklen Band (z. B. Startseite: "Nach Maß"),
   entfaellt der helle Luftraum ueber dem ebenfalls dunklen Footer —
   dunkel geht nahtlos in dunkel ueber. */
main:has(> .section--dark:last-child) + .footer { margin-top: 0; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); }

/* Obere, schlanke Link-Spalten: Firma+Social | Carports | Anderes von uns | Rechtliches */
.footer__grid { display: grid; gap: 2rem; padding-block: 3.2rem 2.4rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 2fr 1fr 1.3fr 1fr; } }
.footer__claim { margin-top: .8rem; max-width: 34em; }
.footer__contact { font-size: .88rem; line-height: 1.9; }
.footer__title { font-family: var(--font-display); font-size: 1rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--steel-light); margin: 0 0 .8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }

/* Social (Facebook) — Icon-only mit aria-label */
.footer__social { margin-top: 1.2rem; }
.footer__social-link { display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--footer-line); border-radius: var(--radius);
  color: var(--footer-text); transition: color .15s, border-color .15s, background .15s; }
.footer__social-link:hover,
.footer__social-link:focus-visible { color: #fff; border-color: var(--accent);
  background: rgba(228,87,15,.12); text-decoration: none; }
.footer__social-link svg { display: block; }

/* Spalte "Anderes von uns" — Marke + Kurzbeschreibung */
.footer ul.footer__brands { gap: .75rem; }
.footer__brands a { display: block; }
.footer__brands a:hover, .footer__brands a:focus-visible { text-decoration: none; }
.footer__brand-name { display: block; font-weight: 600; color: var(--steel-light); }
.footer__brands a:hover .footer__brand-name,
.footer__brands a:focus-visible .footer__brand-name { color: #fff; }
.footer__brand-short { display: block; font-size: .78rem; color: var(--footer-muted); margin-top: .1rem; }

/* Breiter Regionen-Block — bekommt das visuelle Hauptgewicht */
.footer__regions { border-top: 1px solid var(--footer-line); padding-block: 2.4rem 0;
  background: var(--footer-band); }
.footer__regions-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem;
  margin-bottom: 1.7rem; }
.footer__title--large { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--steel-light); margin: 0; }
.footer__regions-intro { margin: 0; color: var(--footer-muted); max-width: 42em; }

/* Laender als Zeilen (Label + Chips inline) — Ein-Chip-Laender reissen keine Luecke */
.footer__countries { display: grid; gap: 1.1rem; margin-bottom: 2.4rem; }
.footer__country { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .8rem; }
.footer__country-name { display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-size: .95rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--steel-light); }
@media (min-width: 640px) { .footer__country-name { min-width: 12rem; } }
.footer__country-code { display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; padding: .1rem .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  color: var(--footer-muted); border: 1px solid var(--footer-line); border-radius: var(--radius); }

/* Regionen als kompakte Chips — Orange nur fuer Hover/Fokus (sparsam) */
.footer ul.footer__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer__chips a { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--footer-line);
  border-radius: var(--radius); background: rgba(255,255,255,.02); color: var(--footer-text);
  font-weight: 600; line-height: 1.2; transition: color .15s, border-color .15s, background .15s; }
.footer__chips a:hover,
.footer__chips a:focus-visible { color: #fff; border-color: var(--accent);
  background: rgba(228,87,15,.14); text-decoration: none; }

/* Ratgeber-Zeile unter den Regionen (solide Haarlinie, kantige Stahl-Aesthetik) */
.footer__partners { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem;
  margin: 0; padding-block: 1.6rem; border-top: 1px solid var(--footer-line);
  font-size: .82rem; background: var(--footer-top); }
.footer__partners-label { color: var(--footer-muted); text-transform: uppercase; letter-spacing: .08em; }

/* Untere Leiste — dunkleres Band wie .footer__regions (hell wie dunkel) */
.footer__bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--footer-line); padding-block: 1.1rem; font-size: .72rem;
  color: var(--footer-muted); background: var(--footer-band); }

/* Trennlinien und Baender bis an die Viewport-Kante durchziehen (Full-Bleed):
   Regionen-Block, "Anderes von uns"-Zeile und Copyright reichen edge-to-edge,
   der Inhalt bleibt an der Container-Breite ausgerichtet. overflow-x: clip
   faengt den 50vw-Ueberstand (Scrollbar-Breite) ab. */
.footer { overflow-x: clip; }
.footer__regions, .footer__partners, .footer__bar {
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
}

/* ---------------------------------------------------------- Sonstiges */
.link-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.link-list a { font-weight: 600; }
.badge-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; }
.badge::before { content: ''; width: .55rem; height: .55rem; background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* Einblende-Animation: class="anim" + style="--d: 2" fuer Staffelung */
@media (prefers-reduced-motion: no-preference) {
  .anim { opacity: 0; transform: translateY(14px);
    animation: anim-up .6s cubic-bezier(.2,.7,.3,1) forwards;
    animation-delay: calc(var(--d, 0) * 90ms); }
  @keyframes anim-up { to { opacity: 1; transform: none; } }
}

/* Fliesstext-Typografie fuer lange Artikel & Rechtsseiten (Integration Module) */
.container.narrow h2, .legal-text h2 { margin-top: 2.2em; }
.container.narrow h3, .legal-text h3 { margin-top: 1.6em; }
.container.narrow .spec-sheet, .container.narrow .table,
.legal-text .spec-sheet, .legal-text .table { margin-block: 1.2em; }
.container.narrow .notice, .legal-text .notice { margin-block: 1.4em; }
.container.narrow ul, .container.narrow ol,
.legal-text ul, .legal-text ol { margin-bottom: 1.2em; }
.table-scroll { overflow-x: auto; }
/* FAQ-Frage als <h3> in <summary> (Outline fuer Google/KI), optisch Akkordeon-Zeile */
.accordion summary h3, .accordion summary h3.accordion__question { font: inherit; font-weight: 600;
  text-transform: none; letter-spacing: normal; line-height: inherit; margin: 0; }

/* ---------------------------------------------------------- Drag-and-Drop-Upload */
.dropzone { position: relative; border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--white); padding: 1.6rem 1.2rem; text-align: center;
  transition: border-color .15s ease, background .15s ease; }
.dropzone--ready { cursor: pointer; }
.dropzone--ready:hover { border-color: var(--ink-45); }
.dropzone--active { border-color: var(--accent); background: var(--accent-pale); }
.dropzone__input { display: block; margin: .9rem auto 0; }         /* Fallback ohne JS: sichtbar */
.dropzone--ready .dropzone__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone__prompt { pointer-events: none; display: grid; gap: .25rem; justify-items: center; }
.dropzone__prompt svg { width: 2.1rem; height: 2.1rem; color: var(--ink-45); }
.dropzone__prompt b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.dropzone__link { color: var(--accent-text); text-decoration: underline; }
.dropzone__list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .45rem; text-align: left; }
.dropzone__file { display: flex; align-items: center; gap: .6rem; background: var(--paper-deep);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; font-size: .92rem; }
.dropzone__name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone__size { color: var(--ink-45); font-size: .8rem; flex-shrink: 0; }
.dropzone__remove { border: none; background: none; color: var(--ink-45); font-size: 1.35rem;
  line-height: 1; cursor: pointer; padding: 0 .2rem; flex-shrink: 0; }
.dropzone__remove:hover { color: var(--error); }
.dropzone__error { color: var(--error); font-size: .85rem; margin: .6rem 0 0; text-align: left; }

/* Druck */
@media print { .header, .footer, .btn { display: none !important; } body { background: #fff; } }

/* ========================================================================
   DARK MODE — automatische Erkennung (prefers-color-scheme) UND manueller
   Umschalter im Header. Drei Zustaende ueber [data-theme] am <html>:
     (kein Attribut)     -> System entscheidet
     data-theme="dark"   -> dunkel erzwungen
     data-theme="light"  -> hell erzwungen (ueberschreibt System-Dunkel)
   Sonderfall --ink (im Hellmodus Primaertext UND dunkle Flaeche): wird hier
   heller Text; die Flaechen-Nutzungen (.section--dark, .footer, .table th,
   .topbar) bekommen eigene, dunklere Werte. Die Dunkelwerte stehen zweimal —
   fuer System-Dunkel und fuer erzwungenes Dunkel —, weil eine Media-Query und
   ein Attribut-Selektor nicht in einer Regel kombinierbar sind. Vorteil: keine
   Aenderung an bestehenden Regeln noetig. Kontraste WCAG-AA gegen --paper.
   ======================================================================== */

/* --- 1) System-Dunkel, sofern nicht ausdruecklich hell erzwungen --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14181d; --paper-deep: #0f1319; --white: #1c222b; --line: #2d353f;
    --grid: rgba(220,226,232,.05);
    --ink: #E7EAEE; --ink-70: #AEB7C2; --ink-45: #939DAA; --steel-light: #E4E6E9;
    --accent: #E4570F; --accent-deep: #F2884E; --accent-text: #F2884E;
    --accent-pale: rgba(242,120,58,.16); --success: #57B67E; --error: #F0736B;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px -12px rgba(0,0,0,.75);
    --shadow-high: 0 2px 4px rgba(0,0,0,.55), 0 20px 48px -16px rgba(0,0,0,.85);
  }
  :root:not([data-theme="light"]) .section--dark,
  :root:not([data-theme="light"]) .table th,
  :root:not([data-theme="light"]) .topbar { background: #0d1116; }
  /* Footer-Zonen im Dunkeln: oben = Seitengrund (#14181d, = letzte Section),
     Band = tiefer (#0d1116). */
  :root:not([data-theme="light"]) .footer { --footer-top: #14181d; --footer-band: #0d1116; }
  :root:not([data-theme="light"]) .section--dark .btn--secondary:hover { color: #14181d; }
  :root:not([data-theme="light"]) .section--dark .stamp {
    box-shadow: inset 0 0 0 4px #0d1116, inset 0 0 0 5px var(--accent); }
  :root:not([data-theme="light"]) .product-card__image,
  :root:not([data-theme="light"]) .gallery__main { background: #f3f4f2; }
  :root:not([data-theme="light"]) .hero__photo { opacity: .3; }
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}

/* --- 2) Toggle: dunkel erzwungen (unabhaengig vom System) --- */
:root[data-theme="dark"] {
  --paper: #14181d; --paper-deep: #0f1319; --white: #1c222b; --line: #2d353f;
  --grid: rgba(220,226,232,.05);
  --ink: #E7EAEE; --ink-70: #AEB7C2; --ink-45: #939DAA; --steel-light: #E4E6E9;
  --accent: #E4570F; --accent-deep: #F2884E; --accent-text: #F2884E;
  --accent-pale: rgba(242,120,58,.16); --success: #57B67E; --error: #F0736B;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px -12px rgba(0,0,0,.75);
  --shadow-high: 0 2px 4px rgba(0,0,0,.55), 0 20px 48px -16px rgba(0,0,0,.85);
}
:root[data-theme="dark"] .section--dark,
:root[data-theme="dark"] .table th,
:root[data-theme="dark"] .topbar { background: #0d1116; }
:root[data-theme="dark"] .footer { --footer-top: #14181d; --footer-band: #0d1116; }
:root[data-theme="dark"] .section--dark .btn--secondary:hover { color: #14181d; }
:root[data-theme="dark"] .section--dark .stamp {
  box-shadow: inset 0 0 0 4px #0d1116, inset 0 0 0 5px var(--accent); }
:root[data-theme="dark"] .product-card__image,
:root[data-theme="dark"] .gallery__main { background: #f3f4f2; }
:root[data-theme="dark"] .hero__photo { opacity: .3; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

/* --- Header-Umschalter (Sonne im Dunkeln, Mond im Hellen) --- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; padding: 0; flex-shrink: 0;
  color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.navbar__inner > .theme-toggle { margin-inline-start: auto; }  /* rechts anlegen */
@media (max-width: 900px) { .navbar__inner > .theme-toggle { margin-inline-end: .4rem; } }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }  /* KEIN display hier —
   sonst schluege es (0,1,1) die Icon-Umschaltregeln (0,1,0). */
.theme-toggle__sun { display: none; }   /* Hellmodus (Default): Mond zeigen */
.theme-toggle__moon { display: block; }
/* Ausdruecklich hell erzwungen -> immer Mond (auch bei System-Dunkel) */
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }
