:root {
  --navy: #2f4f90; --navy-d: #1e3563; --teal: #3ec0be; --teal-d: #0f766e; --teal-ink: #08343a;
  --sun: #f5a623; --red: #c2410c; --green: #15803d;
  --ink: #12212f; --muted: #5b6b7c; --line: #e2e8f0; --bg: #ffffff; --soft: #f5f9fa; --card: #ffffff;
  --head: 'Montserrat', system-ui, sans-serif; --body: 'Lato', system-ui, sans-serif;
  --wrap: 1140px; --r: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.4vw, 46px); }
h2 { font-size: clamp(22px, 2.8vw, 30px); }
h3 { font-size: 18px; }
a { color: var(--navy); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 700; }
.brand img { height: 34px; width: auto; }
.brand span { font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal-d); }
.nav { display: flex; gap: 18px; align-items: center; font-weight: 700; font-size: 14.5px; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--navy); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } .brand span { display: none; } }
.site-foot { background: var(--navy-d); color: #cdd8ea; padding: 36px 0; margin-top: 64px; font-size: 14px; }
.site-foot a { color: #fff; }
.site-foot .wrap { display: grid; gap: 18px; grid-template-columns: 2fr 1fr; }
@media (max-width: 720px) { .site-foot .wrap { grid-template-columns: 1fr; } }
.eho { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: #fff; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--head); font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 10px; background: var(--teal); color: var(--teal-ink); min-height: 44px; }
.btn:hover { filter: brightness(.96); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.danger { background: #fee2e2; color: #991b1b; }
.btn.sm { padding: 7px 12px; min-height: 34px; font-size: 13.5px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 9px; padding: 10px 12px; min-height: 44px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(62,192,190,.2); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--teal-d); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14.5px; }
.check input { margin-top: 3px; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14.5px; }
.alert.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.info { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.alert.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.section { padding: 40px 0; }
.hero { background: linear-gradient(135deg, var(--navy-d), var(--navy) 60%, #2c6f9b); color: #fff; padding: 56px 0 48px; }
.hero p { color: #dbe6f5; font-size: 18px; max-width: 640px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.filters select { width: auto; min-width: 140px; background: #fff; }
.homes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.home-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: inherit; background: #fff;
  transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.home-card:hover { box-shadow: 0 10px 28px rgba(18,33,47,.10); transform: translateY(-2px); }
.home-card .ph { aspect-ratio: 4/3; background: var(--soft) center/cover no-repeat; position: relative; }
.home-card .ph .tag { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--teal-d); font-weight: 700; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; }
.home-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.price { font-family: var(--head); font-weight: 800; font-size: 22px; }
.price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.specs { display: flex; gap: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r); }

/* home detail */
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; border-radius: var(--r); overflow: hidden; }
.gallery .main { aspect-ratio: 16/10; background: var(--soft) center/cover; cursor: zoom-in; }
.gallery .side { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.gallery .side div { background: var(--soft) center/cover; cursor: zoom-in; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } .gallery .side { display: none; } }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.thumbs img { width: 92px; height: 68px; object-fit: cover; border-radius: 8px; cursor: pointer; flex: none; opacity: .8; }
.thumbs img.on { opacity: 1; outline: 2.5px solid var(--teal); }
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 32px; margin-top: 28px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 84px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 18px 0; }
.fact { background: var(--soft); border-radius: 10px; padding: 12px 14px; }
.fact b { display: block; font-family: var(--head); font-size: 18px; }
.fact span { font-size: 13px; color: var(--muted); }
ul.features { columns: 2; padding-left: 18px; }
@media (max-width: 560px) { ul.features { columns: 1; } }
.lightbox { position: fixed; inset: 0; background: rgba(5,12,20,.92); display: flex; align-items: center; justify-content: center; z-index: 50; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; font-size: 26px; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }

/* steps (apply) */
.form-section { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 22px; }
.form-section h3 { display: flex; align-items: center; gap: 10px; }
.form-section h3 .n { background: var(--teal); color: var(--teal-ink); width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); background: var(--soft); padding: 10px 12px; white-space: nowrap; }
table.t td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f8fbfc; }
table.t tr.void td { color: #94a3b8; text-decoration: line-through; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef2f7; color: #334155; white-space: nowrap; }
.pill.green { background: #dcfce7; color: #166534; }
.pill.amber { background: #fef3c7; color: #92400e; }
.pill.red { background: #fee2e2; color: #991b1b; }
.pill.blue { background: #dbeafe; color: #1e40af; }
.pill.teal { background: #ccfbf1; color: #115e59; }
