diff --git a/public/custom/auto-player.css b/public/custom/auto-player.css index d0217fa..fbc783e 100644 --- a/public/custom/auto-player.css +++ b/public/custom/auto-player.css @@ -7,7 +7,7 @@ .flug-strecke { height: 100vh; position: relative; overflow: hidden; } .flug-buehne { position: absolute; inset: 0; - overflow: hidden; + overflow: hidden; z-index: 1; perspective: 800px; perspective-origin: 50% 50%; background: var(--bg); } @@ -65,7 +65,7 @@ /* ==================== PREIS-MOMENT (Gold nur hier – Akzent) ==================== */ .preis { - position: absolute; inset: 0; + position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; will-change: opacity, transform; pointer-events: none; @@ -119,7 +119,7 @@ .preis-text .rieseln:nth-child(8) { left: 75%; animation-delay: 1.4s; --drift: 6px; } .preis-text .rieseln:nth-child(9) { left: 85%; animation-delay: 2.6s; --drift: -2px; } .preis-text .rieseln:nth-child(10) { left: 94%; animation-delay: 0.6s; --drift: 4px; } -.konfetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; } +.konfetti { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; } .landung-verlauf { position: absolute; left: 0; right: 0; bottom: 0; height: 30vh; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff); diff --git a/public/custom/auto-player.js b/public/custom/auto-player.js index aa99b34..4bd7636 100644 --- a/public/custom/auto-player.js +++ b/public/custom/auto-player.js @@ -61,6 +61,13 @@ window.removeEventListener('keydown', sperreTasten, false); window.removeEventListener('mousemove', mausBewegen, false); if (skipBtn) skipBtn.hidden = true; + // Topbar-Lande-Animation neu auslösen, damit sie beim Erscheinen einfährt. + var topbar = document.querySelector('.topbar'); + if (topbar && topbar.classList.contains('landen')) { + topbar.classList.remove('landen'); + void topbar.offsetWidth; // Reflow: Animation zurücksetzen + topbar.classList.add('landen'); + } } function frame(jetzt) { @@ -131,9 +138,10 @@ if (preisText) preisText.style.opacity = 1 - e; } // Phase Landung (30.0 – 33.0): Bühne fährt nach unten, Bühne + Vollbild aus. + // lerp startet bei 190 (Sinkflug-Endwert), kein sichtbarer Sprung. if (t >= T.wachstumEnd && t < T.landungEnd) { var l = (t - T.wachstumEnd) / (T.landungEnd - T.wachstumEnd), e = easeOutCubic(l); - if (buehne) buehne.style.transform = 'translateY(' + lerp(0, window.innerHeight, e) + 'px)'; + if (buehne) buehne.style.transform = 'translateY(' + lerp(190, window.innerHeight, e) + 'px)'; if (buehne) buehne.style.opacity = 1 - e; if (preis) preis.style.opacity = 1 - e; } @@ -151,10 +159,13 @@ function start() { if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) { beenden(); return; } - // Hochformat-Erkennung pro Bild (Spec §3): einmalig vor rAF. + // Startposition setzen, damit Fotos beim Atmen (0–2 s) schon korrekt verteilt sind. fotos.forEach(function (f) { var img = f.querySelector('img'); if (img && img.naturalHeight > img.naturalWidth) f.classList.add('hochformat'); + var x0 = parseFloat(f.dataset.x), y0 = parseFloat(f.dataset.y), + z0 = parseFloat(f.dataset.z), k0 = parseFloat(f.dataset.kipp); + f.style.transform = 'translate3d(calc(-50% + ' + x0 + 'px), calc(-50% + ' + y0 + 'px), ' + z0 + 'px) rotate(' + k0 + 'deg)'; }); if (window.matchMedia('(pointer: fine)').matches) { window.addEventListener('mousemove', mausBewegen); diff --git a/public/index.html b/public/index.html index 362aa35..1f88052 100644 --- a/public/index.html +++ b/public/index.html @@ -76,21 +76,22 @@


-
+