/* =========================================================
   SCRIPTNIGHT // PAGE HANDOFF
   One stationary curtain sweep shared by public entry screens
   ========================================================= */

.page-handoff {
  position: fixed;
  inset: 0;
  z-index: 11000;
  overflow: hidden;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  contain: strict;
}

.page-handoff[data-handoff-mode="manual"] {
  z-index: 8500;
}

.page-handoff[hidden],
.no-js .page-handoff {
  display: none !important;
}

.page-handoff-curtain {
  position: absolute;
  inset: -2px -2px -8px;
  background: var(--sn-bg, #000302);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.page-handoff-line {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 2%, rgba(0, 255, 249, 0.72) 18%, #dcfff4 50%, rgba(0, 255, 157, 0.84) 82%, transparent 98%);
  box-shadow: 0 0 9px rgba(220, 255, 244, 0.84), 0 0 28px rgba(0, 255, 157, 0.46), 0 0 54px rgba(0, 255, 249, 0.16);
  transform: translateY(-50%);
}

.page-handoff-line::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 38px;
  background: linear-gradient(to bottom, rgba(0, 255, 157, 0.11), transparent);
}

.page-handoff.is-running .page-handoff-curtain {
  animation: pageHandoffCurtain 680ms linear both;
}

body.page-handoff-pending.nova-awake .site-frame {
  opacity: 1;
  transition: none;
}

@keyframes pageHandoffCurtain {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, calc(100% + 10px), 0); }
}

@media (prefers-reduced-motion: reduce) {
  .page-handoff {
    display: none !important;
  }
}

@media (forced-colors: active) {
  .page-handoff-curtain {
    background: Canvas;
  }

  .page-handoff-line {
    background: Highlight;
    box-shadow: none;
  }
}
