/* =============================================================
   plorviaguide.fun – ARABIAN NIGHTS SOCIAL CASINO
   animations.css – Animation Definitions
   © 2026 Golden Mirage Gaming Ltd.
============================================================= */

/* ─── KEYFRAMES ───────────────────────────────────────────── */

/* Particle Float */
@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: var(--opacity, 0.4);
  }
  85% {
    opacity: var(--opacity, 0.3);
  }
  100% {
    transform: translateY(-20px) translateX(var(--drift, 40px)) scale(0.5);
    opacity: 0;
  }
}

/* Lantern Float */
@keyframes lanternFloat {
  0%, 100% {
    transform: translateY(0) rotate(-3deg);
  }
  25% {
    transform: translateY(-12px) rotate(2deg);
  }
  50% {
    transform: translateY(-6px) rotate(-1deg);
  }
  75% {
    transform: translateY(-16px) rotate(3deg);
  }
}

/* Scroll Bounce */
@keyframes scrollBounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(8px);
    opacity: 0.4;
  }
}

/* Portal Pulse – very subtle glow pulse */
@keyframes portalPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* Icon Glow */
@keyframes iconGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Ring Pulse */
@keyframes ringPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

/* Gold Shimmer */
@keyframes goldShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Star Twinkle */
@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Gentle Sway */
@keyframes gentleSway {
  0%, 100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

/* ─── INITIAL STATES (hidden before JS triggers) ──────────── */
.fade-in-up,
.fade-in-left,
.fade-in-right {
  opacity: 0;
}

.fade-in-up.is-visible {
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fade-in-left.is-visible {
  animation: fadeInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fade-in-right.is-visible {
  animation: fadeInRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger delays */
.stagger-1.is-visible { animation-delay: 0.05s; }
.stagger-2.is-visible { animation-delay: 0.15s; }
.stagger-3.is-visible { animation-delay: 0.25s; }
.stagger-4.is-visible { animation-delay: 0.35s; }
.stagger-5.is-visible { animation-delay: 0.45s; }
.stagger-6.is-visible { animation-delay: 0.55s; }

/* ─── HERO STARS ──────────────────────────────────────────── */
.hero-star {
  position: absolute;
  border-radius: 50%;
  background: var(--color-text-primary);
  animation: starTwinkle var(--twinkle-duration, 3s) var(--twinkle-delay, 0s) infinite ease-in-out;
}

/* ─── BORDER SHIMMER ──────────────────────────────────────── */
.game-portal-border::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(212,175,55,0) 0%,
    rgba(212,175,55,0.6) 40%,
    rgba(255,179,71,0.8) 50%,
    rgba(212,175,55,0.6) 60%,
    rgba(212,175,55,0) 100%
  );
  background-size: 200% 100%;
  animation: goldShimmer 4s linear infinite;
  opacity: 0.5;
}

/* ─── SCROLL HOVER EFFECTS ────────────────────────────────── */
.feature-card {
  will-change: transform;
}

.btn {
  will-change: transform, box-shadow;
}

/* ─── LOGO GLOW PULSE ─────────────────────────────────────── */
@keyframes logoGlow {
  0%, 100% {
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.7);
  }
}

.logo-icon {
  animation: logoGlow 3s ease-in-out infinite;
}

/* ─── MOBILE OVERLAY ENTRY ────────────────────────────────── */
.mobile-nav-link {
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.mobile-overlay.is-open .mobile-nav-link {
  animation: fadeInRight 0.4s ease forwards;
}

.mobile-overlay.is-open .mobile-nav-list li:nth-child(1) .mobile-nav-link { animation-delay: 0.05s; }
.mobile-overlay.is-open .mobile-nav-list li:nth-child(2) .mobile-nav-link { animation-delay: 0.10s; }
.mobile-overlay.is-open .mobile-nav-list li:nth-child(3) .mobile-nav-link { animation-delay: 0.15s; }
.mobile-overlay.is-open .mobile-nav-list li:nth-child(4) .mobile-nav-link { animation-delay: 0.20s; }
.mobile-overlay.is-open .mobile-nav-list li:nth-child(5) .mobile-nav-link { animation-delay: 0.25s; }

/* ─── PARALLAX DUNES ──────────────────────────────────────── */
.hero-dunes {
  animation: none;
}

/* ─── AMBIENT BACKGROUND MOVEMENT ────────────────────────── */
@keyframes ambientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ─── PERFORMANCE HINTS ───────────────────────────────────── */
.particles-container,
.palace-illustration,
.floating-lantern,
.game-portal-glow,
.story-glow-ring {
  will-change: transform, opacity;
}