@import url(styles.css);

/* Particles background */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background: #f97316;
  border-radius: 50%;
  opacity: 0.2;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.4;
  }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for grids */
.animate-on-scroll .solution-card,
.animate-on-scroll .feature-card,
.animate-on-scroll .flow-step {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated .solution-card,
.animate-on-scroll.animated .feature-card,
.animate-on-scroll.animated .flow-step {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.animated .solution-card:nth-child(1) {
  transition-delay: 0.1s;
}
.animate-on-scroll.animated .solution-card:nth-child(2) {
  transition-delay: 0.2s;
}
.animate-on-scroll.animated .solution-card:nth-child(3) {
  transition-delay: 0.3s;
}
.animate-on-scroll.animated .solution-card:nth-child(4) {
  transition-delay: 0.4s;
}
.animate-on-scroll.animated .solution-card:nth-child(5) {
  transition-delay: 0.5s;
}
.animate-on-scroll.animated .solution-card:nth-child(6) {
  transition-delay: 0.6s;
}

.animate-on-scroll.animated .feature-card:nth-child(1) {
  transition-delay: 0.1s;
}
.animate-on-scroll.animated .feature-card:nth-child(2) {
  transition-delay: 0.2s;
}
.animate-on-scroll.animated .feature-card:nth-child(3) {
  transition-delay: 0.3s;
}
.animate-on-scroll.animated .feature-card:nth-child(4) {
  transition-delay: 0.4s;
}
.animate-on-scroll.animated .feature-card:nth-child(5) {
  transition-delay: 0.5s;
}
.animate-on-scroll.animated .feature-card:nth-child(6) {
  transition-delay: 0.6s;
}

.animate-on-scroll.animated .flow-step:nth-child(1) {
  transition-delay: 0.1s;
}
.animate-on-scroll.animated .flow-step:nth-child(3) {
  transition-delay: 0.2s;
}
.animate-on-scroll.animated .flow-step:nth-child(5) {
  transition-delay: 0.3s;
}
.animate-on-scroll.animated .flow-step:nth-child(7) {
  transition-delay: 0.4s;
}
.animate-on-scroll.animated .flow-step:nth-child(9) {
  transition-delay: 0.5s;
}

/* Counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-number.counting {
  animation: countUp 0.8s ease-out;
}

/* Hover effects */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

/* Pulse animation for important elements */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(241, 136, 5, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(241, 136, 5, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(241, 136, 5, 0);
  }
}

.btn-primary:hover {
  animation: pulse 1.5s infinite;
}

/* Loading animations */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.loading {
  background: linear-gradient(90deg, var(--peach) 25%, rgba(254, 228, 174, 0.5) 50%, var(--peach) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn:focus,
.nav-links a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .particles {
    display: none;
  }
}
