/* Gate 2 — Selected Residences (Room 03) */
.room-residences {
  position: relative;
  background: var(--color-canvas);
  color: var(--color-paper);
}

.chapter {
  position: relative;
  min-height: min(72svh, 46rem);
  isolation: isolate;
}

/* Inter-chapter architectural handoffs — not wipes */
.chapter__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: clip-path, transform, filter;
}

.chapter__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(28vw, 12rem);
  z-index: 2;
  pointer-events: none;
  background: var(--color-canvas);
  opacity: 0;
}

.chapter__edge--left {
  left: 0;
  box-shadow: 1px 0 0 rgba(39, 33, 29, 0.08);
}

.chapter__edge--right {
  right: 0;
  box-shadow: -1px 0 0 rgba(39, 33, 29, 0.08);
}

.chapter--urban .chapter__edge {
  background: #1c1917;
}

.chapter__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chapter--malibu .chapter__media img {
  object-position: 55% 40%;
  filter: brightness(1.02) contrast(1.02) saturate(1.02);
}

.chapter--jacksonville .chapter__media img {
  object-position: center 45%;
  filter: brightness(1) contrast(1.04) saturate(0.98);
}

.chapter--urban .chapter__media img {
  object-position: 40% 50%;
  filter: brightness(0.96) contrast(1.06) saturate(0.95);
}

.chapter__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(28, 25, 23, 0.42) 0%,
    rgba(28, 25, 23, 0.08) 48%,
    rgba(28, 25, 23, 0.18) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.chapter--urban .chapter__veil {
  background: linear-gradient(
    105deg,
    rgba(28, 25, 23, 0.58) 0%,
    rgba(28, 25, 23, 0.18) 48%,
    rgba(28, 25, 23, 0.32) 100%
  );
}

/* Inset support photographs hidden (easily restored) */
.chapter__support-wrap {
  display: none;
}

.chapter__meta {
  position: relative;
  z-index: 2;
  min-height: min(72svh, 46rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--content-pad);
  padding-bottom: clamp(2.5rem, 7vh, 4.5rem);
  max-width: 28rem;
  isolation: isolate;
}

/* One soft feathered read zone — not per-line boxes */
.chapter__meta::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(52%, 22rem);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(28, 25, 23, 0.28) 0%,
    rgba(28, 25, 23, 0.1) 42%,
    rgba(28, 25, 23, 0) 100%
  );
  backdrop-filter: blur(8px) saturate(0.95);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
  -webkit-mask-image: linear-gradient(
    to top,
    #000 0%,
    rgba(0, 0, 0, 0.85) 40%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to top,
    #000 0%,
    rgba(0, 0, 0, 0.85) 40%,
    transparent 100%
  );
}

.chapter__meta > * {
  position: relative;
  z-index: 1;
}

.chapter__kicker,
.chapter__title,
.chapter__narrative,
.chapter__link {
  text-shadow:
    0 1px 16px rgba(28, 25, 23, 0.45),
    0 0 2px rgba(28, 25, 23, 0.35);
}

.chapter__kicker {
  margin: 0 0 0.65rem;
  font-family: var(--font-sans);
  font-size: var(--type-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #ffffff;
}

.chapter__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.chapter__narrative {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.4;
  max-width: 28ch;
  color: #ffffff;
}

.chapter__link {
  font-family: var(--font-sans);
  font-size: var(--type-label);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  padding-bottom: 0.3rem;
  align-self: flex-start;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.chapter__link:hover,
.chapter__link:focus-visible {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.chapter__link:focus-visible {
  outline: 2px solid var(--color-bronze);
  outline-offset: 4px;
}

.chapter__support {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0 var(--content-pad) clamp(3rem, 8vh, 5rem);
  max-width: 22rem;
  margin-left: auto;
}

.chapter__support img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.chapter__support-label {
  margin: 0.65rem 0 0;
  font-family: var(--font-sans);
  font-size: var(--type-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(39, 33, 29, 0.5);
}

.chapter__support-wrap {
  background: var(--color-canvas);
  color: var(--color-charcoal);
  padding-top: 0;
}

@media (max-width: 767px) {
  .chapter__title {
    font-size: clamp(2.5rem, 14vw, 3.5rem);
  }

  .chapter__support {
    max-width: none;
    width: 78%;
    margin-right: 0;
    margin-left: auto;
  }
}

.js .chapter__meta > *,
.js .chapter__support {
  opacity: 0;
}

.no-js .chapter__meta > *,
.no-js .chapter__support {
  opacity: 1;
}
