/* ScaleLab Africa shared design system
   White canvas / charcoal ink / deep emerald accent. Premium, text-first, no decorative widgets. */

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

:root {
  /* Emerald (premium finance on white) */
  --primary: #0F6B4F;
  --primary-light: #15805E;
  --primary-active: #0B5440;
  --primary-btn: #0E5B45;
  --primary-bright: #2FA77C;
  --primary-glow: rgba(14,91,69,0.16);
  --on-primary: #FFFFFF;

  /* Ink: charcoal */
  --ink: #14150F;
  --ink-muted: #2A2B26;
  --ink-subtle: #3A3B35;
  --ink-tertiary: #53544C;

  /* Canvas: white */
  --canvas: #FFFFFF;
  --surface-1: #FFFFFF;
  --surface-2: #F6F6F3;
  --surface-3: #EFEFEB;
  --surface-elevated: #F9F9F6;

  /* Borders */
  --hairline: #D6D6D0;
  --hairline-strong: #B7B7B1;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15,18,10,0.08), 0 1px 2px rgba(15,18,10,0.06);
  --shadow-md: 0 4px 12px rgba(15,18,10,0.10), 0 1px 3px rgba(15,18,10,0.07);
  --shadow-lg: 0 8px 24px rgba(15,18,10,0.12);
  --shadow-accent: 0 4px 14px rgba(14,91,69,0.18);

  /* Typography */
  --font: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'JetBrains Mono', monospace;

  /* Layout */
  --max-w: 1120px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --section: 96px;
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 90px; }

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

h1, h2, h3, h4, .logo { text-wrap: balance; }
img { display: block; max-width: 100%; }

/* ─── Navigation ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
}
nav .inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 80px;
}
nav .logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
nav .logo img { height: 40px; width: auto; display: block; }
nav .logo-text {
  font-size: 19px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.3px;
}
nav .logo-text .accent { color: var(--primary); }
nav .logo-text .light { font-weight: 300; color: var(--ink-subtle); }
nav .links { display: flex; align-items: center; gap: 26px; }
nav .links a {
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  color: var(--ink); transition: color 0.2s;
}
nav .links a:hover { color: var(--primary-light); }
nav .links a.active { color: var(--primary); font-weight: 600; }
nav .links a.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  padding: 9px 22px; border-radius: var(--radius-pill);
  background: var(--primary-btn); color: var(--on-primary);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
nav .links a.nav-cta:hover {
  background: var(--primary-active);
  box-shadow: 0 0 25px rgba(14,91,69,0.15);
  transform: translateY(-1px);
}
.menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--ink); cursor: pointer; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700;
  padding: 14px 34px; border-radius: var(--radius-pill);
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-sm { padding: 9px 20px; font-size: 13.5px; }
.btn-primary { background: var(--primary-btn); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-active); box-shadow: var(--shadow-accent); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--hairline-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 20px rgba(14,91,69,0.08); }

/* ─── Sections ─── */
section { padding: var(--section) 24px; }
section .inner { max-width: var(--max-w); margin: 0 auto; }
.band-elevated { background: var(--surface-2); box-shadow: inset 0 1px 0 var(--hairline), inset 0 -1px 0 var(--hairline); }

/* What We Do band: light, matching the site's open white/charcoal system */
#what {
  background: var(--surface-2);
  border-top: 1px solid var(--hairline);
}
#what .sec-eyebrow { color: var(--primary); }
#what .sec-title { color: var(--ink); }
#what .essay p { color: var(--ink-subtle); }
#what .essay strong { color: var(--primary); }
.center { text-align: center; }
.center .sec-sub { margin-left: auto; margin-right: auto; }

.sec-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.sec-title {
  font-size: clamp(28px, 3.5vw, 42px); font-weight: 600;
  color: var(--ink); line-height: 1.12; letter-spacing: -1.0px;
  margin-bottom: 16px;
}
.sec-sub { font-size: 16px; color: var(--ink-subtle); max-width: 600px; line-height: 1.65; }

/* Essay-style prose block */
.essay p {
  font-size: 17px; line-height: 1.85; margin-bottom: 22px;
  color: var(--ink); text-align: left;
}
.essay p:last-child { margin-bottom: 0; }
.essay strong { color: var(--primary); font-weight: 600; }

/* Hero */
.hero {
  position: relative;
  padding: 150px 24px 80px;
  background:
    linear-gradient(to bottom,
      rgba(8,12,16,0.30) 0%,
      rgba(8,12,16,0.18) 35%,
      rgba(8,12,16,0.55) 78%,
      rgba(10,14,18,0.82) 100%),
    url('/assets/home-hero.jpg') center center / cover no-repeat,
    var(--canvas);
  min-height: 88dvh;
  display: flex; align-items: center;
}
.hero .inner { max-width: var(--max-w); margin: 0 auto; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 16px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.14); color: #EAF7F1;
  border: 1px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  margin-bottom: 30px;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 700; line-height: 1.05; letter-spacing: -2px;
  color: #FFFFFF; text-shadow: 0 2px 24px rgba(0,0,0,0.45);
  margin-bottom: 22px; max-width: 1100px;
}
.hero-highlight {
  color: #FFFFFF;
}
.hero p { font-size: 18px; color: rgba(255,255,255,0.92); line-height: 1.7; max-width: 760px; margin: 0 auto 40px; text-shadow: 0 1px 12px rgba(0,0,0,0.4); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.hero-actions .btn-outline { background: rgba(255,255,255,0.10); color: #FFFFFF; border-color: rgba(255,255,255,0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.hero-actions .btn-outline:hover { border-color: #FFFFFF; color: #FFFFFF; background: rgba(255,255,255,0.18); box-shadow: none; }
.hero-metrics {
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.22);
  display: flex; gap: 60px; flex-wrap: wrap; justify-content: center;
}
.hero-metrics .metric { text-align: center; }
.hero-metrics .metric .val { font-size: 26px; font-weight: 800; color: #FFFFFF; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hero-metrics .metric .val .accent { color: #6FD3A9; }
.hero-metrics .metric .lbl { font-size: 11px; color: rgba(255,255,255,0.72); letter-spacing: 0.5px; margin-top: 2px; text-transform: uppercase; }

/* Cards / grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card {
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 10px; text-align: left;
}
.card h3 { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.card p { font-size: 14px; color: var(--ink-subtle); line-height: 1.6; flex: 1; }
.card .link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--primary);
  text-decoration: none; margin-top: auto;
}
.card .link:hover { color: var(--primary-active); text-decoration: underline; }

/* Product card (with visual) */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s, border-color 0.25s;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--primary-bright); box-shadow: var(--shadow-md); }
.product-visual {
  aspect-ratio: 16 / 9; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-tertiary); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.5px;
  overflow: hidden;
}
.product-visual img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.credibility-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.proof-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s, border-color 0.25s;
}
a.proof-card:hover { transform: translateY(-3px); border-color: var(--primary-bright); box-shadow: var(--shadow-md); }
.proof-visual { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.proof-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.proof-body {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  padding: 22px 22px 24px; flex: 1;
}
.proof-body .link { margin-top: auto; padding-top: 8px; }
.proof-stat {
  font-size: clamp(24px, 2.6vw, 32px); line-height: 1.05; font-weight: 800;
  color: var(--primary); font-family: var(--font); letter-spacing: -0.01em;
}
.proof-cat {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--primary);
}
.proof-label {
  font-size: 15px; color: var(--ink-secondary); line-height: 1.55;
}
.product-cover {
  aspect-ratio: 16 / 9; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background:
    radial-gradient(120% 120% at 15% 0%, rgba(15,107,79,0.18) 0%, transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(15,107,79,0.10) 0%, transparent 55%),
    linear-gradient(150deg, #0f6b4f 0%, #0a4a36 60%, #07382a 100%);
  border-bottom: 1px solid var(--hairline);
  color: #ffffff; overflow: hidden;
  text-align: center; padding: 16px;
}
.product-cover .cover-tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: #A9D3BF; font-weight: 500;
}
.product-cover .cover-title {
  font-family: var(--font); font-size: 24px; font-weight: 700;
  letter-spacing: -0.01em; color: #ffffff; line-height: 1.15;
}
.product-cover .cover-rule { width: 42px; height: 2px; background: #A9D3BF; border-radius: 2px; }
.product-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body .p-cat { font-size: 10.5px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--primary); }
.product-body h3 { font-size: 17px; font-weight: 700; color: var(--ink); }
.product-body p { font-size: 13.5px; color: var(--ink-subtle); line-height: 1.55; flex: 1; }
.product-body .p-price { font-size: 15px; font-weight: 700; color: var(--ink); font-family: var(--font-mono); }
.product-body .link { font-size: 13.5px; font-weight: 600; color: var(--primary); text-decoration: none; }
.product-body .link:hover { text-decoration: underline; }

/* Funding opportunities */
.funding-note { font-size: 13px; color: var(--ink-tertiary); max-width: 600px; margin: 16px auto 0; line-height: 1.6; }
.funding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.funding-card {
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 12px; text-align: left;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s, border-color 0.25s;
}
.funding-card:hover { transform: translateY(-3px); border-color: var(--primary-bright); box-shadow: var(--shadow-md); }
.funding-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.f-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--primary); background: rgba(14,91,69,0.08);
  border: 1px solid rgba(14,91,69,0.16); padding: 3px 10px; border-radius: var(--radius-pill);
}
.f-tag.alt { color: var(--ink-tertiary); background: var(--surface-3); border-color: var(--hairline-strong); }
.funding-card h3 { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.funding-card p { font-size: 13.5px; color: var(--ink-subtle); line-height: 1.6; flex: 1; }
.f-meta { font-size: 12px; color: var(--ink-tertiary); font-family: var(--font-mono); }
.f-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--primary);
  text-decoration: none; margin-top: auto;
}
.f-link:hover { color: var(--primary-active); text-decoration: underline; }

/* Steps / how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 28px 24px; }
.step-n { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--primary); letter-spacing: 1px; margin-bottom: 12px; }
.step h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--ink-subtle); line-height: 1.55; }

/* Founder */
.founder-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: center; }
.founder-photo-wrap { aspect-ratio: 4 / 5; background: var(--surface-3); border: 1px solid var(--hairline); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--ink-tertiary); font-family: var(--font-mono); font-size: 13px; }

/* Actions */
.actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

/* ─── Footer ─── */
footer { padding: 56px 24px 32px; background: var(--surface-1); border-top: 1px solid var(--hairline); }
footer .inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .f-name { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 10px; display:flex; align-items:center; gap:8px; }
.footer-brand .f-name img { height: 20px; width:auto; }
.footer-brand .f-name .accent { color: var(--primary); }
.footer-brand p { font-size: 13px; color: var(--ink-subtle); line-height: 1.6; max-width: 280px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--ink-subtle); text-decoration: none; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--hairline); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink-tertiary); }
.footer-bottom .links { display: flex; gap: 20px; }
.footer-bottom .links a { color: var(--ink-tertiary); text-decoration: none; }
.footer-bottom .links a:hover { color: var(--primary); }

/* Page header (sub-pages) */
.page-hero {
  padding: 150px 24px 56px; text-align: center; background: var(--canvas);
}
.page-hero h1 { font-size: clamp(32px, 4vw, 52px); font-weight: 700; letter-spacing: -1.5px; color: var(--ink); margin-bottom: 14px; }
.page-hero p { font-size: 17px; color: var(--ink-subtle); max-width: 620px; margin: 0 auto; line-height: 1.65; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav-cta, .product-card, .card { transition: none; }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .grid-3, .product-grid, .steps, .funding-grid, .credibility-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .founder-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  nav .links { display: none; }
  .menu-toggle { display: block; }
  .links.open {
    display: flex; flex-direction: column; position: fixed;
    top: 80px; left: 0; right: 0; gap: 6px;
    background: rgba(255,255,255,0.98); padding: 20px 24px 28px;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--hairline);
    align-items: flex-start;
  }
  .links.open a { padding: 10px 0; font-size: 16px; width: 100%; }
  .links.open a.nav-cta { justify-content: center; margin-top: 10px; width: 100%; }
  .hero h1 { font-size: 32px; }
  .hero-metrics { gap: 24px; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .product-grid, .steps, .funding-grid, .credibility-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  :root { --section: 72px; }
}

