:root {
  --teal: #0F766E;
  --deep: #083B37;
  --key: #F97316;
  --key-dark: #C2570C;
  --mist: #EEF5F3;
  --line: #CFE1DC;
  --ink: #102624;
  --muted: #4E6663;
  --white: #FFFFFF;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --wrap: min(1160px, 100% - 40px);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; font: 400 17px/1.6 var(--body); color: var(--ink); background: var(--mist); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--key); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 16px/1 var(--body); color: var(--white); background: var(--teal);
  border: 0; border-radius: 12px; padding: 15px 22px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--deep); }
.btn-key { background: var(--key); }
.btn-key:hover { background: var(--key-dark); }
.btn-small { padding: 11px 16px; font-size: 15px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 14px max(20px, (100% - 1160px) / 2); background: rgba(238, 245, 243, 0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal); font: 800 24px/1 var(--display); }
.brand em { font-style: normal; color: var(--key); }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a:hover { color: var(--teal); }

/* Hero */
.hero {
  width: var(--wrap); margin: 0 auto; padding: 72px 0 64px;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center;
}
.hero h1 { font-size: clamp(42px, 6.4vw, 82px); font-weight: 800; color: var(--deep); max-width: 13ch; }
.lede { font-size: 20px; color: var(--muted); max-width: 52ch; margin-top: 22px; }
.hero-art { margin: 0; justify-self: center; width: min(420px, 100%); aspect-ratio: 1; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: 0 0 0 18px rgba(15, 118, 110, 0.07), 0 0 0 36px rgba(15, 118, 110, 0.04); }
.hero-art img { width: 70%; }

.search { margin-top: 34px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 14px; max-width: 640px; }
.seg { display: inline-flex; background: var(--mist); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.seg button { font: 700 15px var(--body); border: 0; background: transparent; color: var(--muted); padding: 9px 18px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--teal); color: var(--white); }
.search-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 10px; }
.search select, .search input {
  font: 500 16px var(--body); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; background: var(--white); min-width: 0;
}

/* Listings */
.homes { width: var(--wrap); margin: 0 auto; padding: 40px 0 80px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.status { color: var(--muted); max-width: 52ch; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.listing { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--white); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.listing:hover .listing-title { color: var(--teal); }
.listing:focus-visible { outline: 3px solid var(--key); outline-offset: 3px; }
.listing-photo { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--mist) url('/img/mark.svg') center / 34% no-repeat; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--key); color: var(--white); font: 700 12px var(--body); padding: 4px 8px; border-radius: 6px; }
.listing-body { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 18px; }
.listing-price { font: 800 22px/1.2 var(--display); color: var(--deep); }
.listing-title { font-weight: 600; }
.listing-meta { font-size: 14px; color: var(--muted); }

/* Locality wall: the signature element */
.localities { background: var(--deep); color: var(--white); padding: 84px max(20px, (100% - 1160px) / 2); }
.localities .muted { color: #A7CFC8; margin-top: 8px; }
.wall { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 4px 26px; align-items: baseline; }
.wall button {
  all: unset; cursor: pointer; font-family: var(--display); font-weight: 700; line-height: 1.1;
  color: #8FC3BB; transition: color 0.15s;
}
.wall button:nth-child(5n + 1) { font-size: clamp(34px, 5vw, 64px); color: var(--white); }
.wall button:nth-child(5n + 2) { font-size: clamp(22px, 3vw, 36px); }
.wall button:nth-child(5n + 3) { font-size: clamp(28px, 4vw, 50px); }
.wall button:nth-child(5n + 4) { font-size: clamp(20px, 2.4vw, 28px); }
.wall button:nth-child(5n) { font-size: clamp(26px, 3.4vw, 42px); color: #CDE6E1; }
.wall button:hover, .wall button[aria-pressed="true"] { color: var(--key); }
.wall button:focus-visible { outline: 3px solid var(--key); outline-offset: 2px; }

/* How it works */
.how { width: var(--wrap); margin: 0 auto; padding: 88px 0; }
.steps { list-style: none; counter-reset: s; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.steps li { counter-increment: s; border-top: 3px solid var(--teal); padding-top: 18px; }
.steps li::before { content: counter(s); display: block; font: 800 46px/1 var(--display); color: var(--key); margin-bottom: 12px; }
.steps p { color: var(--muted); margin-top: 8px; }

/* Owners */
.owners {
  width: var(--wrap); margin: 0 auto 88px; padding: 52px; border-radius: 28px; background: var(--white);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
}
.owners p { margin: 16px 0 0; color: var(--muted); max-width: 58ch; }
.owners .btn { margin-top: 26px; }
.owner-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.owner-points li { background: var(--mist); border-radius: 14px; padding: 18px 20px; }
.owner-points b { color: var(--teal); }

/* Services */
.services { width: var(--wrap); margin: 0 auto; padding: 0 0 88px; }
.service-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.service-list li { padding: 24px 24px 26px 0; border-bottom: 1px solid var(--line); }
.service-list p { color: var(--muted); margin: 6px 0 10px; }
.service-list span { font-weight: 700; color: var(--teal); }

/* Plans */
.plans { width: var(--wrap); margin: 0 auto; padding: 0 0 88px; }
.plans .muted { margin-top: 8px; }
table { width: 100%; border-collapse: collapse; margin: 28px 0 12px; background: var(--white); border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); }
thead th { font-size: 14px; color: var(--muted); font-weight: 600; background: #F7FBFA; }
tbody th { font-weight: 700; }
tbody th small { display: block; font-weight: 500; color: var(--muted); }
td:last-child { font-weight: 800; font-family: var(--display); font-size: 20px; color: var(--deep); }
tbody tr:last-child > * { border-bottom: 0; }

/* App */
.app { width: var(--wrap); margin: 0 auto 88px; padding: 52px; border-radius: 28px; background: var(--teal); color: var(--white); display: flex; gap: 40px; align-items: center; }
.app p { margin-top: 12px; color: #D5ECE8; max-width: 56ch; }
.app .store { display: inline-block; margin-top: 20px; background: var(--deep); color: var(--white); padding: 12px 18px; border-radius: 12px; font-weight: 700; }

/* Footer */
.foot { background: var(--white); border-top: 1px solid var(--line); padding: 40px max(20px, (100% - 1160px) / 2); display: grid; gap: 10px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 800 20px var(--display); color: var(--teal); }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* Listing dialog */
dialog { position: fixed; width: min(820px, 100% - 24px); max-height: 92vh; padding: 0; border: 0; border-radius: 22px; color: var(--ink); }
dialog::backdrop { background: rgba(8, 59, 55, 0.6); }
.close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--white); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--mist); min-height: 80px; }
.gallery img { flex: 0 0 100%; height: 360px; object-fit: cover; scroll-snap-align: start; }
.listing-detail { padding: 24px 28px 30px; }
.listing-detail:first-child { padding-top: 56px; }
.detail-price { font: 800 30px/1.1 var(--display); color: var(--deep); }
.listing-detail h2 { font-size: 24px; margin-top: 6px; }
.detail-address { color: var(--muted); margin-top: 6px; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; margin: 22px 0; padding: 18px; background: var(--mist); border-radius: 14px; }
.specs dt { font-size: 13px; color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; }
.detail-desc { max-width: 65ch; }
.amenities { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amenities li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.detail-cta { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* Legal pages */
.legal { width: min(760px, 100% - 40px); margin: 0 auto; padding: 56px 0 80px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); color: var(--deep); }
.legal h2 { font-size: 24px; margin: 36px 0 10px; }
.legal p, .legal li { color: #2C4441; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; }

@media (max-width: 900px) {
  .top nav { display: none; }
  .top .btn { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-art { display: none; }
  .search-row { grid-template-columns: 1fr; }
  .steps, .service-list { grid-template-columns: 1fr; }
  .owners { grid-template-columns: 1fr; padding: 32px 24px; }
  .app { flex-direction: column; align-items: flex-start; padding: 36px 24px; }
  th, td { padding: 12px; }
  thead th:nth-child(3), tbody td:nth-child(3) { display: none; }
  .gallery img { height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
