/* Animations for AI Super Hero Squad Website */

/* Text animations */
.fade-in {
  opacity: 0;
  animation: fadeIn 1.5s ease-in-out forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 1s ease-out forwards;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  animation: slideInLeft 1s ease-out forwards;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  animation: slideInRight 1s ease-out forwards;
}

.bounce-in {
  opacity: 0;
  transform: scale(0.8);
  animation: bounceIn 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

/* Staggered animations for multiple elements */
.stagger-fade-in > * {
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.3s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.5s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.7s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.9s; }

/* Hero section animations */
.hero-title {
  opacity: 0;
  transform: translateY(30px);
  animation: heroTitleAnimation 1.2s ease-out 0.5s forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: heroSubtitleAnimation 1.2s ease-out 0.8s forwards;
}

.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: heroCTAAnimation 1.2s ease-out 1.1s forwards;
}

/* Superhero card animations */
.superhero-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.superhero-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.superhero-image-container {
  overflow: hidden;
  border-radius: 8px;
}

.superhero-image {
  transition: transform 0.5s ease;
}

.superhero-image:hover {
  transform: scale(1.05);
}

/* Icon animations */
.icon-pulse {
  animation: iconPulse 2s infinite;
}

.icon-spin {
  animation: iconSpin 10s linear infinite;
}

/* Floating animation for elements */
.float {
  animation: float 6s ease-in-out infinite;
}

/* Video background overlay pulse */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
  animation: overlayPulse 8s ease-in-out infinite;
}

/* Particle effects */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
}

/* Keyframes definitions */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInLeft {
  from { 
    opacity: 0;
    transform: translateX(-50px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from { 
    opacity: 0;
    transform: translateX(50px);
  }
  to { 
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

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

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

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

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

@keyframes iconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes overlayPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.5; }
}

/* Responsive animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
