/* ==========================================================================
   The Kalonzo Musyoka Foundation
   Palette derived from the KMF logo: dove blue, globe gold, white.
   Type: Zilla Slab (display) + Public Sans (body).
   ========================================================================== */

:root {
  --blue:       #1B6FB5;  /* dove / wordmark blue */
  --blue-dark:  #14568D;
  --navy:       #0D3A61;  /* deepened logo blue */
  --gold:       #B9952E;  /* globe / FOUNDATION gold */
  --gold-soft:  #D9BE6C;
  --gold-pale:  #F6EFDB;
  --mist:       #EFF5FA;  /* pale blue section tint */
  --ink:        #16232E;
  --ink-soft:   #4A5A68;
  --paper:      #FFFFFF;
  --line:       #DCE6EE;

  --font-display: "Zilla Slab", Georgia, serif;
  --font-body:    "Public Sans", -apple-system, "Segoe UI", sans-serif;

  --container: 1120px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(13, 58, 97, .10);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin: 0 0 1em; }
ul { padding: 0; margin: 0; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.u-gold { color: var(--gold); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--navy); padding: 10px 18px; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

/* Eyebrow ------------------------------------------------------------------
   Small gold globe tick + tracked caps: the site's structural label. */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: .9em;
}
.eyebrow::before {
  content: ""; width: 14px; height: 14px; flex: none;
  border: 1.5px solid currentColor; border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  opacity: .9;
}
.eyebrow--gold { color: var(--gold-soft); }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 6px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--blue    { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-dark); }
.btn--gold    { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-soft); }
.btn--outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--outline:hover { background: var(--blue); color: #fff; }
.btn--ghost   { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* Top bar ------------------------------------------------------------------ */
.topbar { background: var(--navy); color: #CFE0EF; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 16px; flex-wrap: wrap; padding-block: 4px; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .45em; }
.topbar a:hover { color: #fff; }
.topbar svg { width: 15px; height: 15px; }
.topbar__contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar__social { display: flex; align-items: center; gap: 14px; }
.topbar__reg { color: #8FB0CC; letter-spacing: .02em; }

/* Header / nav ------------------------------------------------------------- */
.site-header {
  background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 6px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.14rem; color: var(--blue); letter-spacing: .01em; }
.brand__foundation { font-size: .74rem; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }

.site-nav__list { display: flex; align-items: center; gap: 6px; list-style: none; }
.site-nav__link {
  display: block; padding: 10px 14px; text-decoration: none;
  color: var(--ink); font-weight: 500; font-size: .95rem; position: relative;
}
.site-nav__link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2.5px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.site-nav__link:hover::after, .site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__link.is-active { color: var(--navy); font-weight: 600; }
.site-nav__cta { margin-left: 10px; padding: 11px 20px; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle__bar { display: block; width: 24px; height: 2.5px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Globe motif -------------------------------------------------------------- */
.globe-motif { width: 100%; height: 100%; }

/* Hero ----------------------------------------------------------------------
   Photo hero. The subject stands left-of-centre, so the copy sits right,
   over a navy scrim that deepens toward the text side. */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(13,58,97,.30) 0%, rgba(13,58,97,.58) 42%, rgba(9,42,71,.94) 72%),
    url("../img/hero.jpg") center top / cover no-repeat;
}
.hero__inner { position: relative; padding-block: clamp(72px, 10vw, 140px); display: flex; justify-content: flex-end; }
.hero__copy { max-width: 620px; }
.hero__title { margin-bottom: .45em; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero .u-gold { color: var(--gold-soft); }
.hero__lead { font-size: 1.15rem; color: #D5E3F0; max-width: 56ch; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Stats band ----------------------------------------------------------------- */
.stats { background: var(--navy); border-top: 4px solid var(--gold); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 44px; }
.stats--tall .stats__grid { padding-block: 60px; }
.stat { text-align: center; }
.stat__value { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: var(--gold-soft); }
.stat__label { display: block; margin-top: 4px; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: #B9CFE2; }

/* Sections -------------------------------------------------------------------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); }
.section__head { max-width: 720px; margin-bottom: 44px; }
.section__head--light h2 { color: #fff; }
.section__intro { color: var(--ink-soft); }
.section__foot { margin-top: 36px; }

/* Pillars ---------------------------------------------------------------------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pillar {
  background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: var(--radius); padding: 26px 22px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillar__icon { width: 46px; height: 46px; color: var(--blue); margin-bottom: 14px; }
.pillar__icon svg { width: 100%; height: 100%; }
.pillar p { font-size: .93rem; color: var(--ink-soft); }
.pillar__link { font-weight: 600; font-size: .9rem; text-decoration: none; }
.pillar__link::after { content: " →"; }
.pillar__link:hover { text-decoration: underline; }

/* Programme strip ----------------------------------------------------------------- */
.prog-strip { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; }
.prog-strip li {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--blue); border-radius: 6px;
  padding: 12px 18px; font-weight: 500; font-size: .95rem;
}

/* Founder block --------------------------------------------------------------------- */
.founder { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.founder__mark { color: var(--blue); opacity: .9; max-width: 300px; }
.founder__copy p { color: var(--ink-soft); }

/* Page head ---------------------------------------------------------------------------- */
.page-head { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding-block: clamp(56px, 8vw, 88px); }
.page-head h1 { color: #fff; }
.page-head__lead { font-size: 1.12rem; color: #C6D8E8; max-width: 60ch; margin: 0; }
.page-head__globe {
  position: absolute; right: -120px; top: 50%; transform: translateY(-50%);
  width: 480px; height: 480px; color: var(--gold); opacity: .22; pointer-events: none;
}
.page-head .container { position: relative; }
.page-head .eyebrow { color: var(--gold-soft); }

/* Vision / mission cards --------------------------------------------------------------- */
.vmv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.vmv__card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; border-top: 4px solid var(--blue);
}
.vmv__card:nth-child(2) { border-top-color: var(--gold); }
.vmv__card:nth-child(3) { border-top-color: var(--navy); }
.vmv__card p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* Prose --------------------------------------------------------------------------------- */
.prose { max-width: 760px; }
.prose p { color: var(--ink-soft); font-size: 1.05rem; }

/* Pillar detail (programmes page) ------------------------------------------------------- */
.pillar-detail { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.pillar-detail__lead { font-family: var(--font-display); font-size: 1.3rem; color: var(--blue); margin: 0; }
.pillar-detail__body p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* Programme cards (navy section) --------------------------------------------------------- */
.prog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.prog-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 22px 20px;
  transition: background-color .2s ease, transform .2s ease;
}
.prog-card:hover { background: rgba(255,255,255,.11); transform: translateY(-3px); }
.prog-card h3 { color: var(--gold-soft); font-size: 1.05rem; }
.prog-card p { color: #C6D8E8; font-size: .88rem; margin: 0; }

/* Impact: education breakdown ------------------------------------------------------------- */
.edu-breakdown { display: grid; gap: 18px; max-width: 760px; }
.edu-bar { position: relative; background: var(--mist); border-radius: 8px; height: 58px; overflow: hidden; }
.edu-bar__fill {
  position: absolute; inset: 0 auto 0 0; width: var(--w);
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: 8px;
}
.edu-bar__label, .edu-bar__num { position: relative; z-index: 1; line-height: 58px; font-weight: 600; }
.edu-bar__label { padding-left: 20px; color: #fff; float: left; }
.edu-bar__num { float: right; padding-right: 20px; color: var(--navy); font-family: var(--font-display); font-size: 1.15rem; }

/* Contact ----------------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; display: grid; gap: 18px; margin-bottom: 30px; }
.contact-list li { display: grid; gap: 2px; }
.contact-list__label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-list__social { display: flex; gap: 16px; }
.contact-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.contact-map iframe { width: 100%; height: 260px; border: 0; display: block; }

.contact-form-wrap {
  background: var(--mist); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 30px;
}
.form-row { margin-bottom: 18px; display: grid; gap: 6px; }
.form-row label { font-weight: 600; font-size: .92rem; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
  font: inherit; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 6px; background: var(--paper); color: var(--ink); width: 100%;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,111,181,.15);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-flash { padding: 13px 16px; border-radius: 6px; font-weight: 500; margin-bottom: 20px; }
.form-flash--ok  { background: #E5F3E8; color: #1E5B2E; border: 1px solid #BCDFC5; }
.form-flash--err { background: #FBEAEA; color: #8A2323; border: 1px solid #EFC4C4; }

/* CTA band --------------------------------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--navy) 0%, var(--blue-dark) 100%); color: #fff; padding-block: clamp(56px, 8vw, 88px); }
.cta-band__globe { position: absolute; left: -160px; bottom: -220px; width: 520px; height: 520px; color: var(--gold); opacity: .18; pointer-events: none; }
.cta-band__inner { position: relative; max-width: 720px; text-align: left; }
.cta-band__title { color: #fff; }
.cta-band__text { color: #C6D8E8; }
.cta-band__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* Footer -------------------------------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #B9CFE2; font-size: .93rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 40px; padding-block: 60px 44px; }
.site-footer h3 { color: var(--gold-soft); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-body); font-weight: 700; margin-bottom: 16px; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: #B9CFE2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.site-footer__brand img { border-radius: 6px; background: #fff; padding: 2px; }
.site-footer__brand span { font-family: var(--font-display); font-weight: 700; color: #fff; line-height: 1.2; }
.site-footer__brand em { font-style: normal; color: var(--gold-soft); font-size: .8em; letter-spacing: .28em; text-transform: uppercase; }
.site-footer__social { display: flex; gap: 12px; margin-top: 16px; }
.site-footer__social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.site-footer__social a:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.site-footer__social svg { width: 17px; height: 17px; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.14); }
.site-footer__legal-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px; font-size: .84rem; color: #8FB0CC; }

/* Reveal animation ------------------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .pillar, .prog-card { transition: none; }
}

/* Responsive -------------------------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .pillars, .prog-grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .founder { grid-template-columns: 1fr; gap: 28px; }
  .founder__mark { max-width: 200px; }
  .pillar-detail { grid-template-columns: 1fr; gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 860px) {
  .topbar__reg { display: none; }
  .nav-toggle { display: block; }
  .site-nav__list {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 24px 20px; display: none; box-shadow: var(--shadow);
  }
  .site-nav__list.is-open { display: flex; }
  .site-nav__link { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .site-nav__link::after { display: none; }
  .site-nav__cta { margin: 14px 0 0; text-align: center; }
  .hero {
    background:
      linear-gradient(rgba(10,46,78,.82), rgba(10,46,78,.82)),
      url("../img/hero.jpg") 38% top / cover no-repeat;
  }
  .hero__inner { justify-content: flex-start; }
  .vmv { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pillars, .prog-grid, .stats__grid { grid-template-columns: 1fr; }
  .stats__grid { gap: 30px; }
  .topbar__inner { justify-content: center; }
  .edu-bar__label { font-size: .85rem; }
}
