/* ========================================
   LANDING PAGE WOW ANIMATIONS & EFFECTS
   ======================================== */

/* ========================================
   1. SCROLL-TRIGGERED ANIMATIONS
   ======================================== */

/* Base state for elements that will animate in */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Stagger delays for multiple elements */
.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* ========================================
   2. KEN BURNS EFFECT (Subtle Zoom on Images)
   ======================================== */

/* DISABLED - Causing z-index overlap issues */

/*
.hero-image-card {
  overflow: hidden;
  position: relative;
}

.hero-image-card img {
  animation: kenBurns 20s ease-in-out infinite alternate;
  transform-origin: center center;
  will-change: transform;
}

@keyframes kenBurns {
  0% { 
    transform: scale(1) translate(0, 0); 
  }
  100% { 
    transform: scale(1.08) translate(-2%, -2%); 
  }
}

.hero-image-card:hover img {
  animation-play-state: paused;
}
*/

/* ========================================
   3. ENHANCED HOVER EFFECTS
   ======================================== */

/* Hero Images - Lift & Glow */
.hero-image-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 20px 60px rgba(102, 126, 234, 0.4),
    0 0 40px rgba(255, 107, 53, 0.2);
}

/* Add gradient overlay on hover */
.hero-image-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15),
    rgba(102, 126, 234, 0.15)
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.hero-image-card:hover::before {
  opacity: 1;
}

/* ========================================
   4. TILT EFFECT FOR FEATURE CARDS
   ======================================== */

.feature-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  will-change: transform;
}

.feature-card:hover {
  transform: translateY(-8px);
}

/* Tilt will be applied via JavaScript */
.feature-card.tilt-active {
  transition: none;
}

/* Add shine effect on tilt */
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}

.feature-card:hover::after {
  opacity: 1;
}

/* ========================================
   5. ENHANCED CTA BUTTON
   ======================================== */

.hero-cta {
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 20px rgba(255, 107, 53, 0.4),
    0 0 30px rgba(255, 107, 53, 0.2);
  transition: all 0.3s ease;
}

.hero-cta:hover {
  box-shadow: 
    0 8px 30px rgba(255, 107, 53, 0.6),
    0 0 50px rgba(255, 107, 53, 0.4);
  transform: translateY(-2px) scale(1.02);
}

/* Ripple effect on click */
.hero-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
  opacity: 0;
}

.hero-cta:active::before {
  width: 300px;
  height: 300px;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0.3s;
}

/* Pulse animation for CTA icon */
.hero-cta-icon {
  display: inline-block;
  animation: ctaPulse 2s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.15); 
  }
}

/* ========================================
   6. GLOW EFFECTS
   ======================================== */

/* Feature icons glow */
.feature-icon {
  filter: drop-shadow(0 0 8px currentColor);
  transition: filter 0.3s ease;
}

.feature-card:hover .feature-icon {
  filter: drop-shadow(0 0 16px currentColor);
  animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { 
    filter: drop-shadow(0 0 16px currentColor); 
  }
  50% { 
    filter: drop-shadow(0 0 24px currentColor); 
  }
}

/* Stats glow */
.stat-number {
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
  transition: text-shadow 0.3s ease;
}

.stat-item-hero:hover .stat-number {
  text-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
}

/* ========================================
   7. ANIMATED GRADIENT BACKGROUND
   ======================================== */

.hero-landing {
  position: relative;
  background: linear-gradient(
    135deg,
    #1a1a2e 0%,
    #16213e 25%,
    #0f3460 50%,
    #16213e 75%,
    #1a1a2e 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { 
    background-position: 0% 50%; 
  }
  50% { 
    background-position: 100% 50%; 
  }
}

/* ========================================
   8. PARALLAX EFFECT
   ======================================== */

/* DISABLED - Causing z-index overlap issues */

/*
.hero-images {
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.hero-images.parallax-active {
  transform: translateY(var(--parallax-offset, 0));
}
*/

/* ========================================
   9. PARTICLE BACKGROUND
   ======================================== */

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.3;
  z-index: 0;
}

/* Fix z-index stacking context */
.hero-content,
.hero-features,
.hero-stats,
.quotes-section {
  position: relative;
  z-index: 10;
}

/* Ensure hero images don't overlap other content */
.hero-images {
  position: relative;
  z-index: 1;
}

.hero-image-card {
  position: relative;
  z-index: 1;
}

.hero-image-card img {
  position: relative;
  z-index: 0;
}

.hero-image-overlay {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

/* Ensure hero text is above images */
.hero-text {
  position: relative;
  z-index: 10;
}

/* Ensure feature cards are above everything */
.feature-card {
  position: relative;
  z-index: 10;
}

/* Ensure stats are above everything */
.stat-item-hero {
  position: relative;
  z-index: 10;
}

/* Ensure quote carousel is above everything */
.quote-carousel {
  position: relative;
  z-index: 10;
}

/* ========================================
   10. COUNTER ANIMATION
   ======================================== */

.stat-number {
  display: inline-block;
  transition: transform 0.3s ease;
}

.stat-number.counting {
  animation: countBounce 0.6s ease;
}

@keyframes countBounce {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.1); 
  }
}

/* ========================================
   11. SCROLL PROGRESS BAR
   ======================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 9999;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    #ff6b35 0%,
    #667eea 50%,
    #ff6b35 100%
  );
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.1s ease;
  animation: progressGradient 3s linear infinite;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.8);
}

@keyframes progressGradient {
  0% { 
    background-position: 0% 50%; 
  }
  100% { 
    background-position: 200% 50%; 
  }
}

/* ========================================
   12. QUOTE CAROUSEL ENHANCEMENTS
   ======================================== */

.quote-carousel {
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.quote-text {
  animation: fadeInUp 0.8s ease;
}

.quote-author {
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* ========================================
   13. MOTION BLUR ON SCROLL (Subtle)
   ======================================== */

.hero-landing.scrolling .hero-image-card {
  filter: blur(0.5px);
  transition: filter 0.1s ease;
}

.hero-landing:not(.scrolling) .hero-image-card {
  filter: blur(0);
  transition: filter 0.3s ease;
}

/* ========================================
   14. FLOATING ANIMATION
   ======================================== */

.hero-badge {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0); 
  }
  50% { 
    transform: translateY(-8px); 
  }
}

/* ========================================
   15. RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  /* Reduce animation intensity on mobile */
  .hero-image-card img {
    animation: kenBurns 30s ease-in-out infinite alternate;
  }
  
  .hero-image-card:hover {
    transform: translateY(-6px) scale(1.01);
  }
  
  /* Disable tilt on mobile */
  .feature-card {
    transform-style: flat;
  }
  
  /* Reduce glow effects */
  .hero-cta {
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
  }
}

/* ========================================
   16. PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Use GPU acceleration */
.hero-image-card,
.feature-card,
.hero-cta,
.stat-item-hero {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-image-card img {
    animation: none;
  }
}

/* ========================================
   17. LOADING STATE ANIMATIONS
   ======================================== */

.hero-landing.loading {
  opacity: 0;
  transform: translateY(20px);
}

.hero-landing.loaded {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ========================================
   18. MICRO-INTERACTIONS
   ======================================== */

/* Button press effect */
.hero-cta:active {
  transform: translateY(0) scale(0.98);
}

/* Feature card press effect */
.feature-card:active {
  transform: scale(0.98);
}

/* Stat item hover */
.stat-item-hero {
  transition: transform 0.3s ease;
}

.stat-item-hero:hover {
  transform: translateY(-4px);
}

/* Quote dot interaction */
.quote-dot {
  transition: all 0.3s ease;
  cursor: pointer;
}

.quote-dot:hover {
  transform: scale(1.3);
  opacity: 1 !important;
}

.quote-dot.active {
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.2); 
  }
}
