/* ============================================================
   UFlag — Animations
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Elements start hidden, JS toggles .in-view via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.in-view { opacity: 1; transform: translateX(0); }

/* Stagger helper — apply alongside .reveal, JS sets --d per child */
.reveal { transition-delay: var(--d, 0s); }

.hero-content h1,
.hero-content p,
.hero-content .hero-actions {
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-content p { animation-delay: 0.12s; }
.hero-content .hero-actions { animation-delay: 0.24s; }

/* Glow hover used on premium CTA elements */
.hover-glow { transition: box-shadow var(--transition), transform var(--transition); }
.hover-glow:hover { box-shadow: 0 0 40px var(--color-accent-glow); }

/* Skeleton shimmer for image placeholders while loading */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.img-skeleton {
  background: linear-gradient(90deg, #151515 25%, #1e1e1e 37%, #151515 63%);
  background-size: 800px 100%;
  animation: shimmer 1.6s linear infinite;
}

/* ---------- Page transition (fade on internal navigation) ---------- */
body { transition: opacity 0.22s ease; }
body.page-leaving { opacity: 0; }

/* ---------- Button ripple ---------- */
.btn, .btn-whatsapp, .pd-option-btn, .category-card, .category-card-body .btn { position: relative; overflow: hidden; }

/* `.ripple-fx` is kept here purely as a safety net: any ripple span, whatever
   class it uses, must be taken out of the normal document flow. Otherwise it
   is laid out as a flex item inside the button and visibly resizes it. */
.ripple-el,
.ripple-fx {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  pointer-events: none;
  flex: 0 0 auto;
  z-index: 0;
  animation: rippleAnim 0.65s ease-out forwards;
}
@keyframes rippleAnim {
  to { transform: scale(2.6); opacity: 0; }
}

/* ---------- Floating WhatsApp pulse ring ---------- */
.float-whatsapp { position: fixed; }
.float-whatsapp::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  opacity: 0;
  animation: pulseRing 2.6s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.55; }
  80% { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Stat pop-in ---------- */
@keyframes statPop {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}
.stat.in-view h3 { animation: statPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ---------- Cursor spotlight (hero) ---------- */
.hero-spotlight {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 260px at var(--sx, 50%) var(--sy, 50%), rgba(84,255,77,0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
.hero:hover .hero-spotlight { opacity: 1; }

/* ---------- Animated gradient text ---------- */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.text-shine {
  background: linear-gradient(90deg, var(--color-accent) 0%, #cfffcb 25%, var(--color-accent) 50%, #cfffcb 75%, var(--color-accent) 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 5s linear infinite;
}
