/* BMotors — Stylesheet
   Flach, eine Akzentfarbe (CI #50bef4, unveraendert uebernommen), hell als Standard.
   Mobile first: entworfen bei 402 px, danach nach oben erweitert.
   Keine Webfonts von Dritten — Systemschriften (Datenschutz und Ladezeit). */

:root {
  --grund:        #ffffff;
  --grund-2:      #f4f7f9;
  --grund-tief:   #0f2231;   /* dunkle Flaechen: Hero, Footer */
  --text:         #16202a;
  --text-leise:   #5b6b7a;
  --text-auf-tief:#e9f1f7;
  --linie:        #dde5ec;
  --akzent:       #50bef4;   /* CI — nie als Text auf Weiss (2,10:1) */
  --auf-akzent:   #0b2b3d;   /* dunkle Schrift auf der Akzentflaeche: 7,02:1 */
  --radius:       10px;
  --breite:       1240px;
  --takt:         clamp(3rem, 8vw, 5.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund:      #0f1720;
    --grund-2:    #16222e;
    --grund-tief: #0a131c;
    --text:       #e8eef4;
    --text-leise: #9fb0bf;
    --linie:      #263645;
  }
}
:root[data-theme="dark"] {
  --grund:      #0f1720;
  --grund-2:    #16222e;
  --grund-tief: #0a131c;
  --text:       #e8eef4;
  --text-leise: #9fb0bf;
  --linie:      #263645;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: var(--akzent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

/* Lange Komposita (z. B. „Verbraucherstreitbeilegungsgesetz") sprengen bei 402 px
   sonst die Zeile und erzeugen waagerechten Seiten-Scroll. */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .6em; font-weight: 700; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); }
p  { margin: 0 0 1.1em; }

.huelle { width: 100%; max-width: var(--breite); margin-inline: auto; padding-inline: 1.25rem; }
.schmal { max-width: 46rem; }
.abschnitt { padding-block: var(--takt); }
.flaeche  { background: var(--grund-2); }
.nur-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Kopf ---------- */

.springen {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--akzent); color: var(--auf-akzent);
  padding: .75rem 1.1rem; border-radius: var(--radius); font-weight: 600;
  transition: top .15s;
}
.springen:focus { top: 1rem; }

.kopf {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--grund) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linie);
  padding-top: env(safe-area-inset-top);
}
.kopf__reihe {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.marke { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; padding: .5rem 0; }
.marke img { width: 150px; height: auto; }
:root[data-theme="dark"] .marke img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .marke img { filter: invert(1) hue-rotate(180deg); }
}

.kopf__werkzeuge { display: flex; align-items: center; gap: .25rem; }

.knopf-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: var(--radius);
  color: var(--text); cursor: pointer;
}
.knopf-icon:hover { border-color: var(--linie); background: var(--grund-2); }
.knopf-icon svg { width: 22px; height: 22px; }

.nav { display: none; }
.nav ul { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
.nav a {
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 .5rem; border-radius: var(--radius);
  text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--text-leise);
}
.nav a:hover { color: var(--text); background: var(--grund-2); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--akzent); }

/* Menue auf kleinen Schirmen */
.nav--klapp {
  display: block; border-top: 1px solid var(--linie);
  max-height: 0; overflow: hidden; transition: max-height .25s ease;
}
.nav--klapp[data-offen="true"] { max-height: 44rem; }
.nav--klapp ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 0 1rem; }
.nav--klapp a { min-height: 48px; padding: 0 1.25rem; border-radius: 0; font-size: 1.0625rem; }
.nav--klapp a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--akzent); background: var(--grund-2); }

/* Impressum und Datenschutz stehen als normale Punkte neben Kontakt
   (§ 5 DDG: leicht erkennbar, unmittelbar erreichbar). */

@media (min-width: 1240px) {
  .nav { display: block; }
  .nav--klapp, .menue-schalter { display: none; }
}

/* ---------- Knoepfe ---------- */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.knopf svg { width: 19px; height: 19px; flex: none; }
.knopf--voll  { background: var(--akzent); color: var(--auf-akzent); }
.knopf--voll:hover { background: color-mix(in srgb, var(--akzent) 85%, #000); }
.knopf--rand  { border-color: var(--linie); color: var(--text); background: var(--grund); }
.knopf--rand:hover { border-color: var(--akzent); }
.knopf--hell  { border-color: color-mix(in srgb, var(--text-auf-tief) 40%, transparent); color: var(--text-auf-tief); }
.knopf--hell:hover { border-color: var(--akzent); }

/* ---------- Hero ---------- */

.hero { position: relative; background: var(--grund-tief); color: var(--text-auf-tief); overflow: hidden; }
.hero__bilder { position: absolute; inset: 0; }
.hero__bilder img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero__bilder img.ist-da { opacity: .42; }
.hero__inhalt { position: relative; padding-block: clamp(4rem, 14vw, 8rem); }
.hero h1 { color: #fff; max-width: 17ch; text-wrap: balance; }
.hero__vor {
  display: inline-block; margin-bottom: 1.25rem;
  padding: .35rem .8rem; border-radius: 999px;
  background: var(--akzent); color: var(--auf-akzent);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hero__text { font-size: clamp(1.05rem, 2.4vw, 1.25rem); max-width: 48ch; color: #dce8f1; }
.hero__knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- Fakten ---------- */

.fakten { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.fakt { padding: 1.25rem; background: var(--grund); border: 1px solid var(--linie); border-radius: var(--radius); }
.fakt svg { width: 24px; height: 24px; color: var(--text-leise); margin-bottom: .6rem; }
.fakt b { display: block; font-size: 1.05rem; }
.fakt span { color: var(--text-leise); font-size: .9rem; }
@media (min-width: 760px) { .fakten { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Karten ---------- */

.gitter { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 680px)  { .gitter--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .gitter--3 { grid-template-columns: repeat(3, 1fr); } }

.karte {
  display: flex; flex-direction: column;
  background: var(--grund); border: 1px solid var(--linie); border-radius: var(--radius);
  overflow: hidden;
}
.karte:hover { border-color: var(--akzent); }
.karte img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.karte__text { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.karte h3 { margin-bottom: .5rem; }
.karte ul { margin: 0 0 1.2rem; padding-left: 1.1rem; color: var(--text-leise); }
.karte li { margin-bottom: .2rem; }
.karte .weiter {
  margin-top: auto; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; font-weight: 600; text-decoration: none; color: var(--text);
}
.karte .weiter svg { width: 17px; height: 17px; color: var(--akzent); }

/* ---------- Leistungsliste ---------- */

.leistungen { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .leistungen { grid-template-columns: repeat(2, 1fr); } }
.leistung {
  padding: 1.4rem; background: var(--grund);
  border: 1px solid var(--linie); border-radius: var(--radius);
}
.leistung h3 { margin-bottom: .4rem; font-size: 1.1rem; }
.leistung p  { margin: 0; color: var(--text-leise); font-size: .97rem; }

/* Merkmalsliste mit Haken */
.haken { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
@media (min-width: 620px) { .haken { grid-template-columns: repeat(2, 1fr); } }
.haken li { display: flex; align-items: flex-start; gap: .6rem; }
.haken svg { width: 20px; height: 20px; flex: none; margin-top: .22rem; color: var(--akzent); }

/* ---------- Galerie ---------- */

.galerie { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 620px) { .galerie { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .galerie { grid-template-columns: repeat(3, 1fr); } }
.galerie a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--linie); }
.galerie a:hover { border-color: var(--akzent); }
.galerie img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

dialog.leuchte {
  padding: 0; border: 0; background: transparent;
  max-width: min(94vw, 1200px); max-height: 92vh;
}
dialog.leuchte::backdrop { background: rgba(6, 14, 21, .9); }
dialog.leuchte img { max-height: 84vh; width: auto; margin-inline: auto; border-radius: var(--radius); }
dialog.leuchte .zu {
  position: absolute; top: .5rem; right: .5rem;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius); cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff;
}
dialog.leuchte .zu svg { width: 22px; height: 22px; }

/* ---------- Beitraege ---------- */

.beitraege { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .beitraege { grid-template-columns: repeat(2, 1fr); } }
.beitrag {
  padding: 1.5rem; background: var(--grund);
  border: 1px solid var(--linie); border-radius: var(--radius);
  display: flex; flex-direction: column;
}
.beitrag:hover { border-color: var(--akzent); }
.beitrag h3 { font-size: 1.15rem; margin-bottom: .5rem; }
/* Trefflaeche: der Titel ist der Hauptweg in den Beitrag und braucht 44 px Hoehe. */
.beitrag h3 a { display: inline-block; padding-block: .72rem; text-decoration: none; }
.beitrag p { color: var(--text-leise); font-size: .97rem; }
.datum { display: block; font-size: .82rem; color: var(--text-leise); letter-spacing: .04em; text-transform: uppercase; margin-bottom: .6rem; }
.schlagwort {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid var(--linie); font-size: .78rem; color: var(--text-leise);
}

/* ---------- Kontakt ---------- */

.kontakt-gitter { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 880px) { .kontakt-gitter { grid-template-columns: 1fr 1fr; } }
.kontakt-zeile {
  display: flex; align-items: flex-start; gap: .9rem;
  padding: 1rem 0; border-bottom: 1px solid var(--linie);
}
.kontakt-zeile:last-child { border-bottom: 0; }
.kontakt-zeile svg { width: 22px; height: 22px; flex: none; color: var(--akzent); margin-top: .15rem; }
.kontakt-zeile b { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-leise); font-weight: 600; }
.kontakt-zeile a, .kontakt-zeile span { font-size: 1.05rem; }
.zeiten { border-collapse: collapse; margin-top: .25rem; }
.zeiten td { padding: .15rem 1.25rem .15rem 0; font-size: 1.05rem; vertical-align: top; }
.zeiten td:first-child { color: var(--text-leise); white-space: nowrap; }
.kontakt-zeile a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Fliesstext (Impressum, Datenschutz, Beitrag) ---------- */

.fliess h2 { margin-top: 2.2rem; }
.fliess h3 { margin-top: 1.8rem; }
.fliess ul { padding-left: 1.2rem; }
.fliess li { margin-bottom: .4rem; }
.fliess table { width: 100%; border-collapse: collapse; margin-bottom: 1.2rem; }
.fliess td { padding: .5rem .75rem .5rem 0; vertical-align: top; border-bottom: 1px solid var(--linie); }
/* Trefflaeche fuer Verweise im Fliesstext: senkrechtes Innenmass vergroessert die
   Flaeche auf 44 px, ohne den Zeilenfluss zu veraendern (inline-Padding zaehlt
   nicht zur Zeilenhoehe). */
.fliess a { overflow-wrap: anywhere; padding-block: .66rem; }

/* ---------- Seitenkopf der Unterseiten ---------- */

.seitenkopf { background: var(--grund-2); border-bottom: 1px solid var(--linie); padding-block: clamp(2.5rem, 7vw, 4rem); }
.seitenkopf p { color: var(--text-leise); max-width: 60ch; margin: 0; font-size: 1.1rem; }
.krumen { font-size: .88rem; color: var(--text-leise); margin-bottom: .8rem; }
.krumen a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }

/* ---------- Ruf-Band ---------- */

.band { background: var(--grund-tief); color: var(--text-auf-tief); }
.band h2 { color: #fff; }
.band p { color: #cfdde8; max-width: 52ch; }
.band__reihe { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Fuss ---------- */

.fuss {
  background: var(--grund-2); border-top: 1px solid var(--linie);
  padding-block: 3rem 2rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  font-size: .95rem;
}
.fuss__gitter { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .fuss__gitter { grid-template-columns: 1.4fr 1fr 1fr; } }
.fuss h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-leise); margin-bottom: .9rem; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: .1rem; }
.fuss a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; color: var(--text-leise); }
.fuss a:hover { color: var(--text); }
.fuss img { width: 160px; margin-bottom: 1rem; }
:root[data-theme="dark"] .fuss img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fuss img { filter: invert(1) hue-rotate(180deg); }
}
.fuss__unten {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linie);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  color: var(--text-leise); font-size: .88rem;
}
