/* Effects layer, parallax (docs/FX.md). Normal and Turn it up only.
   Scroll-driven CSS animations, run by the compositor: no scroll listeners, no layout.
   Chrome, Edge and Safari 26+ move; browsers without scroll timelines (Firefox today)
   simply show the page still.
   - The hero splits into depth layers: the words rise and fade faster than the page,
     the frame sinks and turns away.
   - Pictures in cards, a piece's or product's picture, and a section's own picture sit
     deeper than their frame: they drift against the scroll inside it. They move on
     `translate`, so the hover zoom (site.css, `transform`) still works on top. Software
     and the private tools keep their pointer parallax (fx-software.css) instead.
   - Turn it up doubles the depth. */

@keyframes fx-depth {
  from { translate: 0 calc(var(--fx-depth, 7%) * -1); }
  to { translate: 0 var(--fx-depth, 7%); }
}
@keyframes fx-hero-copy {
  to { translate: 0 -16vh; opacity: 0.2; }
}
@keyframes fx-hero-stage {
  to { translate: 0 12vh; rotate: -5deg; scale: 0.9; }
}

@supports (animation-timeline: scroll()) {
  :where(html:not([data-fx="calm"])) .hero-copy {
    animation: fx-hero-copy linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 85vh;
  }
  :where(html:not([data-fx="calm"])) .hero-stage {
    animation: fx-hero-stage linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 100vh;
  }

  :where(html:not([data-fx="calm"])) :is(#about, #coaching, #writing, #music, #songs, #shop, .song-page) .card-media img,
  :where(html:not([data-fx="calm"])) :is(.section-figure, .writing-figure) img {
    scale: 1.18;
    animation: fx-depth linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 100%;
  }
  :where(html:not([data-fx="calm"])) .writing-figure {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--line);
  }
  :where(html:not([data-fx="calm"])) .writing-figure img { border: 0; border-radius: 0; }

  html[data-fx="loud"] { --fx-depth: 13%; }
  html[data-fx="loud"] :is(.card-media, .section-figure, .writing-figure) img { scale: 1.32; }
}
