/* Project Nearby — Forest Green Outdoor Design System */
:root {
  --sky:       #EBF3F5;
  --asphalt:   #4A4A4A;
  --teal:      #1A6B7E;
  --sand:      #D4A574;
  --green:     #3A7D52;
  --green-dark:#2D5F3F;
  --off-white: #FAF8F5;
  --mid:       #7A7A7A;
  --border:    rgba(74,74,74,0.12);
  --radius:    6px;
}

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--sky);
  color: var(--asphalt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAVIGATION ─────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sky);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--green-dark);
  letter-spacing: -0.01em;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.nav-link:hover { border-bottom-color: var(--teal); }

/* ─── HERO / ENTRY SECTION ───────────────────────────────────── */
.hero-section {
  background: linear-gradient(175deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 96px 24px 88px;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.hero-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 17px;
  color: var(--sky);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Search form */
.search-form { width: 100%; }

.search-bar-wrap {
  display: flex;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto;
}

.search-bar-wrap input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  transition: border-color 0.15s, background 0.15s;
}

.search-bar-wrap input::placeholder { color: rgba(255,255,255,0.4); }
.search-bar-wrap input:focus {
  outline: none;
  border-color: var(--sand);
  background: rgba(255,255,255,0.12);
}

.btn-search {
  padding: 14px 24px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
}

.btn-search:hover { background: #155e6f; }
.btn-search:disabled { opacity: 0.6; cursor: not-allowed; }

/* Radius toggle — segmented control below the search bar */
.radius-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 12px;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
}

.radius-opt {
  flex: 1;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
  letter-spacing: 0.01em;
}

.radius-opt:hover { color: rgba(255,255,255,0.8); }

.radius-opt.selected {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.search-error {
  margin-top: 10px;
  font-size: 13px;
  color: #f9a8a8;
  min-height: 18px;
}

/* ─── STAT STRIP — live permits counter ──────────────────────── */
.stat-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 20px;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.stat-item { display: inline-flex; align-items: baseline; gap: 4px; }

.stat-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--sand);   /* Warm Sand accent per spec */
  letter-spacing: -0.01em;
  line-height: 1;
}

.stat-label { font-size: 11px; color: rgba(255,255,255,0.6); }

.stat-sep {
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  line-height: 1;
  align-self: center;
}

/* Results page — subtle "Part of N permits" line */
.results-monitored {
  font-size: 12px;
  color: var(--mid);
  font-style: italic;
  width: 100%;
}

/* Freshness badge — hero */
.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 6px 14px 6px 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
}

.freshness-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5dd47a;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.freshness-text {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ─── DYNAMIC RESULTS ────────────────────────────────────────── */
.results-section {
  display: none;
  padding: 64px 24px;
  background: var(--off-white);
}

.results-inner {
  max-width: 800px;
  margin: 0 auto;
}

.results-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.results-address {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 8px;
}

.results-count {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--asphalt);
  line-height: 1.2;
}

.results-meta {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.results-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mid);
  font-weight: 500;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Result card */
.result-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s;
}

.result-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.result-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.result-type {
  font-weight: 600;
  font-size: 15px;
  color: var(--asphalt);
}

.result-dist {
  font-size: 13px;
  color: var(--mid);
  font-weight: 500;
  flex-shrink: 0;
}

.result-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.result-date {
  font-size: 13px;
  color: var(--mid);
  flex-shrink: 0;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

.badge-active  { background: rgba(26,107,126,0.1); color: var(--teal); }
.badge-approved { background: rgba(58,125,82,0.12); color: var(--green); }
.badge-pending { background: rgba(212,165,116,0.2); color: #8a5a2e; }
.badge-default { background: rgba(74,74,74,0.08); color: var(--mid); }

.results-empty {
  font-size: 15px;
  color: var(--mid);
  padding: 8px 0;
}

/* ─── PREMIUM PITCH — PUBLIC NOTICE card ─────────────────────── */
.paywall-section {
  padding: 0 0 80px;
  background: var(--sky);
  position: relative;
}

/* Card wrapper — holds the caution-stripe border */
.public-notice-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 5px;
  background: repeating-linear-gradient(
    -45deg,
    var(--green) 0px,
    var(--green) 8px,
    var(--sand) 8px,
    var(--sand) 16px
  );
  border-radius: calc(var(--radius) + 5px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.public-notice {
  padding: 44px 52px;
  background: var(--off-white);
  border-radius: calc(var(--radius) + 1px);
  text-align: center;
  /* Subtle ruled-paper texture */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(74,74,74,0.025) 27px,
      rgba(74,74,74,0.025) 28px
    );
  position: relative;
  z-index: 1;
}

.notice-header {
  border-bottom: 1.5px solid #1a1a1a;
  padding-bottom: 14px;
  margin-bottom: 28px;
}

.notice-label {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--asphalt);
  display: block;
  text-align: center;
}

.notice-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(20px, 3.5vw, 26px);
  color: var(--asphalt);
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.notice-price-line {
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
}

.notice-price {
  font-family: 'DM Serif Display', serif;
  font-size: 44px;
  color: var(--asphalt);
  line-height: 1;
  letter-spacing: -0.02em;
}

.notice-price-unit {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--mid);
  letter-spacing: -0.01em;
}

.notice-price-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--mid);
  font-weight: 400;
  margin-left: 4px;
}

/* Fence SVG — uses viewBox in the SVG element itself */
.paywall-fence {
  width: 100%;
  display: block;
  line-height: 0;
}

.notice-features {
  list-style: none;
  text-align: left;
  max-width: 460px;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notice-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--asphalt);
  line-height: 1.55;
}

.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notice-trust {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 28px;
  font-style: italic;
  letter-spacing: 0.01em;
}

.btn-premium {
  display: inline-block;
  padding: 15px 32px;
  background: var(--teal);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-sizing: border-box;
}

.btn-premium:hover { background: #155e6f; }

.notice-free-tier {
  margin-top: 14px;
  font-size: 13px;
  color: var(--mid);
}

/* ─── CAUTION STRIPE DIVIDER ─────────────────────────────────── */
.caution-divider {
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    var(--sand),
    var(--sand) 10px,
    var(--green-dark) 10px,
    var(--green-dark) 20px
  );
  margin: 0;
}

/* ─── FOUNDER STORY ──────────────────────────────────────────── */
.founder-section {
  background: linear-gradient(175deg, var(--green-dark) 0%, var(--green) 100%);
  padding: 80px 24px;
}

.founder-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.founder-heading {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 4vw, 34px);
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  /* Warm Sand thin underline as tasteful accent */
  padding-bottom: 14px;
  border-bottom: 2px solid var(--sand);
  display: inline-block;
}

.founder-tagline {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--sky);
  margin-top: 20px;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.founder-body {
  font-size: 15px;
  color: rgba(235,243,245,0.75);
  line-height: 1.8;
  margin-bottom: 12px;
}

.founder-body:last-child { margin-bottom: 0; }

/* ─── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--green-dark);
  border-top: none;
  padding: 32px 24px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: rgba(235,243,245,0.7);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: rgba(235,243,245,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: #fff; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-section { padding: 64px 20px 60px; }
  .search-bar-wrap { flex-direction: column; }
  .btn-search { width: 100%; }
  .public-notice { padding: 32px 24px; }
  .btn-premium { max-width: 100%; }
  .results-section, .paywall-section { padding: 48px 20px; }
  .founder-section { padding: 60px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 16px; }
  /* stat strip: stack vertically on very small screens */
  .stat-strip { flex-direction: column; gap: 4px; }
  .stat-sep { display: none; }
}

@media (max-width: 400px) {
  .hero-headline { font-size: 28px; }
  .result-body { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .results-meta { flex-direction: column; gap: 6px; }
  .freshness-badge { margin-top: 10px; }
}