:root{
  --bg:#f5f3ed;
  --surface:#ffffff;
  --ink:#1e2a25;
  --muted:#66736d;
  --line:#d8ddd8;
  --accent:#325b46;
  --accent-2:#e7eee9;
  --radius:18px;
  --shadow:0 10px 30px rgba(27,43,35,.08);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.5;
}
a{color:inherit}
img,video{max-width:100%;display:block}
.site-header{
  background:#111;
  color:white;
}
.site-header__image{
  width:100%;
  max-height:250px;
  object-fit:cover;
}
.topbar{
  max-width:1180px;
  margin:0 auto;
  padding:12px 20px;
  display:flex;
  gap:10px 18px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.brand{
  font-weight:800;
  letter-spacing:.04em;
  text-decoration:none;
}
.nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.nav a{
  color:#fff;
  text-decoration:none;
  padding:8px 10px;
  border-radius:999px;
  font-size:.92rem;
  opacity:.92;
}
.nav a:hover,.nav a:focus{background:rgba(255,255,255,.12);outline:none}
.wrap{
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
}
.hero{
  padding:42px 0 24px;
}
.eyebrow{
  margin:0 0 8px;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.78rem;
  font-weight:800;
  color:var(--accent);
}
h1{
  margin:0;
  font-size:clamp(2rem,6vw,4rem);
  line-height:1;
  letter-spacing:-.04em;
}
.hero p{
  max-width:760px;
  color:var(--muted);
  font-size:clamp(1rem,2vw,1.12rem);
  margin:18px 0 0;
}
.summary{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
}
.pill{
  background:var(--accent-2);
  color:var(--accent);
  border:1px solid #cfdad3;
  border-radius:999px;
  padding:7px 11px;
  font-size:.9rem;
  font-weight:700;
}
.section{
  padding:22px 0 42px;
}
.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}
.section-head h2{
  margin:0;
  font-size:clamp(1.35rem,3vw,2rem);
}
.section-head p{margin:0;color:var(--muted)}
.species-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.species-card{
  position:relative;
  min-height:300px;
  border-radius:var(--radius);
  overflow:hidden;
  background:#26342e;
  color:#fff;
  box-shadow:var(--shadow);
  text-decoration:none;
  isolation:isolate;
}
.species-card__media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:-2;
}
.species-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top,rgba(7,13,10,.86),rgba(7,13,10,.08) 66%);
  z-index:-1;
}
.species-card__fallback{
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,#536d5e,#253a30);
  z-index:-2;
}
.species-card__content{
  position:absolute;
  left:18px;right:18px;bottom:18px;
}
.species-card h3{
  margin:0;
  font-size:1.45rem;
}
.species-card p{
  margin:5px 0 0;
  color:rgba(255,255,255,.85);
  font-size:.92rem;
}
.species-card:hover,.species-card:focus{
  transform:translateY(-2px);
  outline:3px solid rgba(50,91,70,.22);
}
.toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:0 0 18px;
}
.toolbar input,.toolbar select{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:11px 13px;
  font:inherit;
  color:var(--ink);
}
.toolbar input{min-width:min(100%,320px);flex:1}
.media-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.media-card{
  border-radius:16px;
  overflow:hidden;
  background:var(--surface);
  border:1px solid var(--line);
  box-shadow:0 6px 18px rgba(27,43,35,.05);
}
.media-card__visual{
  aspect-ratio:4/3;
  background:#e5e8e5;
  overflow:hidden;
  position:relative;
}
.media-card__visual img,
.media-card__visual video{
  width:100%;
  height:100%;
  object-fit:cover;
}
.media-card__body{padding:13px 14px 15px}
.media-card__title{
  margin:0;
  font-size:1rem;
  line-height:1.25;
}
.media-card__meta{
  margin:7px 0 0;
  color:var(--muted);
  font-size:.88rem;
}
.media-card__notes{
  margin:8px 0 0;
  font-size:.9rem;
}
.badge{
  display:inline-block;
  margin-top:9px;
  padding:4px 8px;
  background:var(--accent-2);
  color:var(--accent);
  border-radius:999px;
  font-size:.76rem;
  font-weight:800;
}
.backlink{
  display:inline-flex;
  margin:10px 0 0;
  color:var(--accent);
  text-decoration:none;
  font-weight:750;
}
.empty{
  grid-column:1/-1;
  border:1px dashed #b9c2bd;
  border-radius:16px;
  padding:32px;
  color:var(--muted);
  text-align:center;
  background:rgba(255,255,255,.55);
}
footer{
  margin-top:36px;
  padding:28px 0 40px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:.9rem;
}
@media (max-width:900px){
  .species-grid,.media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:620px){
  .wrap{width:min(100% - 22px,1180px)}
  .topbar{padding:10px 11px}
  .nav{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}
  .nav a{white-space:nowrap}
  .hero{padding:28px 0 16px}
  .section{padding:16px 0 30px}
  .section-head{align-items:start;flex-direction:column;gap:6px}
  .species-grid{grid-template-columns:1fr;gap:13px}
  .species-card{min-height:235px}
  .media-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .media-card__visual{aspect-ratio:1/1}
  .media-card__body{padding:10px}
  .media-card__title{font-size:.92rem}
  .media-card__meta{font-size:.78rem}
  .media-card__notes{display:none}
  .toolbar{gap:7px}
  .toolbar input,.toolbar select{width:100%;min-width:0}
}
@media (max-width:390px){
  .media-grid{grid-template-columns:1fr}
  .media-card__visual{aspect-ratio:4/3}
}
.image-open{
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:none;
  cursor:zoom-in;
}

.image-open img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.94);
  padding:18px;
}

.lightbox.is-open{
  display:flex;
}

.lightbox__image{
  max-width:96vw;
  max-height:94vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:8px;
}

.lightbox__close{
  position:fixed;
  top:14px;
  right:16px;
  z-index:10000;
  width:48px;
  height:48px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:34px;
  line-height:1;
  cursor:pointer;
}

.lightbox__close:hover,
.lightbox__close:focus{
  background:rgba(255,255,255,.25);
  outline:none;
}

body.lightbox-open{
  overflow:hidden;
}
