/* =====================================================================
   ANIMATIONS & MOTION SYSTEM (Animaster-style choreography)
===================================================================== */

/* Initial hidden state for scroll-triggered elements */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay Utilities */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }

/* Hero entrance animation under 1.5s */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-enter {
  animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-enter-delay-1 {
  opacity: 0;
  animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.hero-enter-delay-2 {
  opacity: 0;
  animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-enter-delay-3 {
  opacity: 0;
  animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

/* Micro-interactions */
.interactive-scale {
  transition: transform var(--transition-fast);
}

.interactive-scale:hover {
  transform: scale(1.02);
}

.underline-draw {
  position: relative;
  display: inline-block;
}

.underline-draw::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-fast);
}

.underline-draw:hover::after {
  width: 100%;
}

/* =====================================================================
   PREFERS REDUCED MOTION FALLBACK
===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-enter,
  .hero-enter-delay-1,
  .hero-enter-delay-2,
  .hero-enter-delay-3 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .hero-canvas-container {
    display: none !important;
  }
}
