/* ===================================================================
   MAIBRIDGE — Stilbogen
   Aufbau: 1 Marken-Werte · 2 Grundlagen · 3 Kopf und Menue
           4 Bausteine · 5 Abschnitte · 6 Fuss · 7 Rechtsseiten
   Keine externe Anfrage, keine Abhaengigkeit.
   =================================================================== */

/* ---------- 1  Marken-Werte -------------------------------------- */
:root {
  --tief:        #101922;   /* Marken-Dunkel, aus dem Signet            */
  --tief-weich:  #1B2733;
  --blau:        #0A5A7A;   /* Handlungsfarbe, AA auf Weiss             */
  --blau-hell:   #0E7CA6;
  --cyan:        #4CD4F0;   /* Akzent aus dem Signet, nie als Textfarbe */
  --cyan-matt:   #E3F7FD;

  --grund:       #FFFFFF;
  --sanft:       #F4F7F9;
  --sanft-tief:  #EAF0F4;
  --rand:        #DCE5EB;
  --rand-stark:  #C3D1DB;

  --text:        #1B2733;
  --text-leise:  #55646F;
  --text-invers: #FFFFFF;

  --warn:        #9A5B00;
  --warn-matt:   #FFF4E2;

  --schrift: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --breit:  1200px;
  --schmal: 760px;

  --r-klein: 6px;
  --r:       10px;
  --r-gross: 16px;

  --schatten-1: 0 1px 2px rgba(16,25,34,.06), 0 2px 8px rgba(16,25,34,.05);
  --schatten-2: 0 2px 6px rgba(16,25,34,.07), 0 12px 32px rgba(16,25,34,.09);
  --schatten-3: 0 12px 48px rgba(16,25,34,.14);

  --kopfhoehe: 76px;
  --oberkante: 12px;     /* dunkler Streifen ueber dem Kopfbalken */
  --takt: 96px;          /* Abstand zwischen zwei Abschnitten */
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-var.woff2") format("woff2-variations");
  font-weight: 100 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--kopfhoehe) + var(--oberkante) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.ist-gesperrt { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--tief);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.4rem); }
h4 { font-size: 1.02rem; }

p  { margin: 0 0 1.1em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--blau); text-underline-offset: .2em; }
a:hover { color: var(--blau-hell); }

img, svg { max-width: 100%; height: auto; }

/* Nichts ragt seitlich heraus — das Fenster ist die Grenze.
   "clip" statt "hidden": nur so bleibt der klebende Kopf klebend. */
html, body { overflow-x: clip; max-width: 100%; }

/* Lange Wörter, Adressen und Verweise brechen um, statt die Seite
   auf dem Handy breit zu ziehen. */
p, li, dd, dt, a, h1, h2, h3, h4, blockquote, summary, address, strong {
  overflow-wrap: break-word;
}
hr { border: 0; border-top: 1px solid var(--rand); margin: 2rem 0; }

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

.sprung {
  position: absolute; left: 8px; top: -60px; z-index: 300;
  background: var(--tief); color: #fff; padding: .7rem 1.1rem;
  border-radius: var(--r-klein); text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.sprung:focus { top: 8px; color: #fff; }

.nur-vorlese {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.huelle { width: min(100% - 40px, var(--breit)); margin-inline: auto; }
.huelle--schmal { width: min(100% - 40px, var(--schmal)); margin-inline: auto; }
@media (max-width: 560px) { .huelle, .huelle--schmal { width: calc(100% - 32px); } }

/* ---------- 3  Kopf und Menue ------------------------------------ */
/* Schmaler Streifen ueber dem Kopfbalken, im dunklen Marken-Ton. Er bleibt
   beim Scrollen stehen und traegt den Kopfbalken, der darunter klebt. */
.oberkante {
  position: sticky; top: 0; z-index: 130;
  height: var(--oberkante); background: var(--tief);
}

.kopf {
  position: sticky; top: var(--oberkante); z-index: 120;
  background: var(--blau);
  border-bottom: 1px solid rgba(255,255,255,.14);
  transition: box-shadow .2s ease;
}
.kopf.ist-geschoben { box-shadow: var(--schatten-1); }

.kopf__reihe {
  display: flex; align-items: center; gap: 24px; flex-wrap: nowrap;
  height: var(--kopfhoehe);
  width: min(100% - 40px, var(--breit)); margin-inline: auto;
}
@media (max-width: 560px) { .kopf__reihe { width: calc(100% - 32px); } }

.marke {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--tief);
  flex: 0 1 auto; min-width: 0;
}
/* Wortmarke: Breite folgt der Hoehe, damit das Seitenverhaeltnis stimmt. */
.marke__bild { height: 26px; width: auto; display: block; }

/* -- Wortmarke beim Ueberfahren --
   Sie waechst eine Spur und geht beim Wegfahren zurueck. */
.marke { transition: transform .35s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: no-preference) {
  .marke:hover { transform: scale(1.045); }
}

/* -- Grossbild-Menue -- */
.menue { display: none; }
.menue__liste { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
/* Bewusst nicht positioniert: die Tafel soll sich am Kopf ausrichten,
   nicht am einzelnen Menuepunkt — nur so wird sie seitenbreit. */
.menue__punkt { position: static; }

.menue__knopf, .menue__glied {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 13px; border-radius: var(--r-klein);
  font: inherit; font-size: .97rem; font-weight: 500;
  color: var(--tief); text-decoration: none;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.menue__knopf:hover, .menue__glied:hover,
.menue__punkt[data-offen="ja"] > .menue__knopf { background: var(--sanft-tief); color: var(--blau); }
.menue__glied[aria-current="page"], .menue__knopf[data-aktiv="ja"] { color: var(--blau); }
.menue__glied[aria-current="page"]::after, .menue__knopf[data-aktiv="ja"]::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px;
  height: 2px; background: var(--blau); border-radius: 2px;
}
.menue__glied[aria-current="page"], .menue__knopf[data-aktiv="ja"] { position: relative; }

.menue__pfeil { transition: transform .18s ease; flex: 0 0 auto; }
.menue__punkt[data-offen="ja"] .menue__pfeil { transform: rotate(180deg); }

/* -- Aufklapptafel: volle Seitenbreite, unter dem Kopf ------------
   Die Tafel liegt im <li>, richtet sich aber am <header> aus (dieser
   ist sticky und damit positioniert, der Menuepunkt bewusst nicht).
   So beginnt sie exakt an der Kopfunterkante und laeuft von Rand zu
   Rand; der Inhalt bleibt auf die Huellenbreite begrenzt. */
.tafel {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--grund);
  border-top: 1px solid var(--rand);
  border-bottom: 1px solid var(--rand);
  box-shadow: var(--schatten-3);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .16s ease, transform .18s ease, visibility .18s;
}
.menue__punkt[data-offen="ja"] > .tafel { opacity: 1; visibility: visible; transform: translateY(0); }

.tafel__raster {
  width: min(100% - 40px, var(--breit)); margin-inline: auto;
  padding: 30px 0 34px;
  display: grid; grid-template-columns: 1fr minmax(260px, 320px); gap: 48px; align-items: start;
}
@media (max-width: 1180px) { .tafel__raster { gap: 32px; } }

/* Die Unterpunkte fuellen die freie Breite: drei oder vier Spalten,
   je nachdem, wie viele der Menuepunkt mitbringt. */
.tafel__spalte {
  display: grid; gap: 4px; align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
}

.tafel__glied {
  display: grid; grid-template-columns: 40px 1fr; gap: 13px; align-items: start;
  padding: 13px 14px; border-radius: var(--r); text-decoration: none; color: var(--text);
  transition: background .14s ease;
}
.tafel__glied:hover { background: var(--sanft); color: var(--text); }
.tafel__glied:hover .tafel__name { color: var(--blau); }
.tafel__glied[aria-current="page"] { background: var(--sanft); }
.tafel__glied[aria-current="page"] .tafel__name { color: var(--blau); }
.tafel__sinnbild {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--cyan-matt); color: var(--blau); flex: 0 0 auto;
}
.tafel__name { display: block; font-weight: 600; font-size: .98rem; color: var(--tief); line-height: 1.3; }
.tafel__satz { display: block; font-size: .86rem; color: var(--text-leise); line-height: 1.5; margin-top: 3px; }

.tafel__merk {
  background: linear-gradient(160deg, var(--tief) 0%, #17283a 100%);
  color: #fff; border-radius: var(--r); padding: 22px; display: flex;
  flex-direction: column; gap: 12px; justify-content: space-between; height: 100%;
}
.tafel__merk h3 { color: #fff; font-size: 1.06rem; margin: 0; }
.tafel__merk p { color: #C6D4DE; font-size: .87rem; margin: 0; line-height: 1.55; }
.tafel__merk a { color: var(--cyan); font-weight: 600; font-size: .9rem; text-decoration: none;
                 display: inline-flex; align-items: center; gap: 7px; }
.tafel__merk a:hover { text-decoration: underline; }

/* Fussleiste der Tafel: nimmt die gewonnene Breite auf. */
.tafel__sohle { border-top: 1px solid var(--rand); background: var(--sanft); }
.tafel__sohle > div {
  width: min(100% - 40px, var(--breit)); margin-inline: auto;
  padding: 15px 0; display: flex; flex-wrap: wrap; gap: 10px 28px;
  align-items: center; justify-content: space-between;
}
.tafel__sohle span { font-size: .87rem; color: var(--text-leise); }
/* Dunkler Abschluss ganz unten — derselbe Ton wie der Streifen ueber
   dem Kopfbalken. */
.tafel__kante { height: 6px; background: var(--tief); }

/* -- Rechte Seite im Kopf -- */
.kopf__rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.sprache { display: inline-flex; border: 1px solid var(--rand); border-radius: var(--r-klein); overflow: hidden; }
.sprache button {
  font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  padding: 6px 9px; border: 0; background: var(--grund); color: var(--text-leise); cursor: pointer;
}
.sprache button + button { border-left: 1px solid var(--rand); }
.sprache button[aria-pressed="true"] { background: var(--tief); color: #fff; }

/* -- Hamburger -- */
.klappe {
  margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 1px solid var(--rand); border-radius: var(--r-klein); cursor: pointer;
  color: var(--tief); flex: 0 0 auto;
}
.klappe__striche { display: block; width: 20px; height: 14px; position: relative; }
.klappe__striche i {
  position: absolute; left: 0; width: 100%; height: 2px; background: currentColor;
  border-radius: 2px; transition: transform .22s ease, opacity .16s ease;
}
.klappe__striche i:nth-child(1) { top: 0; }
.klappe__striche i:nth-child(2) { top: 6px; }
.klappe__striche i:nth-child(3) { top: 12px; }
.klappe[aria-expanded="true"] .klappe__striche i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.klappe[aria-expanded="true"] .klappe__striche i:nth-child(2) { opacity: 0; }
.klappe[aria-expanded="true"] .klappe__striche i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* -- Schublade (klein) --
   Klappt unter dem Kopf nach unten auf, hoechstens bis zum unteren
   Bildrand. Sie steht im HTML ausserhalb von .kopf, weil dessen
   backdrop-filter sonst der Bezugsrahmen fuer position:fixed waere
   und das Feld auf die Kopfhoehe zusammenfiele. */
.schublade {
  position: fixed; top: var(--kopfhoehe); left: 0; right: 0; z-index: 110;
  max-height: calc(100vh - var(--kopfhoehe));
  max-height: calc(100dvh - var(--kopfhoehe));
  background: var(--grund);
  border-bottom: 1px solid var(--rand);
  box-shadow: var(--schatten-3);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .18s ease, transform .22s cubic-bezier(.4,0,.2,1), visibility .22s;
}
.schublade[data-offen="ja"] { opacity: 1; visibility: visible; transform: translateY(0); }

.schublade__inhalt { padding: 8px 20px 20px; flex: 0 0 auto; }
.schublade__fuss {
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rand); background: var(--sanft);
  display: grid; gap: 10px;
}

.schublade__gruppe { border-bottom: 1px solid var(--rand); }
.schublade__kopf {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 2px; font: inherit; font-size: 1.1rem; font-weight: 600;
  color: var(--tief); background: none; border: 0; cursor: pointer; text-align: left;
  text-decoration: none; min-height: 56px;
}
.schublade__kopf .menue__pfeil { transition: transform .2s ease; color: var(--text-leise); }
.schublade__kopf[aria-expanded="true"] { color: var(--blau); }
.schublade__kopf[aria-expanded="true"] .menue__pfeil { transform: rotate(180deg); }

.schublade__fach { display: none; padding: 0 0 10px; }
.schublade__fach[data-offen="ja"] { display: block; }
.schublade__fach a {
  display: block; padding: 13px 2px 13px 16px; min-height: 48px;
  border-left: 2px solid var(--rand); margin-left: 2px;
  text-decoration: none; color: var(--text); font-size: 1rem;
}
.schublade__fach a strong { display: block; font-weight: 600; color: var(--tief); }
.schublade__fach a span { display: block; font-size: .85rem; color: var(--text-leise); line-height: 1.4; }
.schublade__fach a:hover, .schublade__fach a[aria-current="page"] {
  border-left-color: var(--blau); background: var(--sanft);
}
.schublade__fach a[aria-current="page"] strong { color: var(--blau); }

/* -- Kopf in Markenfarbe --
   Der Balken traegt die Handlungsfarbe, alles darin steht hell darauf.
   Die Aufklapptafel bleibt weiss; ihre Farben stehen oben und bleiben
   unberuehrt. */
.marke { color: #fff; }
.menue__knopf, .menue__glied { color: #fff; }
.menue__knopf:hover, .menue__glied:hover,
.menue__punkt[data-offen="ja"] > .menue__knopf { background: rgba(255,255,255,.16); color: #fff; }
.menue__glied[aria-current="page"], .menue__knopf[data-aktiv="ja"] { color: #fff; }
.menue__glied[aria-current="page"]::after, .menue__knopf[data-aktiv="ja"]::after { background: #fff; }

.kopf .sprache { border-color: rgba(255,255,255,.42); }
.kopf .sprache button { background: transparent; color: rgba(255,255,255,.8); }
.kopf .sprache button + button { border-left-color: rgba(255,255,255,.42); }
.kopf .sprache button[aria-pressed="true"] { background: #fff; color: var(--blau); }

/* Der Knopf muss sich vom Balken abheben: weiss auf blau statt blau auf blau. */
.kopf__rechts .tat--voll { background: #fff; color: var(--blau); }
.kopf__rechts .tat--voll:hover { background: var(--cyan-matt); color: var(--blau); }

.klappe { border-color: rgba(255,255,255,.42); color: #fff; }
.kopf :focus-visible { outline-color: #fff; }

/* Umschaltpunkt: ab hier grosses Menue, darunter Schublade */
@media (min-width: 1040px) {
  .menue { display: block; }
  .klappe { display: none; }
  .schublade { display: none; }
}

/* -- Kopf auf schmalen Geraeten --
   Unter dem Umschaltpunkt traegt der Balken nur noch Marke, Sprache und
   Burger. Der Demo-Knopf wandert in die Schublade: zu dritt passten sie
   auf einem Handy nicht nebeneinander, der Burger wurde aus dem Bild
   geschoben und die Seite liess sich seitlich ziehen. */
@media (max-width: 1039.98px) {
  :root { --kopfhoehe: 62px; }
  .kopf__reihe { gap: 10px; }
  .kopf__rechts { gap: 8px; }
  .kopf__rechts .tat { display: none; }     /* Demo-Knopf: siehe Schublade */
  .klappe { margin-left: 0; }
  .marke__bild { height: 24px; }
}

/* Sehr schmal: auch die Sprachwahl steht nur noch in der Schublade. */
@media (max-width: 400px) {
  .kopf__reihe { gap: 8px; }
  .kopf .sprache { display: none; }
  .marke__bild { height: 20px; }
}

/* Sprachwahl im Fuss der Schublade — dort ist sie auf jedem Geraet
   erreichbar, auch wenn sie oben weggeblendet ist. */
.schublade__sprache { display: flex; justify-content: center; padding-top: 4px; }
.schublade__sprache .sprache { border-color: var(--rand-stark); }
.schublade__sprache .sprache button { padding: 9px 18px; font-size: .84rem; min-height: 40px; }

/* ---------- 4  Bausteine ----------------------------------------- */
.tat {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; min-height: 48px;
  border-radius: var(--r-klein); border: 1px solid transparent;
  font: inherit; font-size: .97rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.tat:active { transform: translateY(1px); }
.tat--voll   { background: var(--blau); color: #fff; }
.tat--voll:hover { background: var(--blau-hell); color: #fff; }
.tat--rand   { background: var(--grund); color: var(--tief); border-color: var(--rand-stark); }
.tat--rand:hover { border-color: var(--blau); color: var(--blau); background: var(--grund); }
.tat--hell   { background: var(--cyan); color: var(--tief); }
.tat--hell:hover { background: #6FDDF4; color: var(--tief); }
.tat--klein  { padding: 9px 15px; min-height: 40px; font-size: .9rem; }
.tat--breit  { width: 100%; }

.weiter {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: .94rem; text-decoration: none; color: var(--blau);
}
.weiter:hover { gap: 11px; }
.weiter svg { transition: transform .15s ease; }

.notiz {
  display: block; font-family: var(--mono); font-size: .74rem; line-height: 1.5;
  color: var(--warn); background: var(--warn-matt);
  border-left: 3px solid #E6A44A; padding: 8px 12px; border-radius: 0 var(--r-klein) var(--r-klein) 0;
  margin-top: 10px;
}

.karte {
  background: var(--grund); border: 1px solid var(--rand); border-radius: var(--r-gross);
  padding: 26px; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.karte--fuehrt:hover { border-color: var(--rand-stark); box-shadow: var(--schatten-2); transform: translateY(-3px); }
.karte h3 { margin-bottom: .45em; }
.karte p { color: var(--text-leise); font-size: .96rem; }
.karte__fuss { margin-top: 18px; }

.sinnbild {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: var(--cyan-matt); color: var(--blau); margin-bottom: 18px;
}
.sinnbild--dunkel { background: rgba(76,212,240,.14); color: var(--cyan); }

.raster { display: grid; gap: 22px; }
.raster--2 { grid-template-columns: repeat(2, 1fr); }
.raster--3 { grid-template-columns: repeat(3, 1fr); }
.raster--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .raster--4 { grid-template-columns: repeat(2, 1fr); }
  .raster--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .raster--2, .raster--3, .raster--4 { grid-template-columns: 1fr; }
}

.liste-haken { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.liste-haken li { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; font-size: .97rem; }
.liste-haken li::before {
  content: ""; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--cyan-matt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230A5A7A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.4l3 3 6-6.4'/%3E%3C/svg%3E") center/13px no-repeat;
}

/* ---------- 5  Abschnitte ---------------------------------------- */
.bahn { padding: var(--takt) 0; }
.bahn--eng { padding: calc(var(--takt) * .62) 0; }
.bahn--sanft { background: var(--sanft); }
.bahn--tief { background: var(--tief); color: #C6D4DE; }
.bahn--tief h2, .bahn--tief h3 { color: #fff; }
.bahn--tief .karte { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.bahn--tief .karte h3 { color: #fff; }
.bahn--tief .karte p { color: #A8BAC7; }
@media (max-width: 760px) { :root { --takt: 64px; } }

.bahn__kopf { max-width: 720px; margin-bottom: 44px; }
.bahn__kopf--mitte { margin-inline: auto; text-align: center; }
.bahn__kopf p { color: var(--text-leise); font-size: 1.08rem; margin-bottom: 0; }
.bahn--tief .bahn__kopf p { color: #A8BAC7; }

/* -- Aufmacher -- */
.aufmacher {
  background: linear-gradient(175deg, var(--sanft) 0%, var(--grund) 62%);
  border-bottom: 1px solid var(--rand);
  padding: clamp(48px, 6vw, 84px) 0 clamp(56px, 7vw, 92px);
  position: relative; overflow: hidden;
}
.aufmacher__raster { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .aufmacher__raster { grid-template-columns: 1fr; gap: 40px; } }

.aufmacher__satz > p {
  font-size: clamp(1.02rem, .96rem + .4vw, 1.2rem); color: var(--text-leise);
  max-width: 56ch; margin-top: 1.1em;
}
.aufmacher__tasten { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.aufmacher--klein { padding: clamp(40px, 4.5vw, 64px) 0; }
.aufmacher--klein h1 { font-size: clamp(1.9rem, 1.3rem + 2.5vw, 2.9rem); }
.aufmacher--klein .aufmacher__raster { grid-template-columns: 1fr; gap: 0; }
.aufmacher--klein .aufmacher__satz > p { max-width: 62ch; }

/* -- Aufmacher mit Bildkeil --
   Links die ruhige graue Flaeche fuer den Text, rechts hinter einem
   schraegen Schnitt das Foto. Der Pfad steht im style-Attribut des
   Keils, der Schnitt hier. */
.aufmacher--bild {
  position: relative; overflow: hidden;
  background: var(--sanft-tief);
  min-height: 340px; display: grid; align-items: center;
}
.aufmacher__keil {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform-origin: center; will-change: transform;
  /* Kein harter Schnitt mehr: das Bild reicht weit nach links und
     verlaeuft quer zur Schraege ins Nichts. Der Winkel folgt der
     frueheren Kante (oben 50 %, unten 34 %). */
  -webkit-mask-image: linear-gradient(118deg,
    rgba(0,0,0,0) 10%, rgba(0,0,0,.28) 32%, rgba(0,0,0,.72) 52%, #000 68%);
  mask-image: linear-gradient(118deg,
    rgba(0,0,0,0) 10%, rgba(0,0,0,.28) 32%, rgba(0,0,0,.72) 52%, #000 68%);
}

/* Zeilenweise Hinterlegung: nur hinter der Schrift, nicht als Kasten um
   den ganzen Block. Darum inline mit geklonter Dekoration — so bekommt
   jede umbrochene Zeile ihre eigene Flaeche. */
.hinterlegt {
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: #fff;
  color: var(--blau);          /* dieselbe Farbe wie der Kopfbalken */
  padding: 0 .42em;
  border-radius: 3px;
}
/* -- Aufmacher mit Bild: gemeinsame Handschrift --
   Ueberschrift und Satz liegen auf einer weissen Flaeche mit einem
   Transparenzgrad von 40 %. Der Satz steht eine Stufe groesser und fett. */
.aufmacher--gefasst .hinterlegt { background: rgba(255, 255, 255, .4); }
/* Hoeherer Aufmacher: ein 3:2-Foto verliert im flachen Band fast zwei
   Drittel seiner Hoehe. Mehr Hoehe heisst mehr Bild, mittig beschnitten. */
.aufmacher--bild-gross { min-height: clamp(460px, 42vw, 680px); }
/* Farbverlauf ueber dem Bild: links die Farbe des Fusses, rechts die des
   Kopfbalkens. */
.aufmacher--gefasst { position: relative; }
.aufmacher--gefasst::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--tief) 0%, var(--blau) 100%);
  mix-blend-mode: multiply;
  opacity: .32;
}
.aufmacher--gefasst .aufmacher__satz > p {
  font-size: clamp(1.18rem, 1.05rem + .6vw, 1.5rem);
  font-weight: 700;
  line-height: 1.55;
}

/* Wo das Motiv nicht in der Bildmitte sitzt, haelt der Keil den Teil fest,
   auf den es ankommt. Bei "unten" bleibt das untere Drittel stehen, egal wie
   flach der Ausschnitt wird. */
.aufmacher__keil--unten { background-position: center bottom; }

/* Startseite: derselbe Keil, aber das zweispaltige Raster bleibt stehen.
   Der Satz sitzt links, wo der Keil ohnehin ins Nichts laeuft; das
   Schaubild liegt als weisse Karte rechts auf dem Foto. */
.aufmacher--startbild { position: relative; overflow: hidden; }
.aufmacher--startbild > .huelle { position: relative; z-index: 1; }
/* Die zweite Spalte ist leer, seit das Schaubild weg ist. Eine Spalte gibt
   der Zeile die Breite, die sie braucht - "Wir verbinden Systeme." bleibt
   dadurch bis hinunter zu kleinen Fenstern einzeilig. */
.aufmacher--startbild .aufmacher__raster { grid-template-columns: 1fr; }
.aufmacher--startbild .aufmacher__satz { max-width: min(100%, 46rem); }

.aufmacher--bild > .huelle { position: relative; z-index: 1; }
.aufmacher--bild .aufmacher__satz { max-width: 52%; }
.aufmacher--bild h1 { line-height: 1.34; }
.aufmacher--bild .aufmacher__satz > p { line-height: 1.85; }
.aufmacher--bild .aufmacher__satz > p { max-width: none; }

/* Schmale Fenster: der Keil taugt nicht mehr, das Bild legt sich als
   schraeges Band unter den Text. */
@media (max-width: 900px) {
  .aufmacher--bild { min-height: 0; padding-bottom: 190px; }
  /* Der schraege Keil taugt hier nicht: er laeuft quer durch den Satz.
     Auf der Startseite legt sich das Bild wie auf den Unterseiten als
     Band unter den Text, und der Schleier kippt von links auf oben. */
  .aufmacher--startbild { padding-bottom: 230px; }
  .aufmacher__keil {
    -webkit-mask-image: linear-gradient(168deg, rgba(0,0,0,0) 34%, rgba(0,0,0,.6) 56%, #000 74%);
    mask-image: linear-gradient(168deg, rgba(0,0,0,0) 34%, rgba(0,0,0,.6) 56%, #000 74%);
  }
  .aufmacher--bild .aufmacher__satz { max-width: none; }
}

/* -- Weisser Streifen --
   Steht dort, wo frueher die Brotkrume stand, und trennt ausserdem die
   Personenbahnen. Ueberall dieselbe Staerke. */
.strich { height: 40px; background: var(--grund); }

/* -- Schaubild Datenfluss -- */
.fluss {
  background: var(--grund); border: 1px solid var(--rand); border-radius: var(--r-gross);
  box-shadow: var(--schatten-2); padding: 24px;
}
.fluss__reihe { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
@media (max-width: 540px) { .fluss__reihe { grid-template-columns: 1fr; } }
.fluss__stapel { display: grid; gap: 8px; }
.fluss__kasten {
  border: 1px solid var(--rand); border-radius: var(--r-klein); padding: 9px 12px;
  font-size: .87rem; font-weight: 500; background: var(--sanft); text-align: center;
}
.fluss__kern {
  background: var(--tief); color: #fff; border-radius: var(--r); padding: 18px 16px;
  text-align: center; box-shadow: var(--schatten-2);
}
.fluss__kern b { display: block; font-size: 1.02rem; letter-spacing: -.01em; }
.fluss__kern span { display: block; font-family: var(--mono); font-size: .68rem; color: var(--cyan); letter-spacing: .08em; margin-top: 4px; }
.fluss__pfeile { display: flex; justify-content: center; color: var(--rand-stark); padding: 4px 0; }
@media (min-width: 541px) { .fluss__pfeile { display: none; } }

/* -- Zahlenband -- */
.zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 760px) { .zahlen { grid-template-columns: repeat(2, 1fr); } }
.zahl b {
  display: block; font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); font-weight: 600;
  color: var(--tief); letter-spacing: -.03em; line-height: 1.1;
}
.bahn--tief .zahl b { color: #fff; }
.zahl span { display: block; font-size: .88rem; color: var(--text-leise); margin-top: 4px; }
.bahn--tief .zahl span { color: #A8BAC7; }

/* -- Ablauf in Schritten -- */
.schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); counter-reset: s; }
@media (max-width: 860px) { .schritte { grid-template-columns: 1fr; } }
.schritte li { counter-increment: s; position: relative; padding-top: 22px; border-top: 2px solid var(--rand); }
.schritte li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: .78rem; font-weight: 600; color: var(--blau);
  position: absolute; top: -12px; left: 0; background: var(--grund); padding-right: 10px;
}
.bahn--sanft .schritte li::before { background: var(--sanft); }
.schritte h3 { font-size: 1.15rem; }
.schritte p { color: var(--text-leise); font-size: .96rem; margin: 0; }

/* -- Stimmen -- */
.stimme { display: grid; gap: 18px; }
.stimme blockquote {
  margin: 0; font-size: clamp(1.08rem, 1rem + .5vw, 1.32rem); line-height: 1.5;
  color: var(--tief); font-weight: 500; letter-spacing: -.01em;
}
.stimme blockquote::before { content: "„"; color: var(--cyan); font-size: 2.4em; line-height: 0; vertical-align: -.35em; margin-right: .05em; }
.stimme figcaption { font-size: .9rem; color: var(--text-leise); }
.stimme figcaption b { display: block; color: var(--tief); font-weight: 600; }

/* -- Aufklapp-Fragen -- */
.frage { border-bottom: 1px solid var(--rand); }
.frage summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.05rem; color: var(--tief); min-height: 56px;
  display: flex; align-items: center;
}
.frage summary::-webkit-details-marker { display: none; }
.frage summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 13px; height: 13px;
  margin-top: -7px; border-right: 2px solid var(--blau); border-bottom: 2px solid var(--blau);
  transform: rotate(45deg); transition: transform .2s ease;
}
.frage[open] summary::after { transform: rotate(-135deg); }
.frage summary:hover { color: var(--blau); }
.frage__satz { padding: 0 40px 22px 0; color: var(--text-leise); }

/* -- Tabelle -- */

/* -- Personen --
   Derselbe Schnitt wie beim Aufmacher: links der Text auf ruhiger Flaeche,
   rechts das Portraet, das quer zur Schraege nach links ausfaedelt. Ohne
   Portraet bleibt die Bahn schlicht und der Text laeuft ueber die volle
   Spaltenbreite. */
.person-bahn { position: relative; overflow: hidden; }
.person-bahn--bild {
  background: var(--sanft-tief); display: grid; align-items: center;
  border-bottom: 1px solid var(--rand); min-height: 560px;
}
.person-bahn__keil {
  position: absolute; top: 0; bottom: 0; right: 0; left: auto;
  width: min(52%, 680px); z-index: 0;
  background-size: cover; background-position: 50% 18%;
  /* Harte schraege Kante: das Bild endet links an einer klaren Diagonalen,
     oben weiter rechts als unten. Kein Verlauf — die Kante soll sichtbar
     sein. */
  -webkit-clip-path: polygon(26% 0, 100% 0, 100% 100%, 0 100%);
  clip-path: polygon(26% 0, 100% 0, 100% 100%, 0 100%);
}
.person-bahn > .huelle { position: relative; z-index: 1; }
.person__satz { max-width: 74ch; }
/* Der Text bleibt links von der Schnittkante — auch an deren unterem,
   weiter links liegenden Ende. */
.person-bahn--bild .person__satz { max-width: min(46%, 56ch); }
.person__satz > h1 { font-size: clamp(1.9rem, 1.3rem + 2.5vw, 2.9rem); }

/* Schmale Fenster: der Keil taugt nicht mehr, das Portraet legt sich als
   schraeges Band unter den Text. */
@media (max-width: 900px) {
  .person-bahn--bild { padding-bottom: 380px; }
  .person-bahn__keil {
    width: auto; left: 0; top: auto; bottom: 0; height: 400px;
    background-size: cover; background-position: 50% 16%;
    -webkit-clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%);
    clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%);
  }
  .person-bahn--bild .person__satz { max-width: none; }
}
.person__rolle { color: var(--blau); font-weight: 600; font-size: .94rem; margin-bottom: .8em; }
.person__daten { display: grid; gap: 14px; margin-top: 18px; font-size: .9rem; }
/* Trennstrich vor jeder Zeile — im Blau des Kopfbalkens. */
.person__daten div { display: grid; grid-template-columns: 116px 1fr; gap: 12px;
  border-top: 1px solid var(--blau); padding-top: 14px; }
@media (max-width: 480px) { .person__daten div { grid-template-columns: 1fr; gap: 2px; } }
.person__daten dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-leise); padding-top: 3px; }
.person__daten dd { margin: 0; color: var(--text); }
.daten-liste { margin: 0; padding-left: 1.1em; list-style: disc; }
.daten-liste li { margin: 0 0 2px; }
.daten-liste li:last-child { margin-bottom: 0; }
.daten-liste li::marker { color: var(--rand-stark); }

/* -- Ruf zum Schluss -- */
.ruf {
  background: linear-gradient(150deg, var(--tief) 0%, #17293b 55%, #10344a 100%);
  border-radius: var(--r-gross); padding: clamp(34px, 5vw, 60px);
  color: #C6D4DE; display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: center;
}
@media (max-width: 860px) { .ruf { grid-template-columns: 1fr; gap: 26px; } }
.ruf h2 { color: #fff; margin-bottom: .4em; }
.ruf p { color: #A8BAC7; margin: 0; }
.ruf__tasten { display: flex; flex-wrap: wrap; gap: 12px; }

/* -- Kontaktkacheln -- */
.kontaktreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
@media (max-width: 640px) { .kontaktreihe { grid-template-columns: 1fr; } }
.kontaktkachel a { font-size: 1.05rem; font-weight: 600; text-decoration: none; word-break: break-word; }
.kontaktkachel address { font-style: normal; color: var(--text-leise); font-size: .97rem; }

/* ---------- 6  Fuss ---------------------------------------------- */
.fuss { background: var(--tief); color: #A8BAC7; padding: 64px 0 0; font-size: .93rem; }
.fuss a { color: #C6D4DE; text-decoration: none; }
.fuss a:hover { color: var(--cyan); text-decoration: underline; }
.fuss__raster { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 900px) { .fuss__raster { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .fuss__raster { grid-template-columns: 1fr; gap: 28px; } }
.fuss h3 {
  color: #fff; font-size: .76rem; font-family: var(--mono); letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 16px; font-weight: 600;
}
.fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fuss address { font-style: normal; line-height: 1.8; }
.fuss__marke { display: inline-flex; align-items: center; margin-bottom: 16px; }
.fuss__bild { height: 24px; width: auto; display: block; }
.fuss__sohle {
  margin-top: 52px; border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0 30px;
  display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; justify-content: space-between;
  font-size: .86rem;
}
.fuss__recht { display: flex; flex-wrap: wrap; gap: 12px 22px; list-style: none; margin: 0; padding: 0; }

/* ---------- 7  Rechtsseiten -------------------------------------- */
.recht { padding: 56px 0 var(--takt); }
.recht h2 { font-size: 1.3rem; margin-top: 2.4em; }
.recht h3 { font-size: 1.04rem; margin-top: 1.8em; }
.recht h2:first-of-type { margin-top: 1.4em; }
.recht p, .recht li { color: var(--text-leise); }
.recht li { margin-bottom: .5em; }
.recht dl { display: grid; gap: 10px; margin: 0 0 1.4em; }
.recht dt { font-family: var(--mono); font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-leise); }
.recht dd { margin: 0 0 .6em; color: var(--text); }

/* ---------- Einblenden beim Scrollen ------------------------------ */
.js .tritt-ein { opacity: 0; transform: translateY(14px); }
.js .tritt-ein.ist-da { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) { .js .tritt-ein { opacity: 1; transform: none; } }

/* ---------- 8  Schmale Geraete -----------------------------------
   Zuerst das Handy: engerer Takt, ruhigere Abstaende, Knoepfe ueber die
   volle Breite und nichts, was seitlich herausragt. */
@media (max-width: 600px) {
  :root { --takt: 52px; }

  .bahn__kopf { margin-bottom: 30px; }
  .karte { padding: 20px; }
  .fluss { padding: 16px; }
  .raster { gap: 16px; }
  .zahlen { gap: 14px; }
  .schritte { gap: 18px; }

  /* Handlungsknoepfe stehen untereinander und fuellen die Zeile — so
     sind sie mit dem Daumen sicher zu treffen. */
  .aufmacher__tasten, .ruf__tasten { flex-direction: column; align-items: stretch; gap: 10px; }
  .aufmacher__tasten .tat, .ruf__tasten .tat { width: 100%; }

  .frage summary { padding-right: 34px; font-size: 1rem; }
  .frage__satz { padding-right: 0; }

  .schublade__inhalt { padding: 6px 16px 16px; }
  .schublade__fuss { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }

  .fuss { padding-top: 48px; }
  .fuss__sohle { margin-top: 36px; }

  /* Bildbahnen: das Foto legt sich flacher unter den Text, damit die
     Bahn nicht ueber mehrere Bildschirme laeuft. */
  .aufmacher--bild { padding-bottom: 150px; }
  .person-bahn--bild { min-height: 0; padding-bottom: 300px; }
  .person-bahn__keil { height: 320px; }
}

@media (max-width: 380px) {
  .zahlen { grid-template-columns: 1fr; }
}

@media print {
  .kopf, .schublade, .fuss, .sprung, .ruf { display: none !important; }
  body { font-size: 11pt; }
}
