/* Page enter / exit — same jet field, no flash between routes */
html { background: #06080b; }
html.page-enter body { opacity: 0; }
html.page-enter.page-enter-ready body {
  opacity: 1;
  transition: opacity .38s ease;
}
body.page-leaving {
  opacity: 0 !important;
  transition: opacity .2s ease !important;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  html.page-enter body,
  body.page-leaving { transition: none !important; opacity: 1 !important; }
}

/* Never stay invisible if enter hook stalls */
html.page-enter:not(.page-enter-ready) body {
  animation: page-enter-fallback .01s ease 1s forwards;
}
@keyframes page-enter-fallback { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html.page-enter:not(.page-enter-ready) body { animation: none; opacity: 1 !important; }
}

/* Return visit: skip canvas + copy fade gates (WebGL still boots, UI shows immediately) */
html.nav-warm #world { opacity: 1; transition: none; }
html.nav-warm body.doc-intro .docs,
html.nav-warm body.doc-intro .about { opacity: 1; transition: none; }
html.nav-warm.intro-hold .j-top,
html.nav-warm.intro-hold .deck-nav,
html.nav-warm.intro-hold .deck-progress,
html.nav-warm.intro-hold .deck-hint,
html.nav-warm.intro-hold .deck-swipe,
html.nav-warm.intro-hold .deck-legal {
  opacity: 1;
  pointer-events: auto;
  transition: none;
}
html.nav-warm.intro-hold .brand-motif img {
  opacity: var(--mo, .14);
  transition: none;
}
html.nav-warm .deck-caps [data-type] .rc {
  opacity: 1 !important;
  filter: none !important;
  color: inherit;
  transition: none;
}
