/* ytadvisors.com motion (Yomi 2026-12-04: "Let's add animation for page transitions. and smooth animations on scroll").
   One file on every page. Nothing is hidden unless motion.js has marked the page (html.js-motion), so no-JS and reduced motion show everything. */

/* page transitions: the browser's cross-document view transition; the nav stays put while the page changes beneath it */
@view-transition { navigation: auto; }
.sitenav { view-transition-name: sitenav; }
::view-transition-group(sitenav), ::view-transition-old(sitenav), ::view-transition-new(sitenav) { animation: none; }
::view-transition-old(root) { animation: mv-page-out .26s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: mv-page-in .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes mv-page-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes mv-page-in { from { opacity: 0; transform: translateY(14px); } }

/* the header grid network: a canvas on the grid, under the text and the scene */
.gridnet { position: absolute !important; left: 0 !important; top: 0 !important; z-index: 0; pointer-events: none; display: block;
  max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-sizing: content-box !important; } /* exact header size, or it drifts off the grid (Yomi: "The network needs to stay on the grid") */

/* entrance and scroll reveal */
.js-motion .mv { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--mv-d, 0s); will-change: opacity, transform; }
.js-motion .mv.mv-scene { transform: translateY(10px) scale(.985); transition-duration: 1.1s; }
.js-motion .mv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .js-motion .mv { opacity: 1 !important; transform: none !important; transition: none !important; }
}
