/* Brazos Valley Community Garden — shared stylesheet */
:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --text: #1f2a24;
  --muted: #5b6a61;
  --brand: #2f6b3f;
  --brand-dark: #234f2f;
  --accent: #d9822b;
  --border: #e3e1d8;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 40, 25, 0.08);
  --max: 1100px;
}
:root[data-theme="dark"] {
  --bg: #121814;
  --surface: #1b231e;
  --text: #e8eee9;
  --muted: #a3b2a8;
  --brand: #6fbf82;
  --brand-dark: #8fd3a0;
  --accent: #f0a65a;
  --border: #2c3830;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }

/* Header / navigation */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.nav-links a:hover { background: var(--bg); }
.nav-links a[aria-current="page"] { background: var(--brand); color: #fff; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit;
}
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle { display: inline-block; }
  .nav { flex-wrap: wrap; }
  .nav-links {
    display: none; flex-direction: column; width: 100%; padding-bottom: 12px;
  }
  .nav-links.open { display: flex; }
}

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 12px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } }

.page-header { padding: 40px 0 16px; }
.page-header h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.page-header p { color: var(--muted); margin: 0; max-width: 60ch; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; cursor: pointer; font: inherit;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Cards / grids */
section { padding: 24px 0; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card img { border-radius: 8px; margin-bottom: 12px; }
.stat { font-size: 2rem; font-weight: 800; color: var(--brand); }
.muted { color: var(--muted); }
.tag {
  display: inline-block; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
}

/* Events filter */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 20px; }
.filters button[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.event { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: start; }
.event-date {
  text-align: center; background: var(--brand); color: #fff; border-radius: 10px; padding: 8px 4px; font-weight: 700;
}
.event-date span { display: block; font-size: 1.6rem; line-height: 1; }
.event[hidden] { display: none; }

/* Calculator / forms */
form { display: grid; gap: 14px; }
label { font-weight: 600; display: block; margin-bottom: 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit;
}
.error { color: #b3261e; font-size: 0.9rem; min-height: 1.2em; }
:root[data-theme="dark"] .error { color: #ff8a80; }
.result {
  padding: 14px 16px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--brand);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--border); background: var(--surface); padding: 24px 0; font-size: 0.95rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 14px; flex-wrap: wrap; }

/* 404 */
.notfound { text-align: center; padding: 64px 0; }
.notfound .code { font-size: 5rem; font-weight: 800; color: var(--accent); margin: 0; }
