/* Gardening Math — design system */

:root {
  --forest: #1f4d3a;
  --forest-dark: #143229;
  --moss: #4c7a5e;
  --moss-light: #e7efe6;
  --clay: #c1652f;
  --amber: #d97706;
  --amber-dark: #b45f04;
  --paper: #f8f5ec;
  --paper-dim: #efe8d6;
  --ink: #23281f;
  --ink-soft: #565f4f;
  --line: #ded4b8;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 18px rgba(31, 77, 58, 0.08);
  --shadow-lg: 0 14px 40px rgba(20, 50, 41, 0.14);
  --font-head: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 0.6em; color: var(--forest-dark); }
p { margin: 0 0 1em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.site { display: flex; flex-direction: column; min-height: 100vh; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 760px; }

/* Graph-paper texture used behind hero sections */
.grid-bg {
  background-image:
    linear-gradient(rgba(247,244,236,0.94), rgba(247,244,236,0.94)),
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.25rem;
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  color: var(--forest); text-decoration: none;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--forest); color: var(--paper);
}
.main-nav ul { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; }
.main-nav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--forest); }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.4rem; color: var(--forest);
}
.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--white); }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0.5rem 1.25rem 1rem; }
.mobile-menu a { display: block; padding: 0.6rem 0; text-decoration: none; color: var(--ink); font-weight: 500; }
.mobile-menu li + li { border-top: 1px solid var(--paper-dim); }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* Hero */
.hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 100%);
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
                     linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 4vw, 3.1rem); max-width: 760px; }
.hero p.lead { font-size: 1.2rem; color: #dce9e2; max-width: 640px; }
.hero-small { padding: 3rem 0; }
.hero-small h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }

.spiral-accent {
  position: absolute; right: -60px; top: -60px; width: 340px; height: 340px;
  opacity: 0.14; pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 10px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: var(--white); }
.btn-amber:hover { background: var(--amber-dark); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-forest { background: var(--forest); color: var(--white); }
.btn-forest:hover { background: var(--forest-dark); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--moss-light); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

/* Cards */
.card {
  background: var(--white); border: 1px solid var(--paper-dim); border-radius: var(--radius);
  padding: 1.9rem; box-shadow: var(--shadow);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.tool-card {
  display: block; text-decoration: none; color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-icon {
  width: 54px; height: 54px; border-radius: 12px; background: var(--moss-light);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem;
  color: var(--forest);
}
.tool-card h3 { margin-bottom: 0.5rem; }
.tool-card .go { color: var(--forest); font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.75rem; }

.badge {
  display: inline-block; background: var(--moss-light); color: var(--forest);
  padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; margin-bottom: 1rem;
}

/* Forms */
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--ink); }
input, select, textarea {
  width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--font-body); font-size: 1rem; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--forest); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.tool-form-wrap { background: var(--white); border: 1px solid var(--paper-dim); border-radius: var(--radius); padding: 2.2rem; box-shadow: var(--shadow); }

/* Results panel */
.results { margin-top: 2rem; }
.results.hidden { display: none; }
.result-box { background: var(--moss-light); border: 1px solid #cfe0d2; border-radius: var(--radius); padding: 1.8rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-bottom: 1rem; }
.result-item .label { font-size: 0.85rem; color: var(--ink-soft); }
.result-item .value { font-size: 1.25rem; font-weight: 700; color: var(--forest-dark); font-family: var(--font-head); }
.result-hero { border-top: 1px solid #cfe0d2; padding-top: 1.2rem; margin-top: 0.4rem; }
.result-hero .value { font-size: 2rem; color: var(--forest); }

/* Info list */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 0.6rem; margin-bottom: 0.7rem; color: var(--ink-soft); }
.check-list svg { flex-shrink: 0; color: var(--forest); margin-top: 0.15rem; }

/* Blog archive */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.2rem; }
.filter-pill {
  padding: 0.4rem 0.95rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--ink-soft);
}
.filter-pill.active, .filter-pill:hover { background: var(--forest); color: var(--white); border-color: var(--forest); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post-card {
  background: var(--white); border: 1px solid var(--paper-dim); border-radius: var(--radius);
  padding: 1.5rem; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-card h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.post-card p { color: var(--ink-soft); font-size: 0.94rem; flex: 1; }
.post-card .go { margin-top: 0.9rem; color: var(--forest); font-weight: 600; font-size: 0.9rem; }

/* Article / prose */
.post { padding: 3.5rem 0 4rem; }
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.post-byline { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.92rem; }
.post-byline a { color: var(--forest); font-weight: 600; }
.prose h2 { margin-top: 2.2rem; font-size: 1.45rem; color: var(--forest-dark); }
.prose h3 { margin-top: 1.6rem; font-size: 1.15rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--forest-dark); }
.prose .takeaways {
  background: var(--moss-light); border: 1px solid #cfe0d2; border-radius: var(--radius-sm);
  padding: 1.4rem 1.6rem;
}
.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--paper-dim); }
.link-arrow { text-decoration: none; font-weight: 600; color: var(--forest); }
.related-articles { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--paper-dim); }
.related-articles h2 { margin-top: 0; font-size: 1.2rem; color: var(--forest-dark); }
.related-articles ul { list-style: none; padding-left: 0; }
.related-articles li { margin-bottom: 0.5rem; }
.related-articles a { color: var(--forest); font-weight: 600; text-decoration: none; }
.related-articles a:hover { text-decoration: underline; }
.source-note { font-size: 0.92rem; color: var(--ink-soft); border-left: 3px solid var(--moss-light); padding-left: 1rem; margin: 1.6rem 0; }
.source-note a { color: var(--forest); font-weight: 600; }

.tool-cta {
  background: linear-gradient(135deg, var(--moss-light), #f1ece0);
  border: 1px solid #cfe0d2; border-radius: var(--radius);
  padding: 2rem; text-align: center; margin: 2.5rem 0;
}
.tool-cta h3 { margin-bottom: 0.5rem; }
.tool-cta p { color: var(--ink-soft); max-width: 480px; margin: 0 auto 1.2rem; }

/* Testimonials */
.quote-card { background: var(--white); border: 1px solid var(--paper-dim); border-radius: var(--radius); padding: 1.6rem; }
.quote-card .stars { color: var(--amber); margin-bottom: 0.7rem; }
.quote-card blockquote { margin: 0 0 0.9rem; font-style: italic; color: var(--ink); }
.quote-card .who { font-weight: 700; }
.quote-card .role { color: var(--ink-soft); font-size: 0.88rem; }

/* Footer */
.site-footer { background: var(--forest-dark); color: #d9e6de; padding: 3.5rem 0 1.5rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 2.5rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.brand-footer { color: var(--white); margin-bottom: 0.8rem; }
.footer-about p { color: #b9ccc0; }
.footer-links h3, .footer-newsletter h3 { color: var(--white); font-size: 1rem; margin-bottom: 1rem; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { text-decoration: none; color: #b9ccc0; }
.footer-links a:hover { color: var(--white); }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input { flex: 1; }
.footer-newsletter p { color: #b9ccc0; font-size: 0.92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.5rem; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; color: #9fb3a7; }

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.stat-mono { font-family: var(--font-head); }
