/**
 * EDHARA DESIGN SYSTEM - ANIMATIONS.CSS
 * Pure CSS3 Keyframe Animations & Micro-interactions
 * Respects prefers-reduced-motion
 */

/* Glowing pulse for active service indicators */
@keyframes pulse-status {
  0% {
    box-shadow: 0 0 0 0 rgba(17, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(17, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(17, 185, 129, 0);
  }
}

.status-pill {
  animation: pulse-status 2.5s infinite;
}

/* Subtle SVG line dash flow to indicate connectivity */
@keyframes dash-flow {
  to {
    stroke-dashoffset: -40;
  }
}

.anim-flow-line {
  stroke-dasharray: 6 6;
  animation: dash-flow 2s linear infinite;
}

/* Subtle floating movement for dashboard badges */
@keyframes subtle-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.anim-float {
  animation: subtle-float 4s ease-in-out infinite;
}

/* Ecosystem Node Pulse */
@keyframes node-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.08);
  }
}

.anim-node-pulse {
  transform-origin: center;
  animation: node-pulse 3s ease-in-out infinite;
}

/* Gentle page load entrance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-visual {
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}

/* Accessibility: Respect Reduced Motion */
@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;
  }

  .status-pill,
  .anim-flow-line,
  .anim-float,
  .anim-node-pulse,
  .hero-content,
  .hero-visual {
    animation: none !important;
  }
}
