/* ==========================================================================
   Trade Africa — Stylesheet v2
   Direction: a trade ledger / export-manifest aesthetic — documentary,
   precise, tabular — built from the client's fixed brand colors (forest
   green + gold), not a generic SaaS template.
   Mobile-first. No frameworks. No render-blocking assets.
   ========================================================================== */

:root {
  --bg-dark: #0C3D28;
  --bg-dark-deep: #082A1B;
  --bg-dark-2: #0F4A31;
  --gold: #C99A2E;
  --gold-bright: #E7C368;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --bg-light: #FAF9F6;
  --muted-on-light: #555555;
  --muted-on-dark: #C8C4BC;

  --rule-on-dark: rgba(201,154,46,0.24);
  --rule-on-dark-faint: rgba(201,154,46,0.14);
  --rule-on-light: rgba(12,61,40,0.15);
  --rule-on-light-faint: rgba(12,61,40,0.09);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-w: 1180px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.55em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.3rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.visually-hidden {
  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: absolute; left: 1rem; top: -3rem;
  background: var(--gold); color: var(--ink);
  padding: 0.6em 1em; border-radius: var(--radius); z-index: 200;
  font-weight: 600; transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
main { display: block; }
section { padding: 3.5rem 0; }
@media (min-width: 768px) { section { padding: 5.5rem 0; } }

.section-light { background: var(--bg-light); color: var(--ink); }
.section-dark { background: var(--bg-dark); color: var(--white); }
.section-dark .muted { color: var(--muted-on-dark); }
.section-light .muted { color: var(--muted-on-light); }

/* -------- Mono / ledger-style labels -------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* A rule divider carrying a mono label — used between sections instead of
   a decorative gradient. The rule itself is the structure. */
.ledger-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2.5rem;
}
.ledger-rule .rl-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.ledger-rule .rl-line { flex: 1; height: 1px; background: var(--rule-on-light); }
.section-dark .ledger-rule .rl-line { background: var(--rule-on-dark); }

/* -------- Seal mark (signature element) --------
   A small circular emblem — two concentric gold arcs around a center dot —
   echoing the arc beneath the "A" in the client's real wordmark. Used as a
   recurring mark across the header, hero, and section anchors. */
.seal { flex-shrink: 0; }
.seal circle.ring { fill: none; stroke: var(--gold); }
.seal circle.dot { fill: var(--gold); }

/* -------- Header -------- */
.site-header {
  background: var(--bg-dark);
  color: var(--white);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--rule-on-dark);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.6rem; }
.logo-img { display: block; height: 34px; width: auto; }
.footer-brand .logo-img { height: 30px; }
.logo-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: -0.005em;
}
.logo-word .logo-mark { color: var(--gold); }

.main-nav { display: none; align-items: center; gap: 2.1rem; }
.main-nav a {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  padding: 0.4em 0;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-gold { background: var(--gold); color: #241a04; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-outline-dark { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-outline-dark:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline-light { background: transparent; border-color: rgba(12,61,40,0.35); color: var(--ink); }
.btn-outline-light:hover { border-color: var(--bg-dark); }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 1em 2em; font-size: 0.85rem; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: transparent;
  border: 1px solid var(--rule-on-dark); border-radius: var(--radius); color: var(--white);
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

.mobile-nav { display: none; background: var(--bg-dark-deep); border-bottom: 1px solid var(--rule-on-dark); }
.mobile-nav.open { display: block; }
.mobile-nav .wrap { display: flex; flex-direction: column; padding: 1rem 1.25rem 1.5rem; height: auto; }
.mobile-nav a {
  color: var(--white); font-family: var(--font-mono); font-size: 0.85rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.8em 0; border-bottom: 1px solid var(--rule-on-dark-faint);
}
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav .btn { margin-top: 1rem; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* -------- Hero -------- */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--white);
  overflow: hidden;
  padding: 3.5rem 0 3.5rem;
}
@media (min-width: 900px) { .hero { padding: 5rem 0; } }
.hero-motif { position: absolute; inset: 0; z-index: 0; opacity: 0.5; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }

.hero-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; } }

.hero-content { max-width: 560px; }

.hero-graphic { width: 100%; }
.hero-graphic img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.hero h1 { margin-bottom: 0.5em; }
.hero .subhead { font-size: 1.08rem; color: var(--muted-on-dark); max-width: 480px; margin-bottom: 2em; line-height: 1.65; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* The "manifest card" — a documentary ledger panel replacing the generic
   floating-illustration hero graphic. Real, informative content (the
   stat this org exists to explain), styled like an export register entry. */
.manifest-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--rule-on-dark);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  backdrop-filter: blur(6px);
}
.manifest-card .mc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-on-dark);
  padding-bottom: 0.9rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule-on-dark);
}
.mc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.65rem 0; border-bottom: 1px solid var(--rule-on-dark-faint);
  font-size: 0.92rem;
}
.mc-row:last-child { border-bottom: none; }
.mc-row .mc-label { color: var(--muted-on-dark); }
.mc-row .mc-value { font-family: var(--font-mono); font-weight: 500; color: var(--white); }
.mc-row .mc-value.gold { color: var(--gold-bright); }

.page-hero {
  background: var(--bg-dark); color: var(--white);
  padding: 3rem 0 2.6rem; position: relative; overflow: hidden;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .lede { color: var(--muted-on-dark); max-width: 620px; font-size: 1.03rem; }

.breadcrumb {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.4em;
  padding: 0; margin: 0 0 1.1rem;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.03em;
  color: var(--muted-on-dark);
}
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 0.5em; opacity: 0.5; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-on-dark); }
.breadcrumb a:hover { color: var(--gold); }

/* -------- Cards / Grids -------- */
.grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--rule-on-light);
  padding: 1.9rem 1.8rem 1.7rem;
  display: flex; flex-direction: column; gap: 0.6rem; height: 100%;
}
.card::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 16px; height: 16px;
  border-top: 2px solid var(--gold); border-left: 2px solid var(--gold);
}
.card-icon {
  width: 38px; height: 38px; border: 1px solid var(--rule-on-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); margin-bottom: 0.5rem;
}
.card h3 { margin-bottom: 0.15em; font-size: 1.15rem; }
.card p { color: var(--muted-on-light); flex-grow: 1; }
.card-link {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  color: var(--bg-dark); border-bottom: 1px solid var(--gold);
  align-self: flex-start; padding-bottom: 2px;
}
.card-link:hover { color: var(--gold); }

/* -------- Guide hub: numbered register, not an icon-card grid --------
   The content genuinely is a 10-part ordered curriculum, so a ledger-style
   index (like a table of contents / customs register) is structurally
   honest, not decorative numbering. */
.register { border-top: 1px solid var(--rule-on-light); }
.register-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule-on-light);
  transition: padding-left 0.15s ease, border-color 0.15s ease;
}
.register-row:hover { padding-left: 0.6rem; border-color: var(--gold); }
.register-num {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--gold);
}
.register-body h3 { margin: 0 0 0.2em; font-size: 1.05rem; }
.register-body p { margin: 0; color: var(--muted-on-light); font-size: 0.9rem; }
.register-arrow { color: var(--gold); font-family: var(--font-mono); font-size: 0.85rem; white-space: nowrap; }
.register-link { display: block; text-decoration: none; }

.learn-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .learn-grid { grid-template-columns: repeat(3, 1fr); } }
.learn-item {
  border: 1px solid var(--rule-on-dark);
  padding: 1.3rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
}
.learn-item .n { color: var(--gold); display: block; font-size: 0.72rem; margin-bottom: 0.6em; letter-spacing: 0.05em; }

/* -------- Proof block -------- */
.proof-block {
  border-left: 2px solid var(--gold);
  padding: 0.2rem 0 0.2rem 1.5rem;
  max-width: 780px;
}
.proof-block p {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink);
}

/* -------- Workshop teaser -------- */
.teaser {
  background: var(--white); border: 1px solid var(--rule-on-light);
  padding: 1.9rem 2rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;
}
@media (min-width: 768px) { .teaser { flex-direction: row; align-items: center; justify-content: space-between; } }

/* -------- Final CTA -------- */
.cta-banner { background: var(--bg-dark-deep); color: var(--white); text-align: center; }
.cta-banner .wrap { max-width: 620px; }
.cta-banner p.muted { margin-bottom: 1.6rem; }

/* -------- Footer -------- */
.site-footer {
  background: var(--bg-dark-deep); color: var(--muted-on-dark);
  border-top: 1px solid var(--rule-on-dark); padding: 3rem 0 2rem; font-size: 0.9rem;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-bottom: 2rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: 0.7rem; }
.footer-tagline { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.03em; max-width: 300px; }
.footer-col h4 {
  font-family: var(--font-mono); color: var(--gold); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 1rem; font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.65em; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--rule-on-dark); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.78rem;
}

/* -------- Tabs -------- */
.tabs { margin-top: 1.5rem; }
.tab-list { display: flex; gap: 0; border-bottom: 1px solid var(--rule-on-light); margin-bottom: 1.75rem; flex-wrap: wrap; }
.tab-btn {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  padding: 0.8em 0; margin-right: 1.75rem;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--muted-on-light); cursor: pointer;
}
.tab-btn[aria-selected="true"] { color: var(--bg-dark); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* -------- Content typography (guide pages) -------- */
.prose { counter-reset: section; }
.prose h2 { margin-top: 1.8em; display: flex; align-items: baseline; gap: 0.55em; }
.prose h2::before {
  counter-increment: section;
  content: counter(section, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.65em; font-weight: 500;
  color: var(--gold); flex-shrink: 0;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.3em; }
.prose p, .prose ul, .prose ol { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: 0.93rem; }
.prose th, .prose td { border-bottom: 1px solid var(--rule-on-light); padding: 0.75em 0.9em; text-align: left; }
.prose th {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 500; color: var(--gold);
  border-bottom: 1px solid var(--bg-dark);
}
.prose td:last-child { font-family: var(--font-mono); font-size: 0.88rem; }

.callout {
  position: relative;
  background: var(--bg-light);
  border: 1px solid var(--rule-on-light);
  border-left: 2px solid var(--gold);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.callout::before {
  content: "NOTE";
  display: block;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.09em;
  color: var(--gold); margin-bottom: 0.6em;
}
.callout p:first-child { margin-top: 0; }
.callout strong { color: var(--bg-dark); }

.next-link { margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid var(--rule-on-light); display: flex; justify-content: flex-end; }
.next-link a {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  color: var(--bg-dark); border: 1px solid var(--rule-on-light);
  padding: 0.8em 1.3em; display: inline-flex; align-items: center; gap: 0.5em;
}
.next-link a:hover { border-color: var(--gold); color: var(--gold); }

.in-body-cta {
  background: var(--bg-dark); color: var(--white);
  padding: 1.5rem 1.7rem; margin: 2rem 0;
  display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start;
}
@media (min-width: 640px) { .in-body-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
.in-body-cta p { margin: 0; max-width: 480px; }

.related-links {
  margin: 2rem 0; padding: 1.4rem 1.6rem;
  background: var(--white); border: 1px solid var(--rule-on-light);
}
.related-links h4 {
  margin-bottom: 0.8em; font-family: var(--font-mono); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); font-weight: 500;
}
.related-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5em; }
.related-links a { font-weight: 500; color: var(--bg-dark); border-bottom: 1px solid var(--gold); padding-bottom: 1px; }
.related-links a:hover { color: var(--gold); }

.faq-item { border-bottom: 1px solid var(--rule-on-light); padding: 1.5rem 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item h3 { margin-bottom: 0.5em; font-size: 1.1rem; }
.faq-item p { color: var(--muted-on-light); }

.guide-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 960px) { .guide-layout { grid-template-columns: 2.4fr 1fr; } }
.guide-toc { align-self: start; border: 1px solid var(--rule-on-light); padding: 1.4rem 1.5rem; }
.guide-toc h4 {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted-on-light); margin-bottom: 0.9em; font-weight: 500;
}
.guide-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.guide-toc li { counter-increment: toc; margin-bottom: 0.6em; font-size: 0.9rem; }
.guide-toc li::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--font-mono); color: var(--gold); font-weight: 500; }
.guide-toc a { font-weight: 500; }
.guide-toc a[aria-current="page"] { color: var(--gold); }
.guide-toc a:hover { color: var(--gold); }

.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 1rem; max-width: 420px; }
.contact-list li { display: flex; align-items: center; gap: 0.9rem; background: var(--white); border: 1px solid var(--rule-on-light); padding: 1rem 1.2rem; }
.contact-list .ico { color: var(--gold); flex-shrink: 0; }
.contact-list a { font-weight: 500; color: var(--bg-dark); }
.contact-list a:hover { color: var(--gold); }

.status-badge {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); border: 1px solid var(--rule-on-dark);
  padding: 0.4em 0.9em; font-size: 0.78rem; letter-spacing: 0.03em;
  color: var(--gold-bright); margin-bottom: 1rem; text-transform: uppercase;
}
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-bright); }

.holding-box { background: var(--white); border: 1px dashed var(--rule-on-light); padding: 1.75rem; color: var(--muted-on-light); }

/* -------- Scroll reveal — restrained, one purpose: sections settle into
   place once, no looping/ambient motion -------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
