/* ============================================
   ENLIGHTEN CAFÉ — ANIMATIONS
   ============================================ */

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

@keyframes loadFill {
  0%   { width: 0; }
  60%  { width: 70%; }
  100% { width: 100%; }
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollSlide {
  0%   { left: -100%; }
  100% { left: 100%; }
}

@keyframes floatLeaf {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-18px) rotate(4deg); }
  66%       { transform: translateY(-8px) rotate(-3deg); }
}

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

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

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

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

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

/* ---- REVEAL ON SCROLL ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for hero */
.hero-content .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.2s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.35s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.5s; }
.hero-content .reveal:nth-child(5) { transition-delay: 0.65s; }

/* Section reveals */
.section-eyebrow,
.section-h2,
.section-sub,
.about-p,
.about-pillars,
.testi-card,
.contact-card,
.menu-card,
.booking-info > *,
.bd-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.section-eyebrow.in-view,
.section-h2.in-view,
.section-sub.in-view,
.about-p.in-view,
.about-pillars.in-view,
.testi-card.in-view,
.contact-card.in-view,
.menu-card.in-view,
.booking-info > *.in-view,
.bd-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grids */
.testi-card:nth-child(1) { transition-delay: 0.05s; }
.testi-card:nth-child(2) { transition-delay: 0.15s; }
.testi-card:nth-child(3) { transition-delay: 0.25s; }

.contact-card:nth-child(1) { transition-delay: 0.05s; }
.contact-card:nth-child(2) { transition-delay: 0.15s; }
.contact-card:nth-child(3) { transition-delay: 0.25s; }

.menu-card:nth-child(1) { transition-delay: 0.05s; }
.menu-card:nth-child(2) { transition-delay: 0.12s; }
.menu-card:nth-child(3) { transition-delay: 0.19s; }
.menu-card:nth-child(4) { transition-delay: 0.26s; }

/* ---- GALLERY ITEMS ---- */
.g-item {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.g-item.in-view {
  opacity: 1;
  transform: scale(1);
}
.g-item:nth-child(1) { transition-delay: 0.05s; }
.g-item:nth-child(2) { transition-delay: 0.1s; }
.g-item:nth-child(3) { transition-delay: 0.15s; }
.g-item:nth-child(4) { transition-delay: 0.2s; }
.g-item:nth-child(5) { transition-delay: 0.25s; }
.g-item:nth-child(6) { transition-delay: 0.3s; }

/* ---- ABOUT IMAGE ---- */
.about-img-stack {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.about-img-stack.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* ---- FORM INPUTS FOCUS GLOW ---- */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

/* ---- BUTTON RIPPLE ---- */
.btn-gold {
  position: relative;
  overflow: hidden;
}
.btn-gold .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}
@keyframes rippleEffect {
  to { transform: scale(4); opacity: 0; }
}

/* ---- MENU CARD APPEAR ---- */
.menu-card {
  animation: none;
}
.menu-card.visible {
  animation: scaleIn 0.35s ease forwards;
}

/* ---- NAV LINK ACTIVE ---- */
.nav-a.active {
  color: var(--gold);
}
.nav-a.active::after {
  transform: scaleX(1);
}

/* ---- HAMBURGER ANIMATION ---- */
.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---- SCROLL TO TOP ---- */
#scrollTop {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--gold);
  color: var(--dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 500;
  cursor: pointer;
}
#scrollTop.visible {
  opacity: 1;
  pointer-events: all;
}
#scrollTop:hover { transform: translateY(-3px); }

/* ---- BOOKING FORM ERROR ---- */
input.error,
select.error {
  border-color: #e57373 !important;
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

/* ---- PAGE TRANSITIONS ---- */
body.page-loaded .hero-content {
  animation: fadeUp 0.9s ease forwards;
}