/* ==========================================================================
   Afrigender Analytics Limited — website stylesheet
   Identity taken from the 2026 company brochure:
   navy #17244b · gold #c08a2e · teal #2c7a6b · page tint #f5f6f8
   Fonts are self-hosted (no Google Fonts, no third-party requests).
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: "Serif4"; src: url("fonts/serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Serif4"; src: url("fonts/serif-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Serif4"; src: url("fonts/serif-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url("fonts/mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url("fonts/mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  /* Brochure palette */
  --navy:        #17244b;
  --navy-soft:   #46506f;
  --navy-muted:  #5c6586;
  --gold:        #c08a2e;   /* rules, and text ON navy only */
  --gold-ink:    #8a5f16;   /* gold-family text on light surfaces */
  --teal:        #2c7a6b;
  --teal-ink:    #256557;

  /* Surfaces */
  --tint:        #f5f6f8;
  --white:       #ffffff;
  --rule:        #e2e5ed;
  --rule-strong: #d3d8e4;

  /* Roles */
  --surface:        var(--tint);
  --surface-raised: var(--white);
  --ink:            var(--navy);
  --ink-secondary:  var(--navy-soft);
  --ink-muted:      var(--navy-muted);
  --accent:         var(--teal-ink);
  --accent-deep:    var(--navy);

  /* Type */
  --serif: "Serif4", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  "PlexMono", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.84rem, 0.82rem + 0.10vw, 0.90rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.10rem);
  --step-1:  clamp(1.18rem, 1.10rem + 0.40vw, 1.40rem);
  --step-2:  clamp(1.55rem, 1.35rem + 0.95vw, 2.15rem);
  --step-3:  clamp(2.00rem, 1.60rem + 1.90vw, 3.20rem);
  --step-4:  clamp(2.45rem, 1.75rem + 3.30vw, 4.40rem);

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface:        #101a33;
    --surface-raised: #17244b;
    --rule:           #2a3660;
    --rule-strong:    #3a4675;
    --ink:            #ffffff;
    --ink-secondary:  #c2c9dd;
    --ink-muted:      #9aa3bd;
    --gold-ink:       #d6a24a;
    --accent:         #6fbcab;
    --accent-deep:    #9ad3c5;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 80ch; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .75rem 1rem; }
.skip:focus { left: 0; }

/* ---------- Brochure rule: heavy bar + gold/teal split hairline ---------- */
.rule { margin: 0 0 2rem; }
.rule::before, .rule::after { content: ""; display: block; }
.rule::before { height: 3px; background: var(--ink); }
.rule::after {
  height: 2px; margin-top: 2px;
  background: linear-gradient(90deg, var(--gold) 0 52%, var(--teal) 52% 100%);
}
.band .rule::before { background: #fff; }

/* ---------- Eyebrow: mono, numbered, brochure-style ---------- */
.eyebrow {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-ink); margin: 0 0 1rem;
}
.band .eyebrow { color: var(--gold); }
.eyebrow .sep { opacity: .55; padding: 0 .4em; }

/* ---------- Header ---------- */
.site-head { background: var(--navy); border-bottom: 2px solid var(--gold); }
.site-head__inner { display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__mark { flex: none; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.06rem;
  letter-spacing: -.01em; line-height: 1.1; color: #fff; }
.brand__name span { display: block; font-family: var(--mono); font-weight: 400;
  font-size: .64rem; letter-spacing: .2em; color: var(--gold); margin-top: .25rem; }

.nav { display: flex; align-items: center; gap: clamp(.7rem, 1.8vw, 1.5rem); }
.nav a { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: #b9c0d4; text-decoration: none;
  padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.35); }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
@media (max-width: 860px) {
  .site-head__inner { flex-direction: column; align-items: flex-start; gap: .5rem; padding-block: .9rem; }
  .nav { flex-wrap: wrap; gap: .85rem 1.1rem; }
}

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.1;
  letter-spacing: -.018em; margin: 0 0 .55em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -.008em; }
h4 { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-muted); margin: 0 0 .8rem; }
p { margin: 0 0 1.15em; max-width: var(--measure); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
.lede { font-family: var(--serif); font-size: var(--step-1); line-height: 1.45;
  color: var(--ink-secondary); max-width: 54ch; }
.muted { color: var(--ink-muted); }
.small { font-size: var(--step--1); }
strong { font-weight: 600; color: var(--ink); }

section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section + section { border-top: 1px solid var(--rule); }

/* ---------- Navy bands (cover, CTA, footer) ---------- */
.band { background: var(--navy); color: #fff; border-top: 0; }
.band h1, .band h2, .band h3, .band strong { color: #fff; }
.band p { color: #c2c9dd; }
.band .lede { color: #d7dbe8; }
.band a { color: var(--gold); }
.band a:hover { color: #e3b872; }
.band + section { border-top: 0; }

/* ---------- Cover / hero ---------- */
.cover { padding-block: clamp(3.5rem, 10vw, 7.5rem); }
.cover h1 { font-size: var(--step-4); letter-spacing: -.03em; max-width: 16ch; margin-bottom: .35em; }
.cover__place { font-family: var(--mono); font-size: .78rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 3rem; }
.cover__claim { font-family: var(--serif); font-style: italic; font-size: var(--step-2);
  line-height: 1.32; color: #fff; max-width: 24ch; margin: 2rem 0 0; }
.cover__lines { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: #9aa3bd; line-height: 2; margin-top: 3rem; }
.cover__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.3rem; font-family: var(--mono); font-size: .74rem;
  font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease; }
.btn--gold { background: var(--gold); color: #17244b; }
.btn--gold:hover { background: #d6a24a; color: #17244b; }
.btn--outline { border-color: rgba(255,255,255,.4); color: #fff; background: transparent; }
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); color: #fff; }
.btn--ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--teal { background: var(--teal-ink); color: #fff; }
.btn--teal:hover { background: var(--teal); color: #fff; }
/* `.band a` must not repaint buttons — restate at higher specificity */
.band a.btn--gold { color: var(--navy); }
.band a.btn--gold:hover { color: var(--navy); }
.band a.btn--outline, .band a.btn--outline:hover { color: #fff; }
.band a.btn--teal, .band a.btn--navy { color: #fff; }
.band a.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }

/* ---------- Vision / mission blocks ---------- */
.statement { border-left: 4px solid var(--gold); background: var(--surface-raised);
  padding: 1.4rem 1.6rem; margin: 0 0 1.5rem; max-width: 60ch; align-self: start; }
.statement h3 { margin-bottom: .35em; }
.statement p { margin: 0; color: var(--ink-secondary); }
.statement--teal { border-left-color: var(--teal); }

/* ---------- Objectives: hairline list with em-dash markers ---------- */
.objectives { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.objectives li { display: grid; grid-template-columns: 2rem 1fr; gap: .5rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--rule); }
.objectives li::before { content: "—"; color: var(--gold-ink); font-family: var(--mono); }
.objectives p { margin: 0; color: var(--ink-secondary); font-size: var(--step--1); max-width: 72ch; }

/* ---------- Numbered service lines ---------- */
.lines { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.lines > li { display: grid; grid-template-columns: 3.2rem 1fr; gap: .5rem 1rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.lines__num { font-family: var(--mono); font-size: .78rem; color: var(--gold-ink); padding-top: .28rem; }
.lines h3 { margin-bottom: .3em; }
.lines p { margin: 0; color: var(--ink-secondary); font-size: var(--step--1); }
@media (max-width: 560px) { .lines > li { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- Client grid ---------- */
.grid { display: grid; gap: clamp(1.6rem, 3vw, 2.6rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.who h3 { font-size: var(--step-1); margin-bottom: .35em; }
.who p { font-size: var(--step--1); color: var(--ink-secondary); margin: 0; }

/* ---------- Commitments ---------- */
.commitments { list-style: none; margin: 0; padding: 0; }
.commitments > li { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.commitments > li:first-child { border-top: 1px solid var(--rule); }
.commitments .tagline { font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: .5rem; }
.commitments h3 { margin-bottom: .3em; }
.commitments p { margin: 0; color: var(--ink-secondary); font-size: var(--step--1); max-width: 74ch; }

/* ---------- Listing (briefs, record) ---------- */
.listing { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.listing > li { border-bottom: 1px solid var(--rule); }
.listing__row { display: grid; grid-template-columns: 9rem 1fr auto; gap: 1.25rem;
  align-items: baseline; padding: 1.35rem 0; text-decoration: none; color: inherit; }
.listing__row:hover .listing__title { color: var(--accent); }
.listing__date { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--ink-muted); text-transform: uppercase; }
.listing__title { font-family: var(--serif); font-weight: 600; font-size: var(--step-1);
  line-height: 1.25; display: block; }
.listing__desc { font-size: var(--step--1); color: var(--ink-secondary); margin: .3rem 0 0; max-width: 62ch; }
.listing__tag { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-muted); border: 1px solid var(--rule-strong);
  padding: .22rem .6rem; white-space: nowrap; }
@media (max-width: 680px) {
  .listing__row { grid-template-columns: 1fr; gap: .4rem; }
  .listing__tag { justify-self: start; }
}

/* ---------- Key/value list ---------- */
.kv { list-style: none; margin: 0; padding: 0; }
.kv > li { padding: .95rem 0; border-bottom: 1px solid var(--rule); }
.kv .k { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-ink); margin-bottom: .3rem; }
.band .kv > li { border-bottom-color: rgba(255,255,255,.14); }
.band .kv .k { color: var(--gold); }

/* ---------- Notes & empty states ---------- */
.note { border-left: 3px solid var(--teal); background: var(--surface-raised);
  padding: 1.1rem 1.3rem; font-size: var(--step--1); color: var(--ink-secondary);
  max-width: 74ch; align-self: start; }
.note strong { color: var(--ink); }
.empty { border: 1px dashed var(--rule-strong); background: var(--surface-raised);
  padding: clamp(1.5rem, 5vw, 2.5rem); }
.empty h3 { margin-top: 0; }

/* ---------- Forms ---------- */
.form { max-width: 34rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink); margin-bottom: .45rem; }
.field .hint { text-transform: none; letter-spacing: 0; font-family: var(--sans);
  font-size: var(--step--1); color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: var(--step--1); color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--rule-strong); border-radius: 0;
  padding: .72rem .85rem; }
.field textarea { min-height: 8.5rem; resize: vertical; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Figures & tables (data briefs) ---------- */
.figure { margin: 2rem 0; max-width: 42rem; }
.figure__title { font-family: var(--serif); font-weight: 600; font-size: var(--step-0); margin: 0 0 .1rem; }
.figure__sub { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted); margin: 0 0 1rem; }
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: .8rem;
  padding-top: .6rem; border-top: 1px solid var(--rule); }
.viz-bar { fill: var(--accent); }
.viz-label { fill: var(--ink-secondary); font-size: 12px; font-family: var(--sans); }
.viz-value { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans);
  font-variant-numeric: tabular-nums; }
.viz-axis { stroke: var(--rule-strong); stroke-width: 1; }
.viz-grid { stroke: var(--rule); stroke-width: 1; }
.viz-tick { fill: var(--ink-muted); font-size: 11px; font-family: var(--mono); }

table.data { border-collapse: collapse; width: 100%; max-width: 42rem;
  font-size: var(--step--1); margin: 1.5rem 0; }
table.data th, table.data td { text-align: left; padding: .55rem .9rem .55rem 0;
  border-bottom: 1px solid var(--rule); }
table.data th { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
table.data td { color: var(--ink-secondary); font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.foot-grid h4 { color: var(--gold); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; font-size: var(--step--1); }
.foot-grid li { margin-bottom: .5rem; color: #b9c0d4; }
.foot-grid a { color: #d7dbe8; text-decoration: none; }
.foot-grid a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.16);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: #9aa3bd; }

/* ---------- Print ---------- */
@media print {
  .site-head, .site-foot, .cover__cta, .btn { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .band { background: #fff !important; color: #000 !important; }
  .band h1, .band h2, .band p, .band .lede { color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  section { page-break-inside: avoid; }
}

/* ---------- Locator map (real Natural Earth geometry) ---------- */
.map { margin: 0; }
.map svg { width: 100%; height: auto; display: block; max-width: 520px; }
.m-neighbours path { fill: #e8eaf0; stroke: #dfe2ea; stroke-width: 1; }
.m-kenya { fill: var(--surface-raised); stroke: var(--ink); stroke-width: 1.6; }
.m-corridor path { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 6 5; }
.m-city circle { fill: var(--ink-muted); }
.m-city text { fill: var(--ink-secondary); font-family: var(--sans); font-size: 12px; }
.m-home circle { fill: var(--teal); }
.m-home text { fill: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 600; }
.map figcaption { font-size: var(--step--1); color: var(--ink-muted); margin-top: 1rem;
  padding-top: .6rem; border-top: 1px solid var(--rule); max-width: 44ch; }
.map__key { list-style: none; margin: 1rem 0 0; padding: 0; font-family: var(--mono);
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.map__key li { display: flex; align-items: center; gap: .55rem; margin-bottom: .45rem; }
.map__key i { display: inline-block; width: 18px; height: 0; border-top: 2px dashed var(--gold); }
.map__key i.dot { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--teal); }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .m-neighbours path { fill: #1b2647; stroke: #263258; }
}

/* ---------- Publication groups ---------- */
.pub-group { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.pub-group__head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .25rem; }
.pub-group h2 { font-size: var(--step-1); margin: 0; }
.pub-group__count { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-muted); }
.pub-group > p { font-size: var(--step--1); color: var(--ink-secondary); margin: .4rem 0 1rem; }
.pub-empty { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 1.1rem 0; font-size: var(--step--1); color: var(--ink-muted); }

/* ---------- Two-column feature (text + figure) ---------- */
.feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } }

/* Long statement headline: smaller than a short cover title, still dominant */
.cover h1.claim { font-size: var(--step-3); max-width: 21ch; letter-spacing: -.025em; }
