/* ==========================================================================
   transitions.css — cross-document view transitions
   Zoom morph: case-study card (HP) ⇄ case-study hero. Load on both pages.
   Progressive enhancement: browsers without support (e.g. Firefox) simply
   navigate instantly — nothing breaks.
   ========================================================================== */

@view-transition {
  navigation: auto;
}

/* Gentle, app-like easing for the morph and the page crossfade */
::view-transition-group(root),
::view-transition-group(case-cover),
::view-transition-group(case-cover-onboarding) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* The card and the hero have different aspect ratios: fill the morphing box
   and crop instead of stretching the snapshots. */
::view-transition-old(case-cover),
::view-transition-new(case-cover),
::view-transition-old(case-cover-onboarding),
::view-transition-new(case-cover-onboarding) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
