/* Page to page (same-origin, cross-document view transitions). Linked by every page.

   Home → shop: the shop RISES over the home like a sheet (the old canvas site's "Rise", retimed to
   Emil's rules: 500ms on the drawer curve, the home dims a little behind it).
   Shop → home: the sheet sinks back, faster (350ms): exits are quicker than entrances.
   Anything else: a short crossfade.
   The pages set html.vt-rise / html.vt-sink on arrival (see transitions.js); reduced motion keeps
   only the fade. */
@view-transition{navigation:auto}

::view-transition-old(root){animation:160ms cubic-bezier(0.23,1,0.32,1) both vt-fade-out}
::view-transition-new(root){animation:240ms cubic-bezier(0.23,1,0.32,1) both vt-fade-in}

html.vt-rise::view-transition-old(root){animation:500ms cubic-bezier(0.32,0.72,0,1) both vt-dim}
html.vt-rise::view-transition-new(root){animation:500ms cubic-bezier(0.32,0.72,0,1) both vt-rise;box-shadow:0 -24px 60px rgba(0,0,0,.45)}

html.vt-sink::view-transition-old(root){z-index:1;animation:350ms cubic-bezier(0.32,0.72,0,1) both vt-sink;box-shadow:0 -24px 60px rgba(0,0,0,.45)}
html.vt-sink::view-transition-new(root){animation:350ms cubic-bezier(0.32,0.72,0,1) both vt-undim}

@keyframes vt-fade-out{to{opacity:0}}
@keyframes vt-fade-in{from{opacity:0}}
@keyframes vt-rise{from{transform:translateY(100%)}}
@keyframes vt-sink{to{transform:translateY(100%)}}
@keyframes vt-dim{to{opacity:.55}}
@keyframes vt-undim{from{opacity:.55}}

@media (prefers-reduced-motion:reduce){
  html.vt-rise::view-transition-new(root),html.vt-sink::view-transition-new(root){animation:200ms ease both vt-fade-in;box-shadow:none}
  html.vt-rise::view-transition-old(root),html.vt-sink::view-transition-old(root){animation:160ms ease both vt-fade-out;box-shadow:none}
}
