/* ==========================================================
   TAIDe — Touch Africa Initiative Development
   Design tokens
   ========================================================== */
:root{
  --forest:   #12291F;   /* deepest green — header/footer */
  --green:    #256E4A;   /* primary brand green */
  --green-2:  #2F8358;   /* secondary green for gradients */
  --leaf:     #9CC78C;   /* light leaf green accent */
  --gold:     #D9A441;   /* warm ochre accent */
  --gold-dim: #B98630;
  --cream:    #F8F4EA;   /* page background */
  --paper:    #FFFFFF;
  --ink:      #16201A;   /* body text */
  --ink-soft: #46564C;
  --line:     #E1DACB;

  --font-display: "Fraunces", serif;
  --font-body: "Work Sans", sans-serif;
  --font-mono: "Space Mono", monospace;

  --radius: 14px;
  --wrap: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; }
h1,h2,h3{
  font-family:var(--font-display);
  font-weight:560;
  line-height:1.08;
  margin:0 0 .5em;
  color:var(--forest);
  letter-spacing:-0.01em;
}
p{
  margin:0 0 1em;
  text-align:justify;
  text-align-last:left;
  text-justify:inter-word;
  hyphens:auto;
}
.wrap{ max-width:var(--wrap); margin:0 auto; padding:0 28px; }

.eyebrow{
  font-family:var(--font-mono);
  font-size:.78rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--gold-dim);
  margin:0 0 .9em;
  font-weight:700;
}
.eyebrow-light{ color:var(--leaf); }
.lede{ font-size:1.12rem; color:var(--ink-soft); max-width:56ch; }
.lede-light{ color:#D7E4DA; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.5em;
  padding:.85em 1.6em;
  border-radius:999px;
  font-weight:600;
  font-size:.98rem;
  text-decoration:none;
  border:1.5px solid transparent;
  transition:transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  cursor:pointer;
}
.btn:hover{ transform:translateY(-2px); }
.btn-primary{ background:var(--gold); color:var(--forest); }
.btn-primary:hover{ background:#E5B25A; }
.btn-outline{ border-color:rgba(255,255,255,.55); color:#fff; }
.btn-outline:hover{ border-color:#fff; background:rgba(255,255,255,.08); }
.btn-ghost{ border-color:var(--green); color:var(--green); }
.btn-ghost:hover{ background:var(--green); color:#fff; }
.btn-outline-light{ border-color:rgba(255,255,255,.4); color:#fff; margin-top:.7em; }
.btn-outline-light:hover{ border-color:#fff; background:rgba(255,255,255,.08); }
.btn-block{ display:flex; justify-content:center; width:100%; }

/* ==========================================================
   HEADER
   ========================================================== */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(18,41,31,.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.header-inner{
  display:flex; align-items:center; gap:24px;
  height:88px;
}
.brand{ display:flex; align-items:center; gap:14px; text-decoration:none; }
.brand-mark{ height:58px; width:58px; object-fit:contain; border-radius:10px; background:#fff; padding:4px; }
.brand-text{ display:flex; flex-direction:column; line-height:1.15; color:#fff; }
.brand-text strong{ font-family:var(--font-display); font-size:1.2rem; }
.brand-text em{ font-style:normal; font-size:.78rem; color:var(--leaf); letter-spacing:.03em; }

.main-nav{ display:flex; gap:30px; margin-left:auto; }
.main-nav a{
  color:#EDEDE3; text-decoration:none; font-size:.95rem; font-weight:500;
  position:relative; padding:4px 0;
}
.main-nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background:var(--gold); transform:scaleX(0); transform-origin:left;
  transition:transform .2s ease;
}
.main-nav a:hover::after{ transform:scaleX(1); }
.nav-cta{ white-space:nowrap; }
.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:38px; height:38px; background:none; border:none; cursor:pointer; margin-left:auto;
}
.nav-toggle span{ height:2px; background:#fff; border-radius:2px; }

/* ==========================================================
   HERO
   ========================================================== */
.hero{
  position:relative;
  background:radial-gradient(120% 140% at 20% 0%, var(--green-2) 0%, var(--forest) 62%);
  color:#fff;
  overflow:hidden;
  padding:88px 0 0;
}
.hero-map{
  position:absolute; right:-60px; top:-40px; width:520px; max-width:60vw; opacity:.16;
  pointer-events:none;
}
.africa-svg{ width:100%; height:auto; }
.africa-path{ fill:none; stroke:var(--leaf); stroke-width:2.2; }
.pulse-dot{ fill:var(--gold); }
.pulse-ring{
  fill:none; stroke:var(--gold); stroke-width:2;
  transform-origin:252px 200px;
  animation:pulse 2.6s ease-out infinite;
}
.map-label{ font-family:var(--font-mono); font-size:11px; fill:var(--leaf); opacity:.9; }
@keyframes pulse{
  0%{ r:4; opacity:1; }
  80%{ r:26; opacity:0; }
  100%{ r:26; opacity:0; }
}

.hero-inner{ position:relative; padding-bottom:70px; max-width:760px; }
.hero h1{
  color:#fff;
  font-size:clamp(2.4rem, 5.4vw, 4.1rem);
  font-weight:560;
  margin-bottom:.4em;
}
.hero-lede{ color:#DCE6DE; font-size:1.16rem; max-width:54ch; }
.hero-actions{ display:flex; gap:16px; flex-wrap:wrap; margin-top:1.6em; }

.hero-strip{ width:100%; height:150px; overflow:hidden; }
.hero-strip img{ width:100%; height:100%; object-fit:cover; filter:saturate(1.05); }

.hero-strip{ width:100%; height:150px; overflow:hidden; }
.hero-strip img{ width:100%; height:100%; object-fit:cover; filter:saturate(1.05); }

/* ==========================================================
   FACT BAR
   ========================================================== */
.factbar{ background:var(--gold); }
.factbar-inner{
  display:grid; grid-template-columns:repeat(4,1fr);
  padding:26px 28px;
}
.fact{ display:flex; flex-direction:column; text-align:center; border-left:1px solid rgba(18,41,31,.18); }
.fact:first-child{ border-left:none; }
.fact-num{ font-family:var(--font-display); font-size:1.7rem; font-weight:650; color:var(--forest); }
.fact-label{ font-size:.82rem; color:#3C2E10; letter-spacing:.02em; }

/* ==========================================================
   SECTIONS (generic)
   ========================================================== */
.section{ padding:100px 0; }
.section h2{ font-size:clamp(1.9rem, 3.4vw, 2.7rem); }

/* ---- About ---- */
.about-grid{ display:grid; grid-template-columns:1.3fr 1fr; gap:64px; align-items:start; }
.mission-quote{
  font-family:var(--font-display);
  font-style:italic;
  font-size:1.5rem;
  color:var(--green);
  border-left:3px solid var(--gold);
  padding-left:20px;
  margin:1.2em 0;
}
.about-card{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:32px;
}
.about-card h3{ font-size:1.15rem; margin-bottom:1em; }
.about-card dl{ margin:0; }
.card-row{ display:flex; flex-direction:column; gap:2px; padding:12px 0; border-top:1px solid var(--line); }
.card-row:first-child{ border-top:none; padding-top:0; }
.card-row dt{ font-family:var(--font-mono); font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:var(--gold-dim); }
.card-row dd{ margin:0; font-weight:500; color:var(--forest); }

/* ---- Work ---- */
.work{ background:var(--paper); }
.work-lede{ margin-bottom:2.4em; }
.work-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:28px; }
.work-card{
  background:var(--cream);
  border-radius:var(--radius);
  padding:34px 32px;
  border:1px solid var(--line);
  transition:transform .2s ease, box-shadow .2s ease;
}
.work-card:hover{ transform:translateY(-4px); box-shadow:0 16px 30px -18px rgba(18,41,31,.35); }
.work-icon{
  width:56px; height:56px; border-radius:14px;
  background:var(--forest); color:var(--leaf);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:20px;
}
.work-icon svg{ width:28px; height:28px; }
.work-card h3{ font-size:1.3rem; margin-bottom:.5em; }
.work-card p{ color:var(--ink-soft); margin:0; }

/* ---- Gallery ---- */
.gallery{ padding-bottom:110px; }
.gallery > .wrap:first-child{ margin-bottom:36px; }
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  grid-auto-rows:160px;
  gap:14px;
}
.g-item{
  margin:0; overflow:hidden; border-radius:10px; position:relative;
  grid-column:span 1; grid-row:span 1;
}
.g-item img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.g-item:hover img{ transform:scale(1.07); }
.g-tall{ grid-row:span 2; }
.g-wide{ grid-column:span 2; }

/* ---- Activities (gallery) ---- */
.activity-list{ display:flex; flex-direction:column; gap:56px; margin-top:10px; }
.activity{
  display:grid; grid-template-columns:1.3fr 1fr; gap:40px; align-items:center;
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:28px; overflow:hidden;
}
.activity-reverse{ grid-template-columns:1fr 1.3fr; }
.activity-reverse .activity-photos{ order:2; }
.activity-reverse .activity-copy{ order:1; }
.activity-photos{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
}
.activity-photos img{ width:100%; height:150px; object-fit:cover; object-position:top; border-radius:8px; }
.activity-photos-single{ grid-template-columns:1fr; }
.activity-photos-single img{ height:220px; }
.activity-photos-quad{ grid-template-columns:repeat(4,1fr); }
.activity-photos-quad img{ height:190px; }
.activity-tag{
  display:inline-block; font-family:var(--font-mono); font-size:.7rem; text-transform:uppercase;
  letter-spacing:.08em; color:#fff; background:var(--green); padding:5px 12px; border-radius:999px;
  margin-bottom:14px;
}
.activity-copy h3{ font-size:1.4rem; margin-bottom:.25em; }
.activity-meta{ font-family:var(--font-mono); font-size:.82rem; color:var(--gold-dim); margin-bottom:1em; }
.activity-copy > p{ color:var(--ink-soft); }
.activity-copy p:last-of-type{ margin-bottom:0; }
.activity-quote{
  font-family:var(--font-display); font-style:italic; color:var(--green);
  border-left:3px solid var(--gold); padding-left:16px; margin:1em 0 .5em; font-size:1.02rem;
}
.activity-attribution{ font-size:.85rem; color:var(--ink-soft); margin:0; }
.activity-source{ font-size:.78rem; color:var(--ink-soft); opacity:.75; margin:.6em 0 0; font-style:italic; }

/* ---- Partners ---- */
.partners{ background:var(--paper); }
.partner-grid{
  display:flex; flex-wrap:wrap; gap:24px; margin-top:2em;
}
.partner-card{
  background:var(--cream); border:1px solid var(--line); border-radius:var(--radius);
  padding:28px 36px; display:flex; align-items:center; justify-content:center;
  flex:1 1 260px; max-width:340px;
}
.partner-card img{ max-height:70px; width:auto; max-width:100%; object-fit:contain; }

/* ---- M-Pesa box ---- */
.mpesa-box{
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16);
  border-radius:10px; padding:16px 20px; margin:14px 0 24px;
}
.mpesa-row{ display:flex; justify-content:space-between; align-items:baseline; padding:8px 0; border-top:1px solid rgba(255,255,255,.12); }
.mpesa-row:first-child{ border-top:none; }
.mpesa-value{ font-family:var(--font-display); font-size:1.3rem; font-weight:650; color:var(--gold); letter-spacing:.02em; }
.panel-subhead{ margin-top:6px; font-size:1.05rem; }

/* ---- Contact ---- */
.contact{ background:var(--forest); color:#fff; }
.contact-grid{ display:grid; grid-template-columns:1.2fr .8fr; gap:60px; }
.contact h2{ color:#fff; }
.contact-list{ list-style:none; margin:2em 0 0; padding:0; display:grid; gap:20px; }
.contact-list li{ display:flex; flex-direction:column; gap:3px; border-top:1px solid rgba(255,255,255,.14); padding-top:14px; }
.contact-list li:first-child{ border-top:none; padding-top:0; }
.c-label{ font-family:var(--font-mono); font-size:.7rem; text-transform:uppercase; letter-spacing:.1em; color:var(--leaf); }
.c-value{ font-size:1.02rem; font-weight:500; }
.c-value a{ text-decoration:none; }
.c-value a:hover{ text-decoration:underline; }

.contact-panel{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  border-radius:var(--radius);
  padding:34px;
  align-self:start;
}
.contact-panel h3{ color:#fff; font-size:1.25rem; }
.contact-panel p{ color:#D7E4DA; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer{ background:#0C1E16; color:#B9C4BC; padding:44px 0 0; }
.footer-inner{ display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; padding-bottom:34px; border-bottom:1px solid rgba(255,255,255,.1); }
.footer-brand{ display:flex; align-items:center; gap:16px; }
.footer-brand img{ height:52px; width:52px; border-radius:10px; background:#fff; padding:4px; }
.footer-brand strong{ display:block; color:#fff; font-family:var(--font-display); font-size:1.1rem; }
.footer-brand span{ font-size:.8rem; }
.footer-nav{ display:flex; gap:22px; }
.footer-nav a{ text-decoration:none; color:#B9C4BC; font-size:.92rem; }
.footer-nav a:hover{ color:#fff; }
.footer-bottom{ padding:20px 28px 28px; font-size:.82rem; text-align:center; color:#7C8B82; }

/* ==========================================================
   SCROLL REVEAL
   ========================================================== */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .7s ease, transform .7s ease; }
.reveal.is-visible{ opacity:1; transform:none; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 880px){
  .about-grid, .contact-grid{ grid-template-columns:1fr; gap:36px; }
  .work-grid{ grid-template-columns:1fr; }
  .gallery-grid{ grid-template-columns:repeat(2,1fr); grid-auto-rows:150px; }
  .g-wide{ grid-column:span 2; }
  .factbar-inner{ grid-template-columns:repeat(2,1fr); gap:18px; }
  .fact:nth-child(3){ border-left:none; }
  .activity, .activity-reverse{ grid-template-columns:1fr; }
  .activity-reverse .activity-photos, .activity-reverse .activity-copy{ order:initial; }
  .activity-photos{ grid-template-columns:repeat(3,1fr); }
  .activity-photos-quad{ grid-template-columns:repeat(2,1fr); }
  .partner-card{ flex:1 1 100%; max-width:none; }
}

@media (max-width: 760px){
  .main-nav, .nav-cta{ display:none; }
  .nav-toggle{ display:flex; }
  .site-header.nav-open .main-nav{
    display:flex; flex-direction:column; position:absolute; top:88px; left:0; right:0;
    background:var(--forest); padding:20px 28px 28px; gap:16px; border-bottom:1px solid rgba(255,255,255,.1);
  }
  .hero{ padding-top:88px; }
  .hero-map{ opacity:.12; }
  .section{ padding:70px 0; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .reveal{ transition:none; opacity:1; transform:none; }
  .pulse-ring{ animation:none; }
  .g-item img{ transition:none; }
}
