/* ═══════════════════════════════════════════════════
   ÜBERGÄNGE — Scroll-Transitions · Styles
   Karten-Previews: prv-ue-*   Demo-Scopes: .demo-ue-<slug>
═══════════════════════════════════════════════════ */

/* ════════════════════════════════════════
   KARTEN-PREVIEWS (im hellen Grid)
════════════════════════════════════════ */
.prv-ue {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}
.prv-ue::after { /* feines Grid-Overlay */
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* 1 · Sticky-Cover */
.prv-ue-cover .pue-base { position: absolute; inset: 10px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.prv-ue-cover .pue-sheet {
  position: absolute; left: 16%; right: 16%; bottom: -8%; height: 66%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .45);
  animation: pueCover 3.2s cubic-bezier(.25, 1, .3, 1) infinite;
}
@keyframes pueCover { 0%, 12% { transform: translateY(70%); } 55%, 100% { transform: translateY(0); } }

/* 2 · Stacking Cards */
.prv-ue-stack .pue-c { position: absolute; left: 50%; width: 64%; height: 40%; border-radius: 10px; transform: translateX(-50%); }
.prv-ue-stack .pue-c1 { bottom: 14%; background: linear-gradient(135deg, var(--blue), var(--green)); z-index: 3; animation: pueStack1 3.4s ease-in-out infinite; }
.prv-ue-stack .pue-c2 { bottom: 26%; background: rgba(255, 255, 255, .22); z-index: 2; }
.prv-ue-stack .pue-c3 { bottom: 38%; background: rgba(255, 255, 255, .1); z-index: 1; }
@keyframes pueStack1 { 0%, 100% { transform: translateX(-50%) translateY(20%); } 50% { transform: translateX(-50%) translateY(0); } }

/* 3 · Pinned Cross-Fade */
.prv-ue-xf .pue-xa, .prv-ue-xf .pue-xb { position: absolute; inset: 12px; border-radius: 10px; }
.prv-ue-xf .pue-xa { background: linear-gradient(135deg, #2563eb, #1e293b); animation: pueXfA 3.4s ease-in-out infinite; }
.prv-ue-xf .pue-xb { background: linear-gradient(135deg, var(--green), #2563eb); animation: pueXfB 3.4s ease-in-out infinite; }
@keyframes pueXfA { 0%, 40% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes pueXfB { 0%, 40% { opacity: 0; } 60%, 100% { opacity: 1; } }

/* 4 · Clip-Path Reveal */
.prv-ue-clip .pue-clip-base { position: absolute; inset: 10px; border-radius: 8px; background: linear-gradient(135deg, #1e293b, #334155); }
.prv-ue-clip .pue-clip-iris {
  position: absolute; inset: 10px; border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  clip-path: circle(0% at 50% 50%);
  animation: pueClip 3.2s ease-in-out infinite;
}
@keyframes pueClip { 0%, 8% { clip-path: circle(0% at 50% 50%); } 70%, 100% { clip-path: circle(75% at 50% 50%); } }

/* 5 · Scroll Zoom */
.prv-ue-zoom span {
  position: absolute; top: 50%; left: 50%; border: 2px solid var(--green); border-radius: 8px;
  transform: translate(-50%, -50%); opacity: 0;
}
.prv-ue-zoom span:nth-child(1) { width: 22px; height: 16px; animation: pueZoom 2.6s ease-out infinite; }
.prv-ue-zoom span:nth-child(2) { width: 44px; height: 30px; border-color: var(--blue); animation: pueZoom 2.6s ease-out infinite .5s; }
.prv-ue-zoom span:nth-child(3) { width: 70px; height: 48px; animation: pueZoom 2.6s ease-out infinite 1s; }
@keyframes pueZoom { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; } }

/* 6 · Page-Push */
.prv-ue-push .pue-p { position: absolute; left: 16%; right: 16%; height: 60%; border-radius: 8px; }
.prv-ue-push .pue-p1 { background: linear-gradient(135deg, var(--blue), var(--green)); animation: puePush1 3s ease-in-out infinite; }
.prv-ue-push .pue-p2 { background: rgba(255, 255, 255, .16); animation: puePush2 3s ease-in-out infinite; }
.prv-ue-push .pue-push-arrow {
  position: absolute; left: 50%; bottom: 8px; width: 9px; height: 9px;
  border-left: 2px solid var(--green); border-top: 2px solid var(--green);
  transform: translateX(-50%) rotate(45deg); opacity: .8;
  animation: pueArrowUp 1.4s ease-in-out infinite;
}
@keyframes puePush1 { 0%, 20% { transform: translateY(70%); } 55%, 100% { transform: translateY(20%); } }
@keyframes puePush2 { 0%, 20% { transform: translateY(140%); } 55%, 100% { transform: translateY(70%); } }
@keyframes pueArrowUp { 0%, 100% { transform: translateX(-50%) translateY(3px) rotate(45deg); } 50% { transform: translateX(-50%) translateY(-2px) rotate(45deg); } }

/* 7 · Pinned Horizontal */
.prv-ue-hz .pue-hz-track { position: absolute; top: 30%; left: 0; height: 40%; display: flex; gap: 8px; padding: 0 14px; animation: pueHz 3.6s cubic-bezier(.6, 0, .4, 1) infinite; }
.prv-ue-hz .pue-hz-track span { flex: 0 0 46px; border-radius: 7px; background: rgba(255, 255, 255, .14); }
.prv-ue-hz .pue-hz-track span:nth-child(2) { background: linear-gradient(135deg, var(--blue), var(--green)); }
.prv-ue-hz .pue-hz-arrow {
  position: absolute; right: 10px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--green); border-top: 2px solid var(--green);
  transform: translateY(-50%) rotate(45deg); opacity: .85;
}
@keyframes pueHz { 0%, 18% { transform: translateX(0); } 60%, 100% { transform: translateX(-58px); } }

/* 8 · 3D Cube */
.prv-ue-cube { perspective: 320px; }
.prv-ue-cube .pue-cube-box { position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; transform-style: preserve-3d; animation: pueCube 4s ease-in-out infinite; }
.prv-ue-cube .pue-cube-box span { position: absolute; inset: 0; border-radius: 6px; }
.prv-ue-cube .pue-cf-front { background: linear-gradient(135deg, var(--blue), var(--green)); transform: translateZ(25px); }
.prv-ue-cube .pue-cf-top { background: rgba(255, 255, 255, .22); transform: rotateX(90deg) translateZ(25px); }
.prv-ue-cube .pue-cf-side { background: rgba(255, 255, 255, .1); transform: rotateY(90deg) translateZ(25px); }
@keyframes pueCube { 0%, 15% { transform: rotateX(0) rotateY(0); } 50%, 65% { transform: rotateX(-32deg) rotateY(-40deg); } 100% { transform: rotateX(0) rotateY(0); } }

/* 9 · Shared-Element Expand */
.prv-ue-expand .pue-exp-frame { position: absolute; inset: 8px; border: 1px dashed rgba(255, 255, 255, .2); border-radius: 8px; }
.prv-ue-expand .pue-exp-card {
  position: absolute; top: 34%; left: 34%; right: 34%; bottom: 34%; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  animation: pueExpand 3.4s cubic-bezier(.5, 0, .2, 1) infinite;
}
@keyframes pueExpand {
  0%, 16% { top: 34%; left: 34%; right: 34%; bottom: 34%; border-radius: 9px; }
  70%, 100% { top: 8px; left: 8px; right: 8px; bottom: 8px; border-radius: 8px; }
}

/* 10 · Liquid Distortion */
.prv-ue-liquid .pue-liq-wave {
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 60% at 30% 30%, rgba(16, 185, 129, .55), transparent 60%),
    radial-gradient(45% 55% at 72% 65%, rgba(37, 99, 235, .55), transparent 60%);
  filter: blur(2px);
  animation: pueLiquid 4s ease-in-out infinite;
}
@keyframes pueLiquid { 0%, 100% { transform: translate(-4%, 0) scale(1.1); } 50% { transform: translate(6%, 4%) scale(1.25); } }

/* ════════════════════════════════════════
   DEMO-SCOPE · gemeinsame Basis
════════════════════════════════════════ */
[class*="demo-ue-"] {
  background: linear-gradient(180deg, #05080f 0%, #0a1322 55%, #05080f 100%);
  color: #fff;
}
[class*="demo-ue-"] .dm-ue-intro {
  max-width: 760px; margin: 0 auto; padding: 4rem 1.6rem 2.6rem; text-align: center;
}
.dm-ue-label {
  display: inline-block; font-family: 'Montserrat', sans-serif;
  font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--green); padding: .35rem .9rem;
  border: 1px solid rgba(16, 185, 129, .35); border-radius: 999px; margin-bottom: 1.1rem;
}
[class*="demo-ue-"] .dm-ue-intro h2 { font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 1rem; color: #fff; }
[class*="demo-ue-"] .dm-ue-intro p { font-size: 1.05rem; line-height: 1.7; color: rgba(255, 255, 255, .72); }
.dm-ue-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 2rem;
  font-family: 'Montserrat', sans-serif; font-size: .62rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .5);
}
.dm-ue-cue-arrow {
  width: 10px; height: 10px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(45deg); animation: dmUeCue 1.5s ease-in-out infinite;
}
@keyframes dmUeCue { 0%, 100% { transform: rotate(45deg) translate(-2px, -2px); opacity: .4; } 50% { transform: rotate(45deg) translate(2px, 2px); opacity: 1; } }

/* Pin-Section + sticky Stage */
.dm-ue-pin { position: relative; height: 260vh; }
.dm-ue-pin-tall { height: 320vh; }
.dm-ue-pin-xtall { height: 440vh; }
.dm-ue-stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #05080f;
  border-top: 1px solid rgba(16, 185, 129, .14);
  border-bottom: 1px solid rgba(16, 185, 129, .14);
}

/* Voll-Bild Scene */
.dm-ue-scene-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.dm-ue-scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 8, 15, .2) 0%, rgba(5, 8, 15, .35) 45%, rgba(5, 8, 15, .82) 100%); }
.dm-ue-scene-body {
  position: relative; z-index: 2; text-align: center; padding: 1.5rem; max-width: 640px;
}
.dm-ue-eyebrow {
  display: inline-block; font-family: 'Montserrat', sans-serif; font-size: .64rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--green); margin-bottom: .7rem;
}
.dm-ue-scene-body h2 { font-family: 'Oswald', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; font-size: clamp(2rem, 6vw, 3.6rem); line-height: .96; }
.dm-ue-scene-body p { margin-top: .7rem; color: rgba(255, 255, 255, .8); font-size: .98rem; }

/* Erklär-Block */
.dm-ue-note { max-width: 720px; margin: 0 auto; padding: 3.5rem 1.6rem 5rem; text-align: center; }
.dm-ue-note h3 { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 1.4rem; letter-spacing: .01em; margin-bottom: .8rem; color: #fff; }
.dm-ue-note p { color: rgba(255, 255, 255, .72); line-height: 1.75; font-size: .98rem; }
.dm-ue-note code { font-family: 'Menlo', monospace; font-size: .85em; background: rgba(37, 99, 235, .16); color: #93c5fd; padding: 2px 7px; border-radius: 4px; }

/* ── 1 · Sticky-Cover ── */
.demo-ue-cover .dm-ue-cover-layer { position: absolute; inset: 0; overflow: hidden; }
.demo-ue-cover .dm-ue-cover-sheet {
  border-radius: 30px 30px 0 0; box-shadow: 0 -34px 70px rgba(0, 0, 0, .6);
  transform: translateY(100%); will-change: transform;
}

/* ── 2 · Stacking Cards ── */
.demo-ue-stack .dm-ue-stack { position: relative; padding-bottom: 8vh; }
.demo-ue-stack .dm-ue-stack-card {
  position: sticky; height: 80vh; overflow: hidden;
  border-radius: 24px; transform-origin: top center; will-change: transform;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); margin: 0 auto;
  width: min(94%, 1040px);
}
.demo-ue-stack .dm-ue-stack-card:nth-child(1) { top: 34px; }
.demo-ue-stack .dm-ue-stack-card:nth-child(2) { top: 52px; }
.demo-ue-stack .dm-ue-stack-card:nth-child(3) { top: 70px; }
.demo-ue-stack .dm-ue-stack-card:nth-child(4) { top: 88px; }

/* ── 3 · Cross-Fade ── */
.demo-ue-crossfade .dm-ue-xf-panel { position: absolute; inset: 0; overflow: hidden; opacity: 0; will-change: opacity, transform, filter; }
.demo-ue-crossfade .dm-ue-xf-progress {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  width: 180px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .16); z-index: 20;
}
.demo-ue-crossfade .dm-ue-xf-progress span { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--green)); }

/* ── 4 · Clip-Path ── */
.demo-ue-clip .dm-ue-clip-base, .demo-ue-clip .dm-ue-clip-top { position: absolute; inset: 0; overflow: hidden; }
.demo-ue-clip .dm-ue-clip-top { clip-path: circle(0% at 50% 50%); -webkit-clip-path: circle(0% at 50% 50%); will-change: clip-path; }

/* ── 5 · Scroll Zoom ── */
.demo-ue-zoom .dm-ue-zoom-scene { perspective: 1200px; }
.demo-ue-zoom .dm-ue-zoom-layer { position: absolute; inset: 0; overflow: hidden; will-change: transform, opacity; }
.demo-ue-zoom .dm-ue-zoom-back { transform: scale(.7); opacity: 0; }
.demo-ue-zoom .dm-ue-zoom-front { transform: scale(1); }

/* ── 6 · Page-Push ── */
.demo-ue-push .dm-ue-push-track { position: absolute; inset: 0; will-change: transform; }
.demo-ue-push .dm-ue-push-slide { position: absolute; left: 0; right: 0; height: 100%; overflow: hidden; }
.demo-ue-push .dm-ue-push-slide:nth-child(1) { top: 0; }
.demo-ue-push .dm-ue-push-slide:nth-child(2) { top: 100%; }
.demo-ue-push .dm-ue-push-slide:nth-child(3) { top: 200%; }
.demo-ue-push .dm-ue-push-slide:nth-child(4) { top: 300%; }

/* Punkt-Indikator (Push) */
.dm-ue-dots { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 20; }
.dm-ue-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: background .25s, transform .25s; }
.dm-ue-dots span.is-active { background: var(--green); transform: scale(1.4); }

/* ── 7 · Horizontal ── */
.demo-ue-horizontal .dm-ue-hz-track { position: absolute; top: 0; left: 0; height: 100%; display: flex; will-change: transform; }
.demo-ue-horizontal .dm-ue-hz-panel { position: relative; flex: 0 0 100vw; height: 100%; overflow: hidden; }
.demo-ue-horizontal .dm-ue-hz-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.demo-ue-horizontal .dm-ue-hz-panel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 8, 15, .2), rgba(5, 8, 15, .7)); }
.demo-ue-horizontal .dm-ue-hz-cap { position: absolute; left: 8%; bottom: 12%; z-index: 2; }
.demo-ue-horizontal .dm-ue-hz-num { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .8rem; letter-spacing: .2em; color: var(--green); }
.demo-ue-horizontal .dm-ue-hz-cap h2 { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: clamp(2rem, 7vw, 4rem); line-height: 1; }
.demo-ue-horizontal .dm-ue-hz-bar { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 200px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .16); z-index: 20; }
.demo-ue-horizontal .dm-ue-hz-bar span { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--green)); }

/* ── 8 · 3D Cube ── */
.demo-ue-cube .dm-ue-cube-scene { position: absolute; inset: 0; perspective: 1500px; }
.demo-ue-cube .dm-ue-cube { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(-50vh) rotateX(0deg); will-change: transform; }
.demo-ue-cube .dm-ue-cube-face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; }
.demo-ue-cube .dm-ue-cube-front { transform: rotateX(0deg) translateZ(50vh); }
.demo-ue-cube .dm-ue-cube-bottom { transform: rotateX(-90deg) translateZ(50vh); }
.demo-ue-cube .dm-ue-cube-back { transform: rotateX(-180deg) translateZ(50vh); }

/* ── 9 · Shared-Element Expand ── */
.demo-ue-expand .dm-ue-expand-stage { background: #070b14; }
.demo-ue-expand .dm-ue-expand-context { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 1; padding: 1.5rem; }
.demo-ue-expand .dm-ue-expand-context h2 { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: clamp(1.8rem, 5vw, 3rem); }
.demo-ue-expand .dm-ue-expand-context p { color: rgba(255, 255, 255, .7); margin-top: .5rem; }
.demo-ue-expand .dm-ue-expand-card {
  position: absolute; top: 30%; left: 30%; right: 30%; bottom: 30%;
  background-size: cover; background-position: center; border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55); z-index: 2; will-change: top, left, right, bottom, border-radius;
}
.demo-ue-expand .dm-ue-expand-tag { position: absolute; left: 14px; bottom: 12px; font-family: 'Montserrat', sans-serif; font-size: .6rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #fff; background: rgba(16, 185, 129, .85); padding: 4px 10px; border-radius: 999px; }
.demo-ue-expand .dm-ue-expand-final {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; z-index: 3; opacity: 0; padding: 1.5rem;
  background: linear-gradient(180deg, rgba(5, 8, 15, .15), rgba(5, 8, 15, .68));
}
.demo-ue-expand .dm-ue-expand-final h2 { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: clamp(2rem, 6vw, 3.4rem); }
.demo-ue-expand .dm-ue-expand-final p { color: rgba(255, 255, 255, .85); margin-top: .6rem; max-width: 460px; }

/* ── 10 · Liquid Distortion ── */
.demo-ue-liquid .dm-ue-liquid-svg { position: absolute; width: 0; height: 0; }
.demo-ue-liquid .dm-ue-liquid-layer { position: absolute; inset: 0; overflow: hidden; }
.demo-ue-liquid .dm-ue-liquid-top { will-change: opacity; }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 720px) {
  [class*="demo-ue-"] .dm-ue-intro { padding: 3rem 1.2rem 2rem; }
  .dm-ue-pin { height: 240vh; }
  .dm-ue-pin-tall { height: 280vh; }
  .dm-ue-pin-xtall { height: 380vh; }
  .demo-ue-stack .dm-ue-stack-card { width: 92%; height: 74vh; }
}

/* ════════════════════════════════════════
   REDUCED MOTION — Endlos-Loops der Previews ruhigstellen
════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .prv-ue [class^="pue-"], .prv-ue [class*=" pue-"], .dm-ue-cue-arrow { animation: none !important; }
  .prv-ue-cover .pue-sheet { transform: translateY(12%); }
  .prv-ue-clip .pue-clip-iris { clip-path: circle(58% at 50% 50%); }
  .prv-ue-expand .pue-exp-card { top: 18%; left: 18%; right: 18%; bottom: 18%; }
}
