/* Motion layer — loaded only by the browsing pages (home, shop,
   product). The cart, checkout and the roastery view keep the plain
   styles.css and stay completely still.

   Roastery pace: unhurried, mechanical. Two moves, both with a job:
   - bag tiles wipe in once as the grid scrolls (a shelf being faced),
   - a bag turns slightly under the cursor, like picking it up.
   No smooth-scroll library, no parallax, no fade-up on text, and the
   roast board never animates — it's a board. The hidden state is set
   by motion.js, never by CSS, so with JS off everything just sits
   there, readable. */

/* buttons press, they don't just change colour */
.btn { transition: background-color 0.2s cubic-bezier(0.23,1,0.32,1), transform 0.15s cubic-bezier(0.23,1,0.32,1); }
.btn:active { transform: scale(0.97); }

/* size and grind pills answer a hover */
.pills label { transition: border-color 0.2s cubic-bezier(0.23,1,0.32,1), background-color 0.2s cubic-bezier(0.23,1,0.32,1); }

/* the bag wipe itself is driven from motion.js via the Web
   Animations API — a tile never carries a resting clip-path, so it
   stays visible to IntersectionObserver and clickable throughout */

/* picking the bag up: a slight turn, hover-capable devices only */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .bag-card .bag { transition: transform 0.2s cubic-bezier(0.23,1,0.32,1); }
  a.bag-card:hover .bag { transform: rotate(-1.3deg) translateY(-4px); }
}

/* ---------- reduced motion ---------- */
/* motion.js refuses to run for these folks; this stills the pure-CSS
   pieces too. */
@media (prefers-reduced-motion: reduce) {
  .btn, .pills label, .faq-a, .faq-x { transition: none; }
  .carousel .slide.is-active { animation: none; }
}
