/* ==========================================================================
   DevSpark Africa — Design System
   Midnight Navy / Burnt Orange / Rich Gold / Emerald — Inter + JetBrains Mono
   ========================================================================== */

:root {
  /* Colors */
  --navy: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --navy-600: #475569;
  --orange: #EA580C;
  --orange-dark: #C2410C;
  --orange-soft: rgba(234, 88, 12, 0.10);
  --gold: #F59E0B;
  --gold-soft: rgba(245, 158, 11, 0.12);
  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --surface: #F8FAFC;
  --surface-warm: #FDF9F3;   /* Startup Hub cream */
  --white: #FFFFFF;
  --border: #E2E8F0;
  --row-hover: #F1F5F9;
  --text: #0F172A;
  --text-muted: #475569;
  --text-soft: #64748B;
  --text-inverse: #F8FAFC;
  --text-inverse-muted: #94A3B8;

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radius */
  --r-sm: 0.25rem;
  --r: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;

  /* Elevation */
  --shadow-low: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-high: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Layout */
  --container: 1280px;
  --gutter: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 64px;
}
@media (max-width: 1279px) { .container { padding: 0 32px; } }
@media (max-width: 767px)  { .container { padding: 0 16px; } }

section { padding: 96px 0; }
@media (max-width: 767px) { section { padding: 64px 0; } }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; }

.display-lg { font-size: 48px; line-height: 56px; font-weight: 800; }
.headline-md { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -0.01em; }
.headline-sm { font-size: 24px; line-height: 32px; font-weight: 600; }
.body-lg { font-size: 18px; line-height: 28px; font-weight: 400; }

@media (max-width: 767px) {
  .display-lg { font-size: 36px; line-height: 44px; }
  .headline-md { font-size: 26px; line-height: 34px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
}
.eyebrow .material-symbols-outlined { font-size: 16px; }
.eyebrow--orange { background: var(--orange-soft); color: var(--orange); }
.eyebrow--gold { background: var(--gold-soft); color: #92600A; }
.eyebrow--emerald { background: var(--emerald-soft); color: #047857; }
.eyebrow--inverse { background: rgba(255,255,255,0.08); color: var(--gold); border: 1px solid rgba(255,255,255,0.12); }

.accent-orange { color: var(--orange); }
.accent-gold { color: var(--gold); }
.accent-emerald { color: var(--emerald); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head p { color: var(--text-muted); font-size: 18px; line-height: 28px; margin-top: 16px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn .material-symbols-outlined { font-size: 20px; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); box-shadow: var(--shadow-low); }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-800); box-shadow: var(--shadow-low); }

.btn--outline { background: transparent; color: var(--navy); border: 2px solid var(--border); padding: 12px 26px; }
.btn--outline:hover { border-color: var(--navy); background: var(--row-hover); }

.btn--ghost-inverse { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.25); padding: 12px 26px; }
.btn--ghost-inverse:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.btn--sm { padding: 10px 20px; font-size: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--orange);
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow .material-symbols-outlined { font-size: 18px; transition: transform .2s ease; }
.link-arrow:hover .material-symbols-outlined { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 36px; height: 36px;
  border-radius: var(--r);
  background: var(--orange);
  display: grid;
  place-items: center;
  color: #fff;
}
.brand__mark .material-symbols-outlined { font-size: 22px; font-variation-settings: 'FILL' 1, 'wght' 500; }
.brand__mark--gold { background: var(--gold); color: var(--navy); }

.main-nav { display: flex; align-items: center; gap: 8px; }

.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--text-inverse-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--r);
  transition: color .2s ease, background-color .2s ease;
}
.nav-link:hover, .nav-item.open > .nav-link, .nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.nav-link[aria-current="page"] { font-weight: 700; }
.nav-link .material-symbols-outlined {
  font-size: 18px;
  transition: transform .2s ease;
}
.nav-item.open > .nav-link .material-symbols-outlined { transform: rotate(180deg); }
.nav-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Dropdown panels */
.dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  min-width: 300px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-high);
  padding: 8px;
  display: none;
  z-index: 60;
}
.dropdown::before { /* hover bridge so the pointer can travel to the panel */
  content: "";
  position: absolute;
  top: -18px; left: 0; right: 0;
  height: 18px;
}
.nav-item.open > .dropdown { display: block; }
@media (hover: hover) and (min-width: 1024px) {
  .nav-item:hover > .dropdown, .nav-item:focus-within > .dropdown { display: block; }
  .nav-item:hover > .nav-link { color: #fff; background: rgba(255,255,255,0.06); }
  .nav-item:hover > .nav-link .material-symbols-outlined { transform: rotate(180deg); }
}

.dropdown__section {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 10px 14px 6px;
}
.dropdown__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--text);
  transition: background-color .15s ease;
}
.dropdown__item:hover, .dropdown__item:focus-visible { background: var(--row-hover); }
.dropdown__item:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.dropdown__item .material-symbols-outlined {
  font-size: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}
.dropdown__title { font-size: 15px; font-weight: 600; line-height: 20px; }
.dropdown__desc { font-size: 13px; color: var(--text-soft); line-height: 18px; margin-top: 2px; }
.dropdown__divider { height: 1px; background: var(--border); margin: 8px 6px; }

.dropdown--wide { min-width: 340px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle .material-symbols-outlined { font-size: 28px; }
.nav-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Mobile: accordion nav ---------- */
@media (max-width: 1023px) {
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .main-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: none;
    padding: 8px 0 16px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .nav-item { position: static; }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 14px 24px;
    border-radius: 0;
    font-size: 16px;
  }
  .dropdown {
    position: static;
    min-width: 0;
    background: rgba(255,255,255,0.04);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 12px 12px;
  }
  .dropdown::before { display: none; }
  /* accordion is JS-only on mobile — no hover opening */
  .dropdown__item { color: var(--text-inverse); }
  .dropdown__item:hover { background: rgba(255,255,255,0.06); }
  .dropdown__desc { color: var(--text-inverse-muted); }
  .dropdown__section { color: var(--text-inverse-muted); }
  .dropdown__divider { background: rgba(255,255,255,0.10); }
  .main-nav > .btn { margin: 16px 24px 8px; }
}
@media (min-width: 1024px) { .main-nav .btn--mobile-only { display: none; } }

/* ---------- Hero (dark) ---------- */
.hero-dark {
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(234,88,12,0.15), transparent),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(245,158,11,0.08), transparent),
    var(--navy);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}
.hero-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent);
  pointer-events: none;
}
.hero-dark .container { position: relative; }
.hero-dark h1 { color: #fff; }
.hero-dark p.lede { color: var(--text-inverse-muted); font-size: 18px; line-height: 28px; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-low);
  border: 1px solid var(--border);
  padding: 32px;
}
.card--accent-top { border-top: 3px solid var(--gold); }
.card--accent-emerald { border-top: 3px solid var(--emerald); }
.card--accent-orange { border-top: 3px solid var(--orange); }

.icon-badge {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.icon-badge .material-symbols-outlined { font-size: 28px; }
.icon-badge--orange { background: var(--orange-soft); color: var(--orange); }
.icon-badge--navy { background: rgba(15,23,42,0.06); color: var(--navy); }
.icon-badge--gold { background: var(--gold-soft); color: #B45309; }
.icon-badge--emerald { background: var(--emerald-soft); color: #047857; }

.check-list { list-style: none; margin: 20px 0 24px; display: grid; gap: 10px; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}
.check-list .material-symbols-outlined { font-size: 20px; color: var(--emerald); }

/* ---------- Grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }
@media (max-width: 1023px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Stats band ---------- */
.stats-band { background: var(--navy); color: #fff; }
.stats-band .stat-value {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stats-band .stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-inverse-muted);
  margin-top: 8px;
}
.stats-band blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 24px;
  font-size: 20px;
  line-height: 32px;
  font-weight: 500;
  color: #E2E8F0;
  max-width: 680px;
}
.stats-band cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-inverse-muted);
}

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,23,42,0.10);
}
.form-note { font-size: 13px; color: var(--text-soft); }
.form-note a { color: var(--orange); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--text-inverse-muted);
  padding: 72px 0 32px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
@media (max-width: 1023px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px)  { .site-footer__grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #CBD5E1;
  margin-bottom: 20px;
}
.site-footer ul { list-style: none; display: grid; gap: 12px; }
.site-footer a { color: var(--text-inverse-muted); text-decoration: none; font-size: 15px; transition: color .2s ease; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { margin-bottom: 16px; }
.site-footer .footer-desc { font-size: 15px; line-height: 24px; max-width: 320px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 32px;
  font-size: 14px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--emerald);
}
.status-pill::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px var(--emerald-soft);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utilities ---------- */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.text-muted { color: var(--text-muted); }
.flex { display: flex; } .items-center { align-items: center; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
