/* Hero staged entrance — lines draw over visible copy; cards pop in last */

/* Win over immersive-sections .section-panel { min-height: 100dvh; justify-content: center } */
#hero.hero--royal.section-panel {
  justify-content: flex-start;
  min-height: auto;
}

/* Dark-first: copy hidden while lines draw, fades up at phase-copy */
#hero.hero-entrance-pending .hero__inner {
  opacity: 0;
  transform: translateY(18px);
}

#hero.hero-phase-copy .hero__inner,
#hero.hero-phase-actions .hero__inner,
#hero.hero-entrance-done .hero__inner {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s ease,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

#hero.hero-entrance-pending .float-card--royal {
  opacity: 0;
  transform: scale(0.88) translateY(0.65rem);
  animation: none !important;
}

#hero.hero-entrance-pending .hero__aurora,
#hero.hero-entrance-pending .light-orb,
#hero.hero-entrance-pending #particle-grid {
  opacity: 0;
  transition: opacity 0.65s ease 0.05s;
}

#hero.hero-phase-icon .hero__aurora,
#hero.hero-phase-icon .light-orb,
#hero.hero-phase-icon #particle-grid,
#hero.hero-phase-copy .hero__aurora,
#hero.hero-phase-copy .light-orb,
#hero.hero-phase-copy #particle-grid,
#hero.hero-phase-actions .hero__aurora,
#hero.hero-phase-actions .light-orb,
#hero.hero-phase-actions #particle-grid,
#hero.hero-entrance-done .hero__aurora,
#hero.hero-entrance-done .light-orb,
#hero.hero-entrance-done #particle-grid {
  opacity: 1;
}

#hero.hero-phase-icon .orbit-preview__core,
#hero.hero-phase-copy .orbit-preview__core,
#hero.hero-phase-actions .orbit-preview__core,
#hero.hero-entrance-done .orbit-preview__core {
  transform: scale(1);
  transition: transform 0.5s cubic-bezier(0.34, 1.45, 0.64, 1);
}

#hero.hero-entrance-pending .orbit-preview__core {
  transform: scale(0.96);
  transition: transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1);
}

#hero.hero-phase-actions .float-card--royal.hero-entrance-card-visible,
#hero.hero-entrance-done .float-card--royal.hero-entrance-card-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition:
    opacity 0.48s ease,
    transform 0.52s cubic-bezier(0.34, 1.25, 0.64, 1);
  transition-delay: var(--hero-card-delay, 0ms);
}

#hero.hero-entrance-done .float-card--royal.hero-entrance-card-visible {
  animation: float 5s ease-in-out infinite;
  animation-delay: var(--hero-card-float-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  #hero.hero-entrance-pending .hero__inner {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #hero.hero-entrance-pending .float-card--royal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #hero.hero-entrance-pending .hero__aurora,
  #hero.hero-entrance-pending .light-orb,
  #hero.hero-entrance-pending #particle-grid {
    opacity: 1;
    transition: none;
  }

  #hero.hero-entrance-pending .orbit-preview__core {
    transform: none;
    transition: none;
  }
}
