/* ==========================================================================
   Cosmos Legacy Holdings — Estate Light (Palette B)
   ========================================================================== */
:root {
  /* Palette B */
  --bg: #FFFFFF;
  --bg-alt: #F5F2EC;         /* warm cream */
  --ink: #17202E;
  --muted: #5B6472;
  --primary: #1F4D3A;        /* deep forest green */
  --primary-dark: #17382B;
  --accent: #C08A2D;         /* amber / gold CTA */
  --accent-dark: #A9761F;
  --border: #E3DED3;
  --card: #FFFFFF;
  --shadow: 0 6px 24px rgba(23, 32, 46, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--ink); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: rgba(31, 77, 58, 0.06); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  padding: 9px 0;
  text-align: center;
}
.topbar a { color: #fff; font-weight: 600; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: grid; place-items: center;
  color: #fff; font-size: 18px;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(23,32,46,0.45), rgba(23,32,46,0.72)),
    url("../img/hero-land.svg") center/cover no-repeat;
  color: #fff;
  padding: 110px 0 96px;
}
.hero .container { position: relative; z-index: 2; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #E8D5A8;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(232,213,168,0.4);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 52px;
  color: #fff;
  max-width: 15ch;
  font-weight: 800;
}
.hero h1 em { font-style: normal; color: #E8D5A8; }
.hero p {
  font-size: 19px;
  color: #EAF0EC;
  max-width: 55ch;
  margin: 22px 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.8); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ---------- Stats band ---------- */
.stats {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num { font-size: 34px; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: 36px; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 17px; }
.kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- Why us cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card .card-ico {
  font-size: 30px;
  margin-bottom: 14px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- Properties grid ---------- */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 26px; }
.prop-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
}
.prop-card:hover { transform: translateY(-3px); }
.prop-thumb {
  height: 210px;
  background: linear-gradient(135deg, #dfe9e2, #c9d6cd);
  display: grid; place-items: center;
  color: var(--primary);
  font-size: 40px;
  position: relative;
  overflow: hidden;
}
.prop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prop-thumb .thumb-source {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
}
.prop-thumb .thumb-source a {
  display: inline-block;
  background: rgba(15, 23, 32, 0.78);
  color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
}
.prop-thumb .thumb-source a:hover { background: rgba(15, 23, 32, 0.95); }
.prop-thumb .thumb-tag {
  position: absolute; top: 14px; left: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}
.prop-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.prop-county { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.prop-title { font-size: 21px; margin: 6px 0 4px; }
.prop-apn { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.prop-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  margin-bottom: 18px;
}
.prop-fact .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.prop-fact .v { font-size: 17px; font-weight: 700; color: var(--ink); }
.prop-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.tag-green { background: rgba(31,77,58,0.1); color: var(--primary); }
.tag-amber { background: rgba(192,138,45,0.14); color: var(--accent-dark); }
.tag-neutral { background: #F0EEE8; color: var(--muted); }
.prop-price { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.prop-price .amount { font-size: 30px; font-weight: 800; color: var(--primary); }
.prop-price .per { color: var(--muted); font-size: 13.5px; }

.prop-actions { margin-top: 14px; }
.btn-locate { width: 100%; padding: 11px 20px; font-size: 14.5px; }

/* ---------- Interactive property map (Leaflet) ---------- */
.props-map { height: 520px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; z-index: 1; }
.props-map .leaflet-container { border-radius: var(--radius); font-family: inherit; }
.props-map .leaflet-control-layers { border-radius: 10px; border: 1px solid var(--border); box-shadow: none; font-size: 13px; font-weight: 600; }

.map-pop { min-width: 220px; }
.map-pop-kicker { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.map-pop-price { font-size: 26px; font-weight: 800; color: var(--primary); margin: 4px 0 2px; }
.map-pop-facts { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.map-pop-links { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.map-pop-cta { display: block; text-align: center; background: var(--primary); color: #fff; font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 9px; }
.map-pop-cta:hover { background: var(--primary-dark); text-decoration: none; }
.map-pop-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.parcel-boundary { pointer-events: auto; }
.cosmos-pop .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 10px 34px rgba(23,32,46,0.18); }
.cosmos-pop .leaflet-popup-content { margin: 16px 18px; line-height: 1.45; }
.map-legend { display: flex; gap: 18px; justify-content: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px rgba(23,32,46,0.25); vertical-align: -1px; }
.map-legend .brev { background: #1F7A5C; }
.map-legend .mari { background: #C08A2D; }

/* ---------- Financing calculator ---------- */
.calc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.calc-result {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc-result .label { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #C9E0D4; }
.calc-result .amount { font-size: 46px; font-weight: 800; margin: 8px 0 4px; }
.calc-result .sub { color: #BFD5C8; font-size: 15px; }
.calc-result .divider { border-top: 1px solid rgba(255,255,255,0.2); margin: 18px 0; }
.calc-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.calc-row .dim { color: #C9E0D4; }
.calc-note { margin-top: 16px; font-size: 12.5px; color: #BFD5C8; }

.field { margin-bottom: 22px; }
.field label { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.field label .val { color: var(--primary); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.calc-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 16px; }
.calc-selects select,
.money-input input,
.pct-input input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
}

.money-input,
.pct-input {
  position: relative;
  display: flex;
  align-items: center;
}

.money-input > span,
.pct-input > span {
  position: absolute;
  left: 14px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}

.money-input input,
.pct-input input {
  padding-left: 28px;
}

/* ---------- Financing modal / unit ---------- */
.fin-unit {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
}
.fin-unit h3 { margin-bottom: 6px; }
.fin-unit .price { font-size: 26px; color: var(--primary); font-weight: 800; margin-bottom: 14px; }

/* ---------- Two column / steps ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.steps { display: grid; gap: 22px; }
.step { display: flex; gap: 18px; }
.step-num {
  flex: 0 0 42px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
}
.step h3 { font-size: 18px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #fff;
}
.faq-q {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
}
.faq-q::after { content: "+"; font-size: 26px; color: var(--primary); font-weight: 400; }
.faq-item.open .faq-q::after { content: "–"; }
.faq-a { padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--muted); }
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 20px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 70px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; font-size: 34px; }
.cta-band p { color: #C9E0D4; margin: 14px auto 28px; max-width: 50ch; font-size: 17px; }

/* ---------- Contact / forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px;
  max-width: 660px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-note { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: #F2EFE8;
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid li a { color: var(--muted); font-size: 14.5px; }
.footer-grid li a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page hero (interior) ---------- */
.page-hero {
  background: linear-gradient(180deg, rgba(23,32,46,0.5), rgba(23,32,46,0.8)), url("../img/hero-land.svg") center/cover no-repeat;
  color: #fff;
  padding: 72px 0;
}
.page-hero h1 { color: #fff; font-size: 40px; }
.page-hero p { color: #EAF0EC; margin-top: 12px; max-width: 56ch; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 17px;
}
.empty strong { color: var(--ink); display: block; margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero h1 { font-size: 38px; }
  .stats-grid { grid-template-columns: 1fr; gap: 14px; }
  .two-col, .calc, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed;
    inset: 74px 0 auto 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 20px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 8px 0; }
  .nav-toggle { display: block; }
  .hero { padding: 70px 0 60px; }
  .section { padding: 60px 0; }
  .prop-grid { grid-template-columns: 1fr; }
  .calc { padding: 24px; }
}

@media (max-width: 600px) {
  .props-map { height: 380px; }
  .map-legend { flex-direction: column; align-items: center; gap: 8px; }
}