.dt-hero {
  background: var(--paper);
}
.hero-visual { min-width: 0; }
.hero-page-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero-frame {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: min(29rem, 57vw);
  height: min(55vw, 79vh, 74rem);
  height: min(55vw, 79svh, 74rem);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  background: #f4f4f4;
}
.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Keep the outgoing scene solid behind the incoming dissolve. */
  transition: opacity 0s .95s, visibility 0s .95s;
}
.hero-scene.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition: opacity .95s ease-in-out, visibility 0s;
}
.hero-scene--intro { background: #f4f4f4; }
.hero-opening-photo { position: absolute; overflow: hidden; background: #f4f4f4; }
.hero-opening-photo--main { inset: 0 0 auto auto; width: 52%; height: 80%; }
.hero-opening-photo--detail { inset: auto auto 0 0; width: 41%; height: 19%; }
.hero-opening-photo img, .hero-scene-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-opening-photo img { transform: scale(1.08); }
.hero-opening-photo--main img { object-position: 54% 53%; }
.hero-opening-photo--main .is-secondary { object-position: 63% 62%; }
.hero-opening-photo--detail img { object-position: 48% 42%; }
.hero-opening-photo--detail .is-secondary { object-position: 62% 50%; }
.hero-opening-photo .is-secondary { opacity: 0; transition: opacity 1.1s ease-in-out; }
.hero-opening-photo.shows-secondary .is-secondary { opacity: 1; }
.hero-scene--photo {
  --copy-left: 25%;
  --copy-y: 53%;
  --shade-x: 39%;
  --image-position: 50% 54%;
  background: var(--navy);
}
.hero-scene--sound { --copy-left: 64%; --shade-x: 79%; --image-position: 50% 28%; }
.hero-scene--city { --copy-left: 29%; --shade-x: 41%; --image-position: 49% 51%; }
.hero-scene--entrance { --copy-left: 23%; --shade-x: 36%; --image-position: 54% 56%; }
.hero-scene-photo { object-position: var(--image-position); }
.hero-scene--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 56% 86% at var(--shade-x) var(--copy-y),
    rgb(8 22 29 / .80), rgb(8 22 29 / .68) 35%, rgb(8 22 29 / .27) 73%, transparent),
    linear-gradient(0deg, rgb(8 22 29 / .18), transparent 48%);
}
.hero-copy {
  position: absolute;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: clamp(.85rem, 1.5vw, 1.75rem);
  transform: translateY(-50%);
}
.hero-scene--intro .hero-copy {
  top: 45%;
  left: max(6vw, env(safe-area-inset-left, 0px));
  width: 41%;
  color: var(--ink);
}
.hero-scene--photo .hero-copy {
  top: var(--copy-y);
  left: max(var(--copy-left), env(safe-area-inset-left, 0px));
  max-width: calc(95% - var(--copy-left));
  color: white;
}
.hero-title {
  margin: 0;
  font: 500 clamp(2.15rem, 5.25vw, 6.8rem)/1.25 var(--serif);
  letter-spacing: -.055em;
  line-break: strict;
}
.hero-scene--intro .hero-title { white-space: nowrap; }
.hero-scene--photo .hero-title {
  font-size: clamp(2.15rem, 4.75vw, 6rem);
  text-shadow: 0 1px 8px rgb(0 0 0 / .20);
}
.hero-brand { position: relative; display: block; width: clamp(7.5rem, 11vw, 11.5rem); }
.hero-brand img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-title-in {
    from { transform: translateY(.36em); opacity: .25; }
    to { transform: translateY(0); opacity: 1; }
  }
  .hero-scene.is-active .hero-title { animation: hero-title-in .85s cubic-bezier(.2,.65,.25,1) both; }
  .hero-scene.is-active .hero-brand { animation: hero-title-in .85s cubic-bezier(.2,.65,.25,1) .12s both; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scene, .hero-scene.is-active { transition: none; }
}
.hero-legend {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .8rem;
  max-width: var(--bound);
  min-height: 3.75rem;
  margin-inline: auto;
  padding: .22rem var(--inset-right) .22rem var(--inset-left);
}
/* The enhanced controls occupy this row as soon as the first frame paints. */
@media (scripting: enabled) {
  .hero-legend[hidden] { display: flex !important; visibility: hidden; }
}
.hero-controls { display: flex; align-items: center; flex: none; gap: .15rem; }
#frame-count {
  margin-right: .48rem;
  color: var(--accent);
  font: 500 1.1rem/1 var(--latin), serif;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}
.photo-step, .hero-playback {
  display: grid;
  place-items: center;
  width: max(44px, 2.6rem);
  height: max(44px, 2.6rem);
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--ink);
}
.photo-step::before {
  content: "";
  width: .62rem;
  height: .62rem;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: translateX(-2px) rotate(45deg);
}
.photo-step.back::before { transform: translateX(2px) rotate(-135deg); }
.hero-playback::before { content: ""; width: 8px; height: 12px; border-inline: 2px solid; }
.hero-playback.is-paused::before {
  width: 0;
  height: 0;
  margin-left: 2px;
  border: 0;
  border-left: 8px solid;
  border-block: 5px solid transparent;
}
@media (hover: hover) {
  .photo-step:hover, .hero-playback:hover { background: var(--wash); color: var(--accent); }
}
@media (max-width: 59.99rem) and (orientation: portrait), (max-width: 34rem) {
  .hero-frame {
    min-height: 23rem;
    height: min(170vw, 85vh);
    height: min(170vw, 85svh);
  }
  .hero-scene--intro {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto 15%;
  }
  .hero-opening-photo { position: relative; inset: auto; }
  .hero-opening-photo--main { width: 85%; height: 100%; justify-self: end; }
  .hero-opening-photo--detail { width: 68%; height: 100%; }
  .hero-opening-photo--main img { object-position: 49% 58%; }
  .hero-opening-photo--main .is-secondary { object-position: 57% 62%; }
  .hero-opening-photo--detail img { object-position: 46% 42%; }
  .hero-scene--intro .hero-copy {
    position: relative;
    inset: auto;
    width: auto;
    transform: none;
    align-content: center;
    padding-block: clamp(1.25rem, 5.6vw, 2.75rem);
    padding-inline: max(8%, env(safe-area-inset-left, 0px)) max(6%, env(safe-area-inset-right, 0px));
  }
  .hero-title { font-size: clamp(2rem, 9.7vw, 4.65rem); }
  .hero-copy { gap: clamp(.72rem, 2.7vw, 1.3rem); }
  .hero-brand { width: clamp(7rem, 29vw, 10rem); }
  .hero-scene--photo {
    --copy-y: 55%;
    --copy-left: 11%;
    --shade-x: 42%;
    --image-position: 46% 55%;
  }
  .hero-scene--photo::after {
    background: radial-gradient(ellipse 89% 58% at var(--shade-x) var(--copy-y),
      rgb(8 22 29 / .83), rgb(8 22 29 / .68) 35%, rgb(8 22 29 / .17) 79%, transparent);
  }
  .hero-scene--sound { --copy-left: 8%; --copy-y: 82%; --shade-x: 38%; --image-position: 33% 40%; }
  .hero-scene--city { --copy-left: 14%; --image-position: 52% 55%; }
  .hero-scene--entrance { --copy-left: 10%; --image-position: 47% 52%; }
  .hero-scene--photo .hero-title { font-size: clamp(1.95rem, 8.9vw, 4.15rem); }
}
@media (max-width: 42rem) {
  .hero-legend { min-height: 3.6rem; gap: .4rem; }
  .hero-controls { gap: 0; }
  #frame-count { margin-right: .06rem; font-size: 1rem; }
}
@media (orientation: landscape) and (max-height: 32rem) {
  .hero-frame { min-height: 13rem; height: 82vh; height: 82svh; }
  .hero-copy { gap: .55rem; }
  .hero-title, .hero-scene--photo .hero-title { font-size: clamp(1.75rem, 9.2vh, 2.9rem); }
  .hero-brand { width: 7rem; }
  .hero-scene--sound { --copy-left: 56%; }
}

.page-home {
  --gutter: clamp(1.25rem, 6.1vw, 7rem);
  --inset-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  --inset-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  --section-space: clamp(4.25rem, 8.3vw, 8.5rem);
}

/* The two introductory guides share the same margins as the property catalogue. */
.home-guides {
  --guide-edge: max(var(--inset-left), calc((100% - 80rem) / 2));
  background: var(--paper);
}
.guide-feature { min-width: 0; background: var(--wash); }
.guide-photo { overflow: hidden; }
.guide-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guide-hero {
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.75rem, 5.8vw, 7rem);
  padding: clamp(3rem, 7vw, 7rem) var(--guide-edge) 0 max(0px, calc((100% - 100rem) / 2));
}
.guide-hero .guide-photo {
  width: 100%;
  aspect-ratio: 2.45;
}
.guide-hero img { object-position: 50% 34%; }
.guide-hero .guide-title {
  display: flex;
  flex-direction: column;
  justify-self: center;
  align-items: flex-start;
  gap: .25em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font: 500 clamp(2rem, 3.15vw, 3.6rem)/1.15 var(--serif);
  letter-spacing: .07em;
  color: var(--ink);
}
.guide-hero .guide-title span { white-space: nowrap; }
.guide-copy {
  width: min(39rem, calc(100% - var(--inset-left) - var(--inset-right)));
  min-width: 0;
  margin-inline: auto;
  padding-block: clamp(1.85rem, 3vw, 3rem);
  text-align: center;
}
.guide-copy p {
  font-size: 1rem;
  line-height: 1.8;
  color: #41494c;
  line-break: strict;
  text-wrap: balance;
}
.guide-action, .listing-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: .65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: .25rem;
  background: #38383d;
  color: #fff;
  font: 700 1rem/1.55 var(--sans);
  text-align: center;
}
.guide-action {
  min-width: min(15rem, 100%);
  min-height: max(48px, 3.15rem);
  margin-top: clamp(1.5rem, 2.5vw, 2.4rem);
}
.guide-feature--sound {
  margin-block-start: clamp(2.5rem, 4.5vw, 4.5rem);
}
.guide-hero--sound {
  grid-template-columns: minmax(0, 1fr) minmax(0, 4.4fr);
  grid-template-areas: "title photo";
  padding: 0 max(0px, calc((100% - 100rem) / 2)) 0 var(--guide-edge);
}
.guide-hero--sound .guide-photo { grid-area: photo; aspect-ratio: 1.9; }
.guide-hero--sound .guide-photo img { object-position: 55% 56%; }
.guide-hero--sound .guide-title { grid-area: title; }

.home-wrap {
  width: min(calc(100% - var(--inset-left) - var(--inset-right)), 80rem);
  margin-inline: auto;
}
.home-portfolio, .home-services { padding-block: var(--section-space); }
.home-portfolio { background: var(--paper); }
.home-services { background: var(--wash); }
.section-title {
  font: 500 clamp(2.25rem, 4vw, 4rem)/1.25 var(--serif);
  letter-spacing: -.045em;
}
@media (max-width: 24rem) {
  .portfolio-top .section-title { font-size: clamp(1.875rem, 8.6vw, 2.25rem); }
}
.portfolio-top, .service-lead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 4.4rem);
}
.portfolio-intro, .service-intro {
  max-width: 39em;
  color: #505658;
  font-size: 1rem;
  line-height: 1.8;
}
.portfolio-intro, .service-intro, .service-caption h3, .estate-text h3 { text-wrap: balance; }
.portfolio-intro { margin-top: clamp(.9rem, 1.2vw, 1.25rem); }
.region-filter { display: inline-flex; align-items: center; flex-wrap: wrap; flex: none; gap: .15rem; }
.region-filter button {
  min-height: 44px;
  padding: .45rem .82rem;
  border: 0;
  border-bottom: 2px solid #d5d5d5;
  background: transparent;
  color: #525759;
  font-size: .94rem;
  line-height: 1.4;
  white-space: nowrap;
}
.region-filter button[aria-pressed=true] {
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.region-filter span { margin-left: .35em; font-variant-numeric: lining-nums tabular-nums; }
.estate-grid, .service-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: clamp(3.75rem, 5.6vw, 5.75rem);
  column-gap: clamp(1.5rem, 3.3vw, 3.5rem);
}
.estate-card, .service-story { min-width: 0; }
.estate-card > a, .service-story {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: .5rem;
  background: var(--paper);
}
.estate-photo, .service-image {
  flex: none;
  aspect-ratio: 1.6;
  overflow: hidden;
  border-radius: .5rem;
  background: var(--wash);
}
.estate-photo img, .service-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.estate-photo img { object-position: 50% 37%; }
.estate-text, .service-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
  padding-top: clamp(1.3rem, 1.8vw, 1.8rem);
}
.service-caption {
  padding-inline: clamp(1.25rem, 2vw, 2rem);
  padding-bottom: clamp(1.5rem, 2.3vw, 2.25rem);
}
.estate-location { margin-bottom: .45rem; font-size: .875rem; color: #505658; }
.estate-text h3, .service-caption h3 {
  margin-bottom: .65rem;
  font: 500 clamp(1.35rem, 1.85vw, 1.9rem)/1.45 var(--serif);
  letter-spacing: -.04em;
  line-break: strict;
}
.estate-description, .service-caption p { font-size: 1rem; color: #454b4e; line-height: 1.8; }
.estate-text .estate-spec { margin-top: .6rem; font-size: .875rem; color: #505658; }
.estate-spec span { padding-inline: .25em; }
.listing-action {
  align-self: flex-start;
  min-width: min(10.25rem, 100%);
  margin-top: auto;
  font-size: .9rem;
}
.estate-text > :nth-last-child(2), .service-caption > :nth-last-child(2) {
  margin-bottom: clamp(1.35rem, 2vw, 1.85rem);
}
.portfolio-more { margin-top: clamp(2.5rem, 4.8vw, 4.85rem); text-align: center; }
.more-button {
  min-height: 46px;
  padding: .63rem 1.6rem;
  border: 1px solid #9ea1a1;
  border-radius: .25rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .94rem;
}
.portfolio-status { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; }
@media (hover: hover) {
  .region-filter button:hover, .more-button:hover { background: var(--wash); }
  .guide-action:hover, :is(.service-story, .estate-card a):hover .listing-action {
    background: var(--paper);
    border-color: #38383d;
    color: #38383d;
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .estate-photo img, .service-image img { transition: transform .5s ease; }
  .service-story:hover img, .estate-card a:hover img { transform: scale(1.025); }
}
@media (max-width: 64rem) {
  .estate-grid, .service-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 53.99rem) {
  .portfolio-top, .service-lead { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
}
@media (max-width: 48rem) {
  .guide-hero {
    padding-top: clamp(2.75rem, 7.5vw, 4rem);
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(1rem, 4.8vw, 2.25rem);
  }
  .guide-hero .guide-photo { aspect-ratio: auto; height: clamp(14rem, 80vw, 20rem); }
  .guide-hero .guide-title { font-size: clamp(1.65rem, 7.6vw, 2.5rem); gap: .17em; }
  .guide-action { width: min(17.5rem, 100%); }
  .guide-hero--sound {
    grid-template-columns: auto minmax(0, 1fr);
    padding-top: 0;
  }
  .guide-hero--sound .guide-photo { aspect-ratio: 1.25; height: auto; }
  .guide-hero--sound .guide-photo img { object-position: 62% 50%; }
}
@media (max-width: 40rem) {
  .estate-grid, .service-gallery { grid-template-columns: minmax(0, 1fr); }
  .listing-action { align-self: center; width: min(17.5rem, 100%); }
}
