/* Filo & Ferri · stati iniziali degli effetti e pezzi che esistono solo con le animazioni.
   Il primo frame della pagina è già quello dell'intro: niente scatti al caricamento.
   Con "riduci movimento" (o senza GSAP) la classe .rm mostra tutto subito. */

.js:not(.rm) [data-hero-in] { opacity: 0; transform: translateY(26px); }
.js:not(.rm) .ln > [data-hero-in] { opacity: 1; transform: translateY(108%); }
.js:not(.rm) [data-hero-media] img { transform: scale(1.12); }

.js:not(.rm) [data-reveal]:not([data-reveal=wipe]) { opacity: 0; transform: translateY(28px); }
.js:not(.rm) [data-reveal=wipe] { clip-path: inset(12% 6% 12% 6% round 22px); }
.js:not(.rm) [data-stagger]:not(.is-in) > * { opacity: 0; transform: translateY(26px); }

/* il filo che cuce la home */
.thread { position: absolute; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; overflow: visible; opacity: 0; transition: opacity 600ms ease; }
.thread.is-on { opacity: 1; }
.thread path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.thread__line { stroke: var(--amber); stroke-width: 2.6; }
.thread__shadow { stroke: rgba(29,25,18,0.12); stroke-width: 2.6; transform: translate(2px, 3px); }
.thread__ball circle { fill: var(--amber); }
.thread__ball path { fill: none; stroke: rgba(29,25,18,0.35); stroke-width: 1.2; stroke-linecap: round; }
.home { position: relative; }
@media (max-width: 1099px) { .thread { display: none; } }

/* scia del mouse */
.trail { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 250; }

/* uscita verso un'altra pagina */
main, .site-footer { transition: opacity 260ms ease, transform 260ms ease; }
.is-leaving main, .is-leaving .site-footer { opacity: 0; transform: translateY(-8px); }

/* binario delle categorie: sul computer resta tutto nello schermo mentre è bloccato */
@media (min-width: 981px) {
  .js:not(.rm) .cat-card { width: min(clamp(17rem, 27vw, 23rem), calc((100svh - 19rem) * 0.75)); }
}

.rm *, .rm *::before, .rm *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
.rm .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
