/* Houses: a globe that turns to each house, the chosen house beside it, then the house detail. */
.houses-page {
  --house-radius: 26px;
}
.houses-page [hidden] {
  display: none !important;
}
.houses-page ::selection {
  background: var(--lemon);
  color: var(--deep);
}
.houses-page :focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 5px;
}
.houses-main {
  width: calc(100% - var(--gutter) * 2);
  max-width: 1424px;
  margin-inline: auto;
}
.houses-intro {
  padding: 158px 0 60px;
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 64px;
  align-items: end;
}
.houses-intro h1 {
  font-size: clamp(54px, 6.6vw, 92px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: initial;
}
.houses-intro > p {
  font-size: 19px;
  line-height: 1.55;
  max-width: 32ch;
  padding-bottom: 6px;
}

.folio-open {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  min-height: 48px;
  font-size: 14px;
}
.folio-open .house-arrow {
  background: var(--lemon);
  color: var(--deep);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 0.35s var(--ease);
}
.folio-open:hover .house-arrow {
  transform: translateX(4px);
}
.folio-open:focus-visible {
  outline-color: var(--lemon);
}

.folio-step {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #e9e5d9;
  border: 0;
  border-radius: 50%;
  color: var(--olive);
  cursor: pointer;
  transition: background 0.2s;
}
.folio-step:hover {
  background: var(--lemon);
}
.folio-step svg,
.house-arrow svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.folio-step:first-child svg {
  transform: rotate(180deg);
}
.houses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  scroll-margin-top: 100px;
}
.folio-ready .houses-grid {
  display: none;
}
.house-photo {
  aspect-ratio: 1.5;
  overflow: hidden;
  border-radius: 24px;
}
.house-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.house-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
}
.house-caption h2 {
  font-size: 32px;
}
.house-caption p {
  font-size: 14px;
  margin-top: 5px;
}
.house-caption .house-arrow {
  display: none;
}
.houses-invitation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 94px 0 60px;
}
.houses-invitation h2 {
  font-size: clamp(32px, 3.9vw, 56px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.houses-invitation .primary-action {
  flex-shrink: 0;
}
.houses-page .primary-action {
  border-radius: 999px;
}
/* House portrait: a broad cover, centered facts, then copy beside the view.
   Composition follows the existing V2 How it works type and image hierarchy. */
.house-detail {
  padding-top: 108px;
  --detail-radius: 8px;
}
.back-to-houses {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  margin-bottom: 18px;
  color: var(--olive);
}
.back-to-houses:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.back-arrow {
  display: flex;
  transform: rotate(180deg);
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 32px;
}
.detail-heading h1 {
  font-size: clamp(58px, 7.6vw, 108px);
  font-weight: 450;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}
.detail-heading h1:focus {
  outline: none;
}
.detail-heading p {
  flex: 0 0 auto;
  max-width: 28ch;
  padding-bottom: 5px;
  color: var(--muted);
  font-size: 15px;
  text-align: right;
}
.detail-figure {
  position: relative;
  border-radius: var(--detail-radius);
  overflow: hidden;
  background: var(--sand);
}
.detail-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 2.05;
  max-height: 680px;
  object-fit: cover;
}
.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 26px 0 28px;
  margin: 0;
}
.detail-facts > div {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}
.detail-facts dt {
  font-size: 13px;
  color: var(--muted);
}
.detail-facts dd {
  font:
    450 clamp(20px, 1.9vw, 27px)/1.2 Bricolage,
    sans-serif;
  letter-spacing: -0.025em;
  margin: 0;
}
.detail-story {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: center;
  padding: 76px 0 48px;
}
.detail-story-copy {
  padding-block: 12px;
}
.detail-story h2 {
  font-size: clamp(36px, 3.7vw, 52px);
  line-height: 1.06;
  max-width: 15ch;
  letter-spacing: -0.04em;
  text-wrap: pretty;
}
.detail-story p {
  max-width: 41ch;
  font-size: 16px;
  line-height: 1.7;
  margin-top: 26px;
}
.detail-second {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--detail-radius);
  background: var(--sand);
}
.detail-second img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}
.detail-gallery figure {
  grid-column: span 6;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--detail-radius);
  background: var(--sand);
}
.detail-gallery figure:nth-child(4n + 1),
.detail-gallery figure:nth-child(4n + 4) {
  grid-column: span 7;
}
.detail-gallery figure:nth-child(4n + 2),
.detail-gallery figure:nth-child(4n + 3) {
  grid-column: span 5;
}
.detail-gallery figure:last-child:nth-child(odd) {
  grid-column: 1/-1;
}
.detail-gallery img {
  display: block;
  width: 100%;
  height: clamp(280px, 31vw, 440px);
  object-fit: cover;
}
.detail-photo-credit {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.house-detail:not([hidden]) + .houses-invitation {
  padding: 76px 0 68px;
  margin-top: 0;
}
.houses-page #navigation-panel {
  height: min(550px, calc(var(--page-vh) - 36px));
}
.houses-page .menu-scroll {
  padding-top: 65px;
}

/* Film opens on request, leaving the existing cover and page loading unchanged. */
.house-video-trigger {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 19px;
  background: var(--beige);
  color: var(--deep);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}
.house-video-trigger:hover {
  background: var(--lemon);
}
.house-video-trigger svg {
  flex-shrink: 0;
}
.house-video-duration {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-left: 8px;
  border-left: 1px solid #35433340;
}
body.house-video-open {
  overflow: hidden;
}
#house-video-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1100px, calc(var(--page-vw) - 48px));
  max-width: calc(var(--page-vw) - 48px);
  max-height: calc(var(--page-vh) - 48px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--beige);
  color: var(--deep);
  overflow: auto;
  overscroll-behavior: contain;
}
#house-video-dialog::backdrop {
  background: rgb(16 25 21 / 82%);
}
.house-video-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px 10px 24px;
}
.house-video-bar h2 {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}
.house-video-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: transparent;
  color: var(--deep);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.house-video-close:hover {
  background: var(--sand);
}
#house-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  max-height: calc(var(--page-vh) - 160px);
  object-fit: contain;
  background: #101915;
}
.house-video-status,
.house-video-error {
  padding: 12px 24px;
  font-size: 14px;
  line-height: 1.5;
}
.house-video-error a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1050px) {
  .houses-intro {
    gap: 35px;
    grid-template-columns: 1.4fr 1fr;
    padding-top: 134px;
  }
  .houses-intro h1 {
    font-size: 60px;
  }
  .houses-intro h1 br {
    display: none;
  }
  .houses-intro > p {
    font-size: 17px;
  }

  .folio-open > span:first-child {
    display: none;
  }
}
@media (max-width: 700px) {
  .house-video-trigger {
    right: 14px;
    bottom: 14px;
    min-height: 46px;
    padding: 10px 14px;
    font-size: 13px;
  }
  #house-video-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .house-video-bar {
    padding: 8px 10px 8px 16px;
  }
  .house-video-bar h2 {
    font-size: 14px;
  }
  .house-video-status,
  .house-video-error {
    padding: 10px 16px;
  }

  .houses-page {
    --gutter: 22px;
    --house-radius: 22px;
  }
  .houses-intro {
    padding: 116px 0 30px;
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .houses-intro h1 {
    font-size: clamp(46px, 10.8vw, 70px);
    letter-spacing: -0.05em;
  }
  .houses-intro h1 br {
    display: none;
  }
  .houses-intro > p {
    font-size: 16px;
    max-width: 33ch;
  }

  .folio-open .house-arrow {
    width: 44px;
    height: 44px;
  }
  .folio-open > span:first-child {
    display: none;
  }

  .folio-step {
    width: 40px;
    height: 40px;
  }
  .houses-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .houses-invitation {
    padding: 62px 0 38px;
    display: block;
  }
  .houses-invitation h2 {
    font-size: 40px;
    max-width: 15ch;
  }
  .houses-invitation .primary-action {
    margin-top: 24px;
  }
  .houses-page #navigation-panel {
    height: min(560px, calc(var(--page-vh) - 24px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .folio-open .house-arrow {
    transition: none;
  }
}

/* Overview retains its existing folio rhythm. */
.houses-intro {
  padding-top: 150px;
  padding-bottom: 44px;
}
.houses-invitation {
  margin-top: 76px;
}
.houses-page #navigation-panel {
  height: min(720px, calc(var(--page-vh) - 36px));
}
@media (max-width: 950px) {
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .detail-heading p {
    text-align: left;
    max-width: none;
    padding: 0;
  }
  .detail-story {
    gap: 32px;
    padding-top: 52px;
  }
  .detail-facts > div {
    display: block;
  }
  .detail-facts dt {
    margin-bottom: 7px;
  }
}
@media (max-width: 700px) {
  .houses-intro {
    padding-top: 116px;
    padding-bottom: 28px;
  }
  .house-detail {
    padding-top: 94px;
    --detail-radius: 6px;
  }
  .back-to-houses {
    margin-bottom: 16px;
    font-size: 13px;
  }
  .detail-heading {
    gap: 12px;
    margin-bottom: 25px;
  }
  .detail-heading h1 {
    font-size: clamp(48px, 12.2vw, 76px);
    letter-spacing: -0.05em;
  }
  .detail-heading p {
    font-size: 13px;
  }
  .detail-figure img {
    aspect-ratio: 4/3;
    max-height: none;
  }
  .detail-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 22px 0;
  }
  .detail-facts dt {
    font-size: 11px;
    margin-bottom: 7px;
  }
  .detail-facts dd {
    font-size: clamp(17px, 4.5vw, 23px);
    line-height: 1.2;
  }
  .detail-story {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 42px 0 16px;
  }
  .detail-story-copy {
    padding: 0;
  }
  .detail-story h2 {
    font-size: 36px;
    max-width: 17ch;
  }
  .detail-story p {
    font-size: 15px;
    line-height: 1.65;
    margin-top: 20px;
    max-width: 44ch;
  }
  .detail-second img {
    aspect-ratio: 4/3;
  }
  .detail-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .detail-gallery figure:nth-child(n) {
    grid-column: auto;
  }
  .detail-gallery img {
    height: auto;
    aspect-ratio: 3/2;
  }
  .house-detail:not([hidden]) + .houses-invitation {
    padding: 48px 0;
    margin: 0;
  }
  .house-detail:not([hidden]) + .houses-invitation h2 {
    font-size: 36px;
    max-width: 13ch;
  }
  .houses-invitation {
    margin-top: 48px;
  }
  .houses-page #navigation-panel {
    height: calc(100dvh - 24px);
  }
}

/* Atlas draft: a light globe that turns to each house, with the chosen house beside it. */
/* One sand surface holds the globe and the chosen house, like the other large blocks of the site. */
.atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: clamp(32px, 4.5vw, 72px);
  padding: clamp(28px, 3.4vw, 52px);
  border-radius: var(--house-radius);
  background: var(--sand);
}

/* Globe --------------------------------------------------------------- */
.atlas-globe {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1;
  margin-inline: auto;
}
.atlas-globe {
  cursor: grab;
  /* Horizontal swipes turn the globe, vertical swipes still scroll the page. */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.atlas-globe canvas {
  position: absolute;
  inset: 0;
}
.atlas-globe.is-dragging {
  cursor: grabbing;
}
.atlas-marker img {
  -webkit-user-drag: none;
  pointer-events: none;
}
.atlas-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.atlas-marker {
  appearance: none;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  translate: -50% -100%;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  transition:
    width 0.35s var(--ease),
    height 0.35s var(--ease);
}
.atlas-marker[hidden] {
  display: none;
}
.atlas-marker-photo {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 3px solid var(--beige);
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 8px 20px rgba(32, 44, 37, 0.24);
  transition:
    border-color 0.3s,
    transform 0.3s var(--ease);
}
.atlas-marker-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.atlas-marker:hover .atlas-marker-photo {
  transform: translateY(-3px);
}
.atlas-marker.is-stacked {
  pointer-events: none;
}
.atlas-marker.is-stacked .atlas-marker-photo {
  box-shadow: 0 4px 10px rgba(32, 44, 37, 0.18);
}
/* A small count on the front photo of a stacked place. */
.atlas-marker[data-count]::after {
  content: attr(data-count);
  position: absolute;
  right: -6px;
  top: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--beige);
  font-size: 11px;
  line-height: 1;
}
.atlas-marker[aria-pressed="true"] {
  width: 64px;
  height: 64px;
}
.atlas-marker[aria-pressed="true"] .atlas-marker-photo {
  border-color: var(--lemon);
}
.atlas-marker:focus-visible {
  outline: none;
}
.atlas-marker:focus-visible .atlas-marker-photo {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
}
.atlas-marker-name {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  translate: -50% 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--beige);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    translate 0.25s var(--ease);
}
.atlas-marker:focus-visible .atlas-marker-name {
  opacity: 1;
  translate: -50% 0;
}
/* Touch screens keep :hover after a tap, so the name tag only follows a real pointer. */
@media (hover: hover) {
  .atlas-marker:hover .atlas-marker-name {
    opacity: 1;
    translate: -50% 0;
  }
}
.atlas-place {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  translate: -50% 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--beige) 82%, transparent);
  color: var(--deep);
  font:
    450 14px / 1.2 Bricolage,
    sans-serif;
  letter-spacing: -0.01em;
  white-space: nowrap;
  pointer-events: none;
}
.atlas-place.is-active {
  background: var(--lemon);
}
.atlas-place[hidden] {
  display: none;
}
.atlas-hint {
  position: absolute;
  left: 50%;
  bottom: -8%;
  translate: -50% 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  transition: opacity 0.4s;
}
.atlas-zoom {
  position: absolute;
  z-index: 5;
  right: 1%;
  bottom: 4%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(32, 44, 37, 0.16);
  border-radius: 999px;
  background: var(--beige);
  box-shadow: 0 6px 16px rgba(32, 44, 37, 0.1);
}
.atlas-zoom button {
  appearance: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
  transition:
    background 0.2s,
    opacity 0.2s;
}
.atlas-zoom button + button {
  border-top: 1px solid rgba(32, 44, 37, 0.12);
}
.atlas-zoom button:hover:not(:disabled) {
  background: var(--lemon);
}
.atlas-zoom button:disabled {
  opacity: 0.3;
  cursor: default;
}
.atlas-zoom svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.atlas-hint .for-touch {
  display: none;
}
@media (hover: none) {
  .atlas-hint .for-pointer {
    display: none;
  }
  .atlas-hint .for-touch {
    display: inline;
  }
}
.was-turned .atlas-hint {
  opacity: 0;
}

/* Panel --------------------------------------------------------------- */
.atlas-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.atlas-photo {
  display: block;
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 16px;
  background: #d9d4c6;
}
.atlas-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.atlas-copy {
  display: flex;
  flex-direction: column;
}
.atlas-copy h2 {
  font-size: clamp(34px, 3vw, 46px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}
.atlas-detail-link:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 5px;
}
.atlas-meta {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}
.atlas-heading {
  margin-top: 16px;
  max-width: 32ch;
  font-size: 17px;
  line-height: 1.45;
  text-wrap: pretty;
}
.atlas-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(32, 44, 37, 0.14);
}
.atlas-facts dt {
  font-size: 12px;
  color: var(--muted);
}
.atlas-facts dd {
  margin: 6px 0 0;
  font:
    450 17px / 1.2 Bricolage,
    sans-serif;
  letter-spacing: -0.02em;
}
.atlas-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 22px;
}
.atlas .atlas-open {
  color: var(--deep);
}
.atlas-steps {
  display: flex;
  align-items: center;
  gap: 8px;
}
.atlas-steps .folio-step:first-of-type svg {
  transform: rotate(180deg);
}
.atlas-count {
  margin-right: 8px;
  font-size: 13px;
  color: var(--muted);
}
.atlas .folio-step {
  background: #dcd7c9;
}
.atlas .folio-step:hover {
  background: #d1cbbb;
}

@media (max-width: 980px) {
  .atlas {
    grid-template-columns: 1fr;
    gap: 64px;
  }
  .atlas-globe {
    max-width: 560px;
  }
}
@media (max-width: 700px) {
  .atlas {
    gap: 44px;
    padding: 18px 16px 22px;
    border-radius: 18px;
  }
  .atlas-marker {
    width: 40px;
    height: 40px;
  }
  .atlas-marker[aria-pressed="true"] {
    width: 50px;
    height: 50px;
  }
  .atlas-marker-photo {
    border-width: 2px;
  }
  .atlas-place {
    font-size: 12px;
  }
  .atlas-place:not(.is-active) {
    display: none;
  }

  .atlas-photo {
    border-radius: 12px;
  }

  .atlas-copy h2 {
    font-size: 34px;
  }
  .atlas-heading {
    font-size: 16px;
  }
  .atlas-facts dd {
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-marker,
  .atlas-marker-photo,
  .atlas-marker-name {
    transition: none;
  }
}

.houses-intro > p.launch-pill {
  justify-self: end;
}
@media (max-width: 760px) {
  .houses-intro > p.launch-pill {
    justify-self: start;
  }
}
