/**
 * CTA Button Enhancement Component
 *
 * Adds glow hover effect, pulse animation, and click ripple to .cta-button.
 * NOTE: Base .cta-button class exists in dark-witch.css - this file adds enhancements.
 */

/* Ripple container setup (needed for absolute positioning) */
.cta-button[data-ripple] {
  position: relative;
  overflow: hidden;
}

/* Glow effect on hover */
.cta-button--glow:hover {
  /* Using rgba to match --color-accent-primary (#8b5cf6) */
  box-shadow:
    0 0 20px rgba(139, 92, 246, 0.6),
    0 0 40px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

/* Continuous pulse animation */
.cta-button--pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
  }
}

/* Ripple effect span (created dynamically by JS) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: ripple-animation 1.2s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Accessibility: disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cta-button--pulse {
    animation: none;
  }

  .cta-button--glow:hover {
    transform: none;
  }

  .ripple {
    animation: none;
    opacity: 0;
  }
}
