/*
 * Motion for the marketing site (2026-12-06): intro animation of the nav + hero on load
 * and scroll-in reveals (js/site-motion.js). Active only when <html> has .sbh-anim,
 * which index.php sets on every page except the blog (blog_*.php) and the mail tester embed.
 *
 * Intro animations use fill-mode "backwards" on purpose: once they end, nothing stays applied,
 * so no element keeps a transform/stacking context (dropdowns in the hero keep their z-index).
 * Rollback: remove the two lines marked "site-motion" in index.php.
 */

@keyframes sbhmRise{from{opacity:0;transform:translateY(26px)}to{opacity:1;transform:none}}
@keyframes sbhmPop{from{opacity:0;transform:translateY(36px) scale(.965)}to{opacity:1;transform:none}}
@keyframes sbhmSide{from{opacity:0;transform:translateX(48px) scale(.97)}to{opacity:1;transform:none}}
@keyframes sbhmNav{from{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:none}}
@keyframes sbhmFade{from{opacity:0}to{opacity:1}}
/* the omni box pulses once when the hero has settled; 0%/100% = its own shadow from site.css */
@keyframes sbhmGlow{0%,100%{box-shadow:0 0 0 4px rgba(31,94,255,.14),0 18px 40px rgba(11,27,63,.10)}45%{box-shadow:0 0 0 14px rgba(31,94,255,.07),0 18px 40px rgba(11,27,63,.10)}}

@media (prefers-reduced-motion:no-preference){
  /* ---- nav ---- */
  .sbh-anim .sbh-navbar{animation:sbhmNav .7s cubic-bezier(.16,1,.3,1) backwards}

  /* ---- homepage hero (.sbh-hero) ---- */
  .sbh-anim .sbh-hero-in>*{animation:sbhmRise .9s cubic-bezier(.16,1,.3,1) backwards}
  .sbh-anim .sbh-hero-in>.sbh-eyebrow{animation-delay:.05s}
  .sbh-anim .sbh-hero-in>.sbh-h1{animation-delay:.1s}
  .sbh-anim .sbh-hero-in>.sbh-lead{animation-delay:.24s}
  .sbh-anim .sbh-hero-in>.sbh-tool{animation-name:sbhmPop;animation-duration:1.05s;animation-delay:.36s}
  .sbh-anim .sbh-hero-in>.sbh-trust{animation:none}
  .sbh-anim .sbh-hero-in .sbh-tool .sbh-omni:not(:focus-within){animation:sbhmGlow 1.3s ease-in-out 1.15s}
  .sbh-anim .sbh-hero-in .sbh-trust>li{animation:sbhmRise .8s cubic-bezier(.16,1,.3,1) backwards}
  .sbh-anim .sbh-hero-in .sbh-trust>li:nth-child(1){animation-delay:.62s}
  .sbh-anim .sbh-hero-in .sbh-trust>li:nth-child(2){animation-delay:.70s}
  .sbh-anim .sbh-hero-in .sbh-trust>li:nth-child(3){animation-delay:.78s}
  .sbh-anim .sbh-hero-in .sbh-trust>li:nth-child(n+4){animation-delay:.86s}

  /* ---- subpage heroes (.sbh-phero): copy column, tool heroes, split heroes ---- */
  .sbh-anim .sbh-phero-copy>*,
  .sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*{animation:sbhmRise .9s cubic-bezier(.16,1,.3,1) backwards}
  .sbh-anim .sbh-phero-copy>*:nth-child(1),.sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*:nth-child(1){animation-delay:.04s}
  .sbh-anim .sbh-phero-copy>*:nth-child(2),.sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*:nth-child(2){animation-delay:.11s}
  .sbh-anim .sbh-phero-copy>*:nth-child(3),.sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*:nth-child(3){animation-delay:.20s}
  .sbh-anim .sbh-phero-copy>*:nth-child(4),.sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*:nth-child(4){animation-delay:.29s}
  .sbh-anim .sbh-phero-copy>*:nth-child(5),.sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*:nth-child(5){animation-delay:.37s}
  .sbh-anim .sbh-phero-copy>*:nth-child(6),.sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*:nth-child(6){animation-delay:.44s}
  .sbh-anim .sbh-phero-copy>*:nth-child(n+7),.sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>*:nth-child(n+7){animation-delay:.50s}
  .sbh-anim .sbh-phero-side{animation:sbhmSide 1.1s cubic-bezier(.16,1,.3,1) .3s backwards}
  /* tool-switch pills under the tool form slide in one by one */
  .sbh-anim .sbh-phero>.sbh-wrap:not(.sbh-phero-split)>.sbh-switch{animation:none}
  .sbh-anim .sbh-phero .sbh-switch>a{animation:sbhmRise .7s cubic-bezier(.16,1,.3,1) backwards}
  .sbh-anim .sbh-phero .sbh-switch>a:nth-child(1){animation-delay:.42s}
  .sbh-anim .sbh-phero .sbh-switch>a:nth-child(2){animation-delay:.47s}
  .sbh-anim .sbh-phero .sbh-switch>a:nth-child(3){animation-delay:.52s}
  .sbh-anim .sbh-phero .sbh-switch>a:nth-child(4){animation-delay:.57s}
  .sbh-anim .sbh-phero .sbh-switch>a:nth-child(5){animation-delay:.62s}
  .sbh-anim .sbh-phero .sbh-switch>a:nth-child(6){animation-delay:.67s}
  .sbh-anim .sbh-phero .sbh-switch>a:nth-child(n+7){animation-delay:.72s}

  /* ---- scroll reveals: js/site-motion.js adds .sbh-rv to blocks below the fold
          and removes it (with a Web Animation) when the block scrolls into view ---- */
  .sbh-anim .sbh-rv{opacity:0}
}

@media print{.sbh-anim .sbh-rv{opacity:1!important}}
