/* The Virtual Ashram page transition (schema patch 39.18; assets/js/sanctuary-transitions.js). A warm veil over the page: the
   Temple Dark canvas, an amber radial backlight and the golden Akhand Gyan dial turning (the WebP loop) at its centre. The
   same in Temple Dawn (a sandalwood veil), so a crossing between the light public pages and the portal never flashes. */
.sanctuary-transition-veil {
  position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(217, 119, 6, .32) 0, rgba(217, 119, 6, .1) 22%, rgba(13, 11, 9, 0) 46%), #0D0B09;
  opacity: 0; transition: opacity 300ms ease;
}
:root:not(.dark) .sanctuary-transition-veil {
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, .34) 0, rgba(245, 158, 11, .12) 22%, rgba(251, 248, 241, 0) 46%), #FBF8F1;
}
.sanctuary-transition-veil.is-on { opacity: 1; pointer-events: auto; }
.sanctuary-transition-veil.is-instant { transition: none; }
.sanctuary-transition-veil__glow {
  position: absolute; width: 14rem; height: 14rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 211, 77, .45), rgba(245, 158, 11, .12) 45%, transparent 70%);
  filter: blur(6px);
}
.sanctuary-transition-veil__dial { position: relative; width: 112px; height: 112px; object-fit: contain; }
.sanctuary-transition-veil__dial[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .sanctuary-transition-veil.is-on .sanctuary-transition-veil__glow { animation: sanctuary-veil-breathe 2s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .sanctuary-transition-veil { transition-duration: 200ms; }
}
@keyframes sanctuary-veil-breathe { 50% { transform: scale(1.08); opacity: .85; } }

/* arriving: painted from the first byte until the script's veil takes over (no flash of the page underneath) */
html.sanctuary-veil-arriving::after {
  content: ""; position: fixed; inset: 0; z-index: 2147483000;
  background: radial-gradient(circle at 50% 50%, rgba(217, 119, 6, .32) 0, rgba(217, 119, 6, .1) 22%, rgba(13, 11, 9, 0) 46%), #0D0B09;
}
html.sanctuary-veil-arriving:not(.dark)::after {
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, .34) 0, rgba(245, 158, 11, .12) 22%, rgba(251, 248, 241, 0) 46%), #FBF8F1;
}
