:root {
  --bg: #F6F3EE;
  --card: #FFFFFF;
  --ink: #23302A;
  --muted: #6B7069;
  --line: #E4DED3;
  --green: #2F4A3A;
  --sand: #B89B6A;
  --sand-soft: #EFE6D6;
  --danger: #B3261E;
  --radius: 14px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 108px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; padding-bottom: 84px; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 21px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--sand); margin: 0 0 4px; font-weight: 600; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { letter-spacing: .22em; font-size: 13px; }
.brand b { color: var(--green); }
.icon-btn { background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; font-size: 18px; }

.hero { position: relative; max-width: 1100px; margin: 0 auto; }
.hero-img { aspect-ratio: 16 / 10; max-height: 62vh; width: 100%; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-badge { position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.92); padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.hero-badge.ok { color: var(--green); }

/* image placeholder when a photo hasn't been added yet */
.ph { background: linear-gradient(135deg, #D9CFBE, #A9B5A4); position: relative; }
.ph.missing::after { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.95); font-family: var(--serif); font-size: 20px; letter-spacing: .04em; }
.ph.missing img { opacity: 0; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 18px; }
.title-block { padding: 26px 0 8px; }
.tagline { font-family: var(--serif); font-size: 21px; margin: 0 0 6px; color: var(--green); }
.meta { color: var(--muted); font-size: 14px; margin: 0; }

.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 18px 0; }
.glance div { background: var(--card); padding: 12px; }
.glance span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.glance b { font-weight: 600; font-size: 15px; }
.teaser { padding-left: 18px; margin: 0 0 20px; }
.teaser li { margin: 4px 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.gate-card form { display: grid; gap: 14px; margin-top: 14px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
label i { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FCFBF8; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sand); outline-offset: 0; border-color: transparent; }
.phone { display: flex; border: 1px solid var(--line); border-radius: 10px; background: #FCFBF8; overflow: hidden; }
.phone span { padding: 12px 10px 12px 14px; color: var(--muted); border-right: 1px solid var(--line); }
.phone input { border: 0; border-radius: 0; }
.consent { grid-template-columns: 20px 1fr; align-items: start; font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.code-input { font-size: 28px; letter-spacing: .5em; text-align: center; padding: 14px; }
.error { color: var(--danger); font-size: 13px; margin: 0; min-height: 0; }
.error:empty { display: none; }
.dev-note { background: var(--sand-soft); padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 0; }

.btn { font: 600 15px var(--sans); border: 0; border-radius: 10px; padding: 14px 18px; cursor: pointer; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.sm { padding: 10px 16px; font-size: 14px; }

.help { display: flex; gap: 8px; align-items: center; margin: 18px 0 34px; flex-wrap: wrap; }
.help p { margin: 0 6px 0 0; color: var(--muted); font-size: 13px; }
.pill { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 14px; text-decoration: none; color: var(--ink); font-size: 13px; cursor: pointer; }

/* ---- unlocked project ---- */
.secnav { position: sticky; top: 49px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; background: var(--bg); scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 8px -18px 0; padding-left: 18px; padding-right: 18px; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { white-space: nowrap; text-decoration: none; color: var(--muted); font-size: 13px; padding: 6px 12px; border-radius: 99px; border: 1px solid transparent; }
.secnav a.on { color: var(--green); border-color: var(--green); background: #fff; }

.sec { padding: 34px 0 6px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fact span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fact b { font-weight: 600; }
.fact.wide { grid-column: 1 / -1; }
.hl { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hl li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 44px; position: relative; }
.hl li::before { content: ''; position: absolute; left: 16px; top: 19px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--sand); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery figure { margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #ddd; margin-top: 14px; }
.video iframe { width: 100%; height: 100%; border: 0; }

.chipsrow { display: flex; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; }
.chipsrow button, .chips button { font: 500 13px var(--sans); border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 8px 14px; cursor: pointer; }
.chipsrow button.on { background: var(--green); border-color: var(--green); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; }
.plan .ph { aspect-ratio: 4/3; }
.plan .ph img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.plan div.body { padding: 12px 14px; }
.plan b { font-family: var(--serif); font-size: 20px; }
.plan small { display: block; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 14px 0 0; counter-reset: s; }
.steps li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0 14px 40px; border-bottom: 1px dashed var(--line); position: relative; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--sand-soft); color: var(--green); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.steps b { color: var(--green); }

.amen-group { margin: 16px 0; }
.amen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.amen-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 10px 14px; }
.amen-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--sand-soft); color: var(--green); display: grid; place-items: center; }
.amen-t { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
@media (max-width: 420px) { .amen { grid-template-columns: 1fr 1fr; } }

.specs { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.specs td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.specs td:first-child { width: 36%; color: var(--muted); }

.map { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 12px 0; }
.map iframe { width: 100%; height: 100%; border: 0; }
.lm-group h4 { margin: 18px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--sand); }
.lm { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lm span:last-child { color: var(--muted); white-space: nowrap; }

.brochure { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.visit-card { background: var(--green); color: #fff; border-radius: var(--radius); padding: 24px; margin: 20px 0; }
.visit-card h3 { color: #fff; }
.visit-card p { color: rgba(255,255,255,.82); }
.visit-card .btn { background: #fff; color: var(--green); }

.tbc { display: inline-block; font-size: 11px; background: var(--sand-soft); color: #8A6D3B; padding: 2px 8px; border-radius: 99px; }

/* ---- sticky bar ---- */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.05); }
.ask { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--bg); padding: 10px 14px; border-radius: 99px; font: 500 14px var(--sans); color: var(--green); cursor: pointer; }
.bar-actions { display: flex; gap: 8px; align-items: center; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); background: #fff; cursor: pointer; text-decoration: none; }
.round.primary { background: var(--green); color: #fff; border: 0; font-size: 18px; }

/* ---- sheets ---- */
.scrim { position: fixed; inset: 0; background: rgba(20,25,22,.4); z-index: 50; }
.sheet { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-height: 88vh; height: 88vh; background: var(--bg); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; box-shadow: 0 -10px 40px rgba(0,0,0,.15); }
#visitSheet { height: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--sand); border-radius: 20px 20px 0 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; font-size: 14.5px; }
.msg.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.typing { color: var(--muted); }
.chat-input { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.chat-input input { border-radius: 99px; }
.visit-form, .visit-done { padding: 18px; display: grid; gap: 14px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-weight: 500; }
.seg input { width: auto; accent-color: var(--green); }

.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(12,15,13,.97); display: grid; place-items: center; padding: 20px; color: #fff; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 8px; background: #fff; }
.lightbox .icon-btn { position: absolute; top: 14px; right: 14px; color: #fff; }
.lightbox p { text-align: center; margin: 10px 0 0; }

.foot { text-align: center; padding: 30px 18px 20px; color: var(--muted); font-size: 13px; }
.foot p { margin: 4px 0; }

@media (min-width: 760px) {
  h1 { font-size: 52px; }
  .hero-img { border-radius: 0 0 20px 20px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

/* --- mobile polish --- */
.fact b { overflow-wrap: anywhere; }
.ph.missing img { opacity: 0 !important; }
.ph.missing::after { font-size: 15px; padding: 8px; text-align: center; line-height: 1.2; }
.gallery figure:first-child.ph.missing::after { font-size: 20px; }
.actionbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
.ask { padding: 9px 12px; white-space: nowrap; flex-shrink: 0; }
.bar-actions { gap: 6px; }
.bar-actions .btn.sm { padding: 10px 14px; white-space: nowrap; }
@media (max-width: 360px) { .ask span.label { display: none; } }

/* --- real renders --- */
.hero-img { aspect-ratio: 16 / 9; }
.gallery figure { position: relative; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.gallery figure.missing figcaption { display: none; }
.ph img { transition: opacity .3s; }
.ph.missing::after { z-index: 1; }

/* --- location map --- */
.umap { position: relative; isolation: isolate; transform: translateZ(0); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 14px 0 6px; background: #F3EEE6; }
.umap-canvas { height: 380px; }
@media (min-width: 760px) { .umap-canvas { height: 460px; } }
.map-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 14px; }
.umap-card { position: absolute; left: 10px; right: 52px; top: 10px; display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.umap-card b { display: block; font-size: 14.5px; }
.umap-card span { color: var(--green); font-weight: 600; font-size: 14px; }
.umap-card small { display: block; color: var(--muted); font-size: 12px; }
.mc-icon { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.umap-h { margin-top: 18px !important; }
.kp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
@media (min-width: 760px) { .kp-grid { grid-template-columns: repeat(3, 1fr); } }
.kp { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; font: inherit; color: var(--ink); }
.kp-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--sand-soft); color: var(--green); display: grid; place-items: center; }
.kp-t b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.kp-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.kp.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.kp.on .kp-ic { background: var(--green); color: #fff; }
.kp.on .kp-meta { color: var(--green); font-weight: 600; }
.cat-row { margin-top: 8px; }
.cat-row button { display: inline-flex; align-items: center; gap: 6px; }
.cat-row button.on { background: var(--green); border-color: var(--green); color: #fff; }
.lm-list { display: grid; gap: 6px; margin-bottom: 8px; }
.lm-list:empty { display: none; }
.lm-list .lm { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.lm-list .lm.on { border-color: var(--sand); }
.lm-ic { color: var(--sand); display: grid; }
.lm-n { flex: 1; font-size: 14px; }
.lm-d { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
/* markers */
.um-marker { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.um-dot { display: grid; place-items: center; border-radius: 50%; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); border: 2px solid #fff; }
.um-home .um-dot { width: 38px; height: 38px; background: var(--green); }
.um-home .um-label, .um-dest .um-label { order: -1; margin-bottom: 4px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.um-dest .um-dot { width: 30px; height: 30px; background: var(--sand); }
.um-dest .um-label { background: #fff; color: var(--green); }
.um-poi .um-dot { width: 28px; height: 28px; background: var(--sand); transition: transform .15s; }
.um-poi.on .um-dot { background: var(--green); transform: scale(1.18); }
.um-pop .maplibregl-popup-content { border-radius: 10px; padding: 8px 12px; font: 13px var(--sans); box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.um-pop b { display: block; }
.um-pop span { color: var(--green); font-weight: 600; font-size: 12.5px; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* --- gallery viewer arrows --- */
.lightbox .lb-nav { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; place-items: center; cursor: pointer; z-index: 2; }
.lightbox .lb-nav:hover { background: rgba(255,255,255,.26); }
.lightbox.has-nav .lb-nav { display: grid; }
.lightbox .lb-prev { left: 12px; }
.lightbox .lb-next { right: 12px; }
.lightbox { user-select: none; }
@media (max-width: 600px) { .lightbox .lb-nav { width: 40px; height: 40px; background: rgba(0,0,0,.35); } .lightbox .lb-prev { left: 6px; } .lightbox .lb-next { right: 6px; } }
