/* Scroll-reveal animations for the landing page.
   Purely visual: the hidden state only exists once scroll-animations.js has added `sa-on` to <html>,
   so without JS (or with "reduce motion") every block simply stays visible. */

@keyframes saUp    { from { opacity: 0; transform: translate3d(0, 46px, 0); } to { opacity: 1; transform: none; } }
@keyframes saLeft  { from { opacity: 0; transform: translate3d(-60px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes saRight { from { opacity: 0; transform: translate3d(60px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes saZoom  { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* not yet scrolled to (or scrolled away from): waiting state */
html.sa-on .sa-hidden { opacity: 0; will-change: opacity, transform; }
html.sa-on .sa-hidden[data-sa="up"]    { transform: translate3d(0, 46px, 0); }
html.sa-on .sa-hidden[data-sa="left"]  { transform: translate3d(-60px, 0, 0); }
html.sa-on .sa-hidden[data-sa="right"] { transform: translate3d(60px, 0, 0); }
html.sa-on .sa-hidden[data-sa="zoom"]  { transform: scale(.92); }

/* played each time the block scrolls into view. `backwards` fill: once finished the element
   returns to its normal styles, so existing hover effects keep working. */
html.sa-on .sa-in { animation-duration: .85s; animation-timing-function: cubic-bezier(.22, .8, .26, 1); animation-fill-mode: backwards; animation-delay: var(--sa-delay, 0ms); }
html.sa-on .sa-in[data-sa="up"]    { animation-name: saUp; }
html.sa-on .sa-in[data-sa="left"]  { animation-name: saLeft; }
html.sa-on .sa-in[data-sa="right"] { animation-name: saRight; }
html.sa-on .sa-in[data-sa="zoom"]  { animation-name: saZoom; }

/* sideways slides must not create a horizontal scrollbar while they travel */
html.sa-on .fx-section { overflow-x: clip; }

/* phones: columns are stacked, so slide up instead of sideways (no horizontal overflow) */
html.sa-on footer { overflow-x: clip; }
@media (max-width: 767px) {
  html.sa-on .sa-hidden[data-sa="left"], html.sa-on .sa-hidden[data-sa="right"] { transform: translate3d(0, 46px, 0); }
  html.sa-on .sa-in[data-sa="left"], html.sa-on .sa-in[data-sa="right"] { animation-name: saUp; }
}
