/* ============================================================
   Stellar East Africa Community — Stylesheet
   Fonts: Plus Jakarta Sans (display) / Inter (body)
   Palette: Forest green #52B788, Amber #C97D3A, Near-black #0B0C0E
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Browser normalisation ──────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:         #0B0C0E;
  --bg-2:       #0F1012;
  --bg-3:       #131416;
  --surface:    #1A1B1E;
  --border:     rgba(255, 255, 255, 0.06);
  --border-hi:  rgba(255, 255, 255, 0.11);

  --green:      #2D6A4F;
  --green-lt:   #52B788;
  --green-dim:  #1B4332;
  --amber:      #C97D3A;
  --amber-lt:   #E09554;

  --text:       #EDEAE4;
  --text-dim:   #8A857D;
  --text-faint: #3E3C38;

  --serif:  'Plus Jakarta Sans', system-ui, sans-serif;
  --sans:   'Inter', system-ui, sans-serif;
  --nav-h:  66px;
  --max-w:  1120px;
  --radius: 10px;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 36px;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.65; transform: scale(1.07); }
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: 0.09s; }
.d2 { transition-delay: 0.18s; }
.d3 { transition-delay: 0.27s; }
.d4 { transition-delay: 0.36s; }

/* ── Shared section typography ──────────────────────────────── */
.tag {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-lt);
  margin-bottom: 16px;
}

.h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text);
}

.sub {
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 480px;
  margin-top: 14px;
  line-height: 1.75;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: 7px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.22s;
}

.btn--fill {
  background: var(--green-lt);
  color: #fff;
}
.btn--fill:hover {
  background: #65c99e;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(82, 183, 136, 0.22);
}

.btn--line {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.btn--line:hover {
  border-color: var(--green-lt);
  color: var(--green-lt);
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  will-change: background;
}
.nav.scrolled {
  background: rgba(11, 12, 14, 0.93);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav__brand { display: flex; align-items: center; }

.nav__word {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav__word em {
  font-style: normal;
  color: var(--green-lt);
  font-weight: 800;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links a {
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

.nav__pill {
  height: 34px;
  padding: 0 18px;
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  font-size: 0.82rem !important;
  color: var(--text) !important;
  transition: border-color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
}
.nav__pill:hover {
  border-color: var(--green-lt);
  background: rgba(82, 183, 136, 0.06);
}

/* Burger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: 0.25s;
}
.nav__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mob {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(11, 12, 14, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 99;
}
.mob.open { display: flex; }
.mob a {
  display: block;
  padding: 16px 36px;
  font-size: 0.95rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mob a:last-child { border-bottom: none; }
.mob a:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  overflow: hidden;
}

/* Atmosphere */
.hero__atm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__g1 {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 106, 79, 0.32) 0%, transparent 68%);
  top: -100px; right: -40px;
  filter: blur(80px);
  animation: breathe 12s ease-in-out infinite;
}
.hero__g2 {
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 125, 58, 0.15) 0%, transparent 70%);
  bottom: 80px; left: 8%;
  filter: blur(65px);
  animation: breathe 18s ease-in-out infinite reverse;
}
.hero__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.028;
}

/* Layout */
.hero__wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

/* Left: text */
.hero__left {
  animation: fade-up 0.7s ease both;
  text-align: left;
}

.hero__overline {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 24px;
}

.hero__h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 5.5vw, 4.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
  font-style: normal;
}

.hero__h1 .ea {
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.05em;
  text-decoration: underline;
  text-decoration-color: var(--green-lt);
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}

.hero__p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.72;
  max-width: 420px;
  margin: 0 0 36px 0;
}

.hero__btns {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

/* Right: canvas */
.hero__right {
  animation: fade-up 0.7s 0.14s ease both;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 440px;
}

.hero__canvas {
  display: block;
  width: 440px;
  height: 440px;
  max-width: 100%;
  background: transparent;
}

/* ══════════════════════════════════════════════════════════════
   WHAT WE DO (FOCUS)
══════════════════════════════════════════════════════════════ */
.focus {
  padding: 110px 0;
  background: var(--bg);
}
.focus__head { margin-bottom: 52px; }

.focus__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.focus__card {
  background: var(--bg-3);
  padding: 34px 26px;
  transition: background 0.25s;
  cursor: default;
}
.focus__card:hover { background: var(--surface); }

.focus__ico {
  width: 38px;
  height: 38px;
  margin-bottom: 20px;
  color: var(--green-lt);
}

.focus__ttl {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 11px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.focus__txt {
  font-size: 0.87rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.72;
}

/* ══════════════════════════════════════════════════════════════
   ABOUT (MANIFESTO)
══════════════════════════════════════════════════════════════ */
.about {
  padding: 100px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about__inner { display: flex; flex-direction: column; gap: 0; }

.about__statement {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text);
  max-width: 820px;
  margin-bottom: 40px;
}
.about__statement em {
  font-style: normal;
  color: var(--green-lt);
  font-weight: 800;
}

.about__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.about__note {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 480px;
}

/* ══════════════════════════════════════════════════════════════
   OUR REGION + MARQUEE
══════════════════════════════════════════════════════════════ */
.countries {
  padding: 110px 0 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.countries__head { margin-bottom: 52px; }

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 26s linear infinite;
}
.marquee__track:hover { animation-play-state: paused; }

.marquee__name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: -0.02em;
  padding: 0 36px;
  white-space: nowrap;
  cursor: default;
  transition: color 0.2s;
}
.marquee__name:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════════════
   JOIN
══════════════════════════════════════════════════════════════ */
.join {
  padding: 120px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.join__halo {
  position: absolute;
  width: 700px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 106, 79, 0.2) 0%, transparent 68%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(80px);
  pointer-events: none;
}

.join__in {
  position: relative;
  z-index: 1;
  text-align: center;
}

.join__h {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.08;
}
.join__h em {
  font-style: normal;
  color: var(--green-lt);
  font-weight: 800;
}

.join__p {
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 460px;
  margin: 0 auto 44px;
  line-height: 1.78;
}

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

.jch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text);
  transition: all 0.22s;
}
.jch svg { color: var(--green-lt); flex-shrink: 0; }
.jch:hover {
  border-color: var(--green-lt);
  background: rgba(82, 183, 136, 0.06);
  transform: translateY(-2px);
}

.jch-arr {
  color: var(--text-faint);
  transition: transform 0.2s;
}
.jch:hover .jch-arr { transform: translateX(3px); }

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 36px;
}

.footer__in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer__brand {
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.footer__brand em {
  font-style: normal;
  color: var(--green-lt);
  font-weight: 800;
}

.footer__note {
  font-size: 0.77rem;
  font-weight: 300;
  color: var(--text-faint);
  max-width: 480px;
  line-height: 1.65;
}

.footer__soc { display: flex; gap: 20px; }
.footer__soc a {
  color: var(--text-faint);
  transition: color 0.2s;
  display: flex;
}
.footer__soc a:hover { color: var(--green-lt); }

.footer__copy { font-size: 0.71rem; color: var(--text-faint); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero__wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero__right { display: none; }
  .hero__left { text-align: left; }
  .focus__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav { padding: 0 24px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .container { padding: 0 22px; }
  .focus__grid { grid-template-columns: 1fr; }
  .about, .focus, .join { padding: 80px 0; }
  .join__chs { flex-direction: column; align-items: center; }
  .jch { width: 100%; max-width: 260px; justify-content: center; }
  .marquee__name { font-size: 1.2rem; padding: 0 20px; }
}