/* ==========================================================
   Site stylesheet. Change the look from the variables below.
   ========================================================== */
:root {
  --bg: #fbfaf7;
  --card: #ffffff;
  --ink: #1b2430;
  --muted: #667180;
  --brand: #14365d;
  --brand-dark: #0d2540;
  --accent: #b8893b;
  --line: #e6e2d8;
  --ok: #1f6b45;
  --err: #a32727;
  --radius: 10px;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--brand-dark); }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 48px; padding-bottom: 48px; }
.section.alt { background: #f2efe7; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 2px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; transition: .15s; font-family: inherit; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand); color: #fff; }
.btn.gold { background: var(--accent); border-color: var(--accent); }
.btn.gold:hover { filter: brightness(.92); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; color: var(--brand-dark); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; }
.brand-sub { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 14px; color: var(--ink); font-weight: 500; font-size: .95rem; border-radius: 6px; }
.main-nav a:hover { text-decoration: none; background: #f2efe7; }
.main-nav li.active > a { color: var(--brand); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.main-nav a.nav-cta { background: var(--brand); color: #fff; border-radius: 999px; padding: 9px 20px; margin-left: 8px; box-shadow: none; }
.main-nav a.nav-cta:hover { background: var(--brand-dark); }
.main-nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); padding: 6px; flex-direction: column; align-items: stretch; gap: 0; }
.main-nav li:hover > .sub, .main-nav li:focus-within > .sub { display: flex; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--brand-dark); margin: 5px 0; transition: .2s; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 18px; max-height: calc(100vh - 68px); overflow-y: auto; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav .sub { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .main-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* Breadcrumbs and page heads */
.page-head { padding: 28px 0 8px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--muted); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 64px 0; }
.hero h1, .hero h2 { color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: #e2c487; font-weight: 600; margin-bottom: 10px; }
.hero .lead { color: #d8e1ec; }
.hero .btn.ghost { color: #fff; border-color: #fff; }
.hero .btn.ghost:hover { background: #fff; color: var(--brand-dark); }
.portrait { aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; max-width: 380px; margin-left: auto; width: 100%; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .initials { font-family: var(--font-head); font-size: 4.5rem; color: rgba(255, 255, 255, .8); }
.cea-chip { display: inline-block; margin-top: 18px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; font-size: .82rem; color: #e8eef6; }
@media (max-width: 800px) { .hero-grid { grid-template-columns: 1fr; } .portrait { margin: 0 auto; max-width: 280px; } }

/* Tiles (category hubs) */
.tiles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tiles.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: .15s; }
.tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20, 54, 93, .08); }
.tile-title { font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; color: var(--brand-dark); }
.tile-sub { font-size: .85rem; color: var(--muted); line-height: 1.4; }
.tile-count { margin-top: auto; padding-top: 8px; font-size: .82rem; font-weight: 600; color: var(--accent); }
.tile.is-empty { background: #f7f5ef; }
.tile.is-empty .tile-title { color: var(--muted); }
.tile.is-empty .tile-count { color: var(--muted); font-weight: 500; }
.tile.big { padding: 30px; }
.tile.big .tile-title { font-size: 1.5rem; }

/* Listing cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: .15s; }
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20, 54, 93, .1); }
.card-img { position: relative; aspect-ratio: 16 / 10; background: #e9e5da; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 3rem; color: #b9b19c; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 4px; }
.card-loc, .card-sub, .card-specs { margin: 0 0 2px; font-size: .9rem; color: var(--muted); }
.card-price { margin: auto 0 0; padding-top: 10px; font-weight: 600; color: var(--brand-dark); }
.empty-state { text-align: center; padding: 48px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Property detail */
.prop-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .prop-grid { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 16 / 10; background: #e9e5da; border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; width: 84px; height: 58px; cursor: pointer; background: none; }
.gallery-thumbs button.on { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.price-big { font-family: var(--font-head); font-size: 1.8rem; color: var(--brand-dark); margin: 4px 0 14px; }
.facts { width: 100%; border-collapse: collapse; margin: 0 0 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts th, .facts td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.facts th { width: 38%; color: var(--muted); font-weight: 500; background: #faf8f3; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.highlights { padding-left: 20px; }
.highlights li { margin-bottom: 4px; }
.side-box { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* Forms */
.form label { display: block; font-weight: 500; font-size: .9rem; margin: 0 0 14px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=number], .form input[type=password], .form input[type=url], .form select, .form textarea {
  width: 100%; margin-top: 5px; padding: 11px 13px; border: 1px solid #cfc9ba; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .85rem; color: var(--muted); }
.form .check input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: .95rem; }
.notice.ok { background: #e6f4ec; color: var(--ok); border: 1px solid #bfe0cd; }
.notice.err { background: #fbeaea; color: var(--err); border: 1px solid #efc4c4; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; gap: 24px; } }

/* Calculators */
.calc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.calc-nav a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .9rem; color: var(--ink); }
.calc-nav a:hover { border-color: var(--accent); text-decoration: none; }
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 26px; scroll-margin-top: 90px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .calc-grid { grid-template-columns: 1fr; } }
.result { background: #f4f1e8; border-radius: 8px; padding: 18px 20px; }
.result .row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid #e3ddcc; font-size: .95rem; }
.result .row:last-child { border-bottom: 0; }
.result .row.main { font-weight: 700; font-size: 1.1rem; color: var(--brand-dark); }
.note { font-size: .82rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--brand-dark); color: #c9d4e2; padding: 44px 0 20px; margin-top: 40px; font-size: .92rem; }
.site-footer a { color: #e6edf6; }
.site-footer h4 { color: #fff; font-size: 1.05rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: 6px; }
.social a { margin-right: 12px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 28px; padding-top: 18px; font-size: .8rem; color: #9fb0c6; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; background: #25d366; color: #fff; font-weight: 600; font-size: .9rem; padding: 11px 18px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.wa-float:hover { text-decoration: none; filter: brightness(.95); }

.prose p { max-width: 720px; }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.check-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
