.hero {
  display: flex;
  position: relative;
  min-height: 47rem;
  padding: 8rem 0 1.25rem;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  color: var(--white);
  background: var(--navy-950);
}

.hero__media,
.hero__shade {
  position: absolute;
  z-index: -2;
  inset: 0;
}

.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}

.hero__poster {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery__item picture,
.story__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__video {
  position: absolute;
  inset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none !important;
  }
}

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 13, 23, .94) 0%, rgba(3, 13, 23, .62) 48%, rgba(3, 13, 23, .25) 100%),
    linear-gradient(0deg, rgba(3, 13, 23, .72), transparent 55%);
}

.hero__content {
  padding-bottom: 2.5rem;
}

.hero__content h1 {
  max-width: 9.5em;
  margin-bottom: .3em;
  color: var(--white);
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: -.02em;
}

.hero__lead {
  max-width: 35rem;
  color: #edf0f2;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero__link {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  color: #e7d5b9;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.search-strip {
  display: grid;
  z-index: 3;
  padding-block: 1rem;
  gap: .8rem;
  color: var(--ink-900);
  background: rgba(251, 248, 242, .97);
  border: 1px solid rgba(217, 205, 187, .8);
  box-shadow: var(--shadow-soft);
}

.search-strip .button {
  width: 100%;
}

.benefits {
  padding-block: 3.5rem;
  background: var(--cream-50);
  border-bottom: 1px solid var(--border);
}

.benefits__grid {
  display: grid;
  gap: 2.5rem 1.5rem;
}

.benefit {
  text-align: center;
}

.benefit__icon {
  display: grid;
  width: 3.8rem;
  height: 3.8rem;
  margin: 0 auto 1.15rem;
  place-items: center;
  color: var(--gold-500);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.benefit h2 {
  margin-bottom: .55rem;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.benefit p {
  max-width: 15rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: .86rem;
}

.apartments-section {
  background: var(--cream-50);
}

.apartment-grid {
  display: grid;
  gap: 1.2rem;
}

.availability-section {
  color: #e7e9ec;
  background: var(--navy-950);
  background-image: radial-gradient(circle at 85% 10%, rgba(182, 151, 104, .15), transparent 32rem);
}

.availability-section h2 {
  color: var(--white);
}

.availability-section__inner {
  display: grid;
  gap: 2.5rem;
}

.availability-section__inner > div:first-child p:last-child {
  max-width: 38rem;
}

.availability-experience {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 15rem;
  padding: clamp(1rem, 3vw, 2rem);
  color: #d7c4a7;
  border: 1px solid rgba(182, 151, 104, .55);
  background: rgba(255, 255, 255, .03);
}

[data-calendar-root] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.availability-search--fallback {
  display: grid;
  width: 100%;
  gap: 1rem;
  align-self: center;
}

.availability-search--fallback[hidden] {
  display: none;
}

.availability-search--fallback .button {
  width: 100%;
}

.availability-experience > .availability-status:only-child {
  place-self: center;
  text-align: center;
}

.calendar-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.calendar-tabs button {
  min-width: 10.5rem;
  padding: .75rem;
  color: #e7e9ec;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .2);
  text-align: left;
  cursor: pointer;
}

.calendar-tabs button[aria-selected="true"] {
  color: var(--navy-950);
  background: #d1b489;
  border-color: #d1b489;
}

.calendar-tabs button span {
  display: block;
  margin-top: .25rem;
  font-size: .7rem;
  text-transform: uppercase;
}

.calendar-toolbar,
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-row {
  display: contents;
}

.calendar-toolbar {
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  text-align: center;
}

.calendar-toolbar h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.calendar-toolbar button {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
  cursor: pointer;
}

.calendar-weekdays {
  grid-column: 1 / -1;
  margin-top: 1.25rem;
  color: #cab99f;
  font-size: .68rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.calendar-weekdays span,
.calendar-day {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
}

.calendar-day {
  color: #aeb6be;
  border: 1px solid rgba(255, 255, 255, .07);
}

.calendar-day--adjacent {
  opacity: .42;
}

.calendar-day--free {
  color: #132f28;
  background: #b9d7c3;
}

.calendar-day--occupied {
  color: #f6e2de;
  background: #6b3434;
}

.calendar-day--selected {
  outline: 2px solid #efd8b5;
  outline-offset: -3px;
}

.calendar-legend {
  display: flex;
  margin: 1.25rem 0;
  padding: 0;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  color: #d9dee3;
  font-size: .76rem;
  list-style: none;
}

.calendar-key {
  display: inline-block;
  width: .85rem;
  height: .85rem;
  margin-right: .3rem;
  vertical-align: -.1rem;
  border: 1px solid rgba(255, 255, 255, .2);
}

.calendar-key--free { background: #b9d7c3; }
.calendar-key--occupied { background: #6b3434; }
.calendar-key--unknown { background: rgba(255, 255, 255, .05); }

.calendar-result {
  display: flex;
  padding-top: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.calendar-result p,
.availability-unavailable p,
.availability-empty p {
  margin: 0;
}

.availability-unavailable,
.availability-empty {
  place-self: center;
  max-width: 38rem;
  text-align: center;
}

.availability-unavailable h3,
.availability-empty h3 {
  color: var(--white);
}

.inquiry-form {
  position: relative;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  color: var(--ink-900);
  background: var(--cream-50);
}

.inquiry-form[hidden] {
  display: none;
}

.inquiry-form__heading {
  margin-bottom: 1.5rem;
}

.inquiry-form__heading h3 {
  color: var(--navy-950);
}

.inquiry-form__grid {
  display: grid;
  gap: 1rem;
}

.inquiry-form__message {
  grid-column: 1 / -1;
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.consent-field {
  display: flex;
  margin: 1.25rem 0;
  align-items: flex-start;
  gap: .7rem;
  color: var(--muted);
  font-size: .88rem;
}

.consent-field input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.inquiry-form__status {
  margin: 1rem 0 0;
  font-weight: 700;
}

.availability-status:empty {
  display: none;
}

@media (min-width: 700px) {
  .inquiry-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .calendar-result {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-day {
    font-size: .75rem;
  }
}

.story {
  overflow: hidden;
  background: var(--cream-100);
}

.story__grid {
  display: grid;
  gap: 2.5rem;
}

.story__copy {
  align-self: center;
}

.story__copy > p:not(.eyebrow) {
  max-width: 34rem;
  color: var(--muted);
}

.future-action {
  display: inline-block;
  margin-top: .75rem;
  padding-bottom: .25rem;
  color: var(--navy-900);
  border-bottom: 1px solid var(--gold-500);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.story__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-soft);
}

.story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story__media figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: .65rem .9rem;
  color: var(--cream-50);
  background: rgba(7, 24, 42, .88);
  font-size: .7rem;
  letter-spacing: .05em;
}

.gallery {
  background: var(--cream-50);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: 9.5rem;
  gap: .65rem;
}

.gallery__item {
  overflow: hidden;
  margin: 0;
  min-width: 0;
  background: var(--cream-100);
}

.gallery__item--1,
.gallery__item--5 {
  grid-column: span 2;
}

.gallery__link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: inherit;
}

.gallery__link::after {
  content: "+";
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  color: var(--cream-50);
  background: rgba(7, 24, 42, .76);
  font-size: 1.4rem;
  line-height: 1;
}

.gallery__link img {
  transition: transform .25s ease;
}

.gallery__link:hover img,
.gallery__link:focus-visible img {
  transform: scale(1.025);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  color: var(--cream-50);
  background: rgba(7, 24, 42, .98);
  overflow: hidden;
}

.gallery-lightbox:not([open]) {
  display: none;
}

.gallery-lightbox::backdrop {
  background: rgba(7, 24, 42, .94);
}

.gallery-lightbox__figure {
  display: grid;
  width: 100%;
  height: 100%;
  margin: 0;
  min-width: 0;
  place-items: center;
}

.gallery-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  object-fit: contain;
}

.gallery-lightbox__control {
  position: fixed;
  z-index: 1;
  display: grid;
  width: 3rem;
  height: 3rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  color: var(--cream-50);
  background: rgba(7, 24, 42, .82);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__close {
  top: 1rem;
  right: 1rem;
}

.gallery-lightbox__previous,
.gallery-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.gallery-lightbox__previous { left: 1rem; }
.gallery-lightbox__next { right: 1rem; }

@media (max-width: 520px) {
  .gallery-lightbox { padding: 4.75rem .75rem; }
  .gallery-lightbox__image {
    max-height: calc(100vh - 9.5rem);
    max-height: calc(100dvh - 9.5rem);
  }
  .gallery-lightbox__previous { left: .75rem; }
  .gallery-lightbox__next { right: .75rem; }
  .gallery-lightbox__close { top: .75rem; right: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__link img { transition: none; }
}

.reviews {
  background: var(--cream-100);
}

.review-grid {
  display: grid;
  gap: 1rem;
}

.review-card {
  margin: 0;
  padding: 2rem;
  border: 1px solid var(--border);
}

.review-card blockquote {
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.review-card figcaption {
  color: var(--muted);
  font-size: .78rem;
}

.booking-cta {
  padding-block: 3.5rem;
  color: #e4e8ec;
  background: var(--navy-900);
  border-top: 1px solid rgba(182, 151, 104, .35);
  border-bottom: 1px solid rgba(182, 151, 104, .35);
}

.booking-cta__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.booking-cta h2 {
  color: var(--white);
}

.booking-cta p:last-child {
  margin-bottom: 0;
}

.legal-hero,
.detail-hero {
  color: var(--cream-50);
  background: var(--navy-900);
}

.legal-hero__inner {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.legal-hero h1,
.detail-hero h1 {
  color: var(--white);
}

.legal-layout {
  display: grid;
  padding-block: var(--space-section);
  gap: 3rem;
}

.legal-document {
  max-width: 48rem;
}

.legal-document section + section,
.legal-document section + aside {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.legal-document h2,
.legal-nav h2 {
  font-size: 1.8rem;
}

.legal-notice {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #f7ecd9;
  border: 1px solid var(--gold-500);
}

.legal-nav {
  display: grid;
  align-self: start;
  padding: 1.5rem;
  gap: .75rem;
  background: var(--cream-100);
  border-top: 2px solid var(--gold-500);
}

.legal-nav a:not(.text-link) {
  padding-block: .45rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.legal-nav .text-link {
  margin-top: 1rem;
}

.detail-hero p:last-child {
  max-width: 48rem;
}

.detail-content {
  display: grid;
  gap: 2rem;
}

.apartment-card--detailed {
  display: grid;
}

.apartment-card--detailed .apartment-card__media {
  aspect-ratio: 4 / 3;
}

.detail-action {
  align-self: start;
  padding: 2rem;
  color: #e3e7eb;
  background: var(--navy-900);
}

.detail-action .button {
  width: 100%;
}

.detail-gallery {
  background: var(--cream-100);
}

.not-found {
  min-height: 50vh;
}

@media (min-width: 320px) {
  .section-shell {
    padding-inline: max(1rem, env(safe-area-inset-left));
  }

  .hero__content h1 {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 44rem;
    padding-bottom: 0;
  }

  .hero__content {
    padding-bottom: 8rem;
  }

  .search-strip {
    position: absolute;
    right: 0;
    bottom: -3rem;
    left: 0;
    grid-template-columns: 1fr 1fr .8fr 1.2fr;
    padding: 1.25rem;
    align-items: end;
  }

  .benefits {
    padding-top: 7rem;
  }

  .benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .apartment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .availability-section__inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .availability-search--fallback {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .availability-search--fallback .button {
    grid-column: 1 / -1;
  }

  .story__grid {
    grid-template-columns: .9fr 1.1fr;
    gap: 4rem;
  }

  .gallery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 12rem;
  }

  .gallery__item--1,
  .gallery__item--5 {
    grid-column: span 2;
    grid-row: span 2;
  }

  .review-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .booking-cta__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr) 17rem;
    align-items: start;
  }

  .detail-content {
    grid-template-columns: minmax(0, 1fr) 20rem;
  }

  .apartment-card--detailed {
    grid-template-columns: 1.1fr .9fr;
  }
}

@media (min-width: 1100px) {
  .hero {
    min-height: 50rem;
  }

  .hero__content {
    padding-bottom: 9rem;
  }

  .benefits__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .benefit + .benefit {
    border-left: 1px solid var(--border);
  }

  .apartment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .gallery__grid {
    grid-auto-rows: 15rem;
  }
}
