/* Michael Best Bedachungen – Stylesheet
   Farben: Weiß als Grund, kühle Grautöne für Flächen und Linien, gedecktes Dunkelblau (vom Logo abgeleitet) für Handlungen.
   Motiv: die Dachlinie des Logos als blaue, schräge Bildkante im Kopfbereich.
   Schrift: IBM Plex Sans (variabel, lokal eingebunden) – sachlich, halbfett für Überschriften. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farben (aus dem Logo) */
  --blau: #1f3d8f;          /* gedecktes Dunkelblau, abgeleitet vom Logo-Blau */
  --blau-dunkel: #172f70;
  --blau-hell: #e8ecf5;
  --blau-mittel: #c9d3ea;
  --papier: #ffffff;
  --grau-hell: #f2f4f7;
  --linie: #dde2ea;
  --tinte: #0b0f19;         /* Schrift wie im Logo: fast schwarz */
  --grau: #4b5463;

  /* Schrift */
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --fs-klein: .9375rem;
  --fs-text: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem);
  --fs-h3: 1.25rem;
  --fs-h2: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
  --fs-h1: clamp(2.125rem, 1.35rem + 3.3vw, 3.5rem);
  --fs-hero: clamp(2.25rem, 1.2rem + 3.4vw, 3.75rem);

  /* Raster */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --abstand: clamp(56px, 4.5rem + 2.5vw, 112px);
  --radius: 2px;
  --header-h: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-text);
  line-height: 1.6;
  color: var(--tinte);
  background: var(--papier);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a, button, summary, input, select, textarea { touch-action: manipulation; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }

h1, h2, h3 {
  margin: 0 0 .5em;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.012em;
  text-wrap: balance;
  hyphens: manual;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.005em; line-height: 1.25; }
@media (max-width: 480px) {
  /* Lange deutsche Komposita passen schmaler gesetzt auf kleine Bildschirme */
  h1, h2 { hyphens: auto; }
}

:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; }
.aufruf :focus-visible, .lightbox :focus-visible { outline-color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--grau); max-width: 36em; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--tinte); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.35em;
  border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--blau); color: #fff; }
.btn-primary:hover { background: var(--blau-dunkel); }
.btn-outline { border-color: currentColor; color: var(--tinte); background: transparent; }
.btn-outline:hover { background: var(--tinte); border-color: var(--tinte); color: #fff; }
.btn-weiss { background: #fff; color: var(--blau-dunkel); }
.btn-weiss:hover { background: var(--blau-hell); }
.btn-rand-weiss { border-color: #fff; color: #fff; background: transparent; }
.btn-rand-weiss:hover { background: #fff; color: var(--blau); }
.aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.textlink {
  display: inline-block; font-weight: 600; color: var(--blau);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
  padding-block: 6px;
}
.textlink:hover { color: var(--blau-dunkel); text-decoration-thickness: 3px; }

/* ---------------------------------------------------------------- Kopfbereich */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linie);
  transition: box-shadow .25s ease;
}
.site-header.gescrollt { box-shadow: 0 6px 24px rgba(11, 15, 25, .08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; padding-block: 8px; }
.brand img { height: 62px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  position: relative; padding: 12px 12px; text-decoration: none;
  font-weight: 500; font-size: 1rem; color: var(--tinte);
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px;
  background: var(--blau); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav a:not(.btn):hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.nav .btn { margin-left: 12px; }
.nav-toggle, .nav-recht { display: none; }
@media (max-width: 1100px) and (min-width: 961px) {
  .brand img { height: 52px; }
  .nav a:not(.btn) { padding-inline: 9px; }
  .nav a:not(.btn)::after { left: 9px; right: 9px; }
  .nav .btn { margin-left: 8px; padding-inline: 1em; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .brand img { height: 44px; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 48px; padding: 12px; margin-right: -12px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--tinte); transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; background: var(--papier);
    border-bottom: 1px solid var(--linie);
    box-shadow: 0 24px 48px rgba(11, 15, 25, .14);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav:not(.offen) { display: none; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--grau-hell); font-size: 1.125rem; }
  .nav a:not(.btn)::after { left: 0; right: auto; width: 32px; bottom: 10px; }
  .nav .btn { margin: 20px 0 0; }
  .nav .nav-recht { display: flex; gap: 20px; padding-top: 16px; }
  .nav .nav-recht a:not(.btn) { border: 0; padding: 8px 0; font-size: var(--fs-klein); color: var(--grau); }
  .nav .nav-recht a::after { display: none; }
}

/* ---------------------------------------------------------------- Hero (Startseite) */
.hero { background: var(--papier); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); border-bottom: 1px solid var(--linie); }
.hero-text {
  padding-block: clamp(48px, 6vw, 104px);
  padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  padding-right: clamp(24px, 3vw, 48px);
  align-self: center;
}
.hero h1 { font-size: var(--fs-hero); font-weight: 600; letter-spacing: -.018em; line-height: 1.08; margin-bottom: .45em; max-width: 12em; }
.hero-media { position: relative; min-height: 100%; margin: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  /* Dachlinie aus dem Logo: schräge Bildkante */
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--blau);
  clip-path: polygon(30% 0, calc(30% + 10px) 0, 10px 100%, 0 100%);
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-text { padding: 40px var(--gutter) 36px; }
  .hero-media { aspect-ratio: 16 / 10; }
  .hero-media img { clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%); }
  .hero-media::before { clip-path: polygon(0 22%, 100% 0, 100% 8px, 0 calc(22% + 8px)); }
}

/* Nachweise unter dem Hero */
.nachweise { background: var(--grau-hell); border-bottom: 1px solid var(--linie); }
.nachweise ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nachweise li { padding: 24px 24px 24px 0; display: flex; flex-direction: column; gap: 2px; }
.nachweise li + li { padding-left: 24px; border-left: 1px solid var(--linie); }
.nachweise strong { font-weight: 600; font-size: 1.125rem; }
.nachweise .zahl { font-variant-numeric: tabular-nums; }
.nachweise span { color: var(--grau); font-size: var(--fs-klein); }
@media (max-width: 860px) {
  .nachweise ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nachweise li, .nachweise li + li { padding: 18px 16px 18px 0; border-left: 0; }
  .nachweise li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--linie); }
  .nachweise li:nth-child(n+3) { border-top: 1px solid var(--linie); }
  .nachweise strong { font-size: 1rem; hyphens: auto; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------------------- Seitenkopf (Unterseiten) */
.seitenkopf { background: var(--grau-hell); border-bottom: 1px solid var(--linie); }
.seitenkopf .wrap { padding-block: clamp(36px, 4.5vw, 72px) clamp(40px, 5vw, 80px); }
.seitenkopf h1 { max-width: 16em; }
.seitenkopf .lead { margin-top: 4px; }
.seitenkopf.mit-bild { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.seitenkopf.mit-bild h1 { font-size: clamp(2rem, 1.3rem + 2.5vw, 3.25rem); }
.seitenkopf.mit-bild .wrap { max-width: none; margin: 0; padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); padding-right: clamp(24px, 3vw, 48px); align-self: center; }
.seitenkopf.mit-bild .hero-media img { clip-path: polygon(26% 0, 100% 0, 100% 100%, 0 100%); }
.seitenkopf.mit-bild .hero-media::before { clip-path: polygon(26% 0, calc(26% + 8px) 0, 8px 100%, 0 100%); }
@media (max-width: 860px) {
  .seitenkopf.mit-bild { grid-template-columns: minmax(0, 1fr); }
  .seitenkopf.mit-bild .wrap { padding: 36px var(--gutter); }
  .seitenkopf.mit-bild .hero-media { aspect-ratio: 16 / 9; }
  .seitenkopf.mit-bild .hero-media img { clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%); }
  .seitenkopf.mit-bild .hero-media::before { clip-path: polygon(0 22%, 100% 0, 100% 8px, 0 calc(22% + 8px)); }
}

.pfad { margin-bottom: 18px; font-size: var(--fs-klein); color: var(--grau); }
.pfad ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pfad li + li::before { content: "/"; margin-right: 6px; color: #a9b1bf; }
.pfad a { color: var(--tinte); text-underline-offset: 3px; }
.pfad a:hover { color: var(--blau); }

/* ---------------------------------------------------------------- Abschnitte */
.abschnitt { padding-block: var(--abstand); }
.abschnitt.grau { background: var(--grau-hell); }
.abschnitt-kopf { max-width: 760px; margin-bottom: clamp(28px, 3.5vw, 48px); }
.abschnitt-kopf h2 { margin-bottom: .35em; }
.abschnitt-fuss { margin-top: clamp(28px, 3.5vw, 44px); }

/* Schwerpunkte: 2 × 2 */
.schwerpunkte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4.5vw, 56px) clamp(24px, 4vw, 48px); }
.schwerpunkt img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--grau-hell); }
.schwerpunkt h3 { font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem); margin: 20px 0 8px; }
.schwerpunkt h3 a { text-decoration: none; }
.schwerpunkt h3 a:hover { color: var(--blau); }
.schwerpunkt p { color: var(--grau); max-width: 34em; }
.schwerpunkt .textlink { margin-top: 8px; }
@media (max-width: 720px) { .schwerpunkte { grid-template-columns: minmax(0, 1fr); } }

/* Zweispaltig mit Bild */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split > * { min-width: 0; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split.bild-links > figure { order: -1; }
.split figure { margin: 0; }
.split.oben { align-items: start; }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.bild-links > figure { order: 0; }
}

/* Ablauf: echte Reihenfolge, deshalb nummeriert */
/* Zeitleiste: Kreise mit Nummer, verbunden durch eine Linie */
.ablauf { list-style: none; counter-reset: schritt; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 24px; margin-top: 32px; }
.ablauf li { counter-increment: schritt; position: relative; display: flex; flex-direction: column; gap: 14px; font-weight: 600; }
.ablauf li::before {
  content: counter(schritt); position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px;
  font-weight: 600; color: var(--blau); background: var(--papier); border: 2px solid var(--blau); border-radius: 50%;
  font-variant-numeric: tabular-nums; transition: background-color .3s ease, color .3s ease;
}
.ablauf li:hover::before { background: var(--blau); color: #fff; }
.ablauf li:not(:last-child)::after {
  content: ""; position: absolute; top: 21px; left: 44px; right: -24px; height: 2px;
  background: linear-gradient(90deg, var(--blau), var(--blau-mittel));
}
@media (max-width: 760px) {
  .ablauf { grid-auto-flow: row; gap: 0; }
  .ablauf li { flex-direction: row; align-items: center; gap: 16px; padding-bottom: 22px; }
  .ablauf li:not(:last-child)::after { top: 44px; bottom: 0; left: 21px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--blau), var(--blau-mittel)); }
}

.haken { list-style: none; display: grid; gap: 10px; margin-top: 20px; }
.haken li { position: relative; padding-left: 32px; }
.haken li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blau) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.haken a { text-decoration: none; }
.haken a:hover { color: var(--blau); text-decoration: underline; text-underline-offset: 3px; }
.haken.fuenf { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 24px; margin-top: 0; }
@media (max-width: 1000px) { .haken.fuenf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .haken.fuenf { grid-template-columns: minmax(0, 1fr); } }


/* Leistungsliste */
.liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 40px); }
.liste.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.liste > div { padding: 20px 0 22px; border-top: 1px solid var(--linie); }
.liste h3 { margin-bottom: 6px; font-size: 1.125rem; }
.liste p { color: var(--grau); font-size: var(--fs-klein); max-width: 34em; }
@media (max-width: 900px) { .liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .liste, .liste.zwei { grid-template-columns: minmax(0, 1fr); } }

/* Leistungsübersicht: Schwerpunkt-Blöcke */
.block + .block { margin-top: var(--abstand); }
.block h2 { margin-bottom: .35em; }

/* Fakten (Über uns) */
.fakten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.fakten div { padding: 16px 0; border-top: 1px solid var(--linie); }
.fakten dt { font-size: var(--fs-klein); color: var(--grau); }
.fakten dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 480px) { .fakten { grid-template-columns: minmax(0, 1fr); } }

/* Ansprechpartner */
.personen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); max-width: 760px; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--grau-hell); }
.person h3 { margin: 16px 0 2px; }
.person p { color: var(--grau); }
@media (max-width: 420px) { .personen { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Karriere: offene Stellen */
.stellen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 40px) clamp(24px, 3vw, 40px); }
.stelle { display: flex; flex-direction: column; padding: 28px; min-width: 0; background: var(--papier); border: 1px solid var(--linie); border-radius: 10px; border-top: 3px solid var(--blau); transition: box-shadow .25s ease, transform .25s ease; }
.stelle:hover { box-shadow: 0 18px 40px rgba(11, 15, 25, .08); transform: translateY(-2px); }
.stelle h3 { font-size: clamp(1.25rem, 1.15rem + .4vw, 1.5rem); margin-bottom: 6px; }
.stelle .art { font-size: var(--fs-klein); font-weight: 600; color: var(--blau); margin-bottom: 10px; }
.stelle p { color: var(--grau); max-width: 34em; }
.stelle .textlink { align-self: flex-start; margin-top: auto; padding-top: 14px; }
@media (max-width: 860px) { .stellen { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Galerie */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter button {
  min-height: 44px; padding: 8px 16px; cursor: pointer;
  font: inherit; font-size: var(--fs-klein); font-weight: 600;
  color: var(--tinte); background: var(--papier);
  border: 1.5px solid var(--linie); border-radius: 999px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.filter button:hover { border-color: var(--blau); color: var(--blau); }
.filter button[aria-pressed="true"] { background: var(--blau); border-color: var(--blau); color: #fff; }
.filter button .anzahl { font-weight: 400; opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }
.galerie-status { font-size: var(--fs-klein); color: var(--grau); margin-bottom: 20px; }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.galerie a { position: relative; display: block; overflow: hidden; background: var(--grau-hell); }
.galerie.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.galerie a[hidden] { display: none; }
.galerie img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s ease; }
.galerie a:hover img { transform: scale(1.03); }
.galerie .kat {
  position: absolute; left: 0; bottom: 0; padding: 6px 12px;
  background: rgba(11, 15, 25, .82); color: #fff; font-size: .8125rem; font-weight: 600;
}
@media (max-width: 600px) {
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .galerie .kat { font-size: .75rem; padding: 4px 8px; }
  .galerie.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; overscroll-behavior: contain;
  grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  background: rgba(11, 15, 25, .94); color: #fff;
}
.lightbox.offen { display: grid; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 0 24px; max-height: 100dvh; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { font-size: var(--fs-klein); color: #c9ced8; text-align: center; }
.lightbox button {
  width: 48px; height: 48px; margin: auto; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%;
  cursor: pointer; font: inherit; font-size: 1.5rem; line-height: 1;
}
.lightbox button:hover { background: rgba(255, 255, 255, .18); }
.lightbox .lb-zu { position: absolute; top: 12px; right: 12px; }
@media (max-width: 600px) {
  .lightbox { grid-template-columns: minmax(0, 1fr); }
  .lightbox .lb-zurueck, .lightbox .lb-vor { position: absolute; bottom: 16px; }
  .lightbox .lb-zurueck { left: calc(50% - 60px); }
  .lightbox .lb-vor { left: calc(50% + 12px); }
  .lightbox figure { padding: 64px 12px 88px; }
}

/* ---------------------------------------------------------------- Handlungsaufforderung (Logo-Blau) */
.aufruf {
  position: relative; overflow: hidden; color: #fff; padding-block: clamp(56px, 6vw, 88px);
  background:
    linear-gradient(160deg, transparent 0 62%, rgba(255, 255, 255, .06) 62% 64%, transparent 64%),
    linear-gradient(160deg, transparent 0 70%, rgba(255, 255, 255, .04) 70% 71.5%, transparent 71.5%),
    radial-gradient(120% 140% at 100% 0%, #2a4aa3 0%, var(--blau) 45%, var(--blau-dunkel) 100%);
}
.aufruf .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.aufruf h2 { margin-bottom: .25em; }
.aufruf p { color: #d6ddf0; max-width: 36em; }
.aufruf .aktionen { margin-top: 0; }
@media (max-width: 860px) { .aufruf .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Kontakt */
.kontakt-raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.kontakt-raster h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.kontaktwege { list-style: none; display: grid; gap: 0; margin-top: 8px; }
.kontaktwege li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--linie); }
.kontaktwege li:last-child { border-bottom: 1px solid var(--linie); }
.kontaktwege .ico { width: 44px; height: 44px; display: grid; place-items: center; background: var(--blau-hell); border-radius: 50%; }
.kontaktwege .ico svg { width: 20px; height: 20px; stroke: var(--blau); }
.kontaktwege strong { display: block; font-size: var(--fs-klein); color: var(--grau); font-weight: 500; }
.kontaktwege a, .kontaktwege address { font-style: normal; font-weight: 600; font-size: 1.125rem; text-decoration: none; overflow-wrap: anywhere; }
.kontaktwege a:hover { color: var(--blau); text-decoration: underline; text-underline-offset: 3px; }
.kontaktwege .textlink { font-size: var(--fs-klein); margin-top: 4px; color: var(--blau); }
@media (max-width: 900px) { .kontakt-raster { grid-template-columns: minmax(0, 1fr); } }

.formular { background: var(--grau-hell); padding: clamp(24px, 4vw, 44px); }
.felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 20px; }
.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld.breit { grid-column: 1 / -1; }
.feld label { font-weight: 600; font-size: var(--fs-klein); }
.feld .pflicht { color: var(--blau); }
.feld input, .feld select, .feld textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--tinte);
  background: var(--papier); border: 1.5px solid var(--linie); border-radius: var(--radius);
}
.feld textarea { min-height: 140px; resize: vertical; }
.feld input:hover, .feld select:hover, .feld textarea:hover { border-color: #a9b1bf; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 3px solid rgba(31, 61, 143, .25); outline-offset: 0; border-color: var(--blau); }
.feld [aria-invalid="true"] { border-color: #b3261e; }
.feld .fehler { color: #b3261e; font-size: .875rem; font-weight: 600; }
.feld .fehler:empty { display: none; }
.formular .btn { margin-top: 22px; }
.hinweis { margin-top: 14px; font-size: .875rem; color: var(--grau); }
.hinweis a { color: var(--blau); }
.meldung { margin-top: 18px; padding: 14px 16px; background: var(--papier); border-left: 4px solid var(--blau); font-size: var(--fs-klein); }
.meldung[hidden] { display: none; }
@media (max-width: 560px) { .felder { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Rechtliches */
.recht { max-width: 760px; }
.recht h2 { font-size: 1.375rem; margin: 2em 0 .6em; letter-spacing: -.01em; }
.recht h2:first-child { margin-top: 0; }
.recht p, .recht li { overflow-wrap: anywhere; }
.recht a { color: var(--blau); text-underline-offset: 3px; }
.recht .stand { margin-top: 2.5em; color: var(--grau); font-size: var(--fs-klein); }

/* ---------------------------------------------------------------- Fußbereich */
.site-footer { background: var(--grau-hell); color: var(--grau); font-size: var(--fs-klein); border-top: 1px solid var(--linie); }
.site-footer .wrap { padding-block: clamp(44px, 5vw, 72px) 26px; }
.fuss-raster { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 36px 28px; }
.fuss-raster > * { min-width: 0; }
.site-footer .brand img { height: 60px; }
.site-footer .fuss-marke p { margin-top: 12px; }
.site-footer h2 { font-size: 1rem; color: var(--tinte); letter-spacing: 0; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 2px; }
.site-footer a:not(.brand) { color: var(--tinte); text-decoration: none; display: inline-block; padding-block: 5px; }
.site-footer a:not(.brand):hover { color: var(--blau); text-decoration: underline; text-underline-offset: 3px; }
.site-footer address { font-style: normal; margin-bottom: 6px; }
.fuss-unten { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--linie); }
.fuss-unten ul { display: flex; gap: 20px; }
@media (max-width: 1000px) { .fuss-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fuss-marke { grid-column: 1 / -1; } }
@media (max-width: 560px) { .fuss-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Anruf-Schaltfläche auf dem Handy */
.anrufen {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: none; width: 56px; height: 56px; place-items: center;
  background: var(--blau); color: #fff; border-radius: 50%;
  box-shadow: 0 8px 24px rgba(31, 61, 143, .3);
}
.anrufen svg { width: 24px; height: 24px; stroke: #fff; }
@media (max-width: 720px) { .anrufen { display: grid; } .site-footer .wrap { padding-bottom: 96px; } }

/* Fehlerseite */
.fehlerseite { padding-block: clamp(80px, 12vw, 160px); }
.fehlerseite .code { font-weight: 600; font-size: clamp(4rem, 3rem + 6vw, 8rem); line-height: 1; color: var(--linie); margin-bottom: 16px; }

/* ---------------------------------------------------------------- Startseite: neue Elemente */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: var(--fs-klein); font-weight: 600; color: var(--blau); letter-spacing: .01em; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--blau); }

/* Laufband mit allen Leistungen (rein dekorativ) */
.laufband { display: flex; overflow: hidden; border-bottom: 1px solid var(--linie); background: var(--papier);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.laufband ul { list-style: none; display: flex; flex: none; gap: 0; padding: 16px 0; animation: laufen 60s linear infinite; }
.laufband li { display: flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap; font-weight: 500; color: var(--grau); }
.laufband li::after { content: ""; width: 7px; height: 7px; background: var(--blau-mittel); transform: rotate(45deg); }
.laufband:hover ul { animation-play-state: paused; }
@keyframes laufen { to { transform: translateX(-100%); } }

/* Bento-Raster für die Schwerpunkte */
.bento { display: grid; grid-template-columns: 1.35fr 1fr 1fr; grid-template-rows: repeat(2, minmax(300px, 1fr)); gap: 16px; }
.bento-karte { position: relative; display: block; overflow: hidden; border-radius: 12px; color: #fff; text-decoration: none; background: var(--tinte); isolation: isolate; min-height: 250px; }
.bento-karte.gross { grid-row: span 2; }
.bento-karte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.bento-karte::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 15, 25, .05) 0%, rgba(11, 15, 25, .35) 40%, rgba(11, 15, 25, .88) 100%); transition: background-color .3s ease; }
.bento-karte:hover img { transform: scale(1.05); }
.bento-text { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(20px, 2.4vw, 32px); }
.bento-text h3 { font-size: clamp(1.375rem, 1.15rem + .8vw, 1.875rem); margin-bottom: 6px; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.bento-karte.gross h3 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.375rem); }
.bento-text p { color: #e3e7ef; max-width: 30em; font-size: var(--fs-klein); margin-bottom: 0; }
.mehr { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; font-size: var(--fs-klein); }
.mehr svg { width: 18px; height: 18px; transition: transform .25s ease; }
.bento-karte:hover .mehr svg { transform: translateX(4px); }
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .bento-karte.gross { grid-row: auto; grid-column: span 2; min-height: 340px; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-karte.gross { grid-column: auto; min-height: 300px; }
}

/* Weitere Leistungen als Karten */
.leistungs-karten { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .leistungs-karten { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); } }
.leistungs-karten .karte {
  position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 20px;
  background: var(--papier); border: 1px solid var(--linie); border-radius: 10px; text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.leistungs-karten strong { font-weight: 600; }
.leistungs-karten span { color: var(--grau); font-size: var(--fs-klein); line-height: 1.5; }

/* Über uns: Fließtext und Werte */
.fliesstext p:not(.lead) { color: var(--grau); max-width: 38em; }
.fliesstext .lead { margin-bottom: 1.1em; }
.werte { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.werte li { padding: 26px 24px; background: var(--papier); border: 1px solid var(--linie); border-radius: 10px; }
.werte h3 { font-size: 1.125rem; margin: 16px 0 6px; }
.werte p { color: var(--grau); font-size: var(--fs-klein); margin: 0; }
.wert-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blau-hell); color: var(--blau); }
.wert-icon svg { width: 24px; height: 24px; }
@media (max-width: 1000px) { .werte { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .werte { grid-template-columns: minmax(0, 1fr); } }
.abschnitt-kopf .lead a { color: var(--blau); font-weight: 600; text-underline-offset: 3px; }

/* Über uns: Ansprechpartner */
.ansprechpartner { list-style: none; display: grid; gap: 0; margin: 20px 0 24px; }
.ansprechpartner li { display: flex; flex-direction: column; padding: 14px 0; border-top: 1px solid var(--linie); }
.ansprechpartner li:last-child { border-bottom: 1px solid var(--linie); }
.ansprechpartner strong { font-size: 1.125rem; font-weight: 600; }
.ansprechpartner span { color: var(--grau); }
figure.mit-text figcaption { margin-top: 10px; font-size: var(--fs-klein); color: var(--grau); }
.abschnitt .split .lead a { color: var(--blau); font-weight: 600; text-underline-offset: 3px; }

/* Einsatzgebiet */
.gebiet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.orte { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.orte li { padding: 9px 16px; background: var(--papier); border: 1px solid var(--linie); border-radius: 999px; font-weight: 500; font-size: var(--fs-klein); }
.orte li:first-child { background: var(--blau); border-color: var(--blau); color: #fff; }
.orte li.weitere { background: transparent; border-style: dashed; color: var(--grau); }
@media (max-width: 860px) { .gebiet { grid-template-columns: minmax(0, 1fr); } }

/* Spotlight: weicher Lichtkegel folgt der Maus */
.spot { position: relative; overflow: hidden; }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(360px circle at var(--x, 50%) var(--y, 50%), rgba(31, 61, 143, .09), transparent 60%);
}
.spot:hover::before { opacity: 1; }

/* Galerie: weiche Rundung */
.galerie a { border-radius: 8px; }
.schwerpunkt img, .split img, .person img { border-radius: 10px; }

/* Sanftes Einblenden beim Scrollen (nur mit JavaScript, nicht bei reduzierter Bewegung) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .laufband ul { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header .nav, .nav-toggle, .anrufen, .aufruf, .filter { display: none !important; }
  .hero-media, .seitenkopf .hero-media { display: none; }
}
