/* kopf.css — ANIS GmbH · WEB-CREW Schritt 4 (@hero-engineer), 02.11.2026
   Kopfleiste „hängende Visitenkarte“ + Start-Kopf (Video) + Kontaktleiste + Bühnen-Kopf (Unterseiten).
   Farben/Schrift NUR aus tokens.css. Regeln: GESETZ Kap. 1/5/11, bau-brief §5/§6/§9.
   Schritt 6 baut darunter (site.css); diese Datei bitte nur für den Kopf erweitern. */

:root {
  --leiste-h: 4rem; /* Kontaktleiste, bündig unter dem Video (0 px Lücke, Kap. 5) */
  --kopfleiste-h: 4.5rem; /* gescrollte Kopfleiste (bau-brief §9) */
  --rand-kopf: clamp(1.25rem, 4.4vw, 4rem);
  --richtfest: cubic-bezier(
    0.2,
    0.8,
    0.25,
    1
  ); /* Easing „Richtfest“ (bau-brief §6) */
  --schatten-kontakt:
    0 10px 24px rgba(25, 23, 20, 0.22), 0 2px 4px rgba(25, 23, 20, 0.12);
  --karte-creme: #fbf8f4; /* Visitenkarte = Logo-Grund, themenfest (Logo wird nie umgefärbt) */
  --schiefer-rgb: 26 18 10; /* = --dunkel-fest dunkel, für Verläufe über dem Video */
}

/* ---------- Basis (darf Schritt 6 nach site.css verschieben) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.62;
  overflow-x: clip;
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  font-size: 0;
}
.springen {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--leit);
  color: var(--auf-leit);
  font-weight: 600;
  text-decoration: none;
}
.springen:focus {
  top: 1rem;
}

/* ---------- Kopfleiste ---------- */
.kopfleiste {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 6.5rem;
  color: var(--kalk-fest);
  transition:
    background-color 240ms var(--richtfest),
    height 240ms var(--richtfest),
    color 240ms var(--richtfest);
}
/* Verlauf nur an der Oberkante (10 rem, Schiefer → 0), nie flächig */
.kopfleiste::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 10rem;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgb(var(--schiefer-rgb) / 0.72) 0%,
    rgb(var(--schiefer-rgb) / 0.4) 55%,
    rgb(var(--schiefer-rgb) / 0) 100%
  );
  transition: opacity 240ms var(--richtfest);
}
.kopfleiste::after {
  /* 4-px-Dachbraun-Kante, nur gescrollt (aus Duell B) */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--leit);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 240ms var(--richtfest);
}
.kopfleiste__innen {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 var(--rand-kopf);
}

/* Die hängende Visitenkarte */
.karte {
  position: absolute;
  left: var(--rand-kopf);
  top: 0;
  z-index: 2;
  display: block;
  width: 8.75rem;
  padding: 1.05rem 0.95rem 1rem;
  background: var(--karte-creme);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--schatten-kontakt);
  text-decoration: none;
  transform-origin: 0 0;
  transition:
    width 240ms var(--richtfest),
    padding 240ms var(--richtfest),
    box-shadow 240ms var(--richtfest),
    background-color 240ms;
}
.karte__hoch {
  width: 100%;
  height: auto;
}
.karte__quer {
  display: none;
  height: 60px;
  width: auto;
  color: #141412;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 1.9vw, 2.1rem);
  height: 5.25rem;
  font-weight: 500;
  font-size: 0.98rem;
}
.nav__punkt {
  position: relative;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0 0.1rem;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  text-underline-offset: 0.35em;
}
.nav__link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.nav__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.nav__pfeil {
  width: 0.6rem;
  height: 0.6rem;
  opacity: 0.8;
  transition: transform 180ms var(--richtfest);
}
.nav__link[aria-expanded="true"] .nav__pfeil {
  transform: rotate(180deg);
}
.thema-schalter {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid color-mix(in oklch, currentColor 45%, transparent);
}
.thema-schalter svg {
  width: 1.15rem;
  height: 1.15rem;
}
.knopf-termin {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: var(--kalk-fest);
  color: #2a1c0d;
  transition:
    background-color 180ms,
    color 180ms;
}
.knopf-termin:hover {
  background: var(--akzent);
  color: var(--auf-akzent);
}

/* Klappmenü (schwebende Karte) */
.klapp {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: -1.25rem;
  z-index: 5;
  min-width: 15rem;
  padding: 1.1rem 1.25rem;
  background: var(--flaeche);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--schatten-kontakt);
  border: 1px solid var(--linie);
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 180ms var(--richtfest),
    transform 180ms var(--richtfest),
    visibility 0s 180ms;
}
.klapp.ist-offen {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 180ms var(--richtfest),
    transform 180ms var(--richtfest);
}
.klapp--leistungen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 2rem;
  min-width: 34rem;
  left: -2rem;
}
.klapp__kopf {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-leise);
  padding: 0.2rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.klapp ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.klapp a {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.45rem 0;
  text-decoration: none;
  color: var(--text);
}
.klapp a:hover {
  color: var(--leit-text);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}
.klapp__nr {
  font-size: 0.8125rem;
  color: var(--text-leise);
  font-variant-numeric: tabular-nums;
  min-width: 1.4rem;
}
.klapp__alle {
  grid-column: 1 / -1;
  border-top: 1px solid var(--linie);
  margin-top: 0.4rem;
  padding-top: 0.5rem;
}
.klapp__alle a {
  font-weight: 600;
  color: var(--leit-text);
}

/* Dach- und Hauszeichen (bau-brief §7) */
.dz {
  display: inline-block;
  flex: none;
}
.dz--dach {
  width: 14px;
  height: 8px;
  background: var(--leit);
  clip-path: polygon(50% 0, 100% 100%, 82% 100%, 50% 30%, 18% 100%, 0 100%);
}
.dz--haus {
  width: 8px;
  height: 8px;
  background: var(--text-leise);
}

/* Menü-Knopf (schmal) */
.menue-knopf {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: var(--radius);
  font-weight: 600;
  background: color-mix(in oklch, var(--kalk-fest) 16%, transparent);
  border: 1px solid color-mix(in oklch, var(--kalk-fest) 45%, transparent);
}
.menue-knopf svg {
  width: 1.2rem;
  height: 1.2rem;
}

/* Gescrollt: Creme deckend, Quer-Logo 60 px, 4-px-Kante */
.kopfleiste.ist-gescrollt {
  height: var(--kopfleiste-h);
  background: var(--grund);
  color: var(--text);
}
.kopfleiste.ist-gescrollt::before {
  opacity: 0;
}
.kopfleiste.ist-gescrollt::after {
  transform: scaleY(1);
}
.kopfleiste.ist-gescrollt .nav {
  height: var(--kopfleiste-h);
}
.kopfleiste.ist-gescrollt .karte {
  top: 0.3rem;
  width: auto;
  padding: 0 0.4rem;
  box-shadow: none;
  border-radius: var(--radius);
  background: transparent;
}
[data-thema="dunkel"] .kopfleiste.ist-gescrollt .karte {
  background: var(--karte-creme);
} /* Nacht: Logo bleibt auf seinem Creme-Kärtchen (nie umfärben) */
.kopfleiste.ist-gescrollt .karte__hoch {
  display: none;
}
.kopfleiste.ist-gescrollt .karte__quer {
  display: block;
}
.kopfleiste.ist-gescrollt .knopf-termin {
  background: var(--leit);
  color: var(--auf-leit);
}
.kopfleiste.ist-gescrollt .knopf-termin:hover {
  background: var(--akzent);
  color: var(--auf-akzent);
}
.kopfleiste.ist-gescrollt .menue-knopf {
  background: transparent;
  border-color: var(--linie);
}

/* Mobil-Menü */
.mobil-menue {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--grund);
  color: var(--text);
  padding: 1rem var(--rand-kopf) 2rem;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  transition:
    opacity 180ms var(--richtfest),
    transform 180ms var(--richtfest),
    visibility 0s 180ms;
}
.mobil-menue.ist-offen {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition:
    opacity 180ms var(--richtfest),
    transform 180ms var(--richtfest);
}
.mobil-menue__kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3.5rem;
}
.mobil-menue__kopf img {
  height: 52px;
  width: auto;
}
.mobil-menue__zu {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--linie);
}
.mobil-menue nav {
  margin-top: 1.5rem;
}
.mobil-menue h2 {
  font: 600 0.8125rem/1.3 var(--font-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-leise);
  margin: 1.4rem 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mobil-menue ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobil-menue a:not(.knopf-termin) {
  display: block;
  padding: 0.55rem 0;
  text-decoration: none;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--linie);
}
.mobil-menue__fuss {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.mobil-menue__fuss .knopf-termin {
  background: var(--leit);
  color: var(--auf-leit);
}
.mobil-menue__fuss .thema-schalter {
  border-color: var(--linie);
}

/* ---------- Start-Kopf (Video) ---------- */
/* Video-Fläche = 100svh − Kontaktleiste; die Leiste sitzt im selben Abschnitt direkt an der Video-Unterkante (0 px) */
.kopf {
  position: relative;
  height: 100svh;
  min-height: 40rem;
  background: var(--dunkel-fest);
  color: var(--kalk-fest);
  overflow: hidden;
  isolation: isolate;
}
.kopf__band {
  position: absolute;
  inset: 0 0 var(--leiste-h) 0;
  background: var(--dunkel-fest);
  overflow: hidden;
}
.kopf > .kontaktleiste--im-kopf {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
.kopf__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  background: var(--dunkel-fest);
}
/* Verlauf NUR an der Textecke unten links (Kap. 11: nie flächig, Video nie unscharf) */
.kopf__ecke {
  position: absolute;
  left: 0;
  bottom: var(--leiste-h);
  z-index: 1;
  pointer-events: none;
  width: clamp(46rem, 66%, 68rem);
  height: clamp(26rem, 64%, 36rem);
  background: linear-gradient(
    0deg,
    rgb(var(--schiefer-rgb) / 0.84) 0%,
    rgb(var(--schiefer-rgb) / 0.76) 52%,
    rgb(var(--schiefer-rgb) / 0.4) 78%,
    rgb(var(--schiefer-rgb) / 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 70%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg, #000 0%, #000 70%, transparent 100%);
}
.kopf__text {
  position: absolute;
  left: 0;
  bottom: var(--leiste-h);
  z-index: 2;
  padding: 0 var(--rand-kopf) clamp(2.5rem, 6vh, 4.25rem);
  max-width: 50rem;
}
.kopf__h1 {
  margin: 0;
  font-weight: 400;
}
.kopf__z1 {
  display: block;
  margin-bottom: 0.9rem;
  font: 600 clamp(0.95rem, 0.85rem + 0.35vw, 1.15rem)/1.3 var(--font-text);
  letter-spacing: 0.01em;
}
.kopf__pointe {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 1.1rem + 3.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.kopf__einheit {
  white-space: nowrap;
} /* „Dach & Haus.“ bleibt zusammen */
.kopf__akzent {
  color: var(--akzent);
} /* „Haus.“ in Frischholz über dem Video */
.kopf__unter {
  margin: 1.2rem 0 0;
  max-width: 38rem;
  font-size: clamp(1.125rem, 1.04rem + 0.35vw, 1.32rem);
  line-height: 1.5;
}
.kopf__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.9rem;
  min-height: 3.25rem;
  padding: 0 1.6rem;
  border-radius: var(--radius);
  background: var(--leit);
  color: var(--auf-leit);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--schatten-kontakt);
  transition:
    background-color 180ms,
    color 180ms;
}
.kopf__cta:hover {
  background: var(--akzent);
  color: var(--auf-akzent);
}
[data-thema="dunkel"] .kopf__cta {
  background: var(--akzent);
  color: var(--auf-akzent);
}
/* Zeilen-/Wortmaske fürs Text-Reveal */
.kopf__zeile {
  display: block;
}
.kopf__wort {
  display: inline-block;
}

/* ---------- Kontaktleiste (bündig, 0 px) ---------- */
.kontaktleiste {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: var(--leiste-h);
  margin: 0;
  background: #7c562f; /* Dachbraun themenfest: Creme-Schrift 5,9:1 in beiden Modi */
  color: var(--karte-creme);
}
.kontaktleiste a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0 1rem;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgb(250 245 240 / 0.24);
  transition: background-color 180ms;
}
.kontaktleiste a:last-child {
  border-right: 0;
}
.kontaktleiste a:hover {
  background: rgb(0 0 0 / 0.14);
}
.kontaktleiste svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}
.kontaktleiste small {
  font-size: inherit;
  font-weight: 400;
  opacity: 0.9;
}
.kontaktleiste :focus-visible {
  outline-color: var(--akzent);
  outline-offset: -4px;
}

/* ---------- Bühnen-Kopf (Unterseiten, Muster _arbeit/kopf-muster-unterseite.html) ---------- */
.buehne {
  position: relative;
  height: 72svh;
  min-height: 30rem;
  background: var(--dunkel-fest);
  color: var(--kalk-fest);
  overflow: hidden;
  isolation: isolate;
  --text: var(--kalk-fest);
  --text-leise: var(--meta-fest); /* themenfest über Tokens (Kap. 11) */
}
.buehne__bild,
.buehne__bild img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.buehne .kopf__ecke {
  height: min(30rem, 72%);
}
.buehne__text {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 var(--rand-kopf) clamp(2rem, 5vh, 3.5rem);
  max-width: 52rem;
}
.brotkrumen {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.brotkrumen ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.brotkrumen li {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.brotkrumen li + li::before {
  content: "›";
  opacity: 0.8;
}
.brotkrumen a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.buehne__kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.buehne .dz--dach {
  background: var(--akzent);
}
.buehne .dz--haus {
  background: var(--kalk-fest);
}
.buehne__h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.1rem + 3vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- Breiten ---------- */
@media (max-width: 1199px) {
  .nav__punkt,
  .nav > .nav__link,
  .nav .knopf-termin,
  .nav .thema-schalter {
    display: none;
  }
  .menue-knopf {
    display: inline-flex;
  }
}
@media (max-width: 899px) {
  /* Kap. 5: eigenes Bildband, Text mittig darunter, Headline eine Stufe kleiner */
  .kopfleiste {
    height: 5rem;
  }
  .kopfleiste::before {
    height: 6.5rem;
  }
  .nav {
    height: 4.25rem;
  }
  .karte {
    width: 6rem;
    padding: 0.7rem 0.65rem 0.7rem;
  }
  .kopfleiste.ist-gescrollt {
    height: 4rem;
  }
  .kopfleiste.ist-gescrollt .nav {
    height: 4rem;
  }
  .kopfleiste.ist-gescrollt .karte {
    top: 0.4rem;
  }
  .karte__quer {
    height: 48px;
  }
  .kopf {
    height: auto;
    min-height: 0;
    background: var(--grund);
    color: var(--text);
    overflow: visible;
  }
  .kopf__band {
    position: relative;
    height: 56svh;
    min-height: 18rem;
  }
  .kopf__ecke {
    display: none;
  }
  .kopf__text {
    position: static;
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
    padding: 2.25rem var(--rand-kopf) 2.75rem;
  }
  .kopf__pointe {
    font-size: clamp(2rem, 1.2rem + 3.6vw, 2.6rem);
  }
  .kopf__akzent {
    color: var(--leit-text);
  } /* „Haus.“ auf Hell in Dachbraun (bau-brief §5) */
  .kopf__unter {
    margin-inline: auto;
  }
  /* Reihenfolge Handy: Bildband → Kontaktleiste (bündig) → Text */
  .kopf {
    display: flex;
    flex-direction: column;
  }
  .kopf__band {
    order: 1;
  }
  .kopf > .kontaktleiste--im-kopf {
    order: 2;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
  }
  .kopf__band {
    inset: auto;
  }
  .kopf__text {
    order: 3;
  }
  .kontaktleiste a {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0 0.25rem;
    font-size: 0.8125rem;
  }
  .kontaktleiste small {
    display: none;
  }
  .buehne {
    height: 72svh;
    min-height: 26rem;
  }
  .buehne__h1 {
    font-size: clamp(1.9rem, 1.1rem + 3.6vw, 2.5rem);
  }
}

/* ---------- Kopf-Choreo 0–1,9 s („Das Aufrichten“, bau-brief §6) ----------
   Video läuft ab Bild 0 ohne Einblendung. Nur ohne Reduced-Motion; erster Scroll/Tastendruck springt ans Ende (.kopf--fertig). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes kopf-einhaengen {
    from {
      transform: translateY(-104%) rotate(-1.2deg);
    }
    to {
      transform: none;
    }
  }
  @keyframes kopf-text {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes kopf-aufrichten {
    from {
      opacity: 0;
      transform: rotate(-1.2deg) translateY(18px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @keyframes kopf-wort {
    from {
      transform: translateY(105%);
    }
    to {
      transform: none;
    }
  }

  .ist-start .karte {
    animation: kopf-einhaengen 680ms var(--richtfest) 60ms both;
  }
  .ist-start .nav > * {
    animation: kopf-text 520ms var(--richtfest) both;
    animation-delay: 180ms;
  }
  .ist-start .nav > :nth-child(2) {
    animation-delay: 235ms;
  }
  .ist-start .nav > :nth-child(3) {
    animation-delay: 290ms;
  }
  .ist-start .nav > :nth-child(4) {
    animation-delay: 345ms;
  }
  .ist-start .nav > :nth-child(5) {
    animation-delay: 400ms;
  }
  .ist-start .nav > :nth-child(6) {
    animation-delay: 455ms;
  }
  .ist-start .nav > :nth-child(7) {
    animation-delay: 510ms;
  }
  .ist-start .nav > :nth-child(8) {
    animation-delay: 565ms;
  }
  .ist-start .kopf__z1 {
    animation: kopf-text 520ms var(--richtfest) 260ms both;
  }
  .ist-start .kopf__zeile {
    overflow: hidden;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
  }
  .ist-start .kopf__wort {
    animation: kopf-wort 620ms var(--richtfest) both;
    animation-delay: 400ms;
  }
  /* Stagger 55 ms, Zeile 1 „Ihr Partner rund ums“, Zeile 2 „Dach & Haus.“ */
  .ist-start .kopf__zeile:nth-child(1) .kopf__wort:nth-child(2) {
    animation-delay: 455ms;
  }
  .ist-start .kopf__zeile:nth-child(1) .kopf__wort:nth-child(3) {
    animation-delay: 510ms;
  }
  .ist-start .kopf__zeile:nth-child(1) .kopf__wort:nth-child(4) {
    animation-delay: 565ms;
  }
  .ist-start .kopf__zeile:nth-child(2) .kopf__wort:nth-child(1) {
    animation-delay: 640ms;
  }
  .ist-start .kopf__zeile:nth-child(2) .kopf__wort:nth-child(2) {
    animation-delay: 695ms;
  }
  .ist-start .kopf__zeile:nth-child(2) .kopf__wort:nth-child(3) {
    animation-delay: 790ms;
  } /* „Haus.“ setzt einen Takt später — die Pointe */
  .ist-start .kopf__unter {
    animation: kopf-text 520ms var(--richtfest) 980ms both;
  }
  .ist-start .kopf__cta {
    transform-origin: 0 100%;
    animation: kopf-aufrichten 680ms var(--richtfest) 1140ms both;
  }
  /* Ende erreicht oder Besucher scrollt/tippt: Endzustand sofort (nur Kopf-Elemente, nie Sektions-Motion) */
  .ist-start.kopf--fertig
    :is(.karte, .nav > *, .kopf__z1, .kopf__wort, .kopf__unter, .kopf__cta) {
    animation: none !important;
  }
  .ist-start.kopf--fertig .kopf__zeile {
    overflow: visible;
  }
}

/* Kontaktleiste: lange Beschriftung am PC, kurze am Handy */
.kontaktleiste__kurz { display: none; }
@media (max-width: 899px) {
  .kontaktleiste__lang { display: none; }
  .kontaktleiste__kurz { display: inline; }
}

/* Bühnen-Kopf: abgespeckte Choreo (nur Text richtet sich auf), Bild steht sofort (LCP) */
@media (prefers-reduced-motion: no-preference) {
  .ist-buehne .buehne__text > * { animation: kopf-text 520ms var(--richtfest) both; }
  .ist-buehne .buehne__text > :nth-child(2) { animation-delay: 70ms; }
  .ist-buehne .buehne__text > :nth-child(3) { animation-delay: 140ms; }
}
.buehne .kopf__ecke { bottom: 0; }
@media (max-width: 899px) {
  .buehne .kopf__ecke {
    display: block; width: 100%; height: 70%;
    -webkit-mask-image: none; mask-image: none;
  }
}

/* Start-Kopf: Verlauf hängt AM Textblock (wächst mit ihm auf jeder Breite) — nur Textecke unten links, nie flächig (Kap. 11).
   Ersetzt den festen Eck-Kasten; gemessen ≥ 4,5:1 auf 1920/1440/1280/1024 über 9 Zeitpunkte. */
.kopf__text::before {
  content: "";
  position: absolute; left: 0; bottom: 0; z-index: -1; pointer-events: none;
  width: clamp(48rem, 72vw, 68rem);
  height: calc(100% + 9rem);
  background: linear-gradient(0deg,
    rgb(var(--schiefer-rgb) / 0.84) 0%,
    rgb(var(--schiefer-rgb) / 0.78) calc(100% - 9rem),
    rgb(var(--schiefer-rgb) / 0.42) calc(100% - 4rem),
    rgb(var(--schiefer-rgb) / 0) 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 76%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 76%, transparent 100%);
}
@media (max-width: 899px) {
  .kopf__text::before { display: none; }
}
