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

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Skeleton Loading */
@keyframes skeleton {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Staggered Entry Animation */
@keyframes slideInUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Morphing Border */
@keyframes morphBorder {
  0%,
  100% {
    border-radius: 20px;
  }
  50% {
    border-radius: 40px;
  }
}

/* Glowing Effect */
@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.6);
  }
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(140, 140, 140, 0.15), transparent);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(160, 160, 160, 0.12), transparent);
  top: 50%;
  right: -10%;
  animation-delay: 5s;
}

.orb-3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(120, 120, 120, 0.1), transparent);
  bottom: -20%;
  left: 30%;
  animation-delay: 10s;
}

/* Apply animations */
.hero-badge {
  animation: fadeInUp 0.6s ease;
}

.hero h1 {
  animation: fadeInUp 0.6s ease 0.2s backwards;
}

.hero p {
  animation: fadeInUp 0.6s ease 0.4s backwards;
}

.hero-buttons {
  animation: fadeInUp 0.6s ease 0.6s backwards;
}

.floating-card {
  animation: floatCard 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

/* Disable animation when interacting */
.floating-card.interacting {
  animation-play-state: paused;
}

.card-1 {
  animation-delay: 0s;
}

.card-2 {
  animation-delay: 2s;
}

.card-3 {
  animation-delay: 4s;
}

.benefit-icon::before {
  animation: pulse 2s ease-in-out infinite;
}

.team-photo::before {
  animation: rotate 10s linear infinite;
}

.cta-section::before {
  animation: rotate 20s linear infinite;
}

.particle {
  animation: particleFloat 10s infinite;
}

/* Neural Network Animations */
@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

@keyframes neuronPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(74, 85, 104, 0.6),
      inset 0 0 20px rgba(255, 255, 255, 0.1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(74, 85, 104, 0.8),
      inset 0 0 30px rgba(255, 255, 255, 0.15);
  }
}

@keyframes dataFlow {
  0% {
    stroke-dasharray: 5, 5;
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dasharray: 5, 5;
    stroke-dashoffset: 10;
  }
}

@keyframes networkActivation {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered activation for neural network layers */
.neural-network .layer:nth-child(1) {
  animation: networkActivation 0.8s ease 0.5s backwards;
}

.neural-network .layer:nth-child(2) {
  animation: networkActivation 0.8s ease 0.7s backwards;
}

.neural-network .layer:nth-child(3) {
  animation: networkActivation 0.8s ease 0.9s backwards;
}

.neural-network .layer:nth-child(4) {
  animation: networkActivation 0.8s ease 1.1s backwards;
}

.neural-network-container {
  animation: fadeInUp 0.8s ease 0.8s backwards;
}

/* Scroll Animation Classes (Fallback for non-supporting browsers) */
.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.section-visible {
  opacity: 1 !important;
}

/* Modern Scroll-Driven Reveals (Supported browsers) */
@supports (animation-timeline: view()) {
  .bento-card, .stat-card, .section-header {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 25%;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(30px) scale(0.98);
      filter: blur(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
    }
  }
}

/* Enhanced Bento Card Glow */
.bento-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(var(--primary-rgb), 0.1),
    transparent 40%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.bento-card:hover::after {
  opacity: 1;
}

