:root {
  --white: #ffffff; --stone: #f1efea; --lake: #23527c; --lake-d: #183b5a; --sky: #e3ecf4;
  --ink: #1a1d21; --muted: #5b6168; --line: #e2e0da; --maple: #c8102e;
  --font: "Libre Franklin", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font: 16.5px/1.6 var(--font); color: var(--ink); background: var(--white); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.015em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
.muted { color: var(--muted); margin-top: 12px; max-width: 58ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 6px; background: var(--lake); color: #fff; font: 700 15.5px var(--font); border: 0; cursor: pointer; transition: background 0.2s; }
.btn:hover { background: var(--lake-d); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn--block { width: 100%; }
.btn:disabled { background: #2d6a4f; }

.header { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 30px; height: 72px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18.5px; line-height: 1.1; color: var(--lake-d); }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.nav { display: flex; gap: 26px; margin-left: auto; font-weight: 600; font-size: 15px; }
.nav a { padding: 24px 0; box-shadow: inset 0 -3px 0 transparent; transition: box-shadow 0.2s; }
.nav a:hover { box-shadow: inset 0 -3px 0 var(--lake); }
.header__tel { font-weight: 700; white-space: nowrap; }
.burger { display: none; }

/* Hero with search panel overlapping */
.hero { position: relative; height: min(68vh, 600px); min-height: 440px; color: #fff; display: flex; align-items: flex-start; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(14, 30, 46, 0.78) 0%, rgba(14, 30, 46, 0.35) 48%, rgba(14, 30, 46, 0) 75%); }
.hero__in { position: relative; z-index: 1; padding-top: clamp(56px, 9vh, 96px); }
.hero h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 800; max-width: 13ch; }
.hero p { font-size: 18.5px; margin-top: 16px; max-width: 42ch; color: #e7edf3; }

.search { position: relative; z-index: 2; margin-top: -64px; background: var(--white); border-radius: 10px; box-shadow: 0 24px 50px -24px rgba(16, 36, 56, 0.45), 0 0 0 1px var(--line); padding: 20px 22px 22px; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 14px; align-items: end; }
.search__tabs { grid-column: 1 / -1; display: flex; gap: 6px; }
.search__tabs button { min-height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; font: 700 14.5px var(--font); color: var(--muted); cursor: pointer; }
.search__tabs button[aria-pressed="true"] { background: var(--sky); color: var(--lake-d); }
.search label, .estimate label, .form label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
select, input, textarea { height: 48px; border: 1.5px solid var(--line); border-radius: 6px; padding: 0 12px; font: 16px var(--font); color: var(--ink); background: var(--white); }
textarea { height: auto; padding: 12px; resize: vertical; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--lake); box-shadow: 0 0 0 3px var(--sky); }
.search .btn { min-height: 48px; }

.section { padding: clamp(72px, 9vw, 108px) 0; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.head--stack { display: block; }
.more { font-weight: 700; color: var(--lake); border-bottom: 2px solid var(--sky); }
.more:hover { border-color: var(--lake); }

.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.home__img { position: relative; border-radius: 8px; overflow: hidden; }
.home__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.5s; }
.home:hover .home__img img { transform: scale(1.03); }
.badge { position: absolute; left: 12px; top: 12px; background: var(--white); color: var(--ink); font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 4px; }
.badge--new { background: var(--maple); color: #fff; }
.home__body { padding-top: 16px; }
.home__price { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.home h3 { margin-top: 2px; font-weight: 600; font-size: 17px; }
.home__area { color: var(--muted); font-size: 15px; }
.specs { list-style: none; display: flex; gap: 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.specs b { color: var(--ink); }

.sell { background: var(--stone); padding: clamp(72px, 9vw, 108px) 0; }
.sell__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 72px; align-items: center; }
.steps { margin-top: 34px; display: grid; gap: 22px; counter-reset: s; list-style: none; }
.steps li { position: relative; padding-left: 52px; color: var(--muted); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--lake); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.steps b { color: var(--ink); }
.estimate { background: var(--white); border-radius: 12px; padding: 30px; display: grid; gap: 16px; box-shadow: 0 20px 50px -30px rgba(16, 36, 56, 0.35); }
.estimate h3 { font-size: 22px; }
.estimate fieldset { border: 0; }
.estimate legend { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.beds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.beds button { height: 44px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--white); font: 700 15px var(--font); cursor: pointer; }
.beds button[aria-pressed="true"] { border-color: var(--lake); background: var(--sky); color: var(--lake-d); }
.estimate__out { background: var(--lake-d); color: #fff; border-radius: 8px; padding: 18px 20px; }
.estimate__out span { font-size: 13.5px; color: #b9cde0; }
.estimate__out output { display: block; font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -0.02em; margin: 2px 0; }
.estimate__out small { color: #b9cde0; font-size: 13px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.areas { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 15.5px; }
.areas th, .areas td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.areas thead th { background: var(--stone); font-size: 13.5px; color: var(--muted); font-weight: 600; }
.areas tbody tr:last-child > * { border-bottom: 0; }
.areas tbody th { font-weight: 700; }
.areas td:nth-child(2) { font-weight: 700; color: var(--lake); }
.areas td:last-child { color: var(--muted); }

.team { background: var(--lake-d); color: #fff; padding: clamp(72px, 9vw, 108px) 0; }
.team__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.team .muted { color: #b9cde0; }
.team blockquote { margin-top: 34px; padding-left: 22px; border-left: 3px solid var(--maple); font-size: 18.5px; }
.team cite { display: block; margin-top: 10px; font-style: normal; font-size: 14.5px; color: #b9cde0; }
.agents { list-style: none; display: grid; gap: 12px; }
.agents li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; background: rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 16px 18px; }
.agents small { display: block; color: #b9cde0; font-size: 14px; }
.agents a { font-weight: 700; font-size: 14.5px; white-space: nowrap; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.av { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--white); color: var(--lake-d); font-weight: 800; }

.contact__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
.office { margin-top: 26px; line-height: 1.8; color: var(--muted); }
.office b { color: var(--ink); }
.form { display: grid; gap: 16px; }
.form .btn { justify-self: start; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.footer { background: var(--stone); padding: 30px 0 96px; font-size: 14px; color: var(--muted); }
.footer__in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer b { color: var(--ink); }

@media (max-width: 1040px) { .header__tel { display: none; } }
@media (max-width: 920px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search .btn { grid-column: 1 / -1; }
  .listings { grid-template-columns: 1fr 1fr; }
  .sell__grid, .team__grid, .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--white); padding: 4px 20px 16px; border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transition: opacity 0.2s; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); box-shadow: none; }
  body.nav-open .nav { opacity: 1; visibility: visible; }
  .header .btn--sm { margin-left: auto; }
  .burger { display: grid; gap: 5px; width: 44px; height: 44px; place-content: center; background: none; border: 0; cursor: pointer; }
  .burger span { width: 22px; height: 2px; background: var(--ink); }
}
@media (max-width: 600px) {
  .header .btn--sm { display: none; }
  .burger { margin-left: auto; }
  .hero { height: 460px; }
  .search { grid-template-columns: 1fr; margin-top: -48px; }
  .listings { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .agents li { grid-template-columns: auto 1fr; }
  .agents a { grid-column: 2; justify-self: start; }
  .estimate { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .home__img img { transition: none; } }
