:root {
  --ink: #201914;
  --cream: #f5efe5;
  --paper: #fffdf9;
  --brown: #4d2f22;
  --orange: #e96b3a;
  --sage: #b8c8a2;
  --line: #ddd3c5;
  --muted: #756c64;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  min-height: 700px;
  color: #fffaf2;
  background:
    radial-gradient(circle at 86% 24%, rgba(233,107,58,.24) 0 16%, transparent 16.2%),
    linear-gradient(135deg, #39251d 0%, #513123 58%, #301f19 100%);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  right: -110px;
  bottom: -220px;
}
.nav { height: 88px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); font-family: "DM Serif Display", serif; font-size: 22px; }
.nav-link { font-size: 14px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 4px; }

.hero-grid { min-height: 610px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 88px; align-items: center; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 22px; color: #edcbb8; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.dark { color: var(--orange); }
h1, h2 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; letter-spacing: -.035em; line-height: .98; }
h1 { margin: 0; font-size: clamp(54px, 7vw, 88px); }
h1 em { color: #f3b48f; font-weight: 400; }
.hero-lead { max-width: 590px; margin: 30px 0 0; color: #ded2ca; font-size: 18px; line-height: 1.7; }
.hero-lead strong { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { padding: 14px 20px; border-radius: 100px; text-decoration: none; font-weight: 700; font-size: 14px; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: #231813; background: #fff8ee; }
.button.secondary { border: 1px solid rgba(255,255,255,.35); }

.budget-card { padding: 30px; background: rgba(255,248,238,.96); color: var(--ink); border-radius: 28px; transform: rotate(1.5deg); box-shadow: 0 28px 80px rgba(0,0,0,.22); }
.budget-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.live-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #6c9b5f; }
.budget-price { display: block; margin: 26px 0 20px; font-family: "DM Serif Display", serif; font-size: clamp(54px, 6vw, 76px); font-weight: 400; letter-spacing: -.06em; line-height: 1; }
.budget-price span { color: var(--orange); }
.budget-meter { height: 8px; border-radius: 8px; background: #e8ded1; overflow: hidden; }
.budget-meter span { display: block; width: 75%; height: 100%; background: var(--orange); border-radius: inherit; }
.budget-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.budget-stats div { padding-top: 18px; border-top: 1px solid var(--line); }
.budget-stats strong { display: block; font-family: "DM Serif Display", serif; font-size: 30px; font-weight: 400; }
.budget-stats span { display: block; color: var(--muted); font-size: 12px; }

.section { padding: 110px 0 120px; }
.search-dock { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(255,253,249,.96); backdrop-filter: blur(12px); }
.search-dock-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.search-dock-row > strong { white-space: nowrap; font-size: 14px; }
.quick-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.quick-filter { padding: 10px 14px; border: 1px solid var(--line); border-radius: 100px; background: #fff; color: var(--muted); cursor: pointer; font: 600 13px "DM Sans", sans-serif; }
.quick-filter:hover { border-color: var(--brown); color: var(--brown); }
.quick-filter.active { border-color: var(--brown); background: var(--brown); color: #fff; }
.family-section { padding: 110px 0; background: #eef1e7; }
.family-heading { display: grid; grid-template-columns: 1fr .8fr; gap: 80px; align-items: end; margin-bottom: 32px; }
.family-intro { margin: 0 0 5px; color: #5d6656; line-height: 1.75; }
.family-alert { margin-bottom: 28px; padding: 15px 18px; border: 1px solid #cbd5bc; border-radius: 12px; background: rgba(255,255,255,.6); color: #505b47; font-size: 13px; }
.family-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.family-card { padding: 27px; border: 1px solid #cfd6c4; border-radius: 18px; background: rgba(255,255,255,.82); }
.family-card.featured-family { border-color: #bd7d5e; box-shadow: inset 4px 0 0 var(--orange); }
.family-card-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; color: #64705b; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.family-card-top strong { color: var(--brown); font-size: 19px; letter-spacing: -.02em; }
.family-card h3 { font-size: 30px; }
.family-card > p { min-height: 52px; margin: 14px 0 18px; color: #5d6656; }
.family-contact { display: grid; grid-template-columns: .3fr 1.7fr; gap: 30px; margin-top: 26px; padding: 25px 28px; border-radius: 18px; background: var(--brown); color: #fff8ee; }
.family-contact p { margin: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
h2 { margin: 0; font-size: clamp(44px, 5vw, 68px); }
.filters { display: flex; gap: 8px; padding-bottom: 8px; }
.filter { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 10px 15px; border-radius: 100px; cursor: pointer; font: 600 13px "DM Sans", sans-serif; }
.filter.active { color: #fff; background: var(--brown); border-color: var(--brown); }
.listing-grid { border-top: 1px solid var(--line); }
.listing { display: grid; grid-template-columns: 70px 1fr; gap: 28px; padding: 34px 0; border-bottom: 1px solid var(--line); transition: opacity .25s, transform .25s; }
.listing[hidden] { display: none; }
.listing-number { color: var(--orange); font: 400 25px "DM Serif Display", serif; }
.listing-body { min-width: 0; }
.listing-title-row { display: flex; justify-content: space-between; gap: 28px; align-items: start; }
.location { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
h3 { margin: 0; font-family: "DM Serif Display", serif; font-size: clamp(28px, 3vw, 39px); font-weight: 400; line-height: 1.1; }
.price { margin: 4px 0 0; white-space: nowrap; color: var(--brown); font-size: 19px; font-weight: 700; }
.price span { color: var(--muted); font-size: 12px; font-weight: 500; }
.price.unconfirmed { color: var(--orange); font-size: 15px; }
.description { max-width: 750px; margin: 18px 0; color: #5f5751; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; }
.tags span { padding: 6px 10px; border-radius: 7px; background: var(--cream); color: #62574f; font-size: 11px; font-weight: 700; }
.listing-link { display: inline-block; color: var(--orange); font-size: 13px; font-weight: 700; text-decoration: none; border-bottom: 1px solid #e7ad95; padding-bottom: 3px; }
.listing-link:hover { color: #b6431f; }
.listing.featured { margin: 0 -22px; padding-left: 22px; padding-right: 22px; background: linear-gradient(90deg, rgba(184,200,162,.18), transparent); }
.results-note { margin: 24px 0 0; color: var(--muted); font-size: 12px; }

.safety { padding: 100px 0; color: #fffaf2; background: var(--brown); }
.safety-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,.18); }
.checklist li:last-child { border-bottom: 1px solid rgba(255,255,255,.18); }
.checklist li > span { color: #f3b48f; font-family: "DM Serif Display", serif; font-size: 20px; }
.checklist strong { font-size: 17px; }
.checklist p { margin: 6px 0 0; color: #cfc0b6; }

.footer { padding: 34px 0; background: #241813; color: #f8f0e8; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer p { margin: 0; }
.footer span { color: #ad9d94; font-size: 12px; }
.footer a { color: #f3b48f; font-size: 13px; text-decoration: none; }

@media (max-width: 820px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 50px; padding: 80px 0; }
  .budget-card { max-width: 540px; transform: none; }
  .section { padding: 80px 0; }
  .search-dock { position: relative; }
  .search-dock-row { align-items: flex-start; flex-direction: column; padding: 18px 0; }
  .quick-filters { justify-content: flex-start; }
  .family-section { padding: 80px 0; }
  .family-heading { grid-template-columns: 1fr; gap: 22px; }
  .section-heading { align-items: start; flex-direction: column; }
  .safety-grid { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 580px) {
  .wrap { width: min(100% - 28px, 1120px); }
  .nav { height: 72px; }
  .hero-grid { padding: 55px 0 70px; }
  h1 { font-size: 48px; }
  .hero-lead { font-size: 16px; }
  .budget-card { padding: 22px; border-radius: 20px; }
  .budget-price { font-size: 52px; }
  .budget-stats { gap: 10px; }
  .listing { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .quick-filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .quick-filter { padding: 10px 8px; }
  .quick-filter:first-child { grid-column: 1 / -1; }
  .family-grid { grid-template-columns: 1fr; }
  .family-card { padding: 22px; }
  .family-card > p { min-height: 0; }
  .family-contact { grid-template-columns: 1fr; gap: 10px; }
  .listing-title-row { flex-direction: column; gap: 12px; }
  .listing-number { font-size: 18px; }
  .price { margin: 0; }
  .listing.featured { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .listing.nearby::after { display: none; }
  .filters { width: 100%; }
  .filters { flex-wrap: wrap; }
  .filter { flex: 1 1 calc(50% - 8px); }
  .footer-row { align-items: start; }
}

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