/* =========================================================
   CompanyName Realty — real estate template
   Palette: deep teal + warm sand + coral accent
   Type: Fraunces (headings) + Inter (body)
   ========================================================= */

:root {
    --paper: #fbf8f3;
    --sand: #f3ece2;
    --sand-2: #e9dfcf;
    --white: #ffffff;

    --ink: #142422;
    --ink-soft: #3c4c49;
    --muted: #6b7774;

    --teal: #0f4c47;
    --teal-dark: #0a3532;
    --teal-tint: rgba(15, 76, 71, 0.08);
    --coral: #e2603f;
    --coral-dark: #c94d2e;
    --success: #2f855a;
    --danger: #c53030;

    --line: rgba(20, 36, 34, 0.12);
    --line-strong: rgba(20, 36, 34, 0.22);

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(20, 36, 34, 0.06), 0 4px 14px rgba(20, 36, 34, 0.06);
    --shadow-lg: 0 2px 8px rgba(20, 36, 34, 0.06), 0 30px 60px -20px rgba(20, 36, 34, 0.28);
    --header-h: 72px;
    --gutter: clamp(16px, 4vw, 36px);
}

/* ---------- Reset ---------- */

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.is-locked {
    overflow: hidden;
}

/* Component display rules (e.g. .btn { display: inline-flex }) must not override [hidden] */
[hidden] {
    display: none !important;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--teal);
    color: #fff;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 500;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
}

.skip-link:focus {
    top: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--coral);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.serif-italic {
    font-style: italic;
    font-weight: 500;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--coral);
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(226, 96, 63, 0.8);
}

.btn-primary:hover {
    background: var(--coral-dark);
    transform: translateY(-1px);
}

.btn-dark {
    background: var(--teal);
    color: #fff;
}

.btn-dark:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.btn-ghost {
    border-color: var(--line-strong);
    background: transparent;
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--teal);
    background: var(--teal-tint);
}

.btn-light {
    background: #fff;
    color: var(--ink);
}

.btn-light:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    min-height: 56px;
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.icon-btn svg {
    width: 19px;
    height: 19px;
}

/* Generic stroked icon style */
.ico {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid var(--line);
    background: rgba(251, 248, 243, 0.9);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Homepage: header floats over the hero photo until you scroll */
.site-header.is-overlay {
    position: fixed;
    left: 0;
    right: 0;
    border-bottom-color: transparent;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: #fff;
}

.site-header.is-overlay.is-scrolled,
body.menu-open .site-header.is-overlay {
    border-bottom-color: var(--line);
    background: rgba(251, 248, 243, 0.94);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    color: var(--ink);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--teal);
    color: #fff;
}

.site-header.is-overlay:not(.is-scrolled) .brand-mark {
    background: #fff;
    color: var(--teal);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand small {
    display: block;
    margin-top: 2px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.7;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.main-nav > a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.main-nav > a:hover,
.main-nav > a[aria-current="page"] {
    background: rgba(127, 127, 127, 0.14);
}

.nav-mobile-extras {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.saved-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid currentColor;
    border-color: rgba(127, 127, 127, 0.35);
    border-radius: 999px;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.saved-btn svg {
    width: 17px;
    height: 17px;
}

.saved-count {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--coral);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.saved-count[data-count="0"] {
    display: none;
}

.saved-btn.bump {
    animation: bump 0.4s ease;
}

@keyframes bump {
    50% { transform: scale(1.12); }
}

.menu-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(127, 127, 127, 0.35);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, top 0.25s ease;
}

.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }

.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero (home) ---------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(100svh, 860px);
    padding: calc(var(--header-h) + 60px) 0 90px;
    color: #fff;
    isolation: isolate;
}

/* Clips the slow zoom so it never widens the page */
.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: hero-zoom 18s ease-out both;
}

@keyframes hero-zoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(10, 30, 28, 0.55) 0%, rgba(10, 30, 28, 0.25) 40%, rgba(10, 30, 28, 0.75) 100%),
        linear-gradient(90deg, rgba(10, 30, 28, 0.55), transparent 70%);
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 86px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: #ffd8c9;
}

.hero-lead {
    max-width: 560px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 20px);
}

/* Search card */
.search-card {
    position: relative;
    max-width: 880px;
    margin-top: 36px;
    padding: 10px;
    border-radius: 24px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.45);
}

.search-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 6px 10px;
}

.search-tab {
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.search-tab.is-active {
    background: var(--teal);
    color: #fff;
}

.search-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 8px;
    align-items: stretch;
}

.search-field {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 16px;
    background: var(--sand);
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.search-field:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px var(--teal) inset;
}

.search-field label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-field input,
.search-field select {
    width: 100%;
    padding: 2px 0 0;
    border: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.search-field select {
    cursor: pointer;
}

.search-card .btn {
    min-height: 100%;
    border-radius: 16px;
    padding: 0 28px;
}

/* Location autocomplete */
.suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.suggest.is-open {
    display: block;
}

.suggest button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.suggest button:hover,
.suggest button.is-active {
    background: var(--sand);
}

.suggest small {
    color: var(--muted);
    font-size: 12px;
}

.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.quick-chips a {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color 0.2s ease;
}

.quick-chips a:hover {
    background: rgba(255, 255, 255, 0.24);
}

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

.section {
    padding: clamp(72px, 9vw, 120px) 0;
}

.section-sand {
    background: var(--sand);
}

.section-teal {
    background: var(--teal);
    color: #fff;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(30px, 4vw, 48px);
}

.section-head h2 {
    max-width: 680px;
    font-size: clamp(34px, 4.6vw, 56px);
}

.section-head p {
    max-width: 520px;
    margin-top: 14px;
    color: var(--ink-soft);
    font-size: 17px;
}

.section-head .head-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Market snapshot strip */
.snapshot {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -46px;
    position: relative;
    z-index: 2;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.snapshot div {
    padding: 22px 24px;
}

.snapshot div + div {
    border-left: 1px solid var(--line);
}

.snapshot strong {
    display: block;
    font-family: var(--serif);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    line-height: 1.1;
}

.snapshot span {
    color: var(--muted);
    font-size: 14px;
}

.snapshot-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

/* ---------- Home cards ---------- */

.home-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-card:hover,
.home-card.is-highlight {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hc-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--sand-2);
}

.hc-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.hc-track::-webkit-scrollbar {
    display: none;
}

.hc-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.hc-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hc-arrow svg {
    width: 16px;
    height: 16px;
}

.hc-prev { left: 10px; }
.hc-next { right: 10px; }

.home-card:hover .hc-arrow,
.hc-arrow:focus-visible {
    opacity: 1;
}

.hc-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    z-index: 2;
    display: flex;
    gap: 5px;
    transform: translateX(-50%);
}

.hc-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hc-dots i.is-on {
    background: #fff;
    transform: scale(1.25);
}

.hc-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 70px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.badge svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.badge-new { background: var(--teal); color: #fff; }
.badge-open { background: #fff; color: var(--teal); }
.badge-drop { background: var(--coral); color: #fff; }

.heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, color 0.2s ease;
}

.heart-btn svg {
    width: 20px;
    height: 20px;
}

.heart-btn:hover {
    transform: scale(1.08);
}

.heart-btn[aria-pressed="true"] {
    color: var(--coral);
}

.heart-btn[aria-pressed="true"] svg {
    fill: currentColor;
}

.heart-btn.pop {
    animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes pop {
    40% { transform: scale(1.35); }
}

.hc-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
    padding: 16px 18px 18px;
    cursor: pointer;
}

.hc-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.hc-price {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hc-monthly {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.hc-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    color: var(--ink-soft);
    font-size: 14px;
}

.hc-facts b {
    color: var(--ink);
}

.hc-address {
    color: var(--muted);
    font-size: 14px;
}

.hc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.compare-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.compare-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--teal);
    cursor: pointer;
}

.hc-dom {
    color: var(--muted);
    font-size: 12px;
}

/* Featured carousel row */
.carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 48px) / 3);
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 2px;
    padding: 6px 2px 24px;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel > * {
    scroll-snap-align: start;
}

/* ---------- "How we help" cards ---------- */

.help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.help-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.help-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.help-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--teal-tint);
    color: var(--teal);
}

.help-icon svg {
    width: 26px;
    height: 26px;
}

.help-card h3 {
    font-size: 26px;
}

.help-card p {
    color: var(--ink-soft);
}

.help-card .link-arrow {
    margin-top: auto;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--teal);
    font-weight: 700;
}

.link-arrow::after {
    content: "\2192";
    transition: transform 0.2s ease;
}

.link-arrow:hover::after,
.help-card:hover .link-arrow::after {
    transform: translateX(4px);
}

/* ---------- Neighborhood explorer ---------- */

.hood-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.hood-tabs::-webkit-scrollbar {
    display: none;
}

.hood-tab {
    flex-shrink: 0;
    padding: 10px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hood-tab:hover {
    border-color: var(--teal);
}

.hood-tab.is-active {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
}

.hood-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hood-photo {
    position: relative;
    min-height: 420px;
}

.hood-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.hood-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(26px, 4vw, 44px);
}

.hood-info h3 {
    font-size: clamp(32px, 4vw, 44px);
}

.hood-info p {
    color: var(--ink-soft);
    font-size: 17px;
}

.vibe-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vibe-chips span {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--sand);
    font-size: 13px;
    font-weight: 600;
}

.hood-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hood-stats div {
    padding: 14px;
    border-radius: 14px;
    background: var(--paper);
}

.hood-stats strong {
    display: block;
    font-family: var(--serif);
    font-size: 22px;
}

.hood-stats span {
    color: var(--muted);
    font-size: 12px;
}

.hood-info .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* ---------- Mortgage calculator ---------- */

.calc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    padding: clamp(24px, 4vw, 44px);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.calc-inputs {
    display: grid;
    gap: 22px;
}

.range-field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.range-field output {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
}

.range-field input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--teal) var(--fill, 50%), var(--sand-2) var(--fill, 50%));
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.range-field input[type="range"]::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    -webkit-appearance: none;
    appearance: none;
}

.range-field input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.range-hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.seg {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--sand);
}

.seg button {
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.seg button.is-active {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.calc-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: clamp(20px, 3vw, 30px);
    border-radius: 20px;
    background: var(--sand);
}

.donut {
    position: relative;
    width: min(240px, 70%);
    aspect-ratio: 1;
}

.donut svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut circle {
    fill: none;
    stroke-width: 14;
    transition: stroke-dasharray 0.5s ease, stroke-dashoffset 0.5s ease;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
}

.donut-center strong {
    font-family: var(--serif);
    font-size: clamp(30px, 4vw, 40px);
    line-height: 1;
}

.donut-center span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.legend {
    display: grid;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.legend i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend b {
    margin-left: auto;
}

.calc-note {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

/* ---------- Seller band ---------- */

.seller-band {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
    align-items: center;
    padding: clamp(28px, 5vw, 60px);
    border-radius: 28px;
    background:
        radial-gradient(ellipse 60% 80% at 100% 0%, rgba(226, 96, 63, 0.28), transparent 70%),
        var(--teal);
    color: #fff;
    overflow: hidden;
}

.seller-band h2 {
    font-size: clamp(34px, 4.6vw, 54px);
}

.seller-band p {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
}

.address-go {
    display: flex;
    gap: 8px;
    margin-top: 26px;
    padding: 8px;
    border-radius: 999px;
    background: #fff;
}

.address-go input {
    flex: 1;
    min-width: 0;
    padding: 0 16px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 16px;
    outline: none;
}

.seller-visual {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
}

.seller-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.value-chip {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 14px 18px;
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-lg);
}

.value-chip span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.value-chip strong {
    font-family: var(--serif);
    font-size: 28px;
}

.value-chip em {
    color: var(--success);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

/* ---------- Agents ---------- */

.agents-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.agent-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}

.avatar {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), #1d7068);
    color: #fff;
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 600;
    box-shadow: 0 0 0 6px var(--sand);
}

.agent-card h3 {
    font-size: 24px;
}

.agent-role {
    color: var(--coral);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.agent-spec {
    color: var(--muted);
    font-size: 14px;
}

.agent-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

/* ---------- Reviews ---------- */

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.review-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.stars {
    color: #ffc66d;
    letter-spacing: 3px;
}

.review-card blockquote {
    margin: 0;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
}

.review-card cite {
    margin-top: auto;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-style: normal;
}

.sample-note {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

/* ---------- Forms ---------- */

.form-card {
    display: grid;
    gap: 16px;
    padding: clamp(22px, 4vw, 36px);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field > label,
.field-legend {
    font-size: 14px;
    font-weight: 600;
}

.field .opt {
    color: var(--muted);
    font-weight: 400;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--paper);
    /* 16px keeps iOS from zooming into the field */
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23142422' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 40px;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--teal);
    background: #fff;
    box-shadow: 0 0 0 4px var(--teal-tint);
}

.field .is-invalid {
    border-color: var(--danger);
}

.field-error {
    color: var(--danger);
    font-size: 13px;
}

.field-error:empty {
    display: none;
}

.form-honeypot {
    display: none;
}

.form-note {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* Choice chips (radio) */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    position: relative;
    cursor: pointer;
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip span {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chip span small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.chip:hover span {
    border-color: var(--teal);
}

.chip input:checked + span {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
}

.chip input:checked + span small {
    color: rgba(255, 255, 255, 0.8);
}

.chip input:focus-visible + span {
    outline: 3px solid var(--coral);
    outline-offset: 2px;
}

.chips.is-invalid .chip span {
    border-color: var(--danger);
}

/* ---------- Contact section ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(30px, 5vw, 64px);
    align-items: start;
}

.contact-list {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.contact-list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    font-weight: 600;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-list a:hover {
    border-color: var(--teal);
    transform: translateX(4px);
}

.contact-list .ci {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--teal-tint);
    color: var(--teal);
}

.contact-list .ci svg {
    width: 20px;
    height: 20px;
}

.contact-list small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

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

.site-footer {
    padding: 64px 0 28px;
    background: var(--teal-dark);
    color: rgba(255, 255, 255, 0.85);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
}

.site-footer .brand {
    color: #fff;
}

.site-footer .brand-mark {
    background: #fff;
    color: var(--teal);
}

.footer-grid p {
    margin-top: 14px;
    max-width: 320px;
    font-size: 15px;
}

.footer-grid h4 {
    margin-bottom: 14px;
    color: #fff;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
}

.footer-grid a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
}

.eho {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.eho svg {
    width: 26px;
    height: 26px;
}

.disclaimer {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

/* ---------- Listing modal ---------- */

.modal {
    width: min(1180px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.modal::backdrop {
    background: rgba(10, 25, 23, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal[open] {
    display: flex;
    flex-direction: column;
    animation: modal-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
}

.modal-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.modal-top .crumb {
    margin-right: auto;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.modal-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    height: min(56vh, 480px);
    padding: 6px;
    background: #fff;
}

.gallery button {
    position: relative;
    padding: 0;
    border: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--sand-2);
}

.gallery button:first-child {
    grid-row: 1 / 3;
    border-radius: 18px 0 0 18px;
}

.gallery button:nth-child(2) { border-radius: 0 18px 0 0; }
.gallery button:nth-child(3) { border-radius: 0 0 18px 0; }

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery button:hover img {
    transform: scale(1.04);
}

.gallery-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 36px;
    padding: 28px clamp(18px, 3vw, 36px) 40px;
}

.md-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.md-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.md-price strong {
    font-family: var(--serif);
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.md-price .was {
    color: var(--muted);
    text-decoration: line-through;
}

.md-address {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 17px;
}

.md-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 22px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.md-stats div {
    padding: 14px 16px;
}

.md-stats div + div {
    border-left: 1px solid var(--line);
}

.md-stats strong {
    display: block;
    font-family: var(--serif);
    font-size: 24px;
}

.md-stats span {
    color: var(--muted);
    font-size: 13px;
}

.md-section {
    padding: 24px 0;
    border-top: 1px solid var(--line);
}

.md-section h3 {
    margin-bottom: 14px;
    font-size: 24px;
}

.md-section > p {
    color: var(--ink-soft);
}

.feature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-chips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 14px;
}

.feature-chips span::before {
    content: "\2713";
    color: var(--success);
    font-weight: 700;
}

.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    margin: 0;
}

.facts div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 15px;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

/* Monthly cost breakdown */
.cost-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.cost-total strong {
    font-family: var(--serif);
    font-size: 34px;
}

.cost-bar {
    display: flex;
    height: 14px;
    margin-bottom: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--sand-2);
}

.cost-bar i {
    height: 100%;
    transition: width 0.4s ease;
}

.cost-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.cost-controls .field input,
.cost-controls .field select {
    padding: 10px 12px;
}

.md-map {
    height: 280px;
    border-radius: 16px;
    background: var(--sand-2);
    overflow: hidden;
}

.md-aside {
    position: sticky;
    top: 20px;
    align-self: start;
    display: grid;
    gap: 16px;
}

.tour-card {
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.tour-card h3 {
    font-size: 24px;
}

.tour-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.tour-mode .chip span {
    width: 100%;
}

.day-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 70px;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.day-strip .chip span {
    width: 100%;
    padding: 8px 4px;
}

.day-strip .chip span b {
    font-family: var(--serif);
    font-size: 20px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.time-grid .chip span {
    width: 100%;
    min-height: 40px;
    padding: 6px;
    font-size: 13px;
}

.agent-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
}

.agent-mini .avatar {
    width: 52px;
    height: 52px;
    margin: 0;
    font-size: 19px;
    box-shadow: none;
}

.agent-mini strong {
    display: block;
}

.agent-mini span {
    color: var(--muted);
    font-size: 13px;
}

.agent-mini .icon-btn {
    margin-left: auto;
}

/* Lightbox */
.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(5, 12, 11, 0.96);
    color: #fff;
}

.lightbox[open] {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.lightbox::backdrop {
    background: transparent;
}

.lb-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 14px;
}

.lb-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0 60px;
}

.lb-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.lb-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.lb-arrow svg {
    width: 22px;
    height: 22px;
}

.lb-prev { left: 8px; }
.lb-next { right: 8px; }

.lb-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    overflow-x: auto;
}

.lb-thumbs button {
    flex-shrink: 0;
    width: 72px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.55;
    cursor: pointer;
    background: none;
}

.lb-thumbs button.is-on {
    border-color: #fff;
    opacity: 1;
}

.lb-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-btn-dark {
    border-color: rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
}

/* ---------- Saved drawer ---------- */

.drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(440px, 100vw);
    height: 100dvh;
    max-height: none;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    background: var(--paper);
    color: var(--ink);
    box-shadow: -30px 0 60px -20px rgba(0, 0, 0, 0.3);
}

.drawer[open] {
    display: flex;
    flex-direction: column;
    animation: drawer-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes drawer-in {
    from { transform: translateX(100%); }
}

.drawer::backdrop {
    background: rgba(10, 25, 23, 0.45);
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.drawer-head h3 {
    font-size: 26px;
}

.drawer-list {
    display: grid;
    gap: 12px;
    padding: 16px 20px;
    overflow-y: auto;
}

.mini-home {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    cursor: pointer;
}

.mini-home img {
    width: 96px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.mini-home strong {
    display: block;
    font-family: var(--serif);
    font-size: 19px;
}

.mini-home span {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 50px 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state svg {
    width: 44px;
    height: 44px;
    color: var(--sand-2);
}

.empty-state strong {
    color: var(--ink);
    font-family: var(--serif);
    font-size: 22px;
}

.drawer-foot {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
}

/* ---------- Compare ---------- */

.compare-bar {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 10px 10px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow-lg);
    transform: translate(-50%, 150%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.35s;
}

.compare-bar.is-open {
    transform: translate(-50%, 0);
    visibility: visible;
}

.compare-thumbs {
    display: flex;
}

.compare-thumbs img {
    width: 34px;
    height: 34px;
    margin-left: -8px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    object-fit: cover;
}

.compare-thumbs img:first-child {
    margin-left: 0;
}

.compare-bar .btn {
    min-height: 40px;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    opacity: 0.8;
}

.compare-modal {
    width: min(1000px, calc(100vw - 32px));
}

.compare-table-wrap {
    overflow-x: auto;
    padding: 0 0 20px;
}

.compare-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 15px;
    vertical-align: top;
}

.compare-table thead th {
    vertical-align: bottom;
}

.compare-table thead img {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 10px;
    border-radius: 12px;
    object-fit: cover;
}

.compare-table thead strong {
    display: block;
    font-family: var(--serif);
    font-size: 22px;
}

.compare-table tbody th {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.compare-table td.is-best {
    color: var(--success);
    font-weight: 700;
}

.compare-table td.is-best::after {
    content: " \2605";
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    top: calc(var(--header-h) + 16px);
    z-index: 600;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* =========================================================
   Search page (homes.html)
   ========================================================= */

.filters {
    position: sticky;
    top: var(--header-h);
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 248, 243, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.filters-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters-inner::-webkit-scrollbar {
    display: none;
}

.filter-search {
    position: relative;
    flex: 1 1 260px;
    min-width: 220px;
}

.filter-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px 10px 42px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    font-size: 16px;
    outline: none;
}

.filter-search input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px var(--teal-tint);
}

.filter-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: var(--muted);
}

.filter-select {
    flex-shrink: 0;
    min-height: 44px;
    padding: 10px 36px 10px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23142422' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.filter-select.is-set {
    border-color: var(--teal);
    background-color: var(--teal-tint);
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.filter-toggle svg {
    width: 16px;
    height: 16px;
}

.filter-toggle[aria-pressed="true"] {
    border-color: var(--coral);
    background: rgba(226, 96, 63, 0.1);
    color: var(--coral-dark);
}

.results-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: calc(100dvh - var(--header-h) - 69px);
}

.results-pane {
    padding: 22px clamp(16px, 2.5vw, 28px) 60px;
}

.results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.results-head h1 {
    font-size: clamp(26px, 3vw, 34px);
}

.results-head p {
    color: var(--muted);
    font-size: 14px;
}

.sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.map-pane {
    position: sticky;
    top: calc(var(--header-h) + 69px);
    height: calc(100dvh - var(--header-h) - 69px);
    background: var(--sand-2);
}

.map {
    width: 100%;
    height: 100%;
}

.map-options {
    position: absolute;
    top: 14px;
    left: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    font-weight: 600;
    transform: translateX(-50%);
    white-space: nowrap;
}

.map-options input {
    width: 16px;
    height: 16px;
    accent-color: var(--teal);
}

/* MapLibre price pins: .pin-wrap is positioned by the map, the pill animates */
.pin-wrap {
    cursor: pointer;
}

.price-pin {
    position: relative;
    display: block;
    margin-bottom: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transform-origin: 50% 100%;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.price-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: inherit;
    transform: rotate(45deg);
    border-radius: 2px;
    z-index: -1;
}

.price-pin.is-new {
    background: var(--teal);
    color: #fff;
}

.price-pin.is-active,
.pin-wrap:hover .price-pin {
    background: var(--coral);
    color: #fff;
    transform: scale(1.15);
}

/* Popups sit above the (raised) active pin */
.maplibregl-popup {
    z-index: 30;
}

.maplibregl-popup-content {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.maplibregl-popup-tip {
    display: none;
}

.map-pop {
    width: 240px;
    cursor: pointer;
    font-family: var(--sans);
}

.map-pop img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.map-pop div {
    padding: 10px 12px 12px;
}

.map-pop strong {
    display: block;
    font-family: var(--serif);
    font-size: 20px;
}

.map-pop span {
    color: var(--muted);
    font-size: 13px;
}

.view-toggle {
    display: none;
}

.no-results {
    grid-column: 1 / -1;
}

/* =========================================================
   Sell page
   ========================================================= */

.sell-hero {
    position: relative;
    padding: clamp(60px, 8vw, 110px) 0;
    background:
        radial-gradient(ellipse 50% 70% at 100% 0%, rgba(226, 96, 63, 0.18), transparent 70%),
        var(--sand);
}

.sell-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(30px, 5vw, 64px);
    align-items: start;
}

.sell-hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1;
}

.sell-hero h1 em {
    color: var(--coral);
    font-style: italic;
    font-weight: 400;
}

.sell-hero .lead {
    margin-top: 18px;
    color: var(--ink-soft);
    font-size: 18px;
}

.check-list {
    display: grid;
    gap: 10px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 32px;
    font-weight: 500;
}

.check-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* Multi-step wizard */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.wizard-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--sand);
    overflow: hidden;
}

.wizard-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--teal), #1d7068);
    border-radius: inherit;
    transition: width 0.4s ease;
}

.step {
    display: grid;
    gap: 16px;
}

.js .step:not(.is-active) {
    display: none;
}

.step h3 {
    font-size: 28px;
}

.step-sub {
    margin-top: -8px;
    color: var(--muted);
}

.wizard-nav {
    display: flex;
    gap: 10px;
}

.wizard-nav .btn-primary {
    flex: 1;
}

/* Net proceeds calculator */
.proceeds {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    padding: clamp(24px, 4vw, 44px);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.proceeds-result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 28px;
    border-radius: 20px;
    background: var(--teal);
    color: #fff;
}

.proceeds-result > span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.proceeds-result > strong {
    font-family: var(--serif);
    font-size: clamp(44px, 6vw, 64px);
    line-height: 1;
}

.waterfall {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.waterfall li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    font-size: 14px;
}

.waterfall .wf-bar {
    grid-column: 1 / -1;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.waterfall .wf-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    counter-reset: step;
}

.step-card {
    padding: 26px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}

.step-card::before {
    counter-increment: step;
    content: "0" counter(step);
    display: block;
    margin-bottom: 14px;
    color: var(--coral);
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
}

.step-card h3 {
    font-size: 22px;
}

.step-card p {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 15px;
}

/* ---------- Simple pages ---------- */

.page-main {
    padding: clamp(56px, 8vw, 100px) 0;
}

.legal {
    max-width: 780px;
}

.legal h1 {
    font-size: clamp(38px, 6vw, 60px);
}

.legal h2 {
    margin-top: 34px;
    font-size: 26px;
}

.legal p,
.legal li {
    margin-top: 12px;
    color: var(--ink-soft);
}

.thanks {
    display: grid;
    justify-items: center;
    gap: 16px;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.thanks h1 {
    font-size: clamp(38px, 6vw, 60px);
}

.thanks p {
    color: var(--ink-soft);
    font-size: 17px;
}

.thanks .check {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
}

.thanks .check svg {
    width: 34px;
    height: 34px;
}

/* ---------- Mobile action bar ---------- */

.mobile-bar {
    display: none;
}

/* ---------- Scroll reveal ---------- */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .carousel {
        grid-auto-columns: calc((100% - 24px) / 2);
    }

    .modal-body {
        grid-template-columns: minmax(0, 1fr) 330px;
        gap: 24px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 960px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        inset: calc(var(--header-h) + env(safe-area-inset-top)) 0 0 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 12px var(--gutter) 40px;
        background: var(--paper);
        color: var(--ink);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .main-nav > a {
        padding: 18px 4px;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        font-family: var(--serif);
        font-size: 26px;
    }

    .main-nav > a:hover {
        background: none;
        color: var(--teal);
    }

    .nav-mobile-extras {
        display: grid;
        gap: 12px;
        margin-top: 24px;
    }

    .header-actions .btn {
        display: none;
    }

    /* backdrop-filter on the header would trap the fixed menu inside it */
    body.menu-open .site-header {
        background: var(--paper);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        color: var(--ink);
    }

    .search-fields {
        grid-template-columns: 1fr 1fr;
    }

    .search-field-location {
        grid-column: 1 / -1;
    }

    .search-card .btn {
        grid-column: 1 / -1;
        min-height: 54px;
    }

    .snapshot {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .snapshot div:nth-child(3) {
        border-left: 0;
    }

    .snapshot div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .help-grid,
    .agents-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .hood-panel,
    .calc,
    .seller-band,
    .contact-grid,
    .sell-grid,
    .proceeds {
        grid-template-columns: 1fr;
    }

    .hood-photo {
        min-height: 280px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .md-aside {
        position: static;
    }

    /* Search page: one pane at a time with a floating List/Map toggle */
    .results-layout {
        grid-template-columns: 1fr;
    }

    .map-pane {
        display: none;
        position: fixed;
        inset: calc(var(--header-h) + 69px) 0 0 0;
        z-index: 40;
        height: auto;
    }

    body.show-map .map-pane {
        display: block;
    }

    body.show-map .results-pane {
        display: none;
    }

    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .view-toggle {
        position: fixed;
        left: 50%;
        bottom: calc(86px + env(safe-area-inset-bottom));
        z-index: 110;
        display: inline-flex;
        transform: translateX(-50%);
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 680px) {
    :root {
        --header-h: 64px;
    }

    .brand {
        font-size: 19px;
    }

    .brand small {
        display: none;
    }

    .saved-btn .saved-label {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--header-h) + 40px);
        padding-bottom: 80px;
    }

    .search-fields {
        grid-template-columns: 1fr;
    }

    .search-tabs {
        padding-bottom: 6px;
    }

    .carousel {
        grid-auto-columns: 86%;
        gap: 14px;
    }

    .snapshot div {
        padding: 16px;
    }

    .hood-stats {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .hood-stats div {
        padding: 10px;
    }

    .hood-stats strong {
        font-size: 18px;
    }

    .form-row,
    .cost-controls {
        grid-template-columns: 1fr;
    }

    .address-go {
        flex-direction: column;
        border-radius: 20px;
    }

    .address-go input {
        min-height: 48px;
    }

    .modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100dvh;
        height: 100dvh;
        border-radius: 0;
    }

    .gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        height: 300px;
    }

    .gallery button:first-child {
        grid-row: auto;
        border-radius: 14px;
    }

    .gallery button:nth-child(n + 2) {
        display: none;
    }

    .md-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md-stats div:nth-child(3) {
        border-left: 0;
    }

    .md-stats div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .facts {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .compare-bar {
        width: calc(100% - 24px);
        bottom: calc(84px + env(safe-area-inset-bottom));
        justify-content: space-between;
    }

    .lb-stage {
        padding: 0 8px;
    }

    .lb-arrow {
        display: none;
    }

    /* Sticky call / text / search bar */
    body.has-mobile-bar {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        display: grid;
        grid-template-columns: 1fr 1fr 1.6fr;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: rgba(251, 248, 243, 0.96);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    .mobile-bar a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 48px;
        border: 1px solid var(--line-strong);
        border-radius: 14px;
        background: #fff;
        font-size: 15px;
        font-weight: 600;
    }

    .mobile-bar a.primary {
        border-color: transparent;
        background: var(--teal);
        color: #fff;
    }

    .mobile-bar svg {
        width: 18px;
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
