/* ============================================================
   SHAMS AL GHAIL CAFETERIA — animations.css
   ============================================================ */

/* ---------- AOS Custom Overrides ---------- */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ---------- Fade In Up ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Fade In Left/Right ---------- */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Scale In ---------- */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- Glow Pulse ---------- */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(201,146,42,.2); }
  50%       { box-shadow: 0 0 40px rgba(201,146,42,.5); }
}

/* ---------- Shimmer ---------- */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold-light) 30%,
    #fff6d0 50%,
    var(--gold-light) 70%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ---------- Float ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.float-anim { animation: float 5s ease-in-out infinite; }

/* ---------- Rotate Slow ---------- */
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Bounce Dot ---------- */
@keyframes bounceDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(-8px); opacity: .6; }
}

/* ---------- Counter ---------- */
.counter-wrap { transition: all .3s ease; }

/* ---------- Hero Entrance Sequence ---------- */
.hero-content .hero-eyebrow   { animation: fadeInUp .8s .2s both; }
.hero-content .hero-title     { animation: fadeInUp .8s .4s both; }
.hero-content .hero-tagline   { animation: fadeInUp .8s .55s both; }
.hero-content .hero-desc      { animation: fadeInUp .8s .65s both; }
.hero-content .hero-cta       { animation: fadeInUp .8s .75s both; }
.hero-content .hero-stats     { animation: fadeInUp .8s .9s both; }
.hero-image-frame             { animation: scaleIn .9s .5s both; }

/* ---------- Nav Entrance ---------- */
#mainNav { animation: fadeInUp .6s .1s both; }

/* ---------- Stagger Children ---------- */
.stagger > *:nth-child(1) { animation-delay: .1s !important; }
.stagger > *:nth-child(2) { animation-delay: .2s !important; }
.stagger > *:nth-child(3) { animation-delay: .3s !important; }
.stagger > *:nth-child(4) { animation-delay: .4s !important; }
.stagger > *:nth-child(5) { animation-delay: .5s !important; }
.stagger > *:nth-child(6) { animation-delay: .6s !important; }

/* ---------- Hover Micro-interactions ---------- */
.hover-lift {
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(28,10,0,.18);
}

/* ---------- Section Reveal (scroll-triggered via JS + class) ---------- */
.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal-hidden.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Loader ---------- */
#pageLoader {
  position: fixed;
  inset: 0;
  background: var(--roast);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity .5s ease, visibility .5s ease;
}
#pageLoader.hidden { opacity: 0; visibility: hidden; }

.loader-logo {
  width: 80px;
  animation: float 2s ease-in-out infinite;
}
.loader-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: .1em;
}
.loader-dots {
  display: flex;
  gap: .5rem;
}
.loader-dot {
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
}
.loader-dot:nth-child(1) { animation: bounceDot .9s .0s infinite; }
.loader-dot:nth-child(2) { animation: bounceDot .9s .15s infinite; }
.loader-dot:nth-child(3) { animation: bounceDot .9s .3s infinite; }

/* ---------- Gold Divider Ornament ---------- */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.ornament-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,146,42,.4), transparent);
}
.ornament-divider .diamond {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .shimmer-text {
    -webkit-text-fill-color: var(--gold);
    background: none;
  }
}