/* =============================================================
   THE CORRIDOR
   The section is 260vh tall; the stage inside is sticky at 100vh.
   Scrolling that extra 160vh is what walks the camera forward.
   Without JS the stage is a normal 68vh panel with a dark
   gradient, and the copy reads exactly the same.
   ============================================================= */

.corridor {
  position: relative;
  background: #000;
}

.corridor-stage {
  position: relative;
  height: 68vh;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(0, 214, 88, 0.08), transparent 60%),
    linear-gradient(180deg, #000 0%, #050705 50%, #000 100%);
  border-block: 1px solid rgba(0, 255, 0, 0.08);
}

/* Only once the scene is confirmed running does the section get tall and
   the stage become sticky. Doing this in CSS up front would leave a 260vh
   column of empty black for anyone the canvas never loads for. */
.corridor.is-3d { height: 260vh; }

.corridor.is-3d .corridor-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #000;
}

.corridor-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.corridor.is-3d .corridor-canvas { opacity: 1; }

/* Darkens the edges so the copy always has something to sit on, whatever
   the corridor is doing behind it. */
.corridor-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 35%, transparent 65%, rgba(0,0,0,0.7) 100%);
}

.corridor-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 0 24px;
  text-align: center;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.corridor-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.05em;
  line-height: 1;
}

.corridor-copy h2 .accent { color: var(--toxic); text-shadow: var(--glow); }

.corridor-copy p {
  color: var(--off-white);
  line-height: 1.85;
  opacity: 0.85;
}

.corridor-copy .btn { margin-top: 10px; }

.corridor-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.25);
  opacity: 0;
}

.corridor.is-3d .corridor-hint {
  opacity: 1;
  animation: corridor-hint 2.6s ease-in-out infinite;
}

@keyframes corridor-hint {
  0%, 100% { opacity: 0.18; transform: translate(-50%, 0); }
  50%      { opacity: 0.5;  transform: translate(-50%, 4px); }
}

@media (prefers-reduced-motion: reduce) {
  .corridor.is-3d { height: auto; }
  .corridor.is-3d .corridor-stage { position: relative; height: 68vh; }
  .corridor-hint { display: none; }
}

@media (max-width: 760px) {
  .corridor-stage { height: 60vh; min-height: 380px; }
}
