/* =====================================================
   BITE CLUB BURGERS — Animations
   ===================================================== */

/* ---- Keyframes ---- */

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

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

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

@keyframes ring-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.06); }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 8px #25d366; opacity: 1; }
  50%       { box-shadow: 0 0 16px #25d366, 0 0 32px #25d366; opacity: 0.7; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

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

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

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

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

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

@keyframes slide-up {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(30px, -20px); }
  66%       { transform: translate(-20px, 20px); }
}

/* ---- Hero entrance animations ---- */

.animate-fade-up {
  opacity: 0;
  animation: fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fade-right {
  opacity: 0;
  animation: fade-right 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fade-left {
  opacity: 0;
  animation: fade-left 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-scale-in {
  opacity: 0;
  animation: scale-in 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slide-up {
  opacity: 0;
  animation: slide-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ---- Delay utilities ---- */
.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }
.delay-4 { animation-delay: 0.48s; }
.delay-5 { animation-delay: 0.60s; }

/* ---- Scroll-triggered (JS adds .is-visible) ---- */

.scroll-animate {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-animate-left.is-visible { opacity: 1; transform: translateX(0); }

.scroll-animate-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-animate-right.is-visible { opacity: 1; transform: translateX(0); }

.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-animate-scale.is-visible { opacity: 1; transform: scale(1); }

/* Stagger delay for scroll animations */
.scroll-animate:nth-child(1) { transition-delay: 0s; }
.scroll-animate:nth-child(2) { transition-delay: 0.08s; }
.scroll-animate:nth-child(3) { transition-delay: 0.16s; }
.scroll-animate:nth-child(4) { transition-delay: 0.24s; }
.scroll-animate:nth-child(5) { transition-delay: 0.32s; }
.scroll-animate:nth-child(6) { transition-delay: 0.40s; }
.scroll-animate:nth-child(7) { transition-delay: 0.48s; }
.scroll-animate:nth-child(8) { transition-delay: 0.56s; }

/* ---- Orb drift ---- */
.hero-orb-1 { animation: orb-drift 12s ease-in-out infinite; }
.hero-orb-2 { animation: orb-drift 16s ease-in-out infinite reverse; }
.hero-orb-3 { animation: orb-drift 10s ease-in-out infinite 2s; }
.about-orb  { animation: orb-drift 14s ease-in-out infinite; }
.cta-orb-1  { animation: orb-drift 12s ease-in-out infinite; }
.cta-orb-2  { animation: orb-drift 18s ease-in-out infinite reverse; }

/* ---- Skeleton shimmer for loading state ---- */
.skeleton {
  background: linear-gradient(90deg,
    rgba(157, 131, 251, 0.05) 25%,
    rgba(157, 131, 251, 0.12) 50%,
    rgba(157, 131, 251, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 8px;
}

/* ---- Button press effect ---- */
.btn-primary:active,
.btn-secondary:active,
.btn-order:active,
.btn-wsp-card:active {
  transform: scale(0.96) !important;
}

/* ---- Card hover glow ---- */
.featured-card::before,
.menu-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(157, 131, 251, 0.2), rgba(19, 61, 194, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.featured-card { position: relative; }
.menu-card { position: relative; }

.featured-card:hover::before,
.menu-card:hover::before {
  opacity: 1;
}

/* ---- Navbar progress bar ---- */
.nav-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  z-index: 2000;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(157, 131, 251, 0.6);
}

/* ---- Tab transition ---- */
.menu-grid {
  animation-duration: 0.3s;
  animation-fill-mode: both;
}
.menu-grid.tab-entering {
  animation-name: fade-up;
}

/* ---- Cart item add animation ---- */
@keyframes cart-bounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.cart-badge.bump,
.float-cart-badge.bump {
  animation: cart-bounce 0.3s ease;
}

/* ---- Reduce motion (accessibility) ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
