/* schaubuehne.css — Showroom-Bühne im Kopf der Startseite, seit 07.11.2026 als 5-Auto-Karussell (Kopie automobile-kaddoura-buehne).
   Umschalter Video ↔ Bühne über ?kopf=video|buehne (html[data-kopf-modus]). Farben nur aus den themenfesten Tokens der Demo
   (--dunkel-fest, --nacht-fest, --kalk-fest, --meta-fest, --akzent) — die Bühne ist dunkel in beiden Themen.
   Bewegt werden nur transform / opacity / filter (3d-guardrail sinngemäß). */

.schau {
  display: none;
}
html[data-kopf-modus="buehne"] .kopf-rahmen--start .kopf__medium {
  display: none;
}
html[data-kopf-modus="buehne"] .kopf-rahmen--start .schau {
  display: block;
}

/* ── Umschalter (Pille) ─────────────────────────────────────────── */
.kopf-umschalter {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: calc(var(--leiste-h, 80px) + 0.65rem);
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--nacht-fest) 78%, transparent);
  border: 1px solid color-mix(in oklch, var(--kalk-fest) 16%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font: 600 0.75rem/1 var(--font-text);
  letter-spacing: 0.02em;
}
/* PC: über dem Video oben mittig (die Fläche beginnt unter der Kopfleiste), auf der Bühne unten links — dort kreuzt keine Karte */
@media (min-width: 861px) {
  .kopf-umschalter--video {
    top: 0.75rem;
  }
  .kopf-umschalter--buehne {
    top: auto;
    bottom: 0.6rem;
    left: clamp(0.75rem, 2vw, 1.5rem);
    transform: none;
  }
}
.kopf-umschalter a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.95rem;
  border-radius: 999px;
  color: var(--meta-fest);
  text-decoration: none;
  white-space: nowrap;
}
.kopf-umschalter a[aria-current="true"] {
  background: var(--kalk-fest);
  color: var(--nacht-fest);
}
.kopf-umschalter a:focus-visible {
  outline: 2px solid var(--kalk-fest);
  outline-offset: 2px;
}

/* ── Bühne: Raum ────────────────────────────────────────────────── */
.schau {
  position: relative;
  overflow: hidden;
  container-type: size;
  color: var(--kalk-fest);
  --horizont: 57%;
  background:
    radial-gradient(
      60% 55% at 50% 100%,
      color-mix(in oklch, var(--kalk-fest) 7%, transparent),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      var(--dunkel-fest) 0%,
      var(--nacht-fest) var(--horizont),
      color-mix(in oklch, var(--nacht-fest) 70%, black) 100%
    );
}
/* Rückwand: ein durchgehender Raum — die senkrechten Paneel-Fugen sind raus (Hamada 07.11. 08:24);
   die rote Lichtfuge der Marke am Wandfuß bleibt */
.schau__wand {
  display: none;
}
.schau__fuge {
  position: absolute;
  left: 6%;
  right: 6%;
  top: var(--horizont);
  height: 1px;
  pointer-events: none;
  transform-origin: 50% 50%;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in oklch, var(--akzent) 85%, transparent) 20%,
    color-mix(in oklch, var(--akzent) 85%, transparent) 80%,
    transparent
  );
  box-shadow: 0 0 18px 1px color-mix(in oklch, var(--akzent) 45%, transparent);
  opacity: 0.75;
}
/* Boden: polierter Estrich — leichte Tiefe nach vorn */
.schau__boden {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--horizont);
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    color-mix(in oklch, var(--kalk-fest) 4%, transparent),
    transparent 35%
  );
}

/* ── Plätze: 5-Auto-Karussell (07.11.2026) ──────────────────────────
   Jeder Platz steht unten mittig und wird nur per transform auf seine Lage der Drehscheibe geschoben.
   schaubuehne.js schreibt je Bild --px (PC: Breiten des vorderen Autos, Handy: cqw), --py (cqh), --s, --ry (Grad),
   --p-hell, --p-licht, --p-op und die Ebene.
   Die Startlagen unten (data-i) entsprechen genau dem ersten Bild des Skripts — nichts springt beim Laden. */
.schau__platz {
  position: absolute;
  display: block;
  text-decoration: none;
  color: inherit;
  left: 50%;
  bottom: var(--basis, 9%);
  width: calc(var(--breite, 36cqw) * var(--lf, 1));
  transform: translateX(-50%)
    translate3d(
      calc(var(--px, 0) * var(--px-e, 1cqw)),
      calc(var(--py, 0) * -1cqh),
      0
    )
    scale(var(--s, 1));
  transform-origin: 50% 100%;
  opacity: var(--p-op, 1);
  z-index: var(--z, 1);
  --hell: var(--p-hell, 1);
  --licht: var(--p-licht, 0.8);
  -webkit-tap-highlight-color: transparent;
}
.schau__platz:focus {
  outline: none;
}
.schau__platz:focus-visible .schau__auto {
  outline: 2px solid var(--kalk-fest);
  outline-offset: 6px;
  border-radius: 4px;
}
.schau__auto {
  position: relative;
  display: block;
  z-index: 2;
  /* leichte Drehung der seitlichen Autos auf der Scheibe */
  transform: perspective(1400px) rotateY(calc(var(--ry, 0) * 1deg));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.schau__auto img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-box-reflect: below -3px
    linear-gradient(transparent 62%, rgba(0, 0, 0, 0.2));
  filter: brightness(var(--hell, 1)) saturate(var(--satt, 1));
  transition: filter 0.3s ease;
}
/* Lichtkegel von oben (unverändert aus der Probe — das neue Rampenlicht kommt separat) */
.schau__kegel {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 2%;
  width: 230%;
  height: 100cqh;
  transform: translateX(-50%);
  pointer-events: none;
  background: conic-gradient(
    at 50% 0%,
    transparent 0deg 150deg,
    color-mix(in oklch, var(--kalk-fest) var(--kegel, 13%), transparent) 161deg
      199deg,
    transparent 210deg 360deg
  );
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 16%,
    rgba(0, 0, 0, 0.6) 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 16%,
    rgba(0, 0, 0, 0.6) 82%,
    transparent 100%
  );
  opacity: var(--licht, 0.8);
  transition: opacity 0.3s ease;
}
.schau__kegel::after {
  content: "";
  position: absolute;
  inset: 18% 38% 20%;
  opacity: 0.55;
  background:
    radial-gradient(1.4px 1.4px at 20% 30%, var(--kalk-fest), transparent 70%),
    radial-gradient(1px 1px at 62% 18%, var(--kalk-fest), transparent 70%),
    radial-gradient(1.2px 1.2px at 44% 62%, var(--kalk-fest), transparent 70%),
    radial-gradient(1px 1px at 78% 48%, var(--kalk-fest), transparent 70%),
    radial-gradient(1.3px 1.3px at 30% 80%, var(--kalk-fest), transparent 70%);
  animation: schau-staub 16s linear infinite;
}
@keyframes schau-staub {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-14%);
  }
}
.schau__pfuetze {
  position: absolute;
  z-index: 0;
  left: -14%;
  right: -14%;
  bottom: -9%;
  height: 34%;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    color-mix(in oklch, var(--kalk-fest) 22%, transparent),
    transparent
  );
  opacity: var(--licht, 0.8);
  transition: opacity 0.3s ease;
}
.schau__schatten {
  position: absolute;
  z-index: 1;
  left: 4%;
  right: 2%;
  bottom: -3.5%;
  height: 13%;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(0, 0, 0, 0.82),
    rgba(0, 0, 0, 0.35) 60%,
    transparent
  );
}

/* Karte (PC): über dem Dach des VORDEREN Autos */
.schau__karte {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(100% + 0.9rem);
  transform: translate(-50%, 8px) scale(calc(1 / var(--s, 1)));
  transform-origin: 50% 100%;
  width: max-content;
  max-width: min(22rem, 70cqw);
  padding: 0.75rem 1rem 0.8rem;
  border-radius: calc(var(--radius) + 6px);
  text-align: left;
  background: color-mix(in oklch, var(--nacht-fest) 82%, transparent);
  border: 1px solid color-mix(in oklch, var(--kalk-fest) 14%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.schau__modell {
  display: block;
  font: 700 0.98rem/1.2 var(--font-display);
  font-stretch: var(--font-display-stretch);
  letter-spacing: -0.01em;
  color: var(--kalk-fest);
}
.schau__daten {
  display: block;
  margin-top: 0.3rem;
  font: 500 0.8rem/1.35 var(--font-text);
  color: var(--meta-fest);
  font-variant-numeric: tabular-nums;
}
.schau__preis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.55rem;
  font: 700 1.05rem/1 var(--font-text);
  color: var(--kalk-fest);
  font-variant-numeric: tabular-nums;
}
.schau__mehr {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: 600 0.78rem/1 var(--font-text);
  color: var(--kalk-fest);
  opacity: 0.85;
}
.schau__mehr svg {
  width: 14px;
  height: 14px;
}

.schau__symbol {
  position: absolute;
  z-index: 60;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: 0.45rem;
  font: 500 0.625rem/1 var(--font-text);
  letter-spacing: 0.04em;
  color: var(--meta-fest);
  opacity: 0.45;
  pointer-events: none;
}

/* Handy-Infoleiste (nur ≤ 860 px sichtbar) */
.schau__info {
  display: none;
}

/* ── Vorderes Auto ──────────────────────────────────────────────── */
.schau__platz.ist-vorn {
  --kegel: 19%;
}
.schau__platz.ist-vorn .schau__karte {
  opacity: 1;
  transform: translate(-50%, 0) scale(calc(1 / var(--s, 1)));
}
/* Hover (nur echte Maus): Auto hebt sich und wird heller */
@media (hover: hover) and (pointer: fine) {
  .schau__platz:hover .schau__auto {
    transform: translateY(-4%) perspective(1400px)
      rotateY(calc(var(--ry, 0) * 1deg));
  }
  .schau__platz:hover {
    --hell: calc(var(--p-hell, 1) + 0.22);
    --licht: calc(var(--p-licht, 0.8) + 0.25);
  }
  .schau__platz {
    cursor: pointer;
  }
}

/* ── Vorlauf (Licht geht an) — nur mit Bewegung ─────────────────── */
.schau.schau--vorlauf .schau__fuge {
  transform: scaleX(0);
  opacity: 0;
}
.schau__fuge {
  transition:
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.8s ease;
}
.schau.schau--an .schau__auto img,
.schau.schau--an .schau__kegel,
.schau.schau--an .schau__pfuetze {
  transition-duration: 1.2s;
  transition-delay: 0.4s;
}
.schau.schau--an .schau__platz[data-i="0"] .schau__auto img,
.schau.schau--an .schau__platz[data-i="0"] .schau__kegel,
.schau.schau--an .schau__platz[data-i="0"] .schau__pfuetze {
  transition-delay: 0.9s;
}

/* ── PC / Tablet quer: Drehscheibe als Ellipse von leicht oben, vorn groß ── */
@media (min-width: 861px) {
  html[data-kopf-modus="buehne"]
    .kopf-rahmen--start
    .kopf--k1[data-kopf-ganz~="pc"]
    .schau {
    flex: 1 1 calc(100vw / 1.95);
    min-height: clamp(20rem, 46svh, 40rem);
    width: 100%;
  }
  html[data-kopf-modus="buehne"]
    .kopf-rahmen--start
    .kopf--k1:not([data-kopf-ganz~="pc"])
    .schau {
    position: absolute;
    inset: 0;
  }
  .schau {
    --basis: 3%;
  }
  /* vorderes Auto ~45 % der Breite, höhenbegrenzt; px der Lagen in Breiten des vorderen Autos */
  .schau__platz {
    --breite: min(45cqw, 112cqh);
    --px-e: var(--breite);
  }
  /* flache Bühnen (iPad quer, Laptop): etwas kleiner, damit die Karte über dem Dach in der Bühne bleibt */
  @container (max-height: 440px) {
    .schau__platz {
      --breite: min(45cqw, 96cqh);
    }
  }
  /* Startlagen = erstes Bild von schaubuehne.js (LAGE_PC) */
  .schau__platz[data-i="0"] {
    --px: 0;
    --py: 0;
    --s: 1;
    --p-hell: 1.05;
    --p-licht: 1;
    --z: 50;
  }
  .schau__platz[data-i="1"],
  .schau__platz[data-i="4"] {
    --px: 0.8;
    --py: 15;
    --s: 0.64;
    --ry: -10;
    --p-hell: 0.55;
    --p-licht: 0.24;
    --z: 38;
  }
  .schau__platz[data-i="4"] {
    --px: -0.8;
    --ry: 10;
  }
  .schau__platz[data-i="2"],
  .schau__platz[data-i="3"] {
    --px: 0.48;
    --py: 40;
    --s: 0.47;
    --ry: -5;
    --p-hell: 0.32;
    --p-licht: 0.06;
    --z: 26;
  }
  .schau__platz[data-i="3"] {
    --px: -0.48;
    --ry: 5;
  }
}

/* ── Handy / schmal: Hauptmotiv mittig, die Nachbarn warten am Rand ── */
@media (max-width: 860px) {
  html[data-kopf-modus="buehne"] .kopf-rahmen--start .kopf--k1 .schau {
    height: clamp(25rem, 62svh, 34rem);
    width: 100%;
  }
  .schau {
    --horizont: 54%;
    --basis: 31%;
    --breite: min(80vw, 30rem);
  }
  .schau__platz[data-i="0"] {
    --px: 0;
    --py: 0;
    --s: 1;
    --p-hell: 1.04;
    --p-licht: 1;
    --z: 50;
  }
  .schau__platz[data-i="1"],
  .schau__platz[data-i="4"] {
    --px: 62;
    --py: 5;
    --s: 0.62;
    --p-hell: 0.4;
    --p-licht: 0.18;
    --z: 38;
    --satt: 0.8;
  }
  .schau__platz[data-i="4"] {
    --px: -62;
  }
  .schau__platz[data-i="2"],
  .schau__platz[data-i="3"] {
    --px: 96;
    --py: 9;
    --s: 0.45;
    --p-op: 0;
    --z: 26;
    visibility: hidden;
  }
  .schau__platz[data-i="3"] {
    --px: -96;
  }
  .schau__karte {
    display: none;
  }
  .schau__info {
    display: grid;
    position: absolute;
    z-index: 55;
    left: var(--rand, 1.25rem);
    right: var(--rand, 1.25rem);
    bottom: 2.4rem;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 0.35rem 1rem;
  }
  .schau__info .schau__modell {
    grid-column: 1;
    font-size: 1.02rem;
  }
  .schau__info .schau__daten {
    grid-column: 1;
    margin-top: 0;
  }
  .schau__info .schau__preis {
    grid-column: 1;
    margin-top: 0.15rem;
  }
  .schau__ansehen {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: end;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0 1.1rem;
    border-radius: 999px;
    background: var(--akzent);
    color: var(--auf-akzent);
    font: 700 0.9rem/1 var(--font-text);
    text-decoration: none;
    white-space: nowrap;
  }
  .schau__ansehen svg {
    width: 16px;
    height: 16px;
  }
  .schau__punkte {
    position: absolute;
    z-index: 55;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
  }
  .schau__punkte button {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    width: 28px;
    height: 24px;
    display: grid;
    place-items: center;
    cursor: pointer;
  }
  .schau__punkte button::before {
    content: "";
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: color-mix(in oklch, var(--kalk-fest) 30%, transparent);
    transition:
      background 0.3s ease,
      width 0.3s ease;
  }
  .schau__punkte button[aria-current="true"]::before {
    background: var(--kalk-fest);
    width: 24px;
  }
  .schau__symbol {
    bottom: 0.35rem;
    right: var(--rand, 1.25rem);
  }
  .kopf-umschalter {
    top: calc(var(--leiste-h, 72px) + 0.4rem);
    z-index: 60;
  }
}
.schau__punkte {
  display: none;
}
@media (max-width: 860px) {
  .schau__punkte {
    display: flex;
  }
}
/* Handy quer: Auto kleiner (Dach unter der Kopfleiste), Nachbarn näher (LAGE_QUER), Infozeile kompakt links —
   rechts unten liegt der Schnellkontakt der Seite */
@media (max-width: 860px) and (max-height: 500px) {
  .schau {
    --basis: 30%;
    --breite: min(80vw, 30rem, 62cqh);
  }
  .schau__platz[data-i="1"] {
    --px: 38;
  }
  .schau__platz[data-i="4"] {
    --px: -38;
  }
  .schau__platz[data-i="2"] {
    --px: 70;
  }
  .schau__platz[data-i="3"] {
    --px: -70;
  }
  .schau__info {
    right: auto;
    grid-template-columns: auto auto;
  }
}
.kopf-umschalter--buehne {
  z-index: 60;
}

/* Vorlauf zuletzt, damit er jede Lage schlägt */
.schau.schau--vorlauf .schau__platz[class] {
  --licht: 0;
  --hell: 0.14;
}

/* ── Ohne Bewegung: keine Drehung, Wechsel per Überblenden ───────── */
@media (prefers-reduced-motion: reduce) {
  .schau__auto,
  .schau__auto img,
  .schau__kegel,
  .schau__pfuetze,
  .schau__karte,
  .schau__fuge {
    transition: none !important;
  }
  .schau__platz {
    transition: opacity 0.18s ease;
  }
  .schau.schau--blende .schau__platz {
    opacity: 0;
  }
  .schau__kegel::after {
    animation: none;
  }
}
