/* ============================================
   PIRA BITES - Animations & Transitions
   ============================================ */

/* ---- Scroll-triggered entrance ---- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for sibling cards */
.menu-grid .fade-up:nth-child(2),
.events-grid .fade-up:nth-child(2) { transition-delay: 0.08s; }

.menu-grid .fade-up:nth-child(3),
.events-grid .fade-up:nth-child(3) { transition-delay: 0.16s; }

.menu-grid .fade-up:nth-child(4),
.events-grid .fade-up:nth-child(4) { transition-delay: 0.08s; }

.menu-grid .fade-up:nth-child(5),
.events-grid .fade-up:nth-child(5) { transition-delay: 0.16s; }

.menu-grid .fade-up:nth-child(6),
.events-grid .fade-up:nth-child(6) { transition-delay: 0.24s; }

/* Gallery items stagger */
.gallery-item:nth-child(2) { transition-delay: 0.06s; }
.gallery-item:nth-child(3) { transition-delay: 0.12s; }
.gallery-item:nth-child(4) { transition-delay: 0.06s; }
.gallery-item:nth-child(5) { transition-delay: 0.12s; }
.gallery-item:nth-child(6) { transition-delay: 0.18s; }

/* ---- Hero scroll indicator bounce ---- */
@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.65;
  }
  50% {
    transform: translateX(-50%) translateY(9px);
    opacity: 1;
  }
}

/* ---- Tab switch fade ---- */
.menu-grid {
  animation: tabFadeIn 0.35s ease forwards;
}

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

/* ---- Lightbox entrance ---- */
.lightbox.open .lightbox-img {
  animation: lightboxIn 0.3s ease forwards;
}

@keyframes lightboxIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ---- Reduce motion (accessibility) ---- */
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-scroll-indicator {
    animation: none;
  }

  .menu-grid {
    animation: none;
  }

  .lightbox.open .lightbox-img {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
