/*
  KitaLotse — Cinematic Intro-Landingpage (nur index.html)
  Port der 21st.dev-Komponente "Cinematic Hero" (React/GSAP/Tailwind) auf
  Vanilla CSS, markenangepasst (Lotsenblau/Signalgelb statt Zufallsblau).
  Nutzt die --kl-*-Tokens aus style.css (dort verlinkt, hier nur die neuen,
  seitenspezifischen Regeln).
*/

/* ---------- Progressive Enhancement: Sichtbar ohne JS ---------- */
/* cinematic-hero.js setzt "js-cinematic" auf <html>, nur wenn GSAP wirklich
   lädt und läuft. Erst dann greift die Ausgangs-Unsichtbarkeit für die
   Scroll-Story — ohne JavaScript (oder falls GSAP aus irgendeinem Grund
   nicht lädt) bleibt der komplette Inhalt normal sichtbar und lesbar. */
html.js-cinematic .cinematic-reveal,
html.js-cinematic .main-card,
html.js-cinematic .cta-wrapper,
html.js-cinematic .card-left-text,
html.js-cinematic .card-right-text,
html.js-cinematic .mockup-scroll-wrapper,
html.js-cinematic .floating-badge,
html.js-cinematic .phone-widget {
  visibility: hidden;
}

/* Diese Seite ist bewusst IMMER dunkel — unabhängig vom Farbmodus des
   Systems. Das cinematische Grain/Glow/Card-Material setzt einen dunklen
   Bildschirm voraus; --kl-text/--kl-bg würden im Light Mode hell werden und
   Text/Buttons unsichtbar machen (derselbe Fehler wie zuvor beim Footer,
   hier von vornherein mit eigenen, fixen Tokens vermieden). */
body.cinematic-body {
  --cine-bg: #0b1420;
  --cine-text: #f4f6f9;
  --cine-text-muted: #a9b6c4;
  margin: 0;
  overflow-x: hidden;
  background: var(--cine-bg);
  color: var(--cine-text);
}

.cinematic-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
}

/* ---------- Umgebungs-Overlays ---------- */
.film-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%25" height="100%25" filter="url(%23n)"/></svg>');
}

.bg-grid-theme {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-size: 60px 60px;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--cine-text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--cine-text) 6%, transparent) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* ---------- Skip-Links & Rechtliches ---------- */
.cinematic-skiplinks {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 60;
  display: flex;
  gap: 8px;
}
.cinematic-legal {
  position: fixed;
  bottom: 16px;
  left: 20px;
  z-index: 60;
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
}
.cinematic-legal a { color: color-mix(in srgb, var(--cine-text) 55%, transparent); text-decoration: none; }
.cinematic-legal a:hover { color: var(--cine-text); }

/* ---------- Textlagen (Hero / CTA) ---------- */
.hero-text-wrapper {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100vw;
  padding-inline: 16px;
}
.hero-text-wrapper h1 {
  font-family: var(--kl-font-heading);
  font-weight: 700;
  font-size: clamp(2.5rem, 3vw + 2rem, 6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--cine-text);
}
.text-days {
  background: linear-gradient(180deg, var(--kl-accent) 0%, color-mix(in srgb, var(--kl-accent) 55%, transparent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateZ(0);
}

.hero-cta-inline { margin-top: 28px; }

.hero-scroll-hint {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  color: color-mix(in srgb, var(--cine-text) 55%, transparent);
  animation: hero-scroll-bounce 2s ease-in-out infinite;
}
.hero-scroll-hint svg { width: 26px; height: 26px; }
@keyframes hero-scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(8px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-hint { animation: none; }
}

.cta-wrapper {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100vw;
  padding-inline: 16px;
}
.cta-wrapper h2 {
  font-family: var(--kl-font-heading);
  font-size: clamp(1.75rem, 2vw + 1.5rem, 3.5rem);
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--cine-text);
}
.cta-wrapper p {
  color: var(--cine-text-muted);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
  max-width: 42ch;
  margin: 0 0 40px;
}
.cinematic-cta-buttons { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---------- Physische Karte ---------- */
.main-card-wrapper {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.main-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  width: 92vw;
  height: 92vh;
  border-radius: 32px;
  background: linear-gradient(145deg, var(--kl-navy-solid) 0%, #060b14 100%);
  box-shadow:
    0 40px 100px -20px rgb(0 0 0 / 0.9),
    0 20px 40px -20px rgb(0 0 0 / 0.8),
    inset 0 1px 2px rgb(255 255 255 / 0.2),
    inset 0 -2px 4px rgb(0 0 0 / 0.8);
  border: 1px solid rgb(255 255 255 / 0.04);
}
@media (min-width: 768px) {
  .main-card { width: 85vw; height: 85vh; border-radius: 40px; }
}

.card-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgb(255 255 255 / 0.06) 0%, transparent 40%);
  mix-blend-mode: screen;
}

.card-grid {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  z-index: 10;
  padding-block: 24px;
}
@media (min-width: 1024px) {
  .card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    padding-inline: 48px;
    padding-block: 0;
  }
}

/* min-width:0 ist hier entscheidend: Grid-/Flex-Items haben per Default ein
   implizites min-width:auto, das die Spalte auf die Breite des LÄNGSTEN
   ungebrochenen Inhalts erzwingt -- bei einem einzelnen langen Wort ohne
   Leerzeichen (NOTBETREUUNG, OFFLINE-VERFÜGBARKEIT) setzt das die Spalte
   breiter als vorgesehen und überschreibt damit faktisch jedes
   overflow-wrap/Schriftgrößen-Tuning, was zum wiederholt gemeldeten
   Abschneiden führte ("CSS Grid Blowout", bekannter Stolperstein). */
/* container-type:inline-size macht diese Spalte zum Bezugsrahmen für cqw
   weiter unten -- die Schriftgröße hängt dadurch direkt an der TATSÄCHLICH
   gerenderten Spaltenbreite statt an der Bildschirmbreite (vw). Ein
   vw-basierter Wert kann bei bestimmten Zwischenbreiten (abhängig davon, wie
   schnell Spalte vs. Viewport wachsen) danebenliegen; cqw kann das
   grundsätzlich nicht, weil es direkt am realen Container gemessen wird.
   Funktioniert nur, weil .card-right-text eine EXPLIZITE Breite hat
   (width:100% der Grid-/Flex-Spalte) statt selbst content-abhängig zu sein
   -- sonst gäbe es einen Zirkelbezug. */
.card-right-text { container-type: inline-size; order: 1; display: flex; justify-content: center; z-index: 20; width: 100%; max-width: 100%; min-width: 0; }
.card-right-text h2 {
  font-family: var(--kl-font-heading);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(1.75rem, 11cqw, 4rem);
  line-height: 1.05;
  margin: 0;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #FFFFFF 0%, #A1A1AA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 12px 24px rgb(0 0 0 / 0.8)) drop-shadow(0 4px 8px rgb(0 0 0 / 0.6));
}
/* Alle 5 Titel nutzen bewusst dieselbe Schriftgröße (siehe .card-right-text
   h2 oben) -- unterschiedliche Größen je nach Wortlänge sorgten beim
   Durchscrollen für einen unruhigen Größensprung zwischen den Slides. Die
   gemeinsame Größe ist so bemessen, dass auch das längste Wort
   (NOTBETREUUNG/VERFÜGBARKEIT) mit Sicherheitsabstand passt -- kürzere
   Wörter wie CHAT/DASHBOARD wirken dadurch bewusst nicht "maximal groß",
   aber konsistent. */
@media (min-width: 1024px) {
  .card-right-text { order: 3; justify-content: flex-end; }
}

.card-left-text {
  order: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  z-index: 20;
  width: 100%;
  min-width: 0;
  padding-inline: 16px;
}
.card-left-text h3 {
  font-family: var(--kl-font-heading);
  color: #fff;
  font-size: clamp(1.375rem, 2vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 0;
}
.card-left-text p {
  display: none;
  color: rgb(232 237 242 / 0.72);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 40ch;
  margin: 12px auto 0;
}
@media (min-width: 768px) { .card-left-text p { display: block; } }
@media (min-width: 1024px) {
  .card-left-text { order: 1; text-align: left; padding-inline: 0; }
  .card-left-text h3 { margin-bottom: 20px; }
  .card-left-text p { margin-inline: 0; max-width: none; }
}

/* ---------- iPhone-Mockup ---------- */
.mockup-scroll-wrapper {
  order: 2;
  position: relative;
  width: 100%;
  min-width: 0;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
@media (min-width: 1024px) { .mockup-scroll-wrapper { height: 600px; } }

.mockup-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.65);
}

/* perspective auf demselben Element wie ein transform:scale() zu setzen
   führt zu einer verzerrten (scherenartigen statt sauber verjüngenden)
   3D-Projektion -- deshalb ein eigenes Element NUR für die Perspektive,
   ohne eigenen Scale/Transform, direkt als Elternteil von .iphone-bezel. */
.iphone-stage {
  position: relative;
  perspective: 1000px;
}
@media (min-width: 768px) { .mockup-inner { transform: scale(0.85); } }
@media (min-width: 1024px) { .mockup-inner { transform: scale(1); } }

.iphone-bezel {
  position: relative;
  width: 280px;
  height: 580px;
  border-radius: 3rem;
  background-color: #111;
  transform-style: preserve-3d;
  box-shadow:
    inset 0 0 0 2px #52525B,
    inset 0 0 0 7px #000,
    0 40px 80px -15px rgb(0 0 0 / 0.9),
    0 15px 25px -5px rgb(0 0 0 / 0.7);
}

/* Beim Drehen (siehe cinematic-hero.js: rotationY "+=180" je Flip-Kapitel)
   werden echte Vorder-/Rückseite sichtbar statt eines flachen Karten-Flips:
   .screen ist die Vorderseite, .iphone-back die Rückseite mit Schlagwort.
   HINWEIS: Es gab hier zusätzlich zwei schmale Kanten-Elemente
   (.iphone-edge-left/-right) für eine Tiefen-Illusion -- die saßen aber
   sichtbar AUSSERHALB der bereits vorhandenen Hardware-Buttons (hb-1..4)
   und erzeugten dadurch eine zweite, dauerhaft sichtbare dünne Linie neben
   dem Telefon (genau die gemeldeten "Balken"), obwohl sie im Ruhezustand
   geometrisch schmal waren. Entfernt -- die echte Rückseite + korrekte
   perspektivische Verjüngung beim Drehen reichen für den 3D-Eindruck. */

.iphone-back {
  position: absolute;
  inset: 7px;
  border-radius: 2.5rem;
  overflow: hidden;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  background: linear-gradient(155deg, #1c1e24 0%, #0a0b0f 100%);
  box-shadow: inset 0 0 15px rgb(0 0 0 / 1), inset 0 0 0 1px rgb(255 255 255 / 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 20px;
}
/* Pro-Modell: Kamera-Insel mit 3 Linsen (Dreiecks-Layout) statt nur einer */
.iphone-back-cam {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: linear-gradient(155deg, #26282f 0%, #0a0b0f 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), 0 4px 10px rgb(0 0 0 / 0.5);
}
.iphone-back-lens {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #4a4d56 0%, #0a0b0f 72%);
  box-shadow: inset 0 0 0 2px #1a1b1f, inset 0 0 0 3px rgb(255 255 255 / 0.06), 0 1px 2px rgb(0 0 0 / 0.6);
}
.iphone-back-lens::after {
  content: "";
  position: absolute;
  top: 22%;
  left: 22%;
  width: 26%;
  height: 26%;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
}
.iphone-back-lens--1 { top: 6px; left: 6px; }
.iphone-back-lens--2 { top: 6px; right: 6px; }
.iphone-back-lens--3 { bottom: 6px; left: 6px; }
.iphone-back-cam-flash {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #d9dde3 0%, #6b6f78 100%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.3);
}
.iphone-back-mark {
  width: 34px;
  height: 34px;
  stroke: color-mix(in srgb, var(--kl-accent) 70%, white);
  opacity: 0.6;
}
.iphone-back-words {
  position: relative;
  width: 100%;
  flex: 1;
  max-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iphone-back-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-inline: 12px;
  opacity: 0;
  font-family: var(--kl-font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 7vw, 2.25rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--kl-accent);
}
.iphone-back-caption {
  color: rgb(255 255 255 / 0.35);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hardware-btn {
  position: absolute;
  background: linear-gradient(90deg, #404040 0%, #171717 100%);
  box-shadow: -2px 0 5px rgb(0 0 0 / 0.8), inset -1px 0 1px rgb(255 255 255 / 0.15), inset 1px 0 2px rgb(0 0 0 / 0.8);
}
.hb-1 { top: 120px; left: -3px; width: 3px; height: 25px; border-radius: 6px 0 0 6px; }
.hb-2 { top: 160px; left: -3px; width: 3px; height: 45px; border-radius: 6px 0 0 6px; }
.hb-3 { top: 220px; left: -3px; width: 3px; height: 45px; border-radius: 6px 0 0 6px; }
.hb-4 { top: 170px; right: -3px; width: 3px; height: 70px; border-radius: 0 6px 6px 0; }

.screen {
  position: absolute;
  inset: 7px;
  background: #050914;
  border-radius: 2.5rem;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: inset 0 0 15px rgb(0 0 0 / 1);
  color: #fff;
}
.screen-glare {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  backface-visibility: hidden;
  background: linear-gradient(110deg, rgb(255 255 255 / 0.08) 0%, rgb(255 255 255 / 0) 45%);
}
.dynamic-island {
  position: absolute;
  top: 5px;
  left: 50%;
  /* backface-visibility:hidden auf .screen allein reicht nicht: Kindelemente
     mit eigenem z-index (hier: 50) bekommen in manchen Browsern einen
     eigenen Compositing-Layer, der die geerbte Rückseiten-Ausblendung des
     Elternteils umgeht -- deshalb hier zusätzlich explizit gesetzt, sonst
     scheint die Dynamic Island auf der Rückseite (Schlagwort-Ansicht) durch. */
  backface-visibility: hidden;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 999px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-inline: 12px;
}
.island-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--kl-status-present);
  box-shadow: 0 0 8px rgb(30 123 79 / 0.8);
}

/* ---------- App-Slides: illustrierte Screens (Dashboard/Notbetreuung/Chat/
   Neuigkeiten/Offline) ---------- */
/* Bewusst KEINE Fotos/Screenshots: alle 5 Screens nutzen dieselbe
   "geschwärzte Karten"-Bildsprache wie ursprünglich nur die Offline-Seite —
   Layout/Inhalt an den echten Screens orientiert, aber ohne echte oder
   erfundene Kind-/Elterndaten in einem Marketing-Bild zu zeigen. Konsistent
   über alle Slides statt Sonderfall nur bei Offline. */
.app-slides { position: relative; width: 100%; height: 100%; }
.app-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  backface-visibility: hidden;
}
.app-slide.is-active { opacity: 1; }

.app-slide-illustrated {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 88px 20px 32px;
  background: #050914;
}

.illus-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--illus-tint, var(--kl-status-sick)) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--illus-tint, var(--kl-status-sick)) 40%, transparent);
  color: color-mix(in srgb, var(--illus-tint, var(--kl-status-sick)) 70%, white);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.illus-badge svg { width: 14px; height: 14px; }
.illus-badge--present { --illus-tint: var(--kl-status-present); }
.illus-badge--accent { --illus-tint: var(--kl-accent); }
.illus-badge--info { --illus-tint: var(--kl-status-excused); }

.illus-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.04) 0%, rgb(255 255 255 / 0.01) 100%);
  border: 1px solid rgb(255 255 255 / 0.03);
}
.illus-avatar {
  width: 40px; height: 40px; border-radius: 999px; flex-shrink: 0;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.1);
}
.illus-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.redact-bar {
  display: block;
  height: 10px;
  border-radius: 4px;
  background-color: #3a4150;
  background-image: repeating-linear-gradient(45deg, rgb(0 0 0 / 0.18) 0 4px, transparent 4px 8px);
}
.redact-lg { width: 78%; }
.redact-sm { width: 45%; }
.illus-status-dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; background: var(--kl-status-present); box-shadow: 0 0 8px color-mix(in srgb, var(--kl-status-present) 70%, transparent); }
.illus-status-dot--present { background: var(--kl-status-present); box-shadow: 0 0 8px color-mix(in srgb, var(--kl-status-present) 70%, transparent); }
.illus-status-dot--excused { background: var(--kl-status-excused); box-shadow: 0 0 8px color-mix(in srgb, var(--kl-status-excused) 70%, transparent); }
.illus-status-dot--sick { background: var(--kl-status-sick); box-shadow: 0 0 8px color-mix(in srgb, var(--kl-status-sick) 70%, transparent); }

.illus-footnote {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a9b6c4;
  font-size: 0.6875rem;
  font-weight: 600;
}
.illus-footnote svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Notbetreuung: Wochenstreifen (rein illustrativ, keine Randzeiten/Ferien-
   Details — Fokus liegt auf "je Einrichtung individuell einstellbar") */
.week-strip { display: flex; gap: 6px; margin-bottom: 4px; }
.week-chip {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6875rem; font-weight: 700;
  color: var(--cine-text-muted);
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.08);
}
.week-chip.is-active {
  color: #fff;
  background: color-mix(in srgb, var(--kl-accent) 26%, transparent);
  border-color: color-mix(in srgb, var(--kl-accent) 45%, transparent);
}

/* Chat: Sprechblasen mit geschwärztem Inhalt statt erfundener Dialoge */
/* .chat-bubble bekommt bewusst eine FESTE Breite (nicht nur max-width): als
   Flex-Item ohne eigene Breite wird eine Bubble sonst auf ihren Inhalt
   geschrumpft ("shrink-to-fit") -- die .redact-bar-Kinder haben aber selbst
   eine Prozentbreite relativ zur Bubble, was zu einer zirkulären Berechnung
   führt (Bubble schrumpft auf ~0, weil ihr einziger Inhalt prozentual von
   ihrer eigenen, noch unbekannten Breite abhängt) und die Bubble/Balken auf
   praktisch nichts zusammenfallen ließ. */
.chat-bubble-row { display: flex; }
.chat-bubble-row.is-sent { justify-content: flex-end; }
.chat-bubble {
  width: 190px;
  max-width: 74%;
  padding: 10px 14px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.06);
}
.chat-bubble--w-sm { width: 120px; }
.chat-bubble--w-md { width: 160px; }
.chat-bubble .redact-bar { background-color: rgb(255 255 255 / 0.16); }
.chat-bubble--sent {
  background: color-mix(in srgb, var(--kl-accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--kl-accent) 38%, transparent);
}
.chat-bubble--sent .redact-bar { background-color: color-mix(in srgb, var(--kl-accent) 55%, white); }

/* ---------- Rechter/linker Text je Slide (gestapelt, nur .is-active per
   Default sichtbar -- der Wechsel darüber hinaus läuft komplett über
   GSAP-Opacity-Tweens in cinematic-hero.js, die Klasse ".is-active" bleibt
   dabei absichtlich dauerhaft auf Slide 0 stehen und wird NICHT umgeschaltet
   [nur für No-JS/Erstanstrich relevant]. Wichtig: KEIN Slide-Element darf
   dafür "position:relative" bekommen -- sonst hängt die Boxhöhe des ganzen
   Containers dauerhaft an Slide 0s (kürzestem) Text und schneidet längere
   Inhalte anderer Slides oben/unten ab (genau der Bug, der hier gefixt
   wurde). Stattdessen bekommen die Container selbst ein großzügiges
   min-height, das für den 2-zeiligen Offline-Titel/die längsten Fließtexte
   reicht -- ab 1024px übernimmt ohnehin das CSS-Grid-Stretching. ---------- */
.card-right-text { position: relative; min-height: clamp(4.5rem, 10vw, 8.5rem); }
.slide-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.slide-title.is-active { opacity: 1; }
@media (min-width: 1024px) { .slide-title { justify-content: flex-end; } }

.card-left-text { position: relative; min-height: clamp(9rem, 22vw, 13rem); }
.slide-copy { position: absolute; inset: 0; opacity: 0; }
.slide-copy.is-active { opacity: 1; }

/* ---------- Floating Badges ---------- */
/* 5 Varianten je Position (top/bottom), passend zum jeweiligen Slide-Inhalt.
   Alle Varianten einer Position teilen sich dieselben top/left-Koordinaten
   (echtes Stapeln wie bei .slide-title/.slide-copy) — nur .is-active ist
   sichtbar, die Flip-Kapitel in cinematic-hero.js blenden bei jedem
   Wechsel animiert aus/ein statt hart umzuschalten. */
.floating-badge {
  position: absolute;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.08) 0%, rgb(255 255 255 / 0.01) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 25px 50px -12px rgb(0 0 0 / 0.8), inset 0 1px 1px rgb(255 255 255 / 0.2);
  opacity: 0;
}
.floating-badge.is-active { opacity: 1; }
.badge-icon { width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 1rem; background: color-mix(in srgb, var(--kl-accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--kl-accent) 35%, transparent); flex-shrink: 0; }
.badge-title { color: #fff; font-size: 0.8125rem; font-weight: 700; margin: 0; white-space: nowrap; }
.badge-sub { color: rgb(232 237 242 / 0.55); font-size: 0.6875rem; font-weight: 500; margin: 2px 0 0; white-space: nowrap; }
.badge-top { top: 24px; left: -10px; }
.badge-bottom { bottom: 48px; right: -10px; }
@media (min-width: 1024px) {
  .badge-top { top: 48px; left: -70px; }
  .badge-bottom { bottom: 80px; right: -70px; }
}

/* ---------- Vereinfachte Fade-Variante (Mobile / reduced-motion) ---------- */
/* Wird per JS über die Klasse "cinematic-static" auf <html> aktiviert, statt
   des Scroll-Pins — Inhalt läuft in normaler Dokumentfluss-Reihenfolge mit
   den bestehenden .reveal-Fade-Klassen aus main.js/style.css durch. */
html.cinematic-static .cinematic-container {
  height: auto;
  min-height: 100vh;
  flex-direction: column;
  padding-block: 56px 40px;
  gap: 48px;
}
html.cinematic-static .hero-text-wrapper,
html.cinematic-static .cta-wrapper {
  position: relative;
  width: auto;
}
html.cinematic-static .main-card-wrapper { position: relative; inset: auto; }
html.cinematic-static .main-card { width: 100%; height: auto; min-height: 640px; border-radius: 28px; }
html.cinematic-static .card-grid { padding-block: 32px; }
html.cinematic-static .cta-wrapper { order: 3; }

.cinematic-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--kl-ease-out), transform 700ms var(--kl-ease-out);
  visibility: visible !important;
}
.cinematic-fade-visible { opacity: 1; transform: translateY(0); }
