/* ============================================
   Animations
   ============================================ */

/* Fade in from bottom */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1),
              transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

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

/* Fade in from left */
.animate-from-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1),
              transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.animate-from-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.animate-from-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1),
              transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.animate-from-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Zoom in */
.animate-zoom {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1),
              transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

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

/* Staggered children animation */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 0.5s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 0.6s; }

/* Hamburger arrow animation */
@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

/* Scroll indicator hand animation */
@keyframes scrollHand {
  0% { transform: translateX(80px) scale(1); opacity: 0; }
  10% { transform: translateX(80px) scale(1); opacity: 1; }
  20%, 60% { transform: translateX(175px) scale(0.6); opacity: 1; }
  80% { transform: translateX(5px) scale(0.6); opacity: 1; }
  100% { transform: translateX(5px) scale(0.6); opacity: 0; }
}

@keyframes scrollCard {
  0%, 60% { transform: translateX(0); }
  80%, 100% { transform: translateX(-240px); }
}

/* Fade in page load */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-loaded {
  animation: pageFadeIn 0.4s ease-in-out;
}

/* Accordion icon rotation */
@keyframes iconRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(45deg); }
}

/* Fade in up for hero sections */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  animation: heroFadeIn 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.hero-animate--delay {
  animation: heroFadeIn 1s cubic-bezier(0.19, 1, 0.22, 1) 0.3s forwards;
  opacity: 0;
}

/* Tab indicator animation */
@keyframes tabSlide {
  from { transform: translateX(var(--tab-slide-from, 0)); }
  to { transform: translateX(0); }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* ============================================
   Responsive
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-on-scroll,
  .animate-from-left,
  .animate-from-right,
  .animate-zoom {
    opacity: 1;
    transform: none;
  }
}
