/* MARTENSIA · page-transitions.css
 * The site's page transition, for the pages built as apps (Kerf's three doors, the STEP viewer, Try Recon, the Seal
 * app), which do not load brand.js and motion.css. The same browser cross-document transition as every other page
 * (motion.css, section 1): the old page fades out in 140 ms while the new one rises 8 px into place, so moving between
 * these pages and the rest of the site looks the same everywhere. A browser without it simply shows the next page;
 * with reduced motion, nothing moves. web/tools/site_build.py links it into those pages.
 */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: m-page-out 140ms cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: m-page-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes m-page-out { to { opacity: 0; } }
@keyframes m-page-in { from { opacity: 0; transform: translate3d(0, 8px, 0); } }

/* the tools' own top bar stays where it is between the tools' pages, as the site's nav does between its pages */
.k-nav { view-transition-name: m-app-nav; }
::view-transition-group(m-app-nav) { animation-duration: 320ms; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }

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