@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --green: #4A6F5A;
  --green-soft: #3C5C49;
  --ink: #22261F;
  --ink-soft: #3A4433;
  --brass: #B4894F;
  --brass-light: #D9B87C;
  --ivory: #F7F5EF;
  --sage: #C9CFC0;
  --teal: #33505A;
  --line: rgba(28,59,47,0.16);
  --line-light: rgba(247,245,239,0.2);
  --placeholder-bg: #E8DCC8;
  --placeholder-text: #9C7B4F;
  --display: 'Fraunces', serif;
  --body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Fraunces is a variable font that automatically leans into a more
     irregular, hand-lettered "display" character as font-size increases
     (its built-in optical-size axis). That's intentional in the typeface,
     but reads as "skewed" or odd on page titles here — pinning opsz to a
     calmer, text-like value keeps every heading site-wide restrained and
     consistent, regardless of how large it's displayed. */
  font-variation-settings: 'opsz' 24;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--green);
  color: var(--ivory);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line-light);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
.brand-text {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.05em;
  color: var(--ivory);
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
}
.brand-text .amp { color: var(--brass-light); font-weight: 600; }
.brand-mark { display: flex; align-items: center; line-height: 1; }
.brand-mark img.brand-logo {
  height: 58px; width: auto; display: block;
}
nav.main-nav { display: flex; gap: 34px; align-items: center; line-height: 1; }
nav.main-nav a {
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ivory); opacity: 0.82; transition: opacity .2s;
  padding: 4px 0; border-bottom: 1px solid transparent; line-height: 1;
}
nav.main-nav a:hover { opacity: 1; border-color: var(--brass); }
nav.main-nav a.cta {
  background: var(--brass); color: var(--ink); opacity: 1;
  padding: 9px 18px; border-radius: 2px; font-weight: 600; border-bottom: none;
}
nav.main-nav a.cta:hover { background: var(--brass-light); }

.nav-toggle {
  display: none; position: relative;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0;
  -webkit-appearance: none; appearance: none;
}
.nav-toggle span {
  display: block; position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--ivory); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle span:nth-child(1) { top: 8px; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 22px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-soft) 100%);
  color: var(--ivory);
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background-image: repeating-linear-gradient(90deg,
    transparent, transparent 38px, rgba(246,243,234,0.05) 38px, rgba(246,243,234,0.05) 40px);
  clip-path: polygon(0 100%, 3% 40%, 8% 70%, 14% 20%, 20% 55%, 27% 10%, 34% 60%, 41% 35%,
    48% 65%, 55% 15%, 62% 50%, 70% 30%, 78% 68%, 85% 25%, 92% 58%, 100% 20%, 100% 100%);
  opacity: 0.5;
}
.hero-watermark {
  position: absolute; right: 32px; top: -33px;
  width: clamp(180px, 21.6vw, 324px); height: auto;
  opacity: 0.45; pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .eyebrow {
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brass-light); margin-bottom: 22px; font-weight: 600;
}
.hero h1 {
  font-family: var(--display); font-weight: 500; font-size: 3.4rem;
  line-height: 1.08; max-width: 720px; margin: 0 0 24px;
}
.hero p.lede {
  max-width: 520px; font-size: 1.08rem; color: rgba(246,243,234,0.78); margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; }
.btn {
  display: inline-block; padding: 14px 26px; font-size: 0.85rem;
  letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
  border-radius: 2px; border: 1px solid transparent; cursor: pointer;
}
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: var(--brass-light); }
.btn-outline { border-color: var(--line-light); color: var(--ivory); background: transparent; }
.btn-outline:hover { border-color: var(--brass-light); color: var(--brass-light); }
.btn-dark { background: var(--ink); color: var(--ivory); }
.btn-dark:hover { background: var(--ink-soft); }

/* ---------- Section scaffolding ---------- */
section.block { padding: 84px 0; }
section.block.alt { background: #EFEADC; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px; gap: 24px; flex-wrap: wrap;
}
.section-head .eyebrow {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brass); font-weight: 600; margin-bottom: 10px; display: block;
}
.section-head h2 {
  font-family: var(--display); font-weight: 500; font-size: 2.1rem; margin: 0;
}
.section-head .see-all { font-size: 0.85rem; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Property cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card-property {
  background: #fff; border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card-property:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(18,24,31,0.12); }
.card-property .thumb {
  aspect-ratio: 4/3; background: var(--placeholder-bg) url('data:image/svg+xml;utf8,') center/cover;
  position: relative; display: flex; align-items: center; justify-content: center;
  color: var(--placeholder-text); font-family: var(--display); font-size: 0.9rem;
}
.card-property .thumb .tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--brass); color: var(--ink); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 2px;
}
.card-property .body { padding: 20px; }
.card-property .price { font-family: var(--display); font-size: 1.3rem; margin: 0 0 6px; }
.card-property .title { font-weight: 600; margin: 0 0 4px; font-size: 0.98rem; }
.card-property .district { font-size: 0.83rem; color: #6b6355; margin-bottom: 14px; }
.spec-row { display: flex; gap: 16px; font-size: 0.8rem; color: #55503f; border-top: 1px solid var(--line); padding-top: 12px; }
.spec-row span { display: flex; align-items: center; gap: 5px; }

/* ---------- Filter toggle ---------- */
.filter-bar { display: flex; gap: 10px; margin-bottom: 36px; }
.filter-bar a {
  padding: 9px 20px; border: 1px solid var(--line); border-radius: 20px;
  font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; font-weight: 600; color: var(--ink);
}
.filter-bar a.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ---------- Article cards ---------- */
.grid-articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card-article .thumb {
  aspect-ratio: 16/10; background: var(--placeholder-bg); border-radius: 3px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; color: var(--placeholder-text); font-family: var(--display);
}
.card-article h3 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; margin: 0 0 8px; }
.card-article p { font-size: 0.88rem; color: #55503f; margin: 0; }
.card-article .date { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); margin-bottom: 8px; display: block; }

/* ---------- Property detail ---------- */
.detail-gallery-v2 { margin-bottom: 40px; }
.detail-gallery-v2 .main-photo {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px;
  background: var(--placeholder-bg); display: block;
}
.thumb-strip {
  display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin;
}
.thumb-strip .thumb {
  width: 110px; height: 82px; object-fit: cover; border-radius: 3px; flex-shrink: 0;
  cursor: pointer; opacity: 0.6; border: 2px solid transparent; transition: opacity .15s, border-color .15s;
}
.thumb-strip .thumb:hover { opacity: 0.85; }
.thumb-strip .thumb.active { opacity: 1; border-color: var(--brass); }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.detail-header h1 { font-family: var(--display); font-weight: 500; font-size: 2rem; margin: 0 0 8px; }
.detail-header .price { font-family: var(--display); font-size: 1.7rem; color: var(--brass); }
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 30px 0; }
.ledger div { padding: 18px 0; text-align: center; border-right: 1px solid var(--line); }
.ledger div:last-child { border-right: none; }
.ledger .num { font-family: var(--display); font-size: 1.4rem; display: block; }
.ledger .lbl { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6355; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--green); color: rgba(247,245,239,0.72); padding: 56px 0 30px; margin-top: 60px;
}
footer.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
footer.site-footer .brand { color: var(--ivory); margin-bottom: 10px; }
footer.site-footer .col h4 { color: var(--ivory); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 14px; }
footer.site-footer .col a { display: block; font-size: 0.88rem; margin-bottom: 8px; opacity: 0.8; }
footer.site-footer .bottom { border-top: 1px solid var(--line-light); margin-top: 40px; padding-top: 24px; font-size: 0.76rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.social-icons { display: flex; gap: 14px; margin-top: 18px; }
footer.site-footer .col .social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: #FFFFFF;
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 0; opacity: 1;
}
.social-icons a img { display: block; width: 18px; height: 18px; }
footer.site-footer .col .social-icons a:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.legal-links { display: flex; gap: 20px; }
.legal-links a { opacity: 0.8; }
.legal-links a:hover { opacity: 1; }

/* ---------- Legal pages (Terms / Privacy) ---------- */
.legal-byline { color: #8a8474; font-size: 0.88rem; margin: -6px 0 40px; }
.legal-content { color: #3a3a30; font-size: 0.98rem; line-height: 1.7; padding-bottom: 60px; }
.legal-content h2 {
  font-family: var(--display); font-weight: 500; font-size: 1.35rem; color: var(--ink);
  margin: 40px 0 14px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin: 0 0 16px; }
.legal-content ul { margin: 0 0 16px; padding-left: 22px; }
.legal-content li { margin-bottom: 8px; }

/* ---------- Forms (admin) ---------- */
.admin-wrap { max-width: 760px; margin: 60px auto; padding: 0 24px; }
.admin-shell { max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }
.admin-topbar { background: var(--green); color: var(--ivory); padding: 18px 0; margin-bottom: 40px; }
.admin-topbar .wrap { display: flex; justify-content: space-between; align-items: center; max-width: 1080px; }
.admin-topbar nav a { margin-right: 24px; font-size: 0.85rem; opacity: 0.85; }
.admin-topbar nav a:hover { opacity: 1; }
.admin-topbar form { display: inline; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; letter-spacing: 0.02em; }
.field input[type=text], .field input[type=number], .field input[type=password],
.field input[type=email], .field input[type=tel],
.field select, .field textarea, .field input[type=file] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--body); font-size: 16px; background: #fff;
}
.field textarea { min-height: 160px; resize: vertical; }
.field select optgroup {
  font-size: 0.92rem; color: var(--ink); font-style: normal; font-weight: 700;
}
.field select option {
  font-size: 0.92rem; color: var(--ink); font-weight: 400;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 28px; margin-bottom: 24px; }
table.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
table.admin-table th, table.admin-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 0.88rem;
}
table.admin-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6b6355; }
.badge { font-size: 0.68rem; padding: 3px 9px; border-radius: 10px; text-transform: uppercase; font-weight: 700; }
.badge.sale { background: #e6ecec; color: var(--teal); }
.badge.lease { background: #f4e9d8; color: var(--brass); }
.thumb-mini { width: 56px; height: 42px; object-fit: cover; border-radius: 2px; background: var(--ink-soft); }
.error-msg { background: #fbe4e4; color: #9c2b2b; padding: 12px 16px; border-radius: 3px; margin-bottom: 20px; font-size: 0.88rem; }
.success-msg { background: #e2efe4; color: #2b6b3d; padding: 12px 16px; border-radius: 3px; margin-bottom: 20px; font-size: 0.88rem; }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.stat-cards .card .num { font-family: var(--display); font-size: 2.4rem; display: block; }
.stat-cards .card .lbl { font-size: 0.82rem; color: #6b6355; }
.existing-imgs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.existing-imgs .img-chip { position: relative; width: 130px; display: flex; flex-direction: column; gap: 6px; }
.existing-imgs img { width: 130px; height: 98px; object-fit: cover; border-radius: 3px; }
.existing-imgs label { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; color: #6b6355; }
.existing-imgs label input { width: auto; }
.key-photo-badge {
  background: var(--brass); color: var(--ink); font-size: 0.68rem; font-weight: 700;
  padding: 4px 8px; border-radius: 2px; text-align: center;
}
.btn-make-primary {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-size: 0.7rem; padding: 5px 8px; border-radius: 2px; cursor: pointer; font-family: var(--body);
}
.btn-make-primary:hover { background: var(--ivory); border-color: var(--brass); }

/* ---------- Article body ---------- */
.article-body { max-width: 680px; margin: 0 auto; }
.article-body .content { font-size: 1.05rem; color: #2c2a24; white-space: pre-wrap; }
.article-body h1 { font-family: var(--display); font-size: 2.3rem; margin-bottom: 10px; }
.article-body .meta { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); margin-bottom: 30px; }

/* ---------- Enquiry form + map (property detail) ---------- */
.enquire-block { margin-top: 60px; border-top: 1px solid var(--line); padding-top: 50px; }
.enquire-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.enquire-grid h3 { font-family: var(--display); font-weight: 500; font-size: 1.5rem; margin: 0 0 20px; }
.phone-field { display: grid; grid-template-columns: 210px 1fr; gap: 10px; }
.phone-field select { font-size: 16px; padding-left: 10px; padding-right: 6px; }
.map-embed { border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
.hcaptcha-mock {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; background: #fff;
  margin: 18px 0; gap: 14px;
}
.hcaptcha-mock .left { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.hcaptcha-mock .hc-logo { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--teal); }
.hcaptcha-mock small { display: block; color: #8a8474; font-size: 0.68rem; }
.notice-banner { padding: 14px 18px; border-radius: 3px; margin-bottom: 22px; font-size: 0.9rem; }
.notice-banner.ok { background: #e2efe4; color: #2b6b3d; }
.notice-banner.err { background: #fbe4e4; color: #9c2b2b; }

/* ---------- Contact page ---------- */
.contact-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 26px 0 34px; }
.contact-detail-grid .item { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; }
.contact-detail-grid .item .lbl { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); font-weight: 700; margin-bottom: 6px; display: block; }
.contact-detail-grid .item a, .contact-detail-grid .item span.val { font-size: 1.02rem; font-weight: 500; }
.contact-detail-grid .item a:hover { color: var(--brass); }

/* ---------- Chat widget ---------- */
.chat-window {
  position: fixed; top: 100px; right: 26px; z-index: 200;
  width: 360px; max-width: calc(100vw - 40px); height: 480px; max-height: calc(100vh - 130px);
  background: #fff; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--line);
}
.chat-window.open { display: flex; }
.chat-head { background: var(--green); color: #fff; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.chat-head button { background: none; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; opacity: .8; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #FAF8F2; }
.chat-msg { max-width: 84%; padding: 9px 13px; border-radius: 12px; font-size: 0.86rem; line-height: 1.4; }
.chat-msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }
.chat-msg.user { background: var(--green); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.chat-options button {
  border: 1px solid var(--green); color: var(--green); background: #fff; padding: 8px 13px;
  border-radius: 16px; font-size: 0.8rem; cursor: pointer; font-family: var(--body);
}
.chat-options button:hover { background: var(--green); color: #fff; }
.chat-input-row { display: flex; border-top: 1px solid var(--line); padding: 10px; gap: 8px; }
.chat-input-row input { flex: 1; border: 1px solid var(--line); border-radius: 16px; padding: 9px 14px; font-size: 16px; font-family: var(--body); }
.chat-input-row button { background: var(--brass); color: var(--ink); border: none; border-radius: 16px; padding: 0 18px; font-weight: 700; cursor: pointer; }

/* ---------- About page ---------- */
.about-lede { font-family: var(--display); font-size: 1.5rem; line-height: 1.4; max-width: 780px; color: var(--ink); margin-bottom: 20px; }
.about-body { max-width: 780px; font-size: 1.02rem; color: #3a3a30; margin-bottom: 8px; }
.service-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 22px; }
.service-cols h3 { font-family: var(--display); font-size: 1.4rem; color: var(--brass); margin-bottom: 4px; }
.service-cols .sub { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8474; margin-bottom: 22px; }
.service-item { margin-bottom: 22px; }
.service-item h4 { font-size: 1rem; margin: 0 0 6px; font-family: var(--body); font-weight: 700; }
.service-item p { font-size: 0.92rem; color: #55503f; margin: 0; }

@media (max-width: 860px) {
  .enquire-grid { grid-template-columns: 1fr; }
  .contact-detail-grid { grid-template-columns: 1fr; }
  .service-cols { grid-template-columns: 1fr; gap: 30px; }
  .chat-window {
    left: 16px; right: 16px; width: auto; top: 12px;
    height: 300px; max-height: 300px;
  }
  .site-header .wrap { position: relative; }
  nav.main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
    background: var(--green); flex-direction: column; align-items: stretch; gap: 0;
    box-shadow: 0 12px 24px rgba(0,0,0,0.2); border-top: 1px solid var(--line-light);
  }
  nav.main-nav.mobile-open { display: flex; }
  nav.main-nav a {
    padding: 16px 32px; border-bottom: 1px solid var(--line-light);
  }
  nav.main-nav a.cta { margin: 16px 32px; text-align: center; }
  .nav-toggle { display: flex; }
  .brand-text { font-size: 1.05rem; }
  .hero h1 { font-size: 2.3rem; }
  .hero-watermark { display: none; }
  .grid, .grid-articles { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .row2, .row3 { grid-template-columns: 1fr; }
  .phone-field { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
}
