:root {
  color-scheme: light;
  --ink: #17221e;
  --muted: #52635d;
  --paper: #fbfaf3;
  --surface: #ffffff;
  --line: #d9ded1;
  --leaf: #277c4f;
  --moss: #8ca346;
  --water: #2f82a0;
  --sun: #d99a2b;
  --clay: #b45c43;
  --shadow: 0 18px 45px rgba(29, 47, 40, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(251, 250, 243, 0.92);
  border-bottom: 1px solid rgba(39, 124, 79, 0.16);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--leaf);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--leaf);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 64px));
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(72px, 11vw, 128px) clamp(20px, 6vw, 76px);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(9, 25, 19, 0.78), rgba(9, 25, 19, 0.32) 48%, rgba(9, 25, 19, 0.04)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
}

.hero-content {
  position: relative;
  max-width: 680px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #cfeaaa;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px 0 0;
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: #123023;
  background: #e8f6c7;
  border-color: #e8f6c7;
}

.button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-band article {
  padding: 26px clamp(18px, 5vw, 54px);
  background: #f3f0df;
}

.stats-band strong {
  display: block;
  color: var(--leaf);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.stats-band span {
  display: block;
  max-width: 260px;
  margin-top: 8px;
  color: var(--muted);
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(20px, 6vw, 76px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.split > div > p:not(.eyebrow),
.section-heading + p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-grid,
.action-grid,
.species-grid,
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.species-card,
.fact-grid article,
.action-grid article {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 34, 30, 0.03);
}

.feature-card p,
.species-card p,
.fact-grid p,
.action-grid p {
  margin: 0;
  color: var(--muted);
}

.icon-dot {
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 18px;
  border-radius: 50%;
}

.green {
  background: var(--leaf);
}

.amber {
  background: var(--sun);
}

.blue {
  background: var(--water);
}

.rose {
  background: var(--clay);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timeline article {
  min-height: 250px;
  padding: 26px;
  border-right: 1px solid var(--line);
}

.timeline article:last-child {
  border-right: 0;
}

.timeline span {
  display: inline-flex;
  margin-bottom: 48px;
  color: var(--water);
  font-weight: 900;
}

.timeline p {
  margin: 0;
  color: var(--muted);
}

.facts-section {
  background: #fffaf0;
}

.fact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact-grid article {
  border-top: 5px solid var(--water);
}

.fact-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.05rem;
}

.image-section {
  background: #f6f7ed;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.image-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.image-grid figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
  font-weight: 700;
}

.quiz-section {
  background: #eef7f8;
}

.quiz {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.quiz-question {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.quiz-question legend {
  padding: 0;
  color: var(--ink);
  font-weight: 900;
}

.quiz-question label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
}

.quiz-question input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--leaf);
  flex: 0 0 auto;
}

.quiz-question.correct {
  border-color: rgba(39, 124, 79, 0.5);
  background: #f3fbec;
}

.quiz-question.incorrect {
  border-color: rgba(180, 92, 67, 0.5);
  background: #fff3ee;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quiz-actions .button {
  cursor: pointer;
  font: inherit;
}

.quiz-reset {
  color: var(--ink);
  background: #fff;
  border-color: #b9c8b7;
}

.quiz-result {
  min-height: 30px;
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.species-section {
  background: #eef5ec;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 24px;
}

.filter {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #b9c8b7;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter.active {
  color: #fff;
  background: var(--leaf);
  border-color: var(--leaf);
}

.species-card[hidden] {
  display: none;
}

.species-visual {
  height: 130px;
  margin: -6px -6px 18px;
  border-radius: 6px;
  border: 1px solid rgba(23, 34, 30, 0.08);
}

.species-visual.tree {
  background:
    radial-gradient(circle at 68% 38%, #d8f4a0 0 8%, transparent 9%),
    linear-gradient(135deg, #21583e, #8ab65b);
}

.species-visual.pond {
  background:
    radial-gradient(circle at 28% 45%, rgba(255, 255, 255, 0.8) 0 8%, transparent 9%),
    linear-gradient(135deg, #255b64, #67a9b8);
}

.species-visual.burrow {
  background:
    radial-gradient(circle at 70% 48%, #6f4d39 0 12%, transparent 13%),
    linear-gradient(135deg, #c58f57, #66754d);
}

.species-visual.glass {
  background:
    radial-gradient(circle at 52% 44%, rgba(218, 255, 222, 0.8) 0 12%, transparent 13%),
    linear-gradient(135deg, #236f5f, #9ed99d);
}

.muted {
  background: #f3f0df;
}

.habitat-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.habitat-list li {
  padding: 18px 20px;
  border-left: 5px solid var(--moss);
  background: rgba(255, 255, 255, 0.72);
}

.conservation {
  background: var(--ink);
  color: #fff;
}

.conservation .eyebrow {
  color: #bce68b;
}

.conservation .action-grid article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.conservation .action-grid p {
  color: rgba(255, 255, 255, 0.76);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 6vw, 76px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(9, 25, 19, 0.78), rgba(9, 25, 19, 0.34));
  }

  .stats-band,
  .split,
  .timeline,
  .feature-grid,
  .action-grid,
  .species-grid,
  .fact-grid,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .timeline article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .timeline article:last-child {
    border-bottom: 0;
  }

  .timeline span {
    margin-bottom: 22px;
  }
}

@media (max-width: 560px) {
  .nav {
    gap: 16px;
    font-size: 0.9rem;
  }

  .hero {
    min-height: 620px;
    padding-top: 58px;
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
