@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --color-bg: #f5f0ea;
  --color-bg-alt: #ebe4da;
  --color-text: #2c2416;
  --color-text-muted: #6b5d4d;
  --color-accent: #8b6914;
  --color-accent-dark: #6d5210;
  --color-accent-light: #c4a44a;
  --color-border: #d4cabb;
  --color-white: #fffdf8;
  --color-card-shadow: rgba(44, 36, 22, 0.08);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --max-width: 1140px;
  --nav-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  background: rgba(255, 253, 248, 0.92);
}
nav .nav-inner {
  width: 100%; max-width: var(--max-width); padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
nav .logo {
  font-family: var(--font-display); font-weight: 900; font-size: 1.35rem;
  color: var(--color-text); text-decoration: none; letter-spacing: -0.02em;
}
nav .logo span { color: var(--color-accent); }
nav ul { list-style: none; display: flex; gap: 1.6rem; }
nav ul a {
  font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted);
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.07em;
  transition: color 0.2s; position: relative;
}
nav ul a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--color-accent); transition: width 0.25s ease;
}
nav ul a:hover { color: var(--color-accent); }
nav ul a:hover::after, nav ul a.active::after { width: 100%; }
nav ul a.active { color: var(--color-accent); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--color-text);
  border-radius: 2px; transition: 0.25s;
}

/* ---- HERO ---- */
.hero {
  position: relative; min-height: 520px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  background: linear-gradient(135deg, #3a3225 0%, #5c4a2f 40%, #2c3a2e 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; padding: 4rem 2rem; }
.hero h1 {
  font-family: var(--font-display); font-size: 3.5rem; font-weight: 900;
  color: var(--color-white); line-height: 1.15; margin-bottom: 1rem; letter-spacing: -0.02em;
}
.hero p {
  font-size: 1.15rem; font-weight: 300; color: rgba(255,253,248,0.75);
  max-width: 560px; margin: 0 auto; line-height: 1.8;
}
.hero .tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-accent-light);
  margin-bottom: 1.2rem; border: 1px solid rgba(196,164,74,0.35);
  padding: 0.35em 1em; border-radius: 2px;
}

/* ---- SPECIES PAGE HERO ---- */
.species-hero { min-height: 420px; background-size: cover; background-position: center 30%; }
.species-hero .hero-content {
  max-width: var(--max-width); text-align: left; width: 100%;
  padding-left: 2rem; padding-right: 2rem;
}
.species-hero h1 { font-size: 3rem; }
.species-hero .scientific-name {
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem;
  color: rgba(255,253,248,0.6); margin-top: 0.25rem;
}

/* ---- MAIN CONTENT ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.content-section { padding: 4rem 0; }
.section-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 700;
  line-height: 1.25; margin-bottom: 1rem; color: var(--color-text);
}

/* ---- SPECIES GRID ---- */
.species-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-top: 2.5rem; }
.species-grid.three-up { grid-template-columns: repeat(3, 1fr); }
.species-card {
  background: var(--color-white); border-radius: 6px; overflow: hidden;
  box-shadow: 0 2px 20px var(--color-card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none; color: inherit; display: block;
}
.species-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(44, 36, 22, 0.14);
}
.species-card .card-image { width: 100%; height: 260px; object-fit: cover; display: block; }
.species-card .card-body { padding: 1.5rem; }
.species-card h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin-bottom: 0.35rem; }
.species-card .latin { font-style: italic; color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.species-card p { font-size: 0.95rem; color: var(--color-text-muted); line-height: 1.65; }
.species-card .read-more {
  display: inline-block; margin-top: 1rem; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-accent);
}

/* ---- ARTICLE BODY ---- */
.article-body { max-width: 740px; margin: 0 auto; padding: 3rem 2rem 4rem; }
.article-body h2 {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
  margin-top: 2.5rem; margin-bottom: 1rem;
}
.article-body p { margin-bottom: 1.25rem; font-size: 1.05rem; line-height: 1.85; }
.article-body .lead {
  font-size: 1.2rem; font-weight: 300; color: var(--color-text-muted);
  border-left: 3px solid var(--color-accent); padding-left: 1.25rem; margin-bottom: 2rem;
}

/* ---- FACT BOX ---- */
.fact-box {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: 6px; padding: 2rem; margin: 2.5rem 0;
}
.fact-box h3 {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  margin-bottom: 1.25rem; color: var(--color-accent-dark);
}
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.fact-item { padding: 0.5rem 0; }
.fact-item .label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 0.2rem;
}
.fact-item .value { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

/* ---- CONSERVATION BADGES ---- */
.conservation-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4em 1em; border-radius: 3px; font-size: 0.82rem;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.conservation-badge.lc { background: #e8f5e9; color: #2e7d32; }
.conservation-badge.vu { background: #fff3e0; color: #e65100; }

/* ---- IMAGE PLACEHOLDER ---- */
.image-placeholder {
  background: var(--color-bg-alt); border: 1px dashed var(--color-border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 0.5rem; color: var(--color-text-muted);
  font-size: 0.88rem; min-height: 300px; margin: 2rem 0;
}
.image-placeholder svg { opacity: 0.4; }

/* ---- BREADCRUMB ---- */
.breadcrumb { padding: 1rem 0; font-size: 0.85rem; }
.breadcrumb a { color: var(--color-accent); text-decoration: none; font-weight: 600; }
.breadcrumb span { color: var(--color-text-muted); }

/* ---- FOOTER ---- */
footer {
  background: var(--color-text); color: rgba(255,253,248,0.55);
  padding: 3rem 2rem; text-align: center; font-size: 0.88rem; margin-top: 2rem;
}
footer a { color: var(--color-accent-light); text-decoration: none; }
footer .footer-inner { max-width: var(--max-width); margin: 0 auto; }
footer .footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
footer .footer-links a {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,253,248,0.45); transition: color 0.2s;
}
footer .footer-links a:hover { color: var(--color-accent-light); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .species-grid.three-up { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2.4rem; }
  .species-hero h1 { font-size: 2.2rem; }
  .species-grid, .species-grid.three-up { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr; }
  nav ul { display: none; }
  .hamburger { display: flex; }
  nav ul.open {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--color-white); border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 2rem; gap: 1.2rem;
  }
}
