/* ePhyto design tokens — White 60% / Emerald 30% / Tangerine 10% */
:root {
  --color-white: #ffffff;
  --color-page: #f8fafc;
  --color-alabaster: #f9fbfa;
  --color-emerald: #065f46;
  --color-emerald-mid: #047857;
  --color-emerald-bright: #059669;
  --color-mint: #ecfdf5;
  --color-mint-strong: #d1fae5;
  --color-tangerine: #f97316;
  --color-tangerine-deep: #ea580c;
  --color-text: #0f172a;
  --color-muted: #475569;
  --color-faint: #64748b;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(6, 95, 70, 0.08);
  --shadow-hover: 0 14px 32px rgba(6, 95, 70, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 104px;
  --font: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.ephyto-app {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-page);
  min-height: 100vh;
}

.ephyto-app h1,
.ephyto-app h2,
.ephyto-app h3,
.ephyto-app h4,
.ephyto-app h5,
.ephyto-app h6 {
  color: var(--color-text);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.ephyto-app p {
  color: var(--color-muted);
}

.ephyto-app a {
  color: var(--color-emerald-mid);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ephyto-app a:hover {
  color: var(--color-emerald);
}

.binomial {
  font-style: italic;
  font-weight: 550;
  color: var(--color-emerald);
}

.vernacular {
  color: var(--color-muted);
  font-weight: 500;
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container-site {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-emerald);
  color: var(--color-white);
  box-shadow: 0 8px 24px rgba(6, 95, 70, 0.18);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--color-white) !important;
  flex-shrink: 0;
}

.brand img {
  height: 40px;
  width: auto;
  background: var(--color-white);
  border-radius: 8px;
  padding: 2px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand__tag {
  font-size: 0.68rem;
  color: var(--color-mint-strong);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-search {
  flex: 1;
  max-width: 480px;
}

.header-search form {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--color-white);
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  min-width: 0;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search input:focus {
  outline: none;
}

.header-search button {
  border: 0;
  background: var(--color-tangerine);
  color: var(--color-white);
  font-weight: 650;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  white-space: nowrap;
}

.header-search button:hover,
.header-search button:focus {
  background: var(--color-tangerine-deep);
  outline: 2px solid #ffedd5;
  outline-offset: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.9rem;
  font-weight: 550;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  display: block;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white) !important;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--color-white);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.sponsor-strip {
  background: #064e3b;
  color: var(--color-mint-strong);
  font-size: 0.8rem;
  padding: 0.4rem 0;
}

.sponsor-strip a {
  color: var(--color-emerald);
  font-weight: 600;
}

/* Hero */
.hero {
  background:
    linear-gradient(115deg, rgba(6, 95, 70, 0.94) 0%, rgba(4, 120, 87, 0.82) 55%, rgba(15, 23, 42, 0.55) 100%),
    url("../img/bg-img/24.jpg") center/cover no-repeat;
  color: var(--color-white);
  padding: 4.5rem 0 4rem;
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 18ch;
  margin-bottom: 0.75rem;
}

.hero p.lede {
  color: rgba(255, 255, 255, 0.9);
  max-width: 62ch;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.stat-card strong {
  display: block;
  font-size: 1.7rem;
  color: var(--color-white);
}

.stat-card span {
  color: var(--color-mint-strong);
  font-size: 0.85rem;
}

/* Buttons */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--color-tangerine);
  color: var(--color-white) !important;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(234, 88, 12, 0.28);
}

.btn-cta:hover,
.btn-cta:focus {
  background: var(--color-tangerine-deep);
  color: var(--color-white) !important;
  outline: 2px solid #ffedd5;
  outline-offset: 2px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--color-white) !important;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--color-border-strong);
  background: var(--color-white);
  color: var(--color-emerald) !important;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--color-mint);
  border-color: var(--color-emerald-bright);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section--muted {
  background: var(--color-alabaster);
}

.section-kicker {
  color: var(--color-emerald-mid);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 0.75rem;
}

.prose {
  max-width: 75ch;
}

.prose p {
  margin-bottom: 1rem;
}

.page-hero {
  background: var(--color-emerald);
  color: var(--color-white);
  padding: 2.4rem 0 2rem;
}

.page-hero h1 {
  color: var(--color-white);
  margin: 0.35rem 0 0.4rem;
}

.page-hero p {
  color: var(--color-mint-strong);
  margin: 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--color-mint-strong);
  list-style: none;
  padding: 0;
  margin: 0;
}

.crumbs a {
  color: var(--color-white) !important;
  opacity: 0.85;
}

/* Cards / grids */
.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.plant-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.plant-card:hover,
.plant-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-mint-strong);
  color: inherit;
}

.plant-card__meta {
  font-size: 0.75rem;
  color: var(--color-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}

.plant-card h3 {
  font-size: 1.12rem;
  margin: 0 0 0.35rem;
}

.plant-card .vernacular {
  flex: 1;
  margin-bottom: 0.9rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--color-mint);
  color: var(--color-emerald);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
}

.badge--warn {
  background: #fff7ed;
  color: var(--color-tangerine-deep);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.toolbar input,
.toolbar select,
.form-control-theme {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  background: var(--color-white);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.toolbar input:focus,
.toolbar select:focus,
.form-control-theme:focus {
  outline: 2px solid var(--color-tangerine);
  outline-offset: 1px;
  border-color: var(--color-tangerine);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chip {
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-muted);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.filter-chip.is-active {
  background: var(--color-mint);
  border-color: var(--color-emerald-bright);
  color: var(--color-emerald);
  font-weight: 650;
}

/* Profile */
.profile-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.profile-card h1 {
  margin-top: 0;
}

.profile-card .details-body {
  color: var(--color-muted);
}

.profile-card .details-body table {
  width: 100%;
  border-collapse: collapse;
}

.profile-card .details-body table td,
.profile-card .details-body table th {
  border: 1px solid var(--color-border);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.profile-card .details-body table thead th {
  background: var(--color-emerald);
  color: var(--color-white);
}

/* Tables */
.table-shell {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.research-table thead th {
  background: var(--color-emerald);
  color: var(--color-white);
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
}

.research-table tbody td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.92rem;
  vertical-align: top;
}

.research-table tbody tr:hover {
  background: var(--color-mint);
}

.research-table tbody tr.catalog-row {
  cursor: pointer;
}

.research-table tbody tr.catalog-row:focus {
  outline: 2px solid var(--color-tangerine);
  outline-offset: -2px;
}

.profile-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1.2rem;
  margin: 0 0 1.4rem;
}

.profile-meta div {
  background: var(--color-mint);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}

.profile-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-emerald);
  font-weight: 700;
}

.profile-meta dd {
  margin: 0.2rem 0 0;
  color: var(--color-text);
}

.research-table td:nth-child(3) {
  font-style: italic;
  color: var(--color-emerald);
  font-weight: 550;
}

.research-table td:nth-child(2) {
  color: var(--color-text);
  font-weight: 600;
}

/* Contact / forms */
.flash {
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.flash-ok {
  background: var(--color-mint);
  color: var(--color-emerald);
}
.flash-err {
  background: #fff7ed;
  color: var(--color-tangerine-deep);
}

.contact-panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-panel .form-control {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.85rem;
}

.contact-panel .form-control:focus {
  outline: 2px solid var(--color-tangerine);
  border-color: var(--color-tangerine);
}

.map-frame iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: var(--radius);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.info-tile {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.info-tile h3 {
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
  color: var(--color-emerald);
}

/* Gardens */
.garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.garden-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--color-border);
}

.garden-card img,
.garden-card .thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}

.garden-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(transparent, rgba(6, 95, 70, 0.92));
  color: var(--color-white);
}

.garden-card h3 {
  color: var(--color-white);
  font-size: 1.05rem;
  margin: 0;
}

.garden-card p {
  color: #d1fae5;
  margin: 0;
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  background: var(--color-emerald);
  color: var(--color-mint-strong);
  padding: 3rem 0 1.25rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h2,
.site-footer h3 {
  color: var(--color-white);
  font-size: 1rem;
}

.site-footer p,
.site-footer a {
  color: var(--color-mint-strong) !important;
  font-size: 0.92rem;
}

.site-footer a:hover {
  color: var(--color-white) !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-muted);
}

/* Feature cards on home */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin: 0.4rem 0 0.5rem;
}

@media (max-width: 991px) {
  .site-header__bar {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .header-search {
    display: flex;
    flex: 1 1 100%;
    max-width: none;
    order: 4;
    padding-bottom: 0.75rem;
  }

  .site-nav {
    display: none;
    flex: 1 1 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 0.5rem;
    margin: 0;
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .stat-row,
  .feature-grid,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .profile-card {
    padding: 1.2rem;
  }
}
