/* Hero: scroll-gesteuerter 3D Product Showcase
   Höhe des Hero = Scroll-Strecke der Drehung. Die Bühne bleibt per sticky im Viewport. */

.xv {
  position: relative; height: 460vh; --hh: 76px;
  margin-top: calc(var(--hh) * -1); /* Hero beginnt unter dem transparenten Header: Bühne ist sofort komplett sichtbar */
  /* Dunkle Bühne passend zur Bildwelt (Graphit, nie reines Schwarz) */
  background: radial-gradient(90% 70% at 72% 45%, #1c1e31 0%, #121320 55%, #0e0f18 100%);
  color: #a9acc2;
}
.xv h1 { color: #f4f5fa; }
.xv .lead { color: #a9acc2; }
.xv .btn--ghost { color: #fff; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.xv .btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .32); }
.xv .status { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); color: #d8dae6; }
.xv .hero__glow { opacity: .8; }

.xv__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  padding-top: var(--hh);
  overflow: hidden;
  display: flex; align-items: center;
}
.xv__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  height: 100%;
}
.xv__copy { max-width: 36rem; }
.xv__copy h1 { font-size: clamp(2.2rem, 4.4vw, 3.9rem); line-height: 1.06; }
.xv__copy .eyebrow { letter-spacing: .24em; line-height: 1.5; }
.xv__copy .lead { margin: 22px 0 30px; max-width: 32em; }

/* Einstieg beim Laden (einmalig, danach bleibt der Text stehen) */
.xv-in { opacity: 0; transform: translateY(18px); animation: xvIn .9s var(--ease) forwards; }
.xv-in:nth-child(2) { animation-delay: .08s; }
.xv-in:nth-child(3) { animation-delay: .16s; }
.xv-in:nth-child(4) { animation-delay: .24s; }
.xv-in:nth-child(5) { animation-delay: .32s; }
@keyframes xvIn { to { opacity: 1; transform: none; } }

/* Bühne mit 3D-Canvas */
.xv__stage { position: relative; height: 100%; min-height: 0; }
.xv__stage::after { /* weicher Lichtboden unter dem Gerät */
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 1%; height: 60px;
  background: radial-gradient(closest-side, rgba(141, 99, 232, .28), rgba(2, 220, 253, .06) 60%, transparent);
  pointer-events: none;
}
.xv__3d { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.xv__canvas { display: block; width: 100%; height: 100%; }
.xv--3d .xv__3d { opacity: 1; }

/* Standbild-Rückfall (kein WebGL, Datensparmodus, Ladefehler) */
.xv__still { position: absolute; inset: 0; display: none; }
.xv__still img { width: 100%; height: 100%; object-fit: contain; }
.xv--no3d .xv__still { display: block; }
.xv--no3d .xv__cue { display: none; }

/* Scroll-Hinweis mit Fortschrittsleiste */
.xv__cue {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  font: 500 12px/1 var(--f-display); color: #8d90a8; white-space: nowrap;
}
.xv__cue-rail { width: 96px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.xv__cue-fill { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(var(--p, 0)); }
.xv__cue-text { transition: opacity .5s var(--ease); }
.xv.is-moving .xv__cue-text { opacity: 0; }

/* Tablet/Handy: Text oben, Gerät darunter */
@media (max-width: 900px) {
  .xv { height: 320vh; --hh: 64px; }
  .xv__sticky { align-items: stretch; }
  .xv__grid { display: block; position: relative; padding-top: 12px; padding-bottom: 4px; }
  .xv__copy { position: relative; z-index: 2; will-change: transform, opacity; }
  .xv__copy h1 { font-size: clamp(1.7rem, 7.2vw, 2.6rem); }
  .xv__copy .eyebrow { font-size: .66rem; letter-spacing: .18em; margin-bottom: 10px; }
  .xv__copy .lead { font-size: .95rem; line-height: 1.5; margin: 10px 0 14px; }
  .xv__copy .status { display: none; }
  .hero__actions .btn { --pad: 12px 18px; font-size: .92rem; }
  .xv__stage { position: absolute; inset: 0; height: auto; overflow: hidden; } /* ganze Fläche: das Gerät kann wachsen, sobald der Text weggleitet */
  .xv__cue { bottom: 2px; }
}
@media (max-width: 720px) {
  .xv__sticky { padding-bottom: 58px; } /* Platz für die Schnellleiste (schwebt, darf leicht überlappen) */
}
@media (max-height: 560px) and (min-width: 901px) { .xv__cue { display: none; } }

/* Statische Version (reduzierte Bewegung, Datensparmodus): kein Pinning, ruhige Schrägansicht */
.xv--static { height: auto; margin-top: 0; }
.xv--static .xv__sticky { position: relative; height: auto; min-height: 640px; padding-top: 0; padding-block: 48px; }
.xv--static .xv__stage { height: 560px; }
.xv--static .xv__cue { display: none; }
@media (max-width: 900px) {
  .xv--static .xv__sticky { min-height: 0; padding-bottom: 32px; }
  .xv--static .xv__stage { position: relative; inset: auto; height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  .xv-in { opacity: 1; transform: none; animation: none; }
}
