/* Scroll-reveal & entrance animations (zero layout / geometry changes) */
@media (prefers-reduced-motion: no-preference) {
  /* Hero / page header immediate stagger */
  @keyframes mbwsHeroUp {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes mbwsFadeOnly {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @keyframes mbwsTabIn {
    from { opacity: 0; transform: translate3d(0, 10px, 0); }
    to   { opacity: 1; transform: none; }
  }

  .vnw .hero > .w > .eyebrow,
  .vnw .phero .crumb,
  .vnw .jhero .crumb {
    animation: mbwsHeroUp .6s cubic-bezier(.22, 1, .36, 1) .04s both;
  }
  .vnw .hero > .w > h1,
  .vnw .phero h1,
  .vnw .jhero h1 {
    animation: mbwsHeroUp .65s cubic-bezier(.22, 1, .36, 1) .12s both;
  }
  .vnw .hero > .w > p,
  .vnw .phero p,
  .vnw .jhero .jmeta {
    animation: mbwsHeroUp .65s cubic-bezier(.22, 1, .36, 1) .2s both;
  }
  .vnw .hero > .w > .btn,
  .vnw .jhero .jcta {
    animation: mbwsHeroUp .65s cubic-bezier(.22, 1, .36, 1) .28s both;
  }
  /* Search bar uses translateX(-50%) on home hero -> fade opacity only */
  .vnw .hero > .topsearch {
    animation: mbwsFadeOnly .6s ease-out .08s both;
  }

  /* Scroll-reveal base state (only active when JS IntersectionObserver is ready) */
  html.mbws-anim .mbws-rv {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition:
      opacity .65s cubic-bezier(.22, 1, .36, 1) var(--rv-d, 0ms),
      transform .65s cubic-bezier(.22, 1, .36, 1) var(--rv-d, 0ms);
    will-change: opacity, transform;
  }
  @media (min-width: 769px) {
    html.mbws-anim .mbws-rv.mbws-rv-left {
      transform: translate3d(-22px, 0, 0);
    }
    html.mbws-anim .mbws-rv.mbws-rv-right {
      transform: translate3d(22px, 0, 0);
    }
  }
  html.mbws-anim .mbws-rv.is-in {
    opacity: 1;
    transform: none;
  }
  /* Once entrance completes, release transition & transform so native :hover stays instant */
  html.mbws-anim .mbws-rv-done {
    opacity: 1;
    transform: none;
    will-change: auto;
  }

  /* Pause the 4-step process timeline animation until scrolled into view */
  html.mbws-anim .vnw .process:not(.is-in) .st {
    animation-play-state: paused;
  }
  html.mbws-anim .vnw .process.is-in .st {
    animation-play-state: running;
  }

  /* Smooth entrance when switching filter tabs */
  .mbws-tab-in {
    animation: mbwsTabIn .32s cubic-bezier(.22, 1, .36, 1) both;
  }
}
