:root {
  --ink: #14211b;
  --muted: #59645d;
  --surface: #fffdf5;
  --paper: #f4f0df;
  --reed: #12372a;
  --moss: #4f7c45;
  --water: #0f6f78;
  --sun: #f3c75f;
  --clay: #c76847;
  --line: rgba(20, 33, 27, 0.14);
  --shadow: 0 22px 65px rgba(18, 55, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  transform: translateY(-140%);
  padding: 10px 14px;
  color: #fff;
  background: var(--reed);
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.scrolled,
.site-header.open {
  background: rgba(255, 253, 245, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(18, 55, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 40px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.site-header.scrolled .brand,
.site-header.open .brand {
  color: var(--reed);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--reed);
  background: var(--sun);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 1px;
  font-size: 0.76rem;
  opacity: 0.82;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 13px;
  color: #fff;
  border-radius: 6px;
  font-size: 0.94rem;
  font-weight: 700;
}

.site-header.scrolled .nav-links a,
.site-header.open .nav-links a {
  color: var(--reed);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.site-header.scrolled .nav-links a:hover,
.site-header.scrolled .nav-links a:focus-visible,
.site-header.open .nav-links a:hover,
.site-header.open .nav-links a:focus-visible {
  background: rgba(18, 55, 42, 0.08);
}

.nav-links .nav-action {
  margin-left: 6px;
  color: var(--reed);
  background: var(--sun);
}

.site-header.scrolled .nav-links .nav-action,
.site-header.open .nav-links .nav-action {
  background: var(--sun);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--sun);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--reed);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--reed);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 28, 20, 0.88) 0%, rgba(7, 28, 20, 0.64) 38%, rgba(7, 28, 20, 0.2) 72%),
    linear-gradient(0deg, rgba(7, 28, 20, 0.78) 0%, rgba(7, 28, 20, 0) 44%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 150px 0 80px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--sun);
}

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

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

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

h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.15rem;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}

.button.primary {
  color: var(--reed);
  background: var(--sun);
}

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

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(280px, 1.15fr);
  gap: 56px;
  align-items: start;
}

.intro p:last-child {
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 1.14rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  background: #fbf7e9;
}

.stats article {
  min-height: 220px;
  padding: 46px min(5vw, 56px);
  border-right: 1px solid var(--line);
}

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

.stats strong {
  display: block;
  color: var(--water);
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.stats span {
  display: block;
  max-width: 250px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 750;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.section-heading h2 {
  max-width: 730px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter {
  min-height: 38px;
  padding: 8px 13px;
  color: var(--reed);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.filter.active,
.filter:focus-visible {
  color: #fff;
  background: var(--reed);
  outline: none;
}

.species-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.species-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(18, 55, 42, 0.08);
  transition: transform 180ms ease, opacity 180ms ease;
}

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

.species-card:hover {
  transform: translateY(-4px);
}

.species-card p {
  margin: 0 0 6px;
  color: var(--water);
  font-size: 0.84rem;
  font-style: italic;
  font-weight: 800;
}

.species-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.frog-token {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 7px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -16px 24px rgba(0, 0, 0, 0.14), 0 10px 28px rgba(18, 55, 42, 0.14);
}

.frog-token.tree {
  background: radial-gradient(circle at 35% 32%, #e3ef9b 0 8px, transparent 9px), #79a84f;
}

.frog-token.reed {
  background: radial-gradient(circle at 62% 28%, #d9f0e4 0 7px, transparent 8px), #0f6f78;
}

.frog-token.wood {
  background: radial-gradient(circle at 30% 34%, #f2df9b 0 6px, transparent 7px), #8a6a4a;
}

.frog-token.chorus {
  background: radial-gradient(circle at 58% 34%, #f6f1ba 0 6px, transparent 7px), #c76847;
}

.habitats {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 54px;
  padding: 96px max(20px, calc((100% - 1180px) / 2));
  color: #fff;
  background: var(--reed);
}

.habitat-copy p:last-child {
  max-width: 520px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.habitat-list {
  display: grid;
  gap: 14px;
}

.habitat-list article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.habitat-list span {
  color: var(--sun);
  font-weight: 900;
}

.habitat-list h3,
.habitat-list p {
  grid-column: 2;
}

.habitat-list p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.timeline article {
  padding: 24px;
  border-left: 4px solid var(--water);
  background: var(--paper);
}

.timeline time {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--clay);
  font-weight: 900;
}

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

.visit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 58px max(20px, calc((100% - 1180px) / 2));
  background: #e7f3ed;
  border-block: 1px solid rgba(15, 111, 120, 0.17);
}

.visit div {
  max-width: 730px;
}

.visit p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
}

.join {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 46px;
  align-items: center;
}

.join p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
}

.signup {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.signup label {
  display: block;
  margin-bottom: 9px;
  font-weight: 900;
}

.signup div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.signup input {
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid rgba(20, 33, 27, 0.22);
  border-radius: 6px;
  background: #fffdf7;
}

.signup input:focus {
  border-color: var(--water);
  outline: 3px solid rgba(15, 111, 120, 0.16);
}

.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--water);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 42px max(20px, calc((100% - 1180px) / 2));
  color: rgba(255, 255, 255, 0.78);
  background: #0d2018;
}

.site-footer strong {
  color: #fff;
}

.site-footer p {
  max-width: 500px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.footer-links a:hover {
  color: #fff;
}

.not-found {
  position: relative;
  min-height: 74vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 150px max(20px, calc((100% - 1180px) / 2)) 84px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 34%, rgba(243, 199, 95, 0.22), transparent 23%),
    linear-gradient(135deg, #0c2a20 0%, #12372a 48%, #0b1d17 100%);
}

.not-found::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 32%;
  background: linear-gradient(0deg, rgba(15, 111, 120, 0.34), transparent);
}

.not-found-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.not-found h1 {
  max-width: 660px;
}

.pond-scene {
  position: absolute;
  right: max(20px, calc((100% - 1180px) / 2));
  bottom: 58px;
  width: min(38vw, 440px);
  aspect-ratio: 1;
  opacity: 0.88;
}

.pond-ring,
.lily-pad,
.reed-stem {
  position: absolute;
  display: block;
}

.pond-ring {
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.ring-one {
  inset: 24%;
}

.ring-two {
  inset: 14%;
}

.ring-three {
  inset: 4%;
}

.lily-pad {
  width: 34%;
  height: 22%;
  border-radius: 50% 50% 46% 54%;
  background: linear-gradient(135deg, #79a84f, #4f7c45);
  box-shadow: inset -18px -10px 22px rgba(18, 55, 42, 0.24);
}

.lily-pad::after {
  content: "";
  position: absolute;
  right: 16%;
  top: 0;
  width: 24%;
  height: 54%;
  background: #12372a;
  clip-path: polygon(0 0, 100% 0, 28% 100%);
}

.pad-one {
  right: 17%;
  bottom: 32%;
  transform: rotate(-10deg);
}

.pad-two {
  right: 49%;
  bottom: 18%;
  width: 25%;
  height: 16%;
  transform: rotate(18deg);
}

.reed-stem {
  bottom: 8%;
  width: 5px;
  height: 58%;
  border-radius: 999px;
  background: #c76847;
  transform-origin: bottom;
}

.stem-one {
  right: 12%;
  transform: rotate(-9deg);
}

.stem-two {
  right: 8%;
  height: 74%;
  background: #f3c75f;
  transform: rotate(4deg);
}

.stem-three {
  right: 3%;
  height: 48%;
  transform: rotate(12deg);
}

.error-routes {
  padding-top: 78px;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.route-grid a {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(18, 55, 42, 0.08);
  transition: transform 180ms ease, border-color 180ms ease;
}

.route-grid a:hover,
.route-grid a:focus-visible {
  border-color: rgba(15, 111, 120, 0.4);
  outline: none;
  transform: translateY(-4px);
}

.route-grid span {
  color: var(--clay);
  font-weight: 900;
}

.route-grid strong {
  display: block;
  margin-top: auto;
  font-size: 1.18rem;
}

.route-grid p {
  margin: 12px 0 0;
  color: var(--muted);
}

@media (max-width: 940px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 74px;
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 245, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .site-header .nav-links a {
    color: var(--reed);
  }

  .nav-links .nav-action {
    margin-left: 0;
  }

  .intro,
  .habitats,
  .join {
    grid-template-columns: 1fr;
  }

  .stats,
  .species-grid,
  .timeline,
  .route-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pond-scene {
    right: -70px;
    width: 360px;
    opacity: 0.4;
  }

  .visit {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .nav {
    width: min(100% - 28px, 1180px);
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 86vh;
  }

  .hero-content {
    width: min(100% - 28px, 1180px);
    padding-bottom: 54px;
  }

  h1 {
    font-size: clamp(2.65rem, 17vw, 4.2rem);
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 72px 0;
  }

  .stats,
  .species-grid,
  .timeline,
  .route-grid {
    grid-template-columns: 1fr;
  }

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

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

  .habitats,
  .visit {
    padding-block: 72px;
  }

  .not-found {
    min-height: 70vh;
    padding: 130px 14px 64px;
  }

  .pond-scene {
    right: -120px;
    bottom: 22px;
    width: 300px;
  }

  .habitat-list article {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }

  .signup {
    padding: 20px;
  }

  .signup div {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
