/* ============================================================
   Movimento (05/10/2026, richiesta Alex): parallasse sulle foto di
   sfondo + entrata del testo. Tutto vale solo con html.mov, che lo
   script in testa alla pagina accende se il visitatore non ha chiesto
   di ridurre le animazioni; se movimento.js non parte entro 2,5 s la
   classe si toglie e la pagina resta ferma ma completa.
   ============================================================ */

/* ---------- parallasse: la foto e' piu' alta del riquadro e la sposta movimento.js ---------- */
html.mov .s-hero .hero-media img,
html.mov .s-quote .quote-media img {
  position: relative;
  top: -15%;
  height: 130%;
  will-change: transform;
}

/* ---------- apertura: foto che si assesta, testo che sale riga dopo riga ---------- */
html.mov .s-hero { overflow: hidden; }
html.mov .s-hero .hero-media { animation: pl-assesta 2.2s cubic-bezier(.2, .7, .2, 1) both; }
html.mov .s-hero .hero-body .wrap > * {
  opacity: 0;
  animation: pl-sale 1s cubic-bezier(.2, .7, .2, 1) forwards;
}
html.mov .s-hero .hero-body .wrap > :nth-child(1) { animation-delay: .25s; }
html.mov .s-hero .hero-body .wrap > :nth-child(2) { animation-delay: .4s; }
html.mov .s-hero .hero-body .wrap > :nth-child(3) { animation-delay: .6s; }
html.mov .s-hero .hero-body .wrap > :nth-child(4) { animation-delay: .8s; }
html.mov .s-hero .hero-body .wrap > :nth-child(5) { animation-delay: 1s; }

@keyframes pl-sale {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pl-assesta {
  from { transform: scale(1.07); }
  to   { transform: scale(1); }
}

/* ---------- entrata allo scorrimento: movimento.js aggiunge .in quando l'elemento entra ---------- */
html.mov .rv {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--rv-d, 0s);
}
html.mov .rv.in { opacity: 1; transform: none; }
/* le foto delle gallerie stanno in colonne: solo dissolvenza e poco movimento */
html.mov .gallery figure.rv { transform: translateY(16px); }
html.mov .gallery figure.rv.in { transform: none; }
