/* =====================================================================
   MARTIN FROM LAS VEGAS, REFRESH
   Quiet luxury. Aman restraint. Space as the material.
   Two voices: Cormorant Garamond (serif) + Jost (sans). Nothing more.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------------- */
:root {
    /* Warm monochrome palette */
    --bone:      #f5f2ec;   /* page */
    --bone-2:    #efebe2;   /* alternate band */
    --ink:       #1b1815;   /* near-black, warm */
    --ink-soft:  #423b33;
    --muted:     #8c857b;   /* warm grey text */
    --line:      rgba(27, 24, 21, 0.14);
    --line-soft: rgba(27, 24, 21, 0.07);
    --espresso:  #1b1815;   /* dark sections */
    --accent:    #a8895f;   /* muted bronze, used sparingly */
    --white:     #ffffff;
    --on-dark:   #efe9df;
    --on-dark-muted: rgba(239, 233, 223, 0.55);

    /* Type */
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans:  'Jost', system-ui, -apple-system, sans-serif;

    /* Fluid display sizes */
    --d1: clamp(3.4rem, 2rem + 7vw, 8.5rem);
    --d2: clamp(2.6rem, 1.6rem + 4.2vw, 5.25rem);
    --d3: clamp(2.1rem, 1.5rem + 2.6vw, 3.75rem);
    --d4: clamp(1.6rem, 1.3rem + 1.3vw, 2.25rem);

    /* Layout */
    --maxw: 1340px;
    --maxw-narrow: 760px;
    --gutter: clamp(1.5rem, 5vw, 5.5rem);
    --section-y: clamp(7rem, 4rem + 12vw, 17rem);

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --slow: 1.25s;
}

/* ---------------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ink);
    background: var(--bone);
    /* hidden can turn body into its own scroll container on some mobile engines,
       which kills window-scroll-driven UI (header, progress, reveals) and causes
       jank; clip prevents horizontal overflow without creating a scroller.
       (hidden first as fallback for pre-clip browsers) */
    overflow-x: hidden;
    overflow-x: clip;
    letter-spacing: 0.01em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--ink); color: var(--bone); }

::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bone); }
::-webkit-scrollbar-thumb { background: rgba(27, 24, 21, 0.18); }

/* ---------------------------------------------------------------------
   3. TYPE PRIMITIVES
   --------------------------------------------------------------------- */
.serif { font-family: var(--serif); font-weight: 300; }

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.06;
    letter-spacing: -0.01em;
    color: var(--ink);
}

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

p { max-width: 60ch; }

.lede {
    font-family: var(--serif);
    font-weight: 300;
    font-size: var(--d4);
    line-height: 1.35;
    color: var(--ink-soft);
    letter-spacing: 0;
}

/* Quiet text link with animated underline */
.link {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.35rem;
    position: relative;
    width: max-content;
}
.link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.6s var(--ease);
}
.link:hover::after { transform: scaleX(0); transform-origin: right; }
.link svg { transition: transform 0.5s var(--ease); }
.link:hover svg { transform: translateX(6px); }
.link--light { color: var(--on-dark); }

/* ---------------------------------------------------------------------
   4. LAYOUT
   --------------------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(4rem, 3rem + 5vw, 7rem); }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .eyebrow { margin-bottom: 1.4rem; }
.section-head h2 { font-size: var(--d3); }
.section-head--center { text-align: center; }
.section-head--center h2 { margin-inline: auto; }

/* ---------------------------------------------------------------------
   5. BUTTONS
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 1.15rem 2.6rem;
    border: 1px solid var(--ink);
    color: var(--ink);
    background: transparent;
    transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bone); }
.btn--solid { background: var(--ink); color: var(--bone); }
.btn--solid:hover { background: transparent; color: var(--ink); }
.btn--light { border-color: rgba(239, 233, 223, 0.5); color: var(--on-dark); }
.btn--light:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }

/* ---------------------------------------------------------------------
   6. HEADER
   --------------------------------------------------------------------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding-block: clamp(1.4rem, 2.5vw, 2.2rem);
    transition: background 0.6s var(--ease), padding 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.site-header__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--on-dark);
    transition: color 0.6s var(--ease);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
}
.brand__emblem { width: 34px; height: 34px; flex: none; }
.brand__wm { display: block; }
.brand__sub { display: block; font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.32em; text-transform: uppercase; margin-top: 0.45rem; opacity: 0.7; }

.site-header__right { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.6rem); }
.nav { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.8rem); }
.nav a {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--on-dark);
    opacity: 0.85;
    transition: opacity 0.4s var(--ease), color 0.6s var(--ease);
    position: relative;
}
.nav a:hover { opacity: 1; }
.nav__sep { width: 1px; height: 16px; background: currentColor; opacity: 0.3; }
.lang { display: inline-flex; gap: 0.35rem; font-size: 0.72rem; letter-spacing: 0.12em; opacity: 0.85; }
.lang b { font-weight: 500; transition: opacity 0.3s var(--ease); }
.lang span { opacity: 0.45; transition: opacity 0.3s var(--ease); }
.lang.is-es b { opacity: 0.45; font-weight: 400; }
.lang.is-es span:last-child { opacity: 1; font-weight: 500; }

/* Scrolled state */
.site-header.is-scrolled {
    background: var(--bone);
    padding-block: 1.1rem;
    box-shadow: 0 1px 0 var(--line-soft);
}
.site-header.is-scrolled .brand,
.site-header.is-scrolled .nav a { color: var(--ink); }

/* Mobile: animating padding re-runs layout every frame of the 600ms transition,
   right as the header flips state mid-scroll — visible jank on phones. Let the
   padding snap there; only paint-cheap properties keep their transition. */
@media (pointer: coarse), (max-width: 820px) {
    .site-header { transition: background 0.6s var(--ease), box-shadow 0.6s var(--ease); }
}

/* In-page anchors (e.g. /buy/#search) land under the fixed header without this */
[id] { scroll-margin-top: 5.5rem; }

/* Menu trigger, opens the full overlay on every viewport */
.menu-btn { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--on-dark); opacity: 0.85; transition: color 0.6s var(--ease), opacity 0.4s var(--ease); }
.menu-btn:hover { opacity: 1; }
.menu-btn__txt { font-family: var(--sans); font-weight: 400; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.menu-btn__bars { display: inline-flex; flex-direction: column; gap: 5px; }
.menu-btn__bars span { width: 22px; height: 1px; background: currentColor; display: block; transition: background 0.6s var(--ease); }
.site-header.is-scrolled .menu-btn,
.site-header.is-solid .menu-btn { color: var(--ink); }

/* Scroll progress, a single bronze hairline that fills as you read.
   No transition: it's updated every frame from JS, and a transition on top of
   per-frame writes makes the bar lag and stutter (worst on mobile). */
.scroll-prog {
    position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300;
    background: var(--accent);
    transform: scaleX(0); transform-origin: left;
}

/* ---------------------------------------------------------------------
   7. HERO
   --------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    color: var(--on-dark);
    overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to top, rgba(10,8,6,0.72) 0%, rgba(10,8,6,0.25) 42%, rgba(10,8,6,0.15) 100%);
}
.hero__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: var(--gutter);
    padding-bottom: clamp(4rem, 9vh, 9rem);
    width: 100%;
}
.hero .eyebrow { color: rgba(239, 233, 223, 0.75); margin-bottom: 1.8rem; }
.hero h1 {
    font-size: var(--d1);
    color: var(--on-dark);
    max-width: 16ch;
    margin-bottom: 2.2rem;
}
.hero h1 em { font-style: italic; }
.hero__actions { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.5rem); flex-wrap: wrap; }

/* Hero headline, line-by-line rise on load (no clip, so glyphs can't be cut and it
   stays readable even if the entrance never fires) */
.hero h1 .line { display: block; }
.hero h1 .inner { display: block; transform: translateY(0.6em); transition: transform 1.05s var(--ease); }
.hero h1 .line:nth-child(2) .inner { transition-delay: 0.12s; }
.hero.is-ready h1 .inner { transform: none; }

/* ---------------------------------------------------------------------
   7b. CINEMATIC STATEMENT
   --------------------------------------------------------------------- */
.statement {
    position: relative;
    color: var(--on-dark);
    text-align: center;
    overflow: hidden;
}
.statement__media { position: absolute; inset: 0; z-index: -2; }
.statement__media img { width: 100%; height: 100%; object-fit: cover; }
.statement::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(rgba(15, 12, 9, 0.52), rgba(15, 12, 9, 0.62));
}
.statement__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding-inline: var(--gutter);
    padding-block: clamp(8rem, 20vw, 20rem);
}
.statement__rule { width: 28px; height: 1px; background: var(--accent); margin: 0 auto 2.6rem; }
.statement h2 {
    color: var(--on-dark);
    font-weight: 300;
    font-size: clamp(2.2rem, 1.5rem + 4vw, 5rem);
    line-height: 1.2;
    letter-spacing: 0;
}
.statement h2 em { font-style: italic; }

/* ---------------------------------------------------------------------
   8. INTRO / MEET MARTIN
   --------------------------------------------------------------------- */
.intro__grid {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    gap: clamp(2.5rem, 6vw, 7rem);
    align-items: center;
}
.intro__portrait { position: relative; }
.intro__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.intro__text { max-width: 34rem; }
.intro__text .eyebrow { margin-bottom: 1.6rem; }
.intro__text h2 { font-size: var(--d2); margin-bottom: 2rem; }
.intro__text p { color: var(--ink-soft); font-size: 1.0625rem; margin-bottom: 1.4rem; }
.intro__sig { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 2.2rem 0 2.4rem; }

/* ---------------------------------------------------------------------
   9. RESIDENCES
   --------------------------------------------------------------------- */
.residences { background: var(--bone-2); }
.residences__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.5rem; }
.residences__head h2 { font-size: var(--d3); }

.res-lead { margin-top: clamp(2.5rem, 5vw, 4rem); display: block; }
.res-lead__img { overflow: hidden; }
.res-lead__img img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; transition: transform 1.4s var(--ease); }
.res-lead:hover .res-lead__img img { transform: scale(1.04); }

.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); margin-top: clamp(2rem, 4vw, 3.5rem); }
.res-card__img { overflow: hidden; }
.res-card__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.4s var(--ease); }
.res-card:hover .res-card__img img { transform: scale(1.04); }

.res-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1.5rem; }
.res-meta__status { font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); }
.res-meta__status--pending { color: var(--muted); }
.res-meta__address { font-family: var(--serif); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.15; }
.res-meta__area { font-size: 0.82rem; letter-spacing: 0.04em; color: var(--muted); margin-top: 0.35rem; }
.res-meta__price { font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); white-space: nowrap; }
.res-meta__specs { display: block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: right; margin-top: 0.4rem; }
.residences__foot { margin-top: clamp(3rem, 6vw, 5rem); }

/* ---------------------------------------------------------------------
   10. COMMUNITIES
   --------------------------------------------------------------------- */
.areas__list { max-width: 1000px; margin: 0 auto; border-top: 1px solid var(--line); }
.areas__list a {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
    padding: clamp(1.5rem, 2.6vw, 2.4rem) 0;
    border-bottom: 1px solid var(--line);
    transition: padding 0.6s var(--ease);
}
.areas__list a:hover { padding-left: 1.4rem; padding-right: 1.4rem; }
.areas__list .name { font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 1.4rem + 1.8vw, 3rem); line-height: 1; color: var(--ink); }
.areas__list .tag { font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.areas__foot { margin-top: clamp(2.5rem, 5vw, 4rem); text-align: center; }
.areas__foot .link { margin-inline: auto; }

/* ---------------------------------------------------------------------
   11. APPROACH
   --------------------------------------------------------------------- */
.approach { background: var(--espresso); color: var(--on-dark); }
.approach .eyebrow { color: var(--on-dark-muted); }
.approach__head { text-align: center; margin-bottom: clamp(3.5rem, 7vw, 6rem); }
.approach__head h2 { color: var(--on-dark); font-size: var(--d3); }
.approach__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2.5rem, 5vw, 5rem); }
.approach__step { text-align: center; }
.approach__num { font-family: var(--serif); font-size: 1rem; letter-spacing: 0.3em; color: var(--accent); display: block; margin-bottom: 1.6rem; }
.approach__step h3 { color: var(--on-dark); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-bottom: 1.1rem; }
.approach__step p { color: var(--on-dark-muted); margin: 0 auto; font-size: 0.98rem; line-height: 1.85; max-width: 30ch; }
.approach__rule { width: 24px; height: 1px; background: var(--accent); margin: 0 auto 1.6rem; }

/* ---------------------------------------------------------------------
   12. CLOSING INVITATION
   --------------------------------------------------------------------- */
.invite { text-align: center; }
.invite .eyebrow { margin-bottom: 1.8rem; }
.invite h2 { font-size: var(--d2); margin-bottom: 1.8rem; }
.invite p { margin: 0 auto 3rem; color: var(--ink-soft); font-size: 1.0625rem; }
.invite__actions { display: flex; align-items: center; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.invite__phone { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }

/* ---------------------------------------------------------------------
   13. FOOTER
   --------------------------------------------------------------------- */
.site-footer { background: var(--espresso); color: var(--on-dark); padding-top: clamp(4rem, 7vw, 6.5rem); }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3rem, 6vw, 5rem); border-bottom: 1px solid rgba(239,233,223,0.12); }
.footer__brand .brand { color: var(--on-dark); margin-bottom: 1.6rem; }
.footer__contact a { display: block; color: var(--on-dark-muted); font-size: 0.95rem; letter-spacing: 0.04em; padding: 0.25rem 0; transition: color 0.4s var(--ease); }
.footer__contact a:hover { color: var(--on-dark); }
.footer__col h4 { font-family: var(--sans); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 1.4rem; }
.footer__col a { display: block; color: var(--on-dark); opacity: 0.78; font-size: 0.95rem; padding: 0.4rem 0; transition: opacity 0.4s var(--ease); }
.footer__col a:hover { opacity: 1; }
.footer__legal { padding-block: 2.5rem; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; font-size: 0.74rem; letter-spacing: 0.04em; color: var(--on-dark-muted); line-height: 1.9; }
.footer__legal p { max-width: none; }

/* ---------------------------------------------------------------------
   14. REVEAL ANIMATION
   --------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero h1 .inner { transform: none; }
    .steps::before { transform: scaleY(1); transition: none; }
    .step__num::before { transform: translateY(-50%) scale(1); transition: none; }
    .valley__belt { stroke-dashoffset: 0; transition: none; }
    .valley__node { opacity: 1; transform: none; transition: none; }
    .valley__star, .valley__lead, .valley__name, .valley__tag { opacity: 1; transition: none; }
    .scroll-prog { transition: none; }
    html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------
   15. RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
    .nav { display: none; }
    .menu-btn__txt { display: none; }
    .menu-btn { padding: 0.4rem; }
    .menu-btn__bars { gap: 6px; }
    .menu-btn__bars span { width: 26px; }

    .intro__grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .intro__portrait { max-width: 22rem; }
    .res-grid { grid-template-columns: 1fr; }
    .approach__grid { grid-template-columns: 1fr; gap: 3rem; }
    .footer__top { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
    .hero__actions { flex-direction: column; align-items: flex-start; gap: 1.4rem; }
    .res-meta { flex-direction: column; gap: 0.5rem; }
    .res-meta__specs { text-align: left; }
    .invite__actions { flex-direction: column; gap: 1.8rem; }
    .footer__top { grid-template-columns: 1fr; }
    .footer__legal { flex-direction: column; }
}


/* =====================================================================
   16. INTERIOR PAGES & SHARED COMPONENTS
   ===================================================================== */

/* ---- Header: solid mode (pages without a hero) + active nav ---- */
.site-header.is-solid { background: var(--bone); box-shadow: 0 1px 0 var(--line-soft); padding-block: clamp(1rem, 2vw, 1.4rem); }
.site-header.is-solid .brand,
.site-header.is-solid .nav a { color: var(--ink); }
.nav a.active { opacity: 1; }
.nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1px; background: currentColor; opacity: 0.45; }

/* ---- Overlay (mobile) menu ---- */
.overlay-nav {
    position: fixed; inset: 0; z-index: 200;
    background: var(--espresso); color: var(--on-dark);
    display: flex; overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity 0.55s var(--ease), visibility 0.55s var(--ease);
}
.overlay-nav.is-open { opacity: 1; visibility: visible; }
.overlay-nav__close { position: fixed; top: clamp(1.3rem, 2.5vw, 2rem); right: var(--gutter); color: var(--on-dark); opacity: 0.75; transition: opacity 0.4s var(--ease); }
.overlay-nav__close:hover { opacity: 1; }
.overlay-nav__inner { margin: auto; text-align: center; padding: clamp(5.5rem, 12vh, 7.5rem) var(--gutter); }
.overlay-nav__brand { color: var(--on-dark); margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.overlay-nav__list { display: flex; flex-direction: column; gap: clamp(0.3rem, 1.6vw, 0.8rem); }
.overlay-nav__list a {
    font-family: var(--serif); font-weight: 300; line-height: 1.16;
    font-size: clamp(2.1rem, 1.5rem + 3.2vw, 3.4rem); color: var(--on-dark);
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.4s var(--ease);
    transition-delay: calc(0.05s * var(--i, 0));
}
.overlay-nav.is-open .overlay-nav__list a { opacity: 0.9; transform: none; }
.overlay-nav__list a:hover { opacity: 1; font-style: italic; }
.overlay-nav.is-open .overlay-nav__list a.active { opacity: 1; color: var(--accent); font-style: italic; }

.overlay-nav__sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem clamp(1.2rem, 3vw, 2.2rem); margin-top: clamp(2rem, 4.5vw, 3rem); max-width: 40rem; }
.overlay-nav__sub a {
    font-family: var(--sans); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark);
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.4s var(--ease);
    transition-delay: 0.28s;
}
.overlay-nav.is-open .overlay-nav__sub a { opacity: 0.6; transform: none; }
.overlay-nav__sub a:hover { opacity: 1; }
.overlay-nav.is-open .overlay-nav__sub a.active { opacity: 1; color: var(--accent); }

.overlay-nav__foot { margin-top: clamp(2.5rem, 7vw, 4rem); display: flex; flex-direction: column; align-items: center; gap: 0.6rem; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--on-dark-muted); }
.overlay-nav__foot a:hover { color: var(--on-dark); }
.overlay-nav__foot .lang { margin-top: 0.5rem; color: var(--on-dark-muted); }

/* ---- Interior page header ---- */
.page-header { padding-top: clamp(9rem, 7rem + 9vw, 14rem); padding-bottom: clamp(2.5rem, 5vw, 5rem); }
.page-header .eyebrow { margin-bottom: 1.6rem; }
.page-header h1 { font-size: var(--d2); max-width: 18ch; }
.page-header__lede { margin-top: 1.9rem; max-width: 46ch; color: var(--ink-soft); font-size: 1.0625rem; }
.page-header--center { text-align: center; }
.page-header--center h1 { margin-inline: auto; }
.page-header--center .page-header__lede { margin-inline: auto; }
/* Compact variant (search): a tighter opener so the MLS widget sits above the fold */
.page-header--compact { padding-top: clamp(6.5rem, 5rem + 5vw, 9rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.page-header--compact h1 { font-size: var(--d3); }
.page-header--compact .page-header__lede { margin-top: 1.2rem; }
.page-header--compact.page-header--center::before { margin-bottom: 1.4rem; }
.section--flush-top { padding-top: clamp(0.5rem, 1.5vw, 1.25rem); }

/* ---- Reusable editorial split ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 7rem); align-items: center; }
.split--portrait { grid-template-columns: 0.85fr 1fr; }
.split__media { overflow: hidden; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media.ratio-45 img { aspect-ratio: 4 / 5; }
.split__media.ratio-34 img { aspect-ratio: 3 / 4; }
.split__media.ratio-11 img { aspect-ratio: 1 / 1; }
.split--reverse .split__media { order: 2; }
.split__text { max-width: 34rem; }
.split__text .eyebrow { margin-bottom: 1.6rem; }
.split__text h2 { font-size: var(--d3); margin-bottom: 1.8rem; }

/* ---- Prose ---- */
.prose p { color: var(--ink-soft); font-size: 1.0625rem; margin-bottom: 1.4rem; }
.prose p:last-child { margin-bottom: 0; }
.prose .link { margin-top: 0.8rem; }

/* ---- Bands & helpers ---- */
.band { background: var(--bone-2); }
.band-dark { background: var(--espresso); color: var(--on-dark); }
.band-dark .eyebrow { color: var(--on-dark-muted); }
.band-dark h2, .band-dark h3 { color: var(--on-dark); }
.narrow { max-width: var(--maxw-narrow); margin-inline: auto; }
.center { text-align: center; }

/* ---- Community grid (communities page) ---- */
.cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.cgrid__card .media { overflow: hidden; }
.cgrid__card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 1.4s var(--ease); }
.cgrid__card:hover img { transform: scale(1.04); }
.cgrid__card h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-top: 1.2rem; }
.cgrid__card .tag { display: block; font-size: 0.64rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); margin-top: 0.45rem; }

/* ---- Listings (residences page) ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; justify-content: center; padding-bottom: clamp(2.5rem, 5vw, 4rem); margin-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.filter-bar label { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-right: 0.7rem; }
.filter-bar select { border: none; background: transparent; font-family: var(--sans); font-weight: 300; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--line); padding: 0.4rem 1.4rem 0.4rem 0; cursor: pointer; }
.filter-bar select:focus { outline: none; border-color: var(--ink); }
.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.25rem); }
.note { text-align: center; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); margin-top: clamp(3rem, 6vw, 5rem); font-style: italic; }

/* ---- Forms ---- */
.field { margin-bottom: 1.7rem; }
.field > label { display: block; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.field input, .field textarea, .field select {
    width: 100%; font-family: var(--sans); font-weight: 300; font-size: 1rem; color: var(--ink);
    background: transparent; border: none; border-bottom: 1px solid var(--line);
    padding: 0.75rem 0; transition: border-color 0.4s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.65; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 6.5rem; line-height: 1.7; }
.interest { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.interest input { position: absolute; opacity: 0; width: 0; height: 0; }
.interest label { display: inline-flex; cursor: pointer; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); padding: 0.7rem 1.2rem; margin: 0; transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease); }
.interest label:hover { border-color: var(--ink); }
.interest input:checked + label { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.consent { display: flex; gap: 0.8rem; align-items: flex-start; font-size: 0.8rem; color: var(--muted); line-height: 1.7; margin: 1.8rem 0 2rem; }
.consent input { margin-top: 0.35rem; accent-color: var(--ink); flex-shrink: 0; }
.form-done { text-align: center; padding: 2.5rem 0; opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.form-done.is-in { opacity: 1; transform: none; }
.form-done h3 { font-size: var(--d4); margin-bottom: 0.8rem; }
.form-done p { color: var(--ink-soft); margin-inline: auto; }

/* ---- Valuation reassurance row ---- */
.assure { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); text-align: center; }
.assure__item .num { font-family: var(--serif); font-size: 1rem; letter-spacing: 0.3em; color: var(--accent); display: block; margin-bottom: 1.2rem; }
.assure__item h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); margin-bottom: 0.8rem; }
.assure__item p { color: var(--ink-soft); font-size: 0.96rem; margin-inline: auto; max-width: 28ch; }

/* ---- Contact ---- */
.contact__grid { display: grid; grid-template-columns: 0.8fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); }
.contact__detail { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.contact__detail:first-child { border-top: 1px solid var(--line); }
.contact__detail dt { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.contact__detail dd { font-family: var(--serif); font-weight: 300; font-size: 1.45rem; line-height: 1.35; }
.contact__detail dd a { transition: color 0.4s var(--ease); }
.contact__detail dd a:hover { color: var(--accent); }

/* ---- Responsive (interior) ---- */
@media (max-width: 1024px) {
    .cgrid { grid-template-columns: repeat(2, 1fr); }
    .listings { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .split, .split--portrait { grid-template-columns: 1fr; gap: 2.5rem; }
    .split--reverse .split__media { order: 0; }
    .split__media.ratio-45 img, .split__media.ratio-34 img { aspect-ratio: 3 / 2; }
    .assure { grid-template-columns: 1fr; gap: 3rem; }
    .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .cgrid { grid-template-columns: 1fr; }
    .listings { grid-template-columns: 1fr; }
}


/* =====================================================================
   17. MAX BUILD, TRUST, CONTENT & LEAD-CAPTURE COMPONENTS
   ===================================================================== */

/* ---- Stats row (results / market snapshot) ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 4vw, 3rem); text-align: center; }
.stats__value { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); line-height: 1; color: var(--ink); display: block; }
.stats__label { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 1rem; display: block; }
.band-dark .stats__value { color: var(--on-dark); }
.band-dark .stats__label { color: var(--on-dark-muted); }

/* ---- Testimonials ---- */
.quote-lead { max-width: 50rem; margin: 0 auto; text-align: center; }
.quote-lead blockquote { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(1.8rem, 1.3rem + 2.4vw, 3.2rem); line-height: 1.3; color: var(--ink); }
.quote-lead cite { display: block; font-style: normal; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 2.2rem; }
.band-dark .quote-lead blockquote { color: var(--on-dark); }
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 4vw, 3.5rem) clamp(2.5rem, 5vw, 5rem); }
.quote { border-top: 1px solid var(--line); padding-top: 1.8rem; }
.quote p { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); line-height: 1.5; color: var(--ink-soft); }
.quote cite { display: block; font-style: normal; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 1.3rem; }

/* ---- "Featured in" logo strip ---- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(1.5rem, 5vw, 4rem); }
.logos span { font-family: var(--serif); font-size: clamp(1.1rem, 0.9rem + 0.6vw, 1.5rem); color: var(--muted); opacity: 0.85; }

/* ---- Inline email signup (reports / newsletter) ---- */
.signup { display: flex; gap: 1rem; max-width: 34rem; align-items: center; border-bottom: 1px solid var(--line); }
.signup input { flex: 1; border: none; background: transparent; font-family: var(--sans); font-weight: 300; font-size: 1rem; color: var(--ink); padding: 0.85rem 0; }
.signup input::placeholder { color: var(--muted); opacity: 0.65; }
.signup input:focus { outline: none; }
.signup button { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); white-space: nowrap; padding: 0.5rem 0 0.5rem 1rem; }
.signup button:hover { color: var(--accent); }
.signup--center { margin-inline: auto; }
.band-dark .signup { border-color: rgba(239, 233, 223, 0.3); }
.band-dark .signup input { color: var(--on-dark); }
.band-dark .signup input::placeholder { color: var(--on-dark-muted); }
.band-dark .signup button { color: var(--on-dark); }
.signup-done { display: none; font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--ink); }
.signup-done.is-in { display: block; }
.band-dark .signup-done { color: var(--on-dark); }

/* ---- Guides / lead magnets (gated download) ---- */
.guides-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); }
.guide { border: 1px solid var(--line); padding: clamp(1.8rem, 3.5vw, 3rem); display: flex; flex-direction: column; background: var(--bone); }
.guide__media { overflow: hidden; margin-bottom: 2rem; }
.guide__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.guide .eyebrow { margin-bottom: 1rem; }
.guide h3 { font-size: var(--d4); margin-bottom: 1rem; }
.guide > p { color: var(--ink-soft); margin-bottom: 1.8rem; flex: 1; }
.guide__gate, .guide__done { display: none; }
.guide.is-open .guide__gate { display: block; }
.guide.is-open .guide__open { display: none; }
.guide.is-done .guide__done { display: block; }
.guide.is-done .guide__gate { display: none; }
.guide__gate .field { margin-bottom: 1.2rem; }
.guide__done p { color: var(--ink-soft); }

/* ---- Floating lead CTA ---- */
.float-cta {
    position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90;
    display: inline-flex; align-items: center; gap: 0.9rem;
    background: var(--ink); color: var(--bone);
    padding: 0.95rem 1.5rem;
    font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    box-shadow: 0 8px 34px rgba(0, 0, 0, 0.2);
    opacity: 0; transform: translateY(20px); pointer-events: none; visibility: hidden;
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), background 0.4s var(--ease), visibility 0.5s var(--ease);
}
.float-cta.is-shown { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.float-cta:hover { background: var(--accent); }
.float-cta__x { display: inline-flex; opacity: 0.55; transition: opacity 0.3s var(--ease); }
.float-cta__x:hover { opacity: 1; }

/* ---- Process timeline (buyer / seller / relocation journeys) ---- */
.steps { position: relative; display: grid; gap: 0; }
.steps::before {                                  /* the rail, draws downward on reveal */
    content: ""; position: absolute; left: 0.57rem;
    top: clamp(2.4rem, 4vw, 3.2rem); bottom: clamp(2.4rem, 4vw, 3.2rem);
    width: 1px; background: var(--line);
    transform: scaleY(0); transform-origin: top;
    transition: transform 1.5s var(--ease) 0.1s;
}
.steps.is-in::before { transform: scaleY(1); }
.step {
    position: relative;
    display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: baseline;
    padding: clamp(1.7rem, 3vw, 2.3rem) 0 clamp(1.7rem, 3vw, 2.3rem) 2.6rem;
}
.step__num { position: relative; font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); color: var(--accent); line-height: 1; }
.step__num::before {                              /* the node, centered on the numeral, pops in after the rail */
    content: ""; position: absolute; left: -2.3rem; top: 0.5em;
    width: 0.62rem; height: 0.62rem; border-radius: 50%;
    background: var(--accent);
    transform: translateY(-50%) scale(0);
    transition: transform 0.55s var(--ease);
}
.steps.is-in .step__num::before { transform: translateY(-50%) scale(1); }
.steps.is-in .step:nth-child(1) .step__num::before { transition-delay: 0.30s; }
.steps.is-in .step:nth-child(2) .step__num::before { transition-delay: 0.50s; }
.steps.is-in .step:nth-child(3) .step__num::before { transition-delay: 0.70s; }
.steps.is-in .step:nth-child(4) .step__num::before { transition-delay: 0.90s; }
.step__body h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-bottom: 0.7rem; }
.step__body p { color: var(--ink-soft); max-width: 52ch; }
.band-dark .steps::before { background: rgba(239, 233, 223, 0.18); }
.band-dark .step__body h3 { color: var(--on-dark); }
.band-dark .step__body p { color: var(--on-dark-muted); }

/* ---- Mortgage estimator ---- */
.calc { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; max-width: 1000px; margin-inline: auto; }
.calc__inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2.5rem; }
.calc__inputs .field { margin-bottom: 0; }
.calc__out { text-align: center; border-left: 1px solid var(--line); padding-left: clamp(2rem, 5vw, 4.5rem); }
.calc__label { display: block; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.calc__value { display: block; font-weight: 300; font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem); line-height: 1; color: var(--ink); }
.calc__note { display: block; font-size: 0.78rem; color: var(--muted); line-height: 1.6; margin: 1.2rem auto 0; max-width: 34ch; }

/* ---- Neighborhood finder ---- */
.finder { max-width: 760px; margin-inline: auto; }
.finder__opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
.finder__opt { font-family: var(--sans); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); padding: 0.95rem 1.7rem; transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease); }
.finder__opt:hover { border-color: var(--ink); }
.finder__opt.is-active { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.finder__result { text-align: center; margin-top: clamp(2.5rem, 5vw, 3.5rem); opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.finder__result.is-in { opacity: 1; transform: none; }
.finder__result[hidden] { display: none; }
.finder__result h3 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); margin: 1rem 0 0.8rem; }
.finder__result p { color: var(--ink-soft); margin-inline: auto; max-width: 42ch; }
.finder__actions { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---- Valley locator map (communities), custom line-art, drawn on reveal ---- */
.valley { max-width: 940px; margin-inline: auto; }
.valley__svg { width: 100%; height: auto; display: block; overflow: visible; }
.valley__frame { fill: none; stroke: var(--line); stroke-width: 1; }
.valley__belt {
    fill: none; stroke: var(--accent); stroke-width: 1.25; opacity: 0.75;
    stroke-dasharray: 2200; stroke-dashoffset: 2200;
    transition: stroke-dashoffset 2.3s var(--ease) 0.25s;
}
.valley.is-in .valley__belt { stroke-dashoffset: 0; }
.valley__node {
    fill: var(--accent);
    opacity: 0; transform: scale(0);
    transform-box: fill-box; transform-origin: center;
    transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.valley.is-in .valley__node { opacity: 1; transform: scale(1); transition-delay: 0.5s; }
.valley.is-in .valley__pt:nth-of-type(2) .valley__node { transition-delay: 0.62s; }
.valley.is-in .valley__pt:nth-of-type(3) .valley__node { transition-delay: 0.74s; }
.valley.is-in .valley__pt:nth-of-type(4) .valley__node { transition-delay: 0.86s; }
.valley.is-in .valley__pt:nth-of-type(5) .valley__node { transition-delay: 0.98s; }
.valley.is-in .valley__pt:nth-of-type(6) .valley__node { transition-delay: 1.1s; }
.valley__star { fill: none; stroke: var(--ink); stroke-width: 1.25; opacity: 0; transition: opacity 0.6s var(--ease) 0.3s; }
.valley.is-in .valley__star { opacity: 1; }
.valley__name { font-family: var(--serif); font-weight: 400; font-size: 18px; fill: var(--ink); opacity: 0; transition: opacity 0.7s var(--ease) 0.6s; }
.valley.is-in .valley__name { opacity: 1; }
.valley__tag { font-family: var(--sans); font-weight: 400; font-size: 8px; letter-spacing: 2.2px; text-transform: uppercase; fill: var(--muted); opacity: 0; transition: opacity 0.7s var(--ease) 0.72s; }
.valley.is-in .valley__tag { opacity: 1; }
.valley__compass line { stroke: var(--line); stroke-width: 1; }
.valley__compass text { font-family: var(--sans); font-size: 9px; letter-spacing: 2px; fill: var(--muted); }
.valley__cap { text-align: center; margin-top: clamp(1.5rem, 3vw, 2.4rem); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* ---- Max-build responsive ---- */
@media (max-width: 760px) {
    .calc { grid-template-columns: 1fr; gap: 2.5rem; }
    .calc__out { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 2.5rem; }
}
@media (max-width: 700px) {
    .stats { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .quotes { grid-template-columns: 1fr; }
    .guides-grid { grid-template-columns: 1fr; }
    .step { grid-template-columns: 1fr; gap: 0.6rem; }
}


/* =====================================================================
   18. INTERACTIVITY, sliders, ring, breakdown bar, accordions, map explorer
   ===================================================================== */

/* ---- Custom range sliders (tactile inputs for the tools) ---- */
.field--range { margin-bottom: 1.9rem; }
.field--range .range__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; }
.field--range label { display: block; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.range__out { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); line-height: 1; }
.slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 1px; background: var(--line); outline: none; cursor: pointer; margin: 0.7rem 0 0;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--bone); border: 1px solid var(--accent);
    transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.slider::-webkit-slider-thumb:hover { background: var(--accent); transform: scale(1.1); }
.slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--bone); border: 1px solid var(--accent); cursor: pointer; transition: background 0.25s var(--ease); }
.slider::-moz-range-thumb:hover { background: var(--accent); }
.slider::-moz-range-track { height: 1px; background: var(--line); }
.slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(168, 137, 95, 0.22); }
.slider:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(168, 137, 95, 0.22); }
.band-dark .slider { background: rgba(239, 233, 223, 0.22); }
.band-dark .slider::-webkit-slider-thumb { background: var(--espresso); }
.band-dark .slider::-moz-range-thumb { background: var(--espresso); }

/* ---- Mode toggle (e.g. payment ⇄ affordability) ---- */
.toggle { display: inline-flex; border: 1px solid var(--line); margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); }
.toggle__btn { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); padding: 0.85rem 1.6rem; transition: background 0.4s var(--ease), color 0.4s var(--ease); }
.toggle__btn.is-active { background: var(--ink); color: var(--bone); }
.tool-head { text-align: center; }

/* ---- SVG ring (proportion read-out) ---- */
.ring { display: grid; place-items: center; }
.ring__svg { width: clamp(170px, 42vw, 230px); height: auto; overflow: visible; }
.ring__track { fill: none; stroke: var(--line); stroke-width: 5; }
.ring__fill { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dasharray 0.55s var(--ease); }
.ring__big { font-family: var(--serif); font-weight: 300; fill: var(--ink); }
.ring__small { font-family: var(--sans); font-size: 8px; letter-spacing: 2.4px; text-transform: uppercase; fill: var(--muted); }

/* ---- Breakdown bar (net proceeds, tax) ---- */
.breakdown { max-width: 760px; margin: clamp(2.2rem, 4vw, 3rem) auto 0; }
.bar { display: flex; height: 16px; border: 1px solid var(--line); background: var(--bone); overflow: hidden; }
.bar__seg { height: 100%; min-width: 0; transition: width 0.55s var(--ease); }
.bar__seg--a { background: var(--accent); }
.bar__seg--b { background: rgba(168, 137, 95, 0.45); }
.bar__seg--c { background: rgba(27, 24, 21, 0.22); }
.bar__seg--d { background: rgba(27, 24, 21, 0.10); }
.bar__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem 2rem; margin-top: 1.4rem; }
.bar__key { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); }
.bar__key b { color: var(--ink); font-weight: 400; font-family: var(--serif); font-size: 1rem; letter-spacing: 0; margin-left: 0.2rem; }
.bar__dot { width: 10px; height: 10px; flex: none; }

/* ---- Two-row comparison (tax advantage) ---- */
.vs { max-width: 620px; margin: clamp(2rem, 4vw, 3rem) auto 0; display: grid; gap: 1.1rem; }
.vs__row { display: grid; grid-template-columns: 7rem 1fr auto; align-items: center; gap: 1.2rem; }
.vs__label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.vs__track { height: 12px; background: var(--bone-2); border: 1px solid var(--line); overflow: hidden; }
.band .vs__track { background: var(--bone); }
.vs__fill { height: 100%; width: 0; background: var(--accent); transition: width 0.6s var(--ease); }
.vs__fill--zero { background: var(--line); }
.vs__amt { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
@media (max-width: 540px) { .vs__row { grid-template-columns: 5.5rem 1fr auto; gap: 0.8rem; } }

/* ---- Accordion (FAQ) ---- */
.acc { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; text-align: left; padding: clamp(1.3rem, 2.5vw, 1.8rem) 0; font-family: var(--serif); font-weight: 300; font-size: clamp(1.2rem, 1rem + 0.7vw, 1.65rem); color: var(--ink); line-height: 1.25; transition: color 0.3s var(--ease); }
.acc__q:hover { color: var(--accent); }
.acc__icon { position: relative; width: 15px; height: 15px; flex: none; }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; background: var(--accent); transition: transform 0.4s var(--ease); }
.acc__icon::before { left: 0; top: 7px; width: 15px; height: 1px; }
.acc__icon::after { left: 7px; top: 0; width: 1px; height: 15px; }
.acc__item.is-open .acc__icon::after { transform: scaleY(0); }
.acc__a { overflow: hidden; max-height: 0; transition: max-height 0.5s var(--ease); }
.acc__a-inner { padding: 0 0 clamp(1.4rem, 2.5vw, 1.9rem); color: var(--ink-soft); max-width: 64ch; font-size: 1.0625rem; }
.acc__a-inner .link { margin-top: 1.1rem; }

/* ---- Interactive valley map (clickable points + info panel) ---- */
.valley__pt { cursor: pointer; }
.valley__hit { fill: transparent; }
.valley__halo { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; transform: scale(0.4); transform-box: fill-box; transform-origin: center; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.valley__pt:hover .valley__halo, .valley__pt.is-active .valley__halo, .valley__pt:focus-visible .valley__halo { opacity: 1; transform: scale(1); }
.valley__pt:hover .valley__node, .valley__pt.is-active .valley__node, .valley__pt:focus-visible .valley__node { transform: scale(1.35); }
.valley__pt:hover .valley__name, .valley__pt.is-active .valley__name, .valley__pt:focus-visible .valley__name { fill: var(--accent); }
.valley__pt:focus { outline: none; }
.valley__panel {
    max-width: 540px; margin: clamp(2rem, 4vw, 3rem) auto 0; text-align: center; min-height: 5.5rem;
}
.valley__panel .eyebrow { margin-bottom: 0.9rem; }
.valley__panel h3 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); margin-bottom: 0.8rem; transition: opacity 0.3s var(--ease); }
.valley__panel p { color: var(--ink-soft); margin: 0 auto 1.4rem; }
.valley__panel .valley__links { display: flex; justify-content: center; gap: 1.8rem; flex-wrap: wrap; }
.valley__panel.is-swapping h3, .valley__panel.is-swapping p { opacity: 0; }

/* ---- Home path router ("where would you like to begin?") ---- */
.paths__opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin: clamp(2rem, 4vw, 2.8rem) 0 clamp(2.2rem, 4vw, 3rem); }
.paths__opt { font-family: var(--sans); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); padding: 0.9rem 1.7rem; transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease); }
.paths__opt:hover { border-color: var(--ink); }
.paths__opt.is-active { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.paths__result { transition: opacity 0.3s var(--ease); }
.paths__result.is-swapping { opacity: 0; }
.paths__result .lede { margin: 0 auto 2rem; max-width: 42ch; }

/* ---- Home communities explorer (hover/tap to preview) ---- */
.explore { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; max-width: 1100px; margin-inline: auto; }
.explore__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bone-2); }
.explore__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity 0.8s var(--ease), transform 1.8s var(--ease); }
.explore__img.is-active { opacity: 1; transform: scale(1); }
.explore__list { border-top: 1px solid var(--line); }
.explore__name { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; width: 100%; text-align: left; padding: clamp(0.9rem, 1.8vw, 1.4rem) 0; border-bottom: 1px solid var(--line); transition: padding 0.5s var(--ease); }
.explore__name .serif { font-weight: 300; font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.2rem); line-height: 1; color: var(--muted); transition: color 0.4s var(--ease); }
.explore__name .tag { font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity 0.4s var(--ease); }
.explore__name.is-active { padding-left: 1rem; }
.explore__name.is-active .serif { color: var(--ink); }
.explore__name.is-active .tag { opacity: 1; }
.explore__cta { margin-top: clamp(1.6rem, 3vw, 2.4rem); }

/* ---- Interactivity responsive ---- */
@media (max-width: 760px) {
    .explore { grid-template-columns: 1fr; gap: 1.8rem; }
    .explore__media { aspect-ratio: 16 / 10; order: -1; }
    .breakdown { max-width: 100%; }
    .bar__legend { justify-content: flex-start; }
}


/* =====================================================================
   19. EDITORIAL GRAPHICS, bespoke minimal flourishes
   ===================================================================== */

/* ---- Consistent bronze focus ring (a11y + polish) ---- */
a:focus-visible, button:focus-visible, .valley__pt:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 1px;
}

/* ---- Section-opener flourish (hairline + bronze diamond) ---- */
.section-head--center::before, .page-header--center::before {
    content: ""; display: block; width: 64px; height: 12px; margin: 0 auto 1.8rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="12" viewBox="0 0 64 12"><line x1="0" y1="6" x2="23" y2="6" stroke="%23a8895f"/><line x1="41" y1="6" x2="64" y2="6" stroke="%23a8895f"/><rect x="28" y="2" width="8" height="8" transform="rotate(45 32 6)" fill="none" stroke="%23a8895f"/></svg>') center / contain no-repeat;
    opacity: 0.9;
}
.page-header--center::before { margin-bottom: 2.2rem; }

/* ---- Corner brackets framing the cinematic statement ---- */
.statement__inner { position: relative; }
.statement__inner::before, .statement__inner::after {
    content: ""; position: absolute; width: 30px; height: 30px; pointer-events: none;
    border: 1px solid rgba(239, 233, 223, 0.45);
}
.statement__inner::before { top: clamp(3.5rem, 9vw, 7rem); left: var(--gutter); border-right: 0; border-bottom: 0; }
.statement__inner::after { bottom: clamp(3.5rem, 9vw, 7rem); right: var(--gutter); border-left: 0; border-top: 0; }

/* ---- Oversized quotation glyph behind the lead quote ---- */
.quote-lead { position: relative; }
.quote-lead::before {
    content: "\201C"; position: absolute; top: -0.46em; left: 50%; transform: translateX(-50%);
    font-family: var(--serif); font-size: clamp(6rem, 13vw, 11rem); line-height: 1;
    color: var(--accent); opacity: 0.15; pointer-events: none;
}
.band-dark .quote-lead::before { color: var(--on-dark); opacity: 0.12; }

/* ---- Quiet monogram watermark in the footer ---- */
.site-footer { position: relative; overflow: hidden; }
.footer__seal {
    position: absolute; top: clamp(1.5rem, 4vw, 3.5rem); right: clamp(-2.5rem, 1vw, 1.5rem);
    width: clamp(130px, 18vw, 240px); color: var(--on-dark); opacity: 0.055; pointer-events: none; line-height: 0;
}
.footer__seal svg { width: 100%; height: auto; }
.footer__top, .footer__legal { position: relative; }


/* =====================================================================
   20. LONG-FORM / EDITORIAL, deep-dive guides & insights
   Depth surfaced calmly: a sticky section index, numbered sections,
   callouts, captioned figures, an itemized cost table. Progressive
   disclosure keeps any single screen sparse.
   ===================================================================== */

/* ---- Layout: prose column + (desktop) sticky section index ---- */
.longform { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 3.5rem); max-width: 1100px; margin-inline: auto; }
.article { max-width: 42rem; }
.article > section { scroll-margin-top: 96px; }
.article > section + section { margin-top: clamp(3.5rem, 7vw, 6rem); }

@media (min-width: 1040px) {
    .longform { grid-template-columns: 224px minmax(0, 1fr); gap: clamp(3rem, 6vw, 6.5rem); align-items: start; }
    .article { max-width: 44rem; }
}

/* ---- Section index (table of contents) ---- */
.toc__title { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.3rem; }
.toc__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.toc a {
    display: flex; gap: 0.85rem; align-items: baseline;
    padding: 0.78rem 0; border-bottom: 1px solid var(--line-soft);
    font-family: var(--sans); font-weight: 300; font-size: 0.92rem; letter-spacing: 0.01em;
    color: var(--muted); line-height: 1.3; transition: color 0.4s var(--ease);
}
.toc a .toc__n { font-family: var(--serif); font-size: 0.82rem; color: var(--accent); opacity: 0.7; flex: none; transition: opacity 0.4s var(--ease); }
.toc a:hover { color: var(--ink); }
.toc a.is-current { color: var(--ink); }
.toc a.is-current .toc__n { opacity: 1; }

@media (min-width: 1040px) {
    .toc { position: sticky; top: 104px; }
    .toc__list { max-height: calc(100vh - 9rem); overflow: auto; }
}

/* ---- Article typography ---- */
.article__lead { font-family: var(--serif); font-weight: 300; font-size: var(--d4); line-height: 1.4; color: var(--ink-soft); letter-spacing: 0; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.article__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.6rem; }
.article__idx { font-family: var(--serif); font-size: 1rem; letter-spacing: 0.2em; color: var(--accent); flex: none; }
.article h2 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.7rem); line-height: 1.08; }
.article h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); margin: 2.4rem 0 0.9rem; }
.article p { color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.85; margin-bottom: 1.4rem; max-width: 64ch; }
.article p:last-child { margin-bottom: 0; }
.article strong { font-weight: 400; color: var(--ink); }
.article .link { margin-top: 0.6rem; }

/* ---- Editorial list with hairline bronze markers ---- */
.article ul.ed-list { margin: 1.2rem 0 1.6rem; max-width: 60ch; }
.ed-list li { position: relative; padding-left: 1.6rem; margin-bottom: 0.95rem; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.75; }
.ed-list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.55rem; height: 1px; background: var(--accent); }
.ed-list li strong { color: var(--ink); }

/* ---- Callout (key takeaway) ---- */
.callout { border-left: 1px solid var(--accent); background: var(--bone-2); padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.2rem); margin: clamp(2rem, 4vw, 2.6rem) 0; }
.callout .eyebrow { color: var(--accent); margin-bottom: 0.9rem; }
.callout p { margin-bottom: 0; color: var(--ink-soft); font-size: 1.0625rem; }
.callout p + p { margin-top: 0.9rem; }

/* ---- Captioned figure ---- */
.figure { margin: clamp(2rem, 4vw, 3rem) 0; }
.figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.figure figcaption { margin-top: 0.9rem; font-size: 0.74rem; letter-spacing: 0.06em; color: var(--muted); font-style: italic; }

/* ---- Itemized cost table ---- */
.cost-table { border-top: 1px solid var(--ink); margin: 1.8rem 0 1.2rem; }
.cost-row { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem 1.5rem; align-items: baseline; padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.cost-row__label { font-family: var(--sans); font-weight: 400; font-size: 0.98rem; color: var(--ink); }
.cost-row__note { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; line-height: 1.5; max-width: 44ch; }
.cost-row__amt { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); white-space: nowrap; }
.cost-row--total { border-bottom: none; border-top: 1px solid var(--ink); padding-top: 1.2rem; }
.cost-row--total .cost-row__label { letter-spacing: 0.04em; }
.cost-row--total .cost-row__amt { color: var(--accent); font-size: 1.6rem; }
.cost-disclaim { font-size: 0.78rem; color: var(--muted); font-style: italic; line-height: 1.7; margin-top: 0.4rem; }

/* ---- Inline capture inside prose ---- */
.inline-capture { border: 1px solid var(--line); background: var(--bone); padding: clamp(1.6rem, 3.5vw, 2.4rem); margin: clamp(2.4rem, 5vw, 3.2rem) 0; }
.inline-capture .eyebrow { color: var(--accent); margin-bottom: 0.9rem; }
.inline-capture h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); margin: 0 0 0.7rem; }
.inline-capture p { color: var(--ink-soft); margin-bottom: 1.4rem; max-width: 52ch; }
.inline-capture .signup { max-width: none; }


/* =====================================================================
   21. INSIGHTS HUB, filterable editorial resource index
   ===================================================================== */

/* ---- Filter pills ---- */
.rfilter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: clamp(2.5rem, 5vw, 3.6rem); }
.rfilter__opt { font-family: var(--sans); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); padding: 0.8rem 1.45rem; transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease); }
.rfilter__opt:hover { border-color: var(--ink); }
.rfilter__opt.is-active { background: var(--ink); color: var(--bone); border-color: var(--ink); }

/* ---- Editorial index (image + title + desc rows) ---- */
.rindex { max-width: 920px; margin-inline: auto; border-top: 1px solid var(--line); }
.rindex__item {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(1.1rem, 3vw, 2.2rem); align-items: center;
    padding: clamp(1.5rem, 3vw, 2.1rem) 0; border-bottom: 1px solid var(--line);
    transition: padding-left 0.5s var(--ease);
}
.rindex__item:hover { padding-left: 0.6rem; }
.rindex__media { width: clamp(86px, 22vw, 134px); aspect-ratio: 4 / 3; overflow: hidden; flex: none; background: var(--bone-2); }
.rindex__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.rindex__item:hover .rindex__media img { transform: scale(1.05); }
.rindex__text { min-width: 0; }
.rindex__text .eyebrow { font-size: 0.58rem; letter-spacing: 0.3em; margin-bottom: 0.55rem; }
.rindex__text h3 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.95rem); line-height: 1.08; transition: color 0.4s var(--ease); }
.rindex__item:hover .rindex__text h3 { color: var(--accent); }
.rindex__text p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; margin-top: 0.55rem; max-width: 48ch; }
.rindex__mark { flex: none; color: var(--muted); transition: color 0.4s var(--ease), transform 0.5s var(--ease); }
.rindex__item:hover .rindex__mark { color: var(--accent); transform: translateX(5px); }
.rindex__item.is-filtered-out { display: none; }

@media (max-width: 560px) {
    .rindex__text p { display: none; }            /* keep mobile rows compact, title + category carry it */
    .rindex__mark { display: none; }
}

/* ---- "Email me these numbers", capture at the moment of intent (under the calculators) ---- */
.tool-capture { text-align: center; max-width: 34rem; margin: clamp(2.4rem, 5vw, 3.5rem) auto 0; }
.tool-capture .eyebrow { display: block; margin-bottom: 1.1rem; color: var(--accent); }
.tool-capture .signup { margin-inline: auto; }
.tool-capture .signup-done { margin-inline: auto; }
.band-dark .tool-capture .eyebrow { color: var(--on-dark); }

/* Placeholder 'value pending' slot for neighborhood snapshots (fill with real MLS figures) */
.stat-tba { display: inline-block; width: 1.5ch; height: 0; border-bottom: 2px solid var(--line); vertical-align: middle; margin-bottom: 0.3em; }


/* =====================================================================
   22. BUYING BUDDY (IDX / MLS) - widget hosts + graceful fallback
   ===================================================================== */
.bb-host { max-width: var(--maxw); margin-inline: auto; }
.bb-host--narrow { max-width: var(--maxw-narrow); }
bb-widget:not(:defined) { display: none; }            /* hide raw tags until BB upgrades them */
.bb-fallback { display: block; }                       /* static fallback until the widget loads */
.bb-host.is-bb-ready .bb-fallback { display: none; }   /* hidden once BB actually renders (JS adds is-bb-ready) */
