/* ==========================================================================
   Reinbund — Stylesheet
   Marke: vier Quadranten, die zusammen ein B bilden. Die Form eines Viertels —
   drei gerundete Ecken, eine spitze — kehrt in Knoepfen, Bildern, Karten,
   Icons und Abschnittskanten wieder.

   Kontrastregeln (WCAG AA, geprueft):
   - Schwarz auf Weiss 21:1 — Fliesstext
   - Tiefblau #2F5688 auf Weiss 7,5:1 — Links, Nebentext
   - Blau #5083BC auf Weiss 3,9:1 — NUR grosse Schrift (ab 24 px oder 19 px fett)
   - Weiss auf Tiefblau 7,5:1 — Text auf blauen Flaechen
   - Gelb auf Tiefblau 5,6:1, Schwarz auf Gelb 15,6:1
   - Gelb auf Weiss 1,3:1 — nie als Schrift
   ========================================================================== */

/* --- Schrift (lokal gehostet) ------------------------------------------- */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Token -------------------------------------------------------------- */
:root {
  --rb-blau:      #5083BC;
  --rb-blau-tief: #2F5688;
  --rb-blau-hell: #A8C4E3;
  --rb-gelb:      #FFDD23;
  --rb-schwarz:   #000000;
  --rb-weiss:     #FFFFFF;
  /* Aus Blau-hell abgeleitet, fuer ruhige helle Flaechen */
  --rb-nebel:     #EEF3FA;

  --font: 'Figtree', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --t-xs:   0.875rem;
  --t-sm:   0.9375rem;
  --t-base: 1.0625rem;
  --t-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --t-h4:   1.125rem;
  --t-h3:   clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
  --t-h2:   clamp(1.875rem, 1.45rem + 1.8vw, 3.125rem);
  --t-h1:   clamp(2.375rem, 1.6rem + 3.4vw, 4.5rem);
  --t-hero: clamp(2.625rem, 1.5rem + 4.6vw, 5.5rem);

  --shell: 1320px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem;  --s-7: 2.75rem; --s-8: 4rem;
  --s-9: clamp(3.5rem, 7vw, 6.5rem);

  /* Formmotiv */
  --q-s: .75rem;                       /* kleine Viertelform: Felder */
  --q-m: 1.75rem;                      /* Knoepfe, Karten */
  --q-l: clamp(2.5rem, 6vw, 5rem);     /* Bilder, Abschnittskanten */

  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
@media (max-width: 480px) { :root { --header-h: 66px; } }

/* --- Grundlagen --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--rb-weiss); color: var(--rb-schwarz);
  font-family: var(--font); font-size: var(--t-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--rb-gelb); color: var(--rb-schwarz); }

:focus-visible { outline: 3px solid var(--rb-schwarz); outline-offset: 3px; }
.section--tief :focus-visible, .section--schwarz :focus-visible,
.pagehead :focus-visible, .hero :focus-visible, .site-footer :focus-visible,
.cta :focus-visible { outline-color: var(--rb-gelb); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 200;
  background: var(--rb-gelb); color: var(--rb-schwarz); padding: .75rem 1.25rem;
  font-weight: 700; text-decoration: none; border-radius: 0 var(--q-m) var(--q-m) var(--q-m);
}
.skip-link:focus { top: .75rem; }

/* --- Typografie --------------------------------------------------------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: var(--t-h1); font-weight: 850; letter-spacing: -0.035em; }
h2 { font-size: var(--t-h2); color: var(--rb-blau); }
h3 { font-size: var(--t-h3); color: var(--rb-blau); line-height: 1.15; }
h4 { font-size: var(--t-h4); font-weight: 750; line-height: 1.3; color: var(--rb-blau-tief); }
p { text-wrap: pretty; }

.measure { max-width: 64ch; }
.lede { font-size: var(--t-lead); line-height: 1.5; max-width: 44ch; }
.klein { font-size: var(--t-sm); }
.tnum { font-variant-numeric: tabular-nums; }

/* Kleine Rubrik — bewusst in normaler Schreibweise, nicht gesperrt */
.rubrik {
  display: inline-block; font-size: var(--t-sm); font-weight: 700;
  color: var(--rb-blau-tief); margin-bottom: var(--s-4);
}

.textlink, .prose a {
  color: var(--rb-blau-tief); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 3px; text-decoration-color: var(--rb-blau-hell);
  transition: text-decoration-color .2s var(--ease);
}
.textlink:hover, .prose a:hover { text-decoration-color: var(--rb-blau-tief); }

/* --- Layout ------------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s-9); position: relative; }
.section--weiss   { background: var(--rb-weiss); }
.section--nebel   { background: var(--rb-nebel); }
.section--tief    { background: var(--rb-blau-tief); color: var(--rb-weiss); }
.section--schwarz { background: var(--rb-schwarz); color: var(--rb-weiss); }
.section--tief h2, .section--tief h3, .section--tief h4,
.section--schwarz h2, .section--schwarz h3, .section--schwarz h4 { color: var(--rb-weiss); }
.section--tief .rubrik, .section--schwarz .rubrik { color: var(--rb-gelb); }
.section--tief .textlink, .section--schwarz .textlink {
  color: var(--rb-weiss); text-decoration-color: var(--rb-gelb);
}

/* Abschnittskante: eine Ecke als Viertelkreis, ueberlappt den Abschnitt davor */
.section--kante {
  border-top-right-radius: var(--q-l);
  margin-top: calc(var(--q-l) * -1);
  padding-top: calc(var(--s-9) + var(--q-l) * .4);
  z-index: 1;
}
.section:has(+ .section--kante), .section:has(+ .cta.section--kante) {
  padding-bottom: calc(var(--s-9) + var(--q-l));
}

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.span-3 { grid-column-end: span 3; } .span-4 { grid-column-end: span 4; }
.span-5 { grid-column-end: span 5; } .span-6 { grid-column-end: span 6; }
.span-7 { grid-column-end: span 7; } .span-8 { grid-column-end: span 8; }
.span-12 { grid-column-end: span 12; }
.start-5 { grid-column-start: 5; } .start-6 { grid-column-start: 6; }
.start-7 { grid-column-start: 7; } .start-8 { grid-column-start: 8; }
.start-9 { grid-column-start: 9; } .start-10 { grid-column-start: 10; }
@media (max-width: 900px) { .grid > * { grid-column: 1 / -1 !important; } }

.section-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-4) var(--s-5); align-items: end; margin-bottom: var(--s-7);
}
.section-head__title { grid-column: 1 / span 7; }
.section-head__aside { grid-column: 9 / span 4; }
@media (max-width: 900px) {
  .section-head__title, .section-head__aside { grid-column: 1 / -1; }
}

.rule { height: 2px; border: 0; margin: 0; background: var(--rb-blau-hell); }
.section--tief .rule { background: rgba(255,255,255,.25); }

.stack > * + * { margin-top: var(--s-4); }
.mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); } .mt-8 { margin-top: var(--s-8); }

/* --- Kopfzeile ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--rb-weiss); border-bottom: 2px solid var(--rb-nebel);
  display: flex; align-items: center;
}
.site-header__inner {
  width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-height: 44px; }
.brand svg { width: 48px; height: 48px; flex: none; }
.brand__name { font-size: 1.375rem; font-weight: 850; letter-spacing: -0.03em; color: var(--rb-blau-tief); }
@media (max-width: 380px) { .brand__name { display: none; } }

.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav__list { display: flex; align-items: center; gap: .25rem; list-style: none; }
.nav__link {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 44px;
  padding: 0 .8rem; border: 0; background: none; cursor: pointer;
  font-size: var(--t-sm); font-weight: 650; text-decoration: none; color: var(--rb-schwarz);
  border-radius: 0 var(--q-m) var(--q-m) var(--q-m);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav__link:hover { background: var(--rb-nebel); color: var(--rb-blau-tief); }
.nav__link[aria-current="page"] { background: var(--rb-nebel); color: var(--rb-blau-tief); }
.nav__toggle svg { width: .6rem; transition: transform .25s var(--ease); }
.nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__tel { font-weight: 750; font-size: var(--t-sm); color: var(--rb-blau-tief); text-decoration: none; white-space: nowrap; }
.nav__tel:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1180px) { .nav__tel { display: none; } }
@media (max-width: 1023px) { .nav__list, .nav > .btn { display: none; } }

.nav__group { position: relative; }
.megamenu {
  position: fixed; top: var(--header-h); left: 50%; transform: translateX(-50%);
  width: min(76rem, calc(100vw - 2rem));
  max-height: calc(100vh - var(--header-h) - 1rem); overflow-y: auto;
  background: var(--rb-weiss); border: 2px solid var(--rb-blau-hell);
  border-radius: 0 0 var(--q-m) var(--q-m);
  padding: var(--s-6); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-5);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s;
}
.nav__group.is-open .megamenu { opacity: 1; visibility: visible; }
.megamenu__title { font-size: var(--t-sm); font-weight: 800; color: var(--rb-blau-tief); margin-bottom: .6rem; line-height: 1.3; }
.megamenu__col ul { list-style: none; display: grid; gap: .15rem; }
.megamenu__col a {
  display: block; padding: .3rem 0; font-size: var(--t-xs); line-height: 1.35;
  text-decoration: none; color: var(--rb-schwarz);
}
.megamenu__col a:hover { color: var(--rb-blau-tief); text-decoration: underline; text-underline-offset: 3px; }
.megamenu__foot {
  grid-column: 1 / -1; border-top: 2px solid var(--rb-nebel); padding-top: var(--s-4);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap;
}
.megamenu__foot p { font-size: var(--t-xs); max-width: 52ch; }

.burger {
  display: none; align-items: center; gap: .55rem; min-height: 44px; padding: 0 1rem;
  border: 2px solid var(--rb-blau-tief); background: none; cursor: pointer;
  border-radius: 0 var(--q-m) var(--q-m) var(--q-m);
  font-weight: 750; font-size: var(--t-sm); color: var(--rb-blau-tief);
}
.burger__bars { display: grid; gap: 4px; width: 18px; }
.burger__bars span { height: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] .burger__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bars span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1023px) { .burger { display: inline-flex; } }

.drawer {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; background: var(--rb-weiss);
  padding: var(--s-5) var(--gutter) var(--s-8); overflow-y: auto; overscroll-behavior: contain;
  display: none;
}
.drawer.is-open { display: block; }
.drawer__list { list-style: none; }
.drawer__list > li { border-bottom: 2px solid var(--rb-nebel); }
.drawer__list > li > a, .drawer__acc {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  min-height: 56px; padding: .5rem 0; border: 0; background: none; cursor: pointer;
  font-size: 1.25rem; font-weight: 800; text-decoration: none; text-align: left; color: var(--rb-blau-tief);
}
.drawer__acc svg { width: .75rem; transition: transform .25s var(--ease); }
.drawer__acc[aria-expanded="true"] svg { transform: rotate(180deg); }
.drawer__panel { display: none; padding-bottom: var(--s-5); }
.drawer__panel.is-open { display: block; }
.drawer__title { font-weight: 800; color: var(--rb-blau-tief); margin: var(--s-4) 0 .25rem; font-size: var(--t-sm); }
.drawer__panel ul { list-style: none; }
.drawer__panel a { display: block; padding: .5rem 0; min-height: 44px; text-decoration: none; }
.drawer__foot { margin-top: var(--s-6); display: grid; gap: var(--s-3); justify-items: start; }
.drawer__foot a.plain { font-weight: 700; color: var(--rb-blau-tief); min-height: 44px; display: inline-flex; align-items: center; }
body.is-locked { overflow: hidden; }

/* --- Knoepfe: Viertelform, spitze Ecke unten links ----------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.5rem; border: 2px solid transparent;
  border-radius: var(--q-m) var(--q-m) var(--q-m) 0;
  font-size: var(--t-sm); font-weight: 750; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary { background: var(--rb-gelb); color: var(--rb-schwarz); border-color: var(--rb-gelb); }
.btn--primary:hover { background: var(--rb-schwarz); color: var(--rb-gelb); border-color: var(--rb-schwarz); }
.btn--outline { border-color: var(--rb-blau-tief); color: var(--rb-blau-tief); background: transparent; }
.btn--outline:hover { background: var(--rb-blau-tief); color: var(--rb-weiss); }
.btn--ghost { border-color: var(--rb-weiss); color: var(--rb-weiss); background: transparent; }
.btn--ghost:hover { background: var(--rb-weiss); color: var(--rb-blau-tief); }
.btn--sm { min-height: 44px; padding: .55rem 1.1rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.section--tief .btn--primary:hover, .cta .btn--primary:hover, .hero .btn--primary:hover {
  background: var(--rb-weiss); color: var(--rb-schwarz); border-color: var(--rb-weiss);
}

/* --- Startseiten-Hero --------------------------------------------------- */
.hero {
  background: var(--rb-blau-tief); color: var(--rb-weiss); overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
}
.hero__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-6) var(--s-5); align-items: center;
}
.hero__text { grid-column: 1 / span 6; }
.hero__buehne { grid-column: 7 / span 6; position: relative; aspect-ratio: 1 / 1; }
.hero__titel { font-size: var(--t-hero); line-height: .98; color: var(--rb-weiss); max-width: 13ch; }
.hero__unterzeile { font-size: var(--t-lead); line-height: 1.5; margin-top: var(--s-6); max-width: 40ch; }
.hero__aktionen { margin-top: var(--s-7); }
.hero__kontakt { margin-top: var(--s-6); font-size: var(--t-sm); }
.hero__kontakt a { color: var(--rb-weiss); font-weight: 750; text-decoration-color: var(--rb-gelb); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.hero__logo, .hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__logo { padding: 8%; transition: opacity .6s var(--ease); }
.hero__canvas { opacity: 0; }
.hero__buehne.is-3d .hero__logo { opacity: 0; }
@media (max-width: 900px) {
  .hero__text, .hero__buehne { grid-column: 1 / -1; }
  .hero__buehne { max-width: 26rem; width: 100%; justify-self: center; }
}

/* --- Kopf der Unterseiten ----------------------------------------------- */
.pagehead { background: var(--rb-blau-tief); color: var(--rb-weiss); padding-block: var(--s-8) var(--s-9); }
.pagehead h1 { color: var(--rb-weiss); }
.pagehead__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); align-items: end; }
.pagehead__main { grid-column: 1 / span 7; }
.pagehead__side { grid-column: 9 / span 4; }
.pagehead__side .fact + .fact { border-top: 2px solid rgba(255,255,255,.22); padding-top: .8rem; margin-top: .8rem; }
.pagehead__side dt { font-size: var(--t-xs); font-weight: 750; color: var(--rb-gelb); }
.pagehead__side dd { font-size: var(--t-sm); margin-top: .15rem; }
.pagehead .lede { margin-top: var(--s-5); }
.pagehead .kategorie { font-weight: 750; color: var(--rb-gelb); margin-bottom: var(--s-4); font-size: var(--t-sm); }
@media (max-width: 900px) { .pagehead__main, .pagehead__side { grid-column: 1 / -1; } }

.breadcrumb { margin-bottom: var(--s-6); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.breadcrumb li { font-size: var(--t-xs); display: flex; align-items: center; gap: .5rem; }
.breadcrumb li + li::before { content: '/'; opacity: .7; }
.breadcrumb a { color: var(--rb-weiss); text-underline-offset: 3px; }
.breadcrumb [aria-current="page"] { font-weight: 700; }

/* --- Karten ------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr)); gap: var(--s-4); }
.card {
  display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6) var(--s-5);
  background: var(--rb-weiss); color: var(--rb-schwarz); text-decoration: none;
  border: 2px solid transparent; border-radius: 0 var(--q-m) var(--q-m) var(--q-m);
  transition: border-color .2s var(--ease);
}
.section--weiss .card { background: var(--rb-nebel); }
a.card:hover { border-color: var(--rb-blau); }
.card h3 { font-size: 1.25rem; }
.card p { font-size: var(--t-sm); }
.card__kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.card__num { font-weight: 800; color: var(--rb-blau-tief); font-size: var(--t-sm); }

/* Icon-Kachel in Viertelform */
.icon-kachel {
  width: 3.25rem; height: 3.25rem; flex: none; display: grid; place-items: center;
  background: var(--rb-blau-tief); color: var(--rb-weiss);
  border-radius: var(--q-s) var(--q-m) var(--q-m) 0;
}
.icon-kachel svg { width: 2.1rem; height: 2.1rem; }
.icon-kachel--gross { width: min(100%, 13rem); height: auto; aspect-ratio: 1; border-radius: var(--q-m) var(--q-l) var(--q-l) 0; }
.icon-kachel--gross svg { width: 58%; height: auto; }
@media (max-width: 900px) { .icon-kachel--gross { width: 7rem; } }

/* Leistungsliste der Startseite */
.linklist { list-style: none; border-top: 2px solid var(--rb-nebel); }
.linklist li { border-bottom: 2px solid var(--rb-nebel); }
.linklist a {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-4);
  align-items: baseline; padding: .95rem .5rem; min-height: 44px; text-decoration: none;
  border-radius: 0 var(--q-s) var(--q-s) var(--q-s); transition: background-color .2s var(--ease);
}
.linklist a:hover { background: var(--rb-nebel); }
.linklist__num { font-weight: 800; color: var(--rb-blau-tief); font-size: var(--t-sm); }
.linklist__name { font-weight: 800; font-size: 1.125rem; color: var(--rb-schwarz); }
.linklist__note { font-size: var(--t-sm); color: var(--rb-blau-tief); }
@media (max-width: 768px) {
  .linklist a { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .linklist__note { display: none; }
}

/* --- Aufzaehlungen ------------------------------------------------------ */
.ticks { list-style: none; display: grid; gap: .8rem; }
.ticks li { position: relative; padding-left: 1.75rem; font-size: var(--t-sm); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: .35em; width: .85rem; height: .85rem;
  background: var(--rb-blau); border-radius: .45rem .45rem .45rem 0;
}
.section--tief .ticks li::before { background: var(--rb-gelb); }
.ticks--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); column-gap: var(--s-6); }
.dashlist { list-style: none; display: grid; gap: .5rem; }
.dashlist li { font-size: var(--t-sm); }

.steps { list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 3.25rem 1fr; gap: var(--s-5);
  padding-block: var(--s-5); border-top: 2px solid var(--rb-nebel);
}
.steps li:last-child { border-bottom: 2px solid var(--rb-nebel); }
.section--nebel .steps li, .section--nebel .steps li:last-child { border-color: var(--rb-blau-hell); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 3.25rem; height: 3.25rem;
  background: var(--rb-blau-tief); color: var(--rb-weiss); font-weight: 850; font-size: 1.25rem;
  border-radius: var(--q-s) var(--q-m) var(--q-m) 0;
}
.steps h3 { font-size: var(--t-h4); color: var(--rb-blau-tief); margin-bottom: .3rem; letter-spacing: -0.01em; }
.steps p { font-size: var(--t-sm); max-width: 62ch; }
@media (max-width: 480px) { .steps li { grid-template-columns: 1fr; gap: .75rem; } }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--s-5); }
.figure {
  padding: var(--s-5); background: var(--rb-nebel); border-radius: 0 var(--q-m) var(--q-m) var(--q-m);
}
.figure__value { font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1; color: var(--rb-blau); }
.figure__label { font-size: var(--t-sm); margin-top: .5rem; }

.deflist > div {
  display: grid; grid-template-columns: 13rem 1fr; gap: var(--s-5);
  padding-block: var(--s-4); border-top: 2px solid var(--rb-nebel);
}
.deflist > div:last-child { border-bottom: 2px solid var(--rb-nebel); }
.section--nebel .deflist > div { border-color: var(--rb-blau-hell); }
.section--tief .deflist > div { border-color: rgba(255,255,255,.22); }
.deflist dt { font-weight: 750; font-size: var(--t-sm); }
.deflist dd { font-size: var(--t-sm); }
.section--tief .deflist dt { color: var(--rb-gelb); }
@media (max-width: 768px) { .deflist > div { grid-template-columns: 1fr; gap: .25rem; } }
.cta__side .deflist > div, .span-3 .deflist > div, .span-4 .deflist > div, .deflist--stack > div {
  grid-template-columns: 1fr; gap: .25rem;
}

.quote { padding: var(--s-6); background: var(--rb-nebel); border-radius: 0 var(--q-l) var(--q-l) var(--q-l); }
.quote blockquote { font-size: var(--t-h3); font-weight: 750; line-height: 1.3; letter-spacing: -0.02em; color: var(--rb-blau-tief); }
.quote figcaption { margin-top: var(--s-4); font-size: var(--t-sm); }

/* --- Haeufige Fragen ---------------------------------------------------- */
.faq { border-top: 2px solid var(--rb-nebel); }
.faq details { border-bottom: 2px solid var(--rb-nebel); }
.faq summary {
  list-style: none; cursor: pointer; position: relative; min-height: 44px;
  padding: 1.15rem 3.5rem 1.15rem 0; font-size: 1.125rem; font-weight: 750; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ''; position: absolute; right: .9rem; top: 50%; width: 1rem; height: 3px;
  background: var(--rb-blau); border-radius: 2px; transition: transform .25s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--rb-blau-tief); }
.faq__body { padding: 0 3rem 1.4rem 0; }
.faq__body p { font-size: var(--t-sm); max-width: 64ch; }
.faq__body p + p { margin-top: .75rem; }

/* --- Bilder und Platzhalter: Viertelform ------------------------------- */
figure.media { margin: 0; }
.media__frame { position: relative; overflow: hidden; border-radius: 0 var(--q-l) 0 0; background: var(--rb-nebel); }
.media__frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease, filter .5s ease;
}
/* Zurueckhaltender Hover: das Bild zieht minimal an und wird eine Spur klarer.
   Nur dort, wo es wirklich einen Zeiger gibt — auf dem Handy passiert nichts. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .media__frame:hover img { transform: scale(1.035); filter: saturate(1.06); }
}
/* Markenkante: ein gelber Streifen an der geraden Ecke des Viertels. */
.media__frame::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 4px;
  background: var(--rb-gelb); transform: scaleX(0); transform-origin: left;
  transition: transform .45s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .media__frame:hover::after { transform: scaleX(1); }
}
.media__frame.placeholder::after { content: none; }
.ratio-16-9 { aspect-ratio: 16 / 9; } .ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-3-2 { aspect-ratio: 3 / 2; }  .ratio-3-4 { aspect-ratio: 3 / 4; }
figure.media figcaption { font-size: var(--t-xs); margin-top: .6rem; max-width: 48ch; }
.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  text-align: center; padding: var(--s-5); border: 2px dashed var(--rb-blau);
  background: var(--rb-nebel); color: var(--rb-blau-tief);
}
.section--tief .placeholder { background: rgba(255,255,255,.08); border-color: var(--rb-blau-hell); color: var(--rb-weiss); }
.placeholder__tag { font-weight: 800; font-size: var(--t-sm); font-family: ui-monospace, Consolas, monospace; }
.placeholder__text { font-size: var(--t-xs); max-width: 36ch; }

/* --- Formulare ---------------------------------------------------------- */
.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: .4rem; }
.field > label, .fieldset__legend { font-size: var(--t-sm); font-weight: 750; }
.hint { font-size: var(--t-xs); color: var(--rb-blau-tief); }
/* Fehlermeldung am Feld: erscheint nur nach einem fehlgeschlagenen Absenden */
.fehler { display: block; font-weight: 750; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--rb-blau-tief); border-width: 3px; }
.req { color: var(--rb-blau-tief); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem 1rem; background: var(--rb-weiss); color: var(--rb-schwarz);
  border: 2px solid var(--rb-blau); border-radius: 0 var(--q-s) var(--q-s) var(--q-s);
  font-size: var(--t-base);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--rb-blau-tief); outline-offset: 1px; border-color: var(--rb-blau-tief);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select {
  appearance: none; padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232F5688' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: .75rem;
}
.field--row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--s-5); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice {
  display: flex; gap: .75rem; align-items: flex-start; min-height: 48px; padding: .75rem 1rem; cursor: pointer;
  border: 2px solid var(--rb-blau-hell); border-radius: 0 var(--q-s) var(--q-s) var(--q-s);
  font-size: var(--t-sm); line-height: 1.4; background: var(--rb-weiss);
}
.choice:hover { border-color: var(--rb-blau); }
.choice input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .1rem; accent-color: var(--rb-blau-tief); }
.choice:has(input:checked) { border-color: var(--rb-blau-tief); background: var(--rb-nebel); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .5rem; }
.consent { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--t-xs); line-height: 1.6; }
.consent input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--rb-blau-tief); }
.formstep { padding: var(--s-6) var(--s-5); background: var(--rb-weiss); border-radius: 0 var(--q-m) var(--q-m) var(--q-m); }
.formstep + .formstep { margin-top: 0; }
.formstep__label { display: block; font-size: 1.25rem; font-weight: 800; color: var(--rb-blau); margin-bottom: var(--s-5); letter-spacing: -0.02em; }
.formstep__label span { display: block; font-size: var(--t-sm); font-weight: 700; color: var(--rb-blau-tief); letter-spacing: 0; }

/* --- Handlungsaufforderung ---------------------------------------------- */
.cta { background: var(--rb-blau-tief); color: var(--rb-weiss); }
.cta h2 { color: var(--rb-weiss); max-width: 18ch; }
.cta__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); align-items: center; }
.cta__main { grid-column: 1 / span 7; }
.cta__side { grid-column: 9 / span 4; }
.cta .deflist dd a { color: var(--rb-weiss); }
@media (max-width: 900px) { .cta__main, .cta__side { grid-column: 1 / -1; } }

/* --- Fusszeile ---------------------------------------------------------- */
.site-footer { background: var(--rb-schwarz); color: var(--rb-weiss); padding-block: var(--s-9) var(--s-6); }
.footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
.footer__brand { grid-column: span 4; }
.footer__col { grid-column: span 2; }
.footer__col--wide { grid-column: span 3; }
@media (max-width: 1000px) {
  .footer__brand { grid-column: 1 / -1; }
  .footer__col, .footer__col--wide { grid-column: span 6; }
}
.footer__grid h2 { font-size: var(--t-sm); font-weight: 800; color: var(--rb-gelb); margin-bottom: var(--s-3); letter-spacing: 0; }
.footer__grid ul { list-style: none; }
.footer__grid li a { display: inline-block; padding: .3rem 0; font-size: var(--t-sm); text-decoration: none; }
.footer__grid li a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rb-gelb); }
.footer__brand .brand svg { width: 56px; height: 56px; }
.footer__brand .brand__name { color: var(--rb-weiss); }
.footer__brand p, .footer__brand address { font-size: var(--t-sm); margin-top: var(--s-4); font-style: normal; line-height: 1.7; max-width: 34ch; }
.footer__brand a { color: var(--rb-weiss); }
.footer__bar {
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 2px solid rgba(255,255,255,.2);
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); justify-content: space-between; font-size: var(--t-xs);
}
.footer__bar ul { display: flex; flex-wrap: wrap; gap: var(--s-5); list-style: none; }
.footer__bar a { text-decoration: none; display: inline-block; padding: .3rem 0; }
.footer__bar a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Fliesstextseiten --------------------------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--t-h3); margin-top: var(--s-8); margin-bottom: var(--s-4); }
.prose h3 { font-size: var(--t-h4); margin-top: var(--s-6); margin-bottom: var(--s-3); }
.prose p, .prose ul, .prose ol { font-size: var(--t-sm); }
.prose p + p, .prose ul, .prose ol, .prose address { margin-top: var(--s-4); }
.prose ul, .prose ol { padding-left: 1.2rem; display: grid; gap: .45rem; }
.prose > :first-child { margin-top: 0; }
.prose address { font-style: normal; }
.toc { padding: var(--s-5); background: var(--rb-nebel); border-radius: 0 var(--q-m) var(--q-m) var(--q-m); position: sticky; top: calc(var(--header-h) + 1.5rem); }
.toc h2 { font-size: var(--t-sm); margin: 0 0 var(--s-3); color: var(--rb-blau-tief); letter-spacing: 0; }
.toc ol { list-style: none; display: grid; gap: .15rem; padding: 0; margin: 0; }
.toc a { display: block; padding: .3rem 0; font-size: var(--t-xs); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 900px) { .toc { position: static; } }

/* Markierung fuer fehlende Angaben — schwarz auf gelb, nicht zu uebersehen */
.todo {
  display: inline; background: var(--rb-gelb); color: var(--rb-schwarz);
  padding: .05em .35em; font-weight: 750; font-size: .95em; border-radius: 0 .35em .35em .35em;
}
.notice {
  padding: var(--s-4) var(--s-5); background: var(--rb-nebel); font-size: var(--t-sm);
  border-left: 4px solid var(--rb-blau); border-radius: 0 var(--q-s) var(--q-s) 0;
}
.section--nebel .notice { background: var(--rb-weiss); }

/* --- Bewegung: bewusst sparsam ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Druck -------------------------------------------------------------- */
@media print {
  .site-header, .drawer, .hero__buehne, .cta, .btn, .toc { display: none !important; }
  .section, .pagehead, .hero { background: #fff !important; color: #000 !important; }
  .pagehead h1, .hero__titel { color: #000 !important; }
}

/* --- Ergaenzungen fuer die Vorlagen ------------------------------------- */
.titel-klein { font-size: var(--t-h3); }
.kategorie { font-weight: 750; font-size: var(--t-sm); color: var(--rb-blau-tief); margin-bottom: var(--s-4); }
.viertel-zeichen { width: 3rem; height: 3rem; margin-bottom: var(--s-2); }
.cards--vier { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.section--tief .card { background: var(--rb-weiss); color: var(--rb-schwarz); }
.section--tief .card h3 { color: var(--rb-blau); }
.section--tief .steps li, .section--tief .steps li:last-child { border-color: rgba(255,255,255,.22); }
.section--tief .steps li::before { background: var(--rb-gelb); color: var(--rb-schwarz); }
.section--tief .steps h3 { color: var(--rb-weiss); }
.section--nebel .formstep { background: var(--rb-weiss); }
.section--weiss .formstep { background: var(--rb-nebel); }

/* ==========================================================================
   Responsive
   Drei Stufen: Handy bis 480 px, Tablet bis 768 px, Desktop ab 1024 px.
   Ab 1024 px bleibt das Layout unveraendert; alle Regeln hier greifen nur
   darunter. Dazwischen liegen zwei Feinabstufungen, die schon im Layout
   stecken: ab 1000 px bricht die Fusszeile um, ab 900 px werden die
   zwoelfspaltigen Raster einspaltig.

   Schriftgroessen skalieren ueber clamp() mit der Fensterbreite; die
   Schriftart bleibt auf allen Geraeten Figtree. Eingabefelder sind 17 px
   gross, damit iPhones beim Antippen nicht hineinzoomen.
   ========================================================================== */

/* --- Tablet und kleiner -------------------------------------------------- */
@media (max-width: 768px) {
  /* Tippflaechen vergroessern: Kaestchen und Links in Faktenlisten */
  .choice input, .consent input { width: 1.5rem; height: 1.5rem; }
  .pagehead__side dd a, .cta .deflist dd a, .footer__brand address a {
    display: inline-block; padding-block: .3rem;
  }
  /* Formularbloecke ruecken naeher an den Rand, damit die Felder breiter werden */
  .formstep { padding-inline: var(--s-4); }
  /* Bildunterschriften und Platzhaltertexte duerfen die volle Breite nutzen */
  figure.media figcaption, .placeholder__text { max-width: none; }
}

/* --- Handy ---------------------------------------------------------------- */
@media (max-width: 480px) {
  /* Knoepfe ueber die volle Breite: leichter zu treffen, ruhigeres Bild */
  .hero__aktionen .btn, .pagehead .btn-row .btn, .cta .btn-row .btn,
  .drawer__foot .btn, .form > .btn { width: 100%; }
  /* Lange deutsche Woerter in grossen Ueberschriften umbrechen lassen */
  h1, .hero__titel { letter-spacing: -0.02em; hyphens: auto; }
  /* Die Viertelkreis-Kante flacher, sonst frisst sie die halbe Bildbreite */
  .section--kante { border-top-right-radius: var(--q-m); }
  .cards { gap: var(--s-3); }
  /* Aufzaehlungen in zwei Spalten haben auf dem Handy keinen Platz */
  .ticks--two { grid-template-columns: 1fr; }
}
