/* Si Mbok motion layer: transform + opacity only, no libraries.
   Everything sits behind prefers-reduced-motion, so the page stays fully static for people who ask for that. */

@media (prefers-reduced-motion: no-preference) {

  /* ---------- Hero entrance (on load) ---------- */
  .js .hero-copy > * { animation: sm-rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .js .hero-copy > :nth-child(1) { animation-delay: .10s; }
  .js .hero-copy > :nth-child(2) { animation-delay: .20s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .32s; }
  .js .hero-copy > :nth-child(4) { animation-delay: .44s; }
  .js .hero-copy > :nth-child(5) { animation-delay: .56s; }

  .js .hero-photo { animation: sm-pop 1.1s .15s cubic-bezier(.2,.8,.2,1) both; }
  .js .float-card {
    animation: sm-slide 0.9s .75s cubic-bezier(.2,.8,.2,1) both,
               sm-float 6s 1.7s ease-in-out infinite;
  }

  @keyframes sm-rise  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes sm-pop   { from { opacity: 0; transform: scale(.9) rotate(-3deg); } to { opacity: 1; transform: none; } }
  @keyframes sm-slide { from { opacity: 0; transform: translate(-24px, 16px); } to { opacity: 1; transform: none; } }
  @keyframes sm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

  /* ---------- Scroll reveal (classes set by motion.js) ---------- */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js [data-reveal="zoom"] { transform: scale(.94); }
  .js [data-reveal="left"] { transform: translateX(-32px); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* ---------- Small premium touches ---------- */
  /* Light sweep across primary buttons on hover */
  .btn-primary, .btn-light { position: relative; overflow: hidden; isolation: isolate; }
  .btn-primary::after, .btn-light::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s ease;
  }
  .btn-primary:hover::after, .btn-light:hover::after { transform: translateX(120%); }

  /* Photos breathe a little on card hover */
  .menu-card .ph > img, .cat-card .ph > img, .gal-item .ph > img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  .menu-card:hover .ph > img, .cat-card:hover .ph > img, .gal-item:hover .ph > img { transform: scale(1.07); }

  /* Promo seal wobbles slowly */
  .seal { animation: sm-wobble 5s ease-in-out infinite; }
  @keyframes sm-wobble { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(-4deg) scale(1.04); } }

  /* WhatsApp button sends out a soft ring when the CTA arrives */
  .cta-actions.is-in .btn-light { animation: sm-ring 1.6s .6s 2 ease-out; }
  @keyframes sm-ring {
    0% { box-shadow: 0 8px 20px rgba(29,20,16,.14), 0 0 0 0 rgba(255,255,255,.7); }
    100% { box-shadow: 0 8px 20px rgba(29,20,16,.14), 0 0 0 18px rgba(255,255,255,0); }
  }

  /* Header gains depth once the hero is behind it */
  .nav { transition: box-shadow .3s ease, background-color .3s ease; }
  .nav.is-scrolled { background: rgba(255,248,238,.97); box-shadow: 0 8px 24px rgba(29,20,16,.08); }

  /* ---------- Scroll-driven effects (Chrome, Edge, Safari 26+; others simply skip) ---------- */
  @supports (animation-timeline: scroll()) {
    /* Reading progress bar under the header */
    .nav::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
      background: linear-gradient(90deg, #FFB627, #F26A1B);
      transform-origin: 0 50%; transform: scaleX(0);
      animation: sm-progress linear both; animation-timeline: scroll(root);
    }
    @keyframes sm-progress { to { transform: scaleX(1); } }

    /* Hero photo zooms in as you scroll past it */
    .hero-photo > img { animation: sm-hero-zoom linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes sm-hero-zoom { to { transform: scale(1.18); } }

    /* Gentle parallax inside large photos */
    .promo-art .ph > img, .story-photo .ph > img {
      animation: sm-parallax linear both; animation-timeline: view(); animation-range: cover;
    }
    @keyframes sm-parallax { from { transform: translateY(-7%) scale(1.16); } to { transform: translateY(7%) scale(1.16); } }
  }
}
