/* ==========================================================================
   MOMO RESTAURANT @ BAKKHALI — UI & Animation Upgrade
   Load AFTER site.css. Remove the <link> to undo everything in this file.
   1. Floating hero dish (borderless) + steam + garnish + parallax hooks
   2. Bestseller cards: zoom, warm glow, sliding CTA
   3. Marquee: pause on hover / touch
   4. Scroll fade-up polish
   5. Stats counter styling
   6. Contrast, spacing & soft-glass elevation polish
   All motion is transform/opacity only (GPU) and is disabled for
   prefers-reduced-motion.
   ========================================================================== */

/* ---------- 1. FLOATING HERO DISH ---------- */
.mx-float-stage {
  position: relative;
  aspect-ratio: 1 / 0.92;
  display: grid;
  place-items: center;
  isolation: isolate;
  --px: 0; --py: 0;                       /* pointer parallax, set by upgrade.js (-1 … 1) */
}
.mx-float-stage::before { display: none; } /* remove old spotlight ellipse */

/* warm light behind the dish */
.mx-float-glow {
  position: absolute; inset: 6% 4% 14%; z-index: -1; border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 170, 80, .42), rgba(224, 65, 47, .18) 55%, transparent 75%);
  filter: blur(30px);
  animation: mxGlowPulse 6s ease-in-out infinite;
  transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0);
}
@keyframes mxGlowPulse { 50% { opacity: .7; transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0) scale(1.06); } }

.mx-float-plate {
  position: relative; width: 92%;
  transform: translate3d(calc(var(--px) * var(--d, .6) * 14px), calc(var(--py) * var(--d, .6) * 10px), 0);
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.mx-float-dish {
  position: relative;
  animation: mxLevitate 6.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes mxLevitate {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.2deg); }
  50%      { transform: translate3d(0, -16px, 0) rotate(1.2deg); }
}
.mx-float-dish img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)) saturate(1.06);
  -webkit-user-drag: none; user-select: none;
}
/* soft contact shadow that breathes opposite to the dish */
.mx-float-shadow {
  position: absolute; left: 16%; right: 16%; bottom: -4%; height: 9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
  filter: blur(6px);
  animation: mxShadowBreath 6.5s ease-in-out infinite;
  z-index: -1;
}
@keyframes mxShadowBreath { 50% { transform: scale(.82); opacity: .55; } }

/* rising steam wisps above the momos */
.mx-steam { position: absolute; left: 22%; right: 18%; top: 4%; height: 46%; pointer-events: none; }
.mx-steam i {
  position: absolute; bottom: 0; width: 18%; aspect-ratio: 1 / 3.6; border-radius: 50%;
  background: radial-gradient(ellipse 46% 50% at 50% 55%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .32) 42%, transparent 72%);
  filter: blur(7px); mix-blend-mode: screen; opacity: 0;
  animation: mxSteamRise 5.4s ease-in infinite;
}
.mx-steam i:nth-child(1) { left: 4%;  animation-delay: 0s;   animation-duration: 5.2s; }
.mx-steam i:nth-child(2) { left: 22%; animation-delay: 1.1s; animation-duration: 6.1s; }
.mx-steam i:nth-child(3) { left: 40%; animation-delay: 2.3s; animation-duration: 5.6s; }
.mx-steam i:nth-child(4) { left: 58%; animation-delay: .6s;  animation-duration: 6.4s; }
.mx-steam i:nth-child(5) { left: 74%; animation-delay: 3.1s; animation-duration: 5.0s; }
.mx-steam i:nth-child(6) { left: 31%; animation-delay: 4.0s; animation-duration: 6.8s; width: 24%; }
@keyframes mxSteamRise {
  0%   { opacity: 0;   transform: translate3d(0, 30%, 0) scale(.55, .45) rotate(0deg); }
  18%  { opacity: .9; }
  55%  { opacity: .55; transform: translate3d(8px, -45%, 0) scale(.95, 1) rotate(6deg); }
  100% { opacity: 0;   transform: translate3d(-10px, -110%, 0) scale(1.6, 1.45) rotate(-8deg); }
}

/* tiny floating garnish / glow accents */
.mx-garnish {
  position: absolute; z-index: 2; border-radius: 50%; pointer-events: none;
  transform: translate3d(calc(var(--px) * var(--d, 1) * 18px), calc(var(--py) * var(--d, 1) * 14px), 0);
  transition: transform .7s cubic-bezier(.16, 1, .3, 1);
}
.mx-garnish::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: mxBob2 5s ease-in-out infinite; }
.mx-garnish.g1 { width: 16px; height: 16px; top: 14%; left: 8%; }
.mx-garnish.g1::after { background: radial-gradient(circle at 35% 35%, #ff8a6b, #d7301c 70%); box-shadow: 0 0 18px rgba(255, 90, 60, .7); }           /* chili */
.mx-garnish.g2 { width: 22px; height: 12px; top: 70%; left: 2%; border-radius: 60% 40% 60% 40%; }
.mx-garnish.g2::after { background: linear-gradient(135deg, #8fd16a, #3f8a2a); box-shadow: 0 0 12px rgba(127, 200, 90, .5); animation-delay: -1.6s; } /* herb leaf */
.mx-garnish.g3 { width: 10px; height: 10px; top: 8%; right: 12%; }
.mx-garnish.g3::after { background: radial-gradient(circle, #ffe2a8, #f2a541 70%); box-shadow: 0 0 22px 4px rgba(255, 200, 110, .65); animation-delay: -3s; } /* glow ember */
@keyframes mxBob2 { 50% { transform: translateY(-10px) rotate(14deg); } }

/* price/label chips re-anchored to the new stage */
.mx-float-stage .mx-chip { position: absolute; margin: 0; z-index: 3;
  transform: translate3d(calc(var(--px) * var(--d, 1) * 16px), calc(var(--py) * var(--d, 1) * 12px), 0);
  transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.mx-float-stage .mx-chip-top { top: 6%; left: 4%; right: auto; }
.mx-float-stage .mx-chip-bottom { bottom: 6%; right: 2%; left: auto; }

@media (max-width: 900px) {
  .mx-float-stage { max-width: 460px; width: 100%; margin: 6px auto 0; }
  .mx-float-stage .mx-chip-top { left: 0; top: 2%; }
  .mx-float-stage .mx-chip-bottom { right: 0; bottom: 4%; }
}

/* ---------- 2. BESTSELLER CARDS: zoom + warm glow + sliding CTA ----------
   (glow uses ::after — ::before is reserved for the 4:3 photo-ratio spacer used by iPhone Safari) */
.mx-dish-media { isolation: isolate; }
.mx-dish-media::after {
  content: ""; position: absolute; inset: -20%; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at 50% 60%, rgba(255, 150, 60, .38), rgba(224, 65, 47, .16) 40%, transparent 65%);
  opacity: 0; transition: opacity .55s ease; mix-blend-mode: screen;
}
.mx-dish-media img { transition: transform .9s cubic-bezier(.16, 1, .3, 1), filter .6s ease !important; }
.mx-dish-link:hover .mx-dish-media img,
.mx-dish-link:focus-visible .mx-dish-media img { transform: scale(1.07) !important; filter: saturate(1.12) brightness(1.03); }
.mx-dish-link:hover .mx-dish-media::after,
.mx-dish-link:focus-visible .mx-dish-media::after { opacity: 1; }
.mx-dish-link { position: relative; }
.mx-dish-link::after {      /* warm halo behind the whole card */
  content: ""; position: absolute; inset: 8% 6% -6%; z-index: -1; border-radius: 30px;
  background: radial-gradient(closest-side, rgba(242, 165, 65, .45), transparent);
  filter: blur(26px); opacity: 0; transition: opacity .5s ease;
}
.mx-dish-link:hover::after { opacity: 1; }
.mx-dish-cta { position: relative; overflow: hidden; }
.mx-dish-cta span { display: inline-block; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.mx-dish-link:hover .mx-dish-cta span { transform: translateX(8px); }
.mx-dish-cta::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.mx-dish-link:hover .mx-dish-cta::after { transform: scaleX(1); }

/* ---------- 3. MARQUEE: ultra smooth + pause on hover / touch ---------- */
.mx-marquee-track { will-change: transform; backface-visibility: hidden; }
.mx-marquee:hover .mx-marquee-track,
.mx-marquee.is-paused .mx-marquee-track { animation-play-state: paused !important; }
.mx-marquee { cursor: default; }

/* ---------- 4. SCROLL FADE-UP (works with site.js reveal observer) ---------- */
.mx-js [data-reveal] { will-change: opacity, transform; }
.mx-js [data-reveal].is-in { will-change: auto; }
.mx-js .mx-fade-up { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--fd, 0) * 80ms); }
.mx-js .mx-fade-up.is-in { opacity: 1; transform: none; }

/* ---------- 5. STATS COUNTER ---------- */
.mx-stats strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mx-stats span { letter-spacing: .12em; }
.mx-stats > div { transition: background .4s ease; }
.mx-stats > div:hover { background: rgba(242, 165, 65, .05); }

/* ---------- 6. CONTRAST, SPACING & SOFT-GLASS ELEVATION ---------- */
.mx-feature, .mx-quote, .mx-card, .mx-map, .mx-perks, .mx-tile, .mx-notice {
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 50px -30px rgba(0, 0, 0, .75);
}
.mx-quote, .mx-card, .mx-map {
  background: linear-gradient(160deg, rgba(34, 26, 21, .92), rgba(23, 18, 15, .92));
  border-color: rgba(244, 235, 221, .09);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.mx-quote:hover, .mx-card:hover { border-color: rgba(242, 165, 65, .28); }
.mx-dish-link { box-shadow: 0 2px 0 rgba(255, 255, 255, .6) inset, 0 18px 40px -26px rgba(70, 40, 15, .55); }
.mx-dish-media img, .mx-bento-img img, .mx-photo-btn img, .mx-gal img { image-rendering: auto; }
.mx-hero-lead, .mx-head-sub, .mx-feature p, .mx-quote figcaption span:not(.mx-avatar) { color: #cdbfac; }   /* 8.9:1 on charcoal */
.mx-section { padding-top: clamp(76px, 10vw, 132px); padding-bottom: clamp(76px, 10vw, 132px); }

/* ---------- Reduced motion: keep everything static ---------- */
@media (prefers-reduced-motion: reduce) {
  .mx-float-glow, .mx-float-dish, .mx-float-shadow, .mx-garnish::after, .mx-marquee-track { animation: none !important; }
  .mx-steam { display: none; }
  .mx-float-plate, .mx-garnish, .mx-float-stage .mx-chip { transform: none !important; }
  .mx-js .mx-fade-up { opacity: 1; transform: none; }
}


/* Performance on phones/tablets: drop effects that cost every scroll frame but are barely visible */
@media (hover: none) {
  .mx-grain { display: none !important; }                    /* full-screen film-grain layer above the page */
  .lx-tag, .mx-btn-ghost { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .lx-tag { background: rgba(11, 14, 19, .86) !important; }  /* keep the label readable without the blur */
}

/* About page: the original 2016 restaurant film in a framed player */
.mx-film { position: relative; margin: 0 auto; max-width: 960px; border-radius: 22px; overflow: hidden; background: #000;
  border: 1px solid rgba(245,158,11,.22); box-shadow: 0 34px 80px -34px rgba(0,0,0,.95); }
.mx-film-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border: 0; }
.mx-film figcaption { margin: 0; padding: 14px 18px 16px; font-size: .92rem; line-height: 1.5; color: rgba(255,255,255,.72); background: #0b0e13; border-top: 1px solid rgba(255,255,255,.06); }
