/* Native Plant Finder — stylesheet
   Goals: readable, clean, no decorative excess, fast.
*/

/* ── Reset & tokens ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:        #2d6a4f;
  --green-dark:   #1b4332;
  --green-light:  #d8f3dc;
  --green-tint:   #f0faf2;
  --gray-50:      #f9fafb;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-400:     #9ca3af;
  --gray-500:     #6b7280;
  --gray-900:     #111827;
  --radius:       8px;
  --max-w:        960px;
  --font:         "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Inter via Google Fonts — single weight, display=swap, no render-blocking */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray-900);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ──────────────────────────────────────────── */
.site-header {
  background: var(--green-dark);
  padding: .7rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  letter-spacing: -.01em;
}
.site-logo svg { opacity: .9; }
.site-nav a {
  color: rgba(255,255,255,.8);
  font-size: .875rem;
  margin-left: 1.25rem;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--gray-200);
  background: #fff;
  padding: 2rem 0;
  margin-top: 4rem;
  font-size: .85rem;
  color: var(--gray-500);
}
.site-footer a { color: var(--green); }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .4rem; }
.footer-disclaimer { margin-top: .75rem; font-size: .8rem; color: var(--gray-400); }

/* ── Breadcrumb ──────────────────────────────────────── */
.breadcrumb {
  font-size: .8rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--green); }
.bc-sep { color: var(--gray-400); font-size: .75rem; }

/* ── Plant hero ──────────────────────────────────────── */
.plant-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0 1.25rem;
}
.hero-text h1 {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--gray-900);
  margin-bottom: .25rem;
}
.hero-scientific {
  font-size: .95rem;
  color: var(--gray-500);
  margin-bottom: .6rem;
}
.hero-tagline {
  font-size: .93rem;
  color: var(--gray-500);
  margin-bottom: .85rem;
  line-height: 1.6;
}
.badge-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.badge {
  font-size: .73rem;
  font-weight: 600;
  padding: .2em .6em;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.4;
}
.badge-perennial { background: var(--green-tint);  color: var(--green);      border-color: var(--green-light); }
.badge-annual    { background: #fefce8;             color: #854d0e;           border-color: #fde68a; }
.badge-biennial  { background: #eff6ff;             color: #1d4ed8;           border-color: #bfdbfe; }
.badge-native    { background: #f0fdf4;             color: #166534;           border-color: #bbf7d0; }

/* Plant image — floats to the right of the hero text */
.hero-image {
  width: 220px;
  flex-shrink: 0;
}
.hero-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  display: block;
}

/* ── Facts strip ─────────────────────────────────────── */
.facts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin-bottom: 1.5rem;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.fact-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-500);
}
.fact-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-900);
}

/* ── Content sections ─────────────────────────────────── */
.section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--gray-100);
}
.section h3 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  margin: .9rem 0 .3rem;
}
.section h3:first-child { margin-top: 0; }
.section p  { font-size: .93rem; line-height: 1.7; margin-bottom: .5rem; }
.section p:last-child { margin-bottom: 0; }
.section ul { padding-left: 1.15rem; }
.section li { font-size: .93rem; line-height: 1.7; margin-bottom: .25rem; }

/* ── Seasonal care ───────────────────────────────────── */
.seasons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.season-block {
  border-radius: 6px;
  padding: .75rem .9rem;
}
.season-name {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .4rem;
}
.season-block ul { padding-left: 1.1rem; }
.season-block li { font-size: .86rem; line-height: 1.6; margin-bottom: .25rem; }

.s-spring { background: #f0fdf4; }
.s-spring .season-name { color: #166534; }
.s-summer { background: #fefce8; }
.s-summer .season-name { color: #713f12; }
.s-fall   { background: #fff7ed; }
.s-fall   .season-name { color: #7c2d12; }
.s-winter { background: #eff6ff; }
.s-winter .season-name { color: #1e3a8a; }

/* ── Companion pills ─────────────────────────────────── */
.companion-note {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--green-tint);
  border-left: 2px solid var(--green-light);
  padding: .6rem .85rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: .75rem;
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .65rem;
}
.pill {
  font-size: .8rem;
  font-style: italic;
  padding: .2em .65em;
  border: 1px solid var(--green-light);
  border-radius: 999px;
  color: var(--green);
  background: var(--green-tint);
}
.companion-tip { font-size: .82rem; color: var(--gray-500); }

/* ── Where to buy ────────────────────────────────────── */
.buy-list { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.buy-item { font-size: .91rem; display: flex; align-items: baseline; gap: .4rem; }
.buy-item a { font-weight: 600; }
.buy-item a:hover { text-decoration: underline; }
.buy-desc { color: var(--gray-500); }

/* ── Related plants ──────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem;
}
.related-link {
  display: block;
  padding: .65rem .85rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: var(--gray-50);
  color: inherit;
  transition: border-color .1s, background .1s;
}
.related-link:hover { border-color: var(--green-light); background: var(--green-tint); text-decoration: none; }
.related-common { font-size: .85rem; font-weight: 600; color: var(--gray-900); display: block; }
.related-sci    { font-size: .75rem; font-style: italic; color: var(--gray-500); display: block; margin-top: .1rem; }

/* ── Ad slot ─────────────────────────────────────────── */
.ad-slot { margin: 1rem 0; }

/* ── Homepage ─────────────────────────────────────────── */
.home-hero {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}
.home-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--gray-900);
  margin-bottom: .35rem;
}
.home-sub { font-size: .95rem; color: var(--gray-500); }

.browse-section { margin-bottom: 2.5rem; }
.browse-heading {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-500);
  margin-bottom: .75rem;
}
.plant-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .5rem;
}
.plant-card {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .6rem .75rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color .1s, background .1s;
}
.plant-card:hover { border-color: var(--green-light); background: var(--green-tint); text-decoration: none; }

/* Thumbnail */
.pc-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid var(--gray-200);
  display: block;
}
.pc-thumb-placeholder {
  background: var(--gray-100);
}

/* Text body */
.pc-body { display: flex; flex-direction: column; min-width: 0; }
.pc-common { font-size: .86rem; font-weight: 600; color: var(--gray-900); display: block; }
.pc-sci    { font-size: .74rem; font-style: italic; color: var(--gray-500); display: block; margin-top: .1rem; }
.pc-attrs  { display: flex; flex-wrap: wrap; gap: .15rem .45rem; margin-top: .3rem; }
.pc-attr   { font-size: .71rem; color: var(--gray-500); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
  .plant-hero    { grid-template-columns: 1fr; }
  .hero-image    { display: none; }           /* omit image on small screens */
  .hero-text h1  { font-size: 1.5rem; }
  .seasons-grid  { grid-template-columns: 1fr; }
  .facts-strip   { grid-template-columns: repeat(3, 1fr); }
  .plant-grid    { grid-template-columns: 1fr 1fr; }
  .pc-thumb      { width: 48px; height: 48px; }
  .related-grid  { grid-template-columns: 1fr 1fr; }
}
