:root {
  --ink: #0b100d;
  --forest: #111a14;
  --forest-soft: #172219;
  --paper: #eee9df;
  --paper-deep: #ded7c9;
  --white: #fbfaf7;
  --sage: #a8b185;
  --gold: #c9a56a;
  --rust: #a75d42;
  --line-dark: rgba(15, 22, 17, .17);
  --line-light: rgba(255, 255, 255, .15);
  --wrap: min(1180px, calc(100% - 48px));
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
.wrap { width: var(--wrap); margin-inline: auto; }
.section { padding: 120px 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 1000;
  transform: translateY(-150%); padding: 10px 16px; background: var(--white);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 82px; padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  color: var(--white); border-bottom: 1px solid rgba(255,255,255,.18);
  transition: background .25s ease, height .25s ease, border-color .25s ease;
}
.site-header.scrolled { height: 70px; background: rgba(11,16,13,.94); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.09); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1; }
.wordmark-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif;
  font-style: italic; font-size: 20px;
}
.wordmark strong { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.wordmark small { display: block; margin-top: 6px; color: rgba(255,255,255,.62); font-size: 9px; letter-spacing: .09em; }
.main-nav { display: flex; gap: clamp(22px, 3vw, 42px); }
.main-nav a { position: relative; text-decoration: none; font-size: 13px; letter-spacing: .04em; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -9px; height: 1px; background: var(--gold); transition: right .2s ease; }
.main-nav a:hover::after, .main-nav a:focus-visible::after { right: 0; }
.menu-button { display: none; background: none; border: 0; color: inherit; padding: 10px; }
.menu-button > span:not(.sr-only) { display: block; width: 24px; height: 1px; margin: 5px; background: currentColor; transition: transform .2s, opacity .2s; }

.hero { position: relative; min-height: 790px; height: 100svh; color: var(--white); background: #172018; overflow: hidden; }
.hero-image { position: absolute; inset: 0; background: #263226 url("assets/black-mamba-hero.webp") center/cover no-repeat; transform: scale(1.015); animation: reveal-image 1.2s ease-out both; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,12,9,.93) 0%, rgba(7,12,9,.73) 38%, rgba(7,12,9,.17) 72%, rgba(7,12,9,.35) 100%), linear-gradient(0deg, rgba(7,12,9,.65), transparent 45%); }
.hero-content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: 78px; }
.eyebrow { margin: 0 0 22px; color: var(--sage); text-transform: uppercase; letter-spacing: .22em; font-size: 11px; font-weight: 700; }
.eyebrow::before { content: ""; display: inline-block; width: 34px; height: 1px; margin: 0 12px 3px 0; background: currentColor; }
.eyebrow.dark { color: #606b48; }
.hero h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; }
.hero h1 { margin: 0; max-width: 740px; font-size: clamp(72px, 10vw, 146px); line-height: .78; animation: rise .8s .12s ease-out both; }
.hero-lead { max-width: 565px; margin: 42px 0 0; color: rgba(255,255,255,.78); font-size: clamp(18px, 2vw, 22px); line-height: 1.55; animation: rise .8s .22s ease-out both; }
.hero-actions { display: flex; align-items: center; gap: 34px; margin-top: 40px; animation: rise .8s .3s ease-out both; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.button-primary { color: var(--ink); background: var(--sage); }
.button-primary:hover { background: #bcc49a; }
.text-link { text-decoration: none; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 5px; }
.text-link span { margin-left: 8px; }
.hero-index { position: absolute; z-index: 2; right: 32px; bottom: 35px; display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .12em; color: rgba(255,255,255,.55); }
.hero-index i { display: block; width: 70px; height: 1px; background: rgba(255,255,255,.25); }
.hero-index i::before { content: ""; display: block; width: 20%; height: 1px; background: var(--sage); }

.intro { display: grid; grid-template-columns: .9fr 1.1fr; gap: 10vw; align-items: start; }
h2 { margin: 0; font-size: clamp(46px, 6.2vw, 84px); line-height: .98; }
.intro-copy { padding-top: 35px; max-width: 620px; }
.lead { font-family: Georgia, serif; font-size: clamp(21px, 2.1vw, 28px); line-height: 1.45; }
.intro-copy > p:last-child { color: #4d554d; max-width: 560px; }

.facts { color: var(--white); background: var(--forest); }
.section-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 9vw; align-items: end; margin-bottom: 70px; }
.section-heading > p { margin: 0 0 8px; color: rgba(255,255,255,.6); max-width: 450px; }
.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-light); border-left: 1px solid var(--line-light); }
.fact-card { min-height: 330px; padding: 35px 28px; border-right: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); display: flex; flex-direction: column; }
.fact-number { color: var(--gold); font-family: Georgia, serif; font-size: clamp(34px, 3vw, 48px); letter-spacing: -.04em; }
.fact-card h3 { margin: auto 0 9px; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; }
.fact-card p { margin: 0; color: rgba(255,255,255,.57); font-size: 14px; line-height: 1.55; }

.habitat { background: var(--paper); }
.habitat-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 10vw; align-items: center; }
.habitat-copy .lead { margin-top: 34px; }
.habitat-list { list-style: none; padding: 0; margin: 48px 0 0; border-top: 1px solid var(--line-dark); }
.habitat-list li { display: flex; gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-size: 15px; }
.habitat-list span { color: #787b6b; font-size: 10px; }
.range-card { position: relative; min-height: 570px; overflow: hidden; color: var(--white); background: #273126; display: grid; place-items: center; }
.range-card::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.range-orbit { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.range-orbit-one { width: 440px; height: 440px; }
.range-orbit-two { width: 290px; height: 290px; }
.africa-shape {
  position: relative; width: 205px; height: 275px; background: var(--sage);
  clip-path: polygon(18% 5%, 55% 0%, 86% 17%, 96% 42%, 77% 60%, 67% 81%, 49% 100%, 39% 77%, 24% 62%, 5% 47%, 0 24%);
  filter: drop-shadow(0 16px 24px rgba(0,0,0,.2));
}
.africa-shape::after { content: ""; position: absolute; width: 60px; height: 95px; right: 27px; bottom: 60px; background: #d0b06f; border-radius: 55% 30% 55% 30%; transform: rotate(13deg); opacity: .8; }
.range-card p { position: absolute; z-index: 2; left: 40px; right: 40px; bottom: 34px; margin: 0; }
.range-card p strong, .range-card p span { display: block; }
.range-card p strong { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.range-card p span { margin-top: 6px; color: rgba(255,255,255,.55); font-size: 12px; }

.behaviour { color: var(--white); background: #0c120e; }
.section-heading.light h2 { color: var(--white); }
.myth-list { border-top: 1px solid var(--line-light); }
.myth-list details { border-bottom: 1px solid var(--line-light); }
.myth-list summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 50px 1fr 30px; gap: 18px; align-items: center; padding: 27px 0; }
.myth-list summary::-webkit-details-marker { display: none; }
.myth-list summary span { color: var(--sage); font-size: 11px; }
.myth-list summary strong { font-family: Georgia, serif; font-size: clamp(24px, 3vw, 38px); font-weight: 400; }
.myth-list summary i { position: relative; width: 20px; height: 20px; }
.myth-list summary i::before, .myth-list summary i::after { content: ""; position: absolute; top: 10px; width: 20px; height: 1px; background: var(--sage); transition: transform .2s; }
.myth-list summary i::after { transform: rotate(90deg); }
.myth-list details[open] summary i::after { transform: rotate(0); }
.myth-list details div { padding: 0 60px 28px 68px; }
.myth-list details p { margin: 0; max-width: 720px; color: rgba(255,255,255,.62); }

.safety { background: var(--paper-deep); }
.safety-title-row { display: grid; grid-template-columns: 1.3fr .7fr; gap: 7vw; align-items: end; }
.emergency-badge { margin: 0 0 7px; padding: 17px 20px; border: 1px solid rgba(167,93,66,.45); color: #763c2a; font-size: 13px; }
.emergency-badge span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 9px; border-radius: 50%; color: var(--white); background: var(--rust); font-weight: 800; }
.safety-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 8vw; margin-top: 75px; }
.safety-grid h3 { margin: 0 0 28px; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 42px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line-dark); }
.steps li:last-child { border-bottom: 1px solid var(--line-dark); }
.steps span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #8a8d7c; border-radius: 50%; font-size: 11px; }
.steps p { margin: 1px 0 0; color: #444b43; }
.steps strong { color: var(--ink); }
.dont-card { padding: 36px; color: var(--white); background: var(--rust); }
.dont-card ul { list-style: none; padding: 0; margin: 0; }
.dont-card li { position: relative; padding: 12px 0 12px 25px; border-top: 1px solid rgba(255,255,255,.22); }
.dont-card li::before { content: "×"; position: absolute; left: 0; color: #f1c2ae; }
.dont-card li:last-child { border-bottom: 1px solid rgba(255,255,255,.22); }
.dont-card p { margin: 28px 0 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.55; }

.sources { background: var(--white); }
.sources-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 10vw; }
.sources-grid > div:first-child > p:last-child { max-width: 420px; color: #596059; }
.source-links { border-top: 1px solid var(--line-dark); }
.source-links a { display: grid; grid-template-columns: 80px 1fr 24px; gap: 20px; align-items: center; padding: 23px 4px; border-bottom: 1px solid var(--line-dark); text-decoration: none; }
.source-links span { color: #69705e; font-size: 10px; letter-spacing: .14em; }
.source-links strong { font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.source-links i { font-style: normal; transition: transform .2s; }
.source-links a:hover i { transform: translate(3px, -3px); }

.site-footer { padding: 80px 0 24px; color: var(--white); background: var(--ink); }
.footer-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; padding-bottom: 65px; }
.wordmark-footer { margin-bottom: 24px; }
.footer-top > div > p { max-width: 480px; color: rgba(255,255,255,.52); }
.footer-top nav { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 40px; align-content: start; }
.footer-top nav a { padding-bottom: 10px; border-bottom: 1px solid var(--line-light); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding-top: 22px; border-top: 1px solid var(--line-light); color: rgba(255,255,255,.42); font-size: 11px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { margin-left: 20px; text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

.legal-page { min-height: 100vh; color: var(--ink); background: var(--paper); }
.legal-header { position: static; color: var(--white); background: var(--ink); }
.legal-main { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: 90px 0 130px; }
.legal-main h1 { margin: 0 0 40px; font: 400 clamp(48px, 7vw, 78px)/1 Georgia, serif; letter-spacing: -.04em; }
.legal-main h2 { margin: 45px 0 12px; font: 400 27px/1.2 Georgia, serif; letter-spacing: -.02em; }
.legal-note { padding: 20px; border-left: 3px solid var(--rust); background: rgba(167,93,66,.08); }
.back-link { display: inline-block; margin-top: 45px; font-weight: 700; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal-image { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1.015); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; } }

@media (max-width: 900px) {
  :root { --wrap: min(100% - 36px, 680px); }
  .section { padding: 88px 0; }
  .menu-button { display: block; position: relative; z-index: 2; }
  .menu-button[aria-expanded="true"] > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-button[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  .menu-button[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .main-nav { position: fixed; inset: 0; padding: 120px 30px 40px; background: rgba(11,16,13,.98); flex-direction: column; justify-content: center; gap: 0; visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s; }
  .main-nav.open { visibility: visible; opacity: 1; }
  .main-nav a { padding: 15px 0; border-bottom: 1px solid var(--line-light); font: 400 34px Georgia, serif; }
  .main-nav a::after { display: none; }
  .hero { min-height: 720px; }
  .hero-image { background-position: 62% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(7,12,9,.92), rgba(7,12,9,.5)), linear-gradient(0deg, rgba(7,12,9,.7), transparent 60%); }
  .hero h1 { font-size: clamp(65px, 16vw, 105px); }
  .hero-lead { max-width: 480px; }
  .hero-index { display: none; }
  .intro, .section-heading, .habitat-grid, .safety-title-row, .safety-grid, .sources-grid { grid-template-columns: 1fr; gap: 45px; }
  .intro-copy { padding-top: 0; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .fact-card { min-height: 260px; }
  .range-card { min-height: 520px; }
  .section-heading { align-items: start; }
  .section-heading > p { max-width: 560px; }
  .safety-grid { margin-top: 50px; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --wrap: calc(100% - 28px); }
  .site-header { height: 70px; padding: 0 14px; }
  .wordmark small { display: none; }
  .hero { min-height: 700px; }
  .hero-image { background-position: 68% center; }
  .hero-content { justify-content: flex-end; padding-bottom: 80px; }
  .hero h1 { font-size: clamp(58px, 19vw, 86px); }
  .hero-lead { margin-top: 28px; font-size: 17px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; margin-top: 30px; }
  h2 { font-size: 46px; }
  .fact-grid { grid-template-columns: 1fr; }
  .fact-card { min-height: 230px; }
  .range-card { min-height: 450px; }
  .range-orbit-one { width: 340px; height: 340px; }
  .range-orbit-two { width: 220px; height: 220px; }
  .africa-shape { width: 160px; height: 220px; }
  .range-card p { left: 30px; right: 30px; }
  .myth-list summary { grid-template-columns: 32px 1fr 24px; gap: 10px; }
  .myth-list summary strong { font-size: 25px; }
  .myth-list details div { padding-left: 42px; }
  .dont-card { padding: 28px 24px; }
  .source-links a { grid-template-columns: 56px 1fr 20px; gap: 10px; }
  .source-links strong { font-size: 17px; }
  .footer-top nav { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .footer-bottom a { margin: 0 18px 0 0; }
}
