.house-stage {
  --house-edge: clamp(24px, 5.5vw, 90px);
  position: relative;
  isolation: isolate;
  background: #252822;
  color: #fff;
}
.house-runway.is-pinned {
  height: calc(100svh + (var(--house-count) - 1) * 60svh);
}
.is-pinned .house-stage {
  position: sticky;
  top: 0;
}
.house-track {
  height: max(470px, 100svh);
  overflow: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.is-pinned .house-track {
  height: 100svh;
  overflow: hidden;
  scroll-snap-type: none;
}
.house-track::-webkit-scrollbar { display: none; }
.house-track:focus-visible { outline: 2px solid white; outline-offset: -4px; }
.house-scene {
  position: relative;
  height: 100%;
  margin: 0;
  scroll-snap-align: start;
}
.house-photos {
  display: flex;
  height: 100%;
  overflow: auto hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.house-photos::-webkit-scrollbar { display: none; }
.house-photos > img {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.house-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #18130f66, transparent 45%, #18130f88);
  pointer-events: none;
}
.house-heading {
  position: absolute;
  top: clamp(30px, 6svh, 76px);
  left: var(--house-edge);
  max-width: calc(63.8% - 2 * var(--house-edge));
  text-shadow: 0 2px 18px #0008;
  pointer-events: none;
}
.house-eyebrow {
  margin: 0 0 12px;
  font-size: clamp(11px, 1.15vw, 15px);
}
.house-space-name {
  margin: 0;
  font: 400 clamp(40px, 5.5vw, 84px)/.98 var(--serif);
  text-wrap: balance;
}
.house-detail { display: contents; }
.house-thumbnails {
  position: absolute;
  bottom: var(--house-bottom);
  left: var(--house-edge);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(388px, calc(63.8% - 3 * var(--house-edge)));
}
.house-thumbnails[hidden], .house-thumbnails button[hidden], .house-controls[hidden] { display: none; }
.house-thumbnails button {
  min-width: 0;
  aspect-ratio: 1.42;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #151412;
  box-shadow: 0 3px 10px #0005;
  cursor: pointer;
}
.house-thumbnails button[aria-current="true"] {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px #0008;
}
.house-thumbnails button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.house-thumbnails img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.house-thumbnails button:is(:hover, :focus-visible, [aria-current="true"]) img { opacity: 1; }
.house-panel {
  position: absolute;
  inset: 0 var(--house-edge) 0 auto;
  width: min(36.2%, 580px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(16px, 2.5svh, 24px);
  padding: var(--house-bottom) clamp(18px, 2.25vw, 40px);
  background: #332d2766;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}
.house-visual {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  min-height: 0;
}
@media (width > 760px) and (height > 800px) {
  .house-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto;
  }
  .house-panel .house-copy { align-self: end; }
}
.house-filter { position: absolute; }
.house-map-frame { width: min(190%, 820px, 98svh); }
.house-map {
  width: 100%;
  height: auto;
  filter: url(#house-map-ink);
  opacity: .72;
}
.house-copy-title {
  margin: 0 0 10px;
  font: 400 clamp(24px, 2.55vw, 42px)/1.05 var(--serif);
  text-wrap: balance;
}
.house-description {
  margin: 0;
  font-size: clamp(14px, 1.13vw, 18px);
  line-height: 1.55;
}
.house-photo-note { margin: 8px 0 0; font-size: 11px; color: #fffd; }
.house-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.house-controls button {
  pointer-events: auto;
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.house-controls button::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.house-controls button[aria-disabled="true"] { opacity: .55; cursor: default; }
.house-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.house-counter { margin-left: 6px; font-size: 11px; letter-spacing: .16em; }
.house-map-frame .atlas-point {
  width: clamp(10px, 2.4cqw, 15px);
  font-size: clamp(7px, 1.55cqw, 10px);
}
.house-map-frame .atlas-point.is-current {
  z-index: 1;
  background: #171713;
  border-color: #f3dfb8;
  color: #fff;
  box-shadow: 0 0 0 2px #f3dfb8;
}
.house-map-frame .atlas-point:is(:hover, :focus-visible) { z-index: 2; }

.house-more {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  min-height: 44px;
  margin-top: 10px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 5px;
  pointer-events: auto;
}
.house-more:hover { text-decoration-thickness: 2px; }

.spaces-intro {
  padding: clamp(120px, 16vh, 190px) var(--gutter) clamp(42px, 7vw, 92px);
}
.spaces-intro h1 {
  margin: 20px 0;
  font-size: clamp(76px, 15vw, 230px);
  line-height: .9;
}
.spaces-intro h1 + p { max-width: 36ch; }
.spaces-intro .text-link { display: inline-block; margin-top: 20px; }

@media (max-width: 760px) {
  .house-panel-with-link { padding-bottom: 60px; }
  .house-panel-with-link .house-more { margin-top: 4px; }
}

.spaces-page .masthead { color: #fff; text-shadow: 0 1px 16px #0008; }
.spaces-page .masthead nav { color: var(--ink); text-shadow: none; }
.spaces-page .logo img { filter: brightness(0) invert(1); }
.spaces-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: max(800px, 100svh);
  padding: 0 var(--gutter) 28px;
  overflow: hidden;
  color: #fff;
  background: #172925 url("assets/creba-drone-may-2023.jpg") center / cover;
}
.spaces-background-video {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.spaces-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #0619168c 0%, #06191666 40%, #061916b3 100%);
  pointer-events: none;
}
.spaces-hero .spaces-intro {
  padding: clamp(140px, 18svh, 210px) 0 clamp(56px, 8svh, 100px);
  text-shadow: 0 2px 24px #0004;
}
.spaces-film-heading {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: end;
  gap: 30px;
  padding-top: clamp(28px, 4vw, 56px);
  margin-top: auto;
  border-top: 1px solid #ffffff60;
}
.spaces-film-heading .eyebrow { margin: 0 0 18px; }
.spaces-film-heading h2 {
  margin: 0;
  font: 400 clamp(38px, 5.2vw, 82px)/1.05 var(--serif);
  text-wrap: balance;
}
.spaces-film-heading > p {
  max-width: 37ch;
  margin: 0 0 3px auto;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
}
.spaces-film-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
}
.spaces-film-footer > p { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.spaces-film-footer > p span { margin-left: 20px; opacity: .75; }
.spaces-film-toggle {
  flex: none;
  margin-inline-start: auto;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid #ffffff90;
  border-radius: 30px;
  background: #06191666;
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.spaces-film-toggle:hover { background: #061916b3; }
.spaces-film-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 760px) {
  .spaces-hero { min-height: 100svh; padding-bottom: 22px; }
  .spaces-hero .spaces-intro { padding: 140px 0 60px; }
  .spaces-film-heading { grid-template-columns: 1fr; gap: 18px; }
  .spaces-film-heading > p { margin: 0; }
  .spaces-film-footer { margin-top: 28px; gap: 12px; }
  .spaces-film-footer > p span { display: block; margin: 5px 0 0; }
}

/* The introduction scrolls away before the gallery pins. */
.spaces-gallery-intro {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: end;
  gap: 40px;
  padding-bottom: var(--gallery-gap);
  background: #fff;
}
.spaces-gallery-intro .eyebrow { margin-bottom: 14px; }
.spaces-gallery-intro h2 {
  font: 400 clamp(38px, 4vw, 68px)/1.02 var(--serif);
  letter-spacing: -.025em;
}
.spaces-gallery-intro > p {
  max-width: 42ch;
  margin: 0 0 3px auto;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.6;
}
.spaces-gallery {
  --gallery-gap: clamp(32px, 5svh, 64px);
  --gallery-height: calc(100svh - var(--conversion-bar-height, 88px) - 2 * var(--gallery-gap));
  margin: clamp(88px, 10vw, 160px) var(--gutter);
  scroll-margin-top: var(--gallery-gap);
}
.spaces-page .house-runway.is-pinned {
  height: calc(var(--gallery-height) + (var(--house-count) - 1) * 60svh);
}
.spaces-page .is-pinned .house-sticky-frame {
  position: sticky;
  top: var(--gallery-gap);
  height: var(--gallery-height);
  display: flex;
  flex-direction: column;
}
.spaces-page .house-stage {
  --house-edge: clamp(24px, 4vw, 64px);
  --house-bottom: clamp(18px, 3.9svh, 35px);
}
.spaces-page .is-pinned .house-stage {
  position: relative;
  top: auto;
  flex: 1 1 0;
  min-height: 0;
}
.spaces-page .is-pinned .house-track { height: 100%; }
.spaces-page .downloads-related-links {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
@media (min-width: 761px) and (max-height: 800px) {
  .house-visual { display: none; }
  .house-copy { margin-block: auto; }
}
@media (max-width: 760px) {
  .spaces-gallery-intro { grid-template-columns: 1fr; gap: 14px; }
  .spaces-gallery-intro h2 { font-size: 36px; }
  .spaces-gallery-intro h2 br { display: none; }
  .spaces-gallery-intro .eyebrow { margin-bottom: 10px; }
  .spaces-gallery-intro > p { margin: 0; font-size: 13px; line-height: 1.5; }
  .spaces-gallery { --gallery-gap: 28px; margin: 72px 16px; }
  .spaces-page .house-stage { --house-edge: 20px; }
  .house-heading {
    top: 22px;
    max-width: calc(100% - 2 * var(--house-edge));
  }
  .house-eyebrow { margin-bottom: 8px; }
  .house-space-name { font-size: clamp(34px, 8vw, 54px); }
  .house-detail {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 10px;
    pointer-events: none;
  }
  .house-thumbnails {
    position: static;
    width: min(240px, calc(100% - 2 * var(--house-edge)));
    margin-inline-start: var(--house-edge);
    pointer-events: auto;
  }
  .house-panel {
    position: static;
    width: auto;
    padding: 12px var(--house-edge);
    gap: 6px;
    background: #261f1ac4;
  }
  .house-visual { display: none; }
  .house-copy-title { font-size: 23px; margin-bottom: 6px; }
  .house-description { font-size: 13px; line-height: 1.45; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .spaces-gallery { --gallery-gap: 24px; }
  .spaces-page .spaces-gallery-intro h2 { font-size: 30px; }
}
