/* Homepage load screen: the launch video's intro. The mark spins in and slides to the middle, the line builds
   word by word and steps back out, the mark settles into a loader, then intro.js sweeps the page in with pixels.
   intro.js owns the timing (.is-starting, .is-startup-playing, 2900 ms). */
.startup--intro { transition: none; }
.is-starting.is-startup-playing .startup--intro { animation: none; }
.intro { --intro-drop: clamp(30px, 7vw, 60px); display: grid; justify-items: center; gap: clamp(20px, 4vh, 36px); text-align: center; padding-inline: 16px; }
.intro__logo { position: relative; display: grid; place-items: center; width: clamp(72px, 16vw, 104px); aspect-ratio: 1; }
.intro__logo img { width: 100%; height: 100%; opacity: 0; }
.intro__ring { position: absolute; inset: -22%; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; opacity: 0; }
.intro__line { margin: 0; font: 400 clamp(32px, 7.4vw, 76px)/1.02 var(--serif); letter-spacing: -.03em; }
.intro__line span { display: inline-block; opacity: 0; }
.intro__line em { color: var(--red); }

.is-startup-playing .intro__logo { animation: intro-settle 420ms cubic-bezier(.65, 0, .35, 1) 1560ms both; }
.is-startup-playing .intro__logo img { animation: intro-mark-in 250ms steps(5) 50ms both, intro-mark-slide 600ms cubic-bezier(.65, 0, .35, 1) 320ms both; }
.is-startup-playing .intro__ring { animation: intro-step-in 300ms steps(4) 1640ms both, intro-spin 1100ms cubic-bezier(.6, 0, .3, 1) 1740ms infinite; }
.is-startup-playing .intro__line span { animation: intro-word-in 200ms steps(3) calc(520ms + var(--i) * 95ms) both, intro-word-out 100ms steps(2) calc(1500ms + (6 - var(--i)) * 45ms) forwards; }

/* While the pixels sweep the page in, the loader holds for a beat above them and steps out. */
.is-intro-revealing .startup--intro { opacity: 1; visibility: visible; background: transparent; pointer-events: none; }
.is-intro-revealing .intro__logo { transform: translateY(var(--intro-drop)) scale(.72); animation: intro-step-out 280ms steps(4) 260ms both; }
.is-intro-revealing .intro__logo img { opacity: 1; }
.is-intro-revealing .intro__ring { opacity: 1; animation: intro-spin 1100ms cubic-bezier(.6, 0, .3, 1) infinite; }
.intro-mosaic { position: fixed; inset: 0; z-index: 99; width: 100%; height: 100%; pointer-events: none; }

@keyframes intro-mark-in { from { opacity: 0; scale: .4; rotate: 90deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes intro-mark-slide { from { translate: clamp(-220px, -30vw, -110px) 0; } to { translate: 0 0; } }
@keyframes intro-word-in { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes intro-word-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes intro-settle { from { transform: none; } to { transform: translateY(var(--intro-drop)) scale(.72); } }
@keyframes intro-step-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-step-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes intro-spin { to { rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .is-starting .intro__logo img, .is-starting .intro__line span { opacity: 1; animation: none !important; }
  .is-starting .intro__ring, .is-starting .intro__logo { animation: none !important; }
  .startup--intro { transition: opacity 180ms ease-out, visibility 180ms; }
}
