/* Approved hero A: name, panoramic photo, then listing information. */
.hero {
  --hero-travel: 70svh;
  --hero-header-gap: clamp(2rem, 4.5svh, 3.5rem);
  --hero-info-gap: clamp(40px, 3vw, 48px);
  height: calc(100svh + var(--hero-travel));
  position: relative;
  background: var(--surface);
}

.hero-viewport {
  --progress: 0;
  --hero-photo-inset: max(var(--edge), calc((100% - 105rem) / 2));
  --frame-top: 32svh;
  --frame-right: 0px;
  --frame-bottom: 17svh;
  --frame-left: 0px;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
}

.hero-image {
  position: absolute;
  inset: 0 var(--hero-photo-inset);
  margin: 0;
  clip-path: inset(var(--frame-top) var(--frame-right) var(--frame-bottom) var(--frame-left));
  will-change: clip-path;
}

.hero-image picture {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  transform: translateY(calc((1 - var(--progress)) * var(--hero-photo-shift, 18svh)));
  will-change: transform;
}

.hero-topline {
  position: absolute;
  top: calc(var(--bar-top) + var(--bar-h) + var(--hero-header-gap));
  left: var(--pad-x);
  right: var(--pad-x);
  z-index: 1;
  container-type: inline-size;
  opacity: clamp(0, calc(1 - var(--progress) * 3), 1);
  transform: translateY(calc(var(--progress) * -5rem));
}

.hero-title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-h1);
  line-height: .96;
  letter-spacing: -.035em;
  text-align: center;
  white-space: nowrap;
}

.hero-ledger {
  position: absolute;
  top: var(--hero-info-top, 83svh);
  padding-top: var(--hero-info-gap);
  left: var(--pad-x);
  right: var(--pad-x);
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  column-gap: clamp(24px, 4vw, 64px);
  align-items: start;
  opacity: clamp(0, calc(1 - var(--progress) * 3), 1);
  transform: translateY(calc(var(--progress) * 4rem));
}

.hero-kicker {
  margin: 0;
  font-family: var(--f-data);
  font-weight: 500;
  font-size: var(--t-label);
  line-height: 1.5;
}

.hero-description,
.hero-identity p {
  margin: 0;
  font-size: var(--t-body);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-identity .hero-kicker {
  font-size: var(--t-label);
  margin-bottom: 8px;
}

.hero-offer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.hero-price {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-price-hero);
  line-height: 1.15;
  white-space: nowrap;
}

.hero-enquire {
  cursor: pointer;
}

html.hero-photo-under-nav .site-bar {
  color: var(--ground);
}

@media (min-width:761px) and (max-height:820px) {
  .hero-ledger {
    column-gap: 24px;
    top: var(--hero-info-top, 81svh);
  }

  .hero-viewport {
    --frame-top: 34svh;
    --frame-bottom: 19svh;
  }
}

@media (max-width:760px), (max-aspect-ratio:5/4), (max-height:600px) {
  .hero {
    height: auto;
  }

  .hero-viewport {
    position: relative;
    height: auto;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }

  .hero-image {
    position: relative;
    inset: auto;
    order: 1;
    flex: 0 0 auto;
    width: calc(100% - 2 * var(--hero-photo-inset));
    align-self: center;
    height: clamp(18rem, 42svh, 28rem);
    clip-path: none;
  }

  .hero-image img {
    transform: none;
    object-position: 80% 38%;
  }

  .hero-topline,
  .hero-ledger {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    opacity: 1;
    transform: none;
  }

  .hero-topline {
    order: 0;
    margin: calc(var(--bar-top) + var(--bar-h) + var(--hero-header-gap)) var(--edge) 24px;
  }

  .hero-ledger {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px var(--edge) 32px;
  }

  .hero-identity {
    display: contents;
  }

  .hero-identity .hero-kicker {
    order: 0;
    margin: 0;
  }

  .hero-description {
    order: 1;
  }

  .hero-identity p:not(.hero-kicker) {
    order: 2;
  }

  .hero-offer {
    order: 3;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .hero-enquire {
    padding-inline: 1.5em;
  }
}

@media (max-height:600px) and (min-width:761px) {
  .hero-image {
    height: 48svh;
    min-height: 11rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero {
    height: auto;
  }

  .hero-viewport {
    position: relative;
  }

  .hero-image,
  .hero-image img {
    will-change: auto;
  }
}

/* Approved overlay composition: taller photo and inset listing information. */
.hero {
  --hero-photo-max-height: 900px;
  --hero-header-gap: clamp(88px, calc(4vw + 3svh), 128px);
  --hero-inner-pad: clamp(24px, calc(8vw - 12px), 120px);
}

.hero-topline {
  transform: none;
  padding-bottom: clamp(32px, 3vw, 64px);
}

.hero.is-height-capped {
  height: var(--hero-layout-height);
}

.hero.is-height-capped .hero-viewport {
  position: relative;
  height: var(--hero-layout-height);
}

.hero-image {
  top: var(--frame-top);
  bottom: var(--frame-bottom);
  clip-path: none;
}

.hero-subtitle {
  margin: clamp(0px, .4vw, 8px) 0 0;
  text-align: center;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: var(--t-h3);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.hero-image img {
  transform: none;
  object-position: 70% 48%;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(9 22 34 / .88), rgb(9 22 34 / .55) 26%, transparent 65%);
  pointer-events: none;
}

.hero-ledger {
  top: auto;
  bottom: calc(var(--frame-bottom) + var(--hero-content-inset, 32px));
  left: calc(var(--hero-photo-inset) + var(--hero-inner-pad));
  right: calc(var(--hero-photo-inset) + var(--hero-inner-pad));
  padding-top: 0;
  display: block;
  container-type: inline-size;
  color: var(--ground);
}

.hero-ledger-layout {
  display: grid;
  grid-template-columns: minmax(0, 34rem) auto;
  column-gap: clamp(24px, 4vw, 64px);
  row-gap: 24px;
  justify-content: space-between;
  align-items: start;
}

.hero-ledger .hero-offer {
  width: auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
}

@container (max-width: 32rem) {
  .hero-ledger-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-ledger .hero-offer {
    align-items: flex-start;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width:760px), (max-aspect-ratio:5/4), (max-height:600px) {
  .hero-viewport {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding-bottom: 24px;
    min-height: 0;
  }

  .hero-topline {
    grid-row: 1;
    grid-column: 1;
    margin-bottom: 0;
  }

  .hero-image {
    grid-row: 2;
    grid-column: 1;
    top: auto;
    bottom: auto;
    width: calc(100% - 2 * var(--hero-photo-inset));
    height: var(--hero-stacked-height, auto);
    min-height: 0;
    align-self: stretch;
    justify-self: center;
    background: #091622;
  }

  .hero-image img {
    position: absolute;
    inset: 0;
    height: var(--hero-stacked-photo-height, 100%);
    object-position: 72% 38%;
    mask-image: none;
  }

  .hero.is-copy-stacked .hero-image img {
    mask-image: linear-gradient(to bottom, #000 72%, transparent);
  }

  .hero-ledger {
    grid-row: 2;
    grid-column: 1;
    inset: auto;
    align-self: end;
    margin: 0 calc(var(--hero-photo-inset) + var(--hero-inner-pad)) var(--hero-inner-pad);
    padding: 0;
    gap: 24px;
  }

  .hero-identity {
    display: block;
  }

  .hero-identity .hero-kicker {
    margin-bottom: 8px;
  }
}

@media (max-width:760px) {
  .hero-viewport {
    --hero-photo-inset: 0px;
  }
}
