/* Scroll-driven motion for the LES Skate site: the rolling boards on the ledges and the sideways
   photo park move in step with the scroll itself, run by the browser (no script per frame).
   Kept outside the build on purpose: the CSS minifier folds these longhands into an `animation`
   shorthand that browsers don't accept. Browsers without scroll timelines use src/scripts/skate.ts. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ledge {
      container-type: inline-size;
      view-timeline-name: --ledge;
      view-timeline-axis: block;
    }
    .ledge .rider {
      animation-name: les-ledge-ride;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --ledge;
      animation-range: cover 0% cover 100%;
    }
    .ledge .grind {
      animation-name: les-ledge-grind;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --ledge;
      animation-range: cover 0% cover 100%;
    }
    .ledge .rider .wheel {
      animation-name: les-ledge-spin;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --ledge;
      animation-range: cover 0% cover 100%;
    }
    .ledge[data-reverse] .rider,
    .ledge[data-reverse] .rider .wheel { animation-direction: reverse; }
  }
  @media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
    .ride {
      view-timeline-name: --park;
      view-timeline-axis: block;
    }
    .ride .ride-track {
      animation-name: les-park-ride;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --park;
      animation-range: contain 0% contain 100%;
    }
  }
}
@keyframes les-ledge-ride { from { transform: translate3d(-240px, 0, 0); } to { transform: translate3d(calc(100cqw + 20px), 0, 0); } }
@keyframes les-ledge-grind { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes les-ledge-spin { from { rotate: 0deg; } to { rotate: 1800deg; } }
@keyframes les-park-ride { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(calc(var(--park-max, 0px) * -1), 0, 0); } }
