/* =============================================
   ROKDA7 — Animations & Keyframes
   ============================================= */

/* =============================================
   KEYFRAME DEFINITIONS
   ============================================= */
@keyframes floatPhone {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

@keyframes pulseBadge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.65; transform: scale(1.2); }
}

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

@keyframes expandRing {
  0%   { opacity: 0.6; transform: translate(-50%, -50%) scale(0.85); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(204, 0, 32, 0.3), 0 4px 20px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 40px rgba(204, 0, 32, 0.7), 0 6px 32px rgba(0,0,0,0.5); }
}

@keyframes neonFlicker {
  0%, 94%, 100% { opacity: 1; }
  95%, 99%      { opacity: 0.82; }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50%      { transform: translateY(-12px); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

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

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

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

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

/* =============================================
   REVEAL CLASSES (IntersectionObserver)
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

.reveal-fade {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.reveal-fade.revealed {
  opacity: 1;
}

/* =============================================
   STAGGER DELAYS
   ============================================= */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.stagger > *:nth-child(5) { transition-delay: 0.4s; }
.stagger > *:nth-child(6) { transition-delay: 0.5s; }
.stagger > *:nth-child(7) { transition-delay: 0.6s; }
.stagger > *:nth-child(8) { transition-delay: 0.7s; }

/* =============================================
   NAMED ANIMATION CLASSES
   ============================================= */
.anim-glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

.anim-neon-flicker {
  animation: neonFlicker 6s infinite;
}

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

.anim-bounce {
  animation: bounce 2s infinite;
}

.anim-spin {
  animation: spin 1s linear infinite;
}

.anim-ping {
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.anim-slide-in-up {
  animation: slideInUp 0.6s ease both;
}

.anim-scale-in {
  animation: scaleIn 0.4s ease both;
}

.anim-fade-in {
  animation: fadeIn 0.5s ease both;
}

.anim-gradient {
  background-size: 200% 200%;
  animation: gradient-x 4s ease infinite;
}

.card-neon {
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.card-neon:hover {
  box-shadow: 0 0 24px rgba(204,0,32,0.55), 0 8px 32px rgba(0,0,0,0.6);
  border-color: rgba(204,0,32,0.8);
  transform: translateY(-4px);
}

/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.04) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* =============================================
   BUTTON RIPPLE EFFECT
   ============================================= */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.15);
  transform: scale(0);
  pointer-events: none;
}
.btn-ripple.rippling::after {
  animation: ripple 0.6s linear;
}

/* =============================================
   SHIMMER HIGHLIGHT
   ============================================= */
.shimmer-highlight {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.06) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
}

/* =============================================
   PAGE TRANSITION
   ============================================= */
.page-transition {
  animation: fadeIn 0.4s ease;
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(204,0,32,0.2);
  border-top-color: var(--red-hot);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* =============================================
   COUNTER ANIMATION
   ============================================= */
.counter-val {
  animation: countUp 0.5s ease both;
}

/* =============================================
   PROGRESS BAR
   ============================================= */
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red-primary), var(--red-hot));
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  width: 0%;
}
.progress-fill.animated { width: var(--progress-width, 75%); }

/* =============================================
   CURSOR GLOW (DESKTOP)
   ============================================= */
@media (hover: hover) {
  .btn-red {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
}

/* =============================================
   PREFERS REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none; }
  .phone-mockup { animation: none; }
  .anim-glow-pulse { animation: none; }
  .anim-neon-flicker { animation: none; }
  .anim-float { animation: none; }
  .anim-bounce { animation: none; }
  .anim-spin { animation: none; }
  .anim-ping { animation: none; }
  .ring { animation: none; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Prevent horizontal overflow from translateX reveal animations on mobile */
@media (max-width: 768px) {
  .reveal-right { transform: translateX(0); opacity: 0; }
  .reveal-left  { transform: translateX(0); opacity: 0; }
}
