/* Native navigation preserves links, focus, fragments and browser history. */
@view-transition { navigation: auto; }
html { scroll-behavior: smooth; }
:target { scroll-margin-top: 116px; }

::view-transition-group(*) { animation-duration: 160ms; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: getmocho-reveal 160ms ease-out both; }
@keyframes getmocho-reveal { from { opacity: 0; } to { opacity: 1; } }

/* The snapshot already supplies the fade when a view transition is running. */
html:active-view-transition .page.active { animation: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto !important; }
  .page.active { animation: none !important; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation-duration: 1ms !important; }
}
