diff --git a/sites/allainallain.de/index.html b/sites/allainallain.de/index.html index 41f145b..2c5cedd 100644 --- a/sites/allainallain.de/index.html +++ b/sites/allainallain.de/index.html @@ -71,7 +71,7 @@ letter-spacing: 0.08em; line-height: 1.1; margin-bottom: 32px; - animation: fadeIn 2s ease-out; + min-height: 1.2em; } h1 .ai { @@ -79,12 +79,31 @@ font-weight: 400; } + h1 .filler { + color: transparent; + } + + h1 .phase { + display: inline; + opacity: 0; + transition: opacity 0.8s ease; + } + + h1 .phase.active { + opacity: 1; + } + .subtitle { font-size: clamp(1rem, 2.5vw, 1.2rem); color: var(--text-dim); font-weight: 200; letter-spacing: 0.04em; - animation: fadeIn 2s ease-out 0.5s both; + opacity: 0; + transition: opacity 1s ease; + } + + .subtitle.visible { + opacity: 1; } .hero::after { @@ -260,8 +279,8 @@
-

all·AI·n·all·AI·n

-

Umgeben von KIs. Trotzdem allein.

+

+

Umgeben von KIs. Trotzdem allein.

@@ -356,6 +375,44 @@ }, { threshold: 0.15 }); document.querySelectorAll('.reveal').forEach(el => observer.observe(el)); + + // Hero transition: All AI -> All AI All AI -> Allein Allein + (function() { + const title = document.getElementById('hero-title'); + const sub = document.getElementById('hero-sub'); + + const phases = [ + { html: 'All AI', delay: 1200 }, + { html: 'All AI, All AI', delay: 2000 }, + { html: 'allAIn allAIn', delay: 1800 }, + { html: 'Allein, Allein', delay: 0 }, + ]; + + let i = 0; + title.innerHTML = phases[0].html; + title.style.opacity = '1'; + + function next() { + i++; + if (i >= phases.length) { + sub.classList.add('visible'); + return; + } + title.style.opacity = '0'; + setTimeout(() => { + title.innerHTML = phases[i].html; + title.style.opacity = '1'; + if (phases[i].delay > 0) { + setTimeout(next, phases[i].delay); + } else { + setTimeout(() => sub.classList.add('visible'), 1000); + } + }, 800); + } + + title.style.transition = 'opacity 0.8s ease'; + setTimeout(next, phases[0].delay); + })();