/* 
 * Animations for domain.com
 * CSS-only animations as specified in the requirements
 */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

/* Staggered Fade In for Lists */
.stagger-fade-in > * {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade-in > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-fade-in > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-fade-in > *:nth-child(8) { animation-delay: 0.8s; }

/* Button Hover Glow Effect */
@keyframes buttonGlow {
  0% {
    box-shadow: 0 0 5px rgba(0, 245, 212, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.6);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 245, 212, 0.3);
  }
}

.btn-primary:hover {
  animation: buttonGlow 2s infinite;
}

.btn-accent:hover {
  animation: buttonGlow 2s infinite;
}

/* Testimonial Slider Animation */
@keyframes testimonialSlide {
  0% {
    transform: translateX(0);
  }
  33.33% {
    transform: translateX(0);
  }
  36.33% {
    transform: translateX(-100%);
  }
  66.66% {
    transform: translateX(-100%);
  }
  69.66% {
    transform: translateX(-200%);
  }
  99.99% {
    transform: translateX(-200%);
  }
  100% {
    transform: translateX(0);
  }
}

.testimonial-slider {
  width: 300%;
  display: flex;
  animation: testimonialSlide 30s infinite;
}

.testimonial-slider:hover {
  animation-play-state: paused;
}

/* Service cards have no animations */

/* Gentle Parallax Effect */
.parallax-bg {
  transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

/* Header Scroll Effect */
@keyframes headerShrink {
  from {
    padding: 2rem 0;
    background-color: rgba(28, 28, 28, 0.95);
  }
  to {
    padding: 1rem 0;
    background-color: rgba(28, 28, 28, 0.98);
  }
}

.site-header.scrolled {
  animation: headerShrink 0.3s forwards;
}

/* Service Icon Pulse */
@keyframes iconPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.service-icon:hover {
  animation: iconPulse 2s infinite;
}

/* Reveal Animation for Sections */
@keyframes revealSection {
  from {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    opacity: 0;
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
}

.reveal-section {
  animation: revealSection 1s forwards;
}

/* Apply animations to elements when they enter viewport */
.hero-content {
  opacity: 0;
  animation: fadeIn 1.2s ease forwards 0.3s;
}

.service-card, .benefit-item, .price-card {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

/* Stagger animations for multiple elements */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.3s; }
.service-card:nth-child(3) { animation-delay: 0.5s; }

.benefit-item:nth-child(1) { animation-delay: 0.1s; }
.benefit-item:nth-child(2) { animation-delay: 0.2s; }
.benefit-item:nth-child(3) { animation-delay: 0.3s; }
.benefit-item:nth-child(4) { animation-delay: 0.4s; }
.benefit-item:nth-child(5) { animation-delay: 0.5s; }
.benefit-item:nth-child(6) { animation-delay: 0.6s; }
.benefit-item:nth-child(7) { animation-delay: 0.7s; }
.benefit-item:nth-child(8) { animation-delay: 0.8s; }

/* Button pulse animation for CTA */
@keyframes ctaPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn-accent {
  animation: ctaPulse 2s infinite;
}
