/* ========== Global Reset & Base ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  background-color: #02030a;
  color: #ffffff;
  overflow: hidden;
}

/* Shared paddings so header & attribution align */
:root {
  --page-side-padding: 64px;
  --wall-margin-top: 160px;
  --wall-margin-side: 100px;
  --wall-margin-bottom: 100px;
  --wall-radius: 28px;
  --glass-border: rgba(255, 255, 255, 0.72);
}

/* ========== Sky Background (never zooms) ========== */

.sky-bg {
  position: fixed;
  inset: 0;
  background-image: url("images/bg1.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* ========== Header (stays put, blurs during zoom) ========== */

.top-bar {
  position: fixed;
  top: 20px;
  left: var(--page-side-padding);
  right: var(--page-side-padding);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 5;
  pointer-events: none; /* content is informational for now */
}

.logo-pill {
  pointer-events: auto;
  border: none;
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: radial-gradient(circle at 30% 0%, #ffffff 0, #b0b0b0 30%, #1a1a1a 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.75);
  cursor: default;
}

.title-block h1 {
  font-size: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.title-block p {
  font-size: 12px; /* baseline */
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
}

/* blur header while zooming */
.body-zooming .top-bar {
  filter: blur(6px);
}

/* ========== Attribution Panel (bottom margin, under left door) ========== */

.attribution-panel {
  position: fixed;
  left: var(--page-side-padding); /* roughly under the left door region */
  bottom: 50px; /* centered vertically in the bottom 100px margin */
  width: 180px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.5); /* 50% translucent black */
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  z-index: 5;
}

.attribution-panel .attrib-line + .attrib-line {
  margin-top: 4px;
}

/* blur during zoom */
.body-zooming .attribution-panel {
  filter: blur(6px);
}

/* ========== Zoom Shell & Lobby Wall (this is what zooms) ========== */

.zoom-shell {
  position: fixed;
  left: var(--wall-margin-side);
  right: var(--wall-margin-side);
  top: var(--wall-margin-top);
  bottom: var(--wall-margin-bottom);
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
  pointer-events: none; /* children re-enable where needed */
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.9s linear;
}

.zoom-shell-inner {
  width: 100%;
  height: 100%;
}

/* we’ll wrap lobby-shell inside for clearer transform targeting if needed */
.lobby-shell {
  width: 100%;
  height: 100%;
}

.lobby-wall {
  width: 100%;
  height: 100%;
  border-radius: var(--wall-radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(170, 170, 170, 0.12))
    rgba(20, 20, 30, 0.78);
  box-shadow:
    0 22px 40px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  position: relative;
  overflow: hidden;
  padding: 40px 0; /* vertical breathing room */
}

/* Faint inner gradient so edges feel darker */
.lobby-wall::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.12), transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(0, 0, 0, 0.3), transparent 55%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* ========== Door Row & Doors (layout locked here) ========== */

.door-row {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* horizontal spacing is computed in JS to enforce gap = 0.2 * doorWidth */
  column-gap: 40px; /* temporary, overridden by JS */
  padding-left: 40px;
  padding-right: 40px;
  pointer-events: none;
}

.door {
  position: relative;
  pointer-events: auto;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  height: 70%; /* JS will override width & height exactly */
  border-radius: 999px;
  cursor: pointer;
  transform: translateX(0);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

/* slight lift & slide left on hover (if not zooming) */
.door:not(.door-disabled):hover {
  transform: translateX(-16px);
}

/* The narrow vertical “slit” beside the door — a genuine gap, not a fake panel */
.door-gap {
  width: 0;
  flex: 0 0 auto;
  transition: width 180ms ease-out, opacity 180ms ease-out;
  opacity: 0;
}

/* create the slit when hovered */
.door:not(.door-disabled):hover .door-gap {
  width: 10px;
  opacity: 1;
}

/* this transparent gap simply lets the background of the lobby-wall show through.
   Because the wall itself is frosted, we reduce its blur in that strip to hint “clearer”.
   This is approximate but visually reads as a cutout. */
.door-gap::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Door glass face */
.door-face {
  flex: 1 1 auto;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(210, 210, 210, 0.35));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 32px 26px 30px;
}

.door-title {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.8);
}

.door-body {
  font-size: 11px;
  color: rgba(20, 20, 20, 0.75);
  text-align: center;
  max-width: 140px;
}

/* Remove hover behaviours when zooming */
.body-zooming .door {
  pointer-events: none;
  transform: translateX(0) !important;
}

.body-zooming .door-gap {
  width: 0 !important;
  opacity: 0 !important;
}

/* ========== Zoom States ========== */

.zoom-shell.zoomed-in {
  /* scale value is set dynamically in JS by adding inline transform */
}

/* Safety for small screens — let the page scroll if it has to */
@media (max-height: 700px) {
  body {
    overflow-y: auto;
  }

  .zoom-shell {
    bottom: 40px;
  }

  .attribution-panel {
    bottom: 20px;
  }
}
