/* Animations partagées, liées au scroll. Les règles ne s'appliquent que si motion.js a pu s'exécuter. */
.m { --m: 1; }
main { overflow-x: clip; }

/* Typographie */
.statement.m, .intro-bio.m, .creations-head.m, .book-text.m, .museum-text.m, .latest-head.m, .entries li.m {
  translate: calc((1 - var(--m)) * 4vw) 0;
  opacity: calc(0.06 + var(--m) * 0.94);
}

/* Images : ouverture verticale et léger recul */
.work.m .work-frame, .museum-image.m { clip-path: inset(calc((1 - var(--m)) * 100%) 0 0 0); }
.book-cover.m { clip-path: inset(calc((1 - var(--m)) * 100%) -80px -80px -80px); }
.work.m img, .museum-image.m img, .book-cover.m img { scale: calc(1.14 - var(--m) * 0.14); }
.work.m .work-caption { opacity: calc((var(--m) - 0.6) * 2.5); }

/* Ouverture de la home */
.hero { --h: 0; }
.hero-image { scale: calc(1 + var(--h) * 0.12); }
.hero-wave { scale: 1 calc(1 - var(--h) * 0.8); }
.hero-content { translate: 0 calc(var(--h) * -9vh); opacity: calc(1 - var(--h) * 1.7); }
.js .hero h1 { animation: rise 1.5s var(--slow) both; }
@keyframes rise { from { opacity: 0; translate: 0 0.28em; } }

/* Ouverture du Juke Box */
.juke-hero { --h: 0; }
.juke-hero h1 { transform: translate3d(0, calc(var(--h) * -3vh), 0) scale(calc(1 - var(--h) * 0.1)); transform-origin: 0 100%; }
.js .juke-hero h1 span { animation: title-rise 1.5s var(--slow) both; }
@keyframes title-rise { from { transform: translate3d(0, 105%, 0); } }

/* Pied de page */
.footer-wave.m { scale: 1 var(--m); opacity: calc(var(--m) * 0.5); }
.footer-mark.m .footer-brand { translate: 0 calc((1 - var(--m)) * 62%); }
.footer-grid.m { translate: 0 calc((1 - var(--m)) * 28px); opacity: calc(0.06 + var(--m) * 0.94); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hero, .juke-hero { --h: 0 !important; }
}
.footer-friends.m { translate: 0 calc((1 - var(--m)) * 28px); opacity: calc(0.06 + var(--m) * 0.94); }
