/* ==========================================================================
   Meridian Residences — Cinematic Midnight Luxury
   ========================================================================== */

:root {
  /* Backgrounds */
  --midnight-navy: #0D1728;
  --deep-navy: #1C293F;
  --slate-blue: #2F3D56;
  --mist-slate: #4B5871;

  /* Text */
  --text-primary: #F2F1EE;
  --text-secondary: #AEA9A6;
  --text-muted: #767682;
  --text-metadata: rgba(242, 241, 238, 0.62);

  /* Warm accents */
  --architectural-light: #B9A493;
  --soft-bronze: #76635C;
  --warm-shadow: #302C2C;

  /* Surfaces */
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.14);
  --strong-border: rgba(255, 255, 255, 0.28);
  --dark-overlay: rgba(5, 12, 24, 0.58);

  /* Layout */
  --max-width: 1440px;
  --pad-x: 20px;
  --section-spacing: 120px;

  /* Type */
  --font: 'Manrope', 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

@media (min-width: 640px) {
  :root { --pad-x: 38px; }
}
@media (min-width: 1024px) {
  :root { --pad-x: 64px; --section-spacing: 168px; }
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--midnight-navy);
  color: var(--text-primary);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
svg { width: 100%; height: 100%; display: block; }

/* ---- shared type ---- */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-metadata);
  margin: 0 0 16px;
}

.section__title {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 20px;
  overflow: hidden;
}
.section__title-line,
.newsletter__title-line {
  display: block;
  transform: translateY(100%);
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}
.section__title-line:nth-of-type(2),
.newsletter__title-line:nth-of-type(2) { transition-delay: 90ms; }
.section__title.is-visible .section__title-line,
.newsletter__title.is-visible .newsletter__title-line { transform: translateY(0); }

.section__text {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 38ch;
  margin: 0 0 28px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  transition: border-color 250ms ease, opacity 250ms ease;
}
.link-arrow svg { width: 12px; height: 12px; transition: transform 250ms ease; }
.link-arrow:hover { border-color: var(--strong-border); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background 250ms ease, border-color 250ms ease, color 250ms ease, opacity 250ms ease, transform 200ms cubic-bezier(0.25, 1, 0.5, 1);
}
.btn svg { width: 14px; height: 14px; }
.btn--primary {
  background: var(--text-primary);
  color: var(--midnight-navy);
  border: 1px solid var(--text-primary);
}
.btn--primary:hover { opacity: 0.85; }
.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--strong-border);
}
.btn--secondary:hover { background: var(--glass-hover); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 11px; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background 250ms ease, border-color 250ms ease, transform 200ms cubic-bezier(0.25, 1, 0.5, 1);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--glass-hover); border-color: var(--strong-border); }
.icon-btn--sm { width: 32px; height: 32px; }
.icon-btn--sm svg { width: 14px; height: 14px; }

/* ---- logo ---- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { width: 30px; height: 30px; color: var(--text-primary); flex-shrink: 0; }
.logo__word {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--text-primary);
}
.logo__word small {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 84px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1), background 350ms ease, border-color 350ms ease;
}
.nav--solid {
  background: rgba(13, 23, 40, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav--hidden { transform: translateY(-100%); }
.nav__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__links {
  display: none;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 241, 238, 0.7);
  transition: color 250ms ease;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__actions .btn--primary { display: none; }

@media (min-width: 1024px) {
  .nav__links { display: flex; }
  .nav__actions .btn--primary { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  height: 240vh;
}
.hero__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5,14,28,0.62) 0%, rgba(5,14,28,0.28) 45%, rgba(5,14,28,0.12) 70%),
    linear-gradient(to top, rgba(5,14,28,0.55) 0%, rgba(5,14,28,0.05) 35%, rgba(5,14,28,0.15) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 160px var(--pad-x) 64px;
}
.hero__title {
  font-size: clamp(38px, 6.4vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 0 0 22px;
  max-width: 14ch;
  overflow: hidden;
}
.hero__title span {
  display: block;
  transform: translateY(100%);
  animation: title-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero__title span:nth-child(2) { animation-delay: 90ms; }
@keyframes title-rise {
  to { transform: translateY(0); }
}
.hero__lead {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 40ch;
  margin: 0 0 36px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__content--arrival {
  position: absolute;
  inset: auto 0 0 0;
  padding: 160px var(--pad-x) 64px;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}
.hero__title--arrival span { animation: none; transform: none; }

.hero__scroll {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--pad-x) 32px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-metadata);
}
.scroll-dot {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.scroll-dot::after {
  content: "";
  position: absolute;
  top: 5px; left: 50%;
  width: 1px; height: 8px;
  background: var(--text-primary);
  transform: translateX(-50%);
  animation: scroll-bob 2s ease-in-out infinite;
}
@keyframes scroll-bob {
  0%, 100% { opacity: 0.3; transform: translate(-50%, 0); }
  50% { opacity: 1; transform: translate(-50%, 4px); }
}

/* ==========================================================================
   Metrics
   ========================================================================== */
.metrics {
  border-top: 1px solid var(--border);
  background: var(--deep-navy);
}
.metrics__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px var(--pad-x);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}
@media (min-width: 720px) {
  .metrics__inner {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    gap: 24px;
  }
}
.metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.metric:first-child { padding-left: 0; border-left: none; }
@media (max-width: 719px) {
  .metric:nth-child(odd) { padding-left: 0; border-left: none; }
}
.metric__icon {
  width: 16px;
  height: 16px;
  color: var(--architectural-light);
  opacity: 0.85;
  align-self: center;
  flex-shrink: 0;
}
.metric__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(242, 241, 238, 0.55);
  white-space: nowrap;
}
.metric__num {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ==========================================================================
   Generic section
   ========================================================================== */
.section {
  position: relative;
  padding: var(--section-spacing) 0;
  border-top: 1px solid var(--border);
}
/* Residences sits between two Midnight Navy acts on a Deep Navy tint,
   an ABA rhythm that reads as a clear split without breaking the
   theme's "keep the interface quiet" rule (deep_navy is already the
   documented secondary_background, previously only used on Metrics). */
#residences { background: var(--deep-navy); }

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section__inner--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .section__inner--split {
    grid-template-columns: 0.85fr 1.6fr;
    gap: 64px;
  }
  .section__inner--reverse { grid-template-columns: 1.6fr 0.85fr; }
  .section__inner--reverse .section__copy { order: 2; }
  .section__inner--reverse .feature-card { order: 1; }
}
.section__copy { max-width: 420px; }

/* ---- amenity mosaic (asymmetric editorial composition, not a
   repeated identical-card grid: one anchor tile + three supporting
   tiles, matching the theme's own layout principle) ---- */
.amenity-mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.amenity-tile-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (min-width: 800px) {
  .amenity-mosaic {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: 460px; /* definite height so 100%-height children below resolve, not collapse to image intrinsic ratio */
    align-items: stretch;
  }
  .amenity-tile-stack {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    height: 100%;
  }
}

.amenity-tile {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
}
.amenity-tile--large { aspect-ratio: 4 / 5; }
@media (min-width: 800px) {
  .amenity-tile,
  .amenity-tile--large { aspect-ratio: auto; height: 100%; }
}

.amenity-mosaic.is-visible .amenity-tile {
  animation: amenity-tile-rise 750ms cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 90ms) forwards;
}
@keyframes amenity-tile-rise {
  to { opacity: 1; transform: translateY(0); }
}

.amenity-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1));
}
.amenity-tile:hover img { transform: scale(1.045); }

.amenity-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 12, 24, 0.86), rgba(5, 12, 24, 0.18) 50%, transparent 68%);
  pointer-events: none;
  transition: background 400ms ease;
}
.amenity-tile:hover::after {
  background: linear-gradient(to top, rgba(5, 12, 24, 0.92), rgba(5, 12, 24, 0.35) 55%, transparent 75%);
}

.amenity-tile figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  text-align: left;
}
.amenity-tile__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: rgba(13, 23, 40, 0.4);
  flex-shrink: 0;
}
.amenity-tile__icon svg { width: 14px; height: 14px; }
.amenity-tile__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.amenity-tile--large .amenity-tile__icon { width: 36px; height: 36px; }
.amenity-tile--large .amenity-tile__icon svg { width: 16px; height: 16px; }
.amenity-tile--large .amenity-tile__label { font-size: 16px; }

.amenity-tile__desc {
  margin: 0;
  max-width: 32ch;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 450ms var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1)), opacity 300ms ease;
}
.amenity-tile:hover .amenity-tile__desc {
  max-height: 5.5em;
  opacity: 1;
  transition: max-height 450ms var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1)) 60ms, opacity 350ms ease 60ms;
}
.amenity-tile--large .amenity-tile__desc { max-width: 36ch; font-size: 13px; }

/* ---- feature card (residences / location) ---- */
.feature-card {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.feature-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.feature-card--panorama img { aspect-ratio: 16 / 9; }

/* ---- spec list: one inline editorial row, not three stacked
   number-over-label tiles (the shared design laws flag that repeated
   shape as the hero-metric template) ---- */
.spec-list {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  margin: 0;
  display: flex;
  padding: 18px 22px;
  background: rgba(13, 23, 40, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.spec-list__item {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 18px;
  border-left: 1px solid var(--border);
}
.spec-list__item:first-child { padding-left: 0; border-left: none; }
.spec-list__item dt {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-metadata);
}
.spec-list__item dd {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}
@media (max-width: 480px) {
  .spec-list { flex-direction: column; gap: 10px; }
  .spec-list__item { padding: 0; border-left: none; }
}

/* ---- residence hotspots: numbered markers on real elements in the
   photo, revealing a label on hover/focus. Adds explorability to a
   single static image without inventing new imagery. ---- */
.hotspots { position: absolute; inset: 0; z-index: 1; }
.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(13, 23, 40, 0.45);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 250ms ease, border-color 250ms ease, transform 250ms var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1));
}
.hotspot::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  animation: hotspot-pulse 2.6s ease-out infinite;
}
@keyframes hotspot-pulse {
  0% { transform: scale(0.72); opacity: 0.9; }
  75%, 100% { transform: scale(1.35); opacity: 0; }
}
.hotspot:hover,
.hotspot:focus-visible {
  background: var(--text-primary);
  color: var(--midnight-navy);
  border-color: var(--text-primary);
  transform: translate(-50%, -50%) scale(1.08);
}
.hotspot:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }

.hotspot__tip {
  position: absolute;
  top: 50%;
  width: max-content;
  max-width: 210px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(13, 23, 40, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--strong-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 250ms ease, transform 250ms var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1)), visibility 250ms;
  pointer-events: none;
}
.hotspot__tip strong { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.hotspot[style*="--side:right"] .hotspot__tip { left: calc(100% + 16px); }
.hotspot[style*="--side:left"] .hotspot__tip { right: calc(100% + 16px); left: auto; }
.hotspot[style*="--side:top"] .hotspot__tip { top: auto; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px) scale(0.96); }

.hotspot:hover .hotspot__tip,
.hotspot:focus-visible .hotspot__tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}
.hotspot[style*="--side:top"]:hover .hotspot__tip,
.hotspot[style*="--side:top"]:focus-visible .hotspot__tip {
  transform: translateX(-50%) translateY(0) scale(1);
}

@media (max-width: 640px) {
  .hotspot__tip { max-width: 160px; font-size: 11px; padding: 10px 12px; }
}

/* ---- proximity scale: distance rows as a proportional comparison,
   not just three isolated numbers ---- */
.proximity-scale {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}
.distance-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: rgba(242, 241, 238, 0.55);
  flex-shrink: 0;
}
.distance-icon svg { width: 15px; height: 15px; }

.proximity-scale__item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.proximity-scale__body { flex: 1; min-width: 0; }
.proximity-scale__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.proximity-scale__label strong { color: var(--text-primary); font-weight: 500; font-size: 13px; }
.proximity-scale__track {
  position: relative;
  height: 2px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.proximity-scale__fill {
  position: absolute;
  inset: 0;
  width: var(--fill);
  background: var(--architectural-light);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 900ms var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1));
  transition-delay: calc(var(--i, 0) * 140ms);
}
.section__copy.is-visible .proximity-scale__fill { transform: scaleX(1); }

/* ---- photo tag: editorial caption on the panorama, echoing the
   act-index / contact-sheet labeling used elsewhere on the page ---- */
.feature-card--panorama { position: relative; }
.feature-card--panorama::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 12, 24, 0.55), transparent 40%);
  pointer-events: none;
}
.photo-tag {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 1;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-metadata);
}

/* ==========================================================================
   Gallery: cursor-proximity magnify row + click-to-expand
   ========================================================================== */
.gallery__head { max-width: 480px; margin: 0 auto 48px; text-align: center; }
.gallery__head .section__text { margin: 0 auto; }

.magnetic-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 0;
}
.magnetic-row__bar {
  position: relative;
  flex: 0 0 auto;
  width: 84px;
  height: 300px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  transform-origin: center;
  will-change: transform;
}
.magnetic-row__bar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
/* This source photo is shot in bright daylight, unlike the rest of the
   blue-hour set; pull it toward the same grade so it doesn't jump out. */
.magnetic-row__bar--daylight img {
  filter: brightness(0.72) saturate(0.75) sepia(0.12) hue-rotate(180deg);
}
@media (max-width: 640px) {
  .magnetic-row__bar { width: 68px; height: 220px; }
}

/* open (expanded) state: a deliberate one-time layout change on click,
   not a continuous per-frame animation, so width/height transitions
   here are fine per the motion guidance */
.magnetic-row.is-open .magnetic-row__bar {
  transform: none !important;
  transition: width 400ms cubic-bezier(0.25, 1, 0.5, 1), height 400ms cubic-bezier(0.25, 1, 0.5, 1), opacity 350ms ease, flex-basis 400ms cubic-bezier(0.25, 1, 0.5, 1);
}
.magnetic-row.is-open .magnetic-row__bar:not(.is-active) {
  width: 0;
  height: 0;
  min-width: 0;
  opacity: 0;
  border-width: 0;
  pointer-events: none;
}
.magnetic-row.is-open .magnetic-row__bar.is-active {
  width: min(64vw, 560px);
  height: min(64vw, 560px);
  z-index: 61;
}

.magnetic-row__backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 12, 24, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}
.magnetic-row__backdrop.is-visible { opacity: 1; pointer-events: auto; }
.magnetic-row__backdrop[hidden] { display: none; }

.magnetic-row__caption {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-metadata);
  min-height: 1.4em;
}

@media (prefers-reduced-motion: reduce) {
  .magnetic-row__bar { transition: none !important; }
}

/* ==========================================================================
   Newsletter
   ========================================================================== */
.newsletter {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.newsletter__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px var(--pad-x);
}
.newsletter__row {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 860px) {
  .newsletter__row { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; }
}
.newsletter__copy { max-width: 420px; }
.newsletter__title {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 10px;
  overflow: hidden;
}
.newsletter__text { font-size: 13px; color: var(--text-secondary); margin: 0; max-width: 40ch; }

/* One editorial line: underlined baseline field, not a boxed pill,
   so the form reads as typography rather than a widget. */
.newsletter__form {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 0;
}
@media (min-width: 860px) { .newsletter__form { min-width: 320px; } }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.newsletter__field {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 300;
  padding: 0 0 12px;
  transition: border-color 250ms ease;
}
.newsletter__field::placeholder { color: var(--text-muted); font-weight: 300; }
.newsletter__field:hover { border-color: var(--strong-border); }
.newsletter__field:focus-visible { border-color: var(--text-primary); }
.newsletter__field:user-invalid { border-color: var(--text-secondary); }

.newsletter__submit {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--strong-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 250ms ease, border-color 250ms ease, transform 200ms cubic-bezier(0.25, 1, 0.5, 1);
}
.newsletter__submit:hover { background: var(--glass-hover); }
.newsletter__icon {
  position: absolute;
  width: 15px;
  height: 15px;
  transition: opacity 250ms ease, transform 300ms var(--ease-out-quart, cubic-bezier(0.25, 1, 0.5, 1));
}
.newsletter__icon--check { opacity: 0; transform: scale(0.6); }
.newsletter__submit.is-success .newsletter__icon--arrow { opacity: 0; transform: scale(0.6); }
.newsletter__submit.is-success .newsletter__icon--check { opacity: 1; transform: scale(1); }
.newsletter__submit.is-success {
  background: var(--text-primary);
  color: var(--midnight-navy);
  border-color: var(--text-primary);
}

.newsletter__meta {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-metadata);
  min-height: 1.4em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding-top: var(--section-spacing); }
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x) 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 720px) {
  .footer__inner { grid-template-columns: 1.6fr repeat(4, 1fr); gap: 24px; }
}
.footer__brand { max-width: 280px; }
.footer__tag { font-size: 13px; color: var(--text-secondary); margin-top: 16px; }
.footer__heading {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-metadata);
  margin: 0 0 16px;
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 13px; color: rgba(242, 241, 238, 0.52); transition: color 250ms ease; }
.footer__col a:hover { color: var(--text-primary); }
.footer__social { display: flex; gap: 10px; }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 22px var(--pad-x);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 800ms ease, transform 800ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Amenity mosaic children stagger themselves; the container shouldn't
   also fade as one block on top of that. */
.amenity-mosaic.reveal { opacity: 1; transform: none; transition: none; }

/* ---- act index (editorial chapter marks, echoing the client's own
   "01. HERO BACKGROUND" asset-sheet numbering) ---- */
.act-index {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-metadata);
}
.hero .act-index {
  position: absolute;
  top: 96px;
  right: var(--pad-x);
  z-index: 1;
}
.act-index--section {
  display: block;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  margin-bottom: 28px;
}

/* ---- act rail: persistent chapter map on desktop, echoing the page's
   own "01 — Opening" numbering as a scrubber rather than a generic
   scroll-progress bar ---- */
.act-rail {
  position: fixed;
  top: 50%;
  right: 28px;
  z-index: 45;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
@media (min-width: 1280px) {
  .act-rail { display: flex; }
}
.act-rail::before {
  content: "";
  position: absolute;
  top: 2px; bottom: 2px;
  left: 50%;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
  z-index: -1;
}
.act-rail__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--midnight-navy);
  border: 1px solid var(--border);
  color: var(--text-metadata);
  font-size: 9px;
  font-weight: 500;
  transition: background 300ms ease, border-color 300ms ease, color 300ms ease, transform 300ms cubic-bezier(0.25, 1, 0.5, 1);
}
.act-rail__dot:hover { border-color: var(--strong-border); color: var(--text-primary); }
.act-rail__dot.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--midnight-navy);
  transform: scale(1.2);
}
.act-rail__dot:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }

/* ---- wipe-reveal feature cards (clip-path driven by JS/GSAP) ---- */
.feature-card--wipe {
  clip-path: inset(0 0 0 0);
}
.feature-card--wipe img {
  transform: scale(1.08);
  transition: transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card--wipe.is-visible img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-dot::after { animation: none; }
  .hero__title span { animation: none; transform: none; }
  .feature-card--wipe img { transition: none; transform: none; }
  .amenity-tile { opacity: 1; transform: none; }
  .amenity-mosaic.is-visible .amenity-tile { animation: none; }
  .amenity-tile img { transition: none; }
  .amenity-tile__desc { transition: none; }
  .hotspot::before { animation: none; }
  .hotspot__tip { transition: none; }
  .proximity-scale__fill { transition: none; transform: scaleX(1); }
  html { scroll-behavior: auto; }
  .nav { transition: none; }
  .nav--hidden { transform: none; }
  .btn, .icon-btn, .newsletter__submit { transition: background 250ms ease, border-color 250ms ease, color 250ms ease, opacity 250ms ease; }
  .section__title-line, .newsletter__title-line { transition: none; transform: none; }
  .act-rail__dot { transition: none; }
  .act-rail__dot.is-active { transform: none; }
}

/* ==========================================================================
   Mobile nav drawer
   ========================================================================== */
@media (max-width: 1023px) {
  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 84px;
    left: 0; right: 0;
    background: rgba(13, 23, 40, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 24px var(--pad-x) 32px;
    gap: 20px;
  }
}
