:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1d2422;
  --ink-2: #4b5552;
  --muted: #7a8380;
  --line: #e6e2da;
  --accent: #24463c;
  --accent-2: #2f5d50;
  --accent-soft: #e7efe9;
  --warm: #c8743c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 8px 24px rgba(20, 30, 25, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  color: #fff; transition: background .2s, box-shadow .2s, color .2s;
}
.topbar.scrolled { background: rgba(250, 248, 244, .92); backdrop-filter: blur(10px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; margin-right: auto; min-width: 0; }
.brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--warm); }
.topnav { display: none; gap: 24px; }
.topnav a { color: inherit; text-decoration: none; font-size: 15px; opacity: .9; }
.topnav a:hover { opacity: 1; text-decoration: underline; }
@media (min-width: 820px) { .topnav { display: flex; } .topbar { padding-left: 32px; padding-right: 32px; } }

/* Hero */
.hero { position: relative; min-height: 78vh; min-height: 78svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--accent); }
.hero-media, .hero-media > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img { object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.15) 55%, rgba(0,0,0,.7) 100%); }
.hero-content { position: relative; padding-top: 100px; padding-bottom: 40px; }
.hero-price { font: 600 clamp(2.4rem, 8vw, 4.2rem)/1 var(--serif); margin: 14px 0 8px; }
.hero-address { font: 500 clamp(1.15rem, 3vw, 1.5rem)/1.3 var(--sans); }
.hero-address span { display: block; opacity: .85; font-size: .85em; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
@media (max-width: 480px) { .hero-actions .btn { flex: 1 1 auto; padding: 0 16px; } }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--warm); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.badge[data-status="Pending"] { background: #b08a1e; }
.badge[data-status="Sold"] { background: #a03a2f; }
.hero.is-placeholder .ph { background: radial-gradient(120% 90% at 70% 20%, #3c6b5d 0%, #24463c 55%, #1a332c 100%); color: rgba(255,255,255,.55); justify-content: flex-start; padding-top: 22vh; }
.hero.is-placeholder .ph svg { width: 96px; height: 96px; }
.hero.is-placeholder .ph-label, .hero.is-placeholder .ph-sub { color: rgba(255,255,255,.7); }

/* Placeholder */
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 100%; padding: 12px; text-align: center;
  background: linear-gradient(135deg, #eef1ec 0%, #e3e8e2 100%); color: #8fa298;
}
.ph svg { width: 56px; height: 56px; }
.ph-label { font-weight: 600; color: #4f625a; font-size: 15px; }
.ph-sub { font-size: 12px; color: #7d8e86; text-transform: uppercase; letter-spacing: .08em; }

/* Facts */
.facts { position: relative; z-index: 2; margin-top: -1px; }
.facts-list {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transform: translateY(-28px);
}
.facts-list li { grid-column: span 2; padding: 14px 8px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts-list li:nth-child(n+4) { grid-column: span 3; border-bottom: 0; }
.facts-list li:nth-child(3), .facts-list li:last-child { border-right: 0; }
.facts-list.four { grid-template-columns: 1fr 1fr; }
.facts-list.four li { grid-column: auto; }
.facts-list.four li:nth-child(odd) { border-right: 1px solid var(--line); }
.facts-list.four li:nth-child(3) { border-right: 1px solid var(--line); border-bottom: 0; }
.facts-list.four li:nth-child(2) { border-right: 0; }
.facts-list strong { display: block; font: 600 1.35rem/1.2 var(--serif); }
.facts-list span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (min-width: 720px) {
  .facts-list, .facts-list.four { grid-template-columns: repeat(var(--n, 5), 1fr); }
  .facts-list li, .facts-list li:nth-child(n+4) { grid-column: auto; border-bottom: 0; padding: 20px 8px; }
  .facts-list li:nth-child(3), .facts-list.four li:nth-child(2) { border-right: 1px solid var(--line); }
  .facts-list li:last-child { border-right: 0; }
}

/* Sections */
.section { padding-top: 32px; padding-bottom: 32px; }
@media (min-width: 720px) { .section { padding-top: 56px; padding-bottom: 56px; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.g-item { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--line); }
.g-item.g-wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 720px) { .g-item.g-wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; } }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.g-item:hover img { transform: scale(1.03); }
.g-label { position: absolute; left: 8px; bottom: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(20,30,25,.65); color: #fff; font-size: 12px; font-weight: 500; }
.g-item .ph + .g-label { display: none; }
.g-item .ph svg { width: 40px; height: 40px; }
.g-item .ph-label { font-size: 13px; }
.g-item .ph-sub { font-size: 10px; }

/* Listing links */
.links-section { max-width: 680px; text-align: center; }
.tagline { font: 500 1.15rem/1.4 var(--serif); color: var(--ink-2); margin: 0 0 28px; }
.links-sub { margin: 6px 0 18px; }
.links { display: grid; gap: 10px; }
.link-btn {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 68px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; text-align: left; transition: transform .15s, border-color .15s;
}
.link-btn:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.link-btn:active { transform: scale(.99); }
.link-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font: 600 1.2rem var(--serif); }
.link-text { flex: 1; min-width: 0; display: grid; }
.link-text strong { font-size: 16px; }
.link-text span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-arrow { flex: none; font-size: 20px; color: var(--accent-2); }
.link-contact { margin-top: 10px; background: var(--accent); border-color: var(--accent); color: #fff; }
.link-contact:hover { background: var(--accent-2); border-color: var(--accent-2); }
.link-contact .link-icon { background: rgba(255,255,255,.15); color: #fff; font-family: var(--sans); }
.link-contact .link-text span, .link-contact .link-arrow { color: rgba(255,255,255,.8); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }

/* Contact */
.contact-section { background: var(--accent); color: #fff; margin-top: 24px; }
.contact-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; } }
.contact-intro p { opacity: .88; font-size: 17px; }
.contact-direct a { color: #fff; font-weight: 600; }
.form { color: var(--ink); display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.form-row { display: grid; gap: 14px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font: 16px/1.4 var(--sans);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; border-color: transparent; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.4em; font-size: 15px; }
.form-status.ok { color: var(--accent-2); font-weight: 600; }
.form-status.err { color: #a03a2f; }

/* Footer */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; padding-bottom: 110px; color: var(--muted); font-size: 14px; }
.footer-admin { color: var(--muted); }
@media (min-width: 720px) { .footer { padding-bottom: 32px; } }

/* Mobile sticky bar */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .25s;
}
.mobile-bar.show { transform: none; }
.mobile-bar-price { flex: 1; min-width: 0; line-height: 1.25; }
.mobile-bar-price strong { display: block; font: 600 1.15rem var(--serif); }
.mobile-bar-price span { font-size: 12px; color: var(--muted); }
@media (min-width: 720px) { .mobile-bar { display: none; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,14,12,.95); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 0 64px; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-stage .ph { max-width: 720px; max-height: 540px; aspect-ratio: 4 / 3; height: auto; border-radius: 10px; }
.lb-close { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); width: 48px; height: 64px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 40px; line-height: 1; cursor: pointer; border-radius: 10px; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-caption { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: 14px; }
