/* The door wall: one arched door per discipline. Hover cracks a door open, click walks you through it. */

:root {
  --wall: #DAD4CF;
  --wall-hi: #E4DFDB;
  --casing: #F2EFEC;
  --base: #EAE6E2;
  --paint: #1A1818;
  --lamp: rgba(255, 250, 242, .9);
  --room: #FBFAF8;
  --room-sh: rgba(26, 24, 24, .1);
  --rim: rgba(255, 255, 255, .95);
  --lift: rgba(26, 24, 24, .3);
}
html[data-mode="dark"] {
  --wall: #1F1C1C;
  --wall-hi: #262222;
  --casing: #3A3434;
  --base: #2F2A2A;
  --paint: #E8E4E0;
  --lamp: rgba(232, 214, 210, .06);
  --room: #050505;
  --room-sh: rgba(0, 0, 0, .85);
  --rim: rgba(214, 196, 196, .22);
  --lift: rgba(0, 0, 0, .7);
}

.doorwall {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-top: -2rem;
  padding-top: calc(2rem + 5.25rem);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, transparent 22%, transparent 78%, rgba(0, 0, 0, .07) 100%),
    linear-gradient(180deg, var(--wall-hi) 0%, var(--wall) 55%);
}
/* plaster: a light texture tile, drawn once by doors.js, on its own layer so it can fade while you walk through a door.
   A plain image with no blend mode, so scrolling never has to re-render it. */
.doorwall__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--plaster, none);
  background-size: 360px 360px;
  transition: opacity .25s ease;
}
html[data-mode="dark"] .doorwall__grain { opacity: .5; }
.doorwall.lift .doorwall__grain,
.doorwall.through .doorwall__grain { opacity: 0; }

.doorwall__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.6rem;
}
.doorwall__title {
  position: relative;
  z-index: 3;
  max-width: 14ch;
  margin: 0;
  padding: .08em 0 .14em;
  color: var(--paint);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.03em;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
  clip-path: inset(-20% -6% -30% -6%);
}
@media (min-width: 640px) { .doorwall__title { max-width: none; font-size: 4rem; } }
@media (min-width: 1024px) { .doorwall__title { font-size: 4.75rem; } }
.doorwall.pre .doorwall__title { clip-path: inset(-20% 100% -30% -6%); }
.doorwall.in .doorwall__title { transition: clip-path 1.5s cubic-bezier(.65, 0, .25, 1) .1s; }
.mbr { display: none; }
@media (max-width: 639.98px) { .mbr { display: inline; } }
.doorwall__hint,
.doorwall__dots { display: none; }

.doorwall__row {
  --gap: 1.5rem;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: var(--gap);
  width: 100%;
  transition: transform .8s cubic-bezier(.65, 0, .35, 1);
}
@media (min-width: 1024px) { .doorwall__row { --gap: 3rem; } }
/* the skirting board the doors stand on */
.doorwall__row::after {
  content: "";
  position: absolute;
  right: -50vw;
  bottom: 0;
  left: -50vw;
  z-index: -1;
  height: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55) 0, rgba(255, 255, 255, .55) 1px, rgba(0, 0, 0, .06) 2px,
      transparent 4px, transparent 7px, rgba(0, 0, 0, .05) 8px, rgba(255, 255, 255, .25) 9px, transparent 11px,
      rgba(0, 0, 0, .08) 100%),
    var(--base);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, .07), 0 -.5rem .9rem -.45rem rgba(0, 0, 0, .16);
}
html[data-mode="dark"] .doorwall__row::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06) 0, rgba(255, 255, 255, .06) 1px, rgba(0, 0, 0, .3) 2px,
      transparent 4px, transparent 7px, rgba(0, 0, 0, .25) 8px, transparent 11px, rgba(0, 0, 0, .3) 100%),
    var(--base);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, .4), 0 -.5rem .9rem -.45rem rgba(0, 0, 0, .5);
}

/* the fifth door waits just past the end of the wall; the menu slides the wall along to it */
.bay.bay--hidden {
  --slot: calc((100% - 3 * var(--gap)) / 4);
  position: absolute;
  bottom: 0;
  left: calc(100% + var(--gap) + (var(--slot) - min(17.5rem, calc((100svh - 19.5rem) / 2.25), var(--slot))) / 2);
  width: min(17.5rem, calc((100svh - 19.5rem) / 2.25), var(--slot));
  visibility: hidden;
  opacity: 0;
  transition: opacity .6s ease .2s, visibility 0s linear .8s;
}
.doorwall.reveal .doorwall__row { transform: translateX(calc(-1 * ((100% - 3 * var(--gap)) / 4 + var(--gap)))); }
.doorwall.reveal .bay.bay--hidden {
  visibility: visible;
  opacity: 1;
  transition: opacity .6s ease .15s, visibility 0s;
}

/* hovering a door: the others fade back and what's behind it is written on the wall beside it */
.bay .doorway { transition: opacity .5s var(--ease-soft), filter .5s var(--ease-soft); }
.doorwall.focus .bay:not(.on) .doorway { opacity: .03; filter: saturate(.2); }
.doorwall.focus .bay:not(.on)::before { opacity: 0; }

.doorinfo {
  position: absolute;
  z-index: 3;
  max-width: 30rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(.6rem);
  transition: opacity .35s ease, transform .5s var(--ease-soft);
}
.doorinfo.on {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease .08s, transform .6s var(--ease-soft) .08s;
}
@media (hover: hover) and (pointer: fine) { .doorinfo { max-width: 22rem; } }
.doorinfo__title {
  margin: 0 0 .45rem;
  color: var(--foreground);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.doorinfo__sub {
  margin-bottom: 1.15rem;
  color: var(--info-accent, #6B4F4F);
  font-family: var(--mono);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.doorinfo__list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
  padding: 0;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.35;
  list-style: none;
}
.doorinfo__list li { display: flex; align-items: center; gap: .7rem; }
.doorinfo__list li::before {
  content: "";
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid var(--info-accent, #6B4F4F);
  border-radius: 50%;
  background: var(--info-accent, #6B4F4F) center / .62rem no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.5 9.5 3.5'/%3E%3C/svg%3E");
}
html[data-mode="dark"] .doorinfo { --info-accent: #D9C6C6; }
html[data-mode="dark"] .doorinfo__list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%231A1818' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.5 9.5 3.5'/%3E%3C/svg%3E");
}
.doorinfo.on li { animation: infoIn .5s var(--ease-soft) backwards; }
.doorinfo.on li:nth-child(2) { animation-delay: .05s; }
.doorinfo.on li:nth-child(3) { animation-delay: .1s; }
.doorinfo.on li:nth-child(4) { animation-delay: .15s; }
.doorinfo.on li:nth-child(5) { animation-delay: .2s; }
@keyframes infoIn { from { opacity: 0; transform: translateX(-.5rem); } }
@media (min-width: 1280px) {
  .doorinfo__list { font-size: 1.0625rem; }
  .doorinfo__title { font-size: 2.25rem; }
}

/* ---------- one door in its frame ---------- */
.bay {
  position: relative;
  container-type: inline-size;
  justify-self: center;
  width: 100%;
  max-width: min(17.5rem, calc((100svh - 19.5rem) / 2.25));
  transition: opacity .9s var(--ease-soft), transform 1.1s var(--ease-soft);
  transition-delay: calc(var(--i) * 110ms + .35s);
}
.doorwall.pre .bay { opacity: 0; transform: translateY(1.5rem); }
/* the lamp above each door */
.bay::before {
  content: "";
  position: absolute;
  top: -18%;
  right: -35%;
  left: -35%;
  z-index: -1;
  height: 62%;
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 30%, var(--lamp), transparent 100%);
  transition: opacity .5s ease;
}
.doorway {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 2.25;
  border-radius: 50cqi 50cqi 0 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.doorway:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) { .doorway { cursor: none; } }

.frame {
  position: absolute;
  inset: 0;
  border-radius: 50cqi 50cqi 0 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .07), rgba(255, 255, 255, .18) 3cqi, transparent 6cqi,
      transparent calc(100% - 6cqi), rgba(0, 0, 0, .05) calc(100% - 3cqi), rgba(0, 0, 0, .12)),
    linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 30%),
    var(--casing);
  box-shadow: inset 0 0 0 1.1cqi rgba(255, 255, 255, .28), inset 0 0 0 1.5cqi rgba(0, 0, 0, .07),
    inset 0 0 0 3.6cqi rgba(255, 255, 255, .12), inset 0 0 0 4.1cqi rgba(0, 0, 0, .08),
    0 0 0 1px rgba(0, 0, 0, .06), 1.5cqi 2.5cqi 4.5cqi rgba(26, 24, 24, .2), -.5cqi 1cqi 3cqi rgba(26, 24, 24, .08);
  transition: box-shadow .5s var(--ease-soft);
}
html[data-mode="dark"] .frame {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .04) 3cqi, transparent 6cqi,
      transparent calc(100% - 6cqi), rgba(0, 0, 0, .3)),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 30%),
    var(--casing);
  box-shadow: inset 0 0 0 1.1cqi rgba(255, 255, 255, .05), inset 0 0 0 1.5cqi rgba(0, 0, 0, .25),
    inset 0 0 0 3.6cqi rgba(255, 255, 255, .03), inset 0 0 0 4.1cqi rgba(0, 0, 0, .22),
    0 0 0 1px rgba(0, 0, 0, .4), 1.5cqi 2.5cqi 5cqi rgba(0, 0, 0, .6);
}
/* plinth blocks at the foot of each leg */
.frame::before {
  content: "";
  position: absolute;
  right: -1cqi;
  bottom: 0;
  left: -1cqi;
  z-index: 1;
  height: 11cqi;
  background: var(--casing);
  -webkit-mask: linear-gradient(90deg, #000 0 8.5cqi, transparent 8.5cqi calc(100% - 8.5cqi), #000 calc(100% - 8.5cqi));
  mask: linear-gradient(90deg, #000 0 8.5cqi, transparent 8.5cqi calc(100% - 8.5cqi), #000 calc(100% - 8.5cqi));
  box-shadow: inset 0 .5cqi 0 rgba(255, 255, 255, .4), inset 0 1cqi 0 rgba(0, 0, 0, .08), inset 0 -.6cqi 1cqi rgba(0, 0, 0, .1);
}
html[data-mode="dark"] .frame::before {
  box-shadow: inset 0 .5cqi 0 rgba(255, 255, 255, .05), inset 0 1cqi 0 rgba(0, 0, 0, .3);
}
/* a fine bead around the arch */
.frame::after {
  content: "";
  position: absolute;
  top: 4.6cqi;
  right: 4.6cqi;
  bottom: 0;
  left: 4.6cqi;
  border: .45cqi solid rgba(0, 0, 0, .07);
  border-bottom: 0;
  border-radius: 45.4cqi 45.4cqi 0 0;
}
html[data-mode="dark"] .frame::after { border-color: rgba(255, 255, 255, .05); }
.bay.on .frame {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 2cqi 5cqi 9cqi var(--lift), -1cqi 2cqi 5cqi rgba(0, 0, 0, .08),
    inset 0 1px 0 rgba(255, 255, 255, .55);
}

.gap {
  position: absolute;
  top: 7.5cqi;
  right: 7.5cqi;
  bottom: 0;
  left: 7.5cqi;
  perspective: 160cqi;
  perspective-origin: 50% 42%;
}
/* the room behind the door: white in light mode, black in dark mode */
.room {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 42.5cqi 42.5cqi 0 0;
  background: var(--room);
  box-shadow: inset 2cqi 0 4cqi var(--room-sh), inset 0 2cqi 4cqi var(--room-sh);
}
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 5cqi var(--rim), inset 0 0 1.2cqi var(--rim);
  transition: opacity .5s var(--ease-soft);
}
.bay.on .room::after { opacity: 1; }

.leaf {
  position: absolute;
  inset: 0;
  border-radius: 42.5cqi 42.5cqi 0 0;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, .18) 100%),
    var(--door-c);
  box-shadow: inset 0 0 0 .3cqi rgba(0, 0, 0, .28), inset .6cqi 0 0 rgba(255, 255, 255, .05);
  transform: rotateY(0deg);
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow .5s var(--ease-soft);
}
.bay { --door-c: var(--door); }
html[data-mode="dark"] .bay { --door-c: var(--door-dark, var(--door)); }
/* the slab's thickness, seen as it swings */
.leaf::after {
  content: "";
  position: absolute;
  top: 40cqi;
  right: 0;
  bottom: 0;
  width: 3.4cqi;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .25)), var(--door-c);
  filter: brightness(.62);
  transform: rotateY(-90deg);
  transform-origin: 100% 50%;
}
.bay.on .leaf {
  box-shadow: inset 0 0 0 .35cqi rgba(0, 0, 0, .2), inset -2.5cqi 0 3cqi rgba(0, 0, 0, .18), 4cqi 0 7cqi rgba(0, 0, 0, .45);
}
/* a reeded panel recessed into the leaf, following the arch */
.leaf__reeds {
  position: absolute;
  top: 8cqi;
  right: 8cqi;
  bottom: 9cqi;
  left: 8cqi;
  border-radius: 34.5cqi 34.5cqi 1.2cqi 1.2cqi;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .075) 0, rgba(255, 255, 255, .02) 1cqi,
    rgba(0, 0, 0, .13) 2.1cqi, rgba(255, 255, 255, .075) 2.8cqi);
  box-shadow: inset 0 0 0 .3cqi rgba(0, 0, 0, .16), inset 1cqi 1.2cqi 2cqi rgba(0, 0, 0, .28),
    inset -.6cqi -.6cqi 1cqi rgba(255, 255, 255, .07);
}
.leaf__shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #000;
  pointer-events: none;
  opacity: calc(var(--o, 0) * .5);
}

/* brass name plate */
.nameplate {
  position: absolute;
  top: 31%;
  left: 50%;
  z-index: 1;
  width: 58cqi;
  padding: 2.6cqi 4cqi;
  border-radius: .9cqi;
  background: linear-gradient(160deg, #efdfb2 0%, #c9a866 28%, #e3cc92 48%, #a98747 72%, #d2b67a 100%);
  color: #2b2112;
  font-size: 5.4cqi;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .09em;
  text-align: center;
  text-shadow: 0 .28cqi 0 rgba(255, 238, 196, .55), 0 -.15cqi 0 rgba(0, 0, 0, .25);
  text-transform: uppercase;
  text-wrap: balance;
  translate: -50% -50%;
  box-shadow: 0 .5cqi 1cqi rgba(0, 0, 0, .4), inset 0 .3cqi 0 rgba(255, 250, 228, .7), inset 0 -.3cqi 0 rgba(88, 62, 22, .45);
}
.nameplate::before,
.nameplate::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1.6cqi;
  height: 1.6cqi;
  margin-top: -.8cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3cf, #8f6f33 70%);
  box-shadow: 0 .15cqi .2cqi rgba(0, 0, 0, .4);
}
.nameplate::before { left: 1.8cqi; }
.nameplate::after { right: 1.8cqi; }

/* lever handle: a brass rose, a tapered lever standing off it, and a keyhole escutcheon below */
.lever {
  position: absolute;
  top: 59%;
  right: 7cqi;
  z-index: 1;
  width: 9.4cqi;
  height: 9.4cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #fff6dc 0, #e6cb8a 14%, #b8934c 40%, #80602a 70%, #4d3816 100%);
  box-shadow: 0 0 0 .35cqi rgba(0, 0, 0, .22), .9cqi 1.5cqi 2cqi rgba(0, 0, 0, .45),
    inset -.7cqi -.9cqi 1.1cqi rgba(40, 26, 6, .55), inset .5cqi .6cqi .8cqi rgba(255, 248, 222, .5);
}
.lever::before {
  content: "";
  position: absolute;
  inset: 2.3cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff3d0, #c9a45c 45%, #6f5122 100%);
  box-shadow: .4cqi .7cqi .9cqi rgba(0, 0, 0, .45), inset 0 0 0 .2cqi rgba(255, 240, 200, .35);
}
.lever__arm {
  position: absolute;
  top: 2.75cqi;
  right: 3.6cqi;
  width: 23cqi;
  height: 3.9cqi;
  border-radius: 2.4cqi 1.6cqi 1.6cqi 2.4cqi;
  background: linear-gradient(180deg, #fff5d6 0%, #ecd395 16%, #c39d55 42%, #8e6a2d 72%, #5c4119 100%);
  box-shadow: .3cqi 2.4cqi 2.2cqi rgba(0, 0, 0, .38), 0 .4cqi .4cqi rgba(0, 0, 0, .25), inset 0 -.3cqi .4cqi rgba(50, 32, 8, .45);
  transform-origin: calc(100% - 1.9cqi) 50%;
  transition: transform .18s cubic-bezier(.3, .7, .4, 1);
}
.lever__arm::before {
  content: "";
  position: absolute;
  top: -.45cqi;
  left: -.4cqi;
  width: 7cqi;
  height: 4.8cqi;
  border-radius: 2.4cqi;
  background: linear-gradient(180deg, #fff5d6 0%, #e8cd8c 18%, #bf9850 45%, #86632a 75%, #5c4119 100%);
  box-shadow: 0 .5cqi .6cqi rgba(0, 0, 0, .3);
}
.lever__arm::after {
  content: "";
  position: absolute;
  top: .55cqi;
  right: 2.6cqi;
  left: 1.4cqi;
  height: .55cqi;
  border-radius: 1cqi;
  background: linear-gradient(90deg, rgba(255, 255, 240, .95), rgba(255, 250, 225, .35));
  filter: blur(.1cqi);
}
.bay.press .lever__arm { transform: rotate(-32deg); }
.lever__lock {
  position: absolute;
  top: calc(100% + 6.5cqi);
  left: 50%;
  width: 5.4cqi;
  height: 10.5cqi;
  margin-left: -2.7cqi;
  border-radius: 2.7cqi;
  background: radial-gradient(ellipse at 38% 28%, #fff3d0 0, #d9b86f 22%, #a07b37 55%, #5e4419 100%);
  box-shadow: 0 0 0 .3cqi rgba(0, 0, 0, .2), .6cqi 1cqi 1.4cqi rgba(0, 0, 0, .42),
    inset -.4cqi -.6cqi .8cqi rgba(40, 26, 6, .5), inset .3cqi .4cqi .5cqi rgba(255, 248, 222, .45);
}
.lever__lock::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  width: 2cqi;
  height: 2cqi;
  margin-left: -1cqi;
  border-radius: 50%;
  background: #140d04;
  box-shadow: inset .2cqi .3cqi .3cqi rgba(0, 0, 0, .8);
}
.lever__lock::after {
  content: "";
  position: absolute;
  top: calc(30% + 1.3cqi);
  left: 50%;
  width: 1cqi;
  height: 3cqi;
  margin-left: -.5cqi;
  border-radius: 0 0 .3cqi .3cqi;
  background: #140d04;
}
@media (prefers-reduced-motion: reduce) {
  .leaf, .frame, .room::after { transition: none; }
}

/* "Click to enter": replaces the cursor over a door */
.enter-badge {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  padding: .6rem 1rem;
  border-radius: 9999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 .5rem 1.5rem -.5rem rgba(0, 0, 0, .45);
  transition: opacity .18s ease;
}
.enter-badge.on { opacity: 1; }

/* ---------- walking through a door ---------- */
.doorwall.lift { will-change: transform; }
.doorwall.through { z-index: 6; overflow: visible; }
.doorwall.through::before,
.doorwall.through::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 55vw;
  pointer-events: none;
  background: linear-gradient(180deg, var(--wall-hi) 0%, var(--wall) 55%);
}
.doorwall.through::before { right: 100%; }
.doorwall.through::after { left: 100%; }
/* the room's page, loaded inside this one while you stand at the doors */
.roomhost {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  background: var(--room);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.roomhost.on {
  visibility: visible;
  opacity: 1;
  transition: opacity .25s ease, visibility 0s;
}
.roomhost.live { pointer-events: auto; }
.roomhost iframe {
  position: absolute;
  inset: 0;
  display: block;
  visibility: hidden;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity .7s ease;
}
.roomhost.on iframe.cur { visibility: visible; opacity: 1; }
.veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--room);
  pointer-events: none;
}

/* ---------- phones: the wall pins in place and scrolling walks you along it, one door at a time ---------- */
@media (max-width: 639.98px) {
  .doorwall {
    overflow: clip;
    height: calc(100svh + 3 * 55svh);
    padding-top: 0;
  }
  .doorwall__pin {
    --uw: min(56vw, calc((100svh - 31rem) / 2.25));
    --ug: calc(50vw - var(--uw) / 2 + .75rem);
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: clip;
    height: 100svh;
    padding-top: 4.75rem;
    background: inherit;
  }
  .doorwall__inner { align-items: stretch; gap: 1rem; }
  .doorwall__row {
    display: flex;
    gap: var(--ug);
    overflow: visible;
    width: calc(100% + 2.5rem);
    margin-top: -1rem;
    margin-inline: -1.25rem;
    padding-top: 2rem;
    padding-inline: calc(50% - var(--uw) / 2);
    transition: none;
    will-change: transform;
  }
  .doorwall__row::after { right: auto; left: 0; width: 700vw; }
  .bay { flex: 0 0 var(--uw); max-width: none; }
  .bay.bay--hidden {
    position: relative;
    bottom: auto;
    left: auto;
    display: none;
    visibility: visible;
    width: auto;
    opacity: 1;
  }
  .doorwall.reveal .bay.bay--hidden { display: block; }
  .bay::before { display: none; }
  .doorinfo {
    position: relative;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    max-width: 100%;
    min-height: 10.5rem;
    margin: .9rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--fg-rgb), .1);
    text-align: left;
    opacity: 1;
    transform: none;
  }
  .doorinfo .doorinfo__title { margin-bottom: .35rem; font-size: 1.5rem; line-height: 1.1; }
  .doorinfo .doorinfo__sub { margin-bottom: .85rem; font-size: .625rem; line-height: 1.4; letter-spacing: .08em; }
  .doorinfo .doorinfo__list { gap: .45rem; font-size: .875rem; line-height: 1.35; }
  .doorinfo .doorinfo__list li { gap: .6rem; }
  .doorinfo .doorinfo__list li::before { width: .95rem; height: .95rem; background-size: .55rem; }
  .doorwall__dots { display: flex; gap: .4rem; margin: .25rem 0 0; }
  .doorwall__dots i {
    width: .4rem;
    height: .4rem;
    border-radius: 999px;
    background: rgba(var(--fg-rgb), .2);
    transition: width .35s var(--ease-soft), background .35s;
  }
  .doorwall__dots i.on { width: 1.3rem; background: var(--foreground); }
  .doorwall.compact .doorinfo__list { display: none; }
  .doorwall.compact .doorinfo { min-height: 0; }
  .doorwall__title {
    align-self: flex-start;
    max-width: none;
    margin: .25rem 0 .5rem;
    font-size: 2.15rem;
    text-align: left;
    white-space: nowrap;
  }
}
