/* The site-wide feel (all pages): pages hand over to each other with a soft cross-fade instead of a hard cut, everything
   you press answers at once, and headlines arrive word by word. Scrolling itself is never touched: it stays the device's own.
   Only opacity and position ever move, so it stays smooth on laptops, tablets and phones. Reduced-motion: all off. */

/* ---- 1. page to page: the old page fades and lifts a little, the new one settles in; the menu bar stays where it is ---- */
@view-transition{navigation:auto}
@media (prefers-reduced-motion:no-preference){
  ::view-transition-old(root){animation:mtOut .16s cubic-bezier(.4,0,1,1) both}
  ::view-transition-new(root){animation:mtIn .3s cubic-bezier(.2,.7,.2,1) both}
  .fnav{view-transition-name:mt-nav}
  .side{view-transition-name:mt-side}
  .adm-top{view-transition-name:mt-top}
  ::view-transition-group(mt-nav),::view-transition-group(mt-side),::view-transition-group(mt-top){animation-duration:.01s;z-index:5}
}
@keyframes mtOut{to{opacity:0}}
@keyframes mtIn{from{opacity:0}}
@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}

/* ---- 2. touch: whatever you press gives way a little, immediately ---- */
a,button,[role="button"],summary,label{-webkit-tap-highlight-color:transparent}
@media (prefers-reduced-motion:no-preference){
  .btn,button.btn,a.btn,.bp-copy,.fxi-skip,.wl-chip,.chip,.tab,.adm-back,.pill,.navbar .links a,.side a,.mm-item,.fab{transition-property:transform,background-color,border-color,color,box-shadow,opacity;transition-duration:.18s;transition-timing-function:cubic-bezier(.2,.7,.2,1)}
  .btn:active,button.btn:active,a.btn:active,.bp-copy:active,.fxi-skip:active,.wl-chip:active,.chip:active,.tab:active,.adm-back:active,.pill:active,.fab:active{transform:scale(.965);transition-duration:.06s}
  .side a:active,.navbar .links a:active,.mm-item:active{transform:scale(.98);transition-duration:.06s}
}

/* ---- 3. headlines arriving word by word (motion.js + GSAP SplitText) ---- */
.mw{display:inline-block}
.mh-wait{visibility:hidden}

/* ---- 5. the dashboards (client area and admin panel) ---- */
@media (prefers-reduced-motion:no-preference){
  /* the highlighted menu item slides to its new place when you change page */
  .adm-side nav a.it.on{view-transition-name:mt-on}
  ::view-transition-group(mt-on){animation-duration:.38s;animation-timing-function:cubic-bezier(.2,.7,.2,1);z-index:6}
  /* each block of the page settles in, one after the other */
  body.adm .main > *,body.app .main > *{animation:mtRise .5s cubic-bezier(.2,.7,.2,1) backwards}
  body.adm .main > *:nth-child(2),body.app .main > *:nth-child(2){animation-delay:45ms}
  body.adm .main > *:nth-child(3),body.app .main > *:nth-child(3){animation-delay:90ms}
  body.adm .main > *:nth-child(4),body.app .main > *:nth-child(4){animation-delay:135ms}
  body.adm .main > *:nth-child(5),body.app .main > *:nth-child(5){animation-delay:180ms}
  body.adm .main > *:nth-child(n+6),body.app .main > *:nth-child(n+6){animation-delay:225ms}
}
@keyframes mtRise{from{opacity:0;transform:translate3d(0,12px,0)}}
