/* Effetti dinamici: sobri, attivi solo con JavaScript e rispettano "riduci movimento". */

/* --- apertura: video in movimento sopra la foto --- */
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s var(--ease); pointer-events: none; }
.hero__video.is-playing { opacity: 1; }
.hero__media img, .hero__photo img { animation: heroZoom 26s var(--ease) both; }
@keyframes heroZoom { from { transform: scale(1.09); } to { transform: scale(1); } }

/* --- logo che si disegna --- */
.hero__logo-wrap { margin: 0; line-height: 0; }
.hero__logo { width: clamp(230px, 64vw, 470px); height: auto; overflow: visible; }
.hero__logo .lt { opacity: 0.86; }
html.js .hero__logo path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.7s var(--ease) forwards; }
html.js .hero__logo .ld { opacity: 0; animation: fadeIn 0.6s ease 1.25s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
html.js .hero__tagline { opacity: 0; animation: fadeUp 1.1s var(--ease) 2.1s forwards; }
html.js .hero__actions { opacity: 0; animation: fadeUp 1.1s var(--ease) 2.4s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* --- comparsa allo scorrimento --- */
html.js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* --- parallasse sulle fotografie --- */
.b-photo img[data-parallax] { height: 120%; margin-top: -10%; will-change: transform; }
.coll-card__zoom { overflow: visible; }

/* --- barra di avanzamento nell'header --- */
.progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: currentColor; opacity: 0.55; transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }

/* --- link con sottolineatura che scorre --- */
.link-quiet { background-size: 100% 1px; transition: background-size 0.5s var(--ease); }
.link-quiet:hover { background-size: 0% 1px; background-position: 100% calc(100% - 0.85rem); }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal], html.js .hero__tagline, html.js .hero__actions, html.js .hero__logo .ld { opacity: 1; transform: none; }
  html.js .hero__logo path { stroke-dashoffset: 0; }
  .hero__video { display: none; }
}
