.page-houses {
  --houses-content: 1280px;
  --houses-rule: var(--color-rule, rgba(58, 61, 56, 0.2));
  --houses-gold: var(--color-accent, #80632f);
  --houses-shadow: 0 32px 90px rgba(40, 36, 29, 0.13);
  --surface-opacity: 1;
  --brand-tone: 0;
  color: var(--soft-ink);
}

.page-houses main,
.page-houses .site-footer {
  position: relative;
  z-index: 1;
}

.page-houses .ambient-surface video {
  filter: saturate(0.52) brightness(1.07) contrast(0.95);
}

.page-houses .ambient-veil {
  background: none;
}

@media (min-width: 601px) {
  .page-houses:not(.page-house-detail) .ambient-surface video {
    filter: none;
  }

  .page-houses.page-house-detail .ambient-surface video {
    filter: none;
  }

  .page-houses:not(.page-house-detail) .ambient-veil {
    display: none;
  }

}

.houses-container {
  width: min(var(--houses-content), calc(100% - max(48px, 6vw)));
  margin-inline: auto;
}

.house-section h2 {
  margin: 0;
  font-weight: var(--_heading-weight, 400);
  letter-spacing: var(--_heading-tracking, -0.04em);
}

.house-section h2 {
  --_heading-font-default: var(--font-section-title);
  font-family: var(--_heading-font, var(--font-section-title));
}

.houses-hero-eyebrow {
  margin: 0 0 clamp(12px, 1.6svh, 20px);
  color: var(--color-ink-muted);
  font-family: var(--font-meta);
  font-size: clamp(10px, 0.76vw, 13px);
  line-height: 1.2;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.houses-title-rule,
.houses-copy-rule {
  display: block;
  width: 58px;
  height: 1px;
  background: var(--houses-gold);
}

.houses-title-rule {
  margin: clamp(18px, 2.4svh, 28px) auto 0;
}

.houses-selector a:focus-visible,
.gallery-arrow:focus-visible,
.gallery-item:focus-visible,
.services-planity-link:focus-visible,
.house-address a:focus-visible,
.house-map-link:focus-visible,
.house-map-load:focus-visible,
.house-lightbox button:focus-visible {
  outline: 1px solid var(--houses-gold);
  outline-offset: 5px;
}

.gallery-item:focus-visible {
  outline-offset: -6px;
}

.page-house-detail main {
  --house-switcher-start: 122px;
  padding-top: var(--house-switcher-start);
}

.house-switcher {
  position: sticky;
  top: var(--house-switcher-top, 48px);
  z-index: 55;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.houses-selector {
  display: flex;
  width: fit-content;
  max-width: calc(100% - 40px);
  gap: clamp(34px, 4vw, 64px);
  align-items: center;
  justify-content: center;
  padding: 7px 18px 6px;
  background: rgba(255, 255, 255, 0);
  pointer-events: auto;
  transition: background-color var(--motion-base) var(--motion-ease-out);
}

.house-switcher.is-stuck .houses-selector {
  background: rgba(255, 255, 255, 0.9);
}

.houses-selector a {
  position: relative;
  display: flex;
  min-height: 32px;
  align-items: center;
  padding: 0 0 8px;
  color: var(--color-ink-muted);
  font-family: var(--font-action);
  font-size: clamp(9px, 0.72vw, 11px);
  letter-spacing: 0.2em;
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  transition: color 240ms ease;
}

.houses-selector a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--houses-gold);
  transform: scaleX(0);
  transition: transform 360ms var(--ease-out);
  content: "";
}

.houses-selector a[aria-current="page"] {
  color: var(--soft-ink);
}

.houses-selector a[aria-current="page"]::after {
  transform: scaleX(1);
}

.houses-selector-place {
  display: none;
}

.houses-selector-name {
  display: block;
}

.menu-open .house-switcher {
  opacity: 0;
  pointer-events: none;
}

.menu-open .houses-selector {
  pointer-events: none;
}

.house-section {
  padding-block: clamp(100px, 12vw, 170px);
}

.house-intro {
  display: grid;
  align-items: center;
  min-height: calc(100svh - var(--house-switcher-start) - 57px);
  padding: 32px 0;
}

.house-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: clamp(56px, 7vw, 102px);
  align-items: center;
}

.house-intro-media,
.house-services-media {
  position: relative;
  margin: 0;
  padding: clamp(8px, 0.8vw, 13px);
  border: 1px solid #fff;
  background: #fff;
  box-shadow: var(--houses-shadow);
}

.house-intro-media::before,
.house-services-media::before {
  position: absolute;
  inset: clamp(8px, 0.8vw, 13px);
  z-index: 2;
  border: 1px solid #fff;
  content: "";
  pointer-events: none;
}

.house-intro-media img,
.house-services-media img,
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.18);
  transition: filter 650ms var(--ease-out), transform 900ms var(--ease-out);
}

.house-intro-media {
  aspect-ratio: 4 / 3;
}

.house-intro-photo {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.house-intro-photo img {
  transform: scale(1.135);
}

.house-intro-copy {
  max-width: 460px;
}

.houses-eyebrow {
  margin: 0 0 clamp(24px, 2.4vw, 36px);
  color: var(--color-ink-muted);
  font-family: var(--font-meta);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.house-intro-copy .houses-eyebrow {
  margin-bottom: 12px;
}

.house-intro-copy h1 {
  margin: 0;
}

.houses-copy-rule {
  margin: 24px 0 0;
}

.house-intro-copy > p:not(.houses-eyebrow, .ui-label) {
  margin: clamp(28px, 3vw, 42px) 0 0;
  font-family: var(--font-lede);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.52;
}

.house-intro-copy > p:not(.houses-eyebrow) + p {
  margin-top: 22px;
}

.house-intro-copy > p.text-lede {
  margin-top: 20px;
}

.house-section.maison-chapter {
  padding: 0;
}

.page-house-detail .maison-chapter-pin {
  padding: 110px 0 50px;
}

.house-gallery .maison-chapter-pin {
  padding: 160px 0 0;
}

.house-gallery-content {
  /* 80% of the space below navigation + the 48px heading and 24px gap.
     The shared scroll drift optically centres the group below the header. */
  --house-gallery-width: min(100%, calc((100svh - 160px - 72px) * 0.8 * 16 / 9));
}

.house-section-heading {
  display: flex;
  gap: 40px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: clamp(30px, 3vw, 44px);
}

.house-gallery .house-section-heading {
  min-height: 48px;
  margin: 0 0 24px;
}

.house-section [data-maison-media],
.house-section [data-maison-copy] {
  will-change: opacity, transform;
}

/* Hidden scroll scenes remain usable when reached with the keyboard. */
.house-section:has(:focus-visible) [data-maison-media],
.house-section:has(:focus-visible) [data-maison-copy] {
  opacity: 1;
  filter: none;
  transform: none;
}

.gallery-stage {
  --gallery-arrow-size: 48px;
  --gallery-gap: clamp(12px, 2vw, 28px);
  display: grid;
  grid-template-columns: var(--gallery-arrow-size) minmax(0, 1fr) var(--gallery-arrow-size);
  gap: var(--gallery-gap);
  align-items: center;
  width: min(100%, calc(var(--house-gallery-width) + 2 * (var(--gallery-arrow-size) + var(--gallery-gap))));
  margin-inline: auto;
}

.gallery-arrow,
.lightbox-arrow,
.lightbox-close {
  display: grid;
  width: var(--gallery-arrow-size, 48px);
  height: var(--gallery-arrow-size, 48px);
  padding: 0;
  border: 1px solid var(--houses-rule);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
  font-size: 19px;
  place-items: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.gallery-grid {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.88);
  background: #deded9;
  box-shadow: var(--houses-shadow);
  touch-action: pan-y;
}

.gallery-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #deded9;
  opacity: 1;
  visibility: visible;
  cursor: zoom-in;
  pointer-events: auto;
}

.gallery-item:not(:first-child),
.js .gallery-item {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.js .gallery-item.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.house-services-layout,
.house-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  gap: clamp(64px, 8vw, 118px);
  align-items: center;
}

.house-services-copy .houses-eyebrow {
  margin-bottom: 26px;
}

.services-list {
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--houses-rule);
  counter-reset: service;
  list-style: none;
}

.services-list li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 56px;
  padding: 12px 0;
  border-bottom: 1px solid var(--houses-rule);
  counter-increment: service;
  font-family: var(--font-body);
  font-weight: var(--weight-body, 400);
  font-size: clamp(18.5px, 1.58vw, 25px);
}

.services-list li::before {
  color: var(--houses-gold);
  font-size: 13px;
  content: counter(service, decimal-leading-zero);
}

.services-planity-link {
  margin-top: 28px;
}

.house-services-media {
  aspect-ratio: 4 / 5;
}

.house-access {
  padding-block: clamp(112px, 13vw, 176px);
}

.house-access-layout {
  grid-template-columns: minmax(360px, 0.82fr) minmax(480px, 1.18fr);
  gap: clamp(62px, 8vw, 124px);
}

.house-access-copy {
  position: relative;
  padding-top: 54px;
}

.house-access-copy .houses-eyebrow {
  margin-bottom: 24px;
}

.house-hours {
  max-width: 560px;
  margin: clamp(42px, 4vw, 58px) 0 0;
  border-top: 1px solid var(--houses-rule);
}

.house-hours div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: baseline;
  padding: 21px 0;
  border-bottom: 1px solid var(--houses-rule);
}

.house-hours dt,
.house-hours dd {
  margin: 0;
}

.house-hours dt {
  font-family: var(--font-meta);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.house-hours dd {
  font-family: var(--font-body);
  font-weight: var(--weight-body, 400);
  font-size: clamp(18px, 1.25vw, 21px);
  line-height: 1.35;
  text-align: right;
}

.houses-appointment {
  width: 100%;
  max-width: 560px;
  margin-top: clamp(34px, 3.5vw, 48px);
}

.house-address {
  margin: clamp(36px, 4vw, 52px) 0 0;
  font-family: var(--font-meta);
  font-size: clamp(11px, 0.82vw, 13px);
  font-style: normal;
  line-height: 1.85;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.house-address a {
  color: inherit;
}

.house-map-link {
  margin-top: 16px;
}

.house-map-frame {
  position: relative;
  min-height: 610px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--houses-gold) 30%, transparent);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--houses-shadow);
}

.house-map-frame::after {
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  content: "";
  pointer-events: none;
}

.house-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 582px;
  border: 0;
  filter: grayscale(1) contrast(0.92) brightness(1.06);
}

.house-map-frame iframe[hidden] {
  display: none;
}

.house-map-placeholder {
  position: absolute;
  inset: 13px;
  z-index: 1;
  display: grid;
  overflow: hidden;
  background:
    linear-gradient(31deg, transparent 44%, rgba(255, 255, 255, 0.94) 44% 49%, transparent 49%),
    linear-gradient(122deg, transparent 42%, rgba(255, 255, 255, 0.88) 42% 47%, transparent 47%),
    repeating-linear-gradient(18deg, rgba(58, 61, 56, 0.05) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(108deg, rgba(58, 61, 56, 0.05) 0 1px, transparent 1px 58px),
    #ecece8;
  place-items: center;
}

.house-map-placeholder::before,
.house-map-placeholder::after {
  position: absolute;
  width: 72%;
  height: 18%;
  border: 1px solid rgba(58, 61, 56, 0.11);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.house-map-placeholder::after {
  width: 48%;
  height: 62%;
  transform: rotate(31deg);
}

.house-map-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  border: 8px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: var(--houses-gold);
  box-shadow: 0 8px 26px rgba(30, 28, 25, 0.18);
  place-items: center;
}

.house-map-load {
  position: absolute;
  bottom: clamp(24px, 4vw, 42px);
  z-index: 2;
  padding: 12px 16px;
  border: 1px solid rgba(58, 61, 56, 0.36);
  color: var(--soft-ink);
  background: rgba(249, 249, 247, 0.9);
  font-family: var(--font-action);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.house-map-load:disabled {
  cursor: wait;
  opacity: 0.72;
}

.house-lightbox {
  position: fixed;
  inset: 28px;
  width: calc(100% - 56px);
  max-width: none;
  height: calc(100% - 56px);
  max-height: none;
  margin: 0;
  padding: 34px 82px 28px;
  border: 0;
  color: var(--soft-ink);
  background: rgba(247, 247, 244, 0.96);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 260ms ease, transform 420ms var(--ease-out), display 260ms allow-discrete, overlay 260ms allow-discrete;
}

.house-lightbox[open] {
  display: grid;
  opacity: 1;
  transform: none;
  place-items: center;
}

@starting-style {
  .house-lightbox[open] {
    opacity: 0;
    transform: scale(0.985);
  }
}

.house-lightbox::backdrop {
  background: rgba(18, 18, 16, 0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.house-lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.house-lightbox figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100% - 34px);
  object-fit: contain;
}

.house-lightbox figcaption {
  margin-top: 16px;
  font-family: var(--font-meta);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  font-size: 26px;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
}

.lightbox-arrow-prev {
  left: 20px;
}

.lightbox-arrow-next {
  right: 20px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 42px, 0);
  transition:
    opacity 720ms ease,
    transform 980ms var(--ease-out);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .houses-selector a:hover {
    color: var(--soft-ink);
  }

  .gallery-arrow:hover,
  .lightbox-arrow:hover,
  .lightbox-close:hover {
    border-color: var(--color-ink-muted);
    background: rgba(255, 255, 255, 0.82);
    transform: translateY(-1px);
  }

  .lightbox-arrow:hover {
    transform: translateY(-50%) scale(1.04);
  }

  .gallery-item:hover img {
    transform: scale(1.025);
  }

}

@media (max-width: 980px) {

  .house-intro-layout,
  .house-services-layout,
  .house-access-layout {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .house-intro-copy,
  .house-services-copy,
  .house-access-copy {
    max-width: 720px;
  }

  .house-services-media {
    aspect-ratio: 4 / 3;
  }

  .house-map-frame,
  .house-map-frame iframe {
    min-height: 520px;
  }
}

@media (max-width: 820px) {
  .page-house-detail main {
    --house-switcher-start: 78px;
  }

  .house-switcher {
    top: var(--house-switcher-top, 16px);
  }
}

@media (max-width: 680px) {
  .houses-container {
    width: calc(100% - 40px);
  }

  .houses-selector {
    width: min(calc(100% - 96px), 520px);
    max-width: none;
    gap: 32px;
    justify-content: space-between;
    padding: 5px 4px 4px;
  }

  .houses-selector a {
    flex: 0 0 auto;
    flex-direction: column;
    max-width: none;
    min-height: 36px;
    gap: 4px;
    font-size: 9px;
    letter-spacing: 0.15em;
  }

  .houses-selector-rive {
    order: 1;
  }

  .houses-selector-hoche {
    order: 2;
  }

  .houses-selector-place {
    display: block;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: 0.18em;
  }

  .houses-selector-name {
    display: block;
    white-space: nowrap;
  }

  .house-section {
    padding-block: 88px;
  }

  .house-intro {
    min-height: auto;
    padding: 24px 0 88px;
  }

  .house-intro-layout,
  .house-services-layout,
  .house-access-layout {
    gap: 42px;
  }

  .house-section-heading {
    align-items: center;
  }

  .gallery-stage {
    --gallery-arrow-size: 44px;
    --gallery-gap: 8px;
  }

  .gallery-grid {
    aspect-ratio: 4 / 5;
    border-width: 7px;
  }

  .services-list li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    min-height: 64px;
  }

  .house-access-copy {
    padding-top: 46px;
  }

  .houses-appointment {
    width: 100%;
    min-width: 0;
  }

  .house-map-frame,
  .house-map-frame iframe {
    min-height: 430px;
  }

  .house-lightbox {
    inset: 12px;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    padding: 62px 12px 24px;
  }

  .lightbox-arrow {
    top: auto;
    bottom: 16px;
  }

  .lightbox-arrow-prev {
    left: 16px;
  }

  .lightbox-arrow-next {
    right: 16px;
  }

  .house-lightbox figure img {
    max-height: calc(100% - 72px);
  }
}

@media (max-width: 420px) {
  .house-section-heading {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .house-section-heading h2 {
    max-width: 5.2em;
  }

  .house-hours div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .house-hours dd {
    text-align: left;
  }
}

.page-house-detail .house-map-frame {
  height: min(58svh, 580px);
  min-height: 0;
}

.page-house-detail .house-map-frame iframe {
  min-height: 0;
}

@media (max-width: 980px), (max-height: 760px) {
  .page-house-detail .maison-chapter,
  .page-house-detail .maison-chapter + .maison-chapter {
    height: auto;
    min-height: 0;
    margin-top: 0;
    scroll-margin-top: 0;
  }

  .page-house-detail .maison-chapter-pin {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 96px 0 80px;
    overflow: visible;
  }

  .house-gallery .maison-chapter-pin {
    min-height: 100svh;
    padding: 160px 0 0;
  }
}

@media (max-width: 980px) {
  .house-gallery-content {
    --house-gallery-width: 100%;
  }

  .house-gallery .maison-chapter-pin {
    padding: 96px 0 80px;
  }
}

@media (max-width: 680px) {
  .house-gallery .gallery-grid {
    aspect-ratio: 4 / 3;
  }

  .page-house-detail .house-map-frame {
    height: 430px;
  }
}

@media (max-width: 600px) {
  .page-house-detail .house-switcher::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    /* Keep a full-viewport image so its cover crop matches the ambient surface. */
    background: #fff url("../../media/bg-mobile-cBGwAri.jpg") center / cover no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, 0.3) var(--house-header-cache-height, 114px), transparent var(--house-header-cache-height, 114px));
    mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, 0.3) var(--house-header-cache-height, 114px), transparent var(--house-header-cache-height, 114px));
    opacity: 0;
    pointer-events: none;
    content: "";
    transition: opacity 180ms ease;
  }

  .page-house-detail .house-switcher.is-stuck::before {
    opacity: 1;
  }

  .houses-selector {
    width: calc(100% - 144px);
    max-width: 520px;
    gap: 20px;
    padding-inline: 12px;
    transform: translateX(-4px);
  }

  .house-switcher.is-stuck .houses-selector {
    background: rgba(255, 255, 255, 0);
  }

  .houses-selector a {
    flex: 0 0 auto;
    justify-content: center;
    padding-bottom: 4px;
    text-align: center;
    white-space: nowrap;
  }

  .houses-selector a::after {
    bottom: 4px;
  }

}

@media (min-width: 601px) {
  .page-house-detail .houses-selector a {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 44px;
    padding-bottom: 6px;
    text-align: center;
  }

  .page-house-detail .houses-selector-rive {
    order: 1;
  }

  .page-house-detail .houses-selector-hoche {
    order: 2;
  }

  .page-house-detail .houses-selector-place {
    display: block;
    font-size: clamp(9px, 0.72vw, 11px);
    line-height: 1.2;
    letter-spacing: 0.18em;
  }

  .page-house-detail .house-switcher.is-stuck .houses-selector {
    border-radius: 6px;
    background: rgba(145, 145, 145, 0.7);
  }

  .page-house-detail .house-switcher.is-stuck .houses-selector a,
  .page-house-detail .house-switcher.is-stuck .houses-selector a[aria-current="page"] {
    color: #fff;
  }

  .page-house-detail .house-switcher.is-stuck .houses-selector a::after {
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-house-detail .maison-chapter-pin {
    height: auto;
    overflow: visible;
  }

  .js [data-reveal],
  .house-intro-media img,
  .house-services-media img,
  .houses-selector,
  .houses-selector a,
  .houses-selector a::after,
  .gallery-item,
  .gallery-item img,
  .house-lightbox {
    transition: none;
  }

  .js [data-reveal] {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
