/* Makeweight motion: quiet, slow, deliberate. Everything here only runs when the visitor has not asked to reduce motion. */
@media (prefers-reduced-motion: no-preference) {
  :root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-soft: cubic-bezier(.33, 1, .68, 1); }

  /* page transitions between pages of the site (browsers that support cross-document view transitions) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: mw-page-out .22s var(--ease-soft) both; }
  ::view-transition-new(root) { animation: mw-page-in .42s var(--ease-out) both; }
  @keyframes mw-page-out { to { opacity: 0; } }
  @keyframes mw-page-in { from { opacity: 0; transform: translateY(8px); } }

  /* scroll reveal: hidden only once the script has run, so the page never stays blank without it */
  html.mw-motion [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-soft), transform .9s var(--ease-out); transition-delay: var(--d, 0s); will-change: opacity, transform; }
  html.mw-motion [data-reveal="fade"] { transform: none; }
  html.mw-motion [data-reveal="photo"] { transform: scale(.97); transition-duration: 1s, 1.4s; }
  html.mw-motion [data-reveal].in { opacity: 1; transform: none; }
  html.mw-motion [data-reveal].done { will-change: auto; }

  /* hero: a slow settle of the photo, then a gentle parallax set by the script */
  .hero-bg { animation: mw-hero-settle 2.4s var(--ease-out) both; transform-origin: 30% 60%; }
  @keyframes mw-hero-settle { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
  .hero-bg.mw-par { animation: none; }
  .editorial-photo { overflow: hidden; }
  .editorial-photo img { transition: transform 1.6s var(--ease-out); }

  /* images inside cards: a slow zoom on hover */
  .product-media, .category, .guide-image, .mega-link, .gallery-grid figure a { overflow: hidden; }
  .product-image, .category img, .guide-image img, .gallery-grid img { transition: transform 1.1s var(--ease-out); }
  .product:hover .product-image, .category:hover img, .guide:hover .guide-image img, .gallery-grid a:hover img { transform: scale(1.05); }
  .gallery-main img { transition: opacity .35s var(--ease-soft), transform 1.2s var(--ease-out); }
  .gallery-main:hover img { transform: scale(1.04); }
  .gallery-main img.mw-swap { opacity: 0; }

  /* cards lift a little */
  .product, .category, .guide, .news-card, .account-box, a.way, .file-list a { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .25s; }
  .product:hover, .category:hover, .guide:hover, .news-card:hover, a.way:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(20, 40, 60, .10); }
  .file-list a:hover { transform: translateX(-3px); }

  /* buttons: a light lift and a soft press */
  .button, .details-btn, .advice-link, .chip, .search button, .qty button { transition: background .25s, border-color .25s, color .25s, transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
  .button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 111, 168, .22); }
  .button.outline:hover { box-shadow: 0 8px 20px rgba(37, 41, 45, .16); }
  .button:active, .details-btn:active, .chip:active, .qty button:active { transform: translateY(0) scale(.98); box-shadow: none; transition-duration: .08s; }
  .button svg, .text-link svg, .mega-all svg { transition: transform .35s var(--ease-out); }
  .button:hover svg, .text-link:hover svg, .guide:hover .text-link svg, .mega-all:hover svg { transform: translateX(-3px); }

  /* links: an underline that draws in */
  .navigation .container > a, .footer-col a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 100% 85%; transition: background-size .45s var(--ease-out), color .2s; }
  .navigation .container > a:hover, .footer-col a:hover { background-size: 100% 1px; text-decoration: none; }

  /* cart badge bumps when something is added */
  .cart-count.mw-bump { animation: mw-bump .6s var(--ease-out); }
  @keyframes mw-bump { 30% { transform: scale(1.35); } 60% { transform: scale(.92); } }

  /* dialog and toast arrive softly */
  .cart-dialog[open] { animation: mw-dialog .45s var(--ease-out); }
  .cart-dialog[open]::backdrop { animation: mw-fade .35s var(--ease-soft); }
  @keyframes mw-dialog { from { opacity: 0; transform: translateX(-24px); } }
  @keyframes mw-fade { from { opacity: 0; } }

  /* FAQ answers open smoothly */
  .faq details p { animation: mw-faq .45s var(--ease-out); }
  @keyframes mw-faq { from { opacity: 0; transform: translateY(-6px); } }
}

/* the smooth-scroll library sets these on html */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
