/* ==========================================================================
   The Backyard Birder — shared stylesheet
   Backyard bird watching and bird-feeding guides.
   Distinct layout: forest green + gold + ivory + Fraunces serif (field-journal feel).
   ========================================================================== */

:root {
  --forest: #2f5d3a;
  --forest-dark: #24472d;
  --gold: #d99a2b;
  --gold-soft: #f7ead0;
  --ivory: #faf7f0;
  --surface: #ffffff;
  --text: #3a3a2f;
  --muted: #7a786b;
  --border: #e6dfcf;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(58, 58, 47, 0.05), 0 10px 22px rgba(58, 58, 47, 0.07);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.74;
  color: var(--text);
  background: var(--ivory);
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--text); line-height: 1.28; }

.container { width: 100%; max-width: 1020px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-top: 4px solid var(--forest);
  border-bottom: 1px solid var(--border);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 14px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 1.3rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--text); }
.brand-sub { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  font-size: 1.1rem;
  padding: 6px 12px;
  cursor: pointer;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  padding: 10px 16px;
  color: var(--forest-dark);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 6px;
}
.site-nav a:hover { color: var(--forest); background: var(--gold-soft); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(165deg, var(--ivory) 0%, var(--gold-soft) 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 52px;
  text-align: center;
}
.hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero p { margin: 0 auto 24px; max-width: 640px; font-size: 1.08rem; color: var(--muted); }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--forest-dark); border-color: var(--border); }
.btn-ghost:hover { background: var(--gold-soft); color: var(--forest-dark); }

/* ---------- Sections ---------- */
.section { padding: 40px 0 8px; }
.section-title { margin: 0 0 6px; font-size: 1.55rem; text-align: center; }
.section-sub { margin: 0 auto 24px; color: var(--muted); text-align: center; max-width: 620px; }

.category-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 6px; }
.category-chip {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.category-chip:hover { border-color: var(--forest); color: var(--forest); }

.category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #8a6a1f;
  font-size: 0.76rem;
  font-weight: 700;
}

/* ---------- Field-note cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  outline: 3px solid var(--surface);
  outline-offset: -6px;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(58, 58, 47, 0.12); }
.card .category-tag { align-self: flex-start; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--forest); }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; flex-grow: 1; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.86rem; color: var(--muted); margin: 18px 0 4px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--forest); }

/* ---------- Article ---------- */
.article-page { max-width: 780px; padding-bottom: 40px; }
.article-content { min-width: 0; }

.article-header { margin: 0 0 22px; }
.article-header .category-tag { margin-bottom: 14px; }
.article-header h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.4vw, 2.2rem); }
.article-meta { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; }
.article-lead { font-size: 1.12rem; color: #4c4c40; margin: 0; }

.article-content h2 { font-size: 1.42rem; margin: 2em 0 0.6em; }
.article-content h3 { font-size: 1.14rem; margin: 1.6em 0 0.5em; }
.article-content p { margin: 0 0 1.15em; }
.article-content ul, .article-content ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.article-content li { margin-bottom: 0.5em; }
.article-content blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #6b5320;
}

.key-takeaways {
  background: var(--gold-soft);
  border: 1px solid #ecdfbe;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 26px;
}
.key-takeaways strong { color: var(--forest-dark); display: block; margin-bottom: 8px; font-family: var(--serif); }
.key-takeaways ul { margin: 0; padding-left: 1.2em; }
.key-takeaways li { margin-bottom: 4px; }

.tip-box {
  background: #eef4ec;
  border: 1px solid #d4e2d0;
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 1.4em 0;
}
.tip-box strong { color: var(--forest-dark); }

.faq { margin-top: 40px; }
.faq h2 { margin-bottom: 16px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--forest-dark); }
.faq details p { margin: 10px 0 0; }

.related { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 24px; }
.related h2 { margin: 0 0 14px; font-size: 1.3rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.related-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-weight: 600;
}
.related-card:hover { border-color: var(--forest); color: var(--forest); }

/* ---------- Static pages ---------- */
.page { padding: 40px 0 60px; }
.page .prose { max-width: 760px; }
.page .prose h1 { font-size: clamp(1.8rem, 3.4vw, 2.2rem); margin: 0 0 8px; }
.page .prose h2 { font-size: 1.3rem; margin: 2em 0 0.5em; }
.page .prose p { margin: 0 0 1.1em; }
.page .prose ul, .page .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.page .prose li { margin-bottom: 0.4em; }
.updated-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 28px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; font-size: 0.98rem; background: var(--surface);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.88rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 30px 0;
  background: var(--forest-dark);
  color: #dce8dd;
  text-align: center;
}
.footer-inner { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
.footer-brand { color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin: 0 0 6px; }
.footer-inner > p { margin: 0 auto 18px; font-size: 0.9rem; color: #aec5b2; max-width: 560px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 18px; }
.footer-links a { color: #dce8dd; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.copyright { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.84rem; color: #9cb6a1; }

/* ---------- 404 ---------- */
.notfound { padding: 80px 0 100px; text-align: center; }
.notfound h1 { font-size: 2.8rem; margin: 0 0 10px; }
.notfound p { color: var(--muted); margin: 0 0 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .site-nav { display: none; flex-direction: column; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .contact-grid { grid-template-columns: 1fr; }
  .card-grid, .related-grid { grid-template-columns: 1fr; }
}
