/* ============================================================
   REDPULSE FOUNDATION — ANIMATION UTILITIES
   Shared across all pages
   ============================================================ */

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-left {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-right {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(192, 22, 44, 0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(192, 22, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(192, 22, 44, 0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

@keyframes orb-drift {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-30px) scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

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

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

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes drop-float {
  from { transform: translateY(-50%) rotate(-2deg); }
  to   { transform: translateY(calc(-50% - 20px)) rotate(2deg); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes scroll-down {
  0%   { opacity: 1; transform: translateY(0); }
  80%  { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0; }
}

@keyframes progress-fill {
  from { width: 0; }
}

@keyframes particle-float {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0.7; }
  33%  { transform: translateY(-30px) translateX(15px) scale(1.1); }
  66%  { transform: translateY(-15px) translateX(-10px) scale(0.9); }
  100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.7; }
}

@keyframes counter-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ── Reveal on Scroll ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.in-view {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.in-view {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-scale.in-view {
  opacity: 1;
  transform: scale(1);
}

/* Delay utilities */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ── Shimmer Loading Skeleton ─────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ── Page Transition Overlay ──────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: #0D0D0F;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-drop {
  width: 48px;
  animation: float 1.2s ease-in-out infinite;
}
.loader-drop svg path {
  fill: #C0162C;
  filter: drop-shadow(0 0 12px rgba(192,22,44,0.8));
}

/* ── Floating Blood Particles ─────────────────────────────── */
.particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(192, 22, 44, 0.15);
  animation: particle-float linear infinite;
}

/* ── Button Ripple ────────────────────────────────────────── */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* ── Glow Pulse ───────────────────────────────────────────── */
.glow-pulse {
  animation: pulse-ring 2s infinite;
}

/* ── Float Animation ──────────────────────────────────────── */
.float-anim {
  animation: float 4s ease-in-out infinite;
}
.float-slow-anim {
  animation: float-slow 6s ease-in-out infinite;
}

/* ── Animated Gradient Text ───────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #C0162C, #ff4d6d, #C0162C);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

/* ── Progress Bar ─────────────────────────────────────────── */
.animated-progress {
  animation: progress-fill 1.5s ease-out both;
}

/* ── Counter Pop on Finish ────────────────────────────────── */
.counter-done {
  animation: counter-pop 0.3s ease;
}
