/* =====================================================
   WORK DOOR TRANSITION
   ===================================================== */
#door {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--magenta);
  overflow: hidden;
  pointer-events: none;
}

#door.is-active,
#door.is-ready {
  display: flex;
}

.door-grid {
  position: absolute;
  inset: -10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  transform: rotate(-12deg) scale(1.05);
  opacity: 0;
}

#door.is-revealing .door-grid {
  opacity: 1;
  transition: opacity 0.6s ease;
}

.door-wall-row {
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 5rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.05;
  opacity: 0.18;
  user-select: none;
  transform: translateX(var(--row-offset, 0));
}

.door-wall-row span {
  display: inline-block;
  animation: doorScroll 18s linear infinite;
  animation-direction: var(--row-dir, normal);
}

.door-wall-row:nth-child(7),
.door-wall-row:nth-child(8) {
  opacity: 0.95;
  color: var(--paper);
  text-shadow: 0 0 40px color-mix(in srgb, var(--magenta) 60%, transparent);
}

@keyframes doorScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Circular reveal: once the wall has been showcased, .is-opening triggers the
   clip shrink that reveals the THORIA hero behind it. */
#door.is-revealing {
  clip-path: circle(150% at 50% 50%);
}

#door.is-opening {
  animation: door-clip 1.1s cubic-bezier(0.45, 0, 0.15, 1) forwards;
}

@keyframes door-clip {
  to { clip-path: circle(0% at 50% 50%); }
}

html.is-reduced-motion #door.is-revealing,
html.is-reduced-motion #door.is-opening {
  animation: none;
  clip-path: circle(0% at 50% 50%);
}
