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

/* ==========================================================================
   Scroll Animations (Fade In Up)
   ========================================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Fade in from left */
.animate-on-scroll.from-left {
  transform: translateX(-40px);
}

.animate-on-scroll.from-left.visible {
  transform: translateX(0);
}

/* Fade in from right */
.animate-on-scroll.from-right {
  transform: translateX(40px);
}

.animate-on-scroll.from-right.visible {
  transform: translateX(0);
}

/* Scale in */
.animate-on-scroll.scale-in {
  transform: scale(0.9);
}

.animate-on-scroll.scale-in.visible {
  transform: scale(1);
}

/* Stagger delays */
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Button Hover Effects
   ========================================================================== */

.btn {
  transition: all 0.25s ease;
}

/* ==========================================================================
   Header Scroll Effect
   ========================================================================== */

.header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Mobile Menu Animation
   ========================================================================== */

.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* ==========================================================================
   Accordion Animation
   ========================================================================== */

.accordion-content {
  transition: max-height 0.35s ease;
}

.accordion-title::before {
  transition: transform 0.3s ease;
}

/* ==========================================================================
   Lightbox Animation
   ========================================================================== */

.lightbox {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-content {
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

/* ==========================================================================
   Form Focus Effects
   ========================================================================== */

.form-group input,
.form-group textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ==========================================================================
   YouTube Thumbnail Hover
   ========================================================================== */

.youtube-thumb img {
  transition: transform 0.3s ease;
}

.youtube-thumb:hover img {
  transform: scale(1.03);
}

.play-button {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   Loading State for Form
   ========================================================================== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-submit.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   Hero Entrance Animations
   ========================================================================== */

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

@keyframes heroSlideInRight {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes heroStatsReveal {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes accentDrift {
  from {
    opacity: 0;
    transform: translate(8px, -8px);
  }
  to {
    opacity: 1;
    transform: translate(-16px, -16px);
  }
}

/* Initial hidden state */
.hero-content .hero-title,
.hero-content .hero-text,
.hero-content .hero-cta-group,
.hero-stats-card,
.hero-visual {
  opacity: 0;
}

.hero-image-accent {
  opacity: 0;
}

/* Staggered entrance sequence */
.js-loaded .hero-content .hero-title {
  animation: heroFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.js-loaded .hero-content .hero-text {
  animation: heroFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.js-loaded .hero-content .hero-cta-group {
  animation: heroFadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.js-loaded .hero-visual {
  animation: heroSlideInRight 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.js-loaded .hero-image-accent {
  animation: accentDrift 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.js-loaded .hero-stats-card {
  animation: heroStatsReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

