:root {
  color-scheme: light;
  --paper: #f8f6ed;
  --ink: #162c22;
  --green: #173b2c;
  --lime: #dbef97;
  --line: #dbded0;
  --muted: #4c6054;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial,Helvetica,sans-serif;
  line-height: 1.5;
}

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

a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible {
  outline: 3px solid #397854;
  outline-offset: 4px;
}

button,input {
  font: inherit;
}

p,h1,h2,h3,figure {
  margin: 0;
}

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

.shell {
  width: min(1320px,calc(100% - 96px));
  margin-inline: auto;
}

.topbar {
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.055em;
  font-size: 25px;
  line-height: 1;
}

.brand-dot {
  color: #527e35;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 700;
}

nav a:hover,.chips a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-search {
  border: 1px solid #cdd5c7;
  border-radius: 999px;
  padding: 8px 13px;
}

.hero {
  min-height: 510px;
  display: grid;
  grid-template-columns: 46% 54%;
  border-radius: 22px;
  overflow: hidden;
  background: var(--green);
  color: var(--paper);
}

.hero-copy {
  padding: clamp(34px,4.5vw,66px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
}

.hero-date {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e2ecbd;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #dbef972c;
}

h1,h2 {
  font-family: Georgia,'Times New Roman',serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(62px,7.6vw,112px);
  line-height: .84;
  letter-spacing: -.074em;
  margin: 24px 0 29px;
}

h1 em {
  color: var(--lime);
  font-weight: 400;
}

.species {
  border-top: 1px solid #ffffff32;
  width: 100%;
  padding-top: 15px;
  margin-bottom: 21px;
}

.species-name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.latin {
  font-family: Georgia,'Times New Roman',serif;
  font-style: italic;
}

.hero .latin {
  color: #d8e4d8;
  margin-top: 3px;
}

.hero-detail {
  font-size: 14px;
  max-width: 34ch;
  margin-top: 11px;
  color: #e3ede5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 999px;
  padding: 10px 17px;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
}

.button-lime {
  background: var(--lime);
  color: var(--ink);
}

.button-lime:hover {
  background: #ecf7bf;
}

.button-dark {
  background: var(--green);
  color: #fff;
}

.button-dark:hover {
  background: #24563f;
}

.hero-image {
  position: relative;
  min-width: 0;
  min-height: 100%;
  background: #8c9a7a;
}

.hero-image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}

.photo-label,.photo-credit {
  position: absolute;
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  background: #152b22e8;
  color: white;
}

.photo-label {
  top: 18px;
  right: 18px;
  letter-spacing: .12em;
}

.photo-credit {
  bottom: 16px;
  right: 18px;
}

.photo-credit:hover {
  text-decoration: underline;
}

.search {
  margin-top: 26px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  background: #edf1df;
  border: 1px solid #dfe5d2;
  border-radius: 18px;
}

.section-label {
  color: #3f6049;
}

h2 {
  font-size: clamp(32px,4vw,53px);
  letter-spacing: -.052em;
  line-height: 1.04;
  margin: 6px 0;
}

.search h2 {
  font-size: clamp(29px,3vw,41px);
}

.search p:not(.eyebrow),.gallery-heading>p {
  color: var(--muted);
  font-size: 14px;
}

form {
  display: flex;
  gap: 8px;
}

input[type=search] {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd6c4;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  color: var(--ink);
}

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.chips a {
  border: 1px solid #cdd8c4;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.gallery {
  padding: 56px 0 48px;
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.gallery-heading>p {
  padding-bottom: 6px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #fffdf6;
}

.card-photo {
  position: relative;
  display: block;
  aspect-ratio: 1.55;
  overflow: hidden;
  background: #dde4d5;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}

.card-photo:hover img {
  transform: scale(1.04);
}

.card-photo span {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  background: var(--paper);
}

.card-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
}

.card h3 {
  font-size: 18px;
  line-height: 1.25;
}

.card p {
  color: var(--muted);
  font-size: 14px;
}

.card-arrow {
  display: grid;
  place-items: center;
  background: #edf1df;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  flex: none;
  font-size: 20px;
}

.card-arrow:hover {
  background: var(--lime);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 35px;
  color: var(--muted);
  font-size: 13px;
}

.footer-top {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.footer .brand {
  font-size: 20px;
  color: var(--ink);
}

summary {
  cursor: pointer;
  width: fit-content;
  font-weight: 700;
}

details p {
  margin-top: 8px;
}

details a {
  text-decoration: underline;
}

section[id] {
  scroll-margin-top: 14px;
}

@media(max-width:900px) {
  .shell {
    width: calc(100% - 52px);
  }
  .hero {
    min-height: 460px;
  }
  .hero-copy {
    padding: 32px;
  }
  .search {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media(max-width:640px) {
  .shell {
    width: calc(100% - 28px);
  }
  .topbar {
    height: 64px;
  }
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  nav {
    gap: 12px;
    font-size: 12px;
  }
  .nav-search {
    padding: 5px 7px;
  }
  nav>a:first-child {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding: 26px 23px;
  }
  .hero-image {
    min-height: 0;
    aspect-ratio: 1.42;
  }
  .hero h1 {
    font-size: clamp(61px,15vw,86px);
    margin: 19px 0 21px;
  }
  .search {
    padding: 19px;
    margin-top: 16px;
  }
  .search form {
    flex-wrap: wrap;
  }
  .search button {
    width: 100%;
  }
  .gallery {
    padding: 36px 0;
  }
  .gallery-heading,.footer-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .cards {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }
  .card-text {
    padding: 9px;
  }
  .card h3 {
    font-size: 15px;
  }
  .card p {
    font-size: 12px;
  }
  .card-arrow {
    width: 29px;
    height: 29px;
    font-size: 16px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  .card-photo img {
    transition: none;
  }
}

.hero:not([data-ready]) .hero-image,
.hero:not([data-ready]) .species,
.hero:not([data-ready]) .hero-date,
.hero:not([data-ready]) .button-lime {
  visibility: hidden;
}

.noscript-note {
  grid-column: 1/-1;
  padding: 16px 24px;
  background: var(--lime);
  color: var(--ink);
}
