/* ============================================================
   ML Elektrotechnik BS — Vorschau
   Direction: "Verteilung". Die Welt des Verteilerschranks und des
   Stromlaufplans: Hutschiene mit beschrifteten Automaten, ein echter
   Leiter (braun, L) als Rückgrat, Aderfarben als Palette, gravierte
   Klemmenschilder in D-DIN Condensed.
   No external requests: self-hosted fonts (OFL), no trackers, no cookies.
   ============================================================ */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "D-DIN Condensed";
  src: url("assets/fonts/d-din-condensed.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "D-DIN Condensed";
  src: url("assets/fonts/d-din-condensed-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Grundflächen: Lichtgrau des Verteilers (RAL 7035), Anthrazit des Schranks (RAL 7016) */
  --paper:    oklch(96.5% 0.004 240);
  --paper-2:  oklch(93.5% 0.005 240);
  --plate:    oklch(90% 0.006 240);
  --plate-2:  oklch(86% 0.006 240);
  --rail:     oklch(84% 0.006 240);
  --grey:     oklch(60% 0.008 240);
  --ink:      oklch(24% 0.012 240);
  --ink-soft: oklch(42% 0.014 240);
  --anthra:   oklch(27% 0.012 240);
  --anthra-2: oklch(22% 0.012 240);
  --on-dark:  oklch(95% 0.006 240);
  --on-dark-soft: oklch(80% 0.008 240);

  /* Aderfarben nach Norm: L braun, N blau, PE grün-gelb (+ Bus rot) */
  --l:      oklch(48% 0.10 55);
  --l-deep: oklch(38% 0.09 55);
  --n:      oklch(68% 0.148 233);   /* Markenblau des Logos, als Fläche */
  --n-ink:  oklch(47% 0.14 245);    /* Blau als Text auf hell (AA) */
  --pe-g:   oklch(62% 0.18 140);
  --pe-y:   oklch(88% 0.17 100);
  --pe-ink: oklch(44% 0.13 145);
  --bus-r:  oklch(55% 0.19 28);
  --star:   oklch(78% 0.16 80);
  --star-ink: oklch(60% 0.15 66);
  --glow:   color-mix(in oklch, var(--star) 35%, var(--paper));

  --line:        color-mix(in oklch, var(--ink) 28%, transparent);
  --line-soft:   color-mix(in oklch, var(--ink) 14%, transparent);
  --line-strong: color-mix(in oklch, var(--ink) 48%, transparent);
  --rail-slot:   color-mix(in oklch, var(--ink) 22%, transparent);

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --din:  "D-DIN Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", sans-serif-condensed, sans-serif;

  /* fluid type */
  --fs-label: clamp(0.72rem, 0.7rem + 0.12vw, 0.8rem);
  --fs-small: clamp(0.88rem, 0.84rem + 0.18vw, 0.98rem);
  --fs-body:  clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --fs-lead:  clamp(1.12rem, 1.02rem + 0.45vw, 1.3rem);
  --fs-din:   clamp(1rem, 0.94rem + 0.3vw, 1.18rem);
  --fs-strip: clamp(1.02rem, 0.96rem + 0.3vw, 1.2rem);
  --fs-h3:    clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-h2:    clamp(1.8rem, 1.42rem + 1.7vw, 2.8rem);
  --fs-hero:  clamp(2.7rem, 1.6rem + 4.6vw, 5.2rem);

  --wrap: 1140px;
  --pad: 68px;     /* linke Gasse für den Leiter */
  --railx: 26px;   /* x des Leiters innerhalb der Gasse */
  --side: clamp(1.1rem, 4vw, 2.4rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--n-ink); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.08; font-weight: 800; letter-spacing: -0.012em; }
:focus-visible { outline: 3px solid var(--l); outline-offset: 2px; }

/* Klemmenschild-Schrift: schmal, gravier-artig, nie gesperrt */
.din { font-family: var(--din); }
.bmk {
  font-family: var(--din); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
  color: var(--l); font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--ink); color: var(--on-dark);
  padding: 0.6rem 1rem; z-index: 200; font-family: var(--din); font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 8px; }

/* ---------- Buttons: beschriftete Schalter ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--din); font-weight: 700; font-size: 1.05rem; line-height: 1;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.8rem 1.35rem; min-height: 50px;
  border-radius: 2px; border: 2px solid var(--ink);
  text-decoration: none; cursor: pointer; color: var(--ink);
  transition: transform 0.14s var(--ease), background 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--n); box-shadow: inset 0 -3px 0 color-mix(in oklch, var(--ink) 30%, transparent); }
.btn-primary:hover { background: color-mix(in oklch, var(--n) 90%, var(--ink)); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 color-mix(in oklch, var(--ink) 30%, transparent); }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: color-mix(in oklch, var(--ink) 5%, transparent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  max-width: var(--wrap); margin-inline: auto;
  padding: 0.7rem var(--side);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand svg { width: clamp(150px, 18vw, 188px); height: auto; }
.header-phone {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--din); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink); text-decoration: none;
  padding: 0.45rem 0.85rem; min-height: 44px;
  background: var(--plate); border: 1px solid var(--line-strong); border-radius: 2px;
  transition: background 0.14s var(--ease);
}
.header-phone svg { width: 16px; height: 16px; color: var(--l); }
.header-phone:hover { background: var(--plate-2); }

.site-nav { display: flex; gap: clamp(0.9rem, 2vw, 1.7rem); }
.site-nav a {
  font-family: var(--din); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; padding: 0.7rem 0.05rem; min-height: 44px; display: inline-flex; align-items: center; position: relative;
  transition: color 0.14s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--l); transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }
.site-nav a.active { color: var(--ink); }

/* ---------- Flow + Leiter ---------- */
.flow {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: var(--pad);
  padding-right: var(--side);
}
/* der Leiter: braune Ader (L), läuft vom Einspeisepunkt bis zur Erde im Footer */
.flow::before {
  content: ""; position: absolute;
  left: calc(var(--railx) - 1px); top: 0; bottom: 0; width: 2px;
  background: var(--l);
  z-index: 0;
}
/* Einspeiseklemme ganz oben */
.flow::after {
  content: ""; position: absolute;
  left: calc(var(--railx) - 6px); top: 0; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--l);
  z-index: 1;
}
.sec { position: relative; z-index: 1; padding-block: clamp(3rem, 7vw, 5.5rem); }
.sec + .sec { border-top: 1px solid var(--line-soft); }
/* Klemmstelle: wo der Leiter die Abschnittsgrenze kreuzt */
.sec + .sec::before {
  content: ""; position: absolute; top: -5px;
  left: calc(var(--railx) - var(--pad) - 7px);
  width: 14px; height: 9px;
  background: var(--paper); border: 2px solid var(--l); border-radius: 1px;
}

/* Abzweig: Knotenpunkt auf dem Leiter → Leitung → Klemme vor der Überschrift */
.sec-head { margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.sec-head h2 { font-size: var(--fs-h2); position: relative; }
.tap {
  position: absolute; top: 0.54em; height: 2px; background: var(--l);
  left: calc(var(--railx) - var(--pad));
  width: calc(var(--pad) - var(--railx) - 14px);
}
.tap::before {
  content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--l);
}
.tap::after {
  content: ""; position: absolute; right: -10px; top: -4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--l);
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.4rem, 5vw, 4.2rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(1.8rem, 4vw, 3.6rem); align-items: center;
}
.hero h1 {
  font-size: var(--fs-hero); font-weight: 900; font-style: italic;
  letter-spacing: -0.025em; line-height: 0.94;
  color: var(--ink);
}
.hero-sub { font-size: var(--fs-lead); color: var(--ink-soft); margin-top: 1.3rem; max-width: 34ch; }
.hero-rating {
  display: inline-flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap;
  margin-top: 1.4rem; font-family: var(--din); font-size: 1.15rem; letter-spacing: 0.02em;
  color: var(--ink);
}
.hero-rating strong { font-weight: 700; font-size: 1.25em; }
.stars { color: var(--star-ink); letter-spacing: 0.06em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.9rem; }

/* ---------- Blatt: Foto als dokumentiertes Blatt mit Schriftfeld ---------- */
.blatt {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line-strong);
  padding: 5px 5px 0;
}
.blatt img { width: 100%; flex: 1 1 auto; min-height: 0; object-fit: cover; }
.blatt-hero img { aspect-ratio: 4 / 3.05; }
.blatt-hero { box-shadow: 0 18px 40px -26px color-mix(in oklch, var(--ink) 60%, transparent); }
.schriftfeld {
  display: flex; margin: 5px -5px 0; border-top: 1px solid var(--line-strong);
  font-family: var(--din); line-height: 1.15; min-height: 2.55rem;
}
.schriftfeld .cell {
  display: flex; flex-direction: column; gap: 0.12rem; justify-content: center;
  padding: 0.35rem 0.65rem 0.3rem; border-right: 1px solid var(--line);
  min-width: 0;
}
.schriftfeld .cell.nr { margin-left: auto; border-right: 0; text-align: right; }
.schriftfeld .k { font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.schriftfeld .v { font-weight: 700; font-size: 0.98rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Leistungen: der Verteiler ---------- */
.verteiler {
  background: var(--paper-2);
  border: 1.5px solid var(--line-strong);
  padding-bottom: 1.4rem;
}
.reihen {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.8rem;
}
.slot { position: relative; display: grid; grid-template-rows: auto 120px 1fr; min-width: 0; }
/* Beschriftungsstreifen über der Reihe */
.streifen {
  margin: 0; font-family: var(--din); font-weight: 700; font-size: var(--fs-strip);
  line-height: 1.2; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink);
  background: var(--paper); border-block: 1px solid var(--line);
  padding: 0.55rem 1.1rem 0.5rem;
  box-shadow: inset -1px 0 0 var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Hutschiene */
.rail { position: relative; height: 120px; }
.rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 36px; height: 41px;
  background:
    repeating-linear-gradient(90deg, transparent 0 15px, var(--rail-slot) 15px 21px) center / 100% 12px no-repeat,
    var(--rail);
  border-block: 1px solid var(--line);
  box-shadow: inset 0 1px 0 color-mix(in oklch, var(--paper) 70%, transparent);
}
.geraet {
  position: absolute; left: 1.1rem; top: 2px;
  height: 115px; width: calc(var(--te) * 24px);
}
.rail .bmk {
  position: absolute; top: 48px;
  left: calc(1.1rem + var(--te) * 24px + 10px);
}
.slot > p { color: var(--ink-soft); font-size: var(--fs-small); padding: 0.5rem 1.1rem 0; max-width: 46ch; }
/* Leistungen mit eigenem Foto: das Blatt sitzt unter dem Streifen auf der Montageplatte */
.reihen-foto { margin-bottom: 2.2rem; }
.slot-foto { grid-template-rows: auto auto 1fr; }
.slot-foto .blatt { margin: 1rem 1.1rem 0; }
.slot-foto .blatt img { aspect-ratio: 3 / 4; }
.slot-foto > p { padding-top: 0.75rem; }

/* ---------- Referenzen: Blätter 2 bis 6 ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "a a b"
    "a a c"
    "d e f";
  gap: clamp(0.8rem, 1.8vw, 1.2rem);
}
.gallery .g-a { grid-area: a; }
.gallery .g-b { grid-area: b; aspect-ratio: 1; }
.gallery .g-c { grid-area: c; aspect-ratio: 1; }
.gallery .g-d { grid-area: d; aspect-ratio: 1; }
.gallery .g-e { grid-area: e; aspect-ratio: 1; }
.gallery .g-f { grid-area: f; aspect-ratio: 1; }
.gallery .g-f img { object-position: 50% 42%; }
.gallery .blatt img { transition: transform 0.5s var(--ease); }
.gallery .blatt:hover img { transform: scale(1.02); }
.gallery .blatt { overflow: hidden; }
.gallery-note { font-family: var(--din); font-size: 0.95rem; color: var(--ink-soft); margin-top: 1.1rem; letter-spacing: 0.02em; }

/* ---------- Bewertungen: Schrank + Typenschild ---------- */
.schrank {
  position: relative;
  background: var(--anthra); color: var(--on-dark);
  border: 2px solid var(--ink);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  display: grid; grid-template-columns: minmax(230px, 300px) 1fr;
  gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
}
.schrank::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid color-mix(in oklch, var(--on-dark) 14%, transparent);
}
.typenschild {
  position: relative;
  background: linear-gradient(165deg, var(--plate) 0%, var(--plate-2) 100%);
  color: var(--ink);
  border: 1px solid color-mix(in oklch, var(--ink) 55%, transparent);
  border-radius: 3px;
  padding: 1.6rem 1.5rem 1.2rem;
  box-shadow: inset 0 1px 0 color-mix(in oklch, var(--paper) 80%, transparent), 0 2px 0 var(--anthra-2);
}
/* vier Schrauben in den Ecken */
.schrauben { position: absolute; inset: 0; pointer-events: none; }
.schrauben::before, .schrauben::after, .typenschild::before, .typenschild::after {
  content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--paper) 0 1px, var(--plate-2) 2px 60%, var(--grey) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--ink) 45%, transparent);
}
.typenschild::before { top: 6px; left: 6px; }
.typenschild::after { bottom: 6px; right: 6px; }
.schrauben::before { top: 6px; right: 6px; }
.schrauben::after { bottom: 6px; left: 6px; }
.ts-big { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.ts-big strong {
  font-family: var(--sans); font-weight: 900; font-style: italic; font-size: clamp(3rem, 2.4rem + 2vw, 4rem);
  line-height: 1; letter-spacing: -0.03em; color: var(--ink);
  text-shadow: 0 1px 0 color-mix(in oklch, var(--paper) 70%, transparent);
}
.ts-big .stars { font-size: 1.2rem; color: var(--star-ink); }
.ts-rows { margin-top: 0.9rem; border-top: 1px solid var(--line); }
.ts-rows div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.42rem 0; border-bottom: 1px solid var(--line-soft); }
.ts-rows dt { font-family: var(--din); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.ts-rows dd { font-family: var(--din); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.zitat blockquote {
  font-size: var(--fs-lead); font-style: italic; line-height: 1.5; font-weight: 500;
  max-width: 44ch; color: var(--on-dark);
}
.zitat figcaption {
  margin-top: 1rem; font-family: var(--din); font-weight: 700; font-size: 1rem; letter-spacing: 0.03em;
  color: var(--on-dark-soft);
}
.zitat .agg { margin-top: 1.4rem; font-size: var(--fs-small); color: var(--on-dark-soft); }
.zitat .agg .stars { color: var(--star); }
/* weitere Stimmen: eine Zeile unter Typenschild und Hauptzitat, im selben Schrank */
.stimmen {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: clamp(1.4rem, 3vw, 2rem) 0 0;
  border-top: 1px solid color-mix(in oklch, var(--on-dark) 16%, transparent);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem clamp(1.4rem, 3vw, 2.4rem);
}
.stimmen blockquote {
  font-size: var(--fs-body); font-style: italic; font-weight: 500; line-height: 1.5;
  color: var(--on-dark); max-width: 40ch;
}
.stimmen .wer {
  margin-top: 0.75rem; font-family: var(--din); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.03em; color: var(--on-dark-soft);
}

/* ---------- Ablauf: Stromlaufplan ---------- */
.plan { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1rem, 3vw, 2.5rem); }
.schritt { position: relative; }
.schritt::before {
  content: ""; position: absolute; top: 31px; left: 0; right: calc(-1 * clamp(1rem, 3vw, 2.5rem)); height: 2px;
  background: var(--ink);
}
.schritt:last-child::before { display: none; }
.sym { position: relative; z-index: 1; width: 64px; height: 64px; color: var(--ink); background: var(--paper); }
.schritt h3 { font-size: var(--fs-h3); margin-top: 0.9rem; display: flex; align-items: baseline; gap: 0.6rem; }
.schritt p { color: var(--ink-soft); font-size: var(--fs-small); margin-top: 0.4rem; max-width: 34ch; }

/* ---------- Kontakt: Klemmleiste + Schriftfeld-Formular ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: start; }
.klemmleiste { margin: 0; counter-reset: klemme; border-top: 1px solid var(--line); }
.klemme {
  position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto;
  border-bottom: 1px solid var(--line);
}
/* die Reihenklemme: nummerierter Block, in Aderfarbe */
.klemme::before {
  content: counter(klemme); counter-increment: klemme;
  grid-row: 1 / span 2; grid-column: 1;
  display: grid; place-items: center;
  font-family: var(--din); font-weight: 700; font-size: 1.05rem; color: var(--ink);
  background: var(--plate); border-right: 1px solid var(--line);
  min-height: 60px;
}
.klemme.k-n::before { background: var(--n); }
.klemme.k-pe::before {
  background:
    radial-gradient(circle at center, var(--paper) 0 11px, transparent 12px),
    repeating-linear-gradient(-45deg, var(--pe-g) 0 7px, var(--pe-y) 7px 14px);
}
.klemme dt {
  grid-column: 2; font-family: var(--din); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); padding: 0.75rem 0 0 1rem;
}
.klemme > dd { grid-column: 2; padding: 0.1rem 0 0.8rem 1rem; font-size: var(--fs-body); }
.klemme dd a:not(.big-call) { display: inline-flex; align-items: center; min-height: 44px; color: var(--n-ink); text-decoration: underline; text-underline-offset: 3px; }
.big-call {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--din); font-weight: 700; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); line-height: 1.1;
  letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
  color: var(--ink); text-decoration: none;
}
.big-call:hover { color: var(--n-ink); }
.hours { display: grid; gap: 0.2rem; }
.hours div { display: flex; justify-content: space-between; gap: 1.5rem; max-width: 20rem; font-variant-numeric: tabular-nums; }
.hours dt, .hours dd { font-family: var(--din); font-size: 1.05rem; text-transform: none; letter-spacing: 0.01em; padding: 0; color: var(--ink); }
.hours dt { font-weight: 700; }

/* Formular als Schriftfeld (Titelblock einer Zeichnung) */
.kontakt-form { display: block; }
.sf { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); background: var(--paper); }
.sf-cell { position: relative; padding: 1.55rem 0.9rem 0.55rem; border-bottom: 1px solid var(--line); min-width: 0; }
.sf-cell.half-l { border-right: 1px solid var(--line); }
.sf-cell.wide { grid-column: 1 / -1; }
.sf-head {
  display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.9rem;
  font-family: var(--din); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.95rem;
  background: var(--paper-2); border-bottom: 1px solid var(--ink);
}
.sf-head span:last-child { color: var(--ink-soft); font-weight: 400; }
.sf-cell > label:not(.form-consent) {
  position: absolute; top: 0.45rem; left: 0.9rem;
  font-family: var(--din); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.sf-cell input[type="text"], .sf-cell textarea {
  font: inherit; font-size: var(--fs-body); color: var(--ink);
  background: transparent; border: 0; padding: 0.25rem 0; width: 100%; outline: none;
}
.sf-cell input[type="text"] { min-height: 44px; }
.sf-cell textarea { resize: vertical; min-height: 96px; }
.sf-cell:focus-within { background: color-mix(in oklch, var(--n) 10%, var(--paper)); box-shadow: inset 0 0 0 2px var(--n-ink); }
.sf-consent { padding: 0.8rem 0.9rem; }
.form-consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--fs-small); color: var(--ink-soft); cursor: pointer; }
.form-consent input { width: 1.05rem; height: 1.05rem; margin-top: 0.22rem; flex: none; accent-color: var(--n-ink); }
.sf-submit { padding: 0.9rem; border-bottom: 0; background: var(--paper-2); }
.sf-submit .btn { width: 100%; }
.form-note { font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.5; margin-top: 0.8rem; }
.form-status { font-size: var(--fs-small); font-weight: 600; margin-top: 0.6rem; }
.form-status.is-error { color: var(--bus-r); }
.form-status.is-ok { color: var(--n-ink); }

/* ---------- Footer: der Schutzleiter endet an der Erde ---------- */
.site-footer { background: var(--anthra); color: var(--on-dark-soft); }
.footer-inner {
  position: relative;
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(2.6rem, 6vw, 4rem) var(--side) clamp(2rem, 4vw, 2.8rem) var(--pad);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem;
}
.erde { position: absolute; left: calc(var(--railx) - 12px); top: 0; width: 24px; height: 56px; color: var(--on-dark-soft); }
.footer-inner .logo-on-dark { width: 188px; height: auto; color: var(--on-dark); }
.footer-brand .slogan { font-style: italic; font-weight: 600; margin-top: 0.9rem; color: var(--on-dark); }
.footer-contact { font-family: var(--din); font-size: 1.1rem; letter-spacing: 0.01em; display: grid; gap: 0.2rem; align-content: start; }
.footer-contact a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; justify-self: start; }
.footer-contact a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-bottom {
  grid-column: 1 / -1; border-top: 1px solid color-mix(in oklch, var(--on-dark) 18%, transparent);
  padding-top: 1.2rem; margin-top: 0.6rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; align-items: center;
  font-family: var(--din); font-size: 0.98rem; letter-spacing: 0.02em;
}
.footer-bottom a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin-inline: auto; padding: clamp(2rem, 5vw, 3.5rem) var(--side) 4rem; }
.legal h1 { font-size: var(--fs-h2); margin-bottom: 0.4rem; }
.legal h2 { font-size: var(--fs-h3); margin: 2rem 0 0.5rem; }
.legal p, .legal address, .legal li { color: var(--ink); font-size: var(--fs-small); line-height: 1.7; }
.legal address { font-style: normal; }
.legal .stand { font-family: var(--din); font-size: 0.95rem; color: var(--ink-soft); letter-spacing: 0.03em; }
.legal a { color: var(--n-ink); }
.legal ul { padding-left: 1.2rem; }
.draft-banner {
  background: var(--paper-2);
  border: 2px dashed var(--l);
  color: var(--ink); padding: 0.85rem 1.1rem;
  font-family: var(--din); font-size: 1.02rem; font-weight: 700; letter-spacing: 0.02em; margin: 1.4rem 0 2rem;
}
.legal-header { border-bottom: 1px solid var(--line); }
.legal-header .header-inner { padding-block: 0.8rem; }
.back-link { font-family: var(--din); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding: 0.5rem 0; min-height: 44px; display: inline-flex; align-items: center; }
.back-link:hover { color: var(--n-ink); }
.placeholder { color: var(--l); font-style: italic; }
.legal-footer .footer-inner { grid-template-columns: 1fr; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.legal-footer .footer-bottom { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .site-nav { gap: 0.9rem; }
}
@media (max-width: 920px) {
  .site-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .blatt-hero { order: -1; }
  .reihen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Foto-Leistungen: Blatt links, Text rechts, damit kein Streifen abgeschnitten wird */
  .reihen-foto { grid-template-columns: 1fr; }
  .slot-foto { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: auto 1fr; }
  .slot-foto .streifen { grid-column: 1 / -1; }
  .slot-foto .blatt { margin-bottom: 0; }
  .slot-foto > p { padding-top: 1rem; align-self: start; }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "a b"
      "c d"
      "e f";
  }
  .gallery .g-a { aspect-ratio: 1; }
  .stimmen { grid-template-columns: 1fr; }
  .schrank { grid-template-columns: 1fr; }
  .typenschild { max-width: 360px; }
  .plan { grid-template-columns: 1fr; gap: 0; }
  .schritt { display: grid; grid-template-columns: 64px 1fr; column-gap: 1.2rem; padding-bottom: 1.6rem; }
  .schritt::before { top: 0; bottom: 0; left: 31px; right: auto; width: 2px; height: auto; }
  .schritt h3 { grid-column: 2; margin-top: 0.4rem; }
  .schritt p { grid-column: 2; }
  .sym { grid-row: 1 / span 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --pad: 40px; --railx: 16px; }
  .brand svg { width: 138px; }
  .header-phone { display: none; }
  .reihen { grid-template-columns: 1fr; row-gap: 1.4rem; }
  .slot-foto { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .slot-foto > p { padding-top: 0.75rem; }
  .gallery {
    grid-template-columns: 1fr;
    grid-template-areas: "a" "b" "c" "d" "e" "f";
  }
  .gallery .g-a, .gallery .g-b, .gallery .g-c, .gallery .g-d, .gallery .g-e, .gallery .g-f { aspect-ratio: auto; }
  .slot-foto .blatt img { aspect-ratio: 4 / 5; }
  .gallery .blatt img { aspect-ratio: 4 / 3; }
  .gallery .g-a img { aspect-ratio: 1; }
  .schriftfeld .cell.opt { display: none; }
  body { padding-bottom: 78px; } /* room for action bar */

  .action-bar {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 0.55rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    padding: 0.5rem 0.7rem calc(0.5rem + env(safe-area-inset-bottom));
    background: color-mix(in oklch, var(--paper) 94%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .action-bar .btn { min-height: 52px; padding-inline: 0.8rem; }
}

@media (max-width: 560px) {
  .sf { grid-template-columns: 1fr; }
  .sf-cell.half-l { border-right: 0; }
  .sf-head { flex-direction: column; gap: 0.1rem; }
}

@media (max-width: 400px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .gallery .blatt:hover img { transform: none; }
  .btn-primary:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .action-bar, .site-header { position: static; }
  .flow::before, .flow::after, .tap, .sec + .sec::before { display: none; }
  body { background: oklch(99.5% 0 0); color: oklch(12% 0 0); }
}

/* Stand-Datum auf den Rechtsseiten */
.stand-datum { font-size: 0.9rem; margin-top: 0.6rem; letter-spacing: 0.01em; }
