/* Full-viewport architectural gallery; the WebGL canvas owns the physical room. */
.showroom {
  --header-height: 76px;

  height: var(--showroom-height, 480svh);
  overflow-anchor: none;
  position: relative;
  background: #101a17;
  color: #edf0e4;
}

.showroom[hidden],
.showroom [hidden] {
  display: none;
}

.showroom__stage {
  position: sticky;
  top: var(--header-height);
  height: calc(100svh - var(--header-height));
  min-height: 510px;
  overflow: hidden;
  isolation: isolate;
}

.showroom__viewport,
.showroom__labels,
.showroom__viewport canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.showroom__viewport {
  touch-action: pan-y;
}

.showroom__labels {
  pointer-events: none;
}

.showroom__exhibit {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  white-space: nowrap;
  padding: 12px 18px;
  min-height: 44px;
  background: #12251ee8;
  border: 1px solid #a1b39b;
  border-radius: 2px;
  color: #edf0e4;
  font-size: 0.75rem;
  transition: background 160ms;
}

.showroom__exhibit:hover {
  background: #365a52;
}

.showroom__stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #07120f70, transparent 25%, transparent 62%, #07120fea 100%);
  pointer-events: none;
}

.showroom__heading,
.showroom__skip,
.showroom__caption,
.showroom__controls {
  position: absolute;
  z-index: 2;
}

.showroom__heading {
  left: 5%;
  top: 5%;
}

.showroom .showroom__eyebrow,
.showroom .showroom__category,
.showroom .showroom__hint {
  color: #c9d4c2;
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.showroom .showroom__eyebrow {
  margin-bottom: 12px;
}

.showroom__heading h2 {
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  color: inherit;
  margin: 0;
}

.showroom__skip {
  top: 6%;
  right: 5%;
  padding-block: 6px;
  border-bottom: 1px solid #9bae9c;
  font-size: 0.8rem;
}

.showroom a:hover {
  color: #fff;
}

.showroom :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.showroom__caption {
  bottom: 15%;
  left: 5%;
  right: 5%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 20px;
  pointer-events: none;
}

.showroom .showroom__category {
  grid-column: 1 / -1;
  margin: 0;
}

.showroom__name {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  color: inherit;
}

.showroom__open {
  pointer-events: auto;
  padding-block: 10px;
  border-bottom: 1px solid #9bae9c;
  font-size: 0.8rem;
}

.showroom__controls {
  bottom: 4%;
  left: 5%;
  right: 5%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.showroom .showroom__hint {
  margin: 0 auto 0 0;
}

.showroom__navigation,
.showroom__steps {
  display: flex;
  align-items: center;
  gap: 10px;
}

.showroom button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: #152a2080;
  color: inherit;
  border: 1px solid #859c86;
  border-radius: 50%;
  font: inherit;
  cursor: pointer;
}

.showroom button:hover {
  background: #365a52;
}

.showroom button:disabled {
  opacity: 0.3;
  cursor: default;
}

.showroom__count {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.showroom__steps button {
  border: 0;
  border-radius: 0;
  background: transparent;
  position: relative;
}

.showroom__steps button::after {
  content: '';
  position: absolute;
  inset: 20px 6px auto;
  height: 2px;
  background: #708773;
}

.showroom__steps button[aria-pressed="true"]::after {
  background: #edf0e4;
  height: 4px;
}

.showroom--static {
  height: auto;
}

.showroom--static .showroom__stage {
  position: relative;
  top: 0;
}

#project-collection {
  scroll-margin-top: 90px;
}

@media (max-width: 700px) {
  .showroom__heading {
    top: 4%;
  }

  .showroom .showroom__eyebrow {
    font-size: 0.5rem;
  }

  .showroom__skip {
    top: 17%;
    left: 5%;
    right: auto;
    font-size: 0.7rem;
  }

  .showroom__caption {
    bottom: 23%;
    grid-template-columns: 1fr;
  }

  .showroom__open {
    justify-self: start;
  }

  .showroom__controls {
    bottom: 2%;
    flex-wrap: wrap;
    gap: 2px 12px;
  }

  .showroom .showroom__hint {
    width: 100%;
    font-size: 0.5rem;
  }

  .showroom__steps {
    margin-left: auto;
    gap: 0;
  }

  .showroom__steps button {
    min-width: 28px;
  }

  .showroom__exhibit {
    padding: 10px 12px;
    font-size: 0.65rem;
  }
}

@media (max-height: 700px) and (max-width: 700px) {
  .showroom .showroom__eyebrow {
    display: none;
  }

  .showroom__skip {
    top: 13%;
  }

  .showroom__caption {
    bottom: 23%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showroom__exhibit {
    transition: none;
  }
}

/* Keep the captured interfaces intact in the project list beneath the room. */
.portfolio-project__media img[src*="/showroom/"] {
  object-fit: contain;
  padding: clamp(12px, 2vw, 28px);
  background: #eef1ed;
}

/* The full collection stays navigable without overflowing a narrow screen. */
.showroom__steps {
  display: grid;
  grid-template-columns: repeat(var(--project-count, 12), minmax(0, 1fr));
  width: clamp(240px, 32vw, 440px);
  gap: 0;
  flex-shrink: 0;
}

.showroom__steps button {
  min-width: 0;
}

@media (max-width: 900px) {
  .showroom__controls {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .showroom__steps {
    width: 100%;
  }

  .showroom__caption {
    bottom: 24%;
  }
}
