/* ===================================
   WILS SERVICES - ANIMATIONS LIBRARY
   Phase 2: Staggered & Scroll Animations
   Keyframes for premium motion
   =================================== */

/* ================================
   1. ENTRANCE ANIMATIONS
   ================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ================================
   2. INTERACTIVE ANIMATIONS
   ================================ */

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.25);
  }
  50% {
    box-shadow: 0 0 40px rgba(22, 163, 74, 0.5);
  }
}

@keyframes buttonHoverGlow {
  0%, 100% {
    box-shadow: 
      0 4px 15px rgba(22, 163, 74, 0.3),
      0 0 20px rgba(22, 163, 74, 0.2);
  }
  50% {
    box-shadow: 
      0 6px 20px rgba(22, 163, 74, 0.4),
      0 0 30px rgba(22, 163, 74, 0.3);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes cardLift {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ================================
   3. LOADING & PROGRESS ANIMATIONS
   ================================ */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes slideProgressBar {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* ================================
   4. SCROLL REVEAL ANIMATIONS
   ================================ */

.reveal-animated {
  animation: fadeInUp 0.6s var(--ease-smooth) forwards;
}

.carousel-card.reveal-animated {
  animation: slideUp 0.6s var(--ease-smooth) forwards;
}

.prod-card.reveal-animated {
  animation: slideUp 0.6s var(--ease-smooth) forwards;
}

.testi-card.reveal-animated {
  animation: slideUp 0.6s var(--ease-smooth) forwards;
}

.how-step.reveal-animated {
  animation: slideUp 0.6s var(--ease-smooth) forwards;
}

.ftab.reveal-animated {
  animation: slideUp 0.6s var(--ease-smooth) forwards;
}

/* ================================
   5. PARALLAX & SCROLL EFFECTS
   ================================ */

@keyframes floatingElement {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes driftLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-20px);
  }
}

@keyframes driftRight {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(20px);
  }
}

/* ================================
   6. TEXT ANIMATIONS
   ================================ */

@keyframes textShimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes textGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes wordWave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ================================
   7. ICON ANIMATIONS
   ================================ */

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes iconRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 0px rgba(22, 163, 74, 0.2));
  }
  50% {
    transform: translateY(-15px);
    filter: drop-shadow(0 10px 20px rgba(22, 163, 74, 0.3));
  }
}

/* ================================
   8. BACKGROUND ANIMATIONS
   ================================ */

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes backgroundPulse {
  0%, 100% {
    background-color: rgba(240, 253, 244, 1);
  }
  50% {
    background-color: rgba(240, 253, 244, 0.8);
  }
}

/* ================================
   9. MODAL & OVERLAY ANIMATIONS
   ================================ */

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

@keyframes modalClose {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(50px);
  }
}

/* ================================
   10. BUTTON ANIMATIONS
   ================================ */

@keyframes buttonPress {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes buttonHoverShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes underlineSlide {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

/* ================================
   11. STAGGER ANIMATIONS
   ================================ */

/* Stagger for items in a list */
.stagger-item {
  animation: fadeInUp 0.6s var(--ease-smooth) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.2s; }
.stagger-item:nth-child(4) { animation-delay: 0.3s; }
.stagger-item:nth-child(5) { animation-delay: 0.4s; }
.stagger-item:nth-child(6) { animation-delay: 0.5s; }
.stagger-item:nth-child(7) { animation-delay: 0.6s; }
.stagger-item:nth-child(8) { animation-delay: 0.7s; }

/* ================================
   12. HOVER STATE ANIMATIONS
   ================================ */

@keyframes hoverLift {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

@keyframes hoverShadowExpand {
  0% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  100% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  }
}

@keyframes hoverScaleSmall {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

/* ================================
   13. ERROR & SUCCESS ANIMATIONS
   ================================ */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

@keyframes successBounce {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes errorFlash {
  0%, 100% { background-color: #fca5a5; }
  50% { background-color: #fecaca; }
}

/* ================================
   14. COMPLEX STAGGERED SEQUENCES
   ================================ */

@keyframes contentRevealHero {
  0% {
    opacity: 0;
    transform: translate(0, 30px);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes contentRevealStagger {
  0% {
    opacity: 0;
    transform: translate(20px, 0);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

/* ================================
   15. PAGE TRANSITION ANIMATIONS
   ================================ */

@keyframes pageLoad {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes pageUnload {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ================================
   16. UTILITY ANIMATION CLASSES
   ================================ */

.animate-fade-in {
  animation: fadeInUp 0.6s var(--ease-smooth);
}

.animate-fade-in-delay-1 {
  animation: fadeInUp 0.6s var(--ease-smooth) 0.1s both;
}

.animate-fade-in-delay-2 {
  animation: fadeInUp 0.6s var(--ease-smooth) 0.2s both;
}

.animate-fade-in-delay-3 {
  animation: fadeInUp 0.6s var(--ease-smooth) 0.3s both;
}

.animate-slide-up {
  animation: slideUp 0.6s var(--ease-smooth);
}

.animate-scale-in {
  animation: scaleIn 0.5s var(--ease-smooth);
}

.animate-pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

.animate-bounce {
  animation: iconBounce 1s ease-in-out infinite;
}

.animate-spin {
  animation: spin 2s linear infinite;
}

.animate-float {
  animation: floatingElement 3s ease-in-out infinite;
}

/* ================================
   17. MICRO-INTERACTION ANIMATIONS
   ================================ */

/* Checkbox animation */
@keyframes checkmark {
  0% {
    stroke-dashoffset: 50;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

/* Toggle switch */
@keyframes toggleSwitch {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(20px);
  }
}

/* Expand collapse */
@keyframes expandCollapse {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 500px;
    opacity: 1;
  }
}

/* ================================
   18. PERFORMANCE OPTIMIZED
   ================================ */

/* GPU acceleration */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================
   19. TRANSITION UTILITIES
   ================================ */

.transition-fast {
  transition: all var(--duration-fast) var(--ease-smooth);
}

.transition-base {
  transition: all var(--duration-base) var(--ease-smooth);
}

.transition-medium {
  transition: all var(--duration-medium) var(--ease-smooth);
}

.transition-slow {
  transition: all var(--duration-slow) var(--ease-smooth);
}

.transition-none {
  transition: none;
}

/* ================================
   20. Z-INDEX MANAGEMENT
   ================================ */

.z-nav { z-index: 200; }
.z-modal-backdrop { z-index: 500; }
.z-modal { z-index: 510; }
.z-tooltip { z-index: 1000; }
.z-notification { z-index: 2000; }
