/* ==========================================================================
   Gallery — The Conservatory. Three rooms, three climates.
   ========================================================================== */

.page-gallery { background: var(--primer); }
/* plinth shadows and swinging frames reach past the edges; never let them widen a phone's page */
.conservatory { position: relative; overflow-x: clip; }

/* ---------- foyer: a glasshouse drawn on the blank page; the doors open, you walk in ---------- */
.foyer { position: relative; height: 270vh; }
.foyer__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--primer);
}
.foyer__house {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  width: min(1240px, 112vw, calc(66vh * 1200 / 700));
  transform-origin: 50% 80%;
  translate: -50% 0;
}
.foyer__house svg { width: 100%; height: auto; overflow: visible; }
.house__line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.house__thin { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.house__ray { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.house__door { transform-box: fill-box; }
.house__glass { fill: #fff; opacity: .55; }
.house__tint { opacity: .5; }
.house__ground { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }

.foyer__fill {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, #ffd27a 0%, #f7b064 55%, #e58a4e 100%);
  pointer-events: none;
}

.foyer__copy {
  position: absolute;
  z-index: 2;
  top: clamp(88px, 13vh, 140px);
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: start;
}
.foyer__title {
  font-size: clamp(3.4rem, 1.2rem + 9vw, 9.5rem);
  color: var(--ink);
}
.foyer__lede { max-width: 25rem; margin-top: 18px; font-size: var(--fs-lead); line-height: 1.25; font-weight: 600; }

.rooms {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-items: end;
}
.room-chip {
  display: grid;
  gap: 2px;
  min-width: 13.5rem;
  padding: 10px 16px 12px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--chip, var(--halo));
  box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none;
  transform: rotate(var(--r, 0deg));
  transition: transform .28s var(--ease-pop), box-shadow .28s var(--ease-pop);
}
.room-chip:hover { transform: rotate(calc(var(--r) * -1)) translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.room-chip__name { font-family: var(--display); font-weight: 900; font-size: 1.75rem; line-height: .95; text-transform: uppercase; }
.room-chip__count { font-size: .95rem; font-weight: 600; }
.rooms li:nth-child(1) .room-chip { --chip: #ffb35c; --r: -1.6deg; }
.rooms li:nth-child(2) .room-chip { --chip: var(--jungle); --r: 1.2deg; }
.rooms li:nth-child(3) .room-chip { --chip: #b9a3ff; --r: -.8deg; }

.foyer__note {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 3vh;
  font-size: 1.1rem;
}
.foyer__scroll {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: 3vh;
  font-family: var(--hand);
  font-size: 1.15rem;
  transform: rotate(-3deg);
}
.foyer__scroll svg { display: inline-block; vertical-align: middle; width: 22px; height: 30px; margin-left: 6px; animation: nudge 1.29s var(--ease-pop) infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(7px); } }

@media (max-width: 760px) {
  .foyer__copy { grid-template-columns: 1fr; }
  .rooms { justify-items: start; grid-template-columns: repeat(3, auto); gap: 8px; }
  .room-chip { min-width: 0; min-height: 48px; padding: 7px 10px 9px; }
  .room-chip__name { font-size: 1.1rem; }
  .room-chip__count { font-size: .8125rem; }
  .foyer__house { bottom: 10vh; width: 150vw; }
  .foyer__note { display: none; }
}
@media (max-width: 380px) {
  .rooms { gap: 6px; }
  .room-chip { padding: 6px 8px 8px; }
  .room-chip__name { font-size: 1rem; }
}
/* phones on their side: the words on the left, the glasshouse beside them.
   As you walk in, the house glides to the middle (gallery.js reads its offset). */
@media (orientation: landscape) and (max-height: 540px) {
  .foyer { --copyw: min(46vw, 420px); --housew: min(50vw, calc(76vh * 1200 / 700)); }
  .foyer__copy { top: 80px; right: auto; width: var(--copyw); grid-template-columns: 1fr; gap: 14px; }
  .foyer__title { font-size: min(clamp(3.4rem, 1.2rem + 9vw, 9.5rem), 15vh); }
  .foyer__lede { margin-top: 8px; font-size: 1rem; }
  .rooms { justify-items: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .room-chip { min-width: 0; min-height: 44px; padding: 6px 9px 8px; }
  .room-chip__name { font-size: 1rem; }
  .room-chip__count { font-size: .8125rem; }
  .foyer__house { left: calc(var(--gutter) + var(--copyw) + 28px + var(--housew) / 2); bottom: 3vh; width: var(--housew); }
  .foyer__note { display: none; }
}

/* ---------- shared: room signs (enamel plates, screwed to the wall) ---------- */
.sign {
  position: relative;
  max-width: 34rem;
  padding: 26px 28px 24px;
  color: var(--ink);
  background: var(--plate, var(--primer));
  border: 4px solid var(--ink);
  border-radius: 14px;
  box-shadow: 9px 10px 0 var(--ink);
  transform: rotate(var(--tilt, -1.2deg));
}
.sign::before, .sign::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, #9a94a3 22% 100%);
  border: 2px solid var(--ink);
}
.sign::before { left: 12px; }
.sign::after { right: 12px; }
.sign__tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 0; list-style: none; }
.sign__tags li {
  padding: 3px 10px 4px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  background: var(--primer);
}
.sign__tags li:first-child { background: var(--ink); color: var(--primer); }
.sign__name { font-size: clamp(3rem, 1.4rem + 5.6vw, 5.6rem); line-height: .84; }
.sign__latin { margin-top: 8px; font-weight: 600; font-style: normal; }
.sign__latin::before { content: "\201C"; }
.sign__latin::after { content: "\201D"; }
.sign__climate {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 3px solid var(--ink);
}
.sign__climate dt { font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.3; }
.sign__climate dd { margin: 0; font-weight: 550; line-height: 1.35; padding-top: 2px; }
.sign__intro { margin-top: 16px; font-size: 1.08rem; line-height: 1.45; }
.sign__rule {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 12px 7px;
  font-family: var(--hand);
  font-size: 1.08rem;
  line-height: 1.15;
  color: var(--primer);
  background: var(--red-deep);
  border-radius: 4px;
  transform: rotate(1.5deg);
}

/* ---------- art buttons (every piece is a button that opens the viewer) ---------- */
.art {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ph, #ccc);
}
.art:focus-visible { outline: 4px solid var(--halo); outline-offset: 5px; }

/* ==========================================================================
   ROOM 1 — THE KILN DESERT: clay under a setting sun, shadows swing with it
   ========================================================================== */
.biome { position: relative; }
.biome--kiln {
  --sun: -1;
  background: #f0a35d;
  padding-bottom: 18vh;
}
.kiln__sky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  margin-bottom: -100vh;
  margin-bottom: -100svh;
  overflow: hidden;
  background: linear-gradient(180deg, #ffd27a 0%, #f7b064 55%, #e58a4e 100%);
  pointer-events: none;
}
.kiln__sun {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(46vmin, 520px);
  aspect-ratio: 1;
  margin: calc(min(46vmin, 520px) / -2) 0 0 calc(min(46vmin, 520px) / -2);
  will-change: transform;
}
.kiln__sun svg { width: 100%; height: 100%; overflow: visible; }
.kiln__sun .sun__disc { fill: #fff2c2; }
.kiln__sun .sun__ray { stroke: #fff2c2; stroke-width: 9; stroke-linecap: round; }
.kiln__horizon {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30vh;
  background:
    radial-gradient(120% 90% at 18% 100%, #c4512b 0 40%, transparent 41%),
    radial-gradient(90% 80% at 82% 100%, #b2441f 0 42%, transparent 43%),
    radial-gradient(70% 60% at 50% 100%, #d0632f 0 45%, transparent 46%);
  opacity: .85;
}

.biome__inner {
  position: relative;
  z-index: 1;
  padding: 16vh var(--gutter) 0;
  max-width: 1380px;
  margin: 0 auto;
}
.sign--kiln { --plate: #fff4dc; --tilt: -1.4deg; }

.plinths {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 12vh clamp(20px, 3vw, 48px);
  margin: 14vh 0 0;
  padding: 0;
  list-style: none;
  align-items: end;
}
.plinth {
  position: relative;
  grid-column: span var(--span, 4);
  justify-self: var(--js, center);
  width: var(--w, 88%);
  margin-top: var(--lift, 0px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.plinth__piece {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: var(--ratio, .75);
}
.plinth__piece::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  border-radius: 6px;
  transform: translate(calc(var(--sun) * -36px), calc(16px + (1 - var(--sun) * var(--sun)) * -6px + 14px));
  opacity: .92;
}
.plinth__piece .art { border: 4px solid var(--ink); border-radius: 6px; overflow: hidden; background: #fff; }
.plinth__piece .art img { transition: transform .5s var(--ease-out); }
.plinth__piece .art:hover img { transform: scale(1.04); }
.plinth__block {
  position: relative;
  width: 74%;
  height: var(--ph, 110px);
  margin-top: -2px;
  background: linear-gradient(180deg, #f8ead6 0 16px, #e8cfa9 16px, #d9b88b 100%);
  border: 4px solid var(--ink);
  border-top-width: 3px;
}
.plinth__block::after {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  background: var(--ink);
  transform: translate(calc(var(--sun) * -30px), 18px);
  opacity: .9;
}
.plinth__label {
  position: absolute;
  z-index: 3;
  bottom: calc(var(--ph, 110px) * .38);
  left: 50%;
  translate: -50% 0;
  max-width: 68%;
  padding: 4px 9px 5px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.05;
  text-align: center;
  background: var(--primer);
  border: 2.5px solid var(--ink);
  border-radius: 3px;
}

/* suspended pieces (wide ones) hang on wires instead of standing on plinths */
.plinth--hung { align-self: start; margin-top: 16vh; }
.plinth__swing { position: relative; }
.plinth--hung .plinth__wires {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  height: 16vh;
  overflow: visible;
}
.plinth--hung .plinth__wires line { stroke: var(--ink); stroke-width: 2.5; }
.plinth--hung .plinth__label { position: relative; bottom: auto; left: auto; translate: none; margin-top: 30px; align-self: flex-start; transform: rotate(-2deg); }
.plinth--hung .plinth__swing { width: 100%; transform-origin: 50% -16vh; animation: dangle 4.3s ease-in-out infinite alternate; }
@keyframes dangle { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }

.js .plinth .plinth__piece, .js .plinth .plinth__swing > .plinth__piece { opacity: 0; transform: translateY(60px); }
.js .plinth.is-in .plinth__piece {
  opacity: 1;
  transform: none;
  transition: transform .9s var(--ease-pop) var(--d, 0ms), opacity .3s var(--d, 0ms);
}

@media (max-width: 760px) {
  .plinths { grid-template-columns: 1fr; gap: 14vh; margin-top: 10vh; }
  .plinth { grid-column: auto; width: 78%; margin-top: 0; justify-self: var(--jsm, center); }
  .plinth--hung { width: 92%; }
  .plinth__piece::after { transform: translate(calc(var(--sun) * -20px), 18px); }
}

/* ==========================================================================
   AIRLOCKS — glass doors close, the climate changes, the doors open
   ========================================================================== */
.airlock { position: relative; height: 230vh; }
.airlock__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.airlock__bg { position: absolute; inset: 0; }
.airlock__bg--to { opacity: 0; }
.airlock__door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  overflow: hidden;
  border: 6px solid var(--ink);
  background:
    linear-gradient(90deg, var(--ink) 0 4px, transparent 4px) 0 0 / 25% 100%,
    linear-gradient(180deg, var(--ink) 0 4px, transparent 4px) 0 0 / 100% 20%,
    linear-gradient(160deg, rgba(255,255,255,.88), rgba(232,232,226,.78));
  will-change: transform;
}
.airlock__door--l { left: 0; transform: translateX(-102%); border-right-width: 8px; }
.airlock__door--r { right: 0; transform: translateX(102%); border-left-width: 8px; }
.airlock__num {
  position: absolute;
  top: 50%;
  font-family: var(--display);
  font-weight: 900;
  font-size: min(78vh, 70vw);
  line-height: .8;
  color: var(--num, var(--halo));
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  text-shadow: 14px 14px 0 var(--ink);
  translate: 0 -54%;
}
.airlock__door--l .airlock__num { right: 0; transform: translateX(50%); }
.airlock__door--r .airlock__num { left: 0; transform: translateX(-50%); }
.airlock__panel {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  z-index: 3;
  width: min(92vw, 620px);
  padding: 18px 22px 20px;
  background: var(--primer);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 8px 8px 0 var(--ink);
  translate: -50% 0;
  opacity: 0;
  transform: scale(.85) rotate(-2deg);
}
.airlock__kicker { font-weight: 700; font-size: 1rem; }
.airlock__name { font-size: clamp(2.2rem, 1.2rem + 4vw, 4rem); margin-top: 4px; }
.airlock__readout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 16px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 3px solid var(--ink);
}
.airlock__readout dt { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.airlock__readout dd { margin: 0; font-weight: 550; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   ROOM 2 — THE CONCRETE JUNGLE: walk the wall, sideways
   ========================================================================== */
.biome--jungle { background: #0e5a39; color: var(--primer); }
.jungle__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.jungle__wall {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--wallw, 300vw);
  background-color: #0e5a39;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120'%3E%3Cg fill='none' stroke='%23083d26' stroke-width='5'%3E%3Cpath d='M0 2.5H240M0 62.5H240M2.5 0V60M122.5 0V60M62.5 60V120M182.5 60V120'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='.035'%3E%3Crect x='8' y='8' width='108' height='48'/%3E%3Crect x='128' y='8' width='108' height='48'/%3E%3Crect x='68' y='68' width='108' height='48'/%3E%3C/g%3E%3C/svg%3E");
  will-change: transform;
}
.jungle__wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 30, 18, .55), transparent 22%, transparent 70%, rgba(4, 30, 18, .7));
}
.jungle__track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: clamp(56px, 7vw, 130px);
  padding: 70px clamp(24px, 6vw, 110px) 40px var(--gutter);
  will-change: transform;
}
.sign--jungle { --plate: var(--pink); --tilt: 1.3deg; flex: none; width: min(80vw, 30rem); }
.jungle__vine { position: absolute; top: 58px; left: 0; height: 120px; overflow: visible; pointer-events: none; }
.jungle__vine path { fill: none; stroke: #2bd46b; stroke-width: 7; stroke-linecap: round; }
.jungle__vine .leaf { fill: #2bd46b; stroke: #083d26; stroke-width: 2; }

.mural {
  position: relative;
  flex: none;
  height: var(--mh, min(60vh, 680px));
  aspect-ratio: var(--ratio, 1.333);
  margin: 0;
  translate: 0 var(--off, 0);
}
.mural .art {
  border: 5px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 16px 16px 0 rgba(6, 18, 12, .92);
  transition: transform .4s var(--ease-pop), box-shadow .4s var(--ease-pop);
}
.mural .art:hover { transform: translate(-4px, -6px) rotate(-.4deg); box-shadow: 22px 24px 0 rgba(6, 18, 12, .92); }
.mural__label {
  position: absolute;
  left: 22px;
  max-width: min(78%, 22rem);
  padding: 8px 14px 9px;
  color: var(--ink);
  background: #f7f1df;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.05;
  transform: rotate(var(--lr, -2deg));
  box-shadow: 4px 4px 0 rgba(6, 18, 12, .7);
}
.mural__label small { display: block; font-family: var(--text); font-weight: 600; font-size: .85rem; margin-top: 3px; }
.mural__label .tape { top: -12px; left: 50%; margin-left: -37px; transform: rotate(-4deg); }
.mural--label-below .mural__label { top: calc(100% + 26px); }
.mural--label-above .mural__label { bottom: calc(100% + 24px); }
.jungle__tag { flex: none; width: clamp(70px, 8vw, 120px); align-self: var(--as, center); translate: 0 var(--ty, 0); overflow: visible; }
.jungle__end {
  flex: none;
  width: min(70vw, 26rem);
  font-family: var(--hand);
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.3rem);
  line-height: 1.1;
  color: var(--halo);
  transform: rotate(-4deg);
}
.jungle__end svg { width: 120px; margin-top: 10px; }
.jungle__leaves { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.jungle__leaves svg { position: absolute; overflow: visible; }

@media (max-width: 760px) {
  /* a whole mural always fits on the screen, however wide it is */
  .mural { --mh: min(50vh, 460px, calc(84vw / var(--ratio, 1.333))); }
  .sign--jungle { width: 84vw; }
  .sign { padding: 22px 20px 20px; }
}

/* ==========================================================================
   ROOM 3 — THE NIGHT BLOOM: a salon hang after hours, one spotlight
   ========================================================================== */
.biome--night {
  --focus: var(--halo);
  color: var(--primer);
  background-color: #170a33;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%23ffffff' opacity='.05'%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3Ccircle cx='30' cy='18' r='6'/%3E%3Ccircle cx='30' cy='42' r='6'/%3E%3Ccircle cx='18' cy='30' r='6'/%3E%3Ccircle cx='42' cy='30' r='6'/%3E%3Ccircle cx='90' cy='90' r='4'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #170a33, #26145a 60%, #1b0d40);
  padding-bottom: 20vh;
}
.night__sky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  margin-bottom: -100vh;
  margin-bottom: -100svh;
  overflow: hidden;
  pointer-events: none;
}
.night__spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 90vmax;
  height: 90vmax;
  margin: -45vmax 0 0 -45vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 120, .26), rgba(255, 200, 36, .08) 55%, transparent);
  will-change: transform;
}
.firefly {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffe58a;
  box-shadow: 0 0 10px 3px rgba(255, 210, 80, .65);
  animation: drift var(--t, 12s) ease-in-out var(--dl, 0s) infinite alternate, blink var(--b, 2.4s) ease-in-out infinite;
}
@keyframes drift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(var(--ax, 40px), var(--ay, -30px)); }
  66% { transform: translate(calc(var(--ax, 40px) * -.6), calc(var(--ay, -30px) * 1.4)); }
  100% { transform: translate(calc(var(--ax, 40px) * .3), calc(var(--ay, -30px) * -.8)); }
}
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.sign--night { --plate: var(--halo); --tilt: -1deg; }
.salon {
  position: relative;
  margin-top: 14vh;
  display: flex;
  flex-direction: column;
}
.salon__row { display: flex; justify-content: center; align-items: flex-start; }
.hang { position: relative; flex: none; padding-top: 34px; margin-top: var(--jy, 0px); }
.hang__swing { transform: rotate(var(--jr, 0deg)); transform-origin: 50% -2px; transition: transform .45s var(--ease-pop); }
.hang__swing:hover { transform: rotate(0deg) translateY(-3px); }
.hang__wire { position: absolute; left: 6%; width: 88%; top: -34px; height: 36px; overflow: visible; }
.hang__wire path { fill: none; stroke: #c9b8ef; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.hang__wire circle { fill: #d9d2e8; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.hang .art {
  border: 6px solid #0a0612;
  outline: 1px solid rgba(255, 255, 255, .14);
  outline-offset: -1px;
  box-shadow: 16px 18px 0 rgba(5, 2, 12, .78);
  transition: box-shadow .45s var(--ease-pop);
}
.hang .art:hover { box-shadow: 22px 26px 0 rgba(5, 2, 12, .8); }
.js .hang .hang__swing { opacity: 0; }
.js .hang.is-in .hang__swing { opacity: 1; animation: swing-in 1.9s cubic-bezier(.2, .75, .35, 1) var(--d, 0ms) backwards; }
@keyframes swing-in {
  0%   { opacity: 0; transform: translateY(-26px) rotate(calc(var(--jr) + 11deg)); }
  12%  { opacity: 1; }
  28%  { transform: rotate(calc(var(--jr) - 7deg)); }
  46%  { transform: rotate(calc(var(--jr) + 4deg)); }
  64%  { transform: rotate(calc(var(--jr) - 2deg)); }
  82%  { transform: rotate(calc(var(--jr) + .8deg)); }
  100% { opacity: 1; transform: rotate(var(--jr)); }
}

/* ---------- exit ---------- */
.exit {
  position: relative;
  z-index: 2;
  padding: 18vh var(--gutter) 16vh;
  background: var(--primer);
  border-top: 6px solid var(--ink);
}
.exit__inner { max-width: 1100px; margin: 0 auto; }
.exit__title { font-size: var(--fs-h1); }
.exit__body { max-width: 34rem; margin-top: 26px; font-size: var(--fs-lead); line-height: 1.3; font-weight: 550; }
.exit__ctas { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; }
.exit .note { margin-top: 22px; }

/* ---------- HUD: where am I in the conservatory ---------- */
.hud {
  position: fixed;
  z-index: 55;
  left: var(--gutter);
  bottom: 18px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-pop);
}
.hud.is-on { opacity: 1; transform: none; pointer-events: auto; }
.hud__rooms {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--primer);
  border: 3px solid var(--ink);
  border-radius: 99px;
  box-shadow: 4px 4px 0 var(--ink);
}
.hud__rooms a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 99px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
}
.hud__dot { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--dot); flex: none; }
.hud__name { display: none; white-space: nowrap; }
.hud__rooms a[aria-current="true"] { background: var(--ink); color: var(--primer); }
.hud__rooms a[aria-current="true"] .hud__name { display: inline; }
.hud__rooms li:nth-child(1) { --dot: #ffb35c; }
.hud__rooms li:nth-child(2) { --dot: var(--jungle); }
.hud__rooms li:nth-child(3) { --dot: #b9a3ff; }
@media (pointer: coarse) { .hud__rooms a { min-height: 42px; min-width: 42px; justify-content: center; padding: 0 12px; } }

/* ---------- cursor tag ---------- */
.cursor-tag {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 70;
  padding: 5px 10px 6px;
  font-family: var(--hand);
  font-size: 1rem;
  color: var(--ink);
  background: var(--halo);
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  pointer-events: none;
  opacity: 0;
  translate: 16px 18px;
  scale: .6;
  transition: opacity .18s, scale .3s var(--ease-pop);
}
.cursor-tag.is-on { opacity: 1; scale: 1; }

.gallery-error {
  max-width: 40rem;
  margin: 20vh auto;
  padding: 28px;
  border: 4px solid var(--ink);
  border-radius: 12px;
  background: var(--halo);
  box-shadow: 8px 8px 0 var(--ink);
}
.gallery-error h2 { font-family: var(--display); font-weight: 900; font-size: 2.4rem; line-height: 1; text-transform: uppercase; }
.gallery-error p { margin-top: 12px; }

/* ==========================================================================
   VIEWER — a piece pops up off the wall
   ========================================================================== */
html.viewer-open { overflow: hidden; }
.viewer {
  --accent: var(--pink);
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--primer);
  background: transparent;
  overflow: hidden;
  --focus: var(--halo);
}
.viewer::backdrop { background: rgba(14, 6, 24, .975); }
.viewer[open] { display: block; }
.viewer.is-opening::backdrop { animation: fade-in .35s var(--ease-out) both; }
.viewer.is-closing::backdrop { animation: fade-out .32s var(--ease-in) both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.viewer__halo {
  position: absolute;
  left: 34%;
  top: 48%;
  width: 120vmin;
  height: 120vmin;
  margin: -60vmin 0 0 -60vmin;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%);
  opacity: .55;
  pointer-events: none;
  transition: background .5s;
}
.viewer__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  height: 100%;
}
.viewer__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 72px 28px 96px clamp(16px, 4vw, 56px);
  overflow: hidden;
  touch-action: pan-y;
  cursor: zoom-in;
}
.viewer__frame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  border: 6px solid var(--ink);
  box-shadow: 18px 20px 0 #000;
  background: #222;
}
.viewer__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 168px - 12px);
  max-height: calc(100svh - 168px - 12px);
  width: auto;
  height: auto;
  transition: transform .35s var(--ease-out);
  user-select: none;
  -webkit-user-drag: none;
}
.viewer__stage.is-zoomed { cursor: zoom-out; }
.viewer__stage.is-zoomed .viewer__img { transform: scale(2.3); }
.viewer__frame.is-swap-out { animation: swap-out .2s var(--ease-in) forwards; }
.viewer__frame.is-swap-in { animation: swap-in .42s var(--ease-pop) both; }
@keyframes swap-out { to { opacity: 0; transform: translateX(calc(var(--dir, 1) * -46px)) rotate(calc(var(--dir, 1) * -2deg)); } }
@keyframes swap-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 46px)) rotate(calc(var(--dir, 1) * 2deg)); } }
.viewer__frame.is-hidden { visibility: hidden; }
.viewer__flyer {
  position: fixed;
  z-index: 5;
  margin: 0;
  object-fit: cover;
  border: 6px solid var(--ink);
  box-shadow: 18px 20px 0 #000;
  transform-origin: 0 0;
  pointer-events: none;
}

.viewer__info {
  position: relative;
  z-index: 2;
  overflow-y: auto;
  padding: 84px clamp(18px, 3vw, 34px) 110px 6px;
}
.viewer__room { font-weight: 700; color: #cfc6e0; }
.viewer__title { margin-top: 8px; font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.4rem); line-height: .9; }
.viewer__title::after {
  content: "";
  display: block;
  width: 72px;
  height: 7px;
  margin-top: 14px;
  background: var(--accent);
  border-radius: 4px;
  transform: rotate(-2deg);
}
.viewer__badge {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 10px 4px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  background: var(--halo);
  border: 2.5px solid var(--ink);
  border-radius: 99px;
}
.viewer__facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 18px 0 0; }
.viewer__facts dt { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: #cfc6e0; }
.viewer__facts dd { margin: 0; }
.viewer__desc { margin-top: 18px; color: #e9e4f1; line-height: 1.5; }
.viewer__story { margin-top: 14px; display: grid; gap: .8em; line-height: 1.55; }
.viewer__more { margin-top: 22px; }
.viewer__more-label { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: #cfc6e0; }
.viewer__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.viewer__thumbs button { width: 64px; height: 64px; padding: 0; border: 3px solid var(--primer); border-radius: 4px; overflow: hidden; background: #000; }
.viewer__thumbs button[aria-pressed="true"] { border-color: var(--halo); box-shadow: 3px 3px 0 var(--halo); }
.viewer__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.viewer__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.viewer__actions .sticker { --sh: #000; }
.viewer__status { min-height: 1.4em; margin-top: 10px; font-size: .95rem; color: var(--halo); }

.viewer__bar {
  position: absolute;
  z-index: 4;
  left: clamp(16px, 4vw, 56px);
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.viewer__btn {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  color: var(--ink);
  background: var(--primer);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 #000;
  transition: transform .25s var(--ease-pop), background-color .2s;
}
.viewer__btn:hover { transform: scale(1.08) rotate(-4deg); background: var(--halo); }
.viewer__btn svg { width: 24px; height: 24px; }
.viewer__count { min-width: 5.5em; font-family: var(--display); font-weight: 800; font-size: 1.3rem; text-align: center; }
.viewer__close { position: absolute; z-index: 6; top: 18px; right: 18px; }

@media (max-width: 860px) {
  .viewer__layout { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; min-height: 100%; }
  .viewer { overflow-y: auto; }
  .viewer__stage { min-height: 64vh; min-height: 64svh; padding: 70px 16px 20px; }
  .viewer__img { max-height: calc(64svh - 110px); }
  .viewer__info { padding: 10px var(--gutter) 120px; overflow: visible; }
  .viewer__bar { position: fixed; left: 50%; translate: -50% 0; bottom: 14px; padding: 6px 10px; background: var(--ink); border: 2px solid #3a2f47; border-radius: 99px; box-shadow: 0 6px 24px rgba(0, 0, 0, .55); }
  .viewer__info { padding-bottom: 140px; }
  .viewer__halo { left: 50%; top: 32%; }
}

@media (prefers-reduced-motion: reduce) {
  .plinth--hung .plinth__swing { animation: none; }
  .js .plinth .plinth__piece, .js .hang .hang__swing { opacity: 1; transform: none; }
  .js .hang.is-in .hang__swing { animation: none; }
  .firefly { animation: none; opacity: .6; }
  .foyer__scroll svg { animation: none; }
}

/* without the scroll machinery (reduced motion): rooms simply stack */
.static-gallery .foyer { height: auto; }
.static-gallery .foyer__stage { position: relative; height: auto; min-height: 100svh; }
.static-gallery .airlock { display: none; }
.static-gallery .biome--jungle { height: auto !important; }
.static-gallery .jungle__stage { position: relative; height: auto; overflow: visible; }
.static-gallery .jungle__wall { width: 100%; }
.static-gallery .jungle__track { position: relative; flex-wrap: wrap; justify-content: center; gap: 70px 50px; padding: 14vh var(--gutter); transform: none !important; }
.static-gallery .jungle__vine, .static-gallery .jungle__leaves { display: none; }
.static-gallery .mural { --mh: auto; height: auto; width: min(100%, calc(56vh * var(--ratio))); translate: none; margin-bottom: 70px; }
