@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --canvas:        #f7f7f4;
  --canvas-soft:   #fafaf7;
  --surface-card:  #ffffff;
  --surface-strong:#e6e5e0;
  --primary:       #f54e00;
  --primary-active:#d04200;
  --ink:           #26251e;
  --body:          #5a5852;
  --body-strong:   #26251e;
  --muted:         #807d72;
  --muted-soft:    #a09c92;
  --on-primary:    #ffffff;
  --hairline:      #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong:#cfcdc4;
  --success:       #1f8a65;
  --error:         #cf2d56;
  --radius-xs:     4px;
  --radius-sm:     6px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-xl:     16px;
  --radius-pill:   9999px;
  --sp-xxs:        4px;
  --sp-xs:         8px;
  --sp-sm:         12px;
  --sp-base:       16px;
  --sp-md:         20px;
  --sp-lg:         24px;
  --sp-xl:         32px;
  --sp-xxl:        48px;
  --sp-section:    80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--canvas);
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

/* ─── HEADER / NAV ─── */
.site-header {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  height: 64px;
  gap: var(--sp-xl);
}

.site-logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  margin-left: auto;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-xs);
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ─── HERO ─── */
.hero {
  padding: var(--sp-section) 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xxl);
  align-items: center;
}

.hero-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-strong);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--sp-md);
}

.hero h1 {
  font-size: 56px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--ink);
  margin-bottom: var(--sp-lg);
}

.hero-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  max-width: 480px;
  margin-bottom: var(--sp-xxl);
}

.hero-meta {
  font-size: 13px;
  color: var(--muted);
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.hero-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ─── SECTIONS ─── */
.section {
  padding: var(--sp-section) 0;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-md);
}

.section-title {
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.72px;
  color: var(--ink);
  margin-bottom: var(--sp-base);
}

.section-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  max-width: 640px;
  margin-bottom: var(--sp-xxl);
}

/* ─── ARTICLE CARDS ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

.article-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s;
}

.article-card:hover { border-color: var(--hairline-strong); }

.article-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-card-body {
  padding: var(--sp-lg);
}

.article-card-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-sm);
}

.article-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: var(--sp-sm);
}

.article-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  margin-bottom: var(--sp-base);
}

.article-card-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
}

.article-card-link:hover { color: var(--primary); border-color: var(--primary); }

/* ─── INFO BAND ─── */
.info-band {
  background: var(--surface-card);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: var(--sp-section) 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xxl);
  align-items: start;
}

.info-text h2 {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.325px;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: var(--sp-base);
}

.info-text p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: var(--sp-base);
}

.info-text p:last-child { margin-bottom: 0; }

.info-facts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-base);
}

.fact-item {
  display: flex;
  gap: var(--sp-base);
  padding: var(--sp-base);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.fact-icon {
  width: 40px;
  height: 40px;
  background: var(--surface-strong);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.fact-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.fact-text span {
  font-size: 13px;
  color: var(--body);
}

/* ─── SPECIES TABLE ─── */
.species-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  text-align: left;
  padding: var(--sp-sm) var(--sp-base);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline-strong);
  background: var(--canvas-soft);
}

tbody td {
  padding: var(--sp-sm) var(--sp-base);
  border-bottom: 1px solid var(--hairline);
  color: var(--body);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--canvas-soft); }

td strong { color: var(--ink); font-weight: 600; }

/* ─── ARTICLE PAGE ─── */
.article-header {
  padding: var(--sp-section) 0 var(--sp-xxl);
  border-bottom: 1px solid var(--hairline);
}

.article-header .breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--sp-base);
}

.article-header .breadcrumb a { color: var(--muted); }
.article-header .breadcrumb a:hover { color: var(--ink); }

.article-header h1 {
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: var(--sp-lg);
  max-width: 800px;
}

.article-header .article-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.article-body {
  padding: var(--sp-section) 0;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-xxl);
  align-items: start;
}

.article-content h2 {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin: var(--sp-xxl) 0 var(--sp-base);
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: var(--sp-xl) 0 var(--sp-sm);
}

.article-content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: var(--sp-base);
}

.article-content ul,
.article-content ol {
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-base);
}

.article-content li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: var(--sp-xs);
}

.article-content strong { color: var(--ink); font-weight: 600; }

.article-image-block {
  margin: var(--sp-xl) 0;
}

.article-image-block img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
}

.article-image-block figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--sp-xs);
}

.article-highlight {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  margin: var(--sp-xl) 0;
}

.article-highlight p {
  margin: 0;
  font-size: 16px;
  color: var(--body-strong);
}

.article-sources {
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  margin-top: var(--sp-xxl);
}

.article-sources h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-base);
}

.article-sources ul {
  padding-left: 0;
  list-style: none;
}

.article-sources li {
  font-size: 13px;
  color: var(--body);
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--hairline);
}

.article-sources li:last-child { border-bottom: none; }
.article-sources a { color: var(--body); text-decoration: underline; }
.article-sources a:hover { color: var(--ink); }

.article-updated {
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--sp-xxl);
}

/* ─── SIDEBAR ─── */
.article-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-base);
}

.sidebar-card h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-base);
}

.sidebar-card ul {
  list-style: none;
  padding: 0;
}

.sidebar-card li {
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--hairline);
}

.sidebar-card li:last-child { border-bottom: none; }

.sidebar-card a {
  font-size: 14px;
  color: var(--body);
}

.sidebar-card a:hover { color: var(--ink); }

.sidebar-spec {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--sp-xs) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}

.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--muted); }
.spec-value { color: var(--ink); font-weight: 500; }

/* ─── FORM ─── */
.contact-form-wrap {
  max-width: 640px;
}

.form-group {
  margin-bottom: var(--sp-lg);
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--sp-xs);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  height: 44px;
}

.form-group textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--ink);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: var(--error);
}

.form-error {
  font-size: 13px;
  color: var(--error);
  margin-top: 4px;
  display: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  height: 44px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.form-notice {
  display: none;
  padding: var(--sp-base);
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--body-strong);
  margin-top: var(--sp-base);
}

/* ─── COOKIE BANNER ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--canvas);
  padding: var(--sp-base) var(--sp-xl);
  z-index: 999;
  display: none;
}

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--canvas-soft);
}

.cookie-text a { color: #a09c92; text-decoration: underline; }

.cookie-actions {
  display: flex;
  gap: var(--sp-sm);
}

.cookie-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: opacity 0.15s;
}

.cookie-btn-accept {
  background: var(--canvas);
  color: var(--ink);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--canvas-soft);
  border-color: rgba(255,255,255,0.3);
}

.cookie-btn:hover { opacity: 0.8; }

/* ─── PAGE HEADER (about/privacy/terms) ─── */
.page-header {
  padding: var(--sp-section) 0 var(--sp-xxl);
  border-bottom: 1px solid var(--hairline);
}

.page-header h1 {
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: var(--sp-base);
}

.page-header p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  max-width: 600px;
}

.page-content {
  padding: var(--sp-section) 0;
  max-width: 800px;
}

.page-content h2 {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin: var(--sp-xxl) 0 var(--sp-base);
}

.page-content h2:first-child { margin-top: 0; }

.page-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: var(--sp-xl) 0 var(--sp-sm);
}

.page-content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: var(--sp-base);
}

.page-content ul {
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-base);
}

.page-content li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: var(--sp-xs);
}

.page-content strong { color: var(--ink); }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: var(--sp-xxl) 0 var(--sp-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-xxl);
  margin-bottom: var(--sp-xxl);
}

.footer-brand {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-base);
}

.footer-col p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--body);
}

.footer-heading {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-base);
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: var(--sp-sm);
}

.footer-col a {
  font-size: 14px;
  color: var(--body);
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--hairline);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--sp-xs);
}

.footer-bottom a { color: var(--muted); text-decoration: underline; }
.footer-disclaimer { font-style: italic; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hero h1 { font-size: 44px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--sp-base); }
  .hero { padding: var(--sp-xxl) 0; }
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .hero h1 { font-size: 36px; letter-spacing: -0.5px; }
  .hero-image { order: -1; }
  .section { padding: var(--sp-xxl) 0; }
  .section-title { font-size: 28px; }
  .cards-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 32px; }
  .page-header h1 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
  .site-nav { display: none; flex-direction: column; gap: 0; position: absolute; top: 64px; left: 0; right: 0; background: var(--canvas); border-bottom: 1px solid var(--hairline); padding: var(--sp-base); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: var(--sp-sm) 0; border-bottom: 1px solid var(--hairline-soft); }
  .site-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; gap: var(--sp-base); }
}
