@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  .sc-entry-link[data-case-active] .sc-frame,
  .catalog-case[data-case-active] .catalog-image,
  #sc-case-image { view-transition-name: case-laptop; }
  .sc-entry-link[data-case-active] .sc-photo { animation: none; }

  ::view-transition-group(case-laptop) {
    animation-duration: 760ms;
    animation-timing-function: cubic-bezier(.35, 0, .12, 1);
    z-index: 2;
    overflow: clip;
  }
  ::view-transition-old(case-laptop), ::view-transition-new(case-laptop) {
    width: 100%; height: 100%; object-fit: cover;
    mix-blend-mode: normal;
  }
  ::view-transition-old(case-laptop) { animation: case-photo-out 760ms both; }
  ::view-transition-new(case-laptop) { animation: case-photo-in 760ms both; }
  ::view-transition-old(case-laptop):only-child,
  ::view-transition-new(case-laptop):only-child { animation-duration: 160ms; }
  /* Let the incoming project title and controls settle around the photograph. */
  html:has(.sc-case)::view-transition-new(root) {
    animation: case-page-in 760ms both;
  }
  @keyframes case-page-in { 0%, 42% {opacity:0} 92%, 100% {opacity:1} }
  @keyframes case-photo-out { 0%, 35% {opacity:1} 85%, 100% {opacity:0} }
  @keyframes case-photo-in { 0%, 30% {opacity:0} 85%, 100% {opacity:1} }

  [data-case-arrival] #sc-case-image { opacity: 0; }
  [data-case-arrival] .sc-case-heading { animation: case-page-in 760ms both; }
}
.case-flight {
  position: fixed; inset: 0; z-index: 20;
  pointer-events: none; overflow: hidden;
}
.case-flight img {
  display: block; position: absolute; top: 0; left: 0;
  max-width: none; height: auto; transform-origin: top left;
}
