@supports (animation-timeline: view()) {
  /* Reserve the reading area between the entry and exit motion, below the sticky header. */
  html[data-motion=on] :is(#site-journey, #office-systems, #planning-process, #floor-plans, #project-examples) .section-intro > h2,
  html[data-motion=on] #cctv-at-height .height-copy > h2 {
    animation: scroll-heading linear both;
    animation-timeline: view(block 4.5rem 0%);
  }

  html[data-motion=on] :is(#site-journey, #planning-process, #floor-plans, #project-examples) .section-intro > p {
    animation: scroll-intro linear both;
    animation-timeline: view(block 4.5rem 0%);
  }

  html[data-motion=on] :where(#office-systems, #floor-plans) .plan-library-card,
  html[data-motion=on] .plan-page-process > ol > li,
  html[data-motion=on] .case-index-card {
    --card-rise: 2rem;
    --card-shift: 0rem;
    animation: scroll-card linear both;
    animation-timeline: view(block 4.5rem 0%);
  }

  html[data-motion=on] :is(.plan-library-card, .plan-page-process > ol > li, .case-index-card):nth-child(even) {
    --card-rise: 2.9rem;
  }

  html[data-motion=on] :is(:where(.premium-journey) .journey-stage, :where(#cctv-at-height) .height-diagram) {
    animation: scroll-frame linear both;
    animation-timeline: view(block 4.5rem 0%);
  }

  html[data-motion=on] :is(.plan-library-card, .case-index-card, .journey-stage):focus-within {
    animation: none;
  }

  @media (min-width: 56rem) {
    html[data-motion=on] .case-index-card:first-child { --card-shift: -1.2rem; }
    html[data-motion=on] .case-index-card:last-child { --card-shift: 1.2rem; }
  }

  @keyframes scroll-heading {
    0% {
      translate: 0 1.85rem;
      clip-path: inset(-.25rem -.25rem 53%);
      opacity: .48;
      animation-timing-function: cubic-bezier(.17,.66,.27,1);
    }
    25%, 79% { translate: 0; clip-path: inset(-.25rem); opacity: 1; }
    79% { animation-timing-function: ease-in; }
    100% { translate: 0 -.95rem; clip-path: inset(52% -.25rem -.25rem); opacity: .46; }
  }

  @keyframes scroll-intro {
    0%, 5% { translate: 0 1.25rem; opacity: .68; }
    30%, 81% { translate: 0; opacity: 1; }
    100% { translate: 0 -.55rem; opacity: .7; }
  }

  @keyframes scroll-card {
    0% {
      translate: var(--card-shift) var(--card-rise);
      scale: .94;
      opacity: .52;
      animation-timing-function: cubic-bezier(.18,.63,.28,1);
    }
    32%, 75% { translate: 0; scale: 1; opacity: 1; }
    75% { animation-timing-function: ease-in; }
    100% { translate: 0 -.6rem; scale: .96; opacity: .6; }
  }

  @keyframes scroll-frame {
    0% {
      clip-path: inset(3% 6% 5% round 1rem);
      scale: .965;
      animation-timing-function: cubic-bezier(.2,.62,.27,1);
    }
    34%, 70% { clip-path: inset(0); scale: 1; }
    70% { animation-timing-function: ease-in; }
    100% { clip-path: inset(5% 4% 3% round 1rem); scale: .965; }
  }
}
