/* Slide transition between the Featured and All work views.
   Only the page content (.t-target) moves; the header, the menu bar and the
   footer stay put. Content travels the same way as the bar's underline:
   going to All work it leaves to the left and the grid arrives from the
   right; going back to Featured it's the reverse. The entrance only plays
   when arriving from the other view (see view-switch.js), not on a normal
   page load. */

@keyframes vsFromRight{ from{ opacity:0; transform:translateX(80px); } to{ opacity:1; transform:none; } }
@keyframes vsFromLeft{ from{ opacity:0; transform:translateX(-80px); } to{ opacity:1; transform:none; } }
@keyframes vsToLeft{ from{ opacity:1; transform:none; } to{ opacity:0; transform:translateX(-80px); } }
@keyframes vsToRight{ from{ opacity:1; transform:none; } to{ opacity:0; transform:translateX(80px); } }

html.vs-enter[data-view="all"] .t-target{ animation:vsFromRight .65s cubic-bezier(.16,.84,.44,1) both; }
html.vs-enter[data-view="featured"] .t-target{ animation:vsFromLeft .65s cubic-bezier(.16,.84,.44,1) both; }
html.vs-exit[data-view="featured"] .t-target{ animation:vsToLeft .3s cubic-bezier(.55,0,.75,.2) forwards; }
html.vs-exit[data-view="all"] .t-target{ animation:vsToRight .3s cubic-bezier(.55,0,.75,.2) forwards; }

@media (prefers-reduced-motion: reduce){
  html .t-target{ animation:none !important; }
}
