@supports (animation-timeline: scroll(root block)) and (animation-range: 0px 100vh) {
  @media (prefers-reduced-motion: no-preference) {
    #allrecords[data-tilda-page-alias^="cases/"]:not([data-tilda-page-alias="cases/"])
      > .t-rec[data-record-type="396"] > .t396
      > .t396__artboard[data-artboard-height_vh="100"][data-artboard-valign="stretch"]:not(:has(> .tn-elem, > .tn-group)) {
      --apus-case-cover-scroll-offset: 72vh;
      --apus-case-cover-zoom: 1.13;
      --apus-case-cover-shade: 0.82;

      @media (max-width: 767px) {
        --apus-case-cover-scroll-offset: 62vh;
        --apus-case-cover-zoom: 1.08;
        --apus-case-cover-shade: 0.74;
      }

      & > .t396__carrier,
      & > .t396__filter::after {
        animation: auto linear both;
        /* Tilda clips #allrecords, so follow the document scroller directly. */
        animation-timeline: scroll(root block);
        animation-range: 0px 100vh;
      }

      & > .t396__carrier {
        transform-origin: 50% 0%;
        animation-name: apus-case-cover-move;
      }

      & > .t396__filter::after {
        content: "";
        position: absolute;
        inset: 0;
        background: #000;
        pointer-events: none;
        animation-name: apus-case-cover-dim;
        animation-timing-function: cubic-bezier(0.34, 0.46, 0.5, 1);
      }
    }
  }
}

@keyframes apus-case-cover-move {
  from {
    translate: 0 0;
    scale: 1;
  }
  to {
    /* Counter part of the scroll so the next section sweeps over the image. */
    translate: 0 var(--apus-case-cover-scroll-offset);
    scale: var(--apus-case-cover-zoom);
  }
}

@keyframes apus-case-cover-dim {
  from { opacity: 0; }
  to { opacity: var(--apus-case-cover-shade); }
}
