/* ═══════════════════════════════════════════════════════════════
   HOA Site Factory — Base Stylesheet v2
   Tenant colours injected via <style> in base.njk
═══════════════════════════════════════════════════════════════ */

/* ── 1. Tokens ─────────────────────────────────────────────── */
:root {
  /* Brand — overridden per tenant */
  --color-primary:       #1447e6;
  --color-primary-dark:  #1038c8;
  --color-accent:        #059669;
  --color-accent-dark:   #047857;

  /* Neutrals */
  --bg:         #f8fafc;
  --surface:    #ffffff;
  --surface-2:  #f1f5f9;
  --border:     #e2e8f0;
  --border-2:   #cbd5e1;

  /* Text */
  --text:       #0f172a;
  --text-2:     #334155;
  --text-3:     #64748b;
  --text-muted: #94a3b8;

  /* Radii */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgb(0 0 0 / .05);
  --shadow-sm: 0 1px 3px rgb(0 0 0 / .06), 0 1px 2px rgb(0 0 0 / .04);
  --shadow-md: 0 4px 8px rgb(0 0 0 / .07), 0 2px 4px rgb(0 0 0 / .04);
  --shadow-lg: 0 10px 24px rgb(0 0 0 / .08), 0 4px 8px rgb(0 0 0 / .04);
  --shadow-xl: 0 24px 48px rgb(0 0 0 / .10);

  /* Motion */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* ── 2. Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { display: block; max-width: 100%; }

/* ── 3. Base ───────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 4. Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── 5. Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem,  3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p { color: var(--text-2); margin-bottom: 1rem; line-height: 1.7; }
p:last-child { margin-bottom: 0; }

a { color: var(--color-primary); transition: color var(--duration) var(--ease); }
a:hover { color: var(--color-primary-dark); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--text-3);
}

/* ── 6. Buttons ────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgb(0 0 0 / .15);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgb(0 0 0 / .12);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.75);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-small { padding: 0.5rem 1.125rem; font-size: 0.875rem; }

/* ── 7. Navigation ─────────────────────────────────────────── */
.navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--duration) var(--ease);
}

.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--color-primary);
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.logo:hover { color: var(--color-primary-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: var(--r-xs);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}

.nav-links a:hover { color: var(--color-primary); background: var(--surface-2); }

.btn-nav {
  padding: 0.5rem 1.25rem !important;
  background: var(--color-primary) !important;
  color: #ffffff !important;
  border-radius: var(--r-sm) !important;
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-nav:hover {
  background: var(--color-primary-dark) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-xs);
  transition: background var(--duration) var(--ease);
  flex-shrink: 0;
}

.nav-toggle:hover { background: var(--surface-2); }

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 8. Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 5rem;
  color: white;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 10%, rgba(255,255,255,0.07) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='1.5' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--r-full);
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.375rem;
}

.hero h1 {
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: rgba(255,255,255,0.8);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero — left-aligned variant for inner pages */
.hero-left { text-align: left; }
.hero-left .hero h1      { margin-left: 0; }
.hero-left .hero-subtitle { margin-left: 0; }
.hero-left .hero-cta     { justify-content: flex-start; }

/* ── 9. Stats bar ──────────────────────────────────────────── */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.875rem 0;
}

.stats-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 3rem;
  position: relative;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  width: 1px;
  background: var(--border);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.375rem;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

/* ── 10. Service / Feature cards ───────────────────────────── */
.services { padding: 5rem 0; background: var(--bg); }
.why-us   { padding: 5rem 0; background: var(--surface); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}

.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.service-card h3 { font-size: 1.0625rem; margin-bottom: 0.625rem; }
.service-card p  { font-size: 0.9375rem; color: var(--text-3); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  border-left: 4px solid var(--color-primary);
  transition: box-shadow var(--duration) var(--ease);
}

.feature:hover { box-shadow: var(--shadow-md); }
.feature h3 { font-size: 1.0625rem; margin-bottom: 0.625rem; }
.feature p  { font-size: 0.9375rem; color: var(--text-3); }

/* ── 11. HOA Card ──────────────────────────────────────────── */
.hoa-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.hoa-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.hoa-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.hoa-card-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
  flex: 1;
  transition: color var(--duration) var(--ease);
}

.hoa-card-name:hover { color: var(--color-primary); }

.hoa-badges { display: flex; gap: 0.375rem; flex-wrap: wrap; flex-shrink: 0; }

.data-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-gated { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.badge-age   { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-type  { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

.hoa-card-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-3);
  flex-wrap: wrap;
}

.amenity-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }

.amenity-tag {
  background: var(--surface-2);
  color: var(--text-2);
  padding: 0.2rem 0.625rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: capitalize;
  border: 1px solid var(--border);
}

.hoa-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hoa-mgmt {
  font-size: 0.8125rem;
  color: var(--text-3);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Community grid */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* ── 12. Community Profile ─────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: 3.5rem 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 0%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.profile-hero .container { position: relative; z-index: 1; }

.profile-hero h1 {
  color: white;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  margin-top: 0.75rem;
  margin-bottom: 0.375rem;
}

.profile-hero p { color: rgba(255,255,255,0.78); margin-bottom: 0; }
.profile-hero .hoa-badges { margin-top: 0.875rem; }

.profile-breadcrumb {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: color var(--duration) var(--ease);
}
.profile-breadcrumb:hover { color: rgba(255,255,255,0.9); }

.profile-body { padding: 3rem 0; background: var(--bg); }

.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.data-section { margin-bottom: 0.25rem; }

.data-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6875rem 0;
  border-bottom: 1px solid var(--surface-2);
  gap: 1rem;
}

.data-row:last-child { border-bottom: none; }
.data-label { font-size: 0.9rem; color: var(--text-3); flex-shrink: 0; }
.data-value { font-size: 0.9rem; font-weight: 600; color: var(--text); text-align: right; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1.125rem;
}

.sidebar-card h3 { font-size: 0.9375rem; margin-bottom: 0.5rem; }
.sidebar-card p  { font-size: 0.875rem; color: var(--text-3); }

.data-source-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.875rem 1rem;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  margin-top: 1.25rem;
  border: 1px solid var(--border);
}

/* ── 13. Filter bar ────────────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-end;
  box-shadow: var(--shadow-xs);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.filter-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
}

.filter-bar select,
.filter-bar input {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  min-width: 160px;
}

.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(20, 71, 230, 0.1);
}

/* ── 14. Forms ─────────────────────────────────────────────── */
.contact-section { padding: 5rem 0; background: var(--bg); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group { margin-bottom: 1.375rem; }

.form-group label {
  display: block;
  margin-bottom: 0.4375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(20, 71, 230, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group textarea { min-height: 140px; resize: vertical; line-height: 1.6; }

/* ── 15. Content pages ─────────────────────────────────────── */
.content-page { padding: 5rem 0; background: var(--surface); }

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.content-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.content-card h3 { color: var(--color-primary); margin-bottom: 0.625rem; font-size: 1.0625rem; }
.content-card p  { font-size: 0.9375rem; color: var(--text-3); flex: 1; }

/* ── 16. Guide layout ──────────────────────────────────────── */
.guide-body { max-width: 720px; margin: 0 auto; }
.guide-body h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.guide-body h3 { font-size: 1.125rem; margin: 1.75rem 0 0.75rem; }
.guide-body ul,
.guide-body ol  { padding-left: 1.5rem; margin-bottom: 1rem; }
.guide-body li  { margin-bottom: 0.375rem; color: var(--text-2); line-height: 1.7; }
.guide-body a   { color: var(--color-primary); text-decoration: underline; }

/* ── 17. Guide list ────────────────────────────────────────── */
.guide-list { list-style: none; }
.guide-list li {
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--color-accent);
  transition: box-shadow var(--duration) var(--ease);
}
.guide-list li:hover { box-shadow: var(--shadow-md); }
.guide-list a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.guide-list a:hover { color: var(--color-primary); }

/* ── 18. CTA sections ──────────────────────────────────────── */
.cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.05) 0%, transparent 60%);
}

.cta .container { position: relative; z-index: 1; }
.cta h2 { color: white; margin-bottom: 1rem; }
.cta p  { color: rgba(255,255,255,0.80); max-width: 560px; margin: 0 auto 2.5rem; }

/* ── 19. Neighbourhood grid ────────────────────────────────── */
.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.875rem;
  margin-top: 2.5rem;
}

.neighborhood-chip {
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--shadow-xs);
}

.neighborhood-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── 20. FAQ accordion ─────────────────────────────────────── */
.faq-section { padding: 5rem 0; background: var(--surface); }

.faq-list { max-width: 720px; margin: 3rem auto 0; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 0.625rem;
  overflow: hidden;
  background: var(--surface);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1875rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  gap: 1rem;
  transition: color var(--duration) var(--ease);
  font-family: inherit;
  line-height: 1.4;
}

.faq-question:hover  { color: var(--color-primary); }
.faq-question.open   { color: var(--color-primary); }

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: var(--r-full);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text-3);
  transition: transform var(--duration) var(--ease),
              background var(--duration) var(--ease),
              color var(--duration) var(--ease);
  line-height: 1;
  user-select: none;
}

.faq-question.open .faq-icon {
  transform: rotate(45deg);
  background: #eef2ff;
  color: var(--color-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms var(--ease);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.faq-answer-inner a { color: var(--color-primary); }

/* ── 21. Data info banner ──────────────────────────────────── */
.banner-warning {
  padding: 1.125rem 1.5rem;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-left: 4px solid #eab308;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  color: #713f12;
  margin-bottom: 0;
}

.banner-warning a { color: #92400e; font-weight: 600; }

/* ── 22. Empty state ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state p { font-size: 1rem; color: var(--text-3); }

/* ── 23. Footer ────────────────────────────────────────────── */
footer {
  background: #0f172a;
  color: #64748b;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid #1e293b;
}

.footer-brand { max-width: 340px; }

.footer-brand .footer-logo {
  display: inline-block;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.875rem;
  text-decoration: none;
}

.footer-brand p { font-size: 0.875rem; color: #475569; line-height: 1.7; }

.footer-section h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 1.125rem;
}

.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.625rem; }
.footer-section a {
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
.footer-section a:hover { color: #e2e8f0; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p { font-size: 0.8125rem; color: #334155; margin: 0; }
.footer-bottom a { color: #475569; }
.footer-bottom a:hover { color: #64748b; }

/* ── 24. Back to top ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--duration) var(--ease);
  z-index: 900;
  font-size: 1.125rem;
  line-height: 1;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover   { background: var(--color-primary-dark); transform: translateY(-2px); }

/* ── 25. Services page data grid ───────────────────────────── */
.data-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.data-feature-cell {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.25rem;
}

.data-feature-cell h4 { font-size: 0.9375rem; color: var(--color-primary); margin-bottom: 0.375rem; }
.data-feature-cell p  { font-size: 0.875rem; color: var(--text-3); margin: 0; }

.phase-block {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.phase-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.phase-icon {
  text-align: center;
  padding: 2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.phase-icon-emoji { font-size: 3.5rem; margin-bottom: 0.75rem; line-height: 1; }
.phase-icon h3    { font-size: 1.25rem; margin-bottom: 0.375rem; }
.phase-icon p     { font-size: 0.8125rem; color: var(--text-3); margin: 0; }

/* ── 26. Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .profile-grid   { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-brand   { grid-column: 1 / -1; max-width: 100%; }
  .phase-block    { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-lg);
    gap: 0.125rem;
    z-index: 999;
  }

  .nav-links.open { display: flex; }
  .nav-links li   { width: 100%; }

  .nav-links a,
  .nav-links .btn-nav {
    display: block;
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: left;
    border-radius: var(--r-sm);
  }

  .nav-links .btn-nav {
    margin-top: 0.5rem;
    text-align: center !important;
  }

  .nav-toggle { display: flex; }

  .hero { padding: 4rem 0 3.5rem; }
  .hero-cta { justify-content: center; }
  .btn-primary, .btn-secondary, .btn-ghost { justify-content: center; }

  .stat-item { padding: 0.75rem 1.5rem; }
  .stat-item + .stat-item::before { display: none; }
  .stats-grid { justify-content: flex-start; gap: 0; }

  .footer-content { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand   { max-width: 100%; }
  .footer-bottom  { flex-direction: column; text-align: center; }

  .filter-bar { flex-direction: column; }
  .filter-bar select,
  .filter-bar input { min-width: unset; width: 100%; }

  .data-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .community-grid    { grid-template-columns: 1fr; }
  .content-grid      { grid-template-columns: 1fr; }
  .service-grid      { grid-template-columns: 1fr; }
  .neighborhood-grid { grid-template-columns: repeat(2, 1fr); }
}
