/**
 * HOMEPAGE EFFECTS MODULE
 * Patient Analog - Subtle CSS Animations
 *
 * This is a standalone module - safe to remove/modify without breaking the site.
 * All effects use CSS only - zero JavaScript, zero performance impact.
 *
 * To disable: simply remove the <link> tag from index.html
 * To modify: edit values below
 */

/* ============================================
   FLOATING PARTICLES (Pure CSS)
   Subtle background particles that float upward
   ============================================ */

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero-particles::before,
.hero-particles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(0, 255, 200, 0.4);
  border-radius: 50%;
  animation: float-particle 15s infinite ease-in-out;
}

.hero-particles::before {
  left: 20%;
  animation-delay: 0s;
}

.hero-particles::after {
  left: 70%;
  animation-delay: 5s;
}

/* Additional particles via pseudo-elements on hero container */
.particle-1, .particle-2, .particle-3, .particle-4, .particle-5 {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(0, 255, 200, 0.3);
  border-radius: 50%;
  pointer-events: none;
  animation: float-particle 20s infinite ease-in-out;
}

.particle-1 { left: 10%; animation-delay: 0s; }
.particle-2 { left: 30%; animation-delay: 3s; }
.particle-3 { left: 50%; animation-delay: 6s; }
.particle-4 { left: 75%; animation-delay: 9s; }
.particle-5 { left: 90%; animation-delay: 12s; }

@keyframes float-particle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
    transform: translateY(80vh) scale(1);
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-10vh) scale(0.5);
    opacity: 0;
  }
}


/* ============================================
   SUBTLE GLOW PULSE
   Adds gentle pulsing glow to main title
   ============================================ */

.hero-title-glow {
  animation: title-glow 4s ease-in-out infinite;
}

@keyframes title-glow {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(255, 255, 255, 0.3),
      0 0 40px rgba(0, 255, 200, 0.1);
  }
  50% {
    text-shadow:
      0 0 30px rgba(255, 255, 255, 0.5),
      0 0 60px rgba(0, 255, 200, 0.2),
      0 0 80px rgba(0, 255, 200, 0.1);
  }
}


/* ============================================
   CTA BUTTON SHIMMER
   Subtle shine effect on hover
   ============================================ */

.cta-shimmer {
  position: relative;
  overflow: hidden;
}

.cta-shimmer::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 ease;
}

.cta-shimmer:hover::before {
  left: 100%;
}


/* ============================================
   GRADIENT BACKGROUND SHIFT
   Very subtle color movement in hero bg
   ============================================ */

.hero-gradient-shift {
  animation: gradient-shift 30s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ============================================
   NEWS CARD HOVER LIFT
   Cards lift slightly on hover
   ============================================ */

.news-card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 255, 200, 0.15);
}


/* ============================================
   BIOMETRIC SCANNER PULSE
   Pulse effect for the biometric widget
   ============================================ */

.biometric-pulse {
  animation: biometric-pulse 2s ease-in-out infinite;
}

@keyframes biometric-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}


/* ============================================
   TICKER GRADIENT FADE
   Smooth fade on edges of scrolling ticker
   ============================================ */

.ticker-fade-edges::before,
.ticker-fade-edges::after {
  content: '';
  position: absolute;
  top: 0;
  width: 60px;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.ticker-fade-edges::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-color, #000814), transparent);
}

.ticker-fade-edges::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-color, #000814), transparent);
}


/* ============================================
   STAT NUMBER COUNT-UP EFFECT
   Makes numbers appear to "pop" on load
   ============================================ */

.stat-pop {
  animation: stat-pop 0.6s ease-out forwards;
  opacity: 0;
}

.stat-pop:nth-child(1) { animation-delay: 0.2s; }
.stat-pop:nth-child(2) { animation-delay: 0.4s; }
.stat-pop:nth-child(3) { animation-delay: 0.6s; }

@keyframes stat-pop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}


/* ============================================
   REDUCED MOTION SUPPORT
   Respects user's system preferences
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .hero-particles::before,
  .hero-particles::after,
  .particle-1, .particle-2, .particle-3, .particle-4, .particle-5 {
    animation: none;
  }

  .hero-title-glow {
    animation: none;
  }

  .hero-gradient-shift {
    animation: none;
  }

  .biometric-pulse {
    animation: none;
  }

  .stat-pop {
    animation: none;
    opacity: 1;
  }
}
