/* Keystone, a free real estate template by Zerotheme. https://zerotheme.com/t/keystone/
   Change the look in one place: the variables below. */
:root {
  --paper: #f7f5f0;
  --card: #ffffff;
  --ink: #16211f;
  --ink-soft: #5b6663;
  --line: #e3e0d8;
  --brand: #1f4d43;        /* deep green: header, buttons, links */
  --brand-dark: #163a33;
  --gold: #c49a52;         /* accents, badges */
  --sold: #9b3b2f;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 10px;
  --wrap: 1200px;
  --shadow: 0 1px 2px rgba(22, 33, 31, .06), 0 12px 32px -16px rgba(22, 33, 31, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0 0 .45em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.eyebrow { font: 700 .74rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 1.5px solid var(--brand); font: 700 .95rem/1 var(--font-body); padding: 14px 22px; border-radius: var(--r); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: var(--paper); }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #b58a43; }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 30; background: rgba(247, 245, 240, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--brand); color: var(--gold); display: grid; place-items: center; font: 400 1.25rem/1 var(--font-display); }
.brand-name { font: 400 1.35rem/1 var(--font-display); }
.brand-name small { display: block; font: 600 .68rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; }
.nav a:hover { color: var(--brand); }
.nav .btn { color: #fff; padding: 11px 16px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
.call-sm { display: none; }
@media (max-width: 440px) { .brand-name small { letter-spacing: .06em; white-space: nowrap; } .brand-mark { display: none; } }
@media (max-width: 900px) {
  .nav-toggle { display: block; margin-left: 0; }
  .call-sm { display: inline-flex; margin-left: auto; padding: 10px 14px; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); padding: 8px 24px 20px; border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px -12px rgba(0,0,0,.15); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; min-height: min(86vh, 760px); display: flex; align-items: flex-end; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 18, .35) 0%, rgba(10, 20, 18, .55) 45%, rgba(10, 20, 18, .85) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 56px; width: 100%; }
.hero h1 { max-width: 14ch; }
.hero-lede { font-size: 1.15rem; max-width: 34em; opacity: .92; }
.search { margin-top: 28px; background: #fff; border-radius: 14px; padding: 10px; display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 8px; box-shadow: var(--shadow); max-width: 880px; }
.search label { display: grid; gap: 2px; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.search label:hover { background: var(--paper); }
.search input, .search select { border: 0; padding: 0; font: 600 1rem var(--font-body); color: var(--ink); background: transparent; min-height: 28px; text-transform: none; letter-spacing: 0; }
.search input:focus, .search select:focus { outline: none; }
.search .btn { padding: 0 26px; }
@media (max-width: 760px) { .search { grid-template-columns: 1fr 1fr; } .search label:first-child, .search .btn { grid-column: 1 / -1; } .search .btn { padding: 16px; } }

.stats { background: var(--brand); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 30px; padding-bottom: 30px; }
.stats strong { display: block; font: 400 2.2rem/1 var(--font-display); color: var(--gold); }
.stats span { font-size: .88rem; opacity: .85; }
@media (max-width: 700px) { .stats .wrap { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: #efece4; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.head h2 { margin: 0; }
.head p { margin: 0; max-width: 32em; }

/* ---------- listing cards ---------- */
.listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; text-decoration: none; color: inherit; }
[hidden] { display: none !important; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.badge { position: absolute; top: 14px; left: 14px; background: #fff; color: var(--brand); font: 800 .7rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; }
.badge.pending { background: var(--gold); color: var(--ink); }
.badge.sold { background: var(--sold); color: #fff; }
.card-body { padding: 18px 20px 20px; }
.price { font: 400 1.7rem/1.1 var(--font-display); margin: 0 0 4px; }
.addr { color: var(--ink-soft); margin: 0 0 14px; }
.facts { list-style: none; padding: 14px 0 0; margin: 0; display: flex; gap: 18px; border-top: 1px solid var(--line); font-size: .9rem; font-weight: 600; }
.facts li span { color: var(--ink-soft); font-weight: 500; }
.empty { display: none; padding: 32px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }

/* ---------- neighborhoods ---------- */
.hoods { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.hood { position: relative; border-radius: 14px; overflow: hidden; min-height: 320px; color: #fff; display: flex; align-items: flex-end; text-decoration: none; padding: 24px; background: var(--brand); }
.hood img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hood::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10, 20, 18, .8)); }
.hood:hover img { transform: scale(1.04); }
.hood > div { position: relative; z-index: 1; }
.hood h3 { margin: 0 0 4px; }
.hood p { margin: 0; opacity: .85; font-size: .92rem; }
.hood-plain { background: linear-gradient(140deg, var(--brand) 0%, #2d6b5d 100%); }
.hood-plain.alt { background: linear-gradient(140deg, #3b3a33 0%, #6b5a3a 100%); }
@media (max-width: 860px) { .hoods { grid-template-columns: 1fr; } .hood { min-height: 220px; } }

/* ---------- valuation ---------- */
.value { background: var(--ink); color: #fff; border-radius: 18px; padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.value h2 { color: #fff; }
.value p { opacity: .85; }
@media (max-width: 860px) { .value { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .88rem; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-height: 48px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(31, 77, 67, .15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.form-status { min-height: 1.4em; margin: 0; font-weight: 600; color: var(--gold); }
.value .field label { color: #fff; }
.value .field input { border-color: transparent; }

/* ---------- agent ---------- */
.agent { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.agent img { border-radius: 16px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.creds { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.creds li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: .9rem; }
.creds strong { display: block; font: 400 1.5rem/1.1 var(--font-display); color: var(--brand); }
@media (max-width: 860px) { .agent { grid-template-columns: 1fr; } .agent img { max-width: 380px; aspect-ratio: 1; object-position: top; } }

/* ---------- reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; margin: 0; }
.review blockquote { margin: 0 0 16px; font: 400 1.2rem/1.45 var(--font-display); }
.review figcaption { font-size: .9rem; color: var(--ink-soft); }
.stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 10px; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 72px); }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.contact-list a { font-weight: 700; text-decoration: none; }
.contact-list span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* ---------- footer + disclosures ---------- */
.footer { background: var(--ink); color: #c6ccc9; padding: 56px 0 32px; font-size: .9rem; }
.footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .brand-name small { color: #9aa5a1; }
.footer h4 { font: 700 .74rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: #8b9692; margin: 6px 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer ul a { text-decoration: none; }
.disclosures { border-top: 1px solid #2c3936; margin-top: 40px; padding-top: 24px; display: flex; gap: 20px; align-items: flex-start; font-size: .82rem; color: #9aa5a1; }
.eho { flex: none; display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: .72rem; line-height: 1.2; text-transform: uppercase; }
.credit { margin-top: 18px; font-size: .8rem; color: #7d8884; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } .disclosures { flex-direction: column; } }

/* ---------- listing page ---------- */
.crumbs { font-size: .85rem; color: var(--ink-soft); padding: 22px 0 0; }
.crumbs a { color: var(--ink-soft); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin: 18px 0 32px; }
.gallery-main { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: #ddd; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-rows: repeat(3, 1fr); gap: 10px; }
.thumbs button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: #ddd; opacity: .75; transition: opacity .15s; }
.thumbs button[aria-pressed="true"], .thumbs button:hover { opacity: 1; outline: 2px solid var(--gold); outline-offset: -2px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } .thumbs { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); } .thumbs button { aspect-ratio: 4 / 3; } }
.listing { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; padding-bottom: 96px; }
@media (max-width: 960px) { .listing { grid-template-columns: 1fr; } }
.listing-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 28px; }
.listing-top h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 6px; }
.listing-top .price { font-size: clamp(2rem, 4vw, 2.6rem); color: var(--brand); }
.keyfacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
.keyfacts li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.keyfacts strong { display: block; font: 400 1.6rem/1 var(--font-display); }
.keyfacts span { font-size: .82rem; color: var(--ink-soft); }
@media (max-width: 560px) { .keyfacts { grid-template-columns: 1fr 1fr; } }
.details { width: 100%; border-collapse: collapse; margin: 8px 0 32px; font-size: .95rem; }
.details th, .details td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.details th { width: 45%; color: var(--ink-soft); font-weight: 600; }
.features { columns: 2 220px; padding-left: 1.1em; margin: 0 0 32px; }
.features li { margin-bottom: 6px; }
.features li::marker { color: var(--gold); }
.aside-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; position: sticky; top: 96px; }
.aside-agent { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.aside-agent img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.aside-agent strong { display: block; font-size: 1.05rem; }
.openhouse { background: #f3ead9; border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; font-size: .92rem; }
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin: 0 0 32px; }
.calc .row2 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .calc .row2 { grid-template-columns: 1fr 1fr; } }
.calc-out { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 4px; }
.calc-out strong { font: 400 2.2rem/1 var(--font-display); color: var(--brand); }

/* ---------- neighborhood page ---------- */
.page-hero { position: relative; color: #fff; padding: 140px 0 56px; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 18, .25), rgba(10, 20, 18, .8)); }
.page-hero .wrap { position: relative; z-index: 1; }
.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -40px; position: relative; z-index: 2; }
.glance div { background: var(--card); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.glance strong { display: block; font: 400 1.8rem/1.1 var(--font-display); color: var(--brand); }
.glance span { font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 760px) { .glance { grid-template-columns: 1fr 1fr; } }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.market { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin: 12px 0 8px; }
.market th, .market td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
.market th { background: #efece4; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.market tr:last-child td { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
