/* =====================================================================
   animations.css — motion: mascot blink, steam, marquee, reveals
   All non-essential motion respects prefers-reduced-motion.
   ===================================================================== */

/* ---------- Mascot — reverent illuminated chilli (NO blink/wink) ---------- */
@keyframes halo-shimmer {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.78; transform: scale(1.04); }
}
.mascot__halo {
  transform-origin: center;
  transform-box: fill-box;
  animation: halo-shimmer 5.5s ease-in-out infinite;
}

@keyframes ray-glow {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.78; }
}
.mascot__rays { animation: ray-glow 5.5s ease-in-out infinite; }

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.mascot { animation: mascot-bob 8s ease-in-out infinite; }

/* ---------- Steam wisps ---------- */
@keyframes steam-rise {
  0%   { transform: translateY(0) scaleX(1);   opacity: 0; }
  25%  { opacity: 0.7; }
  100% { transform: translateY(-32px) scaleX(1.6); opacity: 0; }
}
.steam-pot .wisp {
  transform-origin: center bottom;
  animation: steam-rise 2.4s ease-out infinite;
}
.steam-pot .wisp--2 { animation-delay: 0.7s; }
.steam-pot .wisp--3 { animation-delay: 1.4s; }

/* ---------- Marquee ---------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Scribble draw ---------- */
@keyframes scribble-draw {
  to { stroke-dashoffset: 0; }
}
.scribble path,
.brushstroke path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
.is-visible .scribble path,
.is-visible .brushstroke path,
.hero.is-visible .brushstroke path {
  animation: scribble-draw 1.4s ease-out forwards 0.3s;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.7s var(--ease-spring);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }
.reveal--delay-4 { transition-delay: 0.32s; }

/* ---------- Card flip-in for menu cards ---------- */
@keyframes card-pop {
  0%   { opacity: 0; transform: translateY(20px) rotate(-1deg) scale(0.96); }
  100% { opacity: 1; transform: translateY(0)     rotate(0)    scale(1); }
}
.menu-card { animation: card-pop 0.5s var(--ease-spring) both; }
.menu-card:nth-child(2n) { animation-delay: 0.05s; }
.menu-card:nth-child(3n) { animation-delay: 0.1s; }
.menu-card:nth-child(4n) { animation-delay: 0.15s; }

/* ---------- Loading shimmer ---------- */
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
.loading-pulse { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- prefers-reduced-motion guard ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ticker__track { animation: none; }
  .mascot, .mascot__halo, .mascot__rays, .steam-pot .wisp { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .scribble path, .brushstroke path { stroke-dashoffset: 0; }
}
