/* ==========================================================================
   COMMUNITY SUPPORT HUB - ANIMATIONS & TRANSITIONS STYLESHEET
   ========================================================================== */

/* 1. KEYFRAME DEFINITIONS */
@keyframes floatSubtle {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(202, 78, 121, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(202, 78, 121, 0);
  }
}

@keyframes sheenSweep {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

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

@keyframes bounceSubtle {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(-3px);
  }
}

/* 2. SCROLL REVEAL UTILITY CLASSES */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-zoom {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Activated Scroll Reveal State */
.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-zoom.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Mobile & Tablet Overflow Prevention for Horizontal Reveals */
@media (max-width: 1024px) {
  .reveal-left,
  .reveal-right {
    transform: translateY(24px);
  }
  .reveal-left.active,
  .reveal-right.active {
    transform: translateY(0);
  }
}

/* 3. CONTINUOUS IDLE ANIMATIONS */
.animate-float {
  animation: floatSubtle 5s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

.animate-rotate-slow {
  animation: rotateSlow 25s linear infinite;
}

/* Sheen effect on hover for primary CTA */
.btn-sheen::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
}
.btn-sheen:hover::after {
  animation: sheenSweep 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reduced motion support for accessibility */
@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;
  }
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-zoom {
    opacity: 1 !important;
    transform: none !important;
  }
}
