/* Blocks stay visible if animations do not run (cached CSS, blocked motion, etc.) */
[data-animate] {
  opacity: 1;
  transform: none;
  visibility: visible;
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

html.js [data-animate] {
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

html.js [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.js [data-animate="slide-left"].is-visible {
  transform: translateX(0);
}

html.js [data-animate="slide-right"].is-visible {
  transform: translateX(0);
}

[data-animate-delay="1"] {
  transition-delay: 0.1s;
}

[data-animate-delay="2"] {
  transition-delay: 0.2s;
}

[data-animate-delay="3"] {
  transition-delay: 0.3s;
}

[data-animate-delay="4"] {
  transition-delay: 0.4s;
}

/* Default visible; keyframes only run when animation is supported */
.hero__title,
.hero__text,
.hero__actions,
.page-hero__title {
  opacity: 1;
  transform: none;
  visibility: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__title,
  .hero__text,
  .hero__actions {
    animation: heroReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .hero__text {
    animation-delay: 0.15s;
  }

  .hero__actions {
    animation-delay: 0.3s;
  }

  .page-hero__title {
    animation: heroReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  .hero__title,
  .hero__text,
  .hero__actions,
  .page-hero__title {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}
