/* polish.css: visual polish layered over the prebuilt (purged) tailwind.css.
   Plain CSS only: tailwind.css is purged, so new utility classes would not exist.
   Linked after tailwind.css on every page. No external resources (strict CSP).

   Direction: the brand's own "Lusaka sunset" (the welcome screen's gold -> orange -> navy glow) is the one bold
   device, used as a horizon line and low glow on the navy bands. Everything else stays quiet: one typeface
   (Plus Jakarta Sans, self-hosted), a firmer type scale, sentence-case section labels, consistent buttons,
   visible focus, greyscale client logos that wake up on hover. */

:root {
  --pg-navy: #0a1628;
  --pg-navy-950: #071223;
  --pg-navy-700: #1c3050;
  --pg-gold: #f2b632;
  --pg-gold-hover: #e0a80f;
  --pg-orange: #e07a2e;
  --pg-teal: #0a7d91;
  --pg-teal-ink: #086a7b;   /* teal for text on mist: 5.5:1 */
  --pg-mist: #f4f6fa;
  --pg-mist-2: #eef2f7;
  --pg-line: #e3e8ef;
  --pg-slate: #4a5568;
  --pg-horizon: linear-gradient(90deg, #f2b632 0%, #e07a2e 45%, #0a7d91 100%);
  --pg-shadow-1: 0 1px 2px rgba(10, 22, 40, .06), 0 10px 28px -14px rgba(10, 22, 40, .22);
  --pg-shadow-2: 0 2px 4px rgba(10, 22, 40, .06), 0 22px 44px -20px rgba(10, 22, 40, .32);
  --pg-radius-btn: 10px;
}

/* ---------- base ---------- */
html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
img { max-width: 100%; }
::selection { background: rgba(242, 182, 50, .45); color: var(--pg-navy); }

/* ---------- typography ---------- */
h1, h2, h3 { text-wrap: balance; }
p, li, dd, blockquote, figcaption { text-wrap: pretty; }
h1.font-extrabold, h2.font-extrabold { letter-spacing: -.022em; }
h2.text-3xl { font-size: clamp(1.75rem, 1.15rem + 2.1vw, 2.5rem); line-height: 1.12; }
h3.text-2xl { letter-spacing: -.012em; }
.leading-relaxed { line-height: 1.7; }
.max-w-2xl > h2 + p, p.max-w-md, p.max-w-xl { max-width: 62ch; }
.text-slate { color: var(--pg-slate); }

/* Section labels: sentence case with a short rule, instead of tracked-out capitals. The words are the page's own;
   only text-transform changes. */
p.uppercase.tracking-wider {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: .005em;
  font-size: 15px;
  line-height: 1.3;
}
p.uppercase.tracking-wider::before {
  content: "";
  flex: none;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}
p.uppercase.tracking-wider.text-center { justify-content: center; }
p.uppercase.tracking-wider.text-slate::before { background: var(--pg-gold); }
span.uppercase.tracking-wider { text-transform: none; letter-spacing: .01em; font-size: 13px; }
.bg-mist .text-brand-cyan-dark { color: #006b99; }  /* 5.4:1 on mist */

/* ---------- focus ---------- */
:focus-visible {
  outline: 3px solid var(--pg-teal);
  outline-offset: 3px;
  border-radius: 6px;
}
.bg-navy-900 :focus-visible, .bg-navy-950 :focus-visible, footer :focus-visible,
.pg-welcome .pg-card:focus-visible, .pg-card :focus-visible {
  outline-color: var(--pg-gold);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--pg-teal) !important;
}

/* ---------- utility bar + header ---------- */
.bg-navy-950.text-\[13px\] a { text-underline-offset: 3px; }
.bg-navy-950.text-\[13px\] a:hover { text-decoration: underline; }

header.bg-white {
  position: relative;
  z-index: 40;
  box-shadow: 0 1px 0 var(--pg-line);
  border-bottom-color: transparent;
}
@media (min-width: 1024px) {
  header.bg-white {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}
nav[aria-label="Main"] > a:not(.rounded-lg) {
  position: relative;
  border-radius: 8px;
}
nav[aria-label="Main"] > a:not(.rounded-lg):hover { background: var(--pg-mist); }
nav[aria-label="Main"] > a[aria-current="page"]:not(.rounded-lg) { color: var(--pg-teal-ink); }
nav[aria-label="Main"] > a[aria-current="page"]:not(.rounded-lg)::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--pg-gold);
}

/* ---------- buttons (one system) ---------- */
a.rounded-lg.bg-brand-amber, a.rounded-lg.bg-navy-900, a.rounded-lg.border, a.rounded-lg.ring-1, button[type="submit"].rounded-lg,
.pg-welcome .pg-card .go {
  min-height: 48px;
  border-radius: var(--pg-radius-btn);
  font-weight: 700;
  letter-spacing: .005em;
  justify-content: center;
}
a.rounded-lg.bg-brand-amber, button[type="submit"].bg-brand-amber {
  box-shadow: 0 1px 0 rgba(10, 22, 40, .12), inset 0 -2px 0 rgba(10, 22, 40, .10);
}
a.rounded-lg.bg-brand-amber:hover, button[type="submit"].bg-brand-amber:hover { background-color: var(--pg-gold-hover); }
a.rounded-lg.bg-navy-900:hover { background-color: #172a48; }
a.rounded-lg.border.border-line { border-color: #c5cdd8; }
a.rounded-lg.border.border-line:hover { background: var(--pg-mist); border-color: var(--pg-navy-700); }
a.rounded-lg.border.border-white\/30:hover { border-color: rgba(255, 255, 255, .6); }
a.rounded-lg:active, button[type="submit"]:active { transform: translateY(1px); }
nav[aria-label="Main"] > a.rounded-lg { min-height: 44px; }

/* ---------- section rhythm and backgrounds ---------- */
section.bg-mist {
  background-color: var(--pg-mist);
  background-image: linear-gradient(180deg, var(--pg-mist) 0%, var(--pg-mist-2) 100%);
  box-shadow: inset 0 1px 0 var(--pg-line);
}

/* The horizon: navy bands get the sunset as a low glow and a thin line along their foot. */
section.bg-navy-900 {
  position: relative;
  isolation: isolate;
  background-image:
    radial-gradient(70% 90% at 100% 120%, rgba(224, 122, 46, .22) 0%, rgba(224, 122, 46, 0) 60%),
    radial-gradient(50% 70% at 0% 130%, rgba(10, 125, 145, .28) 0%, rgba(10, 125, 145, 0) 60%);
}
section.bg-navy-900::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--pg-horizon);
  z-index: 1;
  pointer-events: none;
}
section.bg-navy-900 .text-white\/60 { color: rgba(255, 255, 255, .72); }
section.bg-navy-900 .text-white\/50, .bg-navy-950 .text-white\/50 { color: rgba(255, 255, 255, .68); }

/* ---------- cards ---------- */
.shadow-card { box-shadow: var(--pg-shadow-1); }
#companies article.rounded-3xl {
  background-image: linear-gradient(var(--pg-accent, #00aeef), var(--pg-accent, #00aeef));
  background-size: 100% 5px;
  background-repeat: no-repeat;
}
#companies article.rounded-3xl:last-of-type { --pg-accent: #800080; }
#companies a.rounded-3xl, a.rounded-2xl.ring-1 { transition: box-shadow .2s ease, transform .2s ease; }
#companies a.rounded-3xl:hover, a.rounded-2xl.ring-1.shadow-card:hover { box-shadow: var(--pg-shadow-2); }
li.rounded-2xl.border.border-line { background: #fff; }
figure.rounded-3xl blockquote { font-size: 18px; line-height: 1.62; }
figure.rounded-3xl figcaption { border-top: 1px solid var(--pg-line); margin-top: auto; padding-top: 20px; }
figure.rounded-3xl blockquote + figcaption { margin-top: 32px; }

/* Service tabs (the inline script swaps class names; these follow aria-selected) */
[role="tab"] { border-radius: 8px 8px 0 0; transition: color .15s ease, background-color .15s ease; }
[role="tab"]:hover { background: var(--pg-mist); }
[role="tab"][aria-selected="true"] { border-bottom-color: var(--pg-gold) !important; }

/* Tables (references, CV) */
table thead tr { border-bottom: 2px solid var(--pg-navy); }
table thead th { font-size: 13px; letter-spacing: .01em; text-transform: none; color: var(--pg-navy-700); }
table tbody tr { transition: background-color .15s ease; }
table tbody tr:hover { background: var(--pg-mist); }
table td:first-child, table th:first-child { padding-left: 8px; }

/* Forms */
input.h-12, select.h-12, textarea.rounded-lg { transition: border-color .15s ease, box-shadow .15s ease; }
input.h-12:hover, select.h-12:hover, textarea.rounded-lg:hover { border-color: #8d9aae !important; }

/* Footer */
footer a { text-underline-offset: 3px; }
footer a:hover { text-decoration: underline; }
footer.bg-navy-950 { position: relative; }
footer.bg-navy-950::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--pg-horizon);
  opacity: .9;
}

/* ---------- welcome screen (home) ---------- */
html .pg-welcome .pg-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(10, 22, 40, .55);
  transition: transform .25s ease, box-shadow .25s ease;
}
html .pg-welcome .pg-card:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -20px rgba(10, 22, 40, .6); }
html .pg-welcome .pg-card .go {
  display: flex;
  align-items: center;
  width: auto;
  max-width: 260px;
  margin: 0 24px 26px;
  padding: 10px 18px;
  align-self: center;
  min-width: 60%;
  box-shadow: inset 0 -2px 0 rgba(10, 22, 40, .12);
}
html .pg-welcome .pg-card .lg img { border-radius: 16px; }

/* ---------- client logos ---------- */
.pg-logos img[data-sc-field="image"] { display: block; object-fit: contain; }
.pg-logo-on-dark { background: var(--pg-navy); border-radius: 6px; padding: 6px 10px; box-sizing: content-box; }

/* home: a strip of marks; the name stays in the page for screen readers, and shows when there is no logo */
.pg-logos--strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  align-items: center;
  gap: 18px 28px;
  width: 100%;
  flex-basis: 100%;
  color: var(--pg-navy-700);
  font-size: 15px;
  line-height: 1.25;
}
.pg-logos--strip li { display: flex; align-items: center; justify-content: center; min-height: 64px; text-align: center; }
.pg-logos--strip img[data-sc-field="image"] { height: 56px; width: auto; max-width: 150px; }
.pg-logos--strip img[src$="amref-health-africa.png"] { height: 50px; }
.pg-logos--strip li:has(> img[data-sc-field="image"]:not([hidden])) > [data-sc-field="title"] {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pg-logos--strip [data-sc-field="title"] { font-weight: 700; letter-spacing: -.005em; text-wrap: balance; }
/* the label sits above the strip, so the marks get the full width */
section.border-b.border-line > div:has(> .pg-logos--strip) { row-gap: 18px; }
section.border-b.border-line > div:has(> .pg-logos--strip) > p { width: 100%; }

/* PIS: logo tiles with the name as a caption */
.pg-logos--tiles li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
  padding-left: 10px;
  padding-right: 10px;
}
.pg-logos--tiles img[data-sc-field="image"] { height: 36px; width: auto; max-width: 88%; }
.pg-logos--tiles li:has(> img[data-sc-field="image"]:not([hidden])) > [data-sc-field="title"] {
  font-size: 12px; font-weight: 700; color: var(--pg-slate); letter-spacing: .01em;
}

/* PTC: small marks beside the names */
.pg-logos--inline li { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.pg-logos--inline img[data-sc-field="image"] { width: 56px; height: 28px; flex: none; object-position: left center; }
.pg-logos--inline img.pg-logo-on-dark { box-sizing: border-box; padding: 5px 7px; object-position: center; }
/* when a list has any marks, names without one line up with the others */
.pg-logos--inline:has(img[data-sc-field="image"]:not([hidden])) li:not(:has(> img[data-sc-field="image"]:not([hidden]))) { padding-left: 68px; }

/* references: a quiet band of the marks we have, above the table (decorative; the table carries the names) */
.pg-logo-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid var(--pg-line);
  border-radius: 16px;
  background: var(--pg-mist);
}
.pg-logo-band img { height: 44px; width: auto; max-width: 170px; object-fit: contain; }

/* greyscale until hover, only where hovering exists (touch screens see the colours) */
@media (hover: hover) {
  .pg-logos img[data-sc-field="image"], .pg-logo-band img {
    filter: grayscale(1);
    opacity: .85;
    transition: filter .25s ease, opacity .25s ease;
  }
  .pg-logos li:hover img[data-sc-field="image"], .pg-logo-band img:hover {
    filter: none;
    opacity: 1;
  }
}

/* ---------- card.html (contact card) ---------- */
main.card, main.card + footer { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
main.card .save { box-shadow: inset 0 -2px 0 rgba(10, 22, 40, .12); }
main.card .save:hover { background: var(--pg-gold-hover); }
main.card .row a:hover { color: var(--pg-teal-ink); }

/* ---------- tablet (768px and under) ---------- */
@media (max-width: 767.98px) {
  .py-24 { padding-top: 64px; padding-bottom: 64px; }
  .py-20 { padding-top: 52px; padding-bottom: 52px; }
  .pt-20 { padding-top: 56px; }
  .pb-24 { padding-bottom: 72px; }
  .mt-14 { margin-top: 40px; }
  .mt-12 { margin-top: 36px; }
  .p-10 { padding: 28px; }
  .p-8 { padding: 24px; }

  /* header: the menu becomes one tidy scrollable row under the name */
  header.bg-white > div { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; padding-bottom: 8px; }
  nav[aria-label="Main"] {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -24px;
    margin-right: -24px;
    padding: 2px 24px 6px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
  }
  nav[aria-label="Main"]::-webkit-scrollbar { display: none; }
  nav[aria-label="Main"] > a { white-space: nowrap; flex: none; }

  /* the CTA box: keep the decorative squares clear of the heading */
  .-right-10.-top-10.w-56 { width: 128px; height: 128px; right: -36px; top: -36px; opacity: .45; }

  .pg-logos--strip { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 12px 14px; font-size: 14px; }
  .pg-logos--strip li { min-height: 56px; }
  .pg-logos--strip img[data-sc-field="image"] { height: 46px; max-width: 120px; }
  .pg-logos--strip img[src$="amref-health-africa.png"] { height: 40px; }

  table { min-width: 640px; }
}

/* ---------- phone (480px and under, tuned at 360px) ---------- */
@media (max-width: 480px) {
  .px-6 { padding-left: 20px; padding-right: 20px; }
  nav[aria-label="Main"] { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .bg-navy-950.text-\[13px\] { font-size: 12.5px; }
  .bg-navy-950.text-\[13px\] > div { justify-content: flex-start; row-gap: 4px; }

  html .pg-welcome { padding: 40px 20px; min-height: 0; }
  html .pg-welcome hr { margin: 24px auto 28px; }
  html .pg-cards { gap: 20px; grid-template-columns: 1fr; }
  html .pg-card .lg { min-height: 170px; padding: 24px 20px; }

  .pg-logos--tiles.grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rounded-\[32px\].px-8 { padding-left: 24px; padding-right: 24px; }
  .text-4xl { font-size: 2rem; line-height: 1.12; }
  dl .text-3xl { font-size: 1.625rem; }
  .fixed.bottom-6.right-6 { bottom: 16px; right: 16px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; scroll-behavior: auto !important; }
  html .pg-welcome .pg-card:hover, a.rounded-lg:active, button[type="submit"]:active { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a.rounded-lg, button[type="submit"] { transition: background-color .15s ease, border-color .15s ease, transform .1s ease; }
}

/* ---------- print ---------- */
@media print {
  header.bg-white { position: static; }
  section.bg-navy-900::after, footer.bg-navy-950::before, .fixed { display: none; }
}

/* presence list: keep the country column steady when the companies text runs long */
li.flex > span.w-36 { flex: none; }

@media (max-width: 480px) {
  .rounded-\[28px\].p-7 { padding: 20px; min-height: 200px; }
  .rounded-\[28px\].p-7 .text-xl { font-size: 1.125rem; }
}
.pg-logos--tiles img[src$="zicta.png"], .pg-logos--tiles img[src$="mtn-momo.svg"] { height: 44px; }

@media (max-width: 767.98px) {
  /* hero logo card: keep it inside the screen */
  .absolute.-bottom-8.-left-8 { left: 12px; bottom: -24px; padding: 16px; }
  .absolute.-bottom-8.-left-8 img.h-24 { height: 72px; }
}
@media (max-width: 480px) {
  dd.text-2xl.font-extrabold { font-size: 1.3rem; }
}
