/* ==========================================================================
   Minneflora — site styles
   Colors and type follow the app's design guide ("Deep Forest", "Soft Sage",
   Plus Jakarta Sans + Manrope). Sections are separated by background shifts,
   not border lines.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --forest: #012d1d;
  --forest-2: #1b4332;
  --sage: #3d6846;
  --sage-soft: #dcebd9;
  --moss: #6f8f5f;
  --lake: #2f5d73;
  --lake-soft: #d9e7ec;
  --bloom: #a8432f;      /* used sparingly, e.g. "invasive" tag */
  --sun: #e2b04a;

  --surface: #f9faf6;
  --surface-low: #f1f4ec;
  --surface-high: #e6ebdf;
  --surface-card: #ffffff;
  --text: #17231c;
  --text-muted: #4a5a50;
  --on-forest: #f3f7f1;
  --focus: #b5711a;

  --shadow: 0 12px 32px rgb(1 45 29 / 0.08);
  --radius-leaf: 1.5rem 0.375rem 1.5rem 0.375rem;
  --radius: 1.25rem;

  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1rem, 4vw, 2rem);
  --max: 72rem;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --sage: #8fc49a;
    --sage-soft: #1f3a2a;
    --moss: #9cba88;
    --lake: #8ec2d6;
    --lake-soft: #1b313b;
    --bloom: #f0a18f;
    --sun: #f0c56a;

    --surface: #0c1a13;
    --surface-low: #11231a;
    --surface-high: #1a3125;
    --surface-card: #152a1f;
    --text: #e7efe8;
    --text-muted: #b2c2b7;
    --focus: #f0c56a;
    --shadow: 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 750;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--sage);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--forest);
  color: var(--on-forest);
  border-radius: 0.5rem;
  font-weight: 700;
}
.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  color: var(--text-muted);
  max-width: var(--measure);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover {
  transform: translateY(-1px);
}
.button-primary {
  background: linear-gradient(135deg, var(--forest), var(--forest-2));
  color: var(--on-forest);
  box-shadow: var(--shadow);
}
.button-secondary {
  background: var(--sage-soft);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  .button-primary {
    background: linear-gradient(135deg, #2d6a4f, #1b4332);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand svg {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface-high);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-high);
}

/* Collapse nav into a toggle on small screens (only when JS is running). */
@media (max-width: 47.99rem) {
  .js .nav-toggle {
    display: inline-flex;
  }
  .js .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .js .site-nav.is-open {
    display: block;
  }
  .js .site-nav ul {
    flex-direction: column;
  }
  .js .site-nav a {
    padding: 0.75rem 1rem;
  }
  .site-header .container {
    flex-wrap: wrap;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 7vw, 5rem);
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--sun) 22%, transparent), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }
}
.hero h1 {
  max-width: 14ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.landscape {
  width: 100%;
  height: clamp(5.5rem, 14vw, 12.5rem);
  margin-top: clamp(2rem, 6vw, 4rem);
}

/* ---------- Example identification card ---------- */
.specimen {
  position: relative;
  max-width: 24rem;
  margin-inline: auto;
  padding: 1.25rem;
  background: var(--surface-card);
  border-radius: var(--radius-leaf);
  box-shadow: var(--shadow);
}
@media (min-width: 56rem) {
  .specimen {
    transform: rotate(1.5deg);
  }
}
.specimen-photo {
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--lake-soft);
}
.specimen-photo svg {
  width: 100%;
  height: 100%;
}
.specimen-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 1rem 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.specimen ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.specimen li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
}
.specimen li:first-child {
  background: var(--surface-low);
}
.specimen .name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}
.specimen .sci {
  display: block;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-muted);
}

.tag {
  display: inline-block;
  flex: none;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--sage-soft);
  color: var(--text);
}
.tag-native::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.375rem;
  border-radius: 50%;
  background: var(--sage);
  vertical-align: 0.05em;
}
.tag-invasive {
  background: color-mix(in srgb, var(--bloom) 16%, transparent);
}
.tag-invasive::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.375rem;
  border-radius: 50%;
  background: var(--bloom);
  vertical-align: 0.05em;
}
.tag-other {
  background: var(--surface-high);
}

.specimen-caption {
  margin: 0.875rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}
.section-low {
  background: var(--surface-low);
}
/* Use on a section that continues the one above it with the same background. */
.section-flush-top {
  padding-top: 0;
}
.section-forest {
  background: linear-gradient(135deg, var(--forest), var(--forest-2));
  color: var(--on-forest);
}
.section-forest h2,
.section-forest h3 {
  color: var(--on-forest);
}
.section-forest .eyebrow {
  color: #b9dcbf;
}
.section-forest .lede,
.section-forest p {
  color: #d5e3d7;
}
.section-forest a {
  color: #ffffff;
}

.section-head {
  max-width: var(--measure);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* Purpose */
.split {
  display: grid;
  gap: 2rem;
}
@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}
.split p {
  max-width: var(--measure);
}

.pull {
  margin: 0;
  padding: 1.75rem;
  border-radius: var(--radius-leaf);
  background: var(--surface-card);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* Steps */
.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}
.steps li {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface-card);
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--moss);
}
.steps p {
  margin: 0;
  color: var(--text-muted);
}

/* Features */
.features {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 48rem) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface-low);
}
.feature p {
  margin: 0;
  color: var(--text-muted);
}
.icon-badge {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem 0.25rem 1rem 0.25rem;
  background: var(--sage-soft);
  color: var(--sage);
}
.icon-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}
.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

/* Audience */
.audience {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) {
  .audience {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 64rem) {
  .audience {
    grid-template-columns: repeat(4, 1fr);
  }
}
.audience li {
  padding: 1.5rem;
  border-radius: var(--radius-leaf);
  background: rgb(255 255 255 / 0.07);
}
.audience h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}
.audience p {
  margin: 0;
  font-size: 0.9875rem;
}

/* Note on accuracy */
.note {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-leaf);
  background: var(--lake-soft);
}
@media (min-width: 56rem) {
  .note {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3rem;
  }
}
.note h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.note ul {
  margin: 0;
  padding-left: 1.25rem;
}
.note li + li {
  margin-top: 0.5rem;
}

/* FAQ */
.faq {
  max-width: 48rem;
}
.faq details {
  border-radius: 1rem;
  background: var(--surface-card);
}
.faq details + details {
  margin-top: 0.75rem;
}
.faq summary {
  position: relative;
  padding: 1.125rem 3.25rem 1.125rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  width: 0.625rem;
  height: 0.625rem;
  border-right: 2px solid var(--sage);
  border-bottom: 2px solid var(--sage);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq .answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
}
.faq .answer p:last-child {
  margin-bottom: 0;
}

/* Contact */
.contact {
  text-align: center;
}
.contact .lede {
  margin-inline: auto;
}
.contact-email {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.5rem;
  background: var(--surface-high);
  font-size: 0.9375rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  color: var(--text);
}
.site-footer p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Legal pages ---------- */
.legal-hero {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) 2rem;
  background: var(--surface-low);
}
.legal-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
.legal-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.legal-layout {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem 4rem;
}
@media (min-width: 64rem) {
  .legal-layout {
    grid-template-columns: 15rem 1fr;
    gap: 4rem;
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 5.5rem;
  }
}

.toc {
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--surface-low);
  font-size: 0.9375rem;
}
.toc h2 {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}
.toc li + li {
  margin-top: 0.25rem;
}
.toc a {
  color: var(--text);
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

.prose {
  max-width: var(--measure);
}
.prose h2 {
  margin-top: 2.75rem;
  font-size: 1.5rem;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin-top: 1.75rem;
  font-size: 1.125rem;
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.prose li + li {
  margin-top: 0.375rem;
}
.prose .summary {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-leaf);
  background: var(--sage-soft);
}
.prose .summary ul {
  margin-bottom: 0;
}
.prose .callout {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: var(--lake-soft);
}
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.prose thead th {
  background: var(--surface-high);
  font-family: var(--font-display);
}
.prose tbody tr:nth-child(even) {
  background: var(--surface-low);
}
.back-to-top {
  display: inline-block;
  margin-top: 2rem;
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .toc,
  .skip-link,
  .back-to-top {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .legal-hero {
    background: none;
    padding: 0 0 1rem;
  }
  .legal-layout {
    display: block;
    padding: 0;
  }
  a {
    color: #000;
  }
}

.prose .summary-note {
  margin: 0.75rem 0 0;
}
