/* Accessibilità */
@media (prefers-reduced-motion: reduce) {
  .is-style-par-y-slow,
  .is-style-par-y-med,
  .is-style-par-y-fast,
  .is-style-par-y-med-rev,
  .is-style-par-children > *,
  .is-style-par-children-stagger > * {
    animation: none !important;
    transform: none !important;
  }
}

/* Solo se supportate le scroll-driven animations */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {

    @keyframes parallax-y {
      from { transform: translateY(var(--par-start, -6%)); }
      to   { transform: translateY(var(--par-end,    6%)); }
    }

    /* Blocchi */
    .is-style-par-y-slow,
    .is-style-par-y-med,
    .is-style-par-y-fast,
    .is-style-par-y-med-rev {
      will-change: transform;
      animation: parallax-y auto linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .is-style-par-y-slow { --par-start: -4%;  --par-end: 4%; }
    .is-style-par-y-med  { --par-start: -8%;  --par-end: 8%; }
    .is-style-par-y-fast { --par-start: -12%; --par-end: 12%; }
    .is-style-par-y-med-rev { --par-start: -8%; --par-end: 8%; animation-direction: reverse; }

    /* Figli */
    .is-style-par-children > *,
    .is-style-par-children-stagger > * {
      will-change: transform;
      animation: parallax-y auto linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .is-style-par-children > * { --par-start: -6%; --par-end: 6%; }
    .is-style-par-children-stagger > *:nth-child(odd)  { --par-start: -4%;  --par-end: 4%; }
    .is-style-par-children-stagger > *:nth-child(even) { --par-start: -8%;  --par-end: 8%; }
  }
}
