/* Mandaxa „Alles im Fluss“ – Rahmen für ALLE Seiten (Kopf, Navigation, Fuß, Schriften, Knöpfe).
   Bewusst ohne globale Element-Rücksetzungen: Die übrigen Seiten (Wissen, Demo, Recht, Funktions-Unterseiten)
   behalten ihr bisheriges Layout aus site.css und bekommen nur Rahmen und Schrift der neuen Gestaltung.
   Die Seiten mit Layout „fluss“ laden zusätzlich basis.css (Typografie, Bausteine) und start.css bzw. unter.css. */

@font-face { font-family: 'Familjen Grotesk'; src: url(/fonts/familjen-grotesk-latin-wght-normal.woff2) format('woff2-variations'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url(/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2) format('woff2-variations'); font-weight: 200 800; font-display: swap; }

:root {
  --navy: #0d1f3c;
  --navy-2: #16294a;
  --blau: #0c447c;
  --blau-weich: #4f7fb8;
  --petrol: #2f7f9a;
  --petrol-hell: #dcedf2;
  --grund: #f4f6f9;
  --hell: #e9eef5;
  --linie: #dbe2eb;
  --text: #24324a;
  --text-2: #4a5870;
  --text-3: #5d6a7e;
  --orange: #f28c28;
  --orange-hover: #ff9a35;
  --orange-weich: #fff1e3;
  --orange-text: #8a4307;
  --gruen: #1d6b47;
  --gruen-weich: #e3f3ea;
  --weiss: #fff;
  --kopf: 'Familjen Grotesk', system-ui, sans-serif;
  --lauf: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --rand: clamp(18px, 4vw, 56px);
  --breite: 1320px;
  --kopf-h: 78px;
  --schatten: 0 1px 0 rgba(13,31,60,.06), 0 0 0 1px var(--linie), 0 10px 22px -14px rgba(13,31,60,.35);
  --schatten-gross: 0 40px 80px -40px rgba(13,31,60,.45), 0 0 0 1px var(--linie);
  --aus: cubic-bezier(.22, .8, .24, 1);
}
html { scroll-padding-top: calc(var(--kopf-h) + 12px); }
body { font-family: var(--lauf); }
h1, h2, h3, h4 { font-family: var(--kopf); }
.kopf *, .kopf *::before, .kopf *::after, .fuss *, .fuss *::before, .fuss *::after { box-sizing: border-box; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.sprung { position: absolute; left: 12px; top: -80px; z-index: 80; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; font: 600 1rem/1.2 var(--lauf); }
.sprung:focus { top: 12px; }
.huelle { max-width: var(--breite); margin-inline: auto; padding-inline: var(--rand); }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 10px; font: 600 1rem/1.1 var(--kopf); text-decoration: none; white-space: nowrap; border: 1.5px solid transparent; cursor: pointer; transition: background-color .15s ease-out, border-color .15s ease-out, transform .15s ease-out, color .15s ease-out; }
.knopf:active { transform: scale(.97); }
.knopf--orange { background: var(--orange); color: var(--navy); }
.knopf--orange:hover { background: var(--orange-hover); }
.knopf--rand { border-color: #c5cfdc; color: var(--navy); background: #fff; }
.knopf--rand:hover { border-color: var(--navy); }
.knopf--hell { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.knopf--hell:hover { border-color: #fff; }
.knopf--klein { min-height: 44px; padding: 8px 14px; font-size: .92rem; border-radius: 9px; }
.knopf[disabled] { opacity: .55; cursor: default; transform: none; }
.pfeil::after { content: "→"; font-family: var(--lauf); transition: transform .2s var(--aus); }
.pfeil:hover::after { transform: translateX(3px); }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linie); view-transition-name: kopf; font-family: var(--lauf); }
.kopf-zeile { min-height: 78px; display: flex; align-items: center; gap: 24px; padding-inline: var(--rand); max-width: var(--breite); margin: 0 auto; }
.logo { display: flex; align-items: center; min-height: 44px; flex: none; }
.logo img { display: block; height: 40px; width: auto; }
.menue { display: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav ul a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .98rem; transition: background-color .15s ease-out, color .15s ease-out; }
.nav ul a:hover { background: var(--grund); color: var(--navy); }
.nav ul a[aria-current="page"] { color: var(--navy); }
.nav ul a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--orange); }
.nav-login { color: var(--text); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.nav-login:hover { color: var(--navy); text-decoration: underline; }

/* Fuß */
.fuss { background: var(--navy); color: #c4cfde; margin-top: 0; font: 400 1rem/1.6 var(--lauf); }
.fuss .huelle { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 28px; padding-block: 48px 28px; }
.fuss-marke { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
/* Lange Linklisten (Produkt) zweispaltig, damit die Fußzeile nicht in die Länge wächst */
.fuss nav:has(li:nth-child(9)) { grid-column: span 2; }
.fuss nav:has(li:nth-child(9)) ul { display: block; columns: 2; column-gap: 32px; }
.fuss h2 { margin: 0 0 10px; font: 700 .82rem/1 var(--kopf); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.fuss a { color: #e6ecf5; text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.fuss a:hover { text-decoration: underline; }
.fuss a[aria-current="page"] { color: #fff; font-weight: 700; }
.fuss-marke img { display: block; height: 26px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.fuss-marke p { margin: 0; font-size: .95rem; max-width: 40rem; }
.fuss-unten { border-top: 1px solid rgba(255,255,255,.12); }
.fuss-unten .huelle { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 26px; font-size: .88rem; }
.fuss-unten p { margin: 0; max-width: 60rem; }

/* Seitenübergang (Chrome: View Transitions über Seiten hinweg) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms ease-out both vt-aus; }
::view-transition-new(root) { animation: 320ms var(--aus) both vt-ein; }
@keyframes vt-aus { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-ein { from { opacity: 0; transform: translateY(14px); } }

/* Tablet/Smartphone: Menüknopf nur mit JavaScript. Ohne JavaScript bleibt die Navigation als umbrechende Zeile sichtbar. */
@media (max-width: 1180px) {
  html:not(.js) .kopf-zeile { flex-wrap: wrap; padding-block: 10px; }
  html:not(.js) .nav { margin-left: 0; flex-wrap: wrap; gap: 4px 12px; }
  html:not(.js) .nav ul { flex-wrap: wrap; }
  :root { --kopf-h: 70px; }
  .kopf-zeile { min-height: 70px; }
  .js .menue { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--linie); background: #fff; color: var(--navy); font: 600 .95rem/1 var(--kopf); cursor: pointer; }
  .menue-icon { width: 16px; height: 10px; position: relative; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .menue-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 2px; background: currentColor; }
  .js .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 8px; background: #fff; padding: 12px var(--rand) 18px; border-bottom: 1px solid var(--linie); box-shadow: 0 16px 24px -20px rgba(13,31,60,.4); }
  .js .nav.ist-offen { display: flex; }
  .js .nav ul { flex-direction: column; }
  .js .nav ul a { min-height: 48px; font-size: 1.05rem; }
  .js .nav ul a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
  .js .nav-login { min-height: 48px; padding: 0 12px; }
}
@media (max-width: 1023px) {
  .fuss .huelle { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 640px) {
  .kopf-zeile { gap: 10px; }
  .logo img { height: 34px; }
  .fuss .huelle { gap: 20px 16px; }
  .fuss nav:has(li:nth-child(9)) ul { columns: 1; }
  .fuss a { min-height: 40px; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .knopf, .pfeil::after, .nav ul a { transition: none !important; }
  @view-transition { navigation: none; }
}
/* Tippflächen ≥ 24 px (WCAG 2.5.8) für Altseiten im neuen Rahmen: die Rahmenschrift hat eine kleinere Zeilenhöhe
   als die bisherige, dadurch fielen Brotkrumen-Links (18 px) und Kontaktlinks in Listen (21 px) unter 24 px. */
.wx-breadcrumbs a { display: inline-block; padding-block: 3px; }
.wx-prose li > a[href^="tel:"], .wx-prose li > a[href^="mailto:"] { display: inline-block; padding-block: 2px; }
