/* Neocepta page transitions
   - Browsers with cross-document View Transitions (Chrome/Edge 126+, Safari 18.2+) use them natively.
   - Everyone else gets a JS-driven fade/slide fallback (js/transitions.js adds .nt-leave / .nt-enter).
   - Fully disabled for prefers-reduced-motion. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  /* keep the nav pinned while the page content swaps underneath it */
  .navbar, .site-header { view-transition-name: site-nav; }
  ::view-transition-group(site-nav) { animation-duration: 0s; }

  ::view-transition-old(root) { animation: nt-out .32s cubic-bezier(.4,0,1,1) both; }
  ::view-transition-new(root) { animation: nt-in .55s cubic-bezier(.16,1,.3,1) both; }
}

@keyframes nt-out { to { opacity: 0; transform: translateY(-14px) scale(.992); filter: blur(4px); } }
@keyframes nt-in  { from { opacity: 0; transform: translateY(26px) scale(.994); filter: blur(4px); } }

/* ---------- JS fallback ---------- */
html.nt-js main, html.nt-js footer { will-change: opacity, transform; }
html.nt-js.nt-enter main, html.nt-js.nt-enter footer { animation: nt-in .6s cubic-bezier(.16,1,.3,1) both; }
html.nt-js.nt-leave main, html.nt-js.nt-leave footer { animation: nt-out .32s cubic-bezier(.4,0,1,1) both; pointer-events: none; }

/* thin progress bar + soft violet wash during a hop */
#nt-bar { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 3000; pointer-events: none;
  background: linear-gradient(90deg,#8b5cf6,#06b6d4); box-shadow: 0 0 14px rgba(139,92,246,.8); opacity: 0; }
html.nt-leave #nt-bar { opacity: 1; width: 82%; transition: width .9s cubic-bezier(.2,.8,.2,1), opacity .1s; }

/* in-page content swaps (service switcher, filter) */
.nt-swap-out { opacity: 0; transform: translateY(10px); transition: opacity .22s ease, transform .22s ease; }
.nt-swap-in  { animation: nt-in .5s cubic-bezier(.16,1,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  html.nt-js.nt-enter main, html.nt-js.nt-enter footer, html.nt-js.nt-leave main, html.nt-js.nt-leave footer,
  .nt-swap-in { animation: none !important; }
  .nt-swap-out { transition: none; }
}
