/* ===== Brazos Earth Collective — main stylesheet ===== */
:root {
  --green-900: #0f3d2e;
  --green-800: #145238;
  --green-700: #1f6f4a;
  --green-500: #2e9e65;
  --green-200: #bfe3cd;
  --green-100: #e8f5ed;
  --sand: #f7f5ef;
  --sun: #f2a541;
  --sky: #3b8fc4;
  --ink: #1b2a24;
  --muted: #5c6b64;
  --line: #dfe6e1;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 61, 46, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; color: var(--green-900); }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.alt { background: var(--sand); }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-500); margin-bottom: 10px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin: 0 auto; }

/* ----- Header / navigation ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-900); font-weight: 800; font-size: 1.1rem; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: 0.95rem; transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--green-100); color: var(--green-800); }
.nav-links a.active { background: var(--green-700); color: var(--white); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--green-900); margin: 4px auto; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-size: 1rem; font-family: inherit; transition: transform 0.15s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-800); }
.btn-outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn-outline:hover { background: var(--green-100); }
.btn-light { background: var(--white); color: var(--green-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ----- Hero ----- */
.hero { background: linear-gradient(180deg, var(--green-100) 0%, var(--white) 100%); padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--green-500); }
.hero-art { width: 100%; max-width: 460px; margin-left: auto; }

.page-hero { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: var(--white); padding: 56px 0; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: var(--green-200); }
.page-hero-grid { display: grid; grid-template-columns: 1fr 220px; gap: 32px; align-items: center; }
.page-hero-grid img { width: 200px; justify-self: end; }
.breadcrumb { font-size: 0.85rem; color: var(--green-200); margin-bottom: 10px; }
.breadcrumb a { color: var(--white); }

/* ----- Stats band ----- */
.stats { background: var(--green-900); color: var(--white); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-value { font-size: 2.4rem; font-weight: 800; color: var(--sun); line-height: 1.1; }
.stat-label { color: var(--green-200); font-size: 0.95rem; margin-top: 6px; }
.stats-note { text-align: center; color: var(--green-200); font-size: 0.8rem; margin: 28px 0 0; }

/* ----- 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: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover, .card.hover:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15, 61, 46, 0.14); }
.card-icon { width: 56px; height: 56px; margin-bottom: 16px; }
.card p { color: var(--muted); margin-bottom: 0.6em; }
.card .more { font-weight: 700; color: var(--green-700); }

/* ----- Issue blocks (Learn page) ----- */
.issue { display: grid; grid-template-columns: 140px 1fr; gap: 32px; padding: 40px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.issue:last-child { border-bottom: none; }
.issue img { width: 120px; }
.issue h2 { margin-bottom: 0.3em; }
.issue-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.callout { background: var(--green-100); border-left: 4px solid var(--green-500); border-radius: 10px; padding: 16px 20px; }
.callout h3 { font-size: 1rem; margin-bottom: 8px; }
.callout ul { margin: 0; padding-left: 20px; }
.callout li { margin-bottom: 4px; }
.topic-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.topic-nav a { padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,0.14); color: var(--white); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.topic-nav a:hover { background: rgba(255,255,255,0.25); }

/* ----- Accordion ----- */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-btn {
  width: 100%; text-align: left; background: none; border: none; padding: 18px 22px; font: inherit;
  font-weight: 700; color: var(--green-900); cursor: pointer; display: flex; justify-content: space-between; gap: 16px;
}
.acc-btn::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--green-500); }
.acc-btn[aria-expanded="true"]::after { content: "–"; }
.acc-panel { padding: 0 22px 18px; color: var(--muted); }
.acc-panel[hidden] { display: none; }

/* ----- Calculator ----- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.calc form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--green-900); }
.field small { display: block; color: var(--muted); margin-top: 4px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit;
  background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--green-200); border-color: var(--green-500); }
input.invalid, select.invalid, textarea.invalid { border-color: #c0392b; }
.error-text { color: #c0392b; font-size: 0.85rem; margin-top: 4px; min-height: 1em; }
.result-total { font-size: 3rem; font-weight: 800; color: var(--green-700); line-height: 1; }
.result-unit { color: var(--muted); margin-bottom: 20px; }
.bar-row { margin-bottom: 14px; }
.bar-label { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.bar { height: 10px; background: var(--green-100); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--green-500); border-radius: 999px; transition: width 0.6s ease; }
.tip-box { margin-top: 20px; }
.disclaimer { font-size: 0.8rem; color: var(--muted); margin-top: 16px; }

/* ----- Challenge checklist ----- */
.progress { height: 14px; background: var(--green-100); border-radius: 999px; overflow: hidden; margin: 8px 0 24px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green-500), var(--sun)); transition: width 0.4s; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checklist label {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--white); cursor: pointer;
}
.checklist input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green-700); flex: none; }
.checklist label.done { background: var(--green-100); border-color: var(--green-200); }
.checklist label.done span { text-decoration: line-through; color: var(--muted); }

/* ----- Events ----- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-btn {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white);
  font: inherit; font-weight: 600; cursor: pointer; color: var(--ink);
}
.filter-btn.active { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.event { display: grid; grid-template-columns: 76px 1fr; gap: 18px; }
.event-date { background: var(--green-900); color: var(--white); border-radius: 12px; text-align: center; padding: 10px 0; height: fit-content; }
.event-date .m { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green-200); }
.event-date .d { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-800); margin-bottom: 8px; }
.tag.workshop { background: #e5f0fa; color: #1f5f8b; }
.tag.planting { background: #fdf0dc; color: #8a5a12; }
.meta { font-size: 0.9rem; color: var(--muted); }
.empty { color: var(--muted); }

/* ----- Contact ----- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 32px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-status { padding: 14px 16px; border-radius: 10px; margin-top: 16px; font-weight: 600; }
.form-status.ok { background: var(--green-100); color: var(--green-800); }
.form-status.err { background: #fdecea; color: #a93226; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: none; }
.info-list strong { display: block; color: var(--green-900); }

/* ----- CTA band ----- */
.cta { background: linear-gradient(135deg, var(--green-700), var(--green-500)); color: var(--white); border-radius: 20px; padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta h2 { color: var(--white); margin-bottom: 0.3em; }
.cta p { color: var(--green-100); margin: 0; }

/* ----- 404 ----- */
.notfound { text-align: center; padding: 80px 0; }
.notfound img { width: 220px; margin: 0 auto 24px; }
.notfound .btn-row { justify-content: center; }

/* ----- Footer ----- */
.site-footer { background: var(--green-900); color: var(--green-200); padding: 56px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--white); font-size: 1rem; }
.site-footer a { color: var(--green-200); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; margin-bottom: 10px; }
.footer-brand img { width: 32px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 36px; padding-top: 20px; font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ----- Reveal animation ----- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .calc, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; gap: 4px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .hero-grid, .page-hero-grid { grid-template-columns: 1fr; }
  .hero-art { margin: 0 auto; max-width: 320px; }
  .page-hero-grid img { display: none; }
  .grid-2, .grid-3, .grid-4, .issue-cols, .checklist, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .issue { grid-template-columns: 1fr; gap: 12px; }
  .issue img { width: 80px; }
  .cta { grid-template-columns: 1fr; padding: 32px 24px; }
  .section { padding: 52px 0; }
}
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
