/* =====================================================================
   Enclave — property templates (mobile-first responsive)
   Loaded after style.css. Uses tokens from style.css :root.
   Approach: Serhant-led layout/spacing patterns, our brand palette.
   ===================================================================== */

:root {
  --ec-bp-md: 768px;
  --ec-bp-lg: 1024px;
  --ec-bp-xl: 1320px;
  --ec-section-pad-y: clamp(56px, 9vw, 120px);
  --ec-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --ec-shadow-md: 0 8px 24px rgba(20,30,50,0.08);
}

/* ---------- Base utilities ---------- */
.ec-section { padding: var(--ec-section-pad-y) 0; }
.ec-display { font-family: var(--ff-display); font-weight: 600; line-height: 1.1; color: var(--navy); letter-spacing: -0.015em; margin: 0; }
.ec-eyebrow { font-family: var(--ff-body); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ec-eyebrow--light { color: rgba(255,255,255,0.75); }
.ec-eyebrow--accent { color: var(--accent); }
.ec-body { font-size: 16px; line-height: 1.65; color: var(--body); max-width: 60ch; }
.ec-body--light { color: var(--muted); }

.ec-section__head { margin-bottom: clamp(32px, 5vw, 64px); max-width: 940px; }
.ec-section__head .ec-eyebrow { margin-bottom: 16px; }
.ec-section__head .ec-display { font-size: clamp(32px, 5vw, 56px); max-width: 22ch; }
.ec-section__head .ec-body { margin-top: 20px; }

/* ---------- Buttons & pills (universal shape) ---------- */
.ec-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-family: var(--ff-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid currentColor; cursor: pointer; transition: 150ms ease;
  background: transparent; color: var(--ink);
  border-radius: 999px;            /* pill shape — site-wide */
  white-space: nowrap;
}
.ec-btn--primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ec-btn--primary:hover { background: var(--navy-ink); border-color: var(--navy-ink); }
.ec-btn--ghost { color: var(--white); border-color: rgba(255,255,255,0.6); }
.ec-btn--ghost:hover { background: rgba(255,255,255,0.1); }
.ec-btn--small { padding: 10px 18px; font-size: 11px; }

/* Status pill (e.g. "Off-plan", "Coming soon") */
.ec-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--white); color: var(--navy);
  border: 1px solid var(--rule);
  font-family: var(--ff-body); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.ec-pill--filled { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ec-pill--ghost  { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }

/* ---------- NAV — transparent over hero, fades to white on scroll ---------- */
.ec-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 280ms ease, border-color 280ms ease;
}
/* WordPress admin toolbar offset — only when logged in */
body.admin-bar .ec-nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ec-nav { top: 46px; } }
.ec-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px var(--gutter); min-height: 72px; }
.ec-nav__logo { display: inline-flex; align-items: center; line-height: 1; position: relative; }
.ec-nav__logo-img { display: block; height: 38px; width: auto; }
.ec-nav__logo-img--dark { display: none; }
@media (min-width: 768px) { .ec-nav__logo-img { height: 44px; } }

.ec-nav__links { display: none; gap: 28px; align-items: center; }
.ec-nav__links a { font-size: 13px; color: var(--white); transition: color 200ms ease; }
.ec-nav__links a:hover { color: var(--accent); }

.ec-nav__cta { display: flex; align-items: center; gap: 12px; }
.ec-currency {
  display: none; gap: 2px; padding: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  transition: 200ms ease;
  border-radius: 999px;
}
.ec-currency button {
  background: transparent; border: 0; padding: 6px 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: rgba(255,255,255,0.78);
  cursor: pointer; font-family: var(--ff-body); border-radius: 999px;
  transition: 200ms ease;
}
.ec-currency button.is-active { background: var(--white); color: var(--navy); }

.ec-nav .ec-btn--primary {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
}
.ec-nav .ec-btn--primary:hover { background: rgba(255,255,255,0.22); }

.ec-nav__burger { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: transparent; border: 0; cursor: pointer; }
.ec-nav__burger span { display: block; width: 22px; height: 1.5px; background: var(--white); transition: 200ms; }

@media (min-width: 768px) {
  .ec-nav__links { display: flex; }
  .ec-currency { display: inline-flex; }
  .ec-nav__burger { display: none; }
}

/* Scrolled — white bg, navy text/logo */
.ec-nav.is-scrolled {
  background: rgba(255,255,255,0.96);
  border-bottom-color: var(--rule-soft);
  backdrop-filter: blur(8px);
}
.ec-nav.is-scrolled .ec-nav__logo-img--light { display: none; }
.ec-nav.is-scrolled .ec-nav__logo-img--dark  { display: block; }
.ec-nav.is-scrolled .ec-nav__links a { color: var(--navy); }
.ec-nav.is-scrolled .ec-currency {
  background: var(--paper); border-color: var(--rule);
}
.ec-nav.is-scrolled .ec-currency button { color: var(--muted); }
.ec-nav.is-scrolled .ec-currency button.is-active { background: var(--navy); color: var(--white); }
.ec-nav.is-scrolled .ec-btn--primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.ec-nav.is-scrolled .ec-btn--primary:hover { background: var(--navy-ink); border-color: var(--navy-ink); }
.ec-nav.is-scrolled .ec-nav__burger span { background: var(--navy); }

/* Pages without a hero (e.g. archive) — start in scrolled style. */
body:not(.is-property) .ec-nav { position: sticky; }
body:not(.is-property) .ec-nav { background: var(--white); border-bottom-color: var(--rule-soft); }
body:not(.is-property) .ec-nav__logo-img--light { display: none; }
body:not(.is-property) .ec-nav__logo-img--dark  { display: block; }
body:not(.is-property) .ec-nav__links a { color: var(--navy); }
body:not(.is-property) .ec-currency { background: var(--paper); border-color: var(--rule); }
body:not(.is-property) .ec-currency button { color: var(--muted); }
body:not(.is-property) .ec-nav .ec-btn--primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
body:not(.is-property) .ec-nav__burger span { background: var(--navy); }

/* ---------- HERO ---------- */
.ec-hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column;
  color: var(--white); overflow: hidden;
}
.ec-hero__media { position: absolute; inset: 0; }
.ec-hero__video, .ec-hero__img { width: 100%; height: 100%; object-fit: cover; }
.ec-hero__feather {
  position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.92) 100%);
  pointer-events: none;
}
.ec-hero__inner {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(104px, 11vw, 140px) 0 clamp(40px, 6vw, 64px);
  width: 100%;
}
.ec-hero__breadcrumb { display: flex; gap: 6px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin: 0; }
.ec-hero__breadcrumb .sep { color: rgba(255,255,255,0.4); }
.ec-hero__breadcrumb .cur { color: var(--white); }
.ec-hero__title {
  font-family: var(--ff-display); font-weight: 700;
  color: var(--white); margin: 0 0 16px;
  font-size: clamp(36px, 5.2vw, 80px); line-height: 0.98;
  letter-spacing: -0.02em; text-transform: uppercase;
  max-width: 16ch;
}
.ec-hero__tagline {
  font-family: var(--ff-body); font-weight: 400;
  font-size: clamp(16px, 1.8vw, 22px);
  color: rgba(255,255,255,0.88); max-width: 44ch;
  margin: 0 0 32px; line-height: 1.5;
}
.ec-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(40px, 7vw, 64px); }
.ec-hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 32px; margin: 0; padding: 28px 0 0; border-top: 1px solid rgba(255,255,255,0.18); }
.ec-hero__stats div { display: flex; flex-direction: column; gap: 10px; padding-left: 0; }
.ec-hero__stats dt { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin: 0; }
.ec-hero__stats dd { font-family: var(--ff-display); font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; color: var(--white); margin: 0; line-height: 1.1; letter-spacing: -0.01em; }

@media (min-width: 768px) {
  .ec-hero__stats { grid-template-columns: repeat(4, 1fr); gap: 0; padding-top: 0; border-top: 0; }
  .ec-hero__stats div {
    position: relative;
    padding: 28px 32px 0 0;
  }
  .ec-hero__stats div::before {
    content: ""; position: absolute; left: 0; top: 0;
    width: 36px; height: 1px; background: rgba(255,255,255,0.5);
  }
}

/* ---------- GALLERY (Serhant property pattern: hero + thumbs + lightbox) ---------- */
.ec-gallery2 { padding: clamp(24px, 4vw, 48px) 0; }
.ec-gallery2__hero { position: relative; }
.ec-gallery2__hero-img {
  position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden;
  background: var(--rule-soft); cursor: zoom-in;
}
.ec-gallery2__hero-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 400ms ease;
}
.ec-gallery2__hero-img img.is-active { opacity: 1; }
.ec-gallery2__expand {
  position: absolute; bottom: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: rgba(255,255,255,0.92);
  color: var(--navy); border: 0; cursor: pointer;
  font-family: var(--ff-body); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.ec-gallery2__expand:hover { background: var(--white); }

.ec-gallery2__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--navy);
  border: 0; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: 200ms ease;
}
.ec-gallery2__nav:hover { background: var(--white); }
.ec-gallery2__nav--prev { left: 16px; }
.ec-gallery2__nav--next { right: 16px; }
@media (max-width: 640px) { .ec-gallery2__nav { width: 40px; height: 40px; } }

.ec-gallery2__bar {
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 0 0;
}
.ec-gallery2__counter {
  font-family: var(--ff-display); font-size: 18px; color: var(--navy);
  display: inline-flex; align-items: baseline; gap: 6px;
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.ec-gallery2__counter em { color: var(--muted); font-style: normal; }

.ec-gallery2__thumbs {
  display: grid; grid-auto-flow: column; gap: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.ec-gallery2__thumbs::-webkit-scrollbar { display: none; }
.ec-gallery2__thumb {
  position: relative;
  flex: 0 0 auto; width: clamp(96px, 14vw, 160px); aspect-ratio: 4/3;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  overflow: hidden; opacity: 0.55; transition: 200ms ease;
}
.ec-gallery2__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ec-gallery2__thumb:hover { opacity: 0.85; }
.ec-gallery2__thumb.is-active { opacity: 1; outline: 2px solid var(--accent); outline-offset: -2px; }

.ec-gallery2__thumb--more::after {
  content: ""; position: absolute; inset: 0; background: rgba(15,25,45,0.5);
}
.ec-gallery2__more {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-size: 22px; color: var(--white);
}

@media (min-width: 768px) {
  .ec-gallery2__bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .ec-gallery2__thumbs { gap: 12px; }
}

/* ---------- LIGHTBOX ---------- */
.ec-gallery2__lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink); overflow-y: auto;
  padding: 24px;
}
.ec-gallery2__lightbox[hidden] { display: none; }
.ec-gallery2__close {
  position: fixed; top: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: var(--white);
  border: 0; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px);
}
.ec-gallery2__close:hover { background: rgba(255,255,255,0.2); }
.ec-gallery2__lightbox-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 24px 0 64px;
}
.ec-gallery2__lightbox-item { margin: 0; }
.ec-gallery2__lightbox-item img { width: 100%; height: auto; display: block; }
.ec-gallery2__lightbox-item figcaption {
  margin-top: 8px; font-size: 11px; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .ec-gallery2__lightbox-grid { grid-template-columns: 1fr 1fr; } }
body.ec-lightbox-open { overflow: hidden; }

/* ---------- OVERVIEW ---------- */
.ec-overview__copy { max-width: 64ch; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.7; color: var(--body); margin-bottom: clamp(48px, 6vw, 80px); }
.ec-overview__copy p { margin: 0 0 1em; }
.ec-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 0; padding: 32px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ec-stats div { display: flex; flex-direction: column; gap: 8px; }
.ec-stats dt { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.ec-stats__num { font-family: var(--ff-display); font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; color: var(--navy); margin: 0; line-height: 1; letter-spacing: -0.02em; }
.ec-stats__num--accent { color: var(--navy); }
.ec-stats__num > span:not(.ec-money__unit) { font-size: 0.5em; color: var(--muted); margin-left: 6px; font-weight: 500; }

@media (min-width: 768px) { .ec-stats { grid-template-columns: repeat(4, 1fr); } }

.ec-overview__meta { margin-top: 32px; }
.ec-overview__meta dl { display: flex; flex-wrap: wrap; gap: 32px 64px; margin: 0; }
.ec-overview__meta dt { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ec-overview__meta dd { font-family: var(--ff-display); font-size: 20px; margin: 0; color: var(--navy); }

/* ---------- LIFESTYLE ---------- */
.ec-lifestyle__grid { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--rule); }
.ec-lifestyle__item {
  display: grid;
  grid-template-columns: 56px 36px 1fr;
  gap: 20px; align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.ec-lifestyle__icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--navy); }
.ec-lifestyle__icon svg { width: 28px; height: 28px; }
.ec-lifestyle__num {
  font-family: var(--ff-body); font-size: 11px; font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em; color: var(--muted); text-align: left;
}
.ec-lifestyle__title {
  font-family: var(--ff-display); font-weight: 600; font-size: 18px;
  color: var(--navy); margin: 0; text-align: left; line-height: 1.3;
  letter-spacing: -0.005em;
}
.ec-lifestyle__img {
  display: none;
}

@media (min-width: 768px) {
  .ec-lifestyle__grid { grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
  .ec-lifestyle__item { padding: 24px 0; }
}
@media (min-width: 1024px) {
  .ec-lifestyle__item { grid-template-columns: 56px 48px 1fr; gap: 24px; }
  .ec-lifestyle__title { font-size: 24px; }
}

/* ---------- COMPARE SLIDER ---------- */
.ec-compare__slider { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; user-select: none; touch-action: none; cursor: ew-resize; }
.ec-compare__layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ec-compare__after { clip-path: inset(0 0 0 50%); }
.ec-compare__handle { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--white); left: 50%; transform: translateX(-50%); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,0.1); }
.ec-compare__knob { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--white); color: var(--navy); border: 0; box-shadow: var(--ec-shadow-md); cursor: ew-resize; display: flex; align-items: center; justify-content: center; }
.ec-compare__label { position: absolute; bottom: 16px; padding: 6px 12px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--white); background: rgba(0,0,0,0.4); backdrop-filter: blur(6px); }
.ec-compare__label--left { left: 16px; }
.ec-compare__label--right { right: 16px; }

/* ---------- AVAILABLE RESIDENCES — Serhant table + type pill + pagination ---------- */
.ec-residences2__pills {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 24px 0 32px;
}
.ec-residences2__pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--navy);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--ff-body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer;
  transition: 150ms ease;
}
.ec-residences2__pill:hover { border-color: var(--navy); }
.ec-residences2__pill.is-active {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.ec-residences2__pill-count {
  font-size: 11px; opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.ec-residences2__pill.is-active .ec-residences2__pill-count { opacity: 0.85; }

.ec-residences2__table {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rule);
}
.ec-residences2__head { display: none; }
.ec-residences2__row {
  display: grid; gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
  transition: background 200ms ease, padding 220ms cubic-bezier(0.32, 0.08, 0.24, 1);
  cursor: pointer;
}
/* Row is paginated via [hidden]; force display:none past the grid rule. */
.ec-residences2__row[hidden] { display: none !important; }
.ec-residences2__row:hover {
  background: var(--paper);
  padding-left: 16px;
  padding-right: 16px;
}
.ec-residences2__row > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ec-residences2__row > div::before {
  content: attr(data-label);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); min-width: 72px; flex-shrink: 0;
}
.ec-residences2__row > div.col-residence::before { content: ""; min-width: 0; }
.ec-residences2__row > div.col-arrow::before { content: ""; min-width: 0; }

.ec-residences2__name {
  font-family: var(--ff-body);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
}
.ec-residences2__row .num { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink); }
.ec-residences2__row .col-price .num,
.ec-residences2__row .col-price [data-kes] { font-weight: 700; color: var(--navy); }
.ec-residences2__row .col-arrow {
  justify-content: flex-end;
  color: var(--muted);
}
.ec-residences2__row:hover .col-arrow { color: var(--navy); }

.ec-residences2__badge {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--navy); color: var(--white);
}
.ec-residences2__badge--pending  { background: var(--accent); color: var(--white); }
.ec-residences2__badge--reserved { background: var(--accent); color: var(--white); }
.ec-residences2__badge--sold     { background: var(--muted); color: var(--white); }

.ec-residences2__empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

/* Desktop — true 8-col grid */
@media (min-width: 1024px) {
  .ec-residences2__head,
  .ec-residences2__row {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) 60px 60px minmax(140px, 1.4fr) 80px minmax(120px, 1.2fr) 110px 24px;
    gap: 16px;
    align-items: center;
    padding: 18px 0;
  }
  .ec-residences2__head {
    display: grid;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
    background: transparent;
  }
  .ec-residences2__head > div {
    font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--muted); font-weight: 600;
  }
  .ec-residences2__row:hover {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ec-residences2__row > div::before { content: none; }
  .ec-residences2__row > div { gap: 0; }
  .ec-residences2__row .num { text-align: left; }
}

/* Pagination */
.ec-residences2__pager {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.ec-residences2__pager-btn,
.ec-residences2__pager-page {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--navy);
  font-family: var(--ff-body); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: 150ms ease;
  font-variant-numeric: tabular-nums;
}
.ec-residences2__pager-btn:hover:not(:disabled),
.ec-residences2__pager-page:hover { border-color: var(--navy); }
.ec-residences2__pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ec-residences2__pager-page.is-active {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.ec-residences2__pager-pages { display: inline-flex; align-items: center; gap: 6px; }
.ec-residences2__pager-dots {
  width: 24px;
  text-align: center;
  color: var(--muted);
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.04em;
  user-select: none;
}

/* ---------- FLOOR PLANS ---------- */
.ec-floorplans__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.ec-floorplans__tab {
  background: transparent;
  border: 1px solid var(--rule);
  padding: 10px 20px;
  font-family: var(--ff-body); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--navy); cursor: pointer; transition: 150ms ease;
  border-radius: 999px;
}
.ec-floorplans__tab:hover { border-color: var(--navy); }
.ec-floorplans__tab.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.ec-floorplans__count { color: inherit; opacity: 0.6; margin-left: 6px; font-size: 11px; font-weight: 400; }
.ec-floorplans__tab.is-active .ec-floorplans__count { opacity: 0.7; }
.ec-floorplans__panel { display: grid; grid-template-columns: 1fr; gap: 32px; }
.ec-floorplans__panel[hidden], .ec-floorplans__panel:not(.is-active) { display: none; }
.ec-floorplans__panel.is-active { display: grid; }
.ec-floorplans__drawing { aspect-ratio: 2/1; background: var(--paper); display: flex; align-items: center; justify-content: center; padding: 24px; }
.ec-floorplans__drawing img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ec-floorplans__placeholder { color: var(--muted); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.ec-floorplans__size { font-size: clamp(36px, 5vw, 48px); margin: 12px 0 0; }
.ec-floorplans__size .muted { color: var(--muted); font-size: 0.6em; }
.ec-floorplans__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; padding: 24px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ec-floorplans__stats dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ec-floorplans__stats dd { font-family: var(--ff-display); font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--navy); line-height: 1; }
.ec-floorplans__stats dd.accent { color: var(--navy); }
.ec-floorplans__cta { display: flex; gap: 12px; flex-wrap: wrap; }

@media (min-width: 1024px) { .ec-floorplans__panel { grid-template-columns: 1.6fr 1fr; gap: 48px; } }

/* ---------- INVESTMENT ---------- */
.ec-invest { background: var(--paper); }
.ec-invest__display { color: var(--navy); font-size: clamp(32px, 4.5vw, 56px); max-width: 22ch; margin: 16px 0; }
.ec-invest__panel { background: var(--white); padding: clamp(28px, 4vw, 48px); border: 1px solid var(--rule); }
.ec-invest__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.ec-invest__tag {
  background: transparent; color: var(--navy);
  border: 1px solid var(--rule); padding: 10px 20px;
  font-family: var(--ff-body); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  cursor: pointer; transition: 150ms ease;
  border-radius: 999px;
}
.ec-invest__tag:hover { border-color: var(--navy); }
.ec-invest__tag.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.ec-invest__body { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: stretch; }
.ec-invest__chart { position: relative; width: 100%; display: flex; flex-direction: column; }
.ec-invest__chart svg { display: block; width: 100%; height: auto; aspect-ratio: 800 / 360; overflow: visible; flex: 1 1 auto; }
.ec-invest__chart [data-invest-line], .ec-invest__chart [data-invest-area] {
  transition: d 800ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ec-invest__chart [data-invest-line] {
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  animation: ec-draw 1800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes ec-draw { to { stroke-dashoffset: 0; } }
.ec-invest__chart-cap {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule);
  font-size: 12px; color: var(--muted); letter-spacing: 0.04em;
}
.ec-invest__chart-cap .break-even { color: var(--accent); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }

/* Stats — paper cards in a horizontal row underneath the chart.
   No borders. Generous internal spacing so labels never wrap mid-line. */
.ec-invest__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
}
.ec-invest__stats > div {
  padding: 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  justify-content: space-between;
}
.ec-invest__stats dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
}
.ec-invest__num {
  font-family: var(--ff-display);
  font-size: clamp(26px, 2.4vw, 36px);
  color: var(--navy);
  margin: 0;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: normal;
}
.ec-invest__num em { color: var(--navy); font-style: normal; }
.ec-invest__sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
  text-wrap: balance;
}
.ec-invest__disc { font-size: 11px; color: var(--muted); margin: 24px 0 0; letter-spacing: 0.06em; }

/* Tablet — 2 columns of cards under chart */
@media (min-width: 640px) {
  .ec-invest__stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Desktop — chart full width, 4 cards in a row below */
@media (min-width: 960px) {
  .ec-invest__body { grid-template-columns: 1fr; gap: 32px; }
  .ec-invest__stats { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .ec-invest__stats > div { padding: 28px 24px; }
}

/* ---------- PAYMENT ---------- */
.ec-payment__timeline { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: pay; }
.ec-payment__step { padding: 32px; background: var(--paper); border-left: 4px solid var(--rule); }
.ec-payment__step.is-current { border-left-color: var(--accent); background: var(--white); box-shadow: var(--ec-shadow-md); }
.ec-payment__milestone { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.ec-payment__pct { font-family: var(--ff-display); font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 8px; letter-spacing: -0.02em; }
.ec-payment__step h4 { font-family: var(--ff-display); font-weight: 600; font-size: 20px; color: var(--navy); margin: 0 0 8px; }
.ec-payment__step p { font-size: 14px; color: var(--body); margin: 0 0 16px; }
.ec-payment__sample { display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px dashed var(--rule); }
.ec-payment__sample .lbl { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ec-payment__sample .amt { font-family: var(--ff-display); font-size: 18px; color: var(--navy); }

@media (min-width: 768px) { .ec-payment__timeline { grid-template-columns: repeat(3, 1fr); } }

/* ---------- LOCATION / MAP — top-down, container-margins ---------- */
.ec-location__wrap { display: grid; grid-template-columns: 1fr; gap: 32px; }
.ec-location__map { height: 56vh; min-height: 420px; max-height: 640px; background: var(--paper); position: relative; }
.ec-location__map .leaflet-container { height: 100%; width: 100%; font-family: var(--ff-body); background: var(--paper); }
.ec-location__map .leaflet-control-attribution { display: none !important; }
.ec-location__map .leaflet-control-zoom a {
  background: var(--white); color: var(--navy);
  border: 1px solid var(--rule); border-radius: 0;
  font-family: var(--ff-body); font-weight: 400; font-size: 18px;
}
.ec-location__map .leaflet-control-zoom a:hover { background: var(--paper); }

.ec-location__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.ec-location__item {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 16px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--rule); cursor: pointer; transition: 150ms ease;
}
.ec-location__item:hover, .ec-location__item.is-active { background: var(--paper); padding-left: 12px; padding-right: 12px; }
.ec-location__num { font-size: 11px; letter-spacing: 0.16em; color: var(--muted); font-variant-numeric: tabular-nums; }
.ec-location__name { font-family: var(--ff-display); font-size: 20px; color: var(--navy); }
.ec-location__dist { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--navy); font-family: var(--ff-display); font-weight: 600; }
.ec-location__dist em { color: var(--muted); font-style: normal; font-size: 11px; margin-left: 4px; letter-spacing: 0.12em; font-weight: 500; }
.ec-location__sep { color: var(--muted); margin: 0 6px 0 8px; font-weight: 400; }
.ec-location__item--self { background: var(--paper); }
.ec-location__item--self .ec-location__name { font-weight: 700; }
.ec-location__dist--self { font-family: var(--ff-body); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Money unit (KES, USD …) — eyebrow/label treatment, identical site-wide ---------- */
.ec-money__unit {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.6em;
  vertical-align: 0.3em;
}

@media (min-width: 768px) {
  .ec-location__list { grid-template-columns: 1fr 1fr; column-gap: 48px; }
}
@media (min-width: 1024px) {
  .ec-location__list { grid-template-columns: repeat(3, 1fr); }
}

.ec-location__attribution { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; margin: 16px 0 0; }
.ec-location__attribution a { color: var(--muted); text-decoration: underline; }

/* Leaflet pin override */
.ec-leaflet-pin { background: var(--navy); color: var(--white); border: 2px solid var(--white); border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; font-family: var(--ff-body); font-size: 11px; font-weight: 600; }
.ec-leaflet-pin--main { background: var(--navy); width: 44px !important; height: 44px !important; }
.ec-leaflet-pin--poi { width: 28px !important; height: 28px !important; background: var(--muted); }

/* ---------- AGENTS ---------- */
.ec-agents__grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.ec-agents__card { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 32px; background: var(--paper); }
.ec-agents__photo { aspect-ratio: 1/1; max-width: 240px; overflow: hidden; background: var(--rule); }
.ec-agents__photo img { width: 100%; height: 100%; object-fit: cover; }
.ec-agents__photo--placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--ff-display); font-size: 96px; color: var(--muted); background: var(--white); border: 1px solid var(--rule); }
.ec-agents__card h3 { font-size: 32px; margin: 8px 0 0; }
.ec-agents__role { font-size: 13px; color: var(--muted); margin: 4px 0 24px; letter-spacing: 0.04em; }
.ec-agents__contact { margin: 0; padding: 24px 0 0; border-top: 1px solid var(--rule); }
.ec-agents__contact div { display: flex; gap: 16px; align-items: baseline; padding: 8px 0; }
.ec-agents__contact dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); min-width: 70px; margin: 0; }
.ec-agents__contact dd { font-size: 15px; color: var(--ink); margin: 0; }
.ec-agents__contact a:hover { color: var(--accent); }

@media (min-width: 768px) {
  .ec-agents__grid { grid-template-columns: repeat(2, 1fr); }
  .ec-agents__card { grid-template-columns: 200px 1fr; align-items: start; }
  .ec-agents__photo { max-width: 100%; }
}

/* ---------- RESERVE — wrapped in container, follows site margins ---------- */
.ec-reserve-wrap { padding: var(--ec-section-pad-y) 0; }
.ec-reserve { display: grid; grid-template-columns: 1fr; border: 1px solid var(--rule); }
.ec-reserve__left { padding: clamp(32px, 4vw, 56px); background: var(--navy-ink); color: var(--white); }
.ec-reserve__display { color: var(--white); font-size: clamp(28px, 3.6vw, 44px); margin: 16px 0; max-width: 18ch; }
.ec-reserve__lede { color: rgba(255,255,255,0.82); font-size: 16px; line-height: 1.65; max-width: 48ch; }
.ec-reserve__rule { border: 0; border-top: 1px solid rgba(255,255,255,0.2); margin: 32px 0 24px; }
.ec-reserve__sublabel { margin-bottom: 14px; }
.ec-reserve__contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: rgba(255,255,255,0.85); font-size: 15px; }

.ec-reserve__right { padding: clamp(32px, 4vw, 56px); background: var(--white); }
.ec-reserve__right h3 { font-size: clamp(28px, 3.5vw, 36px); margin: 12px 0; }
.ec-reserve__form { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
.ec-field { display: flex; flex-direction: column; gap: 6px; }
.ec-field span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.ec-field input, .ec-field select, .ec-field textarea {
  padding: 12px 14px; border: 1px solid var(--rule);
  font-family: var(--ff-body); font-size: 15px; color: var(--ink); background: var(--white);
}
.ec-field input:focus, .ec-field select:focus, .ec-field textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px; border-color: var(--accent); }
.ec-reserve__submit { margin-top: 8px; }
.ec-reserve__caption { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; margin: 12px 0 0; }
.ec-reserve__success { padding: 32px 0; }
.ec-reserve__success .ec-display { font-size: 36px; margin: 12px 0; }

@media (min-width: 768px) { .ec-reserve__form { grid-template-columns: 1fr 1fr; } .ec-field--full { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .ec-reserve { grid-template-columns: 1fr 1fr; } }

/* ---------- WHATSAPP STICKY ---------- */
.ec-wa-sticky {
  position: fixed; bottom: 16px; right: 16px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: #25d366; color: var(--white);
  padding: 12px 18px; border-radius: 999px;
  font-family: var(--ff-body); font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4); transition: 200ms ease;
}
.ec-wa-sticky:hover { transform: translateY(-2px); }
.ec-wa-sticky span { display: none; }
@media (min-width: 768px) { .ec-wa-sticky span { display: inline; } }

/* ---------- ARCHIVE / DEVELOPMENTS INDEX ---------- */
.ec-archive__hero { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(32px, 5vw, 56px); }
.ec-archive__title { font-size: clamp(40px, 6vw, 80px); font-weight: 700; max-width: 20ch; margin: 16px 0 24px; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; }
.ec-archive__lede { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 56ch; }

.ec-archive__grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.ec-card { display: block; color: inherit; text-decoration: none; group: card; }
.ec-card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--rule-soft); margin-bottom: 24px; }
.ec-card__media img { width: 100%; height: 100%; object-fit: cover; transition: 600ms ease; }
.ec-card:hover .ec-card__media img { transform: scale(1.04); }
.ec-card__status {
  position: absolute; top: 16px; left: 16px;
  background: var(--white); color: var(--navy);
  padding: 8px 16px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  border-radius: 999px; border: 1px solid var(--rule);
}
.ec-card__title { font-family: var(--ff-display); font-weight: 700; font-size: clamp(24px, 2.6vw, 32px); color: var(--navy); margin: 12px 0 8px; line-height: 1.15; letter-spacing: -0.015em; text-transform: uppercase; }
.ec-card__tagline { font-size: 15px; color: var(--muted); margin: 0 0 16px; max-width: 38ch; }
.ec-card__cta { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy); }
.ec-card:hover .ec-card__cta { color: var(--accent); }

@media (min-width: 768px) { .ec-archive__grid { grid-template-columns: repeat(2, 1fr); gap: 64px 48px; } }
@media (min-width: 1280px) { .ec-archive__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- FOOTER ---------- */
.ec-footer { background: var(--navy-ink); color: rgba(255,255,255,0.85); padding: 80px 0 40px; }
.ec-footer__top { display: grid; grid-template-columns: 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.ec-footer__brand p { color: rgba(255,255,255,0.7); margin-top: 20px; max-width: 48ch; line-height: 1.65; }
.ec-footer__logo { display: block; height: 56px; width: auto; }
.ec-footer__col h5 { font-family: var(--ff-body); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin: 0 0 16px; font-weight: 500; }
.ec-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ec-footer__col a { color: rgba(255,255,255,0.85); }
.ec-footer__col a:hover { color: var(--accent); }
.ec-footer__legal { display: flex; flex-direction: column; gap: 8px; padding-top: 24px; font-size: 12px; color: rgba(255,255,255,0.5); }

@media (min-width: 768px) {
  .ec-footer__top { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .ec-footer__legal { flex-direction: row; justify-content: space-between; }
}

/* =====================================================================
   MOBILE OVERRIDES — desktop is locked (>=768px). Mobile gets a
   tighter, denser layout. Two-column where it makes sense, smaller
   type, less padding, no font-size highlights.
   ===================================================================== */
@media (max-width: 767px) {

  :root { --ec-section-pad-y: 56px; }

  .ec-section__head { margin-bottom: 24px; }
  .ec-section__head .ec-display { font-size: 26px; line-height: 1.15; max-width: none; }
  .ec-section__head .ec-body { font-size: 14px; }

  /* ---------- Hero — tighter ---------- */
  .ec-hero { min-height: 88vh; }
  .ec-hero__inner { padding: 96px var(--gutter) 32px; }
  .ec-hero__breadcrumb { font-size: 10px; gap: 4px; }
  .ec-hero__title { font-size: 40px; max-width: 12ch; }
  .ec-hero__tagline { font-size: 14px; margin: 0 0 24px; }
  .ec-hero__cta { gap: 8px; margin-bottom: 32px; }
  .ec-hero__cta .ec-btn { padding: 12px 18px; font-size: 11px; flex: 1; justify-content: center; }
  .ec-hero__stats { padding-top: 20px; gap: 16px 24px; grid-template-columns: 1fr 1fr; }
  .ec-hero__stats div { gap: 4px; padding: 0; }
  .ec-hero__stats div::before { display: none; }
  .ec-hero__stats dt { font-size: 9px; }
  .ec-hero__stats dd { font-size: 18px; }

  /* ---------- Gallery ---------- */
  .ec-gallery2 { padding: 24px 0; }
  .ec-gallery2__bar { padding-top: 12px; gap: 12px; }
  .ec-gallery2__counter { font-size: 14px; }
  .ec-gallery2__thumb { width: 80px; }

  /* ---------- Overview stats — 2-col tighter ---------- */
  .ec-overview__copy { font-size: 14px; margin-bottom: 28px; }
  .ec-stats { padding: 20px 0; gap: 20px; grid-template-columns: 1fr 1fr; }
  .ec-stats div { gap: 4px; }
  .ec-stats__num { font-size: 24px; }
  .ec-overview__meta dl { gap: 16px 32px; }
  .ec-overview__meta dt { font-size: 9px; }
  .ec-overview__meta dd { font-size: 15px; }

  /* ---------- Lifestyle — 2-col compact ---------- */
  .ec-lifestyle__grid { grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 0; }
  .ec-lifestyle__item {
    grid-template-columns: 28px 1fr;
    gap: 10px; padding: 12px 0; align-items: center;
  }
  .ec-lifestyle__icon { width: 28px; height: 28px; }
  .ec-lifestyle__icon svg { width: 20px; height: 20px; }
  .ec-lifestyle__num { display: none; }
  .ec-lifestyle__title { font-size: 13px; line-height: 1.25; }

  /* ---------- Compare slider ---------- */
  .ec-compare__slider { aspect-ratio: 4/3; }
  .ec-compare__knob { width: 36px; height: 36px; }
  .ec-compare__label { font-size: 9px; padding: 4px 8px; bottom: 8px; }
  .ec-compare__label--left { left: 8px; }
  .ec-compare__label--right { right: 8px; }

  /* ---------- Residences — mobile card layout ----------
     Each meta cell gets its own grid column on row 2 so beds/baths/size
     flow inline left-to-right instead of stacking in a shared grid area. */
  .ec-residences2__pills { gap: 6px; margin: 16px 0 20px; }
  .ec-residences2__pill { padding: 8px 14px; font-size: 12px; }
  .ec-residences2__pill-count { font-size: 10px; }
  .ec-residences2__row {
    display: grid;
    grid-template-columns: auto auto auto 1fr auto;
    grid-template-areas:
      "name  name  name  name  price"
      "beds  baths size  .     status"
      "view  view  view  view  view";
    column-gap: 6px;
    row-gap: 4px;
    padding: 18px 0;
    align-items: baseline;
  }
  .ec-residences2__row:hover {
    padding-left: 12px;
    padding-right: 12px;
  }
  .ec-residences2__row > div::before { display: none; }
  .ec-residences2__row .col-residence { grid-area: name; }
  .ec-residences2__row .col-price     { grid-area: price; justify-self: end; text-align: right; }
  .ec-residences2__row .col-beds  { grid-area: beds;  font-size: 12px; color: var(--muted); white-space: nowrap; }
  .ec-residences2__row .col-baths { grid-area: baths; font-size: 12px; color: var(--muted); white-space: nowrap; }
  .ec-residences2__row .col-size  { grid-area: size;  font-size: 12px; color: var(--muted); white-space: nowrap; }
  .ec-residences2__row .col-beds::after  { content: " bd"; color: var(--muted); margin-right: 4px; }
  .ec-residences2__row .col-baths::after { content: " ba"; color: var(--muted); margin-right: 4px; }
  .ec-residences2__row .col-beds::before,
  .ec-residences2__row .col-baths::before { content: "·"; color: var(--muted); margin-right: 4px; }
  /* No leading separator on the very first meta cell (beds). */
  .ec-residences2__row .col-beds::before { content: ""; margin-right: 0; }
  .ec-residences2__row .col-view      { grid-area: view; font-size: 12px; color: var(--muted); }
  .ec-residences2__row .col-status    { grid-area: status; justify-self: end; }
  .ec-residences2__row .col-arrow     { display: none; }
  .ec-residences2__name { font-size: 13px; }
  .ec-residences2__row .col-price [data-kes] { font-size: 16px; }

  /* ---------- Floor plans — scrollable tabs, tighter stats ---------- */
  .ec-floorplans__tabs {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .ec-floorplans__tabs::-webkit-scrollbar { display: none; }
  .ec-floorplans__tab { white-space: nowrap; padding: 10px 12px; font-size: 12px; }
  .ec-floorplans__panel { gap: 20px; }
  .ec-floorplans__drawing { aspect-ratio: 4/3; padding: 12px; }
  .ec-floorplans__placeholder { font-size: 11px; }
  .ec-floorplans__size { font-size: 26px; margin-top: 8px; }
  .ec-floorplans__stats { grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 0; margin: 16px 0; }
  .ec-floorplans__stats dt { font-size: 9px; margin-bottom: 4px; }
  .ec-floorplans__stats dd { font-size: 22px; }
  .ec-floorplans__cta .ec-btn { flex: 1; justify-content: center; padding: 12px 14px; font-size: 11px; }

  /* ---------- Investment — tighter chart, 2x2 stats ---------- */
  .ec-invest__panel { padding: 20px; }
  .ec-invest__tags {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 12px; gap: 6px;
  }
  .ec-invest__tags::-webkit-scrollbar { display: none; }
  .ec-invest__tag { white-space: nowrap; padding: 8px 12px; font-size: 11px; }
  .ec-invest__body { gap: 24px; }
  .ec-invest__chart svg { aspect-ratio: 4/3; }
  .ec-invest__stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ec-invest__stats > div { padding: 16px; gap: 8px; }
  .ec-invest__num { font-size: 20px; }
  .ec-invest__sub { font-size: 11px; }
  .ec-invest__sources { font-size: 10px; }
  .ec-invest__display { font-size: 24px; }

  /* ---------- Payment — keep stacked, tighter cards ---------- */
  .ec-payment__step { padding: 20px; }
  .ec-payment__pct { font-size: 28px; }
  .ec-payment__step h4 { font-size: 16px; }
  .ec-payment__step p { font-size: 13px; }

  /* ---------- Location — map smaller, POI list 2-col ---------- */
  .ec-location__map { height: 320px; min-height: 320px; }
  .ec-location__list { grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .ec-location__item {
    grid-template-columns: 20px 1fr;
    grid-template-areas: "num name" "num dist";
    gap: 2px 8px;
    padding: 10px 0;
  }
  .ec-location__item:hover { padding-left: 0; padding-right: 0; }
  .ec-location__num  { grid-area: num; font-size: 9px; }
  .ec-location__name { grid-area: name; font-size: 13px; line-height: 1.2; }
  .ec-location__dist { grid-area: dist; font-size: 11px; }

  /* ---------- Agents ---------- */
  .ec-agents__card { padding: 20px; }
  .ec-agents__photo { max-width: 120px; }
  .ec-agents__card h3 { font-size: 22px; }

  /* ---------- Reserve ---------- */
  .ec-reserve__left, .ec-reserve__right { padding: 28px 20px; }
  .ec-reserve__display { font-size: 24px; max-width: 100%; }
  .ec-reserve__lede { font-size: 14px; }

  /* ---------- WhatsApp sticky ---------- */
  .ec-wa-sticky { padding: 10px; }

  /* ---------- Archive cards ---------- */
  .ec-archive__title { font-size: 36px; }
  .ec-archive__lede { font-size: 14px; }
}

/* =====================================================================
   FLUID + CONTAINER-AWARE LAYER (v0.4)
   Layered on top of the breakpoint stack above. Goals:
   - Smooth transitions between phone → tablet → desktop (no hard jumps)
   - Component-level responsiveness via container queries
   - Touch-grade tap targets on coarse pointers
   - Coverage for 480–640px (tablet portrait) and 1440px+ (wide desktop)
   ===================================================================== */

:root {
  /* Fluid gutter: 16px at 320 viewport → 32px at 1440 */
  --gutter: clamp(16px, 1vw + 12px, 32px);

  /* Fluid type ramp — base 16, scaled to viewport */
  --fs-xs:   clamp(0.6875rem, 0.65rem + 0.18vw, 0.8125rem);  /* 11→13 */
  --fs-sm:   clamp(0.8125rem, 0.78rem + 0.20vw, 0.9375rem);  /* 13→15 */
  --fs-md:   clamp(0.9375rem, 0.88rem + 0.30vw, 1.0625rem);  /* 15→17 */
  --fs-lg:   clamp(1.0625rem, 0.95rem + 0.55vw, 1.375rem);   /* 17→22 */
  --fs-xl:   clamp(1.25rem,  1.05rem + 1.0vw,  1.875rem);    /* 20→30 */
  --fs-2xl:  clamp(1.625rem, 1.20rem + 2.0vw,  2.75rem);     /* 26→44 */
  --fs-3xl:  clamp(2.0rem,   1.40rem + 3.0vw,  4.0rem);      /* 32→64 */
  --fs-hero: clamp(2.25rem,  1.4rem + 4.5vw,   5.0rem);      /* 36→80 */

  /* Fluid section rhythm */
  --ec-section-pad-y: clamp(48px, 6vw + 8px, 120px);
}

/* ---------- TAP TARGETS — coarse pointer only ---------- */
@media (pointer: coarse) {
  .ec-btn,
  .ec-residences2__pill,
  .ec-floorplans__tab,
  .ec-invest__tag,
  .ec-residences2__pager-btn,
  .ec-residences2__pager-page,
  .ec-currency button,
  .ec-nav__burger,
  .ec-gallery2__nav,
  .ec-gallery2__close {
    min-height: 44px;
    min-width: 44px;
  }
  .ec-field input,
  .ec-field select,
  .ec-field textarea {
    min-height: 48px;
    font-size: 16px; /* prevents iOS zoom-on-focus */
  }
}

/* ---------- TABLET PORTRAIT BAND (480–767px) ----------
   Smooths the jump from phone-tight to tablet-loose. Mostly bumps gutters,
   relaxes 2-col grids that look cramped at 480, keeps the tighter type. */
@media (min-width: 480px) and (max-width: 767px) {
  .ec-hero__title  { font-size: clamp(40px, 8.5vw, 56px); max-width: 14ch; }
  .ec-hero__tagline{ font-size: 15px; }
  .ec-hero__stats  { gap: 20px 28px; }
  .ec-hero__stats dd { font-size: 22px; }

  .ec-residences2__row {
    grid-template-columns: 1.4fr auto auto;
    grid-template-areas:
      "name      meta   price"
      "name      view   status";
    column-gap: 16px;
  }
  .ec-residences2__row .col-residence { grid-area: name; }
  .ec-residences2__row .col-price     { grid-area: price; }
  .ec-residences2__row .col-status    { grid-area: status; }

  .ec-archive__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .ec-agents__grid  { grid-template-columns: 1fr 1fr; gap: 20px; }

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

/* ---------- WIDE DESKTOP (1440px+) ---------- */
@media (min-width: 1440px) {
  :root { --container: 1440px; }
  .ec-hero__title { font-size: clamp(56px, 5.5vw, 96px); }
  .ec-archive__grid { grid-template-columns: repeat(3, 1fr); gap: 72px 56px; }
}

@media (min-width: 1720px) {
  :root { --container: 1560px; }
}

/* ---------- CONTAINER QUERIES — component-level responsiveness ---------- */

/* Residences table reflows on its OWN width, not the viewport.
   Means the table stays usable inside narrower wrappers (modals, sidebars). */
.ec-residences2__table { container-type: inline-size; container-name: residences; }
@container residences (min-width: 720px) {
  .ec-residences2__head,
  .ec-residences2__row {
    display: grid;
    grid-template-columns: minmax(160px, 2fr) 60px 60px minmax(120px, 1.4fr) 80px minmax(110px, 1.2fr) 110px 24px;
    gap: 16px;
    align-items: center;
  }
  .ec-residences2__head { display: grid; }
  .ec-residences2__row > div::before { content: none; }
}

/* Lifestyle grid: 1 → 2 → 3 cols based on its own width */
.ec-lifestyle { container-type: inline-size; container-name: lifestyle; }
@container lifestyle (min-width: 560px) {
  .ec-lifestyle__grid { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
}
@container lifestyle (min-width: 960px) {
  .ec-lifestyle__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Archive card grid — same idea */
.ec-archive { container-type: inline-size; container-name: archive; }
@container archive (min-width: 600px)  { .ec-archive__grid { grid-template-columns: repeat(2, 1fr); } }
@container archive (min-width: 1100px) { .ec-archive__grid { grid-template-columns: repeat(3, 1fr); } }

/* Investment stats reflow inside the panel */
.ec-invest__panel { container-type: inline-size; container-name: invest; }
@container invest (min-width: 520px) { .ec-invest__stats { grid-template-columns: repeat(2, 1fr); } }
@container invest (min-width: 880px) { .ec-invest__stats { grid-template-columns: repeat(4, 1fr); } }

/* Reserve form responds to its own container, not the viewport */
.ec-reserve__right { container-type: inline-size; container-name: reserve; }
@container reserve (min-width: 480px) {
  .ec-reserve__form { grid-template-columns: 1fr 1fr; }
  .ec-field--full   { grid-column: 1 / -1; }
}

/* ---------- IMAGE PERFORMANCE — let the browser size sensibly ---------- */
.ec-card__media img,
.ec-gallery2__hero-img img,
.ec-hero__img {
  content-visibility: auto;
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- HORIZONTAL OVERFLOW GUARD ---------- */
html, body { overflow-x: hidden; }
img, video, svg { max-width: 100%; }

/* ---------- READ-MORE PATTERN (overview copy) ----------
   First paragraph visible, rest collapsed behind a fade. Click to expand. */
.ec-readmore { position: relative; }
.ec-readmore__inner {
  --ec-readmore-collapsed: 6.5em;
  max-height: var(--ec-readmore-collapsed);
  overflow: hidden;
  transition: max-height 320ms cubic-bezier(0.22, 1, 0.36, 1);
  /* Trim the second paragraph onward to the collapsed height. */
  position: relative;
}
.ec-readmore__inner > p:first-child { margin-top: 0; }
.ec-readmore.is-open .ec-readmore__inner {
  max-height: 4000px; /* arbitrary large; transitions out smoothly */
}
.ec-readmore__inner::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3.2em;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--white) 90%);
  pointer-events: none;
  transition: opacity 220ms ease;
}
.ec-readmore.is-open .ec-readmore__inner::after { opacity: 0; }
.ec-readmore__btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--ff-body); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy); cursor: pointer;
  transition: 150ms ease;
}
.ec-readmore__btn:hover { border-color: var(--navy); background: var(--paper); }
.ec-readmore__chev { transition: transform 220ms ease; }
.ec-readmore.is-open .ec-readmore__chev { transform: rotate(180deg); }

/* On the overview specifically, the parent has its own bottom margin already. */
.ec-overview__copy.ec-readmore { margin-bottom: clamp(40px, 5vw, 64px); }

/* ---------- FLOOR-PLAN TABS — mobile fix for label/badge collision ----------
   On narrow screens the count badge ("/ 12") was overlapping the type label.
   Hide the count below 480px (still visible in the floor-plan stats panel),
   and ensure tabs scroll horizontally without squishing. */
.ec-floorplans__tabs {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ec-floorplans__tab {
  flex: 0 0 auto; /* never shrink — let the row scroll instead */
}
@media (max-width: 480px) {
  .ec-floorplans__count { display: none; }
  .ec-floorplans__tab {
    padding: 9px 11px;
    font-size: 11px;
    letter-spacing: 0.04em;
  }
  /* Container: scroll horizontally without overflowing the viewport. */
  .ec-floorplans__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Bleed gutter so a scroll-fade peeks at the right edge. */
    scroll-padding-right: 12px;
  }
}

