/* ============================================================================
   GreenReach shared marketing brand — global CSS for the Community + Vendor pages
   ----------------------------------------------------------------------------
   SOURCE OF TRUTH: the brand is defined by the marketing site (purchase.html,
   greenreach-org.html, grow-and-sell.html) — a LIGHT theme with green accents
   and the Apple system font. This file makes every Community/Vendor page share
   that exact palette, type, header, and footer (operator request, 2026-06-04:
   "none of your new marketing pages share any of the color, fonts, themes").

   HOW PAGES USE IT: load this stylesheet + community-nav.js (which injects the
   canonical <header class="site-nav"> + <footer class="site-footer">). Pages
   should DROP their own inline :root token block — the tokens below (and the
   aliases for the older --gr-* / --green / --card names some pages were authored
   with) resolve every var() reference to a BRAND value, so a page rebrands to
   light+green automatically once its dark :root override is removed.
   ============================================================================ */

:root {
  /* Canonical marketing tokens (identical values to purchase.html). */
  --primary: #2d5016;
  --primary-dark: #1f3a0f;
  --accent: #82c341;
  --accent-dark: #6aa634;
  --text: #1d1d1f;
  --text-light: #86868b;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f7f2;
  --border: #e6e6eb;

  /* Aliases — so pages authored with the old dark-theme variable names resolve
     to BRAND values the moment their inline dark :root override is removed. */
  --gr-bg: var(--bg);
  --gr-surface: var(--surface);
  --gr-surface-2: var(--surface-2);
  --gr-border: var(--border);
  --gr-text: var(--text);
  --gr-muted: var(--text-light);
  --gr-accent: var(--primary);
  --gr-accent-2: var(--accent);
  --green: var(--primary);
  --card: var(--surface);
  --bg2: var(--surface-2);
  --muted: var(--text-light);
  --accent2: var(--accent);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Roboto, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.47059;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  /* Pages render under the fixed site-nav (injected by community-nav.js). */
  padding-top: 56px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.01em; line-height: 1.1; }

/* ---- Canonical header (injected by community-nav.js) ---- */
header.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-nav .nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-nav .logo { font-size: 20px; font-weight: 700; color: var(--primary); letter-spacing: -0.01em; }
.site-nav .nav-links { display: flex; gap: 24px; align-items: center; list-style: none; flex-wrap: wrap; }
.site-nav .nav-links a { color: var(--text); font-size: 13px; font-weight: 500; opacity: 0.85; transition: opacity .2s, color .2s; }
.site-nav .nav-links a:hover { opacity: 1; color: var(--primary); }
.site-nav .nav-links a.gr-active { color: var(--primary); opacity: 1; font-weight: 600; }
.site-nav .nav-cta { background: var(--primary); color: #fff !important; padding: 8px 16px; border-radius: 980px; font-weight: 600 !important; opacity: 1 !important; }
.site-nav .nav-cta:hover { background: var(--primary-dark); color: #fff !important; }
.site-nav .gr-who { font-size: 12px; color: var(--text-light); }
@media (max-width: 820px) { .site-nav .nav-links { gap: 14px; } .site-nav .nav-links a { font-size: 12px; } }

/* ---- Buttons (brand) ---- */
.btn { display: inline-block; padding: 14px 30px; border-radius: 980px; font-size: 16px; font-weight: 600; cursor: pointer; border: none; transition: transform .15s, background .2s, color .2s, border-color .2s, box-shadow .2s; font-family: inherit; text-align: center; }
.btn-primary, button.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(45, 80, 22, 0.28); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

/* ---- Canonical footer (injected by community-nav.js) ---- */
.site-footer { background: var(--primary-dark); color: #fff; padding: 64px 22px 28px; margin-top: 64px; }
.site-footer .footer-content { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.site-footer .footer-about h3 { color: #fff; font-size: 20px; margin-bottom: 10px; }
.site-footer .footer-about p { color: rgba(255,255,255,0.7); font-size: 13px; line-height: 1.6; max-width: 320px; }
.site-footer .footer-column h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 12px; opacity: 0.9; }
.site-footer .footer-column ul { list-style: none; }
.site-footer .footer-column li { margin-bottom: 8px; }
.site-footer .footer-column a { color: rgba(255,255,255,0.7); font-size: 13px; }
.site-footer .footer-column a:hover { color: #fff; }
.site-footer .footer-bottom { max-width: 1120px; margin: 28px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); text-align: center; }
.site-footer .footer-bottom p { color: rgba(255,255,255,0.55); font-size: 12px; margin-top: 12px; }
.site-footer .footer-social { display: flex; gap: 16px; justify-content: center; }
.site-footer .footer-social a { color: rgba(255,255,255,0.65); }
.site-footer .footer-social a:hover { color: #fff; }
@media (max-width: 820px) { .site-footer .footer-content { grid-template-columns: 1fr 1fr; } }

/* ---- Light-theme component helpers (so pages reading var(--gr-*)/--card etc.
        render on-brand once their inline dark :root is removed) ---- */
.card, .gr-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.field label, .gr-field label { color: var(--text-light); }
.field input, .field textarea, .field select,
.gr-field input, .gr-field textarea, .gr-field select,
input.gr-input, select.gr-input, textarea.gr-input {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.muted, .gr-muted { color: var(--text-light); }
