/* The public garden guide: list pages and one page per species. */

.species-list-head {
  max-width: 62ch;
  margin-bottom: 28px;
}
.species-list-head h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.species-list-head p {
  margin-top: 14px;
  font-size: 18px;
  color: var(--loam);
}

.species-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.species-search { min-width: 240px; flex: 0 1 300px; }

.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.species-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--radius-card);
  background: var(--card);
  border: 1px solid var(--hairline);
  overflow: hidden;
  color: var(--ink);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.species-card:hover {
  color: var(--ink);
  border-color: var(--hairline-strong);
  transform: translateY(-2px);
}
.species-card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background: var(--sprout);
  color: var(--turf-ink);
  font-size: 30px;
  overflow: hidden;
}
.species-card-media img { width: 100%; height: 100%; object-fit: cover; }
.species-card-body {
  display: grid;
  gap: 4px;
  padding: 16px;
  align-content: start;
}
.species-card-body strong {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.02em;
}
.species-card-body em { color: var(--loam); font-size: 14px; }
.species-card-about {
  margin-top: 6px;
  color: var(--loam);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.species-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---------- Species page ---------- */
.species-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.species-side {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: grid;
  gap: 16px;
}
@media (max-width: 900px) {
  /* Stacked, and the sign-up card drops below the guide so the name comes
     straight after the photo. display:contents lets the two side cards be
     ordered separately from each other. */
  .species-layout { display: flex; flex-direction: column; gap: 24px; align-items: stretch; }
  .species-side { display: contents; }
  .species-photo { order: 1; }
  .species-body { order: 2; }
  .species-cta { order: 3; }
}

.species-photo {
  margin: 0;
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--card-sunk);
}
.species-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.species-photo figcaption {
  padding: 8px 12px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--loam-soft);
}

.species-cta {
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.species-cta .brand-mark { border-radius: 12px; }
.species-cta h2 { font-size: 20px; }
.species-cta .btn { width: 100%; }

.species-head { margin-bottom: 22px; }
.species-head h1 {
  font-size: clamp(32px, 4.2vw, 46px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.species-care-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 10px 0 -4px;
}

.species-note {
  margin-top: 22px;
  font-size: 14px;
  max-width: 62ch;
}
