/* Index pages (home, Work, Playground, Writing): builds on the site-wide view transition in styles.css, where
   the CC, nav and theme toggle already glide in place. Here the old page fades and lifts away, the new page
   title arrives first and the rest of the page follows. Reduced motion is switched off in styles.css. */
.page-title { view-transition-name: page-title; }

::view-transition-old(root) { animation: page-out 260ms cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: page-in 420ms cubic-bezier(.16, 1, .3, 1) 140ms both; }

::view-transition-group(page-title) { animation-duration: 0s; }
::view-transition-old(page-title) { animation: page-out 220ms cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(page-title) { animation: title-in 480ms cubic-bezier(.16, 1, .3, 1) 60ms both; }

@keyframes page-out { to { opacity: 0; transform: translateY(-16px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes title-in { from { opacity: 0; transform: translateY(28px); } }
