/* =====================================================================
   AI for Ghana — styles.css
   Static, dependency-free. Mobile-first.
   Brand: Ghana red #CE1126 · gold #FCD116 · green #006B3F
          off-white #F8F5EF · hero black #0a0a0a
   ===================================================================== */

/* ----------------------------- Fonts ------------------------------- */
/* Self-hosted (latin woff2). font-display: swap avoids render-blocking. */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-900.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* --------------------------- Tokens -------------------------------- */
:root {
  --red:   #CE1126;
  --gold:  #FCD116;
  --green: #006B3F;
  --cream: #F8F5EF;
  --ink:   #0a0a0a;

  /* Derived / tuned for contrast.
     The site is dark end-to-end, so every text colour below is measured
     against #0a0a0a. Ghana green (2.2:1) and Ghana red (3.4:1) FAIL as text
     on black — they are used only as fills, bars and button backgrounds,
     never as small type. Gold and cream carry all the text. */
  --red-bright: #E8324A;   /* red lifted for large text on black (>3:1) */
  --green-deep: #00532F;
  --cream-dim:  #d9d3c6;   /* muted text on dark — ~12:1 */
  --ink-2:      #121110;   /* subtle lift, alternating sections */
  --surface:    rgba(255, 255, 255, 0.04);  /* card face on dark */
  --hairline:   rgba(255, 255, 255, 0.10);  /* card border on dark */

  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --radius: 14px;

  --circuit: url("circuit.svg");
}

/* --------------------------- Reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--cream-dim);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, blockquote, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Accessible focus ring */
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------- Shared bits --------------------------- */
.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);   /* gold, not red — red fails contrast on black */
  margin-bottom: 1.1rem;
}
.kicker-light { color: var(--gold); }

.section-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.9rem, 5.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--cream);
  max-width: 18ch;
}
.section-title-light { color: var(--cream); }

/* Buttons */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
.btn-lg { padding: 1.15rem 2rem; font-size: 1.1rem; }

.btn-primary {
  --btn-bg: var(--red);
  --btn-fg: #fff;                 /* white on red = ~4.9:1, AA */
}
.btn-primary:hover { --btn-bg: #b10e20; }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  border-color: rgba(248, 245, 239, 0.35);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Ghana tricolor rule with lodestar */
.flag-rule {
  display: flex;
  align-items: center;
  gap: 0;
  height: 8px;
  width: min(340px, 80%);
  margin-top: 2.5rem;
  border-radius: 999px;
  overflow: hidden;
}
.flag-rule span { display: block; height: 100%; flex: 1; }
.flag-red { background: var(--red); }
.flag-gold { background: var(--gold); position: relative; display: grid; place-items: center; }
.flag-green { background: var(--green); }
.flag-rule-star { width: 12px; height: 12px; fill: var(--ink); }

/* ============================== NAV ================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0.85rem var(--pad);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--cream);
  flex: none;
}

/* Logo lockup: red A, gold I, green bar, "for Ghana" beneath. */
.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.brand-ai {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1;
  padding-bottom: 3px;
  border-bottom: 3px solid var(--green);
}
.brand-a { color: var(--red); }
.brand-i { color: var(--gold); }
.brand-forghana {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--cream);
  margin-top: 4px;
}
/* If the official artwork is dropped in instead of the CSS lockup. */
.brand-img { height: 38px; width: auto; }
.nav-links {
  display: none;
  margin-left: auto;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--cream-dim);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta { margin-left: auto; flex: none; }

@media (min-width: 820px) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
}

/* ============================== HERO =============================== */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  padding: clamp(4.5rem, 12vh, 8rem) 0 clamp(4rem, 10vh, 7rem);
}
.hero::before { /* circuit texture, subtle */
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--circuit);
  background-size: 300px 300px;
  opacity: 0.9;
  pointer-events: none;
}
.hero::after { /* warm gold glow anchoring the eye */
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 640px;
  max-height: 640px;
  background: radial-gradient(circle, rgba(252, 209, 22, 0.16), transparent 62%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.15rem, 6.4vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 21ch; /* wraps to ~3 lines at desktop widths */
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--cream-dim);
  max-width: 46ch;
  margin-bottom: 2.25rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ============================= MISSION ============================= */
.mission {
  background: var(--ink-2);
  padding: clamp(4.5rem, 12vh, 8rem) 0;
}
.mission-inner { max-width: 900px; }
.mission-quote {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 5vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--cream);
  max-width: 20ch;
}
/* ========================== LIVE IMPACT ============================ */
/* Dark band, mono numbers in gold, gold also used as the hairline accent
   above each stat. Calm and credible — the numbers do the talking. */
.impact {
  position: relative;
  background: var(--ink);
  padding: clamp(4.5rem, 12vh, 7.5rem) 0;
  border-top: 1px solid var(--hairline);
  overflow: hidden;
}
.impact::before { /* circuit texture, same as the hero */
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--circuit);
  background-size: 320px 320px;
  opacity: 0.7; /* keep it texture, never noise */
  pointer-events: none;
}
.impact > .container { position: relative; z-index: 1; }

.impact-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cream);
  max-width: 20ch;
}
.impact-sub {
  font-family: var(--sans);
  font-size: 1.05rem;
  color: var(--cream-dim);
  max-width: 52ch;
  margin-top: 0.85rem;
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
}

/* 2-up on mobile, 5-across on desktop. */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.25rem 1.5rem;
}
@media (min-width: 1000px) {
  .impact-grid { grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
}

.impact-stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 1rem;
  border-top: 2px solid var(--gold); /* gold as accent tick, not a fill */
}

.impact-num {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  line-height: 1;
  color: var(--gold);  /* gold on black ~15:1; green would be 2.2:1 */
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
@media (min-width: 1000px) {
  .impact-num { font-size: clamp(2.4rem, 3.2vw, 3.1rem); }
}

.impact-label {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--cream);
  margin-top: 0.45rem;
}
/* Reserve two lines so the sub-lines stay on a common baseline when a
   longer label ("Now Running On Their Own") wraps. */
@media (min-width: 1000px) {
  .impact-label { min-height: 2.5em; }
}
.impact-sublabel {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--cream-dim);
}

.impact-updated {
  margin-top: 2.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}
.impact-updated[hidden] { display: none; }

/* Screen-reader-only: carries the settled number for assistive tech so the
   count-up animation never spams a live region. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =========================== HOW IT WORKS ========================= */
.how {
  background: var(--ink-2);
  padding: clamp(4.5rem, 12vh, 8rem) 0;
}
.how .section-title { margin-bottom: 3rem; }
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 780px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 2.25rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.step:hover {
  border-color: rgba(252, 209, 22, 0.4);
  background: rgba(255, 255, 255, 0.06);
}
.step::before { /* top accent bar cycling flag colors */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.step:nth-child(1)::before { background: var(--red); }
.step:nth-child(2)::before { background: var(--gold); }
.step:nth-child(3)::before { background: var(--green); }
.step-num {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}
.step-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin: 0.75rem 0 0.65rem;
}
.step-body {
  color: var(--cream-dim);
  font-size: 1rem;
}

/* Image placeholder */
.media-placeholder {
  margin-top: 3rem;
  display: grid;
  place-items: center;
  gap: 0.6rem;
  text-align: center;
  aspect-ratio: 16 / 7;
  padding: 2rem;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.03) 0 12px,
      transparent 12px 24px
    );
  color: var(--cream-dim);
}
.media-placeholder-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.media-placeholder-desc {
  font-size: 0.92rem;
  max-width: 42ch;
}

/* Real image, once a placeholder is swapped out (see README). */
.media-figure {
  margin-top: 3rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.media-figure figcaption {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--cream-dim);
  padding: 0.85rem 1rem;
  background: var(--surface);
}
.media-figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================== GET STARTED ========================== */
/* Dark like everything else, but lifted by a deep-green glow so it still
   reads as its own moment — Ghana green stays present without a flat block
   of colour that would break the theme. */
.get-started {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  padding: clamp(4.5rem, 12vh, 8rem) 0;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
}
.get-started::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -5%;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, rgba(0, 152, 89, 0.22), transparent 65%);
  pointer-events: none;
}
.get-started-inner { position: relative; z-index: 1; max-width: 720px; }
.get-started .kicker-light { color: var(--gold); }
.get-started-body {
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  color: var(--cream-dim);
  margin: 1.25rem 0 2.25rem;
  max-width: 48ch;
}
.get-started-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; }
.get-started-note {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--cream-dim);
}
.form-embed {
  margin-top: 2rem;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.form-embed iframe { display: block; width: 100%; border: 0; }

/* ============================= FOOTER ============================= */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(3.5rem, 9vh, 5.5rem) 0 3rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 1.75rem; }
.footer-signoff {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  line-height: 1.25;
  max-width: 22ch;
}
.footer-signoff strong { color: var(--gold); font-weight: 700; }
.footer-links { display: flex; gap: 1.75rem; }
.footer-links a {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  padding-bottom: 2px;
}
.footer-links a:hover { color: var(--gold); border-color: var(--gold); }
.footer-rule { margin: 0.5rem 0 0; }
.footer-copy {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: #8a8478;
}
