/* Explorer: the roof-off cutaway with room pins that the hero film hands off to.
   Same two colours as the rest of the site, inverted: walnut panels, linen type, hairlines, square images, pill controls. */

.hero { container-type: size; }

.explore {
  position: absolute; inset: 0; z-index: 3;
  background: var(--ink); color: var(--canvas);
  overflow: hidden;
  opacity: 0; transition: opacity 0.5s ease;
}
.explore[hidden] { display: none; }
.explore.is-on { opacity: 1; }

/* The stage always covers the hero and keeps the picture's own proportions, so pins stay on their rooms. */
.explore__stage {
  position: absolute; left: 50%; top: 50%;
  aspect-ratio: var(--ratio, 1.7778);
  width: max(100cqw, calc(100cqh * var(--ratio, 1.7778)));
  transform: translate(-50%, -50%);
}
.explore__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.45s ease; }
.explore__bg.is-out { opacity: 0; }
.explore__stage::after { content: ""; position: absolute; inset: 0; background: rgb(64 58 52 / 0.18); pointer-events: none; }

.explore__pins { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 1; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--ink); border-radius: 9999px;
  background: var(--canvas); color: var(--ink);
  font: inherit; font-size: var(--text-caption); font-weight: 500; letter-spacing: 0.02em; line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pin:hover, .pin:focus-visible, .pin[aria-pressed="true"] { background: var(--ink); color: var(--canvas); border-color: var(--canvas); }
.explore :focus-visible { outline: 2px solid var(--canvas); outline-offset: 3px; }

/* hover preview */
.peek {
  position: absolute; z-index: 2; width: 240px;
  background: var(--ink); border: 1px solid var(--canvas);
  transform: translate(-50%, calc(-100% - 28px));
  pointer-events: none;
  opacity: 0; transition: opacity 0.15s ease;
}
.peek.is-on { opacity: 1; }
.peek.is-below { transform: translate(-50%, 28px); }
.peek img { aspect-ratio: 3 / 2; object-fit: cover; }
.peek__text { padding: 12px; }
.peek__name { font-size: var(--text-body); line-height: 1.25; color: var(--canvas); margin-bottom: 4px; }

/* top controls */
.explore__top {
  position: absolute; z-index: 4; top: var(--pad); left: var(--pad); right: var(--pad);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  pointer-events: none;
}
.explore__top > * { pointer-events: auto; }
.explore__title { color: var(--canvas); max-width: 26ch; }
.explore .label { color: var(--canvas); }
.explore .label--dim { opacity: 0.72; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--ink); border: 1px solid var(--canvas); border-radius: 9999px; }
.tabs button {
  border: 0; border-radius: 9999px; padding: 8px 20px; background: transparent; color: var(--canvas);
  font: inherit; font-size: var(--text-caption); font-weight: 500; letter-spacing: 0.083em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease;
}
.tabs button[aria-selected="true"] { background: var(--canvas); color: var(--ink); }

.pill--light { color: var(--canvas); border-color: var(--canvas); background: var(--ink); }
.pill--light:hover { background: var(--canvas); color: var(--ink); }
.button--light { background: var(--canvas); color: var(--ink); border-color: var(--canvas); }
.button--light:hover { background: var(--ink); color: var(--canvas); }

/* detail panel */
.room {
  position: absolute; z-index: 5; top: 0; bottom: 0; left: 0;
  width: min(420px, 100%);
  background: var(--ink); border-right: 1px solid var(--canvas);
  display: flex; flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%); transition: transform 0.35s ease;
}
.room.is-on { transform: none; }
.room__photo { position: relative; flex: none; }
.room__photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.room__close { position: absolute; top: 12px; right: 12px; }
.room__body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.room__name { font-size: var(--text-heading-sm); font-weight: 400; line-height: 1.1; letter-spacing: -0.056em; color: var(--canvas); margin-top: 8px; }
.room__note { color: var(--canvas); font-size: var(--text-body); line-height: 1.5; }
.room__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--canvas); padding-top: 20px; }
.room__facts dd { color: var(--canvas); font-size: var(--text-body); line-height: 1.25; margin-top: 4px; }
.room__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.room__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.room__thumbs button { padding: 0; border: 1px solid transparent; border-radius: 0; background: none; cursor: pointer; }
.room__thumbs button[aria-pressed="true"] { border-color: var(--canvas); }
.room__thumbs img { aspect-ratio: 1; object-fit: cover; }

/* bottom bar: every room as a list, so nothing depends on finding a pin */
.explore__bar {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 20px;
  padding: 12px var(--pad);
  background: var(--ink); border-top: 1px solid var(--canvas);
}
.explore__list { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; overflow-x: auto; flex: 1; scrollbar-width: none; }
.explore__list::-webkit-scrollbar { display: none; }
.explore__list button {
  border: 1px solid transparent; border-radius: 9999px; padding: 8px 12px; background: transparent; color: var(--canvas);
  font: inherit; font-size: var(--text-caption); font-weight: 500; letter-spacing: 0.083em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer;
}
.explore__list button:hover, .explore__list button[aria-pressed="true"] { border-color: var(--canvas); }
.explore__list span { opacity: 0.6; margin-right: 8px; }
.explore__bar .pill { flex: none; }

.hero__explore { margin-bottom: 12px; }
.hero__side { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.hero.is-exploring .hero__content { visibility: hidden; }

@media (max-width: 1100px) {
  .hero__side { align-items: flex-start; }
}

@media (max-width: 760px) {
  .hero.is-exploring { container-type: normal; height: auto; min-height: 0; overflow: visible; }
  .hero.is-exploring::after { display: none; }
  .explore { position: relative; inset: auto; display: flex; flex-direction: column; }
  .explore[hidden] { display: none; }
  .explore__top { position: static; flex-direction: column; padding: var(--pad); gap: 12px; }
  .explore__title { display: none; }
  .tabs { align-self: stretch; justify-content: space-between; }
  .tabs button { padding: 8px 12px; flex: 1; }
  .explore__stage { position: relative; left: auto; top: auto; transform: none; width: 100%; }
  .pin { width: 28px; height: 28px; font-size: var(--text-label); }
  .peek { display: none; }
  .explore__bar { position: static; flex-direction: column; align-items: stretch; gap: 12px; }
  .explore__list { flex-wrap: wrap; overflow: visible; }
  .room { position: fixed; z-index: 20; width: 100%; border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .explore, .room, .explore__bg, .peek { transition: none; }
}
