/* ============================================================
   Ryan Brown — RE/MAX Premier Properties | Beechmont Equities
   Design tokens + component styles
   ============================================================ */

:root {
  /* ---- Fluid type scale ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.25rem, 1rem + 3.6vw, 4.25rem);
  --text-hero: clamp(2.75rem, 0.9rem + 5.6vw, 6.25rem);

  /* ---- 4px spacing system ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---- Radius ---- */
  --radius-sm: 0.3rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.85rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ---- Motion ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-golden: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Content widths ---- */
  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'DM Serif Display', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  /* ---- Fixed dark navy (used for always-dark focal sections) ---- */
  --color-navy-deep: #0b1526;
  --color-navy-mid: #10203a;
}

/* ================= LIGHT MODE (default) ================= */
:root,
[data-theme='light'] {
  --color-bg: #f8f6f1;
  --color-surface: #ffffff;
  --color-surface-2: #fbfaf6;
  --color-surface-offset: #efeadf;
  --color-surface-offset-2: #e6ded0;
  --color-surface-dynamic: #ddd3c0;
  --color-divider: #e3ddd0;
  --color-border: #d8cfbc;

  --color-text: #15213a;
  --color-text-muted: #5c6478;
  --color-text-faint: #99a0ae;
  --color-text-inverse: #f8f6f1;

  /* RE/MAX Red — primary accent */
  --color-primary: #dc1c2e;
  --color-primary-hover: #b8121f;
  --color-primary-active: #8f0d18;
  --color-primary-highlight: #f6d7d9;

  /* Navy — secondary structural accent */
  --color-navy: #0f1f3d;
  --color-navy-hover: #16305c;
  --color-navy-highlight: #d9deea;

  --color-success: #2f6b45;
  --color-success-highlight: #d7e6da;
  --color-warning: #9a5a1f;
  --color-warning-highlight: #ecdccb;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 260 / 0.07);
  --shadow-md: 0 6px 18px oklch(0.2 0.02 260 / 0.10);
  --shadow-lg: 0 18px 44px oklch(0.2 0.02 260 / 0.16);
}

/* ================= DARK MODE ================= */
[data-theme='dark'] {
  --color-bg: #0b1220;
  --color-surface: #101a2e;
  --color-surface-2: #131f36;
  --color-surface-offset: #17233c;
  --color-surface-offset-2: #1c2a46;
  --color-surface-dynamic: #23335494;
  --color-divider: #223252;
  --color-border: #2a3a5c;

  --color-text: #e9eaf0;
  --color-text-muted: #9ba5bc;
  --color-text-faint: #67718c;
  --color-text-inverse: #0b1220;

  --color-primary: #ef4a58;
  --color-primary-hover: #f2606c;
  --color-primary-active: #c22432;
  --color-primary-highlight: #3a2128;

  --color-navy: #c9d3ea;
  --color-navy-hover: #e4eaf7;
  --color-navy-highlight: #202d4a;

  --color-success: #7fbb8f;
  --color-success-highlight: #1c332a;
  --color-warning: #d99a56;
  --color-warning-highlight: #3a2c1c;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 8px 22px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0b1220;
    --color-surface: #101a2e;
    --color-surface-2: #131f36;
    --color-surface-offset: #17233c;
    --color-surface-offset-2: #1c2a46;
    --color-divider: #223252;
    --color-border: #2a3a5c;
    --color-text: #e9eaf0;
    --color-text-muted: #9ba5bc;
    --color-text-faint: #67718c;
    --color-text-inverse: #0b1220;
    --color-primary: #ef4a58;
    --color-primary-hover: #f2606c;
    --color-primary-active: #c22432;
    --color-primary-highlight: #3a2128;
    --color-navy: #c9d3ea;
    --color-navy-hover: #e4eaf7;
    --color-navy-highlight: #202d4a;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 8px 22px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.5);
  }
}

/* ================= BASE ELEMENTS ================= */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 1.4rem;
  height: 1px;
  background: var(--color-primary);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

a {
  color: inherit;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  min-height: 44px;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  /* Used only on fixed-dark surfaces (hero, dark CTA cards), so this stays
     a light color regardless of the site's light/dark theme toggle. */
  border: 1px solid oklch(from #f8f6f1 l c h / 0.4);
  color: #f8f6f1;
}
.btn--outline:hover {
  background: oklch(from #f8f6f1 l c h / 0.1);
}
.btn--ghost {
  border: 1px solid oklch(from var(--color-text) l c h / 0.16);
  color: var(--color-text);
}
.btn--ghost:hover {
  background: var(--color-surface-offset);
}

.hero-text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: oklch(from #f8f6f1 l c h / 0.75);
}
.hero-text-link:hover {
  color: #f8f6f1;
}

/* ================= HEADER ================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: transform 0.3s var(--ease-golden), box-shadow 0.3s var(--ease-golden);
}
.header--hidden { transform: translateY(-100%); }
.header--scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  gap: var(--space-6);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  flex-shrink: 0;
}
.logo-img { height: 2.6rem; width: auto; flex-shrink: 0; display: block; }
.logo-img--dark { display: none; }
[data-theme='dark'] .logo-img--light { display: none; }
[data-theme='dark'] .logo-img--dark { display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links {
  display: flex;
  gap: 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--color-text-muted);
  padding-block: var(--space-1);
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
@media (max-width: 1300px) {
  .nav > .btn--ghost { display: none; }
}
.nav-links a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}

/* Nav dropdown (Neighborhoods) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding-block: var(--space-1);
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  background: none;
  cursor: pointer;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--color-text);
  border-bottom-color: var(--color-primary);
}
.nav-caret { transition: transform 0.2s var(--ease-golden); flex-shrink: 0; }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.85rem);
  left: 0;
  min-width: 30rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
  display: none;
  flex-direction: row;
  gap: var(--space-5);
  z-index: 40;
  list-style: none;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 13rem;
}
.nav-dropdown-heading {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.75;
}
.nav-dropdown-sublist { list-style: none; }
.nav-dropdown-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  border-bottom: none !important;
}
.nav-dropdown-menu a:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
@media (max-width: 900px) {
  .nav-dropdown-menu { flex-direction: column; min-width: 15.5rem; gap: 0; }
}
.nav-dropdown-menu--compact { min-width: 13rem; flex-direction: column; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}
.nav-toggle:hover { background: var(--color-surface-offset); }

/* Nav switches to the mobile menu earlier than the general content
   breakpoint so all top-level links (including the Neighborhoods
   dropdown) never overflow the header. */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav > .btn--primary,
  .nav > .btn--ghost { display: none; }
  .nav-toggle { display: flex; }
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: #f3f1ea;
  overflow: hidden;
  background: var(--color-navy-deep);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, oklch(0.12 0.03 260 / 0.55) 0%, oklch(0.1 0.03 260 / 0.72) 55%, oklch(0.08 0.02 260 / 0.92) 100%),
    linear-gradient(90deg, oklch(0.08 0.02 260 / 0.88) 0%, oklch(0.1 0.02 260 / 0.35) 62%, oklch(0.08 0.02 260 / 0.2) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  max-width: 760px;
}
.hero .eyebrow { color: #ff8a94; }
.hero .eyebrow::before { background: #ff8a94; }
.hero h1 {
  font-size: clamp(2rem, 1.1rem + 3.4vw, 4.25rem);
  margin-block: var(--space-5) var(--space-6);
  color: #fdfbf6;
  max-width: 22ch;
}
.hero p.lede {
  font-size: var(--text-lg);
  color: #d6d9e4;
  max-width: 46ch;
  margin-bottom: var(--space-8);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid oklch(1 0 0 / 0.14);
}
.hero-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-badge .value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: #fdfbf6;
}
.hero-badge .label {
  font-size: var(--text-xs);
  color: #a7adc0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ================= MARKETS BAND ================= */
.markets {
  padding-block: clamp(var(--space-16), 6vw, var(--space-24));
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
}
.markets-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}
.markets-copy h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.markets-copy p { color: var(--color-text-muted); margin-bottom: var(--space-6); }
.market-list { display: flex; flex-direction: column; gap: var(--space-5); }
.market-item { display: flex; gap: var(--space-4); align-items: flex-start; }
.market-item .dot {
  width: 0.5rem; height: 0.5rem; border-radius: var(--radius-full);
  background: var(--color-primary); margin-top: 0.5rem; flex-shrink: 0;
}
.market-item h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-base); margin-bottom: 2px; }
.market-item p { font-size: var(--text-sm); color: var(--color-text-muted); }
.markets-images {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-4);
}
.market-photo {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4;
}
.market-photo:last-child { aspect-ratio: 3/4; margin-top: var(--space-10); }
.market-photo img { width: 100%; height: 100%; object-fit: cover; }
.market-photo-tag {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  background: oklch(0.1 0.02 260 / 0.72);
  backdrop-filter: blur(6px);
  color: #fdfbf6;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

/* ================= RESOURCES ================= */
.resources { background: var(--color-surface-offset); }
.resources-head { max-width: 620px; margin-bottom: var(--space-12); }
.resources-head h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.resources-head p { color: var(--color-text-muted); }

.resource-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.resource-row--three { grid-template-columns: repeat(3, 1fr); }
.resource-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.resource-row--three .resource-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.resource-card .num {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-size: var(--text-lg);
  display: block;
  margin-bottom: var(--space-3);
}
.resource-card h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-base); margin-bottom: var(--space-2); }
.resource-card p { color: var(--color-text-muted); font-size: var(--text-sm); flex-grow: 1; }
.resource-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  width: fit-content;
  transition: color var(--transition-interactive);
}
.resource-card-link:hover { color: var(--color-primary-hover); }

/* ================= VIDEOS ================= */
.videos { background: var(--color-surface); }
.videos-head { max-width: 640px; margin-bottom: var(--space-12); }
.videos-head h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.videos-head p { color: var(--color-text-muted); }
.videos-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-8);
  align-items: stretch;
}
.video-hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  background: linear-gradient(150deg, var(--color-navy-deep) 0%, var(--color-navy-mid) 100%);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 4vw, var(--space-10));
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 260px;
  transition: transform var(--transition-interactive);
}
.video-hero-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 140%;
  background: radial-gradient(circle, oklch(0.55 0.2 20 / 0.35) 0%, transparent 70%);
  pointer-events: none;
}
.video-hero-card:hover { transform: translateY(-2px); }
.video-hero-tag {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ff8a94;
}
.video-hero-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.05;
  color: #fdfbf6;
}
.video-hero-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  transition: background var(--transition-interactive);
}
.video-hero-card:hover .video-hero-cta { background: var(--color-primary-hover); }
.video-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  align-content: start;
}
.video-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
  min-width: 0;
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.video-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-navy-deep);
  cursor: pointer;
}
.video-card-thumb:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.video-card-thumb.is-playing { cursor: default; }
.video-card-thumb.is-playing::after,
.video-card-thumb.is-playing .video-card-play { display: none; }
.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform var(--transition-interactive);
}
.video-card:hover .video-card-thumb img { transform: scale(1.04); }
.video-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, oklch(0.18 0.03 260 / 0.55) 100%);
  pointer-events: none;
}
.video-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px oklch(0 0 0 / 0.35);
  transition: transform var(--transition-interactive), background var(--transition-interactive);
}
.video-card:hover .video-card-play { transform: translate(-50%, -50%) scale(1.08); background: var(--color-primary-hover); }
.video-card-info { padding: var(--space-3) var(--space-4) var(--space-4); }
.video-link-title { display: block; font-weight: 700; font-size: var(--text-sm); color: var(--color-text); margin-bottom: 0.15rem; }
.video-link-sub { display: inline-block; font-size: var(--text-xs); color: var(--color-text-muted); text-decoration: none; }
.video-link-sub:hover { color: var(--color-primary); text-decoration: underline; }

/* ================= ABOUT ================= */
.about { background: var(--color-navy-deep); color: #ecefF6; }
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-12);
  align-items: start;
}
.about .eyebrow { color: #ff8a94; }
.about .eyebrow::before { background: #ff8a94; }
.about h2 { font-size: var(--text-xl); color: #fdfbf6; margin-bottom: var(--space-6); }
.about-quote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: #fdfbf6;
  line-height: 1.4;
  border-left: none;
  padding-top: var(--space-6);
  border-top: 1px solid oklch(1 0 0 / 0.16);
}
.about-copy p { color: #c3c8d8; margin-bottom: var(--space-5); font-size: var(--text-base); }
.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-8);
}
.about-fact {
  border-top: 1px solid oklch(1 0 0 / 0.14);
  padding-top: var(--space-4);
}
.about-fact .value { font-family: var(--font-display); font-size: var(--text-lg); color: #fdfbf6; display: block; }
.about-fact .label { font-size: var(--text-xs); color: #8f97ac; text-transform: uppercase; letter-spacing: 0.06em; }
.about-fact--link { display: block; text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.about-fact--link .value { color: var(--color-primary); }
.about-fact--link:hover { border-color: var(--color-primary); transform: translateY(-2px); }

/* ================= TESTIMONIALS ================= */
.testimonials { background: var(--color-surface-2); }
.testimonials-head { max-width: 640px; margin-bottom: var(--space-12); }
.testimonials-head p { color: var(--color-text-muted); }
.testimonials-head a { color: var(--color-primary); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.testimonial-stars { color: var(--color-primary); font-size: var(--text-sm); letter-spacing: 0.1em; }
.testimonial-card blockquote {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text);
  flex-grow: 1;
}
.testimonial-card figcaption { display: flex; flex-direction: column; gap: var(--space-1); }
.testimonial-name { font-family: var(--font-display); font-size: var(--text-base); color: var(--color-text); }
.testimonial-meta { font-size: var(--text-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.testimonials-cta {
  display: inline-block;
  margin-top: var(--space-10);
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 2px;
  transition: color var(--transition-interactive);
}
.testimonials-cta:hover { color: var(--color-primary-hover); }

/* ================= FAQ ================= */
.faq { background: var(--color-surface-offset); }
.faq-head { max-width: 640px; margin-bottom: var(--space-12); }
.faq-head p { color: var(--color-text-muted); }
.faq-list { max-width: var(--content-default); }
.faq-item {
  border-bottom: 1px solid var(--color-divider);
}
.faq-item:first-of-type { border-top: 1px solid var(--color-divider); }
.faq-group-label {
  padding-top: var(--space-10);
  padding-bottom: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.faq-group-label:first-child { padding-top: 0; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: transform var(--transition-interactive), background var(--transition-interactive);
}
.faq-item[open] summary .faq-icon { transform: rotate(45deg); background: var(--color-surface); }
.faq-item p {
  color: var(--color-text-muted);
  padding-bottom: var(--space-6);
  max-width: 68ch;
}

/* ================= PAGE HERO (blog + subpages) ================= */
.page-hero {
  background: var(--color-navy-deep);
  color: #ecefF6;
  padding-block: calc(var(--space-24) + 3rem) var(--space-16);
}
.page-hero .eyebrow { color: #ff8a94; }
.page-hero .eyebrow::before { background: #ff8a94; }
.page-hero h1 { font-size: var(--text-2xl); color: #fdfbf6; margin-top: var(--space-4); max-width: 20ch; }
.page-hero p { color: #c3c8d8; margin-top: var(--space-5); max-width: 62ch; font-size: var(--text-base); }
.page-hero .back-link { display: flex; margin-bottom: var(--space-6); }
.page-hero .eyebrow { display: block; margin-top: var(--space-2); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: inherit;
  opacity: 0.85;
}
.back-link:hover { opacity: 1; }

/* ================= BLOG LISTING ================= */
.blog-list { background: var(--color-bg); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
  color: var(--color-text);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-tag {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.blog-card-body { padding: var(--space-6); display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-date { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-3); }
.blog-card h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); margin-bottom: var(--space-3); }
.blog-card p { color: var(--color-text-muted); font-size: var(--text-sm); flex-grow: 1; }
.blog-card-link { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-4); font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); }
.blog-card:hover .blog-card-link { color: var(--color-primary-hover); }

.blog-cadence-note {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 60ch;
}

/* ================= BLOG POST ================= */
.post { background: var(--color-bg); }
.post-container { max-width: var(--content-narrow); margin-inline: auto; padding-inline: var(--space-5); }
.post-meta { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-5); }
.post-meta .tag { color: var(--color-primary); font-weight: 700; }
.post h1 { font-size: var(--text-xl); margin-bottom: var(--space-6); }
.post-image { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-8); box-shadow: var(--shadow-sm); }
.post-image img { width: 100%; display: block; }
.post-body h2 { font-size: var(--text-lg); margin-top: var(--space-10); margin-bottom: var(--space-4); }
.post-body p { color: var(--color-text-muted); margin-bottom: var(--space-5); font-size: var(--text-base); max-width: 68ch; }
.post-body ul { margin: var(--space-5) 0 var(--space-5) var(--space-5); color: var(--color-text-muted); }
.post-body li { margin-bottom: var(--space-2); max-width: 66ch; }
.post-callout {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  border-left: 3px solid var(--color-primary);
}

/* Market update graphics — tall portrait format, needs different crop/sizing than photo thumbnails */
.market-card-thumb img { object-position: top; }
.post-image--graphic { max-width: 420px; margin-inline: auto; }
.post-image--graphic img { width: 100%; }
.post-callout p { color: var(--color-text); margin-bottom: 0; font-size: var(--text-sm); }
.post-callout a { color: var(--color-primary); font-weight: 600; }
.post-disclaimer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-style: italic;
  line-height: 1.6;
}
.post-cta {
  margin-top: var(--space-12);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--color-navy-deep);
  color: #fdfbf6;
  text-align: center;
}
.post-cta h3 { font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-3); color: #fdfbf6; }
.post-cta p { color: #c3c8d8; margin-bottom: var(--space-6); }
.post-related {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.post-related h4 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin-bottom: var(--space-4); }
.post-related a { display: block; font-family: var(--font-display); font-size: var(--text-base); color: var(--color-text); padding-block: var(--space-3); border-bottom: 1px solid var(--color-divider); }
.post-related a:hover { color: var(--color-primary); }

/* ================= CLOSING COST CTA BAND ================= */
.cta-band { background: var(--color-navy-deep); color: #fdfbf6; padding-block: var(--space-16); }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-10); }
.cta-band .eyebrow { color: #ff8a94; }
.cta-band-copy { max-width: 60ch; }
.cta-band-copy h2 { font-family: var(--font-display); font-size: var(--text-xl); color: #fdfbf6; margin-block: var(--space-3) var(--space-4); }
.cta-band-copy p { color: #c3c8d8; margin: 0; }
.cta-band-link { display: inline-block; margin-top: var(--space-4); color: #ff8a94; font-weight: 500; border-bottom: 1px solid transparent; }
.cta-band-link:hover { border-bottom-color: #ff8a94; }
.cta-band-action { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); flex-shrink: 0; }
.cta-band-credit { font-size: var(--text-xs); color: #9aa3b8; }

/* ================= BALLPARK CLOSING COST CALCULATOR ================= */
.calc-section { background: var(--color-bg); padding-block: var(--space-16); }
.calc-head { max-width: 70ch; margin-bottom: var(--space-8); }
.calc-head h2 { font-family: var(--font-display); font-size: var(--text-xl); margin-block: var(--space-3) var(--space-4); }
.calc-head p { color: var(--color-text-muted); margin: 0; }
.calc-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-8);
}
.calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }
.calc-input-wrap { position: relative; display: flex; align-items: center; }
.calc-prefix {
  position: absolute;
  left: var(--space-4);
  color: var(--color-text-muted);
  font-weight: 600;
  pointer-events: none;
}
.field .calc-input-wrap input {
  padding-left: calc(var(--space-4) + 0.7rem);
  width: 100%;
}
.calc-toggle { display: flex; gap: var(--space-2); }
.calc-toggle-btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.calc-toggle-btn:hover { border-color: var(--color-primary); }
.calc-toggle-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.calc-results {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.calc-result-total { font-size: var(--text-lg); font-weight: 700; font-family: var(--font-display); color: var(--color-text); margin-bottom: var(--space-2); }
.calc-result-total span { color: var(--color-primary); }
.calc-result-sub { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.calc-breakdown { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); }
.calc-breakdown-row { display: flex; justify-content: space-between; gap: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); padding-block: var(--space-1); }
.calc-breakdown-row strong { color: var(--color-text); font-weight: 600; }
.calc-note { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-4); }
.calc-exact {
  background: var(--color-navy-deep);
  color: #fdfbf6;
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.calc-exact-copy { max-width: 55ch; }
.calc-exact-copy .eyebrow { color: #ff8a94; margin-bottom: var(--space-2); }
.calc-exact-copy .eyebrow::before { background: #ff8a94; }
.calc-exact-copy h3 { font-family: var(--font-display); font-size: var(--text-lg); color: #fdfbf6; margin-bottom: var(--space-3); }
.calc-exact-copy p { color: #c3c8d8; margin: 0; }
@media (max-width: 720px) {
  .calc-inputs { grid-template-columns: 1fr; }
  .calc-exact { flex-direction: column; align-items: flex-start; }
}

/* ================= HOME VALUE QUICK ESTIMATE ================= */
.hv-quick-form { display: flex; gap: var(--space-4); align-items: flex-end; flex-wrap: wrap; }
.hv-quick-form .field { flex: 1 1 320px; margin-bottom: 0; }
.hv-quick-submit { flex-shrink: 0; min-height: 44px; white-space: nowrap; }
.hv-result-error { color: var(--color-primary); }
.hv-result-error a { color: var(--color-primary); font-weight: 600; text-decoration: underline; }
@media (max-width: 640px) {
  .hv-quick-form { flex-direction: column; align-items: stretch; }
  .hv-quick-form .field { flex-basis: auto; }
  .hv-quick-submit { width: 100%; }
}

/* ================= CONTACT ================= */
.contact { background: var(--color-bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-12);
}
.contact-grid > * { min-width: 0; }
.contact-copy h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.contact-copy p { color: var(--color-text-muted); margin-bottom: var(--space-8); }
.contact-detail {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-5);
  min-width: 0;
}
.contact-detail > div { min-width: 0; }
.contact-detail svg { color: var(--color-primary); flex-shrink: 0; margin-top: 2px; width: 1.15rem; height: 1.15rem; }
.contact-detail .label { font-size: var(--text-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-detail .value { font-size: var(--text-base); font-weight: 500; overflow-wrap: anywhere; word-break: break-word; }
.contact-detail a:hover { color: var(--color-primary); }

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.field input,
.field select,
.field textarea {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.75rem var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  min-height: 44px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.form-note { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-3); }
.field-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.field-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  min-height: 0;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.field-consent label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
.field-consent label a { color: var(--color-primary); text-decoration: underline; }
.form-status {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { color: var(--color-success); }

/* ================= FOOTER ================= */
.footer { background: var(--color-navy-deep); color: #b7bccb; padding-block: var(--space-16) var(--space-10); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid oklch(1 0 0 / 0.12);
  margin-bottom: var(--space-6);
}
.footer-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); color: #fdfbf6; }
.footer-logo-img { height: 2.75rem; width: auto; display: block; }
.footer p { color: #8f97ac; font-size: var(--text-sm); max-width: 34ch; }
.footer h4 { color: #fdfbf6; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-4); font-weight: 600; }
.footer-links { display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--text-sm); }
.footer-links a:hover { color: #fdfbf6; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: #6d7690;
}

/* ================= SCROLL REVEAL ================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-golden), transform 0.7s var(--ease-golden);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 960px) {
  .cta-band-inner { flex-direction: column; align-items: flex-start; gap: var(--space-6); }
  .cta-band-action { align-items: flex-start; width: 100%; }

  .markets-grid,
  .listing-grid,
  .about-grid,
  .contact-grid,
  .footer-grid,
  .videos-grid {
    grid-template-columns: 1fr;
  }
  .markets-grid > *,
  .listing-grid > *,
  .about-grid > *,
  .contact-grid > *,
  .footer-grid > *,
  .videos-grid > * {
    min-width: 0;
  }
  .listing-image-wrap { position: static; }
  .resource-row,
  .resource-row--three,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav > .btn--primary,
  .nav > .btn--ghost { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .hero { min-height: 100vh; }
  .hero-content { padding-block: var(--space-24) var(--space-16); }
  .hero-badges { flex-wrap: wrap; gap: var(--space-5); }
  .listing-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  section { padding-block: var(--space-16); }
  .about { padding-block: var(--space-16); }
  .video-links { gap: var(--space-3); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .cta-band-action .btn { width: 100%; text-align: center; }
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-golden);
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: flex-end; margin-bottom: var(--space-10); }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
}
.mobile-nav .btn { margin-top: var(--space-8); }
.mobile-nav a.btn--primary { color: #fff; border-bottom: none; }

.mobile-nav-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
  background: none;
  text-align: left;
  cursor: pointer;
}
.mobile-nav-accordion-toggle .nav-caret { transition: transform 0.2s var(--ease-golden); flex-shrink: 0; }
.mobile-nav-accordion-toggle[aria-expanded='true'] .nav-caret { transform: rotate(180deg); }
.mobile-nav-accordion {
  display: none;
  flex-direction: column;
  padding-left: var(--space-4);
}
.mobile-nav-accordion.open { display: flex; }
.mobile-nav-accordion a {
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text-muted);
}
.mobile-nav-accordion-heading {
  display: block;
  padding-top: var(--space-4);
  padding-bottom: var(--space-1);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.75;
}
.mobile-nav-accordion-heading:first-child { padding-top: 0; }

/* ================= IDX PROPERTY SEARCH ================= */
.idx-search-section { background: var(--color-bg); padding-block: var(--space-12) var(--space-16); }

.idx-neighborhood-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.idx-neighborhood-banner a { color: var(--color-primary); font-weight: 600; }

/* ================= NEIGHBORHOOD FEATURED LISTINGS ================= */
.neighborhood-listings {
  padding-block: clamp(var(--space-16), 6vw, var(--space-24));
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
}
.neighborhood-listings .section-copy { max-width: 62ch; margin-bottom: var(--space-8); }
.neighborhood-listings .section-copy h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.neighborhood-listings .section-copy p { color: var(--color-text-muted); }
.neighborhood-listings .idx-grid { margin-bottom: var(--space-8); }
.neighborhood-listings-cta { display: flex; justify-content: center; margin-bottom: var(--space-6); }
.neighborhood-listings .idx-disclaimer { text-align: center; }

.idx-filters {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-4);
  align-items: end;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}
.idx-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.idx-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.idx-field select {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.65rem var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  min-height: 44px;
  width: 100%;
  min-width: 0;
}
.idx-field select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.idx-search-btn {
  grid-column: span 6;
  justify-self: stretch;
  min-height: 44px;
}

.idx-results-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  min-height: 1.5em;
}
.idx-results-meta strong { color: var(--color-text); }

.idx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  min-height: 120px;
}

.idx-status {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.idx-status--error { color: var(--color-warning); }

.idx-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
  color: var(--color-text);
  cursor: pointer;
  border: none;
  text-align: left;
  padding: 0;
  font-family: inherit;
}
.idx-card:hover, .idx-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.idx-card:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
a.idx-card { text-decoration: none; }

.idx-card-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--color-surface-2); }
.idx-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idx-card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.idx-card-price {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.idx-card-status {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--color-navy-deep);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.idx-card-body { padding: var(--space-5); display: flex; flex-direction: column; flex-grow: 1; gap: var(--space-2); }
.idx-card-address { font-family: var(--font-display); font-weight: 400; font-size: var(--text-base); line-height: 1.3; }
.idx-card-location { font-size: var(--text-sm); color: var(--color-text-muted); }
.idx-card-stats {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-top: var(--space-1);
  flex-wrap: wrap;
}
.idx-card-stats span { display: inline-flex; align-items: center; gap: 0.3em; }
.idx-card-attribution {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.4;
}

.idx-load-more-wrap { display: flex; justify-content: center; margin-top: var(--space-10); }

.idx-disclaimer {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  line-height: 1.6;
  max-width: 90ch;
}

/* ---- Property detail modal ---- */
.idx-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.idx-modal[hidden] { display: none; }
.idx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.15 0.02 260 / 0.6);
  backdrop-filter: blur(2px);
}
.idx-modal-panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 920px;
  width: 100%;
  max-height: min(88vh, 900px);
  overflow-y: auto;
  z-index: 1;
}
.idx-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.idx-modal-body { padding: 0 var(--space-8) var(--space-8); margin-top: calc(-1 * var(--space-10)); }

.idx-modal-gallery { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-6); aspect-ratio: 16/10; background: var(--color-surface-2); }
.idx-modal-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idx-modal-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: oklch(1 0 0 / 0.85);
  color: var(--color-navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.idx-modal-gallery-nav--prev { left: var(--space-4); }
.idx-modal-gallery-nav--next { right: var(--space-4); }
.idx-modal-gallery-count {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  background: oklch(0.15 0.02 260 / 0.65);
  color: #fff;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.idx-modal-price { font-size: var(--text-2xl); font-family: var(--font-display); color: var(--color-text); margin-bottom: var(--space-1); }
.idx-modal-address { font-size: var(--text-lg); color: var(--color-text-muted); margin-bottom: var(--space-5); }
.idx-modal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-6);
}
.idx-modal-stat { display: flex; flex-direction: column; gap: 0.2em; }
.idx-modal-stat .num { font-size: var(--text-lg); font-weight: 700; color: var(--color-text); }
.idx-modal-stat .lbl { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.idx-modal-remarks { color: var(--color-text); line-height: 1.7; margin-bottom: var(--space-6); }
.idx-modal-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-6);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}
.idx-modal-facts div { display: flex; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-1); border-bottom: 1px dashed var(--color-divider); }
.idx-modal-facts span:first-child { color: var(--color-text-muted); }
.idx-modal-facts span:last-child { font-weight: 600; text-align: right; }

.idx-modal-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.idx-modal-cta p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); max-width: 40ch; }
.idx-modal-attribution {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.6;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}

@media (max-width: 1100px) {
  .idx-filters { grid-template-columns: repeat(3, 1fr); }
  .idx-search-btn { grid-column: span 3; }
  .idx-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .idx-modal-panel { max-height: 92vh; }
}

@media (max-width: 640px) {
  .idx-filters { grid-template-columns: repeat(2, 1fr); padding: var(--space-4); gap: var(--space-3); }
  .idx-search-btn { grid-column: span 2; }
  .idx-grid { grid-template-columns: 1fr; }
  .idx-modal { padding: var(--space-3); }
  .idx-modal-body { padding: 0 var(--space-5) var(--space-6); }
  .idx-modal-stats { gap: var(--space-4); }
  .idx-modal-facts { grid-template-columns: 1fr; }
  .idx-modal-cta { flex-direction: column; align-items: stretch; }
}
