/* ===========================================================
   Community Home Guide — design system
   Palette derived from the real logo (sampled brown #4d320f)
   + a pine-green "trust/community" accent + a rust CTA accent
   pulled from the same warm-brown family. Crisp white/near-
   white canvas (deliberately not cream/parchment like the
   Vertical Ventures / Cangelosi / Metropolitan Builder builds)
   because this is a directory/platform product, not a
   craftsman-contractor brand. See research/notes.md.
   =========================================================== */

:root {
  /* base canvas */
  --white: #ffffff;
  --paper: #fbfaf8;         /* faint warm-white, alt section band */
  --fog: #f1efe9;           /* deeper neutral band, still not cream */
  --line: rgba(63, 42, 18, 0.14);
  --line-soft: rgba(63, 42, 18, 0.08);

  /* timber — sampled directly from the real logo file */
  --timber: #3f2a12;
  --timber-deep: #241708;
  --timber-soft: #6b5233;

  /* ink for body copy — warm near-black, not pure black */
  --ink: #23201b;
  --muted: #6b6255;
  --muted-soft: #8d8577;

  /* pine — secondary accent: community / trust / verified */
  --pine: #2f5233;
  --pine-deep: #1f3722;
  --pine-pale: #e8eee7;

  /* rust — CTA / highlight accent, same warm family as timber */
  --rust: #c1622d;
  --rust-deep: #9c4c22;
  --rust-pale: #f8e6d8;

  --shadow: 0 20px 45px -25px rgba(36, 23, 8, 0.35);
  --shadow-sm: 0 8px 20px -12px rgba(36, 23, 8, 0.3);

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1180px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--timber);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--muted); }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--paper { background: var(--paper); }
.section--fog { background: var(--fog); }
.section--timber { background: var(--timber-deep); color: var(--fog); }
.section--timber h2, .section--timber h3 { color: #fff; }
.section--timber p { color: rgba(255,255,255,0.78); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--rust);
  display: inline-block;
}
.section--timber .eyebrow { color: var(--rust); }

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--rust); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--rust-deep); }
.btn-secondary { background: transparent; border-color: var(--timber); color: var(--timber); }
.btn-secondary:hover { background: var(--timber); color: #fff; }
.btn-pine { background: var(--pine); color: #fff; }
.btn-pine:hover { background: var(--pine-deep); }
.btn-on-dark { background: #fff; color: var(--timber-deep); }
.btn-on-dark:hover { background: var(--rust-pale); }
.btn-outline-on-dark { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-on-dark:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}
.wordmark-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--timber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.wordmark-icon svg { width: 22px; height: 22px; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark-text .w1 { font-size: 1.02rem; font-weight: 500; color: var(--timber-soft); letter-spacing: 0.01em; }
.wordmark-text .w2 { font-size: 1.2rem; font-weight: 800; color: var(--timber); letter-spacing: 0.01em; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.main-nav a:hover { color: var(--rust); background: var(--rust-pale); }
.main-nav a.current { color: var(--rust); }
.main-nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--fog);
  padding: 88px 0 64px;
}
.roofline-band {
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  opacity: 0.5;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 760px; }
.hero-inner h1 { margin-bottom: 20px; }
.hero-inner .lede { max-width: 620px; margin-bottom: 30px; font-size: 1.2rem; }
.hero-search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 640px;
  margin-bottom: 18px;
}
.hero-search input, .hero-search select {
  border: none;
  background: var(--fog);
  border-radius: 9px;
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  flex: 1 1 160px;
  min-width: 0;
  color: var(--ink);
}
.hero-search input:focus, .hero-search select:focus { outline: 2px solid var(--rust); }
.hero-search button { flex: none; }
.hero-note { font-size: 0.88rem; color: var(--muted-soft); }

/* ---------- stat bar ---------- */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-bar div { background: #fff; padding: 26px 20px; text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--timber);
}
.stat-label { font-size: 0.85rem; color: var(--muted); }

/* ---------- grids / cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card--flush { padding: 0; overflow: hidden; }

.icon-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.icon-tile:hover { border-color: var(--pine); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.icon-tile .ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--pine-pale);
  color: var(--pine);
  display: flex; align-items: center; justify-content: center;
}
.icon-tile .ico svg { width: 24px; height: 24px; }
.icon-tile h3 { font-size: 1.02rem; margin-bottom: 4px; }
.icon-tile p { font-size: 0.9rem; margin: 0; }

.category-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pine-deep);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.category-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.category-chip {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.category-chip:hover { background: var(--pine); border-color: var(--pine); color: #fff; }
.category-chip svg { width: 14px; height: 14px; opacity: 0.7; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--pine-pale);
  color: var(--pine-deep);
}

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.plan-head { padding: 26px 26px 20px; border-bottom: 1px solid var(--line); }
.plan.is-featured { border-color: var(--rust); box-shadow: var(--shadow); position: relative; }
.plan.is-featured .plan-head { background: var(--timber); }
.plan.is-featured .plan-head h3, .plan.is-featured .plan-head .plan-price { color: #fff; }
.plan-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--rust); color: #fff; font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px;
}
.plan-price { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--timber); }
.plan-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan-body { padding: 22px 26px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.plan-features svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--pine); }
.plan-body .btn { margin-top: auto; }

/* ---------- split sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.timeline-item { position: relative; padding: 0 0 34px 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--rust); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line);
}
.timeline-year { font-family: var(--font-display); font-weight: 700; color: var(--rust); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- callout / notice ---------- */
.notice {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: var(--paper);
  font-size: 0.92rem;
  color: var(--muted);
}
.notice strong { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--timber);
  border-radius: 20px;
  padding: 56px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-field.full { grid-column: 1 / -1; }
label { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; color: var(--timber); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rust); border-color: transparent; }
textarea { resize: vertical; min-height: 120px; }
.form-status { font-size: 0.92rem; margin-top: 10px; min-height: 1.4em; }
.form-status.ok { color: var(--pine-deep); }
.form-status.err { color: var(--rust-deep); }

/* ---------- footer ---------- */
.site-footer { background: var(--timber-deep); color: rgba(255,255,255,0.75); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 48px; }
.site-footer h4 { color: #fff; font-size: 0.92rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,0.72); font-size: 0.94rem; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-brand p { color: rgba(255,255,255,0.65); max-width: 320px; font-size: 0.92rem; }
.footer-wordmark { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-wordmark .wordmark-icon { background: rgba(255,255,255,0.12); }
.footer-wordmark .w1 { color: rgba(255,255,255,0.7); }
.footer-wordmark .w2 { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 9px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: rgba(255,255,255,0.18); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- utility ---------- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-history-figure { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--paper); text-align: center; }
.brand-history-figure img { max-width: 260px; margin: 0 auto 14px; }
.brand-history-figure figcaption { font-size: 0.85rem; color: var(--muted-soft); }
.external-note { font-size: 0.82rem; color: var(--muted-soft); margin-top: 6px; }

/* ---------- mobile ---------- */
@media (max-width: 880px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; inset: 72px 16px auto 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; padding: 12px; gap: 4px; display: none; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 16px; }
  .main-nav .btn { margin-left: 0; margin-top: 8px; }
  .nav-toggle { display: flex; }
  .hero { padding: 48px 0 40px; }
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
  .section { padding: 56px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cta-band { padding: 36px 24px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .stat-bar { grid-template-columns: 1fr 1fr; }
}
