/* ============================================================
   Villa Kreativ — Ruhrallee 63
   Umsetzung von Companies.dc.html (Claude Design)
   Farben, Maße und Typo 1:1 aus dem Design übernommen.
   ============================================================ */

:root {
  /* Design-Tokens */
  --c-bg: #e5ded7; /* Grundfläche */
  --c-ink: #948279; /* Schrift, Linien, Button-Fläche */
  --c-paper: #fdfbf8; /* Polaroid-Karten */

  --ff-body: "kigelia-lgc", sans-serif;
  --ff-display: "ten-oldstyle", serif;

  --nav-h: 76px;

  /* Scrollstrecke pro Clip. Größer = das Video läuft langsamer durch. */
  --part-h: 320svh;
  /* Scrollstrecke des Intro-Clips (0.mp4). Das Logo-Overlay blendet
     über die ersten 32 % davon weg (INTRO_FADE in js/scroll-video.js). */
  --intro-h: 260svh;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Deckkraft der Intro-Fläche und der Logo-Kacheln (beide Hintergrundfarbe) */
  --intro-scrim: 0.9;
  --tile-scrim: 0.5;
}

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

html {
  scroll-behavior: smooth;
  background: var(--c-bg);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--ff-body);
  overflow-x: hidden;
}

::selection {
  background: var(--c-ink);
  color: var(--c-bg);
}

img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}

/* ------------------------------------------------------------
   Preloader
   ------------------------------------------------------------ */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  background: var(--c-bg);
  transition:
    opacity 0.6s ease,
    visibility 0.6s;
}
body.is-ready .preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader__mark {
  width: 90px;
  height: auto;
  opacity: 0.9;
}
.preloader__bar {
  width: 180px;
  height: 1px;
  background: rgba(148, 130, 121, 0.25);
  overflow: hidden;
}
.preloader__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--c-ink);
  transition: width 0.25s linear;
}

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 222, 215, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav__logo {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
}
/* In der Navigation steht nur noch der Schriftzug. Der ist sehr breit
   (6.9:1), deshalb über die Höhe gesteuert. */
.nav__logo img,
.nav__wordmark {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-family: "ten-oldstyle";
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--c-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.nav__links a:hover {
  opacity: 0.6;
}
.nav__links a.is-active {
  opacity: 0.8;
  font-weight: 600;
  text-underline-offset: 5px;
}

/* ------------------------------------------------------------
   Intro — liegt als Overlay auf Frame 0 des ersten Clips
   ------------------------------------------------------------ */

.stage__intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: var(--nav-h) 24px 40px;
  /* Volle Fläche in der Hintergrundfarbe, halbtransparent — das Video
     bleibt sichtbar, die Logos stehen aber ruhig darauf. */
  background: rgba(229, 222, 215, var(--intro-scrim));
  /* Die Deckkraft setzt scroll-video.js am Scroll entlang. Bewegt wird
     dabei nichts — das Overlay verblasst nur. */
  will-change: opacity;
}

/* Steigt beim Seitenstart herein, sobald der Preloader weg ist */
.intro__mark {
  width: min(420px, 62vw);
  height: auto;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: 0.15s;
}
body.is-ready .intro__mark {
  opacity: 1;
  transform: none;
}

.intro__claim {
  margin: 0;
  max-width: 30ch;
  text-align: center;
  font-family: var(--ff-display);
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  color: var(--c-ink);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: 0.35s;
}
body.is-ready .intro__claim {
  opacity: 1;
  transform: none;
}

.intro__hint {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-ink);
  opacity: 0.6;
  font-family: "ten-oldstyle";
}

/* ============================================================
   Bühne — eine durchgehende Videostrecke über drei Clips
   ============================================================ */

.stage {
  position: relative;
}

.stage__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--c-bg);
}

/* Alle Clips liegen übereinander. Der Wechsel wird NICHT gekreuzt:
   Beim Kreuzen sind für einen Moment beide Ebenen halbtransparent und
   die beige Bühnenfläche blitzt dazwischen durch. Stattdessen bleibt
   der alte Clip voll deckend liegen (.is-prev) und der neue wird
   darüber eingeblendet — darunter ist also nie ein Loch. Erst wenn die
   Blende durch ist, nimmt scroll-video.js .is-prev wieder weg. */
.stage__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.28s var(--ease);
  transform: translateZ(0);
  /* Verhindert, dass beim Aufblenden ein Rand der darunterliegenden
     Ebene durchscheint */
  backface-visibility: hidden;
}
.stage__video.is-prev {
  z-index: 1;
  opacity: 1;
  transition: none;
}
.stage__video.is-active {
  z-index: 2;
  opacity: 1;
}

/* Ebenen auf der Bühne: Videos 0–2 (siehe .stage__video), darüber
   Schleier, Karten und Intro. Ohne feste z-index-Werte würde die
   aktive Videoebene alles überdecken. */
.stage__veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    rgba(229, 222, 215, 0.55) 0%,
    rgba(229, 222, 215, 0.28) 40%,
    rgba(229, 222, 215, 0.28) 60%,
    rgba(229, 222, 215, 0.55) 100%
  );
  pointer-events: none;
}

/* ------------------------------------------------------------
   Ladeanzeige des laufenden Clips
   ------------------------------------------------------------
   Sichtbar genau dann, wenn das gesuchte Frame noch nicht gepuffert
   ist — nicht über die ganze Ladezeit. Solange steht das Poster.
   Die Klasse .is-busy setzt scroll-video.js.
   ------------------------------------------------------------ */

.vidload {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-radius: 2px;
  background: rgba(229, 222, 215, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s var(--ease),
    visibility 0.3s;
}
.vidload.is-busy {
  opacity: 1;
  visibility: visible;
}

.vidload__ring {
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(148, 130, 121, 0.22);
  border-top-color: var(--c-ink);
  border-radius: 50%;
  animation: vidload-spin 0.9s linear infinite;
}

/* Gleiche Optik wie der Balken im Preloader — nur zeigt er hier den
   Puffer des laufenden Clips. */
.vidload__bar {
  display: block;
  width: 120px;
  height: 1px;
  background: rgba(148, 130, 121, 0.25);
  overflow: hidden;
}
.vidload__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--c-ink);
  transition: width 0.25s linear;
}

@keyframes vidload-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Die Scrollstrecken. Ihr jeweiliger Anfang ist Frame 0 eines Clips —
   deshalb landen die Sprungmarken exakt auf einem Clip-Anfang. */
.part {
  height: var(--part-h);
}

/* Strecke des Intro-Clips. Der negative Margin zieht sie über den Pin,
   damit die Bühne dessen 100svh nicht ein zweites Mal mitzählt. */
.part--intro {
  height: var(--intro-h);
  margin-top: -100svh;
}
/* Der letzte Clip braucht einen Viewport mehr, sonst hat er weniger
   Scrollweg als die anderen (der Pin löst sich am Ende der Bühne). */
.part:last-of-type {
  height: calc(var(--part-h) + 100svh);
}

/* ------------------------------------------------------------
   Textblöcke auf der Bühne
   ------------------------------------------------------------ */

.stage__cards {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-h) 24px 40px;
  pointer-events: none;
}

.card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: min(100%, 680px);
  max-height: 100%;
  overflow-y: auto;
  padding: 44px 56px 48px;
  background: rgba(229, 222, 215, 0.94);
  border-radius: 2px;

  /* Startzustand: liegt tiefer und ist unsichtbar. Wird kurz vor dem
     Ende des Clips eingeblendet (siehe data-reveal-at). */
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease),
    visibility 0.7s;
}
.card.is-in {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/* Die Bereichsüberschrift steht als Text über dem Fließtext. */
.card__headline {
  margin: 0;
  margin-top: 20px;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  line-height: 1.15;
  text-align: center;
  color: var(--c-ink);
}
.card__subline {
  margin: -18px 0 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--c-ink);
  opacity: 0.7;
}

.card__logo {
  width: 260px;
  height: 90px;
  object-fit: contain;
}
/* Das Villa-Kreativ-Zeichen ist fast quadratisch (Haus über Wortmarke)
   und braucht deshalb Höhe statt Breite. */
.card__logo--villa {
  width: 190px;
  height: 145px;
}

.card__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  max-width: 560px;
  text-align: center;
  color: var(--c-ink);
}

.btn {
  margin-top: 8px;
  padding: 14px 32px;
  font-family: var(--ff-body);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--c-bg);
  background: var(--c-ink);
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn:hover {
  opacity: 0.8;
}

/* ------------------------------------------------------------
   Outro: Über die Villa, Foto-Marquee
   ------------------------------------------------------------ */

.outro {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding: 64px 0 32px;
  background: var(--c-bg);
}

.marquee {
  overflow: hidden;
  width: 100%;
  padding: 20px 0 40px;
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 56px;
  animation: marquee 200s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: 56px;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  /* halbe Gesamtstrecke plus der halbe Gruppenabstand = nahtloser Loop */
  to {
    transform: translateX(calc(-50% - 28px));
  }
}

.polaroid {
  margin: 0;
  padding: 20px 20px 48px;
  background: var(--c-paper);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transform: rotate(var(--rot, 0deg));
}
.polaroid img {
  width: 260px;
  height: 190px;
  object-fit: cover;
  background: rgba(148, 130, 121, 0.12);
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0 40px;
  padding: 40px 24px 40px;
  border-top: 1px solid var(--c-ink);
}
.footer__logo {
  width: 120px;
  height: auto;
  margin-bottom: 4px;
}
/* Ersetzt die frühere unsichtbare Abschnittsüberschrift */
.footer__headline {
  margin: 0;
  max-width: 24ch;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  text-align: center;
  color: var(--c-ink);
}
.footer__copy {
  line-height: 1.7;
  text-align: center;
}

.footer__address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
  color: var(--c-ink);
  margin-bottom: 8px;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__links a {
  font-size: 14px;
  color: var(--c-ink);
  text-decoration: none;
}
.footer__links a:hover {
  text-decoration: underline;
}
.footer__copy {
  margin: 0;
  font-size: 12px;
  color: var(--c-ink);
  opacity: 0.7;
}

/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 900px) {
  :root {
    --nav-h: 64px;
    --part-h: 260svh;
  }

  .nav {
    justify-content: flex-end;
    padding-right: 20px;
  }
  .nav__logo {
    left: 20px;
  }
  .nav__logo img,
  .nav__wordmark {
    height: 18px;
  }

  .intro__mark {
    width: min(300px, 72vw);
  }

  .stage__cards {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* Drei Absätze je Karte: auf kleinen Displays muss der Block ohne
     eigenen Scrollbalken in den Viewport passen, sonst konkurriert das
     Wischen in der Karte mit dem Scrollen der Bühne. */
  .card {
    padding: 28px 22px 32px;
    gap: 16px;
  }
  .card__headline {
    font-size: clamp(1.25rem, 6vw, 1.625rem);
  }
  .card__subline {
    margin-top: -8px;
    font-size: 12px;
  }
  .card__logo {
    width: 170px;
    height: 58px;
  }
  .card__logo--villa {
    width: 108px;
    height: 82px;
  }
  .card__text {
    font-size: 15px;
    line-height: 1.6;
  }
  .btn {
    margin-top: 4px;
    padding: 12px 26px;
  }

  .polaroid {
    padding: 14px 14px 34px;
  }
  .polaroid img {
    width: 190px;
    height: 140px;
  }
  .footer {
    margin: 0 20px;
  }
}

/* ------------------------------------------------------------
   Mobil im Hochformat: Splitscreen
   ------------------------------------------------------------
   Vorher lag die Karte über dem Video und ein 16:9-Clip wurde vom
   `object-fit: cover` auf einen schmalen senkrechten Streifen
   beschnitten — vom Bild blieb kaum etwas übrig.

   Jetzt zwei Zonen: oben das Video in seinem echten Seitenverhältnis
   (der Kasten ist exakt 16:9, cover schneidet also nichts weg),
   darunter die Karte. Die Karte steht über die ganze Kapitelstrecke
   und wechselt erst mit dem nächsten Kapitel — siehe
   data-reveal-at-mobile in index.html.

   Nur im Hochformat: quer ist der Viewport ohnehin ungefähr 16:9,
   da bleibt es beim bildfüllenden Video mit Karte darüber.
   ------------------------------------------------------------ */

@media (max-width: 900px) and (orientation: portrait) {
  :root {
    /* 16:9 der Bildschirmbreite. Die zweite Grenze greift nur auf
       ungewöhnlich flachen Geräten, damit unten Platz bleibt. */
    --split-video-h: min(56.25vw, 46svh);
  }

  .stage__video,
  .stage__veil {
    top: var(--nav-h);
    bottom: auto;
    height: var(--split-video-h);
  }

  /* Der Schleier lag über dem Text und musste ihn lesbar halten. Hier
     steht kein Text mehr auf dem Bild — er blendet die Kanten nur noch
     weich in die Grundfläche. */
  .stage__veil {
    background: linear-gradient(
      to bottom,
      rgba(229, 222, 215, 0.42) 0%,
      rgba(229, 222, 215, 0) 26%,
      rgba(229, 222, 215, 0) 74%,
      rgba(229, 222, 215, 0.42) 100%
    );
  }

  /* Ladeanzeige mittig im Videokasten statt am unteren Bildrand */
  .vidload {
    top: calc(var(--nav-h) + var(--split-video-h) / 2);
    bottom: auto;
    transform: translate(-50%, -50%);
  }

  .stage__cards {
    top: calc(var(--nav-h) + var(--split-video-h));
    padding: 0;
  }

  /* Das Intro deckt weiter die ganze Fläche ab (das Video liegt gedämpft
     darunter), sein Inhalt steht aber schon dort, wo gleich die Karte
     aufgeht — so wandert beim Wegblenden nichts. */
  .stage__intro {
    padding-top: calc(var(--nav-h) + var(--split-video-h));
    gap: 20px;
  }

  /* Die Karte füllt die untere Zone aus. Ränder als Margin, weil ein
     absolut positioniertes Kind das Padding des Containers ignoriert. */
  .card {
    inset: 0;
    margin: clamp(10px, 1.6svh, 14px) 16px
      calc(clamp(10px, 1.6svh, 14px) + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: none;
    justify-content: center;
    padding: clamp(12px, 2.2svh, 26px) 18px;
    gap: clamp(6px, 1.3svh, 16px);
    background: rgba(253, 251, 248, 0.92);
    box-shadow: 0 2px 20px rgba(148, 130, 121, 0.12);
  }

  /* Alles in der Karte hängt an der verfügbaren Höhe: so passt auch der
     längste Block auf einem kleinen Gerät ohne eigenen Scrollbalken ins
     Bild — sonst würde das Wischen in der Karte mit dem Scrollen der
     Bühne konkurrieren. */
  .card__logo {
    width: min(150px, 40vw);
    height: clamp(28px, 5svh, 50px);
  }
  .card__logo--villa {
    width: clamp(60px, 9.5svh, 100px);
    height: clamp(46px, 7.2svh, 76px);
  }
  .card__headline {
    margin-top: 0;
    font-size: clamp(16px, 2.8svh, 26px);
    line-height: 1.12;
  }
  .card__subline {
    margin-top: -4px;
    font-size: clamp(10px, 1.3svh, 12px);
  }
  .card__text {
    font-size: clamp(12px, 1.8svh, 15.5px);
    line-height: 1.5;
  }
  .btn {
    margin-top: clamp(2px, 0.5svh, 8px);
    padding: clamp(9px, 1.4svh, 14px) 24px;
    font-size: clamp(12px, 1.6svh, 14px);
  }
}


/* ------------------------------------------------------------
   Reduzierte Bewegung: kein Scrubbing, Karten stehen fest da
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .marquee__track {
    animation: none;
  }
  .card {
    transition: none;
  }
  /* Statt des drehenden Rings zeigt dann allein der Balken den Puffer. */
  .vidload__ring {
    animation: none;
    border-top-color: rgba(148, 130, 121, 0.25);
  }
}

:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 4px;
}

/* ============================================================
   Rechtstexte (impressum.html, datenschutz.html)
   ============================================================ */

.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 72px) 24px 80px;
  color: var(--c-ink);
}

.legal__back {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.legal__back:hover {
  opacity: 1;
}

.legal h1,
.legal h2,
.legal h3,
.legal h4 {
  text-align: left;
}

.legal h1 {
  margin: 24px 0 26px;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
}
.legal h2 {
  margin: 84px 0 10px;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.2;
  padding-top: 30px;
  border-top: 1px solid rgba(148, 130, 121, 0.3);
}
.legal h3 {
  margin: 50px 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.legal h4 {
  margin: 34px 0 6px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.75;
}
.legal p {
  margin: 0 0 16px;
}
.legal ul {
  margin: 0 0 16px;
  padding-left: 1.25em;
}
.legal li {
  margin-bottom: 8px;
}

.legal a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.legal a:hover {
  opacity: 0.7;
}

/* Auf den Rechtsseiten trägt die Navigation nichts über einem Video —
   deshalb eine sichtbare Trennlinie statt des Blur-Verlaufs. */
.page--legal .nav {
  border-bottom: 1px solid rgba(148, 130, 121, 0.3);
}
.page--legal .footer {
  margin-top: 0;
}

@media (max-width: 900px) {
  .legal {
    padding-top: calc(var(--nav-h) + 40px);
  }
}

/* ============================================================
   Mobile: Burger oben rechts + Fullscreen-Menü
   Ab 900 px übernimmt wieder die Linkleiste im Kopf.
   ============================================================ */

.nav__burger {
  /* Fest positioniert statt im Nav-Fluss, damit der Knopf über dem
     geöffneten Menü liegt und dort zum Schließen wird. */
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: none; /* per Media Query eingeschaltet */
  align-items: center;
  justify-content: center;
  width: var(--nav-h);
  height: var(--nav-h);
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav__burger i {
  position: relative;
  display: block;
  width: 26px;
  height: 1px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}
.nav__burger i::before,
.nav__burger i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.nav__burger i::before {
  transform: translateY(-8px);
}
.nav__burger i::after {
  transform: translateY(8px);
}

/* Offen: aus den drei Strichen wird ein Kreuz */
body.menu-open .nav__burger i {
  background: transparent;
}
body.menu-open .nav__burger i::before {
  transform: rotate(45deg);
}
body.menu-open .nav__burger i::after {
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: var(--nav-h) 24px 40px;
  background: var(--c-bg);
  overscroll-behavior: contain;

  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s var(--ease),
    visibility 0.4s;
}
body.menu-open .menu {
  opacity: 1;
  visibility: visible;
}

.menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu__links a {
  display: block;
  font-family: var(--ff-display);
  font-size: clamp(1.25rem, 5.5vw, 1.875rem);
  line-height: 1.2;
  color: var(--c-ink);
  text-decoration: none;

  /* Lange Beschriftungen brechen um („wondio KI- & Software-Entwicklung
     Essen"). Ohne text-align stünde die zweite Zeile linksbündig, weil der
     Link dann die volle Breite einnimmt. text-wrap: balance verteilt die
     Zeilen zusätzlich gleichmäßig. */
  text-align: center;
  text-wrap: balance;

  /* Kommen beim Öffnen nacheinander herein */
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}
body.menu-open .menu__links a {
  opacity: 1;
  transform: none;
}
body.menu-open .menu__links li:nth-child(1) a {
  transition-delay: 0.08s;
}
body.menu-open .menu__links li:nth-child(2) a {
  transition-delay: 0.14s;
}
body.menu-open .menu__links li:nth-child(3) a {
  transition-delay: 0.2s;
}

.menu__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.menu__address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-ink);
  opacity: 0.75;
}
.menu__legal {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu__legal a {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--c-ink);
  text-decoration: none;
  opacity: 0.75;
}
.menu__legal a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Solange das Menü offen ist, scrollt die Seite dahinter nicht mit */
html.menu-locked {
  overflow: hidden;
}

/* Umschaltpunkt: bis 900 px der Burger, darüber die Linkleiste.
   Muss NACH beiden Grunddefinitionen stehen, sonst gewinnt die
   spätere display-Regel. */
/* Umschaltpunkt bei 1100 px statt 900: „wondio KI- & Software-Entwicklung
   Essen" macht die Linkleiste so breit, dass sie darunter mit dem
   Schriftzug links kollidiert. */
@media (max-width: 1100px) {
  .nav__links {
    display: none;
  }
  .nav__burger {
    display: flex;
  }
}

@media (min-width: 1101px) {
  .menu {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu,
  .menu__links a,
  .nav__burger i,
  .nav__burger i::before,
  .nav__burger i::after {
    transition: none;
  }
}

/* ============================================================
   Animationen
   ------------------------------------------------------------
   Choreografie überall gleich:
     1. Überschrift / Logo steigt von unten herein
     2. Fließtext löst sich Wort für Wort auf
     3. zuletzt der Button

   Ausgelöst wird über .is-in am Container — bei den Karten von
   scroll-video.js, sonst vom IntersectionObserver in reveal.js.
   ============================================================ */

:root {
  --rise-dur: 0.7s;
  --word-dur: 0.55s;
  --word-step: 24ms; /* Abstand zwischen zwei Wörtern */
  --word-base: 0.22s; /* Vorlauf vor dem ersten Wort */
  --word-lead: var(--word-base); /* je Absatz von reveal.js verschoben */
}

/* --- Wortweise Auflösung ------------------------------------- */

.w {
  display: inline-block;
  overflow: hidden;
  /* Unterlängen (g, p, y) würden sonst am Kasten abgeschnitten */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  vertical-align: bottom;
}
.w > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(115%);
  opacity: 0;
  transition:
    transform var(--word-dur) var(--ease),
    opacity var(--word-dur) var(--ease);
  transition-delay: calc(var(--word-lead) + var(--i) * var(--word-step));
}
.is-in .w > i {
  transform: none;
  opacity: 1;
}

/* --- Von unten hereinsteigen --------------------------------- */

[data-rise] {
  opacity: 0;
  transform: translateY(38px);
  transition:
    opacity var(--rise-dur) var(--ease),
    transform var(--rise-dur) var(--ease);
  transition-delay: var(--rise-delay, 0s);
}
.is-in [data-rise],
[data-rise].is-in {
  opacity: 1;
  transform: none;
}

/* --- Der Button kommt zuletzt --------------------------------- */

[data-last] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
  /* Wartet, bis die Wortkette durch ist: --words setzt reveal.js */
  transition-delay: calc(
    var(--word-lead) + var(--words, 12) * var(--word-step) + 0.18s
  );
}
.is-in [data-last] {
  opacity: 1;
  transform: none;
}

/* --- Karten auf der Bühne ------------------------------------- */

/* Die Karte selbst blendet nur noch die Fläche ein; ihr Inhalt
   choreografiert sich über die Regeln oben. */
.card {
  transform: none;
}
.card.is-in {
  transform: none;
}

/* --- Mobiles Menü --------------------------------------------- */

/* Die Links lösen sich ebenfalls wortweise auf, Zeile für Zeile
   versetzt. --word-lead pro Zeile statt nth-child-Einzelregeln. */
.menu__links a {
  /* ersetzt die frühere Zeilenanimation */
  opacity: 1;
  transform: none;
  transition: none;
}
body.menu-open .menu__links a {
  opacity: 1;
  transform: none;
}
.menu__links li:nth-child(1) a {
  --word-lead: 0.12s;
}
.menu__links li:nth-child(2) a {
  --word-lead: 0.26s;
}
.menu__links li:nth-child(3) a {
  --word-lead: 0.4s;
}
.menu__links li:nth-child(4) a {
  --word-lead: 0.54s;
}
.menu__foot {
  --rise-delay: 0.68s;
}

@media (prefers-reduced-motion: reduce) {
  .w > i,
  [data-rise],
  [data-last] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Menü: Auslöser ist das geöffnete Menü, nicht .is-in -------- */

body.menu-open .menu .w > i {
  transform: none;
  opacity: 1;
}
body.menu-open .menu [data-rise] {
  opacity: 1;
  transform: none;
}

/* --- Intro-Kacheln steigen beim Seitenstart herein -------------- */

.intro__claim {
  margin: 0;
  margin-top: 10px !important;
  max-width: 30ch;
  text-align: center;
  font-family: var(--ff-display);
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  color: var(--c-ink);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: 0.35s;
}
body.is-ready .intro__claim {
  opacity: 1;
  transform: none;
}

.intro__hint {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: 0.62s;
}
body.is-ready .intro__claim {
  margin: 0;
  max-width: 30ch;
  text-align: center;
  font-family: var(--ff-display);
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  color: var(--c-ink);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: 0.35s;
}
body.is-ready .intro__claim {
  opacity: 1;
  transform: none;
}

.intro__hint {
  opacity: 0.6;
  transform: none;
}

/* --- Rechtstexte: Blockweise hereinsteigen ---------------------- */

.legal [data-rise] {
  transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
  body.is-ready .intro__claim {
    margin: 0;
    max-width: 30ch;
    text-align: center;
    font-family: var(--ff-display);
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    line-height: 1.35;
    color: var(--c-ink);
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity 0.8s var(--ease),
      transform 0.8s var(--ease);
    transition-delay: 0.35s;
  }
  body.is-ready .intro__claim {
    opacity: 1;
    transform: none;
  }

  .intro__hint {
    opacity: 0.6;
  }
}

/* ============================================================
   Überschriften auf der Bühne
   Die Marken stehen als Bild in der Überschrift — der Alt-Text ist
   zugleich der Überschriftentext. Die Überschrift selbst trägt keine
   eigene Optik, sie ersetzt nur den früheren <img>-Container.
   ============================================================ */

.card__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 0;
  text-align: center;
}

/* Überschriften auf der Startseite grundsätzlich mittig.
   Die Rechtsseiten stellen das unter .legal wieder auf linksbündig. */
main h1,
main h2,
main h3,
main h4 {
  text-align: center;
}

/* Nur für Screenreader und Suchmaschinen, optisch nicht vorhanden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
