/* =========================================================
   The Kallay Group — Static Site
   Design system: dark luxury, serif display + sans body
   ========================================================= */

:root {
  --black: #000000;
  --ink: #0a0a0a;
  --ink-2: #161616;
  --line: #2a2a2a;
  --bone: #f4f1ec;
  --paper: #ffffff;
  --muted: #b8b3aa;
  --muted-2: #8a857d;
  --accent: #e2233f;        /* Compass red */
  --accent-soft: #c8102e;

  --serif: 'Cormorant Garamond', 'Playfair Display', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --container: 1480px;
  --gutter: clamp(20px, 4vw, 64px);

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .25s var(--ease), opacity .25s var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.1;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.6rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.text-center { text-align: center; }

/* ===== Buttons ===== */

.btn {
  display: inline-block;
  padding: 18px 36px;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  border: 1px solid var(--bone);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  text-align: center;
}

.btn:hover { background: var(--bone); color: var(--black); opacity: 1; }

.btn-solid {
  background: var(--paper);
  color: var(--accent);
  border: 1px solid var(--paper);
  font-weight: 500;
  letter-spacing: .25em;
}

.btn-solid:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

.btn-accent {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.btn-accent:hover { background: var(--paper); color: var(--accent); border-color: var(--paper); }

/* ===== Header ===== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  background: transparent;
  transition: background .35s var(--ease), padding .35s var(--ease), box-shadow .35s var(--ease);
  padding: 24px 0;
}

.site-header.is-scrolled {
  background: var(--black);
  padding: 14px 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

/* Top utility row (sits in header on right side) */
.utility-row {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bone);
}
.utility-row a { position: relative; padding: 4px 0; }
.utility-row a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.utility-row a:hover::after { transform: scaleX(1); }
.utility-row .phone { font-weight: 500; letter-spacing: .15em; }

/* Four nav items plus the phone number must not wrap: a phone number broken
   across two lines reads as a layout bug. Tighten, then hand off to the
   overlay menu once there genuinely is not room. */
.utility-row a,
.utility-row .nav-trigger { white-space: nowrap; }

@media (max-width: 1240px) {
  .utility-row { gap: 24px; font-size: .65rem; letter-spacing: .18em; }
}
@media (max-width: 1060px) {
  .utility-row { gap: 18px; font-size: .6rem; letter-spacing: .12em; }
}
@media (max-width: 940px) {
  .utility-row { display: none; }
}

/* Hamburger - 6 dots in grid */
.menu-toggle {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--bone);
}
.menu-toggle .dots {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  grid-template-rows: repeat(3, 4px);
  gap: 4px;
}
.menu-toggle .dots span {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.menu-toggle:hover { color: var(--accent); }

/* Legacy hamburger lines no longer used but kept for backward compat */
.menu-toggle > span:not(.dots) { display: none; }

/* ===== Overlay menu ===== */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
  overflow-y: auto;
}
.overlay-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.overlay-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 60px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.overlay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.overlay-top .brand-mark img { height: 44px; }

.menu-close {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s var(--ease);
}
.menu-close:hover { color: var(--accent); }
.menu-close svg { width: 22px; height: 22px; fill: currentColor; }

.overlay-rule {
  height: 1px;
  background: var(--accent);
  width: 100%;
}

.overlay-nav {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px);
  align-content: center;
}

@media (max-width: 700px) {
  .overlay-nav {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 0;
  }
}

.overlay-col {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 56px);
}

.overlay-col > li > a {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 6px;
  display: inline-block;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.overlay-col > li > a:hover { border-bottom-color: var(--bone); }
.overlay-col > li > a .plus {
  font-family: var(--sans);
  font-weight: 300;
  margin-left: 18px;
  color: var(--bone);
  display: inline-block;
  transition: transform .25s var(--ease), color .25s var(--ease);
}
.overlay-col > li.has-sub > a { border-bottom-color: var(--bone); cursor: pointer; }
.overlay-col > li.has-sub.is-open > a .plus { transform: rotate(45deg); color: var(--accent); }

.overlay-sub {
  list-style: none;
  padding: 12px 0 0 0;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: 0;
}
.overlay-col > li.is-open .overlay-sub { display: flex; }
.overlay-sub a {
  display: block;
  /* Padding, not gap, so each row is a ~44px tap target on a phone. */
  padding: 15px 0;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.overlay-sub a:hover { color: var(--bone); }

.overlay-socials {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 32px;
}
.overlay-socials a {
  width: 40px;
  height: 40px;
  background: var(--paper);
  color: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.overlay-socials a:hover { background: var(--accent); transform: translateY(-2px); }
.overlay-socials a { transition: background .2s var(--ease), transform .2s var(--ease); }
/* overlay social sizing handled by the shared .ico rules above */
@media (max-width: 700px) {
  .overlay-socials { justify-content: center; }
}

/* Lock scroll when overlay open */
body.has-overlay-open { overflow: hidden; }

/* Hide legacy primary-nav since we now use overlay */
.primary-nav { display: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  height: 52px;
}

/* Nav logo: 37px is 31px + another 20% (26px + 20% + 20%) */
.brand-mark img { height: 37px; width: auto; display: block; }
@media (max-width: 700px) {
  .brand-mark { height: 44px; }
  .brand-mark img { height: 34px; }
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 44px;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
}

.primary-nav > a,
.primary-nav > .has-dropdown > a {
  position: relative;
  padding: 6px 0;
  display: inline-block;
}

/* Underline-on-hover (matches live site) */
.primary-nav > a::after,
.primary-nav > .has-dropdown > a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--bone);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s var(--ease);
}
.primary-nav > a:hover::after,
.primary-nav > .has-dropdown:hover > a::after,
.primary-nav > a.is-active::after { transform: scaleX(1); }

.primary-nav .phone {
  font-weight: 500;
  color: var(--bone);
}
.primary-nav .phone::after { display: none; }

/* HOME SEARCH dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(0,0,0,.95);
  min-width: 280px;
  padding: 18px 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  border: 1px solid var(--line);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown li a {
  display: block;
  padding: 12px 28px;
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: none;
  color: var(--bone);
}
.dropdown li a:hover { background: rgba(255,255,255,.06); opacity: 1; }

/* More menu (the "::" icon) */
.more-toggle {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bone);
  cursor: pointer;
}
.more-toggle::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bone);
  box-shadow: 0 -8px 0 var(--bone), 0 8px 0 var(--bone), 8px 0 0 var(--bone), 8px -8px 0 var(--bone), 8px 8px 0 var(--bone);
  display: block;
}

/* Legacy mobile-only primary-nav styles removed.
   The new design uses .menu-toggle (6 dots) + .overlay-menu (full screen) at all widths. */

/* ===== Hero with video ===== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--black);
  padding: 140px var(--gutter) 80px;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: .7;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.35) 40%, rgba(0,0,0,.65));
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
}

.hero .brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 8px;
}

.hero .brand-lockup .rule {
  height: 1px;
  background: var(--bone);
  width: clamp(40px, 6vw, 100px);
}

.hero .brand-lockup .word {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  letter-spacing: .35em;
  line-height: 1;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  letter-spacing: .08em;
  margin: 0 0 28px;
  line-height: 1.05;
}

.hero .tag {
  font-family: var(--serif);
  font-size: clamp(.95rem, 1.4vw, 1.25rem);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 48px;
}

.hero-cta {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Section atoms ===== */

section { padding: clamp(80px, 10vw, 160px) 0; }

.section-head { text-align: center; margin-bottom: 72px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { max-width: 28ch; margin: 0 auto; }

.values-statement {
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: .04em;
  margin: 0 auto;
  max-width: 100%;
  white-space: nowrap;
}
@media (max-width: 700px) { .values-statement { white-space: normal; } }

/* ===== Card grid (Buyers / Sellers / Mortgage) ===== */

.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 900px) { .card-row { grid-template-columns: 1fr; max-width: 480px; } }

.card-tile {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bone);
}

.card-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}

.card-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.55));
  transition: background .4s var(--ease);
}

.card-tile:hover img { transform: scale(1.06); }
.card-tile:hover::after { background: linear-gradient(to bottom, rgba(0,0,0,.3), rgba(0,0,0,.7)); }

.card-tile h3,
.card-tile h2 {
  position: relative;
  z-index: 2;
  color: var(--bone);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
}

.resource-tiles { padding: clamp(48px, 6vw, 80px) 0; }

/* ===== Meet The Team ===== */

.team-section { background: linear-gradient(180deg, var(--ink) 0%, var(--black) 100%); position: relative; }
.team-section::before {
  content: '';
  position: absolute;
  inset: 0;
  /* marble-bg.svg was never created and the relative path resolved to
     /assets/css/assets/img/..., firing a 404 on every homepage load */
  background-image: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  background-size: cover;
  background-position: center;
  opacity: .5;
}
.team-section > .container { position: relative; z-index: 1; }

.team-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr; } }

.team-photo {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background: var(--ink-2);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }

.team-copy h2 { margin-bottom: 28px; letter-spacing: .04em; }
.team-copy p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 52ch; }

.team-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
@media (max-width: 700px) { .team-thumbs { grid-template-columns: repeat(2, 1fr); } }

.team-thumb {
  text-align: center;
}
.team-thumb-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--ink-2);
  margin-bottom: 14px;
}
.team-thumb-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.team-thumb:hover .team-thumb-img img { transform: scale(1.06); }
.team-thumb .name {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: .1em;
  margin: 0;
}
.team-thumb .role {
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 4px 0 0;
}

/* ===== Carousel (Featured Properties + Neighborhoods) ===== */

.carousel-section { padding: clamp(80px, 10vw, 160px) 0 0; }
/* a carousel section that ends in a button row needs its bottom space back */
.carousel-section:has(.idx-cta) { padding-bottom: clamp(80px, 10vw, 160px); }

.carousel {
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 var(--gutter);
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-card {
  flex: 0 0 calc((100% - 64px) / 2);
  scroll-snap-align: start;
  color: var(--bone);
}
@media (max-width: 900px) { .carousel-card { flex-basis: 90%; } }

.carousel-card .img-wrap {
  aspect-ratio: 16/10;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--ink-2);
}
.carousel-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.carousel-card:hover .img-wrap img { transform: scale(1.05); }

.carousel-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  letter-spacing: .04em;
  margin: 0 0 16px;
}
.carousel-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 56ch;
}
.carousel-card .price {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 0 0 4px;
}
.carousel-card .addr {
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.carousel-card .specs {
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  gap: 14px;
}

.carousel-controls {
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  position: relative;
}
.carousel-controls::before {
  content: '';
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 50%;
  height: 1px;
  background: var(--accent);
  opacity: .35;
  z-index: 0;
}
.carousel-controls > * { position: relative; z-index: 1; background: var(--black); }
.carousel-arrows { display: flex; gap: 0; background: var(--black); }
.carousel-arrows button {
  width: 88px;
  height: 88px;
  background: var(--paper);
  color: var(--accent);
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.carousel-arrows button + button { margin-left: 1px; }
.carousel-arrows button:hover { background: var(--accent); color: var(--paper); }
.carousel-arrows button svg { width: 16px; height: 16px; fill: currentColor; }

/* Two 88px arrows plus the label row overrun a 320px phone, which pushes the
   whole page sideways. Shrink the arrows on the narrowest screens. */
@media (max-width: 400px) {
  .carousel-controls { gap: 12px; }
  .carousel-arrows button { width: 64px; height: 64px; }
}

/* Post date, on the article and on the index cards. */
.post-meta {
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 18px;
}
.post-card .post-meta { margin: 18px 0 10px; }

/* Netlify Forms honeypot. Hidden from people, left in the DOM for bots. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== New construction: model gallery and illustrated plan cards ===== */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 900px) { .shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .shot-grid { grid-template-columns: minmax(0, 1fr); } }

.shot { margin: 0; overflow: hidden; background: var(--ink-2); }
.shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.shot:hover img { transform: scale(1.04); }

/* Plan cards carry the builder's elevation rendering above the copy. */
.area-card.has-img { padding-top: 0; overflow: hidden; }
.area-card.has-img .img-wrap {
  /* Pull the rendering out to the card edges, past the card's own padding. */
  margin: 0 calc(clamp(32px, 4vw, 56px) * -1) 26px;
  overflow: hidden;
  background: var(--ink-2);
}
.area-card.has-img .img-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.area-card.has-img:hover .img-wrap img { transform: scale(1.04); }

/* ===== New construction: fact list and floor plan table ===== */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
}
.fact-grid > div { background: var(--black); padding: 26px 28px; min-width: 0; }
.fact-grid dt {
  font-size: .58rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 10px;
}
.fact-grid dd {
  margin: 0;
  color: var(--bone);
  font-size: 1rem;
  line-height: 1.5;
}
@media (max-width: 900px) { .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fact-grid { grid-template-columns: minmax(0, 1fr); } }

/* A seven-column table cannot shrink to phone width, so it scrolls in place
   rather than pushing the page sideways. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  color: var(--bone);
  font-size: .92rem;
}
.plan-table caption {
  caption-side: bottom;
  padding-top: 16px;
  text-align: left;
  color: var(--muted-2);
  font-size: .8rem;
}
.plan-table th,
.plan-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.plan-table thead th {
  font-size: .58rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  white-space: nowrap;
}
.plan-table tbody th {
  font-family: var(--serif, inherit);
  font-weight: 400;
  color: var(--bone);
  white-space: nowrap;
}
.plan-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.plan-table tbody tr:last-child th,
.plan-table tbody tr:last-child td { border-bottom: 0; }

/* ===== Work With CTA — full bleed background ===== */

.cta-fullbleed {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px var(--gutter);
  overflow: hidden;
  background: var(--black);
}
.cta-fullbleed-bg {
  position: absolute;
  inset: 0;
  background-image: var(--bg, none);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.cta-fullbleed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.55));
  z-index: 1;
}
.cta-fullbleed > .inner { position: relative; z-index: 2; max-width: 1000px; }
.cta-fullbleed h2 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 0 0 36px;
  line-height: 1.05;
}
.cta-fullbleed .divider {
  width: 1px;
  height: 80px;
  margin: 0 auto 36px;
  background: repeating-linear-gradient(to bottom, var(--bone) 0, var(--bone) 6px, transparent 6px, transparent 12px);
}

/* ===== Contact section (homepage) ===== */

.contact-form-section { background: var(--bone); color: var(--ink); padding: clamp(80px, 10vw, 140px) 0; }
.contact-form-section .eyebrow { color: rgba(0,0,0,.6); }
.contact-form-section h2 { color: var(--ink); }

.contact-form-section .contact-grid { color: var(--ink); }
.contact-form-section label { color: var(--muted-2); }
.contact-form-section input,
.contact-form-section select,
.contact-form-section textarea {
  color: var(--ink);
  border-bottom-color: rgba(0,0,0,.2);
}
.contact-form-section input:focus,
.contact-form-section select:focus,
.contact-form-section textarea:focus { border-bottom-color: var(--ink); }
.contact-form-section .btn-accent { color: var(--paper); }

.consent {
  font-size: .78rem;
  line-height: 1.6;
  color: var(--muted-2);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0 24px;
}
.consent input[type="checkbox"] { margin-top: 4px; }

/* ===== Footer ===== */

.site-footer {
  background: var(--black);
  border-top: 1px solid var(--line);
  padding: 96px 0 40px;
  font-size: .85rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px);
  margin-bottom: 64px;
  align-items: start;
}
@media (max-width: 1100px) { .footer-top { grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .footer-top { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.footer-top > * { min-width: 0; }
@media (max-width: 1100px) { .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px)  { .footer-brand { grid-column: auto; } }

.footer-top h3 {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 20px;
}
.footer-top ul { list-style: none; padding: 0; margin: 0; }
.footer-top li { margin-bottom: 12px; }
.footer-top a { color: var(--bone); }

.footer-brand img { height: 40px; width: auto; margin-bottom: 22px; }
.footer-brand p { color: var(--muted); max-width: 36ch; line-height: 1.65; }

.footer-badges {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}
.footer-badges img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .8;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.socials { display: flex; gap: 14px; }
.socials a {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.socials a:hover { border-color: var(--bone); color: var(--bone); opacity: 1; }
.socials svg { width: 14px; height: 14px; fill: currentColor; }

/* ===== Page hero (interior pages) ===== */

.page-hero {
  padding: 240px var(--gutter) 110px;
  text-align: center;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.page-hero .lede {
  position: relative;
  z-index: 2;
  color: var(--bone);
  margin-top: 24px;
}

@media (max-width: 900px) {
  .page-hero { padding: 180px var(--gutter) 80px; }
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  opacity: .35;
}

.page-hero h1 {
  position: relative;
  font-size: clamp(3rem, 6vw, 5rem);
  letter-spacing: .12em;
  margin: 0;
}
.page-hero .eyebrow { position: relative; margin-bottom: 18px; }

/* Single long words such as NEIGHBORHOODS overrun the viewport on phones at the
   desktop minimum, so drop the floor and the tracking below 600px. */
@media (max-width: 600px) {
  .page-hero h1 {
    font-size: clamp(2rem, 8.4vw, 3rem);
    letter-spacing: .06em;
    overflow-wrap: break-word;
  }
}

/* ===== Filter bar (Featured Properties) ===== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 72px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.filter-bar button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--bone);
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.filter-bar button:hover,
.filter-bar button.is-active {
  border-color: var(--bone);
  background: rgba(255,255,255,.05);
}

/* Property card grid (interior pages) */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
@media (max-width: 1100px) { .properties-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .properties-grid { grid-template-columns: 1fr; } }

.property-card { color: var(--bone); display: block; }
.property-card .img-wrap { aspect-ratio: 4/3; overflow: hidden; margin-bottom: 18px; }
.property-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.property-card:hover .img-wrap img { transform: scale(1.05); }
.property-card .price {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: .04em;
  margin: 0 0 4px;
}
.property-card .addr {
  font-size: .85rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.property-card .specs {
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  gap: 14px;
}

/* ===== Two-column intro ===== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.split .copy h2 { margin-bottom: 28px; }
.split .copy p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.split .visual { aspect-ratio: 4/5; overflow: hidden; }
.split .visual img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Search panels (Home Search page) ===== */

.search-panels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .search-panels { grid-template-columns: 1fr; } }

.search-panel {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-panel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.search-panel:hover img { transform: scale(1.05); }
.search-panel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.65));
}
.search-panel-content { position: relative; z-index: 2; text-align: center; color: var(--bone); }
.search-panel-content h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: .25em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

/* ===== Contact form (Let's Connect page) ===== */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info p { color: var(--muted); margin-bottom: 1em; }
.contact-info .info-block { margin-bottom: 32px; }
.contact-info h3 {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 8px;
}

.contact-form { display: grid; gap: 22px; }
.contact-form .field { display: grid; gap: 8px; }
.contact-form label {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  color: var(--bone);
  font-family: var(--sans);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s var(--ease);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--bone); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 600px) { .contact-form .row-2 { grid-template-columns: 1fr; } }
.contact-form button { justify-self: start; margin-top: 12px; }

/* ===== Section variants ===== */

.section--bone { background: var(--bone); color: var(--ink); }
.section--bone .eyebrow { color: rgba(0,0,0,.6); }
.section--bone .btn { border-color: var(--ink); color: var(--ink); }
.section--bone .btn:hover { background: var(--ink); color: var(--bone); }

/* ===== Utility ===== */

.spacer-sm { height: 32px; }
.spacer-md { height: 64px; }
.spacer-lg { height: 120px; }

/* fade-on-scroll */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Property card (Featured Properties homepage) ===== */
.listing-card { color: var(--bone); display: block; }
.listing-card .img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--ink-2);
}
.listing-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.listing-card:hover .img-wrap img { transform: scale(1.04); }
.listing-card .badge {
  position: absolute;
  bottom: 0; left: 0;
  background: var(--accent);
  color: var(--paper);
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  padding: 8px 16px;
  font-weight: 600;
}
.listing-card .street {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.9vw, 1.7rem);
  letter-spacing: .04em;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.listing-card .price {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 16px;
}
.listing-card .addr {
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.listing-card .specs {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0;
}

/* ===== Success Stories ===== */
.success-stories {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0 clamp(120px, 12vw, 180px);
  overflow: hidden;
  background: var(--black);
}
.success-stories-bg {
  position: absolute;
  inset: 0;
  background-image: var(--bg, none);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.success-stories::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.5), rgba(0,0,0,.3));
  z-index: 1;
}
.success-stories > .container { position: relative; z-index: 2; }

.stories-head { margin-bottom: clamp(40px, 5vw, 64px); max-width: 60ch; }
.stories-head h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bone);
  margin: 0 0 32px;
  line-height: 1.05;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.2vw, 32px);
  align-items: stretch;
}
@media (max-width: 1000px) { .stories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .stories-grid { grid-template-columns: minmax(0, 1fr); } }

.story-card {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(32px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.story-card .quote-mark {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}
.story-card p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 24px;
  color: var(--ink);
  flex: 1;
}
.story-card cite {
  font-style: normal;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* ===== Newsletter signup ===== */
.newsletter {
  background: var(--bone);
  color: var(--ink);
  padding: clamp(80px, 10vw, 140px) 0;
  text-align: center;
}
.newsletter h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--ink);
}
.newsletter p { color: var(--muted-2); margin: 0 0 36px; font-size: .95rem; }
.newsletter-form {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
}
@media (max-width: 700px) { .newsletter-form { grid-template-columns: 1fr; } }
.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
  border: 1px solid rgba(0,0,0,.2);
  background: transparent;
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  transition: border-color .2s var(--ease);
}
.newsletter-form input:focus { border-color: var(--ink); }
.newsletter-form button {
  background: var(--accent);
  color: var(--paper);
  border: 0;
  padding: 14px 32px;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.newsletter-form button:hover { background: var(--accent-soft); }
.newsletter-consent {
  max-width: 720px;
  margin: 16px auto 0;
  font-size: .72rem;
  line-height: 1.6;
  color: var(--muted-2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}
.newsletter-consent input { margin-top: 4px; }
.newsletter-consent a { color: var(--ink); text-decoration: underline; }

/* ===== Updated Footer to match live =====
   The column count lives in the .footer-top rule higher up. A duplicate
   3-column override used to sit here and was forcing Quick Links onto its
   own row. Removed. */

.site-footer .footer-brand p {
  margin-top: 16px;
  margin-bottom: 32px;
}

.connect-label {
  font-size: .7rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--bone);
  margin: 0 0 14px;
  display: block;
}
.socials-red {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.socials-red a,
.overlay-socials a {
  width: 40px;
  height: 40px;
  background: var(--paper);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.socials-red a:hover,
.overlay-socials a:hover { background: var(--accent); transform: translateY(-2px); opacity: 1; }

/* The brand SVGs carry their own fills, so mask them and paint the colour
   ourselves. That way every icon matches regardless of how it was authored. */
.socials-red .ico,
.overlay-socials .ico {
  display: block;
  width: 17px;
  height: 17px;
  background-color: var(--accent);
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  transition: background-color .2s var(--ease);
}
.socials-red a:hover .ico,
.overlay-socials a:hover .ico { background-color: var(--paper); }

.ico-facebook  { -webkit-mask-image: url('/assets/img/social/facebook.svg');  mask-image: url('/assets/img/social/facebook.svg'); }
.ico-instagram { -webkit-mask-image: url('/assets/img/social/instagram.svg'); mask-image: url('/assets/img/social/instagram.svg'); }
.ico-linkedin  { -webkit-mask-image: url('/assets/img/social/linkedin.svg');  mask-image: url('/assets/img/social/linkedin.svg'); }
.ico-google    { -webkit-mask-image: url('/assets/img/social/google.svg');    mask-image: url('/assets/img/social/google.svg'); }
.ico-zillow    { -webkit-mask-image: url('/assets/img/social/zillow.svg');    mask-image: url('/assets/img/social/zillow.svg'); }
.ico-youtube   { -webkit-mask-image: url('/assets/img/social/youtube.svg');   mask-image: url('/assets/img/social/youtube.svg'); }

/* Facebook and Zillow are tall glyphs; trim them so all six read the same size */
.ico-facebook { width: 15px; height: 19px; }
.ico-zillow   { width: 17px; height: 18px; }
.ico-youtube  { width: 19px; height: 15px; }

.footer-disclaimer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--accent);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 700px) { .footer-disclaimer { grid-template-columns: 1fr; } }

.footer-disclaimer-badges {
  display: flex;
  gap: 16px;
  align-items: center;
}
.footer-disclaimer-badges img {
  height: 56px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .85;
}
.footer-disclaimer p {
  font-size: .72rem;
  line-height: 1.7;
  color: var(--muted-2);
  margin: 0;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer-meta a { color: var(--muted-2); }
.footer-meta a:hover { color: var(--bone); opacity: 1; }

/* Primary nav - keep all items visible on desktop */
.primary-nav .nav-cta {
  background: var(--accent);
  color: var(--paper);
  padding: 10px 22px;
  letter-spacing: .2em;
}
.primary-nav .nav-cta::after { display: none; }
.primary-nav .nav-cta:hover { background: var(--paper); color: var(--accent); opacity: 1; }

@media (min-width: 1001px) {
  .primary-nav { gap: 28px; font-size: .72rem; }
}
@media (max-width: 1300px) {
  .primary-nav { gap: 18px; font-size: .68rem; letter-spacing: .18em; }
}

/* ===== Hero eyebrow ===== */
.hero-eyebrow {
  color: var(--bone);
  margin-bottom: 24px;
  letter-spacing: .35em;
  font-size: .75rem;
}

/* ===== Lede paragraph under section heads ===== */
.lede {
  color: var(--muted);
  max-width: 64ch;
  margin: 18px auto 0;
  font-size: 1rem;
  line-height: 1.7;
}
.section-head .lede { text-align: center; }
.cta-lede {
  color: var(--bone);
  max-width: 62ch;
  margin: 0 auto 36px;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ===== Resource tiles section ===== */
.resource-tiles { padding: clamp(60px, 8vw, 110px) 0; background: var(--black); }

/* ===== Team Roster (Meet the Team grid) ===== */
.team-roster { background: var(--ink); padding: clamp(80px, 10vw, 140px) 0; }
.roster-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
@media (max-width: 900px) { .roster-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .roster-grid { grid-template-columns: 1fr; } }

.roster-card { text-align: center; }
.roster-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  margin-bottom: 22px;
  transition: transform .6s var(--ease);
}
.roster-card:hover img { transform: scale(1.02); }
.roster-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: .1em;
  margin: 0 0 6px;
  color: var(--bone);
}
.roster-card .role {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

/* About anchor scroll offset */
#about, #team, #properties, #success-stories, #neighborhoods { scroll-margin-top: 100px; }

/* ===== IDX / FlexMLS embeds ===== */
/* ===== IDX section =====
   The FlexMLS frame is cross origin, so nothing inside it can be styled. The
   fix is to stop fighting it: put the whole section on white so the widget
   belongs there, then give it a light bezel so it still reads as a panel. No
   overlay, because a scrim would dim the listing photos and every control the
   visitor needs to click. */
section:has(.idx-embed) {
  background: var(--paper);
  color: var(--ink);
}
section:has(.idx-embed) .section-head h2,
section:has(.idx-embed) .section-head h3 { color: var(--ink); }
section:has(.idx-embed) .section-head .eyebrow { color: var(--accent-soft); }
section:has(.idx-embed) .section-head .lede,
section:has(.idx-embed) .lede { color: #4a463f; }

.idx-embed {
  position: relative;
  width: 100%;
  margin-top: 48px;
  background: var(--paper);
  padding: 10px;
  border: 1px solid rgba(10, 10, 10, .10);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(10, 10, 10, .05),
              0 18px 44px rgba(10, 10, 10, .11);
}
.idx-embed iframe { border-radius: 2px; background: var(--paper); }

.idx-embed iframe { display: block; width: 100%; height: 850px; border: 0; }
@media (max-width: 900px) { .idx-embed iframe { height: 1050px; } }
@media (max-width: 600px) { .idx-embed iframe { height: 1250px; } }

.idx-note {
  margin-top: 18px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: center;
}
section:has(.idx-embed) .idx-note { color: #6d675e; }
section:has(.idx-embed) .idx-fallback a { color: var(--accent-soft); }
section:has(.idx-embed) .idx-fallback a:hover { color: var(--ink); }
.idx-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-bottom: clamp(56px, 6vw, 96px);
}

.idx-fallback { text-align: center; margin-top: 10px; }
.idx-fallback a {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.idx-fallback a:hover { color: var(--bone); }

/* ===== Mobile tap targets ===== */
@media (max-width: 900px) {
  .footer-top ul a,
  .footer-top li a {
    display: inline-block;
    padding: 7px 0;
    min-height: 30px;
  }
  .footer-meta a,
  .newsletter-consent a {
    display: inline-block;
    padding: 9px 0;
    min-height: 30px;
  }
  .idx-fallback a {
    display: inline-block;
    padding: 8px 4px;
    min-height: 30px;
  }
  .overlay-col > li > a { padding: 10px 0; }
  .info-block a,
  .consent a {
    display: inline-block;
    padding: 8px 0;
    min-height: 30px;
  }
}

/* ===== City page: area cards ===== */
.area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 800px) { .area-grid { grid-template-columns: minmax(0, 1fr); } }
.area-card {
  background: var(--ink);
  padding: clamp(32px, 4vw, 56px);
}
.area-card h3 {
  font-family: var(--serif);
  color: var(--bone);
  margin: 0 0 16px;
}
.area-card p { color: var(--muted); margin: 0; line-height: 1.75; }

/* ===== Guide pages: numbered steps ===== */
.step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 800px) { .step-grid { grid-template-columns: minmax(0, 1fr); } }
.step-card {
  background: var(--ink);
  padding: clamp(32px, 4vw, 56px);
  position: relative;
}
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 20px;
}
.step-card h2 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--bone);
  margin: 0 0 16px;
  letter-spacing: .01em;
}
.step-card p { color: var(--muted); margin: 0; line-height: 1.75; }

/* ===== Mortgage calculator ===== */
.calc-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 900px) { .calc-wrap { grid-template-columns: minmax(0, 1fr); } }

.calc-form {
  background: var(--ink);
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 560px) { .calc-form { grid-template-columns: minmax(0, 1fr); } }
.calc-field { display: flex; flex-direction: column; gap: 8px; }
.calc-field label {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.calc-field input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 1.05rem;
  padding: 10px 0;
  min-height: 44px;
  width: 100%;
  -moz-appearance: textfield;
}
.calc-field input::-webkit-outer-spin-button,
.calc-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-field input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.calc-result {
  background: var(--ink-2);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc-label {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.calc-total {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.1;
  color: var(--bone);
  margin: 10px 0 28px;
}
.calc-breakdown { list-style: none; margin: 0; padding: 0; }
.calc-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--muted);
}
.calc-breakdown li span:last-child { color: var(--bone); }
.calc-note {
  margin: 24px 0 0;
  font-size: .74rem;
  line-height: 1.6;
  color: var(--muted-2);
}

/* ===== Blog index cards ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 48px);
}
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .post-grid { grid-template-columns: minmax(0, 1fr); } }

.post-card { display: block; min-width: 0; }
.post-card .img-wrap {
  overflow: hidden;
  aspect-ratio: 3 / 2;
  margin-bottom: 22px;
  background: var(--ink-2);
}
.post-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.post-card:hover .img-wrap img { transform: scale(1.04); }
.post-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  color: var(--bone);
  margin: 0 0 12px;
  line-height: 1.25;
}
.post-card p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
  margin: 0 0 16px;
}
.post-more {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}

/* ===== Blog post article typography ===== */
.post-body {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.85;
}
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.5em; }
.post-body h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--bone);
  margin: 2.2em 0 .7em;
  line-height: 1.2;
}
.post-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: var(--bone);
  margin: 1.9em 0 .6em;
}
.post-body h4 {
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.8em 0 .6em;
}
.post-body a { color: var(--accent); border-bottom: 1px solid rgba(226,35,63,.4); }
.post-body a:hover { color: var(--bone); border-bottom-color: currentColor; }
.post-body strong, .post-body b { color: var(--bone); font-weight: 600; }
.post-body ul, .post-body ol { margin: 0 0 1.5em; padding-left: 1.3em; }
.post-body li { margin-bottom: .6em; }
.post-body img {
  width: 100%;
  height: auto;
  margin: 2em 0;
  display: block;
}
.post-body figure { margin: 2em 0; }
.post-body figcaption {
  font-size: .8rem;
  color: var(--muted-2);
  margin-top: 10px;
  text-align: center;
}
.post-body blockquote {
  margin: 2em 0;
  padding: 24px 0 24px 28px;
  border-left: 2px solid var(--accent);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
}

.post-foot {
  max-width: 760px;
  margin: 64px auto 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

/* ===== Cookie notice ===== */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 140%);
  z-index: 90;
  width: min(880px, calc(100vw - 32px));
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 28px;
  align-items: center;
  font-size: .85rem;
  line-height: 1.6;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  transition: transform .45s var(--ease), opacity .45s var(--ease);
  opacity: 0;
  visibility: hidden;
}
.cookie-banner.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}
@media (max-width: 720px) {
  .cookie-banner { grid-template-columns: minmax(0, 1fr); padding: 20px; bottom: 12px; }
}
.cookie-banner p { margin: 0; }
.cookie-banner a { color: var(--bone); border-bottom: 1px solid var(--muted-2); }
.cookie-banner a:hover { border-bottom-color: var(--bone); }

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-actions button {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 13px 22px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.cookie-actions button:hover { border-color: var(--bone); }
.cookie-actions .cookie-accept {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.cookie-actions .cookie-accept:hover { background: var(--accent-soft); border-color: var(--accent-soft); }

/* ===== Legal / long-form pages ===== */
.legal-body {
  max-width: 780px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.85;
}
.legal-body h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--bone);
  margin: 2.2em 0 .6em;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 1.4em; }
.legal-body ul { margin: 0 0 1.4em; padding-left: 1.3em; }
.legal-body li { margin-bottom: .6em; }
.legal-body a { color: var(--accent); border-bottom: 1px solid rgba(226,35,63,.4); }
.legal-body a:hover { color: var(--bone); }
.legal-updated {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 40px;
}

/* ===== Top nav dropdown ===== */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-item .nav-trigger { display: inline-flex; align-items: center; gap: 7px; }
.nav-item .caret {
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .25s var(--ease);
}
.nav-item.is-open .caret { transform: translateY(1px) rotate(-135deg); }

/* invisible button that carries the click/keyboard toggle on touch */
.nav-toggle {
  position: absolute;
  inset: 0;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: none;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  margin-top: 18px;
  min-width: 260px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 22px 0 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .55);
  z-index: 70;
  /* Eleven communities can outrun a short laptop window, so cap and scroll. */
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* bridge the gap so the pointer can travel from the link to the panel */
/* Hover bridge across the gap between the trigger and the panel. It has to
   hang off .nav-item, not off .nav-dropdown: the panel carries overflow-y for
   short windows, and a scroll container clips its own out-of-box pseudo
   element, which silently killed the bridge and closed the menu mid-move. */
.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-width: 92vw;
  height: 30px;
  pointer-events: none;
}
.nav-item:hover::after,
.nav-item:focus-within::after,
.nav-item.is-open::after { pointer-events: auto; }
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown-label {
  display: block;
  padding: 0 26px 14px;
  font-size: .58rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.nav-dropdown ul { list-style: none; margin: 0; padding: 0; }
.nav-dropdown li a {
  display: block;
  padding: 11px 26px;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), padding-left .2s var(--ease);
}
.nav-dropdown li a::after { display: none; }
.nav-dropdown li a:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--accent);
  padding-left: 31px;
}
.nav-dropdown li:last-child a {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  color: var(--accent);
}

/* Nine communities in one column runs past the fold on a short laptop window.
   Two columns keeps the whole menu on screen, with the catch-all search link
   spanning the full width underneath. */
@media (min-width: 901px) {
  .nav-dropdown { min-width: 400px; }
  .nav-dropdown ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4px;
  }
  /* Only the catch-all search link spans both columns. */
  .nav-dropdown li:last-child { grid-column: 1 / -1; }
}

/* Touch and coarse pointers get an explicit tap toggle instead of hover */
@media (hover: none) {
  .nav-toggle { display: block; }
  .nav-item:hover .nav-dropdown { opacity: 0; visibility: hidden; pointer-events: none; }
  .nav-item.is-open .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; }
}
