/* Hero page-load entrance — unique staggered reveal (no external libs) */

section.hero:not(.mph-hero-init) .hero-content > *,
section.hero:not(.mph-hero-init) .hero-form {
  opacity: 0;
  visibility: hidden;
}

section.hero.mph-hero-init .mph-hero-piece {
  visibility: visible;
  opacity: 0;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

section.hero.mph-hero-animate .mph-hero-piece--tag {
  animation-name: mphHeroTagIn;
  animation-duration: 0.75s;
  animation-delay: 0.12s;
}

section.hero.mph-hero-animate .mph-hero-piece--title {
  animation-name: mphHeroTitleIn;
  animation-duration: 0.95s;
  animation-delay: 0.28s;
}

section.hero.mph-hero-animate .mph-hero-piece--text {
  animation-name: mphHeroTextIn;
  animation-duration: 0.8s;
  animation-delay: calc(0.48s + var(--mph-hero-i, 0) * 0.12s);
}

section.hero.mph-hero-animate .mph-hero-piece--btns {
  animation-name: mphHeroBtnsIn;
  animation-duration: 0.72s;
  animation-delay: calc(0.62s + var(--mph-hero-text-count, 0) * 0.12s);
  animation-timing-function: cubic-bezier(0.34, 1.45, 0.64, 1);
}

section.hero.mph-hero-animate .mph-hero-piece--form {
  animation-name: mphHeroFormIn;
  animation-duration: 1s;
  animation-delay: 0.55s;
  transform-origin: center right;
}

section.hero.mph-hero-animate .mph-hero-piece--form form > * {
  opacity: 0;
  animation: mphHeroFormFieldIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.95s + var(--mph-field-i, 0) * 0.07s);
}

@keyframes mphHeroTagIn {
  0% {
    opacity: 0;
    transform: translate3d(-36px, 0, 0);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes mphHeroTitleIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 42px, 0) scale(0.94);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes mphHeroTextIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes mphHeroBtnsIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes mphHeroFormIn {
  0% {
    opacity: 0;
    transform: perspective(900px) translate3d(48px, 12px, 0) rotateY(-14deg) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: perspective(900px) translate3d(0, 0, 0) rotateY(0deg) scale(1);
  }
}

@keyframes mphHeroFormFieldIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

section.hero.mph-hero-init .hero-wrap {
  perspective: 1100px;
}

@media (prefers-reduced-motion: reduce) {
  section.hero:not(.mph-hero-init) .hero-content > *,
  section.hero:not(.mph-hero-init) .hero-form {
    opacity: 1;
    visibility: visible;
  }

  section.hero.mph-hero-init .mph-hero-piece,
  section.hero.mph-hero-animate .mph-hero-piece--form form > * {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}
