/* ===== v3 UPGRADE: imagery, motion, effects (plain CSS, loads after styles.css) ===== */
:root{--glow:rgba(228,72,10,.16)}

/* Preloader */
.preloader{display:none}
.js .preloader{position:fixed;inset:0;z-index:200;display:grid;place-items:center;align-content:center;gap:1.4rem;background:radial-gradient(circle at 50% 40%,var(--green-700),var(--green-950) 70%);transition:opacity .7s .1s,visibility .7s .1s}
.preloader img{border-radius:50%;animation:pulse 1.4s ease-in-out infinite}
.preloader span{position:relative;width:140px;height:3px;border-radius:3px;background:rgba(255,255,255,.2);overflow:hidden}
.preloader span::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--orange),var(--gold));transform-origin:0 50%;animation:load 1.6s cubic-bezier(.3,.7,.2,1) forwards}
.preloader.done{opacity:0;visibility:hidden}
@keyframes pulse{50%{transform:scale(1.12)}}
@keyframes load{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* Hero: drifting colour blobs, word-by-word headline, photo slideshow */
.hero{position:relative}
.hero::before,.hero::after{content:"";position:absolute;border-radius:50%;filter:blur(70px);opacity:.55;pointer-events:none;animation:drift 18s ease-in-out infinite alternate}
.hero::before{width:420px;height:420px;background:#f6c9a8;top:-120px;right:-80px}
.hero::after{width:360px;height:360px;background:#bfe0cb;bottom:60px;left:-120px;animation-delay:-8s}
.hero>*{position:relative;z-index:1}
@keyframes drift{to{transform:translate(-60px,50px) scale(1.2)}}
.hero-copy>h1{animation:none}
.w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.08em}
.js .w>span{display:inline-block;transform:translateY(115%)}
.ready .w>span{animation:wordUp .85s cubic-bezier(.2,.7,.2,1) both}
@keyframes wordUp{from{transform:translateY(115%)}to{transform:none}}
.js .hero-photo img{position:absolute;inset:0;opacity:0;transition:opacity 1.3s ease}
.js .hero-photo img.on{opacity:1;animation:kb 9s ease-out both}
@keyframes kb{from{transform:scale(1.02)}to{transform:scale(1.16)}}
.hero-art .chip,.hero-photo,.hero-caption{transition:translate .25s ease-out}

/* Photo strip */
.strip{overflow:hidden;padding:2.2rem 0;background:var(--paper)}
.strip-track{display:flex;gap:1rem;width:max-content;padding-right:1rem;animation:scroll 70s linear infinite}
.strip:hover .strip-track{animation-play-state:paused}
.strip img{height:220px;width:auto;border-radius:var(--radius);object-fit:cover;box-shadow:0 10px 26px rgba(5,52,31,.14);transition:transform .5s cubic-bezier(.2,.7,.2,1)}
.strip img:hover{transform:translateY(-8px) rotate(-1deg)}

/* Programme image cards */
.pillar-photo{position:relative;margin:0 0 1.2rem;border-radius:var(--radius);overflow:hidden;aspect-ratio:16/10;box-shadow:0 14px 30px rgba(5,52,31,.16)}
.pillar-photo img{width:100%;height:100%;object-fit:cover;transition:transform 1.2s cubic-bezier(.2,.7,.2,1)}
.pillar-photo::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(3,34,20,.55))}
.pillar:hover .pillar-photo img{transform:scale(1.08)}

/* Cursor spotlight on cards */
.values li,.involve-card,.pay-card{position:relative;overflow:hidden}
.values li::after,.involve-card::after,.pay-card::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .3s;background:radial-gradient(260px circle at var(--mx,50%) var(--my,50%),var(--glow),transparent 70%)}
.values li:hover::after,.involve-card:hover::after,.pay-card:hover::after{opacity:1}

/* Training filters */
.filters{display:flex;flex-wrap:wrap;gap:.6rem;margin:0 0 2rem}
.filters button{font:600 .95rem var(--font-body);padding:.55rem 1.2rem;border-radius:999px;border:1.5px solid var(--green-900);background:transparent;color:var(--green-900);cursor:pointer;transition:background .25s,color .25s,transform .25s}
.filters button:hover{transform:translateY(-2px)}
.filters button[aria-pressed="true"]{background:var(--green-900);color:#fff}
.event[hidden]{display:none}

/* Buttons: shine + magnetic */
.btn,.to-top{transition:translate .25s ease-out,background .2s,color .2s,border-color .2s,opacity .3s}
.btn-solid::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);translate:-120% 0;transition:translate .7s}
.btn-solid:hover::after{translate:120% 0}

/* Cursor glow */
.cursor-glow{position:fixed;left:-220px;top:-220px;width:440px;height:440px;border-radius:50%;pointer-events:none;z-index:70;background:radial-gradient(circle,rgba(232,197,71,.2),rgba(228,72,10,.07) 45%,transparent 70%);opacity:0;transition:opacity .4s}
.cursor-glow.on{opacity:1}

/* Kente-inspired footer strip */
.site-footer{position:relative}
.site-footer::before{content:"";position:absolute;top:0;left:0;right:0;height:8px;background:repeating-linear-gradient(90deg,var(--orange) 0 28px,var(--gold) 28px 44px,var(--green-700) 44px 72px,var(--navy) 72px 84px)}

/* Lightbox arrows */
.lb-nav{position:fixed;top:50%;translate:0 -50%;width:52px;height:52px;border-radius:50%;border:0;background:rgba(255,255,255,.14);color:#fff;display:grid;place-items:center;cursor:pointer;backdrop-filter:blur(6px);transition:background .25s,scale .25s}
.lb-nav:hover{background:var(--orange-deep);scale:1.1}
.lb-nav.prev{left:1rem}.lb-nav.next{right:1rem}
.lb-nav.prev .ic{transform:rotate(180deg)}
@media (max-width:560px){.lb-nav{width:42px;height:42px;top:auto;bottom:1rem;translate:none}.strip img{height:150px}}

@media (prefers-reduced-motion:reduce){
  .hero::before,.hero::after,.strip-track,.preloader img,.preloader span::after{animation:none}
  .js .hero-photo img.on{animation:none}
  .js .w>span{transform:none}.ready .w>span{animation:none}
  .cursor-glow{display:none}
}

/* ===== v3.1: WhatsApp button, map ===== */
.wa-float{position:fixed;left:1rem;bottom:1rem;z-index:60;display:inline-flex;align-items:center;gap:.55rem;padding:.8rem 1.1rem .8rem .9rem;border-radius:999px;background:#128c4a;color:#fff;text-decoration:none;font-weight:700;font-size:.95rem;box-shadow:0 10px 26px rgba(0,0,0,.25);animation:waPulse 2.6s ease-out infinite}
.wa-float:hover{background:#0b6e3a;color:#fff}
.wa-float .ic{width:1.5rem;height:1.5rem}
@keyframes waPulse{0%{box-shadow:0 10px 26px rgba(0,0,0,.25),0 0 0 0 rgba(18,140,74,.55)}70%,100%{box-shadow:0 10px 26px rgba(0,0,0,.25),0 0 0 16px rgba(18,140,74,0)}}
@media (max-width:560px){.wa-float span{display:none}.wa-float{padding:.85rem;width:52px;height:52px;justify-content:center}}
@media (prefers-reduced-motion:reduce){.wa-float{animation:none}}
.map{margin-top:1.6rem;border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);aspect-ratio:16/10;background:var(--green-100)}
.map iframe{width:100%;height:100%;border:0;display:block}

/* ===== v3.2: hero circle fix (clip reliably, fill the gear hole, tidy chips on phones) ===== */
.hero-photo{inset:15%;border-radius:50%;clip-path:circle(50% at 50% 50%);isolation:isolate;transform:translateZ(0)}
.hero-photo img{border-radius:50%}
@media (max-width:560px){
  .hero-art{width:min(80%,300px);margin-bottom:2.4rem}
  .chip{font-size:.7rem;padding:.3rem .55rem .3rem .4rem;gap:.3rem}
  .c1{left:-10%;top:0}.c2{right:-12%;top:52%}.c3{left:-8%;bottom:4%}
  .hero-caption{font-size:.75rem;bottom:-1.6rem}
}

/* ===== v3.3: keep the photo centred in the gear. main.js nudged only the gear down on scroll,
   so by the time the circle scrolled into view on a phone the photo sat off-centre. ===== */
.gear{translate:none !important}

/* Implementing partners */
.partner-grid{list-style:none;margin:2rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:1.5rem;justify-content:center;align-items:stretch}
.partner-grid li{flex:0 1 320px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid rgba(5,52,31,.12);border-radius:var(--radius);padding:1.5rem;box-shadow:0 10px 24px rgba(5,52,31,.08);transition:transform .35s ease,box-shadow .35s ease}
.partner-grid li:hover{transform:translateY(-4px);box-shadow:0 16px 32px rgba(5,52,31,.14)}
.partner-grid img{max-width:100%;max-height:150px;width:auto;height:auto;object-fit:contain}
.partner-grid li.dark{background:#000;border-color:#000}
.partner-grid li.dark img{max-height:190px}

/* Clean uniform photo tiles (used by the health and book drive galleries) */
.gallery.tiles{display:grid;grid-template-columns:repeat(6,1fr);gap:.6rem}
.gallery.tiles .g-item{flex:none;aspect-ratio:3/4}
.gallery.tiles .g-item::before{display:none}
.gallery.tiles .g-item img{object-position:50% 40%}
@media (max-width:900px){.gallery.tiles{grid-template-columns:repeat(3,1fr)}}
@media (max-width:560px){.gallery.tiles{grid-template-columns:repeat(2,1fr)}}

/* Feature gallery: first photo spans two columns, 7 photos fill two even rows */
.gallery.tiles.tiles-feature{grid-template-columns:repeat(4,1fr)}
.gallery.tiles.tiles-feature .g-item{aspect-ratio:1/1}
.gallery.tiles.tiles-feature .g-item:first-child{grid-column:span 2;aspect-ratio:auto}
@media (max-width:900px){.gallery.tiles.tiles-feature{grid-template-columns:repeat(4,1fr)}}
@media (max-width:560px){.gallery.tiles.tiles-feature{grid-template-columns:repeat(2,1fr)}}

/* Where we work: district chips */
.district-chips{list-style:none;margin:1.6rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.7rem}
.district-chips li{background:#fff;border:1px solid var(--line);border-radius:999px;padding:.55rem 1.1rem;font-weight:600;color:var(--green-900);box-shadow:0 4px 12px rgba(5,52,31,.05)}

/* Leadership and governance */
.gov{display:grid;gap:1.8rem;max-width:960px;margin:2.2rem auto 0}
.gov-tier{display:grid;gap:1rem;position:relative}
.gov-tier.two{grid-template-columns:repeat(2,1fr)}
.gov-tier.one{max-width:520px;width:100%;margin-inline:auto}
.gov-tier+.gov-tier::before{content:"";position:absolute;left:50%;top:-1.8rem;height:1.8rem;width:2px;background:var(--green-900);opacity:.25}
.gov-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.3rem 1.4rem 1.5rem;box-shadow:0 10px 24px rgba(5,52,31,.07);text-align:center}
.gov-card.top{background:var(--green-900);border-color:var(--green-900);color:#fff}
.gov-card.top p{color:rgba(255,255,255,.85)}
.gov-card.top .gov-tag{background:rgba(255,255,255,.16);color:#fff}
.gov-tag{display:inline-block;font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;background:var(--green-100);color:var(--green-900);border-radius:999px;padding:.25rem .75rem;margin-bottom:.7rem}
.gov-card h3{font-size:1.2rem;margin:0 0 .4em}
.gov-card p{margin:0;color:var(--muted);font-size:.98rem}
@media (max-width:700px){.gov-tier.two{grid-template-columns:1fr}.gov-tier+.gov-tier::before{display:none}}
.gov-card.top h3{color:#fff}

/* Centered card rows so odd counts never leave an orphan on the left */
.values.centered{display:flex;flex-wrap:wrap;justify-content:center;gap:1.2rem}
.values.centered li{flex:0 1 260px}
.values.centered.c3 li{flex-basis:calc((100% - 2.4rem)/3)}
.values.centered.c4 li{flex-basis:calc((100% - 3.6rem)/4)}
@media (max-width:900px){.values.centered.c3 li,.values.centered.c4 li{flex-basis:calc((100% - 1.2rem)/2)}}
@media (max-width:560px){.values.centered.c3 li,.values.centered.c4 li{flex-basis:100%}}

/* Leader portraits */
.gov-card.person{padding-top:1.6rem}
.gov-photo{display:block;width:132px;height:132px;border-radius:50%;object-fit:cover;object-position:50% 30%;margin:0 auto 1rem;border:4px solid var(--green-100);box-shadow:0 8px 20px rgba(5,52,31,.15)}
.gov-card:not(.person){display:flex;flex-direction:column;justify-content:center;align-items:center}

/* Leadership team grid */
.team{list-style:none;margin:2.2rem auto 0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:1.4rem;max-width:1000px}
.team .gov-card{flex:0 1 calc((100% - 2.8rem)/3);padding:1.8rem 1rem 1.6rem}
.team .gov-photo{width:150px;height:150px}
.team .gov-card h3{margin:.2rem 0 .6rem}
.team .gov-tag{margin:0}
@media (max-width:760px){.team .gov-card{flex-basis:calc((100% - 1.4rem)/2)}}
@media (max-width:440px){.team .gov-card{flex-basis:100%}}

/* Smocklane card blends with its dark logo background */
.partner-grid li.smocklane{background:#121617;border-color:#121617}
.partner-grid li.smocklane img{max-height:200px}

/* Link to the full leadership page */
.team-more{text-align:center;margin:2rem 0 0}

/* Leadership page */
.page-top{padding-top:clamp(2rem,4vw,3.5rem)}
.back{margin:0 0 1.2rem}
.back a{font-weight:600;color:var(--green-900)}
.sec-head h1{margin:0;font-size:clamp(2rem,4.6vw,3.2rem);line-height:1.05}
.gov-tier.three{grid-template-columns:repeat(3,1fr)}
.gov .gov-card.person{padding:1.4rem 1rem 1.3rem}
.gov .gov-photo{width:120px;height:120px}
.gov .gov-card.person h3{margin:.2rem 0 .6rem}
.gov .gov-card.person .gov-tag{margin:0}
@media (max-width:700px){.gov-tier.three{grid-template-columns:1fr}}

/* Uniform partner cards: four per row, same height */
.partner-grid li{flex:0 1 calc((100% - 4.5rem)/4);height:190px;padding:1rem}
.partner-grid img{max-height:100%}
.partner-grid li.dark img,.partner-grid li.smocklane img{max-height:100%;border-radius:6px}
@media (max-width:900px){.partner-grid li{flex-basis:calc((100% - 1.5rem)/2)}}
@media (max-width:480px){.partner-grid li{flex-basis:100%}}

/* Captioned photo cards (each photo has its own event caption) */
.gallery.cap-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;align-items:start}
.gallery.cap-grid figure{margin:0}
.gallery.cap-grid img{position:static;display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius);cursor:zoom-in}
.gallery.cap-grid figcaption{margin:.6rem .2rem 0;font-size:.92rem;line-height:1.4;color:var(--muted)}
@media (max-width:900px){.gallery.cap-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:480px){.gallery.cap-grid{grid-template-columns:1fr}}

/* Five captioned photos: one row on wide screens, centered rows below */
.gallery.cap-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:1rem}
.gallery.cap-grid figure{flex:0 1 calc((100% - 4rem)/5)}
@media (max-width:1000px){.gallery.cap-grid figure{flex-basis:calc((100% - 2rem)/3)}}
@media (max-width:600px){.gallery.cap-grid figure{flex-basis:calc((100% - 1rem)/2)}}
@media (max-width:420px){.gallery.cap-grid figure{flex-basis:100%}}
