/* THE ELEVATOR — it only goes down. it skips the floor it shouldn't. */

:root {
  --el-metal: #2a2a30;
  --el-metal-light: #45454e;
  --el-amber: #ffb020;
}

body.elevator {
  margin: 0;
  min-height: 500vh; /* scroll distance = descent */
  background: #0a0a0c;
  color: #e8e6e0;
  /* the shared reset sets overflow-x: hidden on body. per spec, an
     element with overflow-x set to anything but visible while
     overflow-y stays visible has overflow-y computed as auto too —
     which turns body into its own scroll container and breaks
     position: sticky against the viewport. undo that here. */
  overflow-x: visible;
}

.el-shaft {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* car interior */
.car {
  width: min(80vw, 480px);
  height: min(80vh, 520px);
  background: linear-gradient(180deg, var(--el-metal-light), var(--el-metal));
  border-radius: 4px;
  position: relative;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.6), 0 30px 80px rgba(0,0,0,0.6);
  border: 1px solid #4a4a54;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* the floor indicator panel — mounted above the doors, not behind them,
   so it stays readable through the entire descent */
.panel {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 0.8rem 1.4rem;
  text-align: center;
  z-index: 6;
}
.panel { cursor: pointer; }
.panel.panel-alarm {
  animation: alarm-flash 0.6s ease-out;
}
@keyframes alarm-flash {
  0%, 100% { border-color: #000; box-shadow: none; }
  20%, 60% { border-color: #ff2020; box-shadow: 0 0 20px 4px rgba(255, 32, 32, 0.6); }
  40%, 80% { border-color: #000; box-shadow: none; }
}

.panel .floor-num {
  font-family: "Courier New", monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--el-amber);
  text-shadow: 0 0 12px rgba(255, 176, 32, 0.7);
  line-height: 1;
}
.panel .floor-name {
  margin-top: 0.4rem;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.8rem;
  color: #ccc;
  min-height: 1.2em;
}

/* doors — two panels that slide apart on arrival and shut before the
   next descent begins */
.doors {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  pointer-events: none;
}
.door-panel {
  flex: 1;
  background: linear-gradient(90deg, #5c5c68, #3a3a44);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
  transition: transform 0.6s cubic-bezier(.7,0,.3,1);
}
.door-panel.left { transform: translateX(0); border-right: 2px solid #16161a; }
.door-panel.right { transform: translateX(0); border-left: 2px solid #16161a; }

.car.open .door-panel.left { transform: translateX(-102%); }
.car.open .door-panel.right { transform: translateX(102%); }

.car .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,176,32,0.08), transparent 70%);
  z-index: 1;
}

.el-scroll-hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
}

.wayfinding.el-nav {
  z-index: 10;
}
