/* Home Food Finder — styles.css
   Harvest theme: deep plum + amber. Vanilla CSS, no frameworks, mobile-first.
   Distinct brand from MEHKO Finder (green/terracotta). */

:root {
  --plum: #51284a;
  --plum-dark: #38203a;
  --plum-deep: #2a1628;
  --amber: #e9a13b;
  --amber-dark: #c9821f;
  --amber-soft: #fbeed3;
  --cream: #fdf9f3;
  --sand: #f4e8d4;
  --ink: #33261f;
  --ink-soft: #6b5d52;
  --card: #ffffff;
  --border: #ead8ba;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(81, 40, 74, 0.10);
  --maxw: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
}

a { color: #a86a14; }
a:hover { color: var(--amber-dark); }

/* ---------- Header ---------- */
.site-header {
  background: var(--plum);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: #fff; }
.brand img { width: 42px; height: 42px; display: block; }
.brand-text { line-height: 1.15; }
.brand-text strong { font-size: 1.25rem; letter-spacing: .2px; display: block; }
.brand-text span { font-size: 0.78rem; opacity: .85; }
.main-nav { margin-left: auto; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.main-nav a {
  color: #fff; text-decoration: none; font-size: 0.92rem; font-weight: 600;
  padding: 0.45rem 0.75rem; border-radius: 8px;
}
.main-nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.main-nav a[aria-current="page"] { background: rgba(255,255,255,.18); }
.main-nav a.nav-cta {
  background: var(--amber); color: var(--plum-deep); font-weight: 700;
  border-radius: 9px; margin-left: 0.3rem;
}
.main-nav a.nav-cta:hover { background: var(--amber-dark); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--plum) 0%, var(--plum-dark) 55%, #5e2f57 100%);
  color: #fff;
  padding: 2.6rem 1rem 2.4rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto -40px -70px auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(233,161,59,.28) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; position: relative; }
.hero h1 { margin: 0 0 0.4rem; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.2; }
.hero p { margin: 0; font-size: 1.05rem; opacity: .92; max-width: 44rem; }
.hero-tag { margin-bottom: 1.2rem; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin: 1.2rem 0; }
.hero-actions .btn { text-decoration: none; display: inline-block; }
.btn.light {
  background: transparent; color: #fff; border: 2px solid #fff;
}
.btn.light:hover { background: rgba(255,255,255,.16); }
.privacy-note {
  margin-top: 1.1rem;
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
}
.discovery-note {
  margin-top: 0.8rem; font-size: 0.88rem; opacity: .85; max-width: 44rem;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 2rem 1rem; }
section.block { margin-bottom: 3rem; }
.section-title { font-size: 1.6rem; margin: 0 0 0.4rem; color: var(--plum); }
.section-sub { margin: 0 0 1.4rem; color: var(--ink-soft); }

/* ---------- Buttons / forms ---------- */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--amber); color: var(--plum-deep);
  border: none; border-radius: 10px; padding: 0.65rem 1.15rem;
  text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--amber-dark); color: #fff; }
.btn.ghost { background: transparent; border: 2px solid var(--border); color: var(--ink); }
.btn.ghost:hover { border-color: var(--amber-dark); color: var(--amber-dark); background: #fff; }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem; margin: 1.6rem 0 0;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.1rem; text-align: center;
}
.stat-card .num { font-size: 1.9rem; font-weight: 800; color: var(--plum); line-height: 1.1; }
.stat-card .lbl { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Card grids ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem 1.3rem;
}
.info-card h3 { margin: 0 0 0.5rem; color: var(--plum); font-size: 1.1rem; }
.info-card p { margin: 0.4rem 0; }
.info-card ul { margin: 0.4rem 0; padding-left: 1.2rem; }
.info-card .card-link { font-weight: 700; }

/* ---------- Finder ---------- */
.finder-toolbar {
  display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  padding: 0.8rem; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 0.9rem;
}
.finder-toolbar input[type="search"],
.finder-toolbar select {
  font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--border);
  border-radius: 9px; background: #fff; color: var(--ink);
}
.finder-toolbar input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.finder-toolbar select { flex: 0 1 auto; }
.view-toggle { display: inline-flex; background: var(--sand); border-radius: 10px; padding: 3px; margin-bottom: 0.9rem; }
.view-toggle button {
  font: inherit; font-weight: 700; border: none; background: transparent;
  padding: 0.45rem 0.9rem; border-radius: 8px; cursor: pointer; color: var(--ink-soft);
}
.view-toggle button.active { background: #fff; color: var(--plum); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.finder-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: start; }
.finder-grid.view-list .map-shell { display: none; }
.finder-grid.view-map .results-panel { display: none; }
.map-shell { position: relative; }
#map,
#hub-map {
  height: 560px; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); z-index: 1;
}
.map-status {
  position: absolute; top: 10px; left: 10px; z-index: 500;
  background: rgba(255,255,255,.95); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.35rem 0.7rem; font-size: 0.85rem;
}
.map-legend {
  display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: 0.85rem; color: var(--ink-soft);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-pin { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.legend-pin.verified { background: var(--amber); }
.legend-pin.community { background: #9b7bb8; }
.results-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.results-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1rem; background: var(--plum); color: #fff; font-weight: 700;
}
.results-head .count { font-weight: 400; font-size: 0.9rem; opacity: .9; }
.results-list { max-height: 520px; overflow-y: auto; padding: 0.6rem; }
.result-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.8rem; margin-bottom: 0.6rem;
  background: #fff;
}
.result-card h4 { margin: 0 0 0.2rem; font-size: 1rem; color: var(--plum); }
.result-card .meta { font-size: 0.85rem; color: var(--ink-soft); }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; padding: 0.15rem 0.5rem; border-radius: 20px; margin-right: 0.35rem;
}
.badge.verified { background: var(--amber-soft); color: #8a5a10; border: 1px solid var(--amber); }
.badge.community { background: #f0e8f7; color: #6a4a8a; border: 1px solid #c9b3e0; }
.empty-state { color: var(--ink-soft); padding: 1rem; text-align: center; }

/* ---------- State law pages ---------- */
.state-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
}
.state-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.9rem 1rem; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s ease;
  display: block;
}
.state-card:hover { transform: translateY(-2px); border-color: var(--amber); color: var(--ink); }
.state-card h3 { margin: 0 0 0.3rem; color: var(--plum); font-size: 1.05rem; }
.state-card .tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.4rem; }
.tag {
  font-size: 0.72rem; font-weight: 700; padding: 0.12rem 0.55rem; border-radius: 20px;
  background: var(--sand); color: var(--ink-soft); border: 1px solid var(--border);
}
.tag.county-led { background: #f3e2c8; color: #7a4d0d; border-color: var(--amber); }
.tag.state-run { background: #e6ecf7; color: #2f4a7a; border-color: #b9c9e6; }
.tag.research { background: #eee; color: #777; border-color: #ddd; }
.tag.live { background: #e2f2e3; color: #1f6b2e; border-color: #a9d6ae; }
.state-card .meta { font-size: 0.85rem; color: var(--ink-soft); margin: 0.2rem 0 0.1rem; }
.admin-banner {
  border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.4rem;
  font-size: 1rem; display: flex; gap: 0.7rem; align-items: flex-start;
}
.admin-banner.county {
  background: #fdf3e0; border: 2px solid var(--amber); color: #6b4a0c;
}
.admin-banner.state {
  background: #eef2fa; border: 2px solid #9db4dd; color: #2f4a7a;
}
.admin-banner.unknown {
  background: #f4f1ec; border: 2px dashed #c9bfae; color: var(--ink-soft);
}
.research-note {
  background: #f7f3ea; border: 1px dashed #c9bfae; border-radius: 10px;
  padding: 0.8rem 1rem; color: var(--ink-soft); font-size: 0.92rem; margin: 0.6rem 0;
}
.law-section { margin-bottom: 1.6rem; }
.law-section h3 { color: var(--plum); margin: 0 0 0.5rem; font-size: 1.15rem; }
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps-list li {
  counter-increment: step; position: relative; padding: 0.7rem 0.7rem 0.7rem 3rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 0.6rem;
}
.steps-list li::before {
  content: counter(step); position: absolute; left: 0.8rem; top: 0.7rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--plum); color: #fff; font-weight: 800; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.breadcrumb { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 0.8rem; }
.breadcrumb a { color: var(--ink-soft); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.news-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
}
.news-card .date { font-size: 0.8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.news-card h3 { margin: 0.3rem 0 0.4rem; font-size: 1.08rem; color: var(--plum); }
.news-card p { margin: 0.3rem 0; font-size: 0.94rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum-deep); color: #e9dccf; margin-top: 2rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 2rem 1rem 1.2rem; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.footer-cols h4 { color: #fff; margin: 0 0 0.5rem; font-size: 1rem; }
.footer-cols p, .footer-cols li { font-size: 0.9rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 0.3rem; }
.footer-cols a { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.4rem; padding-top: 1rem; font-size: 0.82rem; opacity: .85; }

/* ---------- Misc ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.pillar {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.3rem; text-decoration: none; color: var(--ink); display: block;
}
.pillar:hover { border-color: var(--amber); transform: translateY(-2px); transition: transform .12s ease; color: var(--ink); }
.pillar .icon { font-size: 1.8rem; }
.pillar h3 { margin: 0.4rem 0 0.3rem; color: var(--plum); }
.pillar p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }
.notice-bar {
  background: var(--amber-soft); border: 1px solid var(--amber); color: #6b4a0c;
  border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 1.4rem; font-size: 0.95rem;
}

@media (max-width: 860px) {
  .finder-grid { grid-template-columns: 1fr; }
  .finder-grid.view-list .map-shell { display: none; }
  #map, #hub-map { height: 420px; }
  .results-list { max-height: 420px; }
  .main-nav a { font-size: 0.82rem; padding: 0.4rem 0.55rem; }
  .brand-text strong { font-size: 1.05rem; }
}

/* ---------- Listing form ---------- */
.form-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.4rem; max-width: 760px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.92rem; color: var(--plum); }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--cream); color: var(--ink); width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--amber); border-color: var(--amber-dark);
}
.field .hint { font-size: 0.82rem; color: var(--ink-soft); }
.form-ok {
  background: #eef7ee; border: 1px solid #9cc79c; color: #2c5f2c;
  border-radius: 10px; padding: 0.9rem 1.1rem; margin: 1rem 0; font-size: 0.95rem;
}
.mailto-fallback { margin-top: 1rem; font-size: 0.92rem; color: var(--ink-soft); }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}
