/* ============================================================
   OPTIMIZED EARTH: YEAR 2500  ·  Stylesheet
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --gold:        #c9a54c;
  --gold-dim:    rgba(201,165,76,0.12);
  --gold-mid:    rgba(201,165,76,0.25);
  --gold-light:  #e8d5a3;
  --blue:        #4a9fd4;
  --blue-dim:    rgba(74,159,212,0.1);
  --green:       #3d9b72;
  --green-dim:   rgba(61,155,114,0.1);
  --violet:      #9b72cf;
  --bg:          #020810;
  --surface:     #07111e;
  --surface-2:   #0c1a2e;
  --border:      rgba(255,255,255,0.07);
  --border-g:    rgba(201,165,76,0.22);
  --text:        #dce6f0;
  --text-sec:    #8fa3bc;
  --text-muted:  #465e78;
  --nav-h:       68px;
  --serif:       'Cormorant Garamond', Georgia, serif;
  --sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w:       1160px;
  --sec-pad:     120px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Utilities --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }

.label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.sec-title {
  font-family: var(--serif);
  font-size: clamp(2rem,3.8vw,2.9rem);
  font-weight: 300;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 52px;
  max-width: 680px;
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .85s ease, transform .85s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }
.d5 { transition-delay: .5s; }

/* ============================================================  NAV  ============================================================ */

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  background: rgba(2,8,16,0.75);
  border-bottom: 1px solid var(--border);
  transition: background .4s;
}
nav.scrolled { background: rgba(2,8,16,0.94); }

.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 40px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-sec); text-decoration: none; transition: color .2s;
}
.nav-logo span { color: var(--gold); }
.nav-logo:hover { color: var(--text); }

.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a {
  font-size: 12px; font-weight: 400; letter-spacing: .06em;
  color: var(--text-sec); text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--gold-light); }

.nav-pdf {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--border-g); padding: 7px 16px; border-radius: 2px;
  text-decoration: none; background: var(--gold-dim); transition: background .2s, color .2s;
}
.nav-pdf:hover { background: var(--gold-mid); color: var(--gold-light); }

.nav-menu { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-menu span { display: block; width: 22px; height: 1.5px; background: var(--text-sec); transition: transform .3s, opacity .3s; }

/* ============================================================  HERO  ============================================================ */

#hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: calc(var(--nav-h) + 14vh);
  text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 55%, #0a1f40 0%, #040c1e 40%, var(--bg) 75%);
}

#starfield {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}


@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 800px; padding: 0 40px;
  animation: heroFadeIn 2s ease .2s both;
}

.hero-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}

.hero-content h1 {
  font-family: var(--serif);
  font-size: clamp(3.5rem,9vw,7rem);
  font-weight: 300; line-height: 1.02;
  color: #fff; letter-spacing: -.01em; margin-bottom: 10px;
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.1rem,2.5vw,1.6rem);
  font-style: italic; font-weight: 300;
  color: var(--gold-light); margin-bottom: 30px; opacity: .9;
}

.hero-tagline {
  font-size: 14.5px; font-weight: 300;
  color: rgba(200,220,240,0.78);
  max-width: 560px; margin: 0 auto 48px; line-height: 1.88;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-gold {
  display: inline-block; padding: 13px 34px;
  background: var(--gold-dim); border: 1px solid var(--border-g); border-radius: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-light); text-decoration: none; transition: background .3s, color .3s;
}
.btn-gold:hover { background: var(--gold-mid); color: #fff; }

.btn-ghost {
  display: inline-block; padding: 13px 34px;
  background: transparent; border: 1px solid var(--border); border-radius: 2px;
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-sec); text-decoration: none; transition: border-color .3s, color .3s;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

.hero-scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  animation: scrollFloat 2.6s ease-in-out infinite;
}
@keyframes scrollFloat {
  0%,100% { transform: translateX(-50%) translateY(0); opacity:.45; }
  50%      { transform: translateX(-50%) translateY(8px); opacity:1; }
}
.scroll-line { width: 1px; height: 36px; background: linear-gradient(to bottom, var(--text-muted), transparent); }

/* ============================================================  VISION  ============================================================ */

#vision { padding: var(--sec-pad) 0; border-bottom: 1px solid var(--border); }

.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }

.vision-text h2 {
  font-family: var(--serif); font-size: clamp(2rem,3.8vw,3rem);
  font-weight: 300; line-height: 1.15; color: var(--text); margin-bottom: 26px;
}
.vision-text p { font-size: 15px; color: var(--text-sec); line-height: 1.88; margin-bottom: 18px; }
.vision-text em { color: var(--gold-light); font-style: italic; }

.vision-quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.08rem,2vw,1.35rem);
  font-weight: 300; font-style: italic;
  color: var(--gold-light); line-height: 1.72;
  border-left: 2px solid var(--gold);
  padding-left: 28px; opacity: .88;
}

.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; background: var(--border); border: 1px solid var(--border); margin-top: 48px; }

.stat-mini { background: var(--surface); padding: 26px 22px; }
.stat-mini-val { font-family: var(--serif); font-size: 2rem; font-weight: 300; color: var(--gold); display: block; margin-bottom: 4px; }
.stat-mini-lbl { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

/* ============================================================  PILLARS  ============================================================ */

#pillars { padding: var(--sec-pad) 0; border-bottom: 1px solid var(--border); }

.pillars-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 2px; background: var(--border); border: 1px solid var(--border);
}

.pillar {
  background: var(--surface); padding: 44px 36px;
  border-top: 2px solid transparent;
  transition: background .3s;
}
.pillar:hover { background: var(--surface-2); }
.p-gold   { border-top-color: var(--gold); }
.p-blue   { border-top-color: var(--blue); }
.p-green  { border-top-color: var(--green); }
.p-violet { border-top-color: var(--violet); }

.pillar-icon { display: block; margin-bottom: 22px; }
.pillar-num { font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.pillar h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; color: var(--text); margin-bottom: 13px; }
.pillar p  { font-size: 13.5px; color: var(--text-sec); line-height: 1.78; }

/* ============================================================  TIMELINE  ============================================================ */

#timeline { padding: var(--sec-pad) 0; border-bottom: 1px solid var(--border); }

.phases-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 2px; background: var(--border); border: 1px solid var(--border);
  margin-bottom: 72px;
}

.phase {
  background: var(--surface); padding: 38px 28px;
  border-top: 2px solid; transition: background .3s;
}
.phase:hover { background: var(--surface-2); }
.ph-gold   { border-top-color: var(--gold); }
.ph-blue   { border-top-color: var(--blue); }
.ph-green  { border-top-color: var(--green); }
.ph-violet { border-top-color: var(--violet); }

.phase-yr { font-family: var(--serif); font-size: 1.45rem; font-weight: 300; color: var(--text); margin-bottom: 5px; }
.phase-nm { font-size: 9px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 18px; }
.phase h3 { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; color: var(--text); margin-bottom: 11px; line-height: 1.35; }
.phase p  { font-size: 12.5px; color: var(--text-sec); line-height: 1.75; margin-bottom: 16px; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 9px; font-weight: 500; letter-spacing: .1em;
  padding: 3px 8px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); color: var(--text-muted); text-transform: uppercase;
}

.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--border); border: 1px solid var(--border); }
.chart-wrap { background: var(--surface); padding: 32px 28px; }
.chart-wrap h4 { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; color: var(--text); margin-bottom: 6px; }
.chart-wrap .chart-sub { font-size: 11.5px; color: var(--text-muted); margin-bottom: 24px; letter-spacing: .04em; }
.chart-wrap svg { display: block; width: 100%; overflow: visible; }

/* ============================================================  PATHWAYS  ============================================================ */

#pathways { padding: var(--sec-pad) 0; border-bottom: 1px solid var(--border); }

.pathways-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.pathways-head .sec-title { margin-bottom: 0; }
.pathways-desc { font-size: 14px; color: var(--text-sec); line-height: 1.82; max-width: 420px; flex-shrink: 0; }

.pathways-diagram { background: var(--surface); border: 1px solid var(--border); padding: 40px; overflow-x: auto; }
.pathways-diagram svg { display: block; min-width: 700px; }

/* ============================================================  AFRICA  ============================================================ */

#africa { padding: var(--sec-pad) 0; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--bg) 0%, #050e1e 50%, var(--bg) 100%); }

.africa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

.africa-text h2 { font-family: var(--serif); font-size: clamp(1.9rem,3.5vw,2.7rem); font-weight: 300; line-height: 1.2; margin-bottom: 22px; }
.africa-text p { font-size: 14.5px; color: var(--text-sec); line-height: 1.87; margin-bottom: 15px; }

.africa-list { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.africa-list li { display: flex; gap: 12px; font-size: 13.5px; color: var(--text-sec); align-items: flex-start; }
.africa-list li::before { content: '→'; color: var(--gold); flex-shrink: 0; }

.africa-map-wrap { display: flex; align-items: center; justify-content: center; }
.africa-map-wrap svg { max-width: 100%; display: block; }

/* ============================================================  EVIDENCE (Convergence) ============================================================ */

#evidence { padding: var(--sec-pad) 0; border-bottom: 1px solid var(--border); }

.evidence-intro { max-width: 640px; margin-bottom: 52px; }
.evidence-intro p { font-size: 15px; color: var(--text-sec); line-height: 1.85; }

.convergence-wrap { display: flex; align-items: center; justify-content: center; }
.convergence-wrap svg { max-width: 660px; width: 100%; display: block; }

/* ============================================================  METRICS  ============================================================ */

#metrics { padding: var(--sec-pad) 0; border-bottom: 1px solid var(--border); }

.metrics-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; background: var(--border); border: 1px solid var(--border); }

.metric { background: var(--surface); padding: 42px 28px; transition: background .3s; border-top: 1px solid transparent; }
.metric:hover { background: var(--surface-2); border-top-color: var(--border-g); }
.metric-val { font-family: var(--serif); font-size: clamp(1.9rem,3vw,2.6rem); font-weight: 300; color: var(--gold); display: block; margin-bottom: 8px; }
.metric-lbl { font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 11px; }
.metric p   { font-size: 12.5px; color: var(--text-sec); line-height: 1.7; }

/* ============================================================  GROUND (Skyline) ============================================================ */

#ground {
  position: relative; overflow: hidden;
  padding: var(--sec-pad) 0 0;
  background: linear-gradient(180deg, var(--bg) 0%, #060f20 60%, #030810 100%);
}

.ground-inner { position: relative; z-index: 2; padding-bottom: 240px; }

.ground-inner blockquote {
  font-family: var(--serif);
  font-size: clamp(1.3rem,2.8vw,2rem);
  font-weight: 300; font-style: italic;
  color: var(--gold-light); max-width: 600px; line-height: 1.58; margin-bottom: 22px;
}
.ground-inner cite { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); font-style: normal; }

.skyline-svg-wrap { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; }
.skyline-svg-wrap svg { width: 100%; display: block; height: 220px; }

/* ============================================================  CLOSING  ============================================================ */

#closing { padding: var(--sec-pad) 0; text-align: center; border-bottom: 1px solid var(--border); }

.closing-inner { max-width: 660px; margin: 0 auto; }
.closing-inner h2 { font-family: var(--serif); font-size: clamp(1.9rem,3.8vw,2.9rem); font-weight: 300; color: var(--text); margin-bottom: 28px; line-height: 1.22; }
.closing-inner p { font-size: 15px; color: var(--text-sec); line-height: 1.88; margin-bottom: 16px; }
.closing-cta { margin-top: 44px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================  FOOTER  ============================================================ */

footer { padding: 44px 0; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.footer-logo { font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }
.footer-logo span { color: var(--gold); }
.footer-links { list-style: none; display: flex; gap: 26px; }
.footer-links a { font-size: 11px; color: var(--text-muted); text-decoration: none; letter-spacing: .05em; transition: color .2s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { font-size: 11px; color: var(--text-muted); letter-spacing: .04em; }

/* ============================================================  RESPONSIVE  ============================================================ */

@media (max-width: 960px) {
  :root { --sec-pad: 80px; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; background: rgba(2,8,16,0.97); padding: 28px 40px; border-bottom: 1px solid var(--border); gap: 20px; }
  .nav-menu  { display: flex; }
  .nav-pdf   { display: none; }
  .vision-grid    { grid-template-columns: 1fr; gap: 44px; }
  .stat-row       { grid-template-columns: 1fr 1fr; }
  .pillars-grid   { grid-template-columns: 1fr 1fr; }
  .phases-grid    { grid-template-columns: 1fr 1fr; }
  .charts-row     { grid-template-columns: 1fr; }
  .pathways-head  { flex-direction: column; align-items: flex-start; }
  .africa-grid    { grid-template-columns: 1fr; gap: 40px; }
  .metrics-grid   { grid-template-columns: 1fr 1fr; }
  .footer-inner   { flex-direction: column; text-align: center; }
  .footer-links   { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 580px) {
  :root { --sec-pad: 64px; }
  .container     { padding: 0 20px; }
  .pillars-grid  { grid-template-columns: 1fr; }
  .phases-grid   { grid-template-columns: 1fr; }
  .metrics-grid  { grid-template-columns: 1fr; }
  .stat-row      { grid-template-columns: 1fr; }
  .hero-btns     { flex-direction: column; align-items: center; }
}
