/* =========================================================
   Hochwasser – Eigenvorsorge · Startseite
   Koordinatensystem: 3840 × 2160 (wie die PSD-Artboards).
   Die .stage wird per JS auf den Viewport skaliert, alle
   Positionen darin sind 1:1 die PSD-Pixelwerte.
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "BaWueSans";
  src: url("../fonts/BaWueSansWeb-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "BaWueSans";
  src: url("../fonts/BaWueSansWeb-RegularItalic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "BaWueSans";
  src: url("../fonts/BaWueSansWeb-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "BaWueSans";
  src: url("../fonts/BaWueSansWeb-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "BaWueSans";
  src: url("../fonts/BaWueSansWeb-BoldItalic.woff2") format("woff2");
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "BaWueSerif";
  src: url("../fonts/BaWueSerifWeb-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "BaWueSerif";
  src: url("../fonts/BaWueSerifWeb-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --teal:        #4f9da4;   /* Hintergrund oben  */
  --teal-deep:   #4a9aa3;
  --green:       #6fac84;   /* Hintergrund unten */
  --yellow:      #fffc01;
  --ink:         #1d1d1b;
  --white:       #ffffff;

  --ease:  cubic-bezier(.45, 0, .2, 1);
  --dur:   .8s;

  /* Transform-Parameter je Familie / Haus (werden per data-active überschrieben) */
  --f1-x: 0px; --f1-s: 1;  --f2-x: 0px; --f2-s: 1;
  --f3-x: 0px; --f3-s: 1;  --f4-x: 0px; --f4-s: 1;
  --h1-x: 0px; --h1-y: 0px; --h1-s: 1;  --h2-x: 0px; --h2-y: 0px; --h2-s: 1;
  --h3-x: 0px; --h3-y: 0px; --h3-s: 1;  --h4-x: 0px; --h4-y: 0px; --h4-s: 1;
  --fam-dim: 1;  /* Deckkraft der inaktiven Familien */
  --haus-dim: .2; /* Deckkraft der inaktiven Häuser (PSD: 20 %) */
}

/* ---------- Grundgerüst ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal-deep) 38%, var(--green) 100%);
  font-family: "BaWueSans", "Helvetica Neue", Arial, sans-serif;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

.viewport {
  position: fixed; inset: 0;
  overflow: clip;            /* clip statt hidden: verhindert programmatisches Scrollen (Fokus) */
}

.stage {
  position: absolute;
  left: 0; top: 0;
  width: 3840px; height: 2160px;      /* wird per JS auf das Viewport-Verhältnis gesetzt */
  transform-origin: 0 0;
  transform: scale(var(--scale, .5));
  overflow: clip;
}
/* Feste 3840×2160-Layoutbox: horizontal zentriert, am unteren Rand verankert */
.layout {
  position: absolute;
  left: 50%; bottom: 0;
  width: 3840px; height: 2160px;
  margin-left: -1920px;
}

/* ---------- Hintergrund-Bahnen ---------- */
.stripes { position: absolute; inset: 0; pointer-events: none; }

.stripe {
  position: absolute;
  top: -200px; bottom: -200px;
  width: 1160px;
  transform-origin: 50% 100%;
  transform: skewX(-7deg) scaleX(var(--w, 1));
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0)      0%,
    rgba(255, 255, 255, .04)   35%,
    rgba(200, 240, 180, .18)   75%,
    rgba(200, 240, 180, .26)  100%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.stripe-1 { left: -180px; }
.stripe-2 { left:  780px; }
.stripe-3 { left: 1740px; }
.stripe-4 { left: 2700px; }

/* ---------- Menü-Button ---------- */
.menu {
  position: absolute; left: 96px; top: 96px; z-index: 30;
  width: 64px; height: 45px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.menu svg { display: block; width: 100%; height: 100%; fill: var(--white); overflow: visible; }
.menu .bar { transition: width .3s var(--ease), x .3s var(--ease); }
.menu:hover .bar--short,
.menu:focus-visible .bar--short { width: 854px; }
.menu:focus-visible { outline: 4px solid var(--yellow); outline-offset: 16px; }

/* ---------- Menü-Overlay ---------- */
.nav {
  position: absolute; inset: 0; z-index: 40;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear .6s;
}
.nav.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.nav-dim {
  position: absolute; inset: 0;
  background: rgba(64, 150, 158, .82);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.nav.is-open .nav-dim { opacity: 1; }

.nav-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: 2200px;
  transform: translateX(-102%);
  transition: transform .6s var(--ease);
}
.nav.is-open .nav-panel { transform: none; transition-delay: .05s; }
.nav-wave { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--yellow); }

.nav-inner { position: absolute; inset: 0; color: var(--ink); }

.nav-close {
  position: absolute; left: 76px; top: 76px;
  width: 64px; height: 64px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.nav-close svg { display: block; width: 100%; height: 100%; fill: var(--ink); transition: transform .3s var(--ease); }
.nav-close:hover svg, .nav-close:focus-visible svg { transform: rotate(90deg); }

.nav-title {
  margin: 0 0 30px; padding-left: 298px;
  font-family: "BaWueSans", sans-serif; font-weight: 700;
  font-size: 84px; line-height: 1; letter-spacing: .01em;
  text-transform: uppercase;
}
.nav-title:first-of-type { padding-top: 270px; }
.nav-list { list-style: none; margin: 0 0 90px; padding: 0 0 0 298px; }
.nav-list li { margin: 0; }
.nav-list a {
  position: relative; display: inline-block;
  padding: 26px 0 26px 96px;
  font-size: 56px; line-height: 1.3; font-style: italic; font-weight: 400;
  color: #2f5f6c; text-decoration: none;
  transition: color .25s var(--ease), font-weight .1s;
}
.nav-list a::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 52px; height: 42px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='128 196 786 632'%3E%3Cpath d='M597 196 914 512 597 828 537 768 750 555H128V469H750L537 256L597 196Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='128 196 786 632'%3E%3Cpath d='M597 196 914 512 597 828 537 768 750 555H128V469H750L537 256L597 196Z'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: translateY(-50%);
  transition: transform .3s var(--ease);
}
.nav-list a:hover, .nav-list a:focus-visible, .nav-list a.is-current {
  color: var(--ink); font-weight: 700; outline: none;
}
.nav-list a:hover::before, .nav-list a:focus-visible::before { transform: translateY(-50%) translateX(12px); }

.nav-footer {
  position: absolute; left: 0; bottom: 110px; width: 1940px;
  display: flex; justify-content: center; gap: 42px;
  font-size: 30px; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
}
.nav-footer a { color: var(--ink); text-decoration: none; }
.nav-footer a:hover { text-decoration: underline; text-underline-offset: 8px; }

/* ---------- Headline ---------- */
.intro {
  position: absolute; left: 50%; top: 232px; z-index: 20;
  width: 2100px; transform: translateX(-50%);
  text-align: center;
}
.intro h1 {
  margin: 0 0 40px;
  font-family: "BaWueSerif", Georgia, serif;
  font-weight: 700;
  font-size: 100px; line-height: 1.05;
  letter-spacing: -.005em;
}
.intro p {
  margin: 0 auto; max-width: 1720px;
  font-size: 36px; line-height: 1.4;
  font-weight: 400;
  hyphens: auto; -webkit-hyphens: auto;
}

/* ---------- Häuser ---------- */
.houses { position: absolute; inset: 0; pointer-events: none; }
.haus {
  position: absolute; display: block;
  transform-origin: 50% 50%;
  opacity: var(--haus-dim);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  /* Erdblock nach unten weich auslaufen lassen (die Renders enden mit harter Kante) */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
}
.haus-1 { left: -100px; top: 560px; width: 1150px; transform: translate(var(--h1-x), var(--h1-y)) scale(var(--h1-s)); }
.haus-2 { left:  950px; top: 520px; width: 1350px; transform: translate(var(--h2-x), var(--h2-y)) scale(var(--h2-s)); }
.haus-3 { left: 1780px; top: 600px; width: 1420px; transform: translate(var(--h3-x), var(--h3-y)) scale(var(--h3-s)); }
.haus-4 { left: 2800px; top: 520px; width: 1200px; transform: translate(var(--h4-x), var(--h4-y)) scale(var(--h4-s)); }

/* ---------- Familien ---------- */
.families { position: absolute; inset: 0; }
.fam {
  position: absolute; display: block;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 50% 100%;
  opacity: var(--fam-dim);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), filter .3s;
  -webkit-tap-highlight-color: transparent;
}
.fam img { display: block; width: 100%; height: auto; pointer-events: none; }
.fam:focus-visible { outline: 6px solid var(--yellow); outline-offset: 12px; border-radius: 40px; }

.fam-1 { left:   10px; top: 1095px; width:  937px; transform: translateX(var(--f1-x)) scale(var(--f1-s)); }
.fam-2 { left:  983px; top: 1115px; width: 1010px; transform: translateX(var(--f2-x)) scale(var(--f2-s)); }
.fam-3 { left: 1979px; top: 1115px; width:  884px; transform: translateX(var(--f3-x)) scale(var(--f3-s)); }
.fam-4 { left: 2898px; top: 1125px; width:  918px; transform: translateX(var(--f4-x)) scale(var(--f4-s)); }

/* Hover in der Übersicht: sanftes Anheben */
.stage[data-active="0"] .fam:hover { filter: brightness(1.06); }

/* Aktive Familie immer vorne, volle Deckkraft */
.fam.is-active { opacity: 1; z-index: 5; }
.haus.is-active { opacity: 1; z-index: 2; }

/* ---------- Textbox ---------- */
.card {
  position: absolute; top: 1036px; width: 617px; z-index: 10;
  background: var(--white); color: var(--ink);
  border-radius: 28px 28px 28px 0;   /* unten links eckig */
  box-shadow: 0 30px 60px rgba(0, 0, 0, .18);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(40px);
  transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s linear .5s;
}
.card.is-visible {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: none;
  transition: opacity .5s var(--ease) .35s, transform .6s var(--ease) .35s, visibility 0s;
}
.card-1 { left:  834px; }
.card-2 { left: 1601px; }
.card-3 { left: 1480px; }
.card-4 { left: 2389px; }
/* Boxen links neben der Familie: Ecke unten rechts eckig, unten links rund */
.card-3, .card-4 { border-radius: 28px 28px 0 28px; }

.card-head {
  position: relative;
  background: var(--yellow);
  border-radius: 28px 28px 0 0;
  padding: 52px 50px 30px;
  min-height: 200px;
}
.card-head h2 {
  margin: 0;
  font-family: "BaWueSerif", Georgia, serif;
  font-weight: 700;
  font-size: 48px; line-height: 1.12;   /* war 58px – längere Überschriften */
  color: var(--ink);
}
/* gelbe Welle als Abschluss des Kopfbereichs */
.card-wave {
  position: absolute; left: 0; right: 0; top: 100%;
  display: block; width: 100%; height: 60px;
  fill: var(--yellow);
}
.card-body { padding: 74px 50px 46px; }
.card-body p {
  margin: 0 0 44px;
  font-size: 28px; line-height: 1.42;
  hyphens: auto; -webkit-hyphens: auto;
}
.cta {
  display: flex; align-items: center; justify-content: flex-end; gap: 22px;
  font-weight: 700; font-size: 23px; line-height: 1;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.cta .arrow {
  width: 40px; height: 32px; flex: none;
  fill: var(--ink);
  transition: transform .3s var(--ease);
}
.cta .label { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 3px; }
.cta:hover .arrow { transform: translateX(10px); }

/* =========================================================
   Zustände – Werte aus den PSD-Artboards „Start Detail"
   (Familie Sommer aktiv) und „Start Detail Kopie" (Berger aktiv),
   Zustände 3 und 4 gespiegelt abgeleitet.
   ========================================================= */

/* Sobald eine Familie aktiv ist: die anderen halbtransparent */
.stage:not([data-active="0"]) { --fam-dim: .5; }

/* --- 1 · Ehepaar Berger --- */
.stage[data-active="1"] {
  --f1-x:   58px; --f1-s: 1.03;
  --f2-x:  556px; --f2-s: .857;
  --f3-x:  402px; --f3-s: .905;
  --f4-x:  154px; --f4-s: .853;
  --h1-x:  200px; --h1-y:  90px; --h1-s: 1.25;
  --h2-x:  581px; --h2-y: 289px; --h2-s: .82;
  --h3-x:  299px; --h3-y: 219px; --h3-s: .82;
  --h4-x:   89px; --h4-y: 237px; --h4-s: .78;
}
.stage[data-active="1"] .stripe-1 { --w: 1.6; }

/* --- 2 · Familie Sommer --- */
.stage[data-active="2"] {
  --f1-x: -107px; --f1-s: .913;
  --f2-x:  -80px; --f2-s: 1;
  --f3-x:  412px; --f3-s: .905;
  --f4-x:  154px; --f4-s: .853;
  --h1-x:  -59px; --h1-y:  56px; --h1-s: .87;
  --h2-x:    0px; --h2-y:   0px; --h2-s: 1;
  --h3-x:  299px; --h3-y: 219px; --h3-s: .82;
  --h4-x:   89px; --h4-y: 237px; --h4-s: .78;
}
.stage[data-active="2"] .stripe-2 { --w: 1.5; }

/* --- 3 · Max und Ama --- */
.stage[data-active="3"] {
  --f1-x: -154px; --f1-s: .853;
  --f2-x: -412px; --f2-s: .905;
  --f3-x:   80px; --f3-s: 1;
  --f4-x:  260px; --f4-s: .913;
  --h1-x:  -89px; --h1-y: 237px; --h1-s: .78;
  --h2-x: -299px; --h2-y: 219px; --h2-s: .82;
  --h3-x:    0px; --h3-y:   0px; --h3-s: 1;
  --h4-x:   59px; --h4-y:  56px; --h4-s: .87;
}
.stage[data-active="3"] .stripe-3 { --w: 1.5; }

/* --- 4 · Familie Yilmaz --- */
.stage[data-active="4"] {
  --f1-x: -154px; --f1-s: .853;
  --f2-x: -402px; --f2-s: .905;
  --f3-x: -556px; --f3-s: .857;
  --f4-x:  -58px; --f4-s: 1.03;
  --h1-x:  -89px; --h1-y: 237px; --h1-s: .78;
  --h2-x: -299px; --h2-y: 219px; --h2-s: .82;
  --h3-x: -581px; --h3-y: 289px; --h3-s: .82;
  --h4-x: -220px; --h4-y: 110px; --h4-s: 1.2;
}
.stage[data-active="4"] .stripe-4 { --w: 1.6; }

/* =========================================================
   Mobile / Hochformat: eigene Darstellung
   Statt der skalierten Bühne eine scrollbare Seite:
   Headline, dann je Familie ein Block aus Haus + Familie
   und darunter die Textbox (immer sichtbar).
   ========================================================= */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait), (max-width: 1200px) and (pointer: coarse) {
  html, body { height: auto; overflow: auto; overflow-x: hidden; }
  body { background-attachment: fixed; }

  .viewport { position: static; overflow: visible; }
  .layout { display: contents; }
  .stage {
    position: static; width: auto !important; height: auto !important;
    transform: none !important; overflow: visible;
    display: grid; grid-template-columns: 100%;
    row-gap: 0; padding: 0 0 48px;
    max-width: 640px; margin: 0 auto;   /* Tablet-Hochformat: schmale Spalte */
  }
  .stripes { display: none; }

  /* Menü-Button */
  .menu { position: fixed; left: 20px; top: 20px; width: 30px; height: 21px; z-index: 30; }
  .menu:hover .bar--short, .menu:focus-visible .bar--short { width: 854px; }
  .menu:focus-visible { outline-offset: 8px; outline-width: 2px; }

  /* Kopf */
  .intro {
    position: static; grid-row: 1; width: auto; transform: none;
    padding: 84px 22px 28px; text-align: left;
  }
  .intro h1 { font-size: clamp(30px, 8vw, 40px); margin-bottom: 14px; }
  .intro p  { font-size: 16px; line-height: 1.5; max-width: none; }

  /* Häuser und Familien werden Grid-Kinder der Bühne */
  .houses, .families { display: contents; }
  .haus, .fam {
    position: static; grid-column: 1;
    transform: none !important; opacity: 1 !important;
    transition: none;
  }
  /* Kachel Haus + Familie: feste Höhe, Familien einheitlich unten beschnitten */
  .stage { --tile: min(64vw, 410px); }
  .haus { height: auto; max-width: none; justify-self: end; align-self: end; margin-right: -22%; z-index: 1; }
  /* Breite je Render so gewählt, dass die Gebäude selbst gleich groß wirken */
  .haus-1, .haus-2 { width: 92%; }
  .haus-3 { width: 104%; }
  .haus-4 { width: 80%; margin-right: -2%; margin-bottom: 6%; }   /* Holzhaus liegt links im Render → etwas höher, damit es nicht hinter der Familie verschwindet */
  .fam  {
    height: var(--tile); width: auto; overflow: hidden;
    align-self: end; justify-self: start; margin-left: 4%;
    z-index: 2; pointer-events: none; cursor: default;
  }
  .fam img { height: 100%; width: auto; display: block; }
  .fam { margin-left: 3%; }

  .haus-1, .fam-1 { grid-row: 2; }  .card-1 { grid-row: 3; }
  .haus-2, .fam-2 { grid-row: 4; }  .card-2 { grid-row: 5; }
  .haus-3, .fam-3 { grid-row: 6; }  .card-3 { grid-row: 7; }
  .haus-4, .fam-4 { grid-row: 8; }  .card-4 { grid-row: 9; }
  .haus-2, .fam-2, .haus-3, .fam-3, .haus-4, .fam-4 { margin-top: 40px; }

  /* Textboxen: immer sichtbar, im Fluss */
  .card, .card.is-visible {
    position: static; grid-column: 1; width: auto;
    margin: -10px 20px 0; opacity: 1; visibility: visible; pointer-events: auto;
    transform: none; transition: none; z-index: 3;
    border-radius: 16px 16px 16px 0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .15);
  }
  .card-head { padding: 24px 22px 14px; min-height: 0; border-radius: 16px 16px 0 0; }
  .card-head h2 { font-size: 26px; }
  .card-wave { height: 32px; }
  .card-body { padding: 40px 22px 24px; }
  .card-body p { font-size: 16px; line-height: 1.5; margin-bottom: 22px; }
  .cta { font-size: 16px; gap: 12px; }   /* gleiche Größe wie der Fließtext (wie im Scrollytelling) */
  .cta .arrow { width: 22px; height: 18px; }
  .cta .label { text-underline-offset: 4px; text-decoration-thickness: 2px; }

  /* Menü-Overlay: Vollbild, scrollbar */
  .nav { position: fixed; inset: 0; z-index: 40; }
  .nav-panel { width: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .nav-wave { display: none; }
  .nav-panel { background: var(--yellow); }
  .nav-inner { position: relative; inset: auto; min-height: 100%; padding: 90px 24px 40px; }
  .nav-close { left: 16px; top: 16px; width: 30px; height: 30px; }
  .nav-title { padding-left: 0; font-size: 26px; margin-bottom: 10px; }
  .nav-title:first-of-type { padding-top: 0; }
  .nav-list { padding-left: 0; margin-bottom: 34px; }
  .nav-list a { padding: 10px 0 10px 36px; font-size: 18px; line-height: 1.35; }
  .nav-list a::before { width: 22px; height: 18px; }
  .nav-footer { position: static; width: auto; margin-top: 20px; font-size: 12px; gap: 16px; justify-content: flex-start; }
}

/* =========================================================
   Intro-Animation beim Laden: Headline, dann Familie für Familie
   (Keyframes ohne Endwerte → nach dem Lauf gilt wieder das normale Styling)
   ========================================================= */
@keyframes intro-fade { from { opacity: 0; translate: 0 40px; } }
.stage:not(.no-intro) .intro,
.stage:not(.no-intro) .haus,
.stage:not(.no-intro) .fam {
  animation: intro-fade .9s var(--ease) backwards;
}
.stage:not(.no-intro) .intro  { animation-delay: .1s; }
.stage:not(.no-intro) .haus-1, .stage:not(.no-intro) .fam-1 { animation-delay: .5s; }
.stage:not(.no-intro) .haus-2, .stage:not(.no-intro) .fam-2 { animation-delay: .8s; }
.stage:not(.no-intro) .haus-3, .stage:not(.no-intro) .fam-3 { animation-delay: 1.1s; }
.stage:not(.no-intro) .haus-4, .stage:not(.no-intro) .fam-4 { animation-delay: 1.4s; }
.stage:not(.no-intro) .haus { animation-duration: 1.2s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .stripe, .haus, .fam, .card, .nav, .nav-dim, .nav-panel { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* verlinkte Menü-Überschriften */
.nav-title a { color: inherit; text-decoration: none; }
.nav-title a:hover, .nav-title a:focus-visible { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; outline: none; }

/* Menü-Button überall gleich groß und gleich positioniert (wie in Geschichten und Wissenspool).
   Die Bühne ist skaliert (--scale) – daher die Werte durch den Faktor teilen. */
.menu { left: calc(clamp(16px, 3vw, 48px) / var(--scale, .5)); top: calc(42px / var(--scale, .5)); width: calc(32px / var(--scale, .5)); height: calc(23px / var(--scale, .5)); }
.menu:focus-visible { outline-width: calc(2px / var(--scale, .5)); outline-offset: calc(8px / var(--scale, .5)); }
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait), (max-width: 1200px) and (pointer: coarse) {
  .menu { left: 16px; top: 36px; width: 28px; height: 20px; }
  .menu:focus-visible { outline-width: 2px; outline-offset: 8px; }
}

/* Menü-Overlay wie in Geschichten und Wissenspool (Werte durch den Bühnen-Faktor geteilt) */
.nav-close { left: calc(38px / var(--scale, .5)); top: calc(38px / var(--scale, .5)); width: calc(32px / var(--scale, .5)); height: calc(32px / var(--scale, .5)); }
.nav-title a:hover, .nav-title a:focus-visible { text-underline-offset: .18em; text-decoration-thickness: max(calc(1px / var(--scale, .5)), .07em); }
.nav-list a:hover::before, .nav-list a:focus-visible::before { transform: translateY(-50%) translateX(calc(6px / var(--scale, .5))); }
.nav-footer a:hover, .nav-footer a:focus-visible { text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: max(calc(1px / var(--scale, .5)), .07em); }
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait), (max-width: 1200px) and (pointer: coarse) {
  .nav-close { left: 16px; top: 16px; width: 32px; height: 32px; }
  .nav-title a:hover, .nav-title a:focus-visible { text-underline-offset: .18em; text-decoration-thickness: max(1px, .07em); }
  .nav-list a:hover::before, .nav-list a:focus-visible::before { transform: translateY(-50%) translateX(6px); }
  .nav-footer a:hover, .nav-footer a:focus-visible { text-underline-offset: .3em; text-decoration-thickness: max(1px, .07em); }
}

/* Kein Fokus-Rahmen nach Mausklick – nur bei Tastatur-Bedienung (:focus-visible) */
:focus:not(:focus-visible) { outline: none !important; }

/* Text-Links wie im Wissenspool: dünn unterstrichen, beim Mouse-over kräftiger (Bühne ist skaliert → durch --scale teilen) */
.cta .label { text-decoration-thickness: calc(1px / var(--scale, .5)); transition: text-decoration-thickness .2s var(--ease); }
.cta:hover .label, .cta:focus-visible .label { text-decoration-thickness: max(calc(2px / var(--scale, .5)), .12em); }
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait), (max-width: 1200px) and (pointer: coarse) {
  .cta .label { text-decoration-thickness: 1px; }
  .cta:hover .label, .cta:focus-visible .label { text-decoration-thickness: max(2px, .12em); }
}
