/* =======================================================
   VIBRAHALO · TRANSIT DOOR CINEMATIC
   Estados: is-arming | is-open | is-verified | is-sealing
======================================================= */

#halo-door {
  --halo-target-url: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(120, 60, 255, 0.25), rgba(0, 0, 0, 0.95));
  display: none;
  pointer-events: none;
}

#halo-door.is-arming,
#halo-door.is-open,
#halo-door.is-verified {
  display: block;
}

#halo-door .target {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.92);
  background-image: var(--halo-target-url);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

#halo-door.is-open .target {
  opacity: 1;
}

#halo-door .door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 3;
  background: linear-gradient(to bottom, rgba(20, 20, 30, 1), rgba(5, 5, 10, 1));
  box-shadow: inset 0 0 60px rgba(120, 60, 255, 0.35), inset 0 0 140px rgba(0, 0, 0, 0.85);
  transform: translate3d(0, 0, 0);
  transition: transform 1.2s cubic-bezier(.7, 0, .2, 1);
}

#halo-door .door.left {
  left: 0;
  border-right: 1px solid rgba(180, 120, 255, 0.25);
}

#halo-door .door.right {
  right: 0;
  border-left: 1px solid rgba(180, 120, 255, 0.25);
}

#halo-door.is-open .door.left {
  transform: translate3d(-105%, 0, 0);
}

#halo-door.is-open .door.right {
  transform: translate3d(105%, 0, 0);
}

#halo-door .door::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  background: rgba(180, 120, 255, 0.95);
  filter: blur(6px);
  opacity: 0.6;
  animation: haloPulse 2.4s infinite;
}

#halo-door .door.left::before { right: 12px; }
#halo-door .door.right::before { left: 12px; }

@keyframes haloPulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.85; }
}

#halo-door .fog {
  position: absolute;
  bottom: -20%;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 2;
  background: radial-gradient(circle at center, rgba(200, 150, 255, 0.25), transparent 70%);
  filter: blur(30px);
  opacity: 0;
  transition: opacity 1.5s ease;
}

#halo-door.is-open .fog {
  opacity: 1;
}

#halo-door::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 3px;
  margin: auto;
  background: linear-gradient(to bottom, transparent, rgba(180, 120, 255, 0.65), transparent);
  opacity: 0;
  transition: opacity 0.8s ease;
}

#halo-door.is-verified::after {
  opacity: 1;
}

#halo-door-text {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0.35em;
  color: rgba(220, 200, 255, 0.95);
  text-transform: uppercase;
  opacity: 0.85;
  text-shadow: 0 0 18px rgba(120, 60, 255, 0.55);
}

#halo-door.is-sealing {
  animation: warpOut 0.8s ease-out forwards;
}

@keyframes warpOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.25); }
}
