/* The same light at the door threshold and at the first dashboard paint. */
.door-transition-light {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: radial-gradient(ellipse at 52% 40%, #a8526d, #41202d 60%, var(--cdoor-brand-shadow));
  pointer-events: none;
}

.door-transition-out { display: none; }

[data-door-state="opening"][data-door-handoff] > .door-transition-out {
  display: block;
  animation: door-light-appear 0.37s ease-in 0.95s both;
}

.door-transition-in { animation: door-light-clear 0.52s ease-out both; }

@keyframes door-light-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes door-light-clear { from { opacity: 1; } to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .door-transition-in,
  [data-door-state="opening"][data-door-handoff] > .door-transition-out { display: none; }
}
