/* ===== KEYFRAME ANIMATIONS - LIGHT ===== */

/* Background Animations */
@keyframes bgShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes floatIcon {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.08;
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
    opacity: 0.12;
  }
  50% {
    transform: translateY(-10px) rotate(-5deg);
    opacity: 0.1;
  }
  75% {
    transform: translateY(-30px) rotate(3deg);
    opacity: 0.12;
  }
}

@keyframes waveMove {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(-10px) translateY(5px);
  }
  50% {
    transform: translateX(0) translateY(10px);
  }
  75% {
    transform: translateX(10px) translateY(5px);
  }
}

@keyframes circlePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

@keyframes accentPulse {
  0%, 100% {
    opacity: 0.3;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-50%) scale(1.1);
  }
}

@keyframes particlesMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 100px;
  }
}

@keyframes dotFloat {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.08;
  }
  50% {
    transform: translateY(-30px);
    opacity: 0.15;
  }
}

@keyframes ctaShine {
  0% {
    transform: translateX(-100%);
  }
  50%, 100% {
    transform: translateX(100%);
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

/* Element Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.15;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.3;
  }
}

@keyframes ringPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.08;
  }
}

@keyframes ringExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 0.3;
  }
  100% {
    width: var(--final-size, 360px);
    height: var(--final-size, 360px);
    opacity: 0;
  }
}

@keyframes progressFill {
  0% {
    width: 0;
  }
  100% {
    width: var(--progress, 100%);
  }
}

/* Chart Animations */
@keyframes chartGrow {
  0% {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: bottom;
  }
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }
}

@keyframes chartDraw {
  0% {
    stroke-dashoffset: 1000;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes chartPoint {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Scroll Animations */
@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 scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* Button Glow Animation - Light */
@keyframes btnGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.35);
  }
}

/* Loading Spinner */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== UTILITY ANIMATION CLASSES ===== */

.animate-fade-in {
  animation: fadeIn var(--anim-duration-normal) ease forwards;
}

.animate-fade-in-delay {
  animation: fadeIn var(--anim-duration-slow) ease 0.3s forwards;
  opacity: 0;
}

.animate-slide-up {
  animation: slideUp var(--anim-duration-normal) ease forwards;
}

.animate-slide-up-delay {
  animation: slideUp var(--anim-duration-normal) ease 0.2s forwards;
  opacity: 0;
}

.animate-slide-up-delay-2 {
  animation: slideUp var(--anim-duration-normal) ease 0.4s forwards;
  opacity: 0;
}

.animate-slide-in-left {
  animation: slideInLeft var(--anim-duration-normal) ease forwards;
}

.animate-slide-in-right {
  animation: slideInRight var(--anim-duration-normal) ease forwards;
}

.animate-scale-in {
  animation: scaleIn var(--anim-duration-normal) ease forwards;
}

.animate-bounce-in {
  animation: bounceIn var(--anim-duration-slow) ease forwards;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--anim-duration-slow) ease, transform var(--anim-duration-slow) ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for grids */
.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; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* Button Glow Effect - Light */
.btn-glow {
  animation: btnGlow 2s ease-in-out infinite;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
  
  .bg-particles,
  .bg-floating-icons,
  .vision__particles,
  .contact__bg-pattern,
  .services__bg-pattern {
    display: none;
  }
}

/* Performance: Pause animations when not visible */
.animated-bg {
  will-change: transform;
}

.feature-card,
.service-card,
.vision-card,
.contact-card {
  will-change: transform;
}

/* Print styles - disable animations */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  
  .animated-bg,
  .bg-particles,
  .bg-floating-icons,
  .vision__particles {
    display: none !important;
  }
}