/* =============================================================
   wow.css — Runde 23.09.2026
   Schaufenster (Laptop + Handy), Bilder im Betreuungs-Abschnitt,
   heller Vergleich, weiche Seitenwechsel.
   Liegt getrennt von seite.css, damit diese Runde als Ganzes
   abschaltbar bleibt: Zeile in teile.py raus, fertig.
   ============================================================= */

/* ---------- Weiche Seitenwechsel (Chrome, Edge, Safari 18.2+) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-raus 260ms cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-rein 420ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes vt-raus { to { opacity: 0; transform: scale(0.985); filter: blur(4px); } }
@keyframes vt-rein { from { opacity: 0; transform: scale(1.01); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* =============================================================
   Schaufenster
   ============================================================= */
.schaufenster { --sf-p: 0; --mx: 0; --my: 0; position: relative; }

.sf-reiter {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.sf-reiter button {
  position: relative; overflow: hidden;
  min-height: 44px; padding: 0 1.15rem;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: color-mix(in oklab, var(--bg-elevated) 70%, transparent);
  color: var(--muted); font: 500 0.92rem/1 var(--font-sans); cursor: pointer;
  transition: color 250ms ease, background 250ms ease, border-color 250ms ease;
}
.sf-reiter button:hover { color: var(--fg); }
.sf-reiter button[aria-selected="true"] { color: var(--fg); border-color: color-mix(in oklab, var(--accent) 60%, transparent); }
/* Der laufende Balken im aktiven Reiter zeigt, wann gewechselt wird. */
.sf-reiter button::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent); box-shadow: 0 0 12px var(--glow);
  transform-origin: left; transform: scaleX(0);
}
.sf-reiter button[aria-selected="true"]::after { transform: scaleX(var(--sf-lauf, 0)); }

.sf-buehne {
  position: relative;
  max-width: 64rem; margin-inline: auto;
  padding: 0 0 clamp(2rem, 6vw, 4rem);
  perspective: 1800px;
}
/* Das Licht hinter den Geraeten waechst mit dem Hereinscrollen. */
.sf-buehne::before {
  content: ""; position: absolute; inset: -10% -5% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 45% 55%, rgba(103, 232, 249, 0.22), transparent 70%),
    radial-gradient(ellipse 30% 25% at 80% 75%, rgba(34, 211, 238, 0.16), transparent 70%);
  opacity: calc(0.25 + 0.75 * var(--sf-p));
  filter: blur(10px);
}

.sf-laptop {
  width: 86%;
  transform-origin: 50% 100%;
  transform:
    rotateX(calc((1 - var(--sf-p)) * 34deg + var(--my) * -3deg))
    rotateY(calc(var(--mx) * 5deg + var(--nx, 0) * 7deg))
    scale(calc(0.86 + 0.14 * var(--sf-p)));
  will-change: transform;
}
.sf-deckel {
  position: relative;
  padding: 2.1% 2.1% 2.6%;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #151923, #0a0c11);
  border: 1px solid rgba(232, 238, 245, 0.14);
  box-shadow:
    0 50px 90px -40px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 60px -10px rgba(103, 232, 249, calc(0.08 + 0.18 * var(--sf-p)));
}
.sf-deckel::before { /* Kamera */
  content: ""; position: absolute; top: 0.8%; left: 50%; width: 6px; height: 6px;
  margin-left: -3px; border-radius: 50%; background: #1f2530;
}
.sf-schirm {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10; border-radius: 6px; background: #05060a;
}
.sf-schirm::after, .sf-handy-schirm::after { /* Glanz */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 38%);
}
.sf-boden {
  position: relative; height: clamp(10px, 1.7vw, 20px); width: 112%; margin-left: -6%;
  border-radius: 2px 2px 16px 16px;
  background: linear-gradient(180deg, #2b303b 0%, #161a22 55%, #0b0d12 100%);
  box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.9);
}
.sf-boden::before { /* Griffmulde */
  content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 38%; margin-left: -8%;
  border-radius: 0 0 8px 8px; background: #10131a;
}

.sf-lauf {
  position: absolute; top: 0; left: 0; width: 100%; height: auto; max-width: none;
  opacity: 0; transition: opacity 700ms ease;
  will-change: transform, opacity;
}
.sf-lauf[data-aktiv="ja"] { opacity: 1; }

.sf-handy {
  position: absolute; right: 1%; bottom: 2%;
  width: 21%;
  padding: 1.9%;
  border-radius: 18% / 8.5%;
  background: linear-gradient(160deg, #1b202b, #07080c);
  border: 1px solid rgba(232, 238, 245, 0.18);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.95), 0 0 50px -12px rgba(103, 232, 249, 0.25);
  transform:
    translateY(calc((1 - var(--sf-p)) * 110px))
    rotate(calc(-7deg + var(--sf-p) * 4deg))
    rotateY(calc(var(--mx) * -9deg + var(--nx, 0) * -10deg));
  will-change: transform;
}
.sf-handy-schirm {
  position: relative; overflow: hidden;
  aspect-ratio: 9 / 19.5; border-radius: 14% / 6.5%; background: #05060a;
}
.sf-handy-schirm::before { /* Kamerainsel */
  content: ""; position: absolute; z-index: 3; top: 2.2%; left: 50%;
  width: 30%; height: 3.2%; margin-left: -15%; border-radius: 999px; background: #000;
}

.sf-unter { display: flex; justify-content: center; margin-top: 0.5rem; }

@media (max-width: 720px) {
  .sf-buehne { padding-bottom: 3.5rem; }
  .sf-laptop { width: 94%; }
  .sf-handy { width: 33%; right: -1%; bottom: -2%; }
  .sf-reiter button { padding: 0 0.95rem; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .schaufenster { --sf-p: 1 !important; }
  .sf-lauf { transition: none; }
}

/* =============================================================
   Betreuung: rechts ein Handy, das zeigt, was gerade gesagt wird
   ============================================================= */
.bt-bild {
  position: absolute; z-index: 1;
  top: 50%; right: max(var(--rand), calc((100vw - var(--breite)) / 2 + 1rem));
  width: clamp(250px, 23vw, 310px);
  transform: translateY(-46%) rotate(2deg);
  pointer-events: none;
}
.bt-handy {
  padding: 10px; border-radius: 42px;
  background: linear-gradient(160deg, #1b202b, #07080c);
  border: 1px solid rgba(232, 238, 245, 0.18);
  box-shadow: 0 50px 80px -40px rgba(0, 0, 0, 0.95), 0 0 70px -20px rgba(103, 232, 249, 0.3);
}
.bt-schirm {
  position: relative; overflow: hidden;
  aspect-ratio: 9 / 18.5; border-radius: 33px;
  background: radial-gradient(ellipse 120% 70% at 50% 0%, #0f2630 0%, #070a10 60%);
}
.bt-schirm::before {
  content: ""; position: absolute; z-index: 3; top: 12px; left: 50%;
  width: 30%; height: 20px; margin-left: -15%; border-radius: 999px; background: #000;
}
.bt-szene {
  position: absolute; inset: 0;
  padding: 48px 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-sans); color: var(--fg);
  opacity: 0; visibility: hidden;
  transition: opacity 450ms ease, visibility 0s linear 450ms;
}
.bt-bild[data-szene="0"] .bt-szene[data-n="0"],
.bt-bild[data-szene="1"] .bt-szene[data-n="1"],
.bt-bild[data-szene="2"] .bt-szene[data-n="2"],
.bt-bild[data-szene="3"] .bt-szene[data-n="3"] {
  opacity: 1; visibility: visible; transition: opacity 450ms ease, visibility 0s;
}
.bt-kopf {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.bt-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.bt-karte {
  padding: 12px 13px; border-radius: 16px;
  background: rgba(232, 238, 245, 0.06);
  border: 1px solid rgba(232, 238, 245, 0.1);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12.5px; line-height: 1.4;
}
.bt-name { font-family: var(--font-display); font-size: 18px; line-height: 1.15; }
.bt-sterne { margin-top: 4px; color: #f5c451; letter-spacing: 0.08em; font-size: 12px; }
.bt-sterne b { color: var(--fg); letter-spacing: 0; margin-left: 4px; }
.bt-klein { color: var(--muted); font-size: 11.5px; }
.bt-marke {
  display: inline-block; margin-bottom: 8px;
  padding: 3px 8px; border-radius: 999px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-fg); background: var(--accent);
}
.bt-foto {
  height: 74px; border-radius: 10px; margin-bottom: 8px;
  background:
    radial-gradient(ellipse 60% 80% at 70% 30%, rgba(255, 196, 120, 0.55), transparent 70%),
    linear-gradient(135deg, #3b2717, #6d4a2b 45%, #25170d);
}
.bt-balken { display: block; height: 6px; margin-top: 7px; border-radius: 4px; background: rgba(232, 238, 245, 0.14); }
.bt-balken.kurz { width: 60%; }
.bt-entwurf {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: 10px; font-size: 11px; color: var(--accent);
}
.bt-knopf {
  padding: 5px 10px; border-radius: 999px; font-weight: 500;
  color: var(--accent-fg); background: var(--accent);
  animation: bt-puls 1.8s ease-in-out infinite;
}
@keyframes bt-puls { 50% { box-shadow: 0 0 0 6px rgba(103, 232, 249, 0.18); } }
.bt-tippen { margin-top: 8px; font-size: 13px; color: var(--fg); }
.bt-tippen span {
  display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom;
  max-width: 0; border-right: 2px solid var(--accent);
}
.bt-bild[data-szene="1"] .bt-tippen span { animation: bt-tippen 1.6s steps(30, end) 350ms forwards, bt-cursor 0.8s step-end infinite; }
@keyframes bt-tippen { to { max-width: 100%; } }
@keyframes bt-cursor { 50% { border-color: transparent; } }
.bt-pfeil {
  align-self: center; font-size: 11px; color: var(--accent);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.bt-pfeil::before { content: ""; width: 1px; height: 18px; background: linear-gradient(to bottom, transparent, var(--accent)); }
.bt-zeile { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(232, 238, 245, 0.07); }
.bt-zeile:last-child { border-bottom: 0; }
.bt-zeile span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.bt-frisch { border-radius: 8px; }
.bt-bild[data-szene="1"] .bt-frisch { animation: bt-blitz 1.6s ease 2.3s both; }
@keyframes bt-blitz { 0% { background: transparent; } 25% { background: rgba(103, 232, 249, 0.28); } 100% { background: rgba(103, 232, 249, 0.08); } }
.bt-gruen {
  display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 8px #4ade80; vertical-align: 1px;
}
.bt-notiz ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11.5px; display: grid; gap: 3px; }
.bt-ordner ul, .bt-schluessel ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.bt-ordner li {
  padding: 7px 10px; border-radius: 10px; font-size: 12px;
  background: rgba(103, 232, 249, 0.08); border: 1px solid rgba(103, 232, 249, 0.2);
}
.bt-schluessel { border-color: rgba(103, 232, 249, 0.35); box-shadow: 0 0 30px -10px var(--glow); }

/* Auftritt der Karten in jeder Szene, nacheinander. */
.bt-a1, .bt-a2, .bt-a3, .bt-ordner li { opacity: 0; transform: translateY(14px) scale(0.98); }
.bt-bild[data-szene] .bt-szene .bt-a1,
.bt-bild[data-szene] .bt-szene .bt-a2,
.bt-bild[data-szene] .bt-szene .bt-a3,
.bt-bild[data-szene] .bt-szene .bt-ordner li { transition: opacity 500ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1); }
.bt-bild[data-szene="0"] [data-n="0"] :is(.bt-a1, .bt-a2, .bt-a3),
.bt-bild[data-szene="1"] [data-n="1"] :is(.bt-a1, .bt-a2, .bt-a3),
.bt-bild[data-szene="2"] [data-n="2"] :is(.bt-a1, .bt-a2, .bt-a3),
.bt-bild[data-szene="3"] [data-n="3"] :is(.bt-a1, .bt-a2, .bt-a3, .bt-ordner li) { opacity: 1; transform: none; }
.bt-szene .bt-a2 { transition-delay: 220ms !important; }
.bt-szene .bt-a3 { transition-delay: 440ms !important; }
.bt-szene .bt-ordner li:nth-child(1) { transition-delay: 350ms !important; }
.bt-szene .bt-ordner li:nth-child(2) { transition-delay: 480ms !important; }
.bt-szene .bt-ordner li:nth-child(3) { transition-delay: 610ms !important; }
.bt-szene .bt-ordner li:nth-child(4) { transition-delay: 740ms !important; }
.bt-szene[data-n="3"] .bt-a2 { transition-delay: 950ms !important; }

/* Rechner: Handy rechts neben den Tafeln. */
@media (max-width: 1023px) {
  .bt-bild { display: none; }
}
/* Telefon: kein Platz — die Tafeln fuellen die Buehne schon ganz. */

@media (prefers-reduced-motion: reduce) {
  .bt-a1, .bt-a2, .bt-a3, .bt-ordner li { opacity: 1; transform: none; transition: none !important; }
  .bt-tippen span { max-width: 100%; animation: none !important; border-right: 0; }
  .bt-knopf { animation: none; }
}

/* =============================================================
   Heller Abschnitt: der Vergleich mit dem Baukasten steht auf Papier.
   Einmal auf der Seite bricht die Nacht auf — das macht den Rest
   dunkler, nicht heller.
   ============================================================= */
.hell {
  --bg: #f3f1ec; --bg-elevated: #ffffff; --bg-subtle: #e9e6df;
  --fg: #12151b; --muted: #4c5460; --faint: #5a626e;
  --line: rgba(18, 21, 27, 0.12); --line-strong: rgba(18, 21, 27, 0.24);
  --accent: #0e7490; --accent-dim: #0e7490; --accent-fg: #ffffff; --glow: rgba(14, 116, 144, 0.2);
  position: relative; isolation: isolate;
  background: var(--bg); color: var(--fg);
  border-top: 0 !important;
}
.hell::before { /* Uebergang aus der Nacht */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 7rem; z-index: -1;
  background: linear-gradient(180deg, #05060a, rgba(243, 241, 236, 0));
  pointer-events: none;
}
.hell::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 7rem; z-index: -1;
  background: linear-gradient(0deg, #05060a, rgba(243, 241, 236, 0));
  pointer-events: none;
}
.hell .bahn { padding-block: clamp(6rem, 12vw, 9rem); }
.hell .kicker { color: var(--accent); }
.hell .h-mittel { color: var(--fg); }
.hell .tafel-tabelle th, .hell .tafel-tabelle td { color: var(--fg); border-color: var(--line); }
.hell .tafel-tabelle .text-leise { color: var(--muted); }

/* Vergleich: Zeile fuer Zeile. Der Baukasten wird durchgestrichen,
   dann steht da, wer es bei uns tut. */
.versus .vs-alt { position: relative; display: inline-block; }
.versus .vs-alt::after {
  content: ""; position: absolute; left: -3px; right: -3px; top: 54%; height: 1.5px;
  background: #c2410c; transform-origin: left; transform: scaleX(0);
  transition: transform 450ms cubic-bezier(0.65, 0, 0.35, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 250ms);
}
.versus td:nth-child(3) {
  font-weight: 500;
  opacity: 0; transform: translateX(-10px);
  transition: opacity 450ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 550ms);
}
.versus[data-sichtbar="ja"] .vs-alt::after { transform: scaleX(1); }
.versus[data-sichtbar="ja"] td:nth-child(3) { opacity: 1; transform: none; }
.hell .versus td:nth-child(3) { color: var(--accent); }

/* Telefon: jede Frage als Karte, beide Antworten nebeneinander —
   vorher musste man die Tabelle seitlich schieben. */
@media (max-width: 640px) {
  .versus { min-width: 0 !important; width: 100%; }
  .versus thead { display: none; }
  .versus, .versus tbody { display: block; }
  .versus tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1rem;
    padding: 0.95rem 0; border-bottom: 1px solid var(--line);
  }
  .versus th[scope="row"] { grid-column: 1 / -1; padding: 0; border: 0; font-weight: 500; }
  .versus td { padding: 0; border: 0; font-size: 0.95rem; }
  .versus td::before {
    content: attr(data-label); display: block; margin-bottom: 0.15rem;
    font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 400;
  }
}

@media (prefers-reduced-motion: reduce) {
  .versus td:nth-child(3) { opacity: 1; transform: none; transition: none; }
  .versus .vs-alt::after { transform: scaleX(1); transition: none; }
}
