/* Acme Estates, warm-modern direction. Source: scripts/demo-agency/site/assets/site.css (copied by build.ts).
   Materials: limestone, travertine, white oak, fired clay, ipe. Type: Hedvig Letters Serif and Gantari, self-hosted. */

@font-face {
  font-family: "Gantari";
  src: url("fonts/gantari-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hedvig Letters Serif";
  src: url("fonts/hedvig-letters-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched fallbacks, so a late font never moves the layout. */
@font-face {
  font-family: "Hedvig Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Liberation Serif"), local("DejaVu Serif");
  size-adjust: 104%;
  ascent-override: 98%;
  descent-override: 31%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Gantari Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans"), local("DejaVu Sans");
  size-adjust: 99%;
  ascent-override: 96%;
  descent-override: 25%;
  line-gap-override: 0%;
}

:root {
  --limestone: #F5EFE9;
  --limestone-deep: #EFE6DE;
  --shell: #FBF8F4;
  --travertine: #E5D6C7;
  --sand: #D5C0AD;
  --oak: #AD825C;          /* decoration only, never text */
  --oak-deep: #7A5536;     /* small accents and map labels on light grounds */
  --clay: #964A2F;         /* brand: monogram, focus, active states; never a large surface */
  --clay-deep: #7D3925;
  --ipe: #32221B;          /* text and dark grounds */
  --ipe-2: #3D2B22;
  --ipe-soft: #614E44;     /* secondary text, 6.9:1 on limestone */
  --hair: #DCCFC4;
  --hair-strong: #C9B7A8;
  --on-ipe: #F5EFE9;
  --on-ipe-soft: #D9C8B8;

  --font-display: "Hedvig Letters Serif", "Hedvig Fallback", Georgia, serif;
  --font-ui: "Gantari", "Gantari Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-hero: clamp(2.375rem, 1.55rem + 2.9vw, 4.5rem);
  --t-h1: clamp(2.125rem, 1.5rem + 2.2vw, 3.75rem);
  --t-h2: clamp(1.875rem, 1.35rem + 1.8vw, 3rem);
  --t-h3: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem);
  --t-lead: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --t-read: 1.1875rem;
  --t-body: 1.0625rem;
  --t-sm: 0.9375rem;
  --t-label: 0.875rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --section: clamp(64px, 8vw, 120px);

  --gutter: 16px;
  --max: 1360px;
  --header-h: 68px;

  --r-window: clamp(16px, 2vw, 26px);
  --r-photo: clamp(10px, 1.1vw, 16px);
  --r-panel: 16px;
  --r-field: 10px;
  --r-label: 3px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-panel: 0 1px 0 rgba(50, 34, 27, 0.05), 0 22px 44px -30px rgba(50, 34, 27, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--limestone);
  color: var(--ipe);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  word-spacing: 0.04em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
figure { margin: 0; }
address { font-style: normal; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ipe);
  color: var(--on-ipe);
  border-radius: var(--r-field);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Landscape iPhones: the notch and rounded corners take part of the width (viewport-fit=cover). */
.container { width: min(100% - 2 * var(--gutter) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px), var(--max)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Long serif reading: Hedvig's narrow space needs a little air. */
.serif { font-family: var(--font-display); word-spacing: 0.06em; }

main { display: block; min-height: 100svh; }

/* Buttons ------------------------------------------------------------- */

.btn {
  --btn-bg: var(--ipe);
  --btn-fg: var(--on-ipe);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid var(--btn-bg);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-ui);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.btn:hover { --btn-bg: #4A3328; }
.btn--light { --btn-bg: var(--limestone); --btn-fg: var(--ipe); }
.btn--light:hover { --btn-bg: #FFFFFF; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-field);
  background: transparent;
  color: var(--ipe);
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.btn-line:hover { background: var(--limestone-deep); border-color: var(--ipe-soft); }
.btn-line--on-ipe { color: var(--on-ipe); border-color: rgba(245, 239, 233, 0.4); }
.btn-line--on-ipe:hover { background: var(--ipe-2); border-color: var(--on-ipe); }
.btn-line svg { width: 18px; height: 18px; flex: none; }
/* A label that has to wrap splits into even lines, never one word alone on the second (Spanish labels on phones). */
.btn, .btn-line, .mia-link { text-wrap: balance; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--hair-strong);
  text-underline-offset: 0.35em;
  transition: text-decoration-color 200ms var(--ease);
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link svg { width: 16px; height: 16px; flex: none; }

.mia-link {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ipe);
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--hair-strong);
  text-underline-offset: 0.3em;
}
/* A 44 px tap target around an inline link, without moving the text. */
.mia-link::after { content: ""; position: absolute; inset: -11px -6px; }
.mia-link:hover { text-decoration-color: currentColor; }
.advisor-mini .mia-link { padding-block: 8px; }

.label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: var(--r-label);
  background: var(--travertine);
  color: var(--ipe);
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.label--line { background: transparent; border: 1px solid var(--hair-strong); }

/* Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--limestone);
  transition: box-shadow 300ms var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--hair); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: var(--header-h);
}
.brand { display: inline-flex; flex: none; align-items: center; min-height: 44px; text-decoration: none; }
.brand img { width: auto; height: 28px; }

.site-nav { display: none; }
.site-nav ul { display: flex; gap: clamp(18px, 2vw, 32px); }
.site-nav a {
  display: inline-block;
  padding: 10px 0;
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 0 1px no-repeat;
  transition: background-size 300ms var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background-size: 100% 1px; }

/* Language switch and "Ask Mia": in the header on desktop, in the menu on phones and tablets. */
.header-actions { display: none; align-items: center; gap: clamp(10px, 1.2vw, 20px); flex: none; }

.lang-switch ul { display: flex; align-items: center; }
.lang-switch li { display: flex; align-items: center; }
.lang-switch li + li::before { content: ""; width: 1px; height: 16px; background: var(--hair-strong); }
.lang-switch a, .lang-switch__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
}
/* The current language carries a short clay rule; the other one is a quieter link. */
.lang-switch__current { color: var(--ipe); background: linear-gradient(var(--clay), var(--clay)) 50% calc(100% - 9px) / 18px 2px no-repeat; }
.lang-switch a { color: var(--ipe-soft); background: linear-gradient(currentColor, currentColor) 50% calc(100% - 9px) / 0 1px no-repeat; transition: color 200ms var(--ease), background-size 300ms var(--ease); }
.lang-switch a:hover { color: var(--ipe); background-size: 18px 1px; }

.mia-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ipe);
  text-align: left;
  line-height: 1.2;
}
.mia-cta .mia-avatar { flex: none; border-radius: 50%; box-shadow: 0 0 0 1px var(--hair-strong); }
.mia-cta__text { display: grid; gap: 2px; }
.mia-cta__name { font-size: var(--t-sm); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; transition: text-decoration-color 200ms var(--ease); }
.mia-cta:hover .mia-cta__name { text-decoration-color: currentColor; }
.mia-cta__role { font-size: var(--t-label); color: var(--ipe-soft); white-space: nowrap; }
.mia-cta--header .mia-avatar { width: 36px; height: 36px; }
.mia-cta--menu { width: 100%; min-height: 66px; padding: 10px 16px 10px 10px; gap: 12px; border: 1px solid var(--hair-strong); border-radius: var(--r-field); background: var(--shell); transition: border-color 200ms var(--ease); }
.mia-cta--menu:hover { border-color: var(--ipe-soft); }
.mia-cta--menu .mia-avatar { width: 44px; height: 44px; }
.mia-cta--menu .mia-cta__name { font-size: var(--t-body); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 12px;
  border: 0;
  background: none;
  font-size: var(--t-sm);
  font-weight: 500;
}
.menu-toggle__bars { position: relative; width: 22px; height: 10px; }
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 300ms var(--ease), top 300ms var(--ease);
}
.menu-toggle__bars::before { top: 0; }
.menu-toggle__bars::after { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { top: 4.25px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  overflow-y: auto;
  background: var(--limestone);
  padding: var(--s-2) var(--gutter) var(--s-9);
  border-top: 1px solid var(--hair);
}
.mobile-menu[hidden] { display: none; }
/* The language switch opens the menu and "Ask Mia" closes its controls, so on a 390x664 phone every control ends above the
   bottom 120 px, where the chat launcher sits (the Spanish launcher spans most of the width). The address may run below. */
.lang-switch--menu { margin-left: -8px; }
.lang-switch--menu a, .lang-switch--menu .lang-switch__current { font-size: var(--t-sm); }
.mobile-menu__nav ul { display: grid; margin-bottom: var(--s-5); }
.mobile-menu__nav li a {
  display: block;
  padding: 9px 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1.15;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
}
.mobile-menu__contact { display: grid; gap: var(--s-4); justify-items: start; max-width: min(420px, calc(100% - 104px)); }
.mobile-menu__contact p { color: var(--ipe-soft); font-size: var(--t-sm); }
/* Shorter phones (iPhone mini, 375x629): tighter rows keep the same rule. */
@media (max-height: 640px) {
  .mobile-menu__nav ul { margin-bottom: var(--s-4); }
  .mobile-menu__nav li a { padding: 7px 0; min-height: 44px; font-size: 1.625rem; }
  .mia-cta--menu { min-height: 56px; padding-block: 5px; }
}

/* Sections ------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.section--flush-top { padding-top: 0; }
.band-travertine { background: var(--travertine); }
.band-shell { background: var(--limestone-deep); }
.band-ipe { background: var(--ipe); color: var(--on-ipe); }

.eyebrow {
  display: block;
  margin-bottom: var(--s-3);
  color: var(--ipe-soft);
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.band-ipe .eyebrow { color: var(--on-ipe-soft); }

.section-head { display: grid; gap: var(--s-4); margin-bottom: clamp(28px, 4vw, 56px); }
.section-head h2 { font-size: var(--t-h2); line-height: 1.06; letter-spacing: -0.018em; max-width: 20ch; }
.section-head p { color: var(--ipe-soft); max-width: 48ch; }
.section-head__side { display: grid; gap: var(--s-2); justify-items: start; align-content: end; }

.page-head { padding-block: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.022em; max-width: 18ch; }
.page-head__lead { margin-top: var(--s-4); max-width: 54ch; color: var(--ipe-soft); font-size: var(--t-body); }
.page-head--compact { padding-block: clamp(20px, 2.6vw, 32px) clamp(18px, 2vw, 28px); }
.page-head--compact h1 { max-width: none; font-size: clamp(2rem, 1.5rem + 1.6vw, 3.125rem); }
.page-head--compact .page-head__lead { margin-top: var(--s-2); }

.crumbs { padding-top: var(--s-4); font-size: var(--t-label); color: var(--ipe-soft); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--hair-strong); }
.crumbs a { text-decoration-color: var(--hair-strong); }
@media (max-width: 759px) { .crumbs { display: none; } .hide-mobile, .hide-phone { display: none; } }

/* Listing cards ---------------------------------------------------------- */

.card-grid { display: grid; gap: var(--s-7) var(--s-5); grid-template-columns: minmax(0, 1fr); }

.listing-card { position: relative; height: 100%; }
.listing-card__link { display: grid; grid-template-rows: auto 1fr; gap: var(--s-4); height: 100%; text-decoration: none; }
.listing-card__media {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-photo);
  overflow: hidden;
  background: var(--travertine);
  isolation: isolate;
}
.listing-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.listing-card__link:hover .listing-card__media img { transform: scale(1.03); }
.listing-card__tag { position: absolute; left: 12px; top: 12px; z-index: 1; background: var(--limestone); }
.listing-card__body { display: grid; align-content: start; gap: 2px; }
.listing-card__price {
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}
.listing-card__price small { font-family: var(--font-ui); font-size: var(--t-sm); letter-spacing: 0; color: var(--ipe-soft); }
.listing-card__address {
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: var(--t-body);
  font-weight: 600;
  line-height: 1.4;
  word-spacing: normal;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 200ms var(--ease);
}
.listing-card__link:hover .listing-card__address { text-decoration-color: var(--hair-strong); }
.listing-card__place, .listing-card__facts { font-size: var(--t-sm); line-height: 1.45; color: var(--ipe-soft); }
/* Facts break between items, never inside one. Each item carries its dot in a 16 px slot pulled over the previous item's
   end, so the dot of an item that starts a line falls outside the clipped box. */
.listing-card__facts { display: flex; flex-wrap: wrap; overflow: hidden; font-variant-numeric: tabular-nums lining-nums; }
.listing-card__facts > span { white-space: nowrap; margin-left: -16px; padding-right: 16px; }
.listing-card__facts > span::before { content: "\00B7"; display: inline-block; width: 16px; text-align: center; color: var(--oak); }

/* Rails: one card at a time on phones, the next card's photo peeks. */
.rail-wrap { position: relative; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(100% - 48px);
  gap: var(--s-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; min-width: 0; }
.rail > li .listing-card__body { transition: opacity 250ms var(--ease); }
.rail > li.is-peek .listing-card__body, .rail > li.is-peek .listing-card__tag { opacity: 0; }
.rail > li .listing-card__tag { transition: opacity 250ms var(--ease); }
.rail-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-4); }
.rail-count { font-size: var(--t-sm); color: var(--ipe-soft); font-variant-numeric: tabular-nums; }
.rail-count strong { color: var(--ipe); font-weight: 600; }
.rail-nav { display: flex; gap: var(--s-2); }
.round-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--hair-strong);
  border-radius: 50%;
  background: var(--limestone);
  color: var(--ipe);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), opacity 200ms;
}
.round-btn:hover { background: var(--limestone-deep); border-color: var(--ipe-soft); }
.round-btn:disabled { opacity: 0.35; cursor: default; }
.round-btn svg { width: 18px; height: 18px; }
html:not(.js) .rail-bar { display: none; }

/* Maps ----------------------------------------------------------------- */

/* Labels have a wide and a narrow layout (build.ts); each frame picks one by its own width. */
.map-frame { position: relative; width: 100%; container-type: inline-size; }
@container (max-width: 419.98px) { .map-label.only-w { display: none; } }
@container (min-width: 420px) { .map-label.only-n { display: none; } }
.map-frame > svg { width: 100%; height: 100%; }
.map-frame .land { fill: var(--limestone); stroke: var(--oak); stroke-width: 0.9; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-frame .contour { fill: none; stroke: var(--sand); stroke-width: 1; stroke-dasharray: 0.1 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-frame .causeway { fill: none; stroke: var(--oak); stroke-width: 1.3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-frame .road { fill: none; stroke: var(--sand); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-frame .road--main { stroke: #C8A98D; stroke-width: 4; stroke-linejoin: round; }
.map-frame .area .dot { fill: var(--ipe-soft); transition: fill 250ms var(--ease); }
.map-frame .area .halo { fill: var(--clay); opacity: 0; transition: opacity 250ms var(--ease); }
.map-frame .area .isle { transition: fill 250ms var(--ease), stroke 250ms var(--ease); }
.map-frame .area.is-active .dot { fill: var(--clay); }
.map-frame .area.is-active .halo { opacity: 0.18; }
.map-frame .area.is-active .isle { fill: #E9C9B8; stroke: var(--clay); }
.map-frame .leader { stroke: var(--oak-deep); stroke-width: 0.8; fill: none; vector-effect: non-scaling-stroke; }
.map-frame .pin { fill: var(--clay); }
.map-frame .pin-core { fill: var(--limestone); }
.map-frame .route { fill: none; stroke: var(--clay); stroke-width: 1.6; stroke-dasharray: 2 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.map-label {
  position: absolute;
  z-index: 1;
  padding: 1px 5px;
  border-radius: var(--r-label);
  color: var(--ipe-soft);
  font-size: var(--t-label);
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  transition: color 250ms var(--ease), background-color 250ms var(--ease);
}
.map-label[data-anchor="start"] { transform: translate(0, -50%); }
.map-label[data-anchor="end"] { transform: translate(-100%, -50%); text-align: right; }
.map-label[data-anchor="middle"] { transform: translate(-50%, -50%); text-align: center; }
.map-label--water { color: var(--oak-deep); font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.04em; word-spacing: 0.08em; }
.map-label--vertical { writing-mode: vertical-rl; transform: translate(-50%, -50%); }
.map-label--city { color: var(--oak-deep); font-family: var(--font-display); font-size: 1.125rem; letter-spacing: 0.22em; text-transform: uppercase; }
.map-label--strong { color: var(--ipe); font-weight: 600; background: rgba(245, 239, 233, 0.92); }
/* A name that has to cross a coastline on small frames sits on a chip of land color. */
.map-label--chip { background: rgba(245, 239, 233, 0.92); }
.map-label--pin { color: var(--ipe); font-weight: 600; background: var(--limestone); box-shadow: 0 0 0 1px var(--hair-strong); }
.map-label--minor { color: var(--ipe-soft); }
.map-label--road { color: var(--oak-deep); font-size: var(--t-label); letter-spacing: 0.02em; }
.map-label.is-active { color: var(--clay-deep); font-weight: 600; background: rgba(245, 239, 233, 0.92); }
.map-label.is-crowded { visibility: hidden; }
.map-note { margin-top: var(--s-3); font-size: var(--t-label); color: var(--ipe-soft); }

.bay-map { display: none; }
.bay-frame { background: var(--travertine); border-radius: var(--r-window); overflow: hidden; outline: 1px solid var(--hair); outline-offset: -1px; }
.band-travertine .bay-frame { outline-color: transparent; }

/* Home: hero ------------------------------------------------------------- */

.hero { display: flex; flex-direction: column; min-height: calc(100svh - var(--header-h) + 1px); padding-top: clamp(16px, 2.6vw, 32px); }
.hero__intro { display: grid; gap: var(--s-4); margin-bottom: clamp(20px, 2.6vw, 32px); }
.hero__title { font-size: var(--t-hero); line-height: 1; letter-spacing: -0.026em; }
.hero__title span { display: inline; }
.hero__aside { max-width: 40ch; color: var(--ipe-soft); }
.hero__stage { position: relative; display: flex; flex-direction: column; flex: 1 0 auto; }
.hero__window {
  position: relative;
  flex: 1 0 300px;
  border-radius: var(--r-window);
  overflow: hidden;
  background: var(--travertine);
  isolation: isolate;
}
.hero__window img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  max-width: calc(100% - 24px);
  padding: 9px 14px;
  border-radius: var(--r-field);
  background: var(--limestone);
  color: var(--ipe);
  font-size: var(--t-label);
  line-height: 1.35;
  text-decoration: none;
  box-shadow: 0 8px 20px -14px rgba(50, 34, 27, 0.7);
}
.hero__tag:hover .hero__tag-address { text-decoration: underline; text-underline-offset: 0.2em; }
.hero__tag-kicker { color: var(--ipe-soft); }
.hero__tag-address { font-weight: 600; }
.hero__tag-price { font-family: var(--font-display); font-size: 1rem; }

/* Search panel: a link builder, never a form. */
.search {
  position: relative;
  z-index: 2;
  margin-top: var(--s-4);
  padding: 10px;
  border-radius: var(--r-panel);
  background: var(--shell);
  box-shadow: var(--shadow-panel);
}
.search__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: center; }
.search__note { padding: 10px 6px 4px; font-size: var(--t-sm); line-height: 1.5; color: var(--ipe-soft); }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--limestone-deep);
  min-width: 0;
}
.segmented legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segmented--3 { grid-template-columns: repeat(3, 1fr); }
.segmented label { position: relative; display: block; }
.segmented input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ipe-soft);
  white-space: nowrap;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.segmented input:checked + span { background: var(--ipe); color: var(--on-ipe); }
.segmented input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }
.search .segmented { grid-column: 1 / -1; }

/* The whole field is the select's tap target; the label floats above the value. */
.field { position: relative; display: block; min-width: 0; min-height: 58px; border-radius: var(--r-field); transition: background-color 200ms var(--ease); }
.field:hover, .field:focus-within { background: var(--limestone-deep); }
.field label { position: absolute; left: 12px; top: 8px; z-index: 1; font-size: var(--t-label); line-height: 1.3; color: var(--ipe-soft); pointer-events: none; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 25px 34px 6px 12px;
  border: 0;
  border-radius: inherit;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23614E44' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px top 33px;
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  cursor: pointer;
}
.field select:focus { outline: none; }
.field:has(select:focus-visible) { outline: 2px solid var(--clay); outline-offset: 1px; }
.field--wide { grid-column: 1 / -1; }
.search__go { grid-column: 1 / -1; min-height: 52px; }

/* Home: sections ----------------------------------------------------------- */

.hoods__layout { display: grid; gap: var(--s-7); }
.hoods__list { border-top: 1px solid var(--sand); }
.hood {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--s-4);
  align-items: center;
  min-height: 44px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sand);
  text-decoration: none;
}
.hood__name { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; word-spacing: 0.04em; transition: color 250ms var(--ease); }
.hood__tagline { grid-column: 1; font-size: var(--t-sm); color: var(--ipe-soft); line-height: 1.4; }
.hood__meta { grid-column: 2; grid-row: 1 / span 2; display: grid; justify-items: end; text-align: right; font-size: var(--t-sm); line-height: 1.45; color: var(--ipe-soft); font-variant-numeric: tabular-nums lining-nums; }
.hood__meta strong { color: var(--ipe); font-weight: 600; }
.hood:hover .hood__name, .hood:focus-visible .hood__name, .hood.is-active .hood__name { color: var(--clay-deep); }

.record__layout { display: grid; gap: var(--s-7); }
.record__statement { margin-top: var(--s-5); max-width: 34ch; font-family: var(--font-display); font-size: var(--t-lead); line-height: 1.38; word-spacing: 0.05em; }
.record__story { display: grid; gap: var(--s-3); margin-top: var(--s-5); max-width: 52ch; color: var(--ipe-soft); }
.ledger { border-top: 1px solid var(--hair-strong); }
.ledger__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-5); padding: 16px 0 14px; border-bottom: 1px solid var(--hair); }
.ledger dt { font-size: var(--t-sm); color: var(--ipe-soft); }
.ledger dd { font-family: var(--font-display); font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums; white-space: nowrap; }
.ledger__source { margin-top: var(--s-3); font-size: var(--t-label); color: var(--ipe-soft); }

.services { display: grid; gap: 0; border-top: 1px solid var(--sand); }
.service { display: grid; gap: var(--s-2); padding: var(--s-5) 0; border-bottom: 1px solid var(--sand); align-content: start; }
.service h3 { font-size: 1.5rem; line-height: 1.2; }
.service p { color: var(--ipe-soft); max-width: 46ch; }
.service__num { font-family: var(--font-ui); font-size: var(--t-label); font-weight: 600; color: var(--oak-deep); letter-spacing: 0.06em; }

.team-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-4); }
.advisor-mini { display: grid; gap: 2px; align-content: start; }
/* Names, titles, languages and actions share one baseline across a row of advisors. */
@supports (grid-template-rows: subgrid) {
  .advisor-mini { grid-row: span 4; grid-template-rows: subgrid; row-gap: 2px; }
  .team-strip--actions .advisor-mini { grid-row: span 5; }
}
.advisor-mini__action { align-self: start; }
/* Home, phones: the six advisors in a rail, two at a time; the next one peeks with its portrait only. */
.rail.team-rail { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 2.25); gap: var(--s-4); }
.rail.team-rail > li.is-peek :is(h3, p) { opacity: 0; }
.rail.team-rail > li :is(h3, p) { transition: opacity 250ms var(--ease); }
.portrait { position: relative; aspect-ratio: 4 / 5; margin-bottom: var(--s-3); border-radius: var(--r-photo); overflow: hidden; background: var(--travertine); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.advisor-mini h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.advisor-mini__role { font-size: var(--t-sm); line-height: 1.4; color: var(--ipe-soft); }
.advisor-mini__langs { margin-top: 4px; font-size: var(--t-label); color: var(--ipe-soft); }

.quotes { display: grid; gap: var(--s-6); }
.quote { display: grid; gap: var(--s-4); align-content: start; padding-top: var(--s-5); border-top: 1px solid var(--hair-strong); }
.quote blockquote { margin: 0; }
.quote blockquote p { font-family: var(--font-display); font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem); line-height: 1.3; letter-spacing: -0.008em; word-spacing: 0.05em; }
.quote figcaption { font-size: var(--t-sm); color: var(--ipe-soft); line-height: 1.45; }
.quote figcaption strong { display: block; color: var(--ipe); font-weight: 600; }

.cta-band { display: grid; gap: var(--s-6); align-items: center; }
.cta-band__media { aspect-ratio: 4 / 3; border-radius: var(--r-photo); overflow: hidden; background: var(--ipe-2); }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band h2 { font-size: var(--t-h2); line-height: 1.06; letter-spacing: -0.018em; max-width: 16ch; }
.cta-band__text { margin-top: var(--s-4); max-width: 46ch; color: var(--on-ipe-soft); }
.band-travertine .cta-band__text { color: var(--ipe-soft); }
.cta-band__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-6); }
.band-ipe .text-link { color: var(--on-ipe); text-decoration-color: rgba(245, 239, 233, 0.4); }
.band-ipe :focus-visible { outline-color: var(--on-ipe); }

.mia-note { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-sm); color: var(--ipe-soft); line-height: 1.5; }
.mia-note img { width: 32px; height: 32px; flex: none; border-radius: 50%; }
.mia-note > span { min-width: 0; padding-top: 5px; }
.band-ipe .mia-note { color: var(--on-ipe-soft); }

/* Properties index ----------------------------------------------------------- */

.results-layout { display: grid; gap: var(--s-7); padding-bottom: var(--section); }
.filters { display: grid; gap: var(--s-3); padding: 10px; margin-bottom: var(--s-5); border-radius: var(--r-panel); background: var(--shell); box-shadow: 0 1px 0 var(--hair); }
.filters__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: center; }
.filters .field { min-height: 54px; }
.filters .field label { top: 6px; }
.filters .field select { padding-top: 23px; background-position: right 14px top 31px; }
.filters__grid .segmented { grid-column: 1 / -1; }
html:not(.js) .filters { display: none; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-5); }
.results-count { font-size: var(--t-body); font-weight: 500; }
.results-count span { color: var(--ipe-soft); font-weight: 400; }
.clear-filters { min-height: 44px; padding: 0; border: 0; background: none; font-size: var(--t-sm); font-weight: 500; text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 0.3em; }
.clear-filters[hidden] { display: none; }
.title-xl { font-size: var(--t-h2); line-height: 1.06; letter-spacing: -0.018em; max-width: 16ch; }
.results-empty { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-7) 0; border-top: 1px solid var(--hair); }
.results-empty[hidden] { display: none; }
.results-empty h2 { font-size: var(--t-h3); }
.results-aside { display: none; }
.results-map { margin-top: var(--s-7); }
.results-map .map-frame { background: var(--travertine); border-radius: var(--r-window); overflow: hidden; }
@media (max-width: 759px) { .results-main .page-head__lead { display: none; } }
@media (min-width: 760px) { .results-map { display: none; } }
.results-note { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--hair); }

/* Listing page ---------------------------------------------------------------- */

.listing-head { display: grid; gap: var(--s-3); padding-block: var(--s-4) var(--s-5); }
.listing-status { display: flex; flex-wrap: wrap; gap: 6px; }
.listing-head h1 { font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3.5rem); line-height: 1.05; letter-spacing: -0.022em; text-wrap: balance; }
.listing-head__place { color: var(--ipe-soft); font-size: var(--t-body); }
.listing-head__money { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-5); margin-top: var(--s-2); }
.property-price {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 1.5rem + 1.3vw, 2.625rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums;
}
.property-price small { font-family: var(--font-ui); font-size: var(--t-sm); letter-spacing: 0; color: var(--ipe-soft); }
/* Separators sit in each item's left padding; the first item of every line has its separator clipped. */
.specs { display: flex; flex-wrap: wrap; row-gap: 4px; margin-left: -25px; clip-path: inset(0 0 0 25px); font-size: var(--t-body); color: var(--ipe); font-variant-numeric: tabular-nums lining-nums; }
.specs > span { position: relative; padding-left: 25px; white-space: nowrap; }
.specs > span::before { content: ""; position: absolute; left: 12px; top: 50%; width: 1px; height: 0.95em; transform: translateY(-50%); background: var(--hair-strong); }
.listing-id { font-size: var(--t-label); color: var(--ipe-soft); font-variant-numeric: tabular-nums; }

/* Gallery: mosaic on wide screens, swipe rail on phones */
.gallery { position: relative; }
.gallery__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--r-window);
}
.gallery__rail::-webkit-scrollbar { display: none; }
.gallery__item { position: relative; scroll-snap-align: start; aspect-ratio: 3 / 2; background: var(--travertine); overflow: hidden; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.area-index-note { display: none; }
@media (min-width: 760px) { .area-index-note { display: block; } }
.gallery__item--more { display: none; }
.gallery__open {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-field);
  background: var(--limestone);
  color: var(--ipe);
  font-size: var(--t-sm);
  font-weight: 500;
  box-shadow: 0 8px 20px -14px rgba(50, 34, 27, 0.7);
}
.gallery__open:hover { background: #FFFFFF; }
@media (max-width: 1099px) { .gallery__open { display: none; } }
/* Phones and tablets: the photos link sits on the Listing ID line and adds no height, so the gallery photo fills the bottom of the first frame. */
.listing-id-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.photos-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-block: -12px; padding: 0; border: 0; background: none; color: var(--ipe); font-size: var(--t-sm); font-weight: 500; text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 0.3em; white-space: nowrap; }
.photos-link:hover { text-decoration-color: currentColor; }
.photos-link svg { width: 18px; height: 18px; flex: none; }
@media (min-width: 1100px) { .photos-link { display: none; } }
html:not(.js) .photos-link { display: none; }
.gallery__open svg { width: 18px; height: 18px; }
.gallery__count {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: var(--r-label);
  background: rgba(50, 34, 27, 0.78);
  color: var(--on-ipe);
  font-size: var(--t-label);
  font-variant-numeric: tabular-nums;
}
html:not(.js) .gallery__open, html:not(.js) .gallery__count { display: none; }
/* Phones and tablets swipe the photos; on desktop the three mosaic photos open the viewer. */
.gallery__zoom { display: none; }

/* Full-screen viewer */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #1E1511;
  color: var(--on-ipe);
}
.viewer[hidden] { display: none; }
.viewer__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 12px var(--gutter); }
.viewer__title { font-size: var(--t-sm); color: var(--on-ipe-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.viewer__list { display: contents; }
.viewer__slide { display: none; max-width: 100%; max-height: 100%; }
.viewer__slide.is-current { display: grid; justify-items: center; align-content: center; gap: var(--s-3); width: 100%; height: 100%; }
.viewer__slide img { max-width: 100%; max-height: calc(100svh - 190px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.viewer__caption { width: 100%; max-width: min(1200px, calc(100% - 140px)); margin-inline: auto; text-align: center; font-size: var(--t-sm); color: var(--on-ipe); }
.viewer__caption b { font-weight: 600; margin-right: 8px; color: var(--on-ipe-soft); font-variant-numeric: tabular-nums; }
.viewer__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(245, 239, 233, 0.35);
  border-radius: 50%;
  background: rgba(50, 34, 27, 0.6);
  color: var(--on-ipe);
}
.viewer__btn:hover { background: var(--ipe-2); border-color: var(--on-ipe); }
.viewer__btn svg { width: 18px; height: 18px; }
.viewer__btn:focus-visible { outline-color: var(--on-ipe); }
.viewer__prev, .viewer__next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.viewer__prev { left: 8px; }
.viewer__next { right: 8px; }
.viewer__bottom { height: 24px; }
body.has-viewer { overflow: hidden; }

/* Key facts bar */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair-strong);
}
.facts > div { display: grid; gap: 4px; align-content: start; padding: 16px 12px 16px 0; border-bottom: 1px solid var(--hair); }
.facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
.facts dt { font-size: var(--t-label); color: var(--ipe-soft); }
.facts dd { font-family: var(--font-display); font-size: 1.625rem; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: lining-nums; }
.facts dd small { font-family: var(--font-ui); font-size: var(--t-sm); letter-spacing: 0; color: var(--ipe-soft); }
.fact-baths dd small { display: block; margin-top: 2px; }
/* The values of one row start on the same line even when a label wraps ("Año de construcción" on a phone). */
@supports (grid-template-rows: subgrid) {
  .facts > div { grid-row: span 2; grid-template-rows: subgrid; }
}
/* Phones: the facts row reaches the first frame; units drop under the numbers and the right column ends before the launcher corner. */
@media (max-width: 759px) {
  .facts { padding-right: 80px; }
  .facts dd small { display: block; margin-top: 2px; }
}

.listing-body { display: grid; gap: var(--s-8); padding-block: clamp(40px, 5vw, 80px) var(--section); }
.listing-main { display: grid; gap: clamp(48px, 6vw, 88px); min-width: 0; }
.block h2 { font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.015em; margin-bottom: var(--s-5); }
.block__lead { max-width: 34ch; margin-bottom: var(--s-5); font-family: var(--font-display); font-size: var(--t-lead); line-height: 1.32; letter-spacing: -0.006em; word-spacing: 0.05em; }
.prose { display: grid; gap: 1.05em; max-width: 64ch; }
.prose p { font-family: var(--font-display); font-size: 1.125rem; line-height: 1.66; word-spacing: 0.07em; }

.highlights { display: grid; border-top: 1px solid var(--hair-strong); }
.highlights li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); padding: 13px 0; border-bottom: 1px solid var(--hair); line-height: 1.45; }
.highlights li::before { content: ""; width: 12px; height: 1px; margin-top: 0.75em; background: var(--oak); }

.materials { display: grid; gap: var(--s-4); }
.material { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--s-4); row-gap: 2px; align-content: start; }
.material__swatch { grid-row: 1 / span 2; aspect-ratio: 1; border-radius: var(--r-photo); overflow: hidden; background: var(--travertine); }
.material h3 { align-self: end; }
.material__swatch img { width: 100%; height: 100%; object-fit: cover; }
.material h3 { font-size: 1.1875rem; line-height: 1.25; }
.material p { font-size: var(--t-sm); color: var(--ipe-soft); line-height: 1.45; }
.materials-note { margin-top: var(--s-5); font-size: var(--t-label); color: var(--ipe-soft); }

.features { display: grid; gap: var(--s-6); }
.features h3 { margin-bottom: var(--s-3); font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--ipe-soft); word-spacing: normal; }
.features ul { border-top: 1px solid var(--hair-strong); }
.features li { padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-sm); line-height: 1.45; }

.details { width: 100%; border-collapse: collapse; font-size: var(--t-sm); border-top: 1px solid var(--hair-strong); }
.details th, .details td { padding: 11px 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; line-height: 1.45; }
.details th { width: 42%; padding-right: var(--s-4); color: var(--ipe-soft); font-weight: 400; }
.details td { font-variant-numeric: tabular-nums lining-nums; }
.details-wrap { display: grid; gap: 0; align-items: start; }

.setting { display: grid; gap: var(--s-5); }
.setting__intro { max-width: 56ch; }
.local-map { border-radius: var(--r-window); overflow: hidden; background: var(--travertine); outline: 1px solid var(--hair); outline-offset: -1px; }
.drive-times { border-top: 1px solid var(--hair-strong); }
.setting .drive-times, .area__drive .drive-times { display: block; }
.drive-times li { display: flex; justify-content: space-between; gap: var(--s-4); padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-sm); }
.drive-times span:last-child { color: var(--ipe-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Site plans: a wide drawing between the neighbors, or a crop on the lot below 520 px (build.ts). */
.plan { container: plan / inline-size; }
@container plan (max-width: 519.98px) { .siteplan--w { display: none; } }
@container plan (min-width: 520px) { .siteplan--n { display: none; } }
.siteplan { border-radius: var(--r-window); overflow: hidden; background: var(--limestone-deep); border: 1px solid var(--hair); }
.siteplan--n { max-width: 440px; }
.siteplan .water { fill: var(--travertine); }
.siteplan .water-line { fill: none; stroke: var(--oak); stroke-width: 1; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.siteplan .beach { fill: #EFE3D2; }
.siteplan .lot { fill: var(--limestone); stroke: var(--oak); stroke-width: 1.2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.siteplan .seawall { stroke: var(--ipe-soft); stroke-width: 3; vector-effect: non-scaling-stroke; }
.siteplan .house { fill: var(--travertine); stroke: var(--oak-deep); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.siteplan .lot--neighbor { fill: none; stroke: var(--sand); stroke-dasharray: 4 5; }
.siteplan .house--neighbor { fill: var(--limestone-deep); stroke: var(--sand); }
.siteplan .pool { fill: #BFD8D6; stroke: #7FA6A2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.siteplan .dock { fill: #D9C2A5; stroke: var(--oak-deep); stroke-width: 1; vector-effect: non-scaling-stroke; }
.siteplan .garden { fill: var(--limestone-deep); }
.siteplan .dim { stroke: var(--clay); stroke-width: 1.2; fill: none; vector-effect: non-scaling-stroke; }
.siteplan .tick { stroke: var(--clay); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.siteplan .street { fill: var(--sand); }
.siteplan .map-label--pool { color: var(--ipe); font-weight: 600; font-size: var(--t-label); padding: 0 4px; }
.siteplan .map-label--street { color: var(--ipe); }
.siteplan .map-label--water, .siteplan .map-label--dock { background: var(--travertine); }
.siteplan .map-label--dim { color: var(--clay-deep); font-weight: 600; background: rgba(245, 239, 233, 0.94); }

/* Advisor card */
.listing-aside { min-width: 0; order: -1; }
.agent-card { display: grid; gap: var(--s-5); padding: var(--s-5); border-radius: var(--r-panel); background: var(--shell); border: 1px solid var(--hair); }
.agent-card__head { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.agent-card .portrait { margin: 0; border-radius: 12px; }
.agent-card__label { font-size: var(--t-label); color: var(--ipe-soft); }
.agent-card__name { margin-top: 2px; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; }
.agent-card__role { font-size: var(--t-sm); color: var(--ipe-soft); line-height: 1.4; }
.agent-card__langs { padding-block: var(--s-3); border-block: 1px solid var(--hair); font-size: var(--t-sm); color: var(--ipe-soft); }
.agent-card__langs strong { color: var(--ipe); font-weight: 500; }
.agent-card__actions { display: grid; gap: var(--s-3); }

.closing { padding-block: clamp(56px, 7vw, 104px); }
.closing__inner { display: grid; gap: var(--s-6); align-items: center; }
.closing h2 { font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.018em; }
.closing__text { margin-top: var(--s-4); max-width: 46ch; color: var(--ipe-soft); }
.closing__person { display: flex; gap: var(--s-4); align-items: center; }
.closing__person .portrait { width: 84px; margin: 0; border-radius: 12px; flex: none; }
.closing__person p { font-size: var(--t-sm); color: var(--ipe-soft); line-height: 1.45; }
.closing__person strong { display: block; color: var(--ipe); font-family: var(--font-display); font-size: 1.375rem; font-weight: 400; line-height: 1.2; word-spacing: 0.04em; }
.closing__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); margin-top: var(--s-5); }
@media (max-width: 759px) { .closing__actions .btn { width: 100%; } }

/* Neighborhoods page */
.area-jump { display: grid; gap: 4px; max-width: 420px; padding: 8px 12px 9px; border: 1px solid var(--hair); border-radius: var(--r-field); background: var(--shell); }
.area-jump label { font-size: var(--t-label); color: var(--ipe-soft); }
.area-jump select { appearance: none; -webkit-appearance: none; min-height: 44px; padding: 0 24px 0 0; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23614E44' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 2px center; font-size: var(--t-body); font-weight: 500; }
html:not(.js) .area-jump { display: none; }
.area-index { display: none; }
@media (min-width: 760px) { .area-jump { display: none; } .area-index { display: grid; } }
.area-index { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); border-top: 1px solid var(--hair); }
.area-index a { display: flex; align-items: center; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-sm); font-weight: 500; text-decoration: none; }
.area-index a:hover, .area-index a.is-active { color: var(--clay-deep); }
.area { padding-block: clamp(48px, 6vw, 88px); border-top: 1px solid var(--hair-strong); }
.area__head { display: grid; gap: var(--s-6); margin-bottom: var(--s-6); }
.area__title h2 { font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.018em; }
.area__tagline { margin-top: var(--s-2); font-family: var(--font-display); font-size: var(--t-lead); color: var(--ipe-soft); word-spacing: 0.05em; }
.area__desc { max-width: 60ch; margin-top: var(--s-4); }
.area__cta { margin-top: var(--s-5); }
.drive-times--single { display: block !important; }
.area__facts { display: grid; margin-top: var(--s-5); border-top: 1px solid var(--hair-strong); }
.area__facts li { padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-sm); line-height: 1.5; }
.area__aside { display: grid; gap: var(--s-5); align-content: start; }
@media (min-width: 1100px) { .area__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .area__aside { grid-template-columns: 1fr; } }
.area__count { margin-bottom: var(--s-3); font-size: var(--t-label); font-weight: 600; letter-spacing: 0.04em; color: var(--ipe-soft); }

/* Team page */
.team-mosaic { display: none; }
.advisor { display: grid; gap: var(--s-6); padding-block: clamp(48px, 6vw, 88px); border-top: 1px solid var(--hair-strong); }
.advisor__profile { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "photo head" "facts facts" "cta cta"; gap: var(--s-4) var(--s-5); align-items: center; }
.advisor__profile .portrait { grid-area: photo; margin: 0; }
.advisor__head { grid-area: head; }
.advisor__profile .advisor__facts { grid-area: facts; margin-top: var(--s-2); }
.advisor__profile .advisor__cta { grid-area: cta; margin-top: var(--s-2); }
.advisor h2 { font-size: var(--t-h2); line-height: 1.04; letter-spacing: -0.018em; }
.advisor__role { margin-top: var(--s-2); font-size: var(--t-body); color: var(--ipe-soft); }
.advisor__facts { display: grid; margin-top: var(--s-5); border-top: 1px solid var(--hair-strong); }
.advisor__facts div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--s-4); padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: var(--t-sm); }
.advisor__facts dt { color: var(--ipe-soft); }
.advisor__cta { margin-top: var(--s-5); }
.advisor__listings-title { margin-bottom: var(--s-4); font-family: var(--font-ui); font-size: var(--t-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ipe-soft); word-spacing: normal; }
.page-split { padding-bottom: clamp(32px, 4vw, 56px); }
.jump-list { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin-top: var(--s-5); }
.jump-list a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-sm); font-weight: 500; text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 0.3em; }

/* Sell, contact, privacy */
.split { display: grid; gap: var(--s-7); align-items: start; }
.split__media { aspect-ratio: 4 / 3; border-radius: var(--r-window); overflow: hidden; background: var(--travertine); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.steps { display: grid; counter-reset: step; border-top: 1px solid var(--hair-strong); }
.step { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-5) 0; border-bottom: 1px solid var(--hair); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; color: var(--oak-deep); }
.step h3 { font-size: 1.375rem; line-height: 1.2; }
.step p { margin-top: var(--s-2); color: var(--ipe-soft); max-width: 52ch; }
.checklist { display: grid; border-top: 1px solid var(--hair-strong); }
.checklist li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--hair); line-height: 1.5; }
.checklist li::before { content: ""; width: 12px; height: 1.5px; margin-top: 0.75em; background: var(--oak); }
.contact-lines { display: grid; gap: var(--s-5); }
.contact-line { display: grid; gap: 4px; padding-bottom: var(--s-5); border-bottom: 1px solid var(--hair); }
.contact-line dt { font-size: var(--t-label); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ipe-soft); }
.contact-line dd { font-size: var(--t-body); line-height: 1.55; }
.contact-line dd a { text-decoration-color: var(--hair-strong); }
.contact-line__link { display: inline-flex; align-items: center; min-height: 44px; }
.contact-line .big { font-family: var(--font-display); font-size: 1.625rem; line-height: 1.25; word-spacing: 0.04em; }
.legal { max-width: 68ch; }
.page-intro { padding-bottom: var(--section); }
.page-head--legal { padding-bottom: 0; }
.page-head__lead--spaced { margin-top: var(--s-5); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.actions-note { margin-top: var(--s-5); }
.section-head--stack { grid-template-columns: 1fr !important; margin: 0; }
.quote--on-travertine { margin-top: var(--s-6); border-top-color: var(--sand); }
.ledger--on-travertine { border-top-color: var(--sand); }
.ledger--on-travertine .ledger__row { border-bottom-color: var(--sand); }
.contact-line__action { margin-top: var(--s-4); }
.advisor-mini__action { margin-top: var(--s-2); }
.legal h2 { margin-top: var(--s-7); margin-bottom: var(--s-3); font-size: var(--t-h3); line-height: 1.2; }
.legal p, .legal li { line-height: 1.65; }
.legal p + p { margin-top: var(--s-3); }
.legal ul { display: grid; gap: var(--s-2); margin-top: var(--s-3); padding-left: 1.1em; list-style: disc; }
.legal ul li::marker { color: var(--oak-deep); }
.legal ul + p { margin-top: var(--s-4); }
.legal .updated { margin-top: var(--s-7); font-size: var(--t-label); color: var(--ipe-soft); }

/* Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--ipe);
  color: var(--on-ipe);
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: calc(var(--s-7) + env(safe-area-inset-bottom, 0px));
  font-size: var(--t-sm);
}
.site-footer a { text-decoration-color: rgba(245, 239, 233, 0.35); }
.site-footer a:hover { text-decoration-color: currentColor; }
.site-footer :focus-visible { outline-color: var(--on-ipe); }
.footer__top { display: grid; gap: var(--s-7); padding-bottom: var(--s-7); border-bottom: 1px solid #4E3B32; }
.footer__brand img { width: auto; height: 38px; }
.footer__brand p { margin-top: var(--s-4); max-width: 32ch; color: var(--on-ipe-soft); }
.footer__nav { display: grid; gap: var(--s-6) var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer__col--wide { grid-column: 1 / -1; }
@media (min-width: 760px) { .footer__nav { gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } .footer__col--wide { grid-column: auto; } }
.footer__col h2 { margin-bottom: var(--s-3); font-family: var(--font-ui); font-size: var(--t-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ipe-soft); word-spacing: normal; }
.footer__col ul { display: grid; gap: 2px; }
.footer__col li a, .footer__col .footer-mia { display: inline-block; padding: 11px 0; line-height: 22px; }
.footer__col address { line-height: 1.6; }
.footer__col p { margin-top: var(--s-3); color: var(--on-ipe-soft); line-height: 1.55; }
.footer-mia { padding: 0; border: 0; background: none; color: var(--on-ipe); text-align: left; text-decoration: underline; text-decoration-color: rgba(245, 239, 233, 0.35); text-underline-offset: 0.22em; }
.footer__bottom { display: grid; gap: var(--s-5); padding-top: var(--s-6); color: var(--on-ipe-soft); }
.footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-5); }
.footer__legal a { display: inline-block; padding-block: 11px; }
.footer__eho { display: inline-flex; align-items: center; gap: 12px; color: var(--on-ipe); }
.footer__eho svg { width: 34px; height: 34px; flex: none; }
.footer__fiction { max-width: 74ch; font-size: var(--t-label); line-height: 1.55; color: var(--on-ipe-soft); }

/* Tablet ------------------------------------------------------------------ */

@media (min-width: 760px) {
  :root { --gutter: 32px; --header-h: 80px; }
  .brand img { height: 32px; }

  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); align-items: end; column-gap: var(--s-7); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; gap: var(--s-7) var(--s-5); scroll-snap-type: none; }
  .rail > li.is-peek .listing-card__body, .rail > li.is-peek .listing-card__tag { opacity: 1; }
  .rail-bar { display: none; }

  .hero { min-height: 0; }
  .hero__intro { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: end; column-gap: var(--s-7); }
  .hero__title span { display: block; }
  .hero__window { flex: none; height: clamp(340px, 52vw, 520px); }
  .hero__tag { left: 18px; top: 18px; }
  .search { margin-top: -48px; margin-left: 18px; width: min(860px, calc(100% - 36px)); padding: 8px; }
  .search__grid { grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
  .search .segmented { grid-column: auto; margin-right: 4px; }
  .search .field--wide { grid-column: auto; }
  .search__go { grid-column: 1 / -1; }

  .bay-map { display: block; }
  .team-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
  .rail.team-rail { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
  .rail.team-rail > li.is-peek :is(h3, p) { opacity: 1; }
  .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); }
  .cta-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }

  .filters__grid { grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
  .filters .field { border-left: 1px solid var(--hair); border-radius: 0; }
  .filters .field select { font-size: var(--t-sm); }
  .filters .field:hover, .filters .field:focus-within { border-radius: var(--r-field); border-left-color: transparent; }
  .filters__grid .segmented { grid-column: auto; margin-right: 4px; }
  .filters__grid .field--wide { grid-column: auto; }

  .gallery__rail { grid-auto-columns: 100%; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts > div { padding: 18px 18px 18px 0; }
  .facts > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--hair); }
  .facts > div:nth-last-child(-n + 3) { border-bottom: 0; }
  .materials { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
  .materials--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .material { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 4px; }
  .material__swatch { grid-row: auto; margin-bottom: var(--s-3); }
  .material h3 { align-self: auto; }
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .highlights { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }
  .prose p { font-size: var(--t-read); }
  .drive-times { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }
  .details-wrap { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); }
  .closing__inner { grid-template-columns: auto auto; justify-content: start; column-gap: 64px; }

  .area-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .area__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s-7); }
  .advisor__profile { grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "photo head" "photo facts" "photo cta"; grid-template-rows: auto auto 1fr; gap: 0 var(--s-6); align-items: start; }
  .advisor__profile .advisor__facts { margin-top: var(--s-5); }
  .advisor__profile .advisor__cta { margin-top: var(--s-5); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
  .footer__top { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); }
  .footer__bottom { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}

/* Desktop ------------------------------------------------------------------ */

@media (min-width: 1100px) {
  :root { --gutter: 40px; --header-h: 84px; }
  .brand img { height: 34px; }
  .site-nav { display: block; }
  .header-actions { display: flex; }
  .menu-toggle, .mobile-menu { display: none !important; }

  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) clamp(20px, 2.2vw, 32px); }
  .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) clamp(20px, 2.2vw, 32px); }

  .hero__intro { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
  .hero__window { height: clamp(300px, calc(100svh - 372px), 600px); }
  .search { margin-top: -60px; margin-left: 24px; width: min(900px, calc(100% - 48px)); }
  .search__grid { grid-template-columns: auto minmax(0, 1.35fr) minmax(0, 0.9fr) minmax(0, 1fr) auto; }
  .search__go { grid-column: auto; margin-left: 4px; padding-inline: 22px; }
  .search .field { border-left: 1px solid var(--hair); border-radius: 0; }
  .search .field:hover, .search .field:focus-within { border-radius: var(--r-field); border-left-color: transparent; }
  .search__note { padding: 8px 12px 2px; }

  .hoods__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(48px, 6vw, 112px); align-items: start; }
  .hoods .section-head { grid-template-columns: 1fr; }
  .hoods__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); border-top: 0; }
  .hoods__list .hood { grid-template-columns: 1fr; gap: 2px; padding: 16px 0; border-top: 1px solid var(--sand); border-bottom: 0; align-content: start; height: 100%; }
  .hoods__list .hood__meta { grid-column: 1; grid-row: auto; justify-items: start; text-align: left; display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 4px; }
  .hoods__list .hood__meta span::before { content: "\00B7"; margin-right: 8px; color: var(--oak); }
  .record__layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(48px, 7vw, 120px); }
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-strip, .rail.team-rail { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-5); }

  .filters .segmented span { padding: 0 12px; }

  .listing-head { padding-block: var(--s-5) var(--s-5); }
  .gallery__rail {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    grid-auto-flow: row;
    gap: 10px;
    overflow: hidden;
    height: clamp(300px, calc(100svh - 420px), 680px);
    border-radius: var(--r-window);
    scroll-snap-type: none;
  }
  .gallery__item { aspect-ratio: auto; border-radius: 0; }
  .gallery__item:first-child { grid-row: 1 / span 2; }
  .gallery__item:nth-child(n + 4) { display: none; }

  .gallery__count { display: none; }

  .facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .facts > div { padding: 20px 18px 20px 22px; border-bottom: 0; border-left: 1px solid var(--hair); }
  .facts > div:first-child { border-left: 0; padding-left: 0; }
  .facts > div:nth-last-child(-n + 3) { border-bottom: 0; }

  .listing-body { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: clamp(48px, 6vw, 96px); align-items: start; }
  .listing-aside { order: 0; }
  .gallery__zoom { display: block; position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; transition: background-color 200ms var(--ease); }
  .gallery__zoom:hover { background: rgba(245, 239, 233, 0.08); }
  /* Two-tone ring: visible on bright sky and water as on dark interiors. */
  .gallery__zoom:focus-visible { outline: 3px solid var(--ipe); outline-offset: -6px; box-shadow: inset 0 0 0 9px var(--limestone); border-radius: 8px; }
  .setting { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: var(--s-6); align-items: start; }
  .setting__intro, .setting .map-note-wrap { grid-column: 1 / -1; }

  .page-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(40px, 6vw, 104px); align-items: start; }
  .team-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .team-mosaic .portrait { margin: 0; }
  .advisor { gap: var(--s-7); }
  .advisor__profile { grid-template-columns: 260px minmax(0, 760px); gap: 0 var(--s-7); }
  .advisor .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
  .advisor .listing-card__price { font-size: 1.375rem; }
}

/* Properties: the drawn map stays in view while the list scrolls, sized so it never reaches the corner kept for the
   chat launcher. It needs a window at least 660 px tall to stay legible (about 330 px wide); shorter windows list the homes only. */
@media (min-width: 1100px) and (min-height: 660px) {
  .results-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(32px, 4vw, 64px); align-items: start; }
  .results-layout .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-aside { display: block; position: sticky; top: calc(var(--header-h) + 16px); padding-top: 16px; }
  .results-aside .map-frame { width: min(100%, calc((100svh - var(--header-h) - 16px - 16px - 150px) * 0.8352)); margin-left: auto; }
}
@media (min-width: 1400px) and (min-height: 660px) {
  .results-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
}

@media (min-width: 1280px) {
  .search { width: min(900px, calc(100vw - 420px - 2 * var(--gutter) - 24px)); }
}
/* Spanish search bar: "Comprar", "Buscar propiedades" and "Indistinto" are longer than their English labels. The fields share
   the room by what they show, the toggle and the button lose a little padding, and from 1280 px the bar may reach the edge
   of the corner kept for the pop-up card (420 px), still clear of it. The button joins the fields' row from 1024 px
   (960 px in English). */
@media (min-width: 960px) {
  :root:lang(es) .search .segmented span { padding: 0 12px; }
  :root:lang(es) .search__go { padding-inline: 18px; }
}
@media (min-width: 960px) and (max-width: 1023px) {
  :root:lang(es) .search__grid { grid-template-columns: auto minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1fr); }
  :root:lang(es) .search__go { grid-column: 1 / -1; margin-left: 0; }
}
@media (min-width: 1024px) {
  :root:lang(es) .search__grid { grid-template-columns: auto minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
}
@media (min-width: 1280px) {
  :root:lang(es) .search { width: min(900px, calc(100vw - 380px - 2 * var(--gutter) - 24px)); }
}
/* Spanish filters: under 1340 px the Show toggle takes its own row, so every field shows its value whole. */
@media (min-width: 760px) and (max-width: 1339px) {
  :root:lang(es) .filters__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  :root:lang(es) .filters__grid .segmented { grid-column: 1 / -1; justify-self: start; margin: 0 0 4px; }
  :root:lang(es) .filters__grid .segmented + .field { border-left-color: transparent; }
}
/* Spanish home title: its first line ("Residencias en Miami con luz,") stays whole from 1280 px. */
@media (min-width: 1280px) and (max-width: 1365px) {
  :root:lang(es) .hero__title { font-size: calc(var(--t-hero) * 0.94); }
}
/* Spanish labels are longer: on narrow desktops the header tightens its spacing and the logo steps down a little. */
@media (min-width: 1100px) and (max-width: 1279px) {
  :root:lang(es) .brand img { height: 30px; }
  :root:lang(es) .site-header__inner { gap: 16px; }
  :root:lang(es) .site-nav ul { gap: 16px; }
  :root:lang(es) .header-actions { gap: 8px; }
}

.hover-hint { display: none; }
@media (hover: hover) and (min-width: 1100px) {
  .hover-hint { display: inline; }
}

/* Phones: the window fills the rest of the first frame, so the search controls start below it; the frame is held on the yacht and the pool. */
@media (max-width: 759px) {
  .hero__aside { font-size: 1rem; }
  .hero__window img { object-position: 35% 62%; }
}
/* Tablets: the lead sits under the title and the window is capped, so the search stays in the first frame. */
@media (min-width: 760px) and (max-width: 1099px) {
  .hero__intro { grid-template-columns: minmax(0, 1fr); }
  .hero__window { height: clamp(300px, calc(100svh - 410px), 520px); }
}
/* Landscape tablets: the search button joins the fields' row, and the panel stops short of the launcher corner. */
@media (min-width: 960px) and (max-width: 1099px) {
  .search { width: min(860px, calc(100% - 156px)); }
  .search__grid { grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 1fr) auto; }
  .search__go { grid-column: auto; margin-left: 4px; padding-inline: 20px; }
}
/* Without JavaScript the menu button does nothing: show the navigation itself. */
html:not(.js) .menu-toggle { display: none; }
html:not(.js) .site-nav { display: block; }
@media (max-width: 1099px) {
  html:not(.js) .site-header__inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { order: 3; width: 100%; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; gap: 0 var(--s-5); padding-bottom: var(--s-2); }
  html:not(.js) .header-actions { display: flex; }
  html:not(.js) .mia-cta--header { display: none; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 2.125rem; }
  .brand img { height: 26px; }
  .site-header__inner { gap: var(--s-3); }
  .menu-toggle { padding-left: 4px; }
  .hood { grid-template-columns: 1fr; }
  .hood__meta { grid-column: 1; grid-row: auto; justify-items: start; text-align: left; }
  .advisor__profile { grid-template-columns: 96px minmax(0, 1fr); }
}

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