@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ─── Page intro — replay on every refresh ─── */
.intro-flash {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--gray-950);
  pointer-events: none;
  opacity: 1;
}

html.is-intro-play .intro-flash {
  animation: introFlash 0.55s var(--ease-out) forwards;
}

@keyframes introFlash {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Character write-in */
.split-char {
  display: inline-block;
}

html.js-intro:not(.is-intro-done) .split-char {
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(12px);
}

html.is-intro-play .split-char {
  animation: splitCharIn 0.7s var(--ease-out) forwards;
  animation-delay: calc(0.1s + var(--ci) * 0.055s);
}

.hero-brand__cord .split-char {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.32);
  text-stroke: 1.5px rgba(255, 255, 255, 0.32);
}

.page-hero__title .split-char {
  animation-delay: calc(0.08s + var(--ci) * 0.04s);
}

@keyframes splitCharIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Staggered intro blocks */
html.js-intro:not(.is-intro-done) [data-intro-order] {
  opacity: 0;
}

html.is-intro-play [data-intro-order="0"] {
  animation: introFadeIn 1s 0.05s var(--ease-out) forwards;
}

html.is-intro-play [data-intro-order="1"] {
  animation: introFadeUp 0.8s 0.15s var(--ease-out) forwards;
}

html.is-intro-play [data-intro-order="2"] {
  animation: introFadeUp 0.85s 0.55s var(--ease-out) forwards;
}

html.is-intro-play [data-intro-order="3"] {
  animation: introFadeUp 0.85s 0.72s var(--ease-out) forwards;
}

html.is-intro-play [data-intro-order="4"] {
  animation: introScaleUp 1.1s 0.85s var(--ease-out) forwards;
}

html.is-intro-play [data-intro-order="5"] {
  animation: introFadeUp 0.8s 1s var(--ease-out) forwards;
}

@keyframes introFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes introFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes introScaleUp {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(24px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

html.is-intro-done [data-intro-order],
html.is-intro-done .split-char {
  opacity: 1;
  transform: none;
  filter: none;
  animation: none;
}

html.is-intro-play [data-intro-order="4"] .hero-stage__orbit {
  animation: introFadeIn 0.9s 1.1s var(--ease-out) forwards;
}

html.js-intro:not(.is-intro-done) .hero-stage__orbit {
  opacity: 0;
}

html.is-intro-done .hero-stage__orbit {
  opacity: 1;
}

/* Header slide-in */
html.js-intro:not(.is-intro-done) .site-header {
  opacity: 0;
  transform: translateY(-100%);
}

html.is-intro-play .site-header {
  animation: headerSlideIn 0.7s 0.08s var(--ease-out) forwards;
}

html.is-intro-done .site-header {
  opacity: 1;
  transform: none;
}

@keyframes headerSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes lineGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* Hero word stagger — legacy */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal:nth-child(2) { transition-delay: 80ms; }
.stagger-children .reveal:nth-child(3) { transition-delay: 160ms; }
.stagger-children .reveal:nth-child(4) { transition-delay: 240ms; }
.stagger-children .reveal:nth-child(5) { transition-delay: 320ms; }
.stagger-children .reveal:nth-child(6) { transition-delay: 400ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .intro-flash { display: none; }
  .split-char,
  [data-intro-order],
  .site-header,
  .reveal,
  .reveal-scale,
  .ambient__orb,
  .marquee__track {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
