/* ===== Patel Foundation Trust — earth palette =====
   Greens lead, browns are warm neutrals, burnt orange = actions only, copper = decoration only. */
:root {
  /* Greens (primary) */
  --pf-forest: #1F4D3A;
  --pf-forest-deep: #163828;
  --pf-leaf: #5E8C4A;
  --pf-leaf-soft: #E4EDDC;
  /* Browns (neutrals) */
  --pf-earth: #5A3E2B;
  --pf-bark: #3B2A1E;
  --pf-clay: #C9B79C;
  --pf-sand: #F5EFE4;
  --pf-cream: #FBF8F2;
  /* Accents */
  --pf-orange: #B85C12;
  --pf-orange-hover: #9A4C0E;
  --pf-copper: #B87333;
  --pf-copper-dark: #8A5220;
  --pf-copper-light: #D9955A;
  /* Roles */
  --pf-bg: var(--pf-sand);
  --pf-surface: var(--pf-cream);
  --pf-text: var(--pf-earth);
  --pf-heading: var(--pf-forest);
  --pf-border: var(--pf-clay);
  --pf-link: var(--pf-forest);
  --pf-focus: 0 0 0 3px rgba(184, 92, 18, 0.45);
  --pf-radius: 10px;

  --shadow: 0 10px 28px -14px rgba(59, 42, 30, .35);
  --shadow-lg: 0 28px 56px -22px rgba(59, 42, 30, .45);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 76px;

  /* Theme colour code (one per focus area; used as frames) */
  --th-health: #B5523B;     --th-health-soft: #F6E3DD;
  --th-education: #2F7F7A;  --th-education-soft: #DCEDEB;
  --th-community: #4E7A3C;  --th-community-soft: #E4EDDC;
  --th-enterprise: #C08A1E; --th-enterprise-soft: #F6EBD3;
  --th-partners: #4F6D8F;   --th-partners-soft: #E1E8F0;
}
.t-health     { --theme: var(--th-health);     --theme-soft: var(--th-health-soft);     --theme-ink: #fff; }
.t-education  { --theme: var(--th-education);  --theme-soft: var(--th-education-soft);  --theme-ink: #fff; }
.t-community  { --theme: var(--th-community);  --theme-soft: var(--th-community-soft);  --theme-ink: #fff; }
.t-enterprise { --theme: var(--th-enterprise); --theme-soft: var(--th-enterprise-soft); --theme-ink: #3B2A1E; }
.t-partners   { --theme: var(--th-partners);   --theme-soft: var(--th-partners-soft);   --theme-ink: #fff; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body { margin: 0; font-family: var(--sans); background: var(--pf-bg); color: var(--pf-text); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; color: var(--pf-heading); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -.02em; color: var(--pf-forest); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.015em; }
h3 { font-size: 1.22rem; }
h1 em, h2 em { color: var(--pf-copper-dark); font-style: normal; }
p { margin: 0 0 1em; }
a { color: var(--pf-link); text-decoration-color: var(--pf-copper); text-underline-offset: 3px; }
a:hover { color: var(--pf-orange); }
:focus-visible { outline: none; box-shadow: var(--pf-focus); border-radius: 4px; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section.alt { background: var(--pf-cream); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head > p:last-child { font-size: 1.08rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.15rem; max-width: 560px; }

/* Eyebrow labels */
.eyebrow { color: var(--pf-copper-dark); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; font-weight: 700; margin-bottom: 1em; }
.eyebrow::after { content: ""; display: block; width: 40px; height: 2px; margin-top: 8px; background: var(--pf-copper); }
.center .eyebrow::after { margin-inline: auto; }

/* Icons (drawn inline by main.js) */
i[data-icon] { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; }
.icon-badge { width: 48px; height: 48px; border-radius: 12px; background: var(--pf-leaf-soft); color: var(--pf-leaf); display: grid; place-items: center; margin-bottom: 14px; }
.icon-badge i[data-icon] { width: 26px; height: 26px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border-radius: var(--pf-radius); transition: background .2s, color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--pf-orange); color: #fff; border: 0; padding: .75rem 1.4rem; }
.btn-primary:hover { background: var(--pf-orange-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--pf-forest); border: 1.5px solid var(--pf-forest); padding: .7rem 1.35rem; }
.btn-secondary:hover { background: var(--pf-leaf-soft); color: var(--pf-forest); }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }

/* Dark (forest) sections */
.section-dark { background: var(--pf-forest); color: var(--pf-sand); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: var(--pf-sand); }
.section-dark .eyebrow { color: var(--pf-copper-light); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; background: var(--pf-forest); color: var(--pf-sand); height: var(--header-h); display: flex; align-items: center; transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 6px 20px -10px rgba(0,0,0,.45); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(1180px, 100% - 32px); }
.brand { background: var(--pf-cream); border-radius: 12px; padding: 6px 12px; display: block; line-height: 0; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a:not(.btn) { color: var(--pf-sand); text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%; background: var(--pf-copper-light); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav a:not(.btn):hover { color: #fff; }
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--pf-sand); margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; padding: calc(var(--header-h) + 64px) 0 64px; overflow: hidden; background: radial-gradient(ellipse at 85% 10%, var(--pf-leaf-soft), transparent 55%), var(--pf-sand); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; justify-self: center; }
.tree-orb { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff, var(--pf-cream) 60%, var(--pf-leaf-soft)); border: 1px solid var(--pf-clay); box-shadow: var(--shadow-lg); display: grid; place-items: center; }
.tree-orb img { width: 70%; }
.float-card { position: absolute; background: var(--pf-cream); border: 1px solid var(--pf-clay); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); max-width: 190px; animation: bob 6s ease-in-out infinite; }
.float-card strong { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--pf-copper-dark); line-height: 1.1; font-variant-numeric: tabular-nums; }
.float-card span { font-size: .8rem; line-height: 1.3; display: block; }
.fc1 { top: 4%; left: -4%; }
.fc2 { top: 42%; right: -6%; animation-delay: -2s; }
.fc3 { bottom: 2%; left: 6%; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.stats { margin-top: 60px; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.stat { padding: 26px 24px; border-right: 1px solid rgba(245,239,228,.12); }
.stat:last-child { border-right: 0; }
.stat-number { display: block; font-family: var(--serif); font-size: 2.3rem; line-height: 1.1; font-weight: 700; color: var(--pf-copper-dark); font-variant-numeric: tabular-nums; }
.section-dark .stat-number { color: var(--pf-copper-light); }
.stat span { font-size: .9rem; color: var(--pf-sand); }

/* Medical camp gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 12px; }
.g-item { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--pf-leaf-soft); }
.g-big { grid-column: span 2; grid-row: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.g-item:hover img { transform: scale(1.05); }
.g-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; text-align: left; color: #fff; font-weight: 600; font-size: .88rem; background: linear-gradient(transparent, rgba(22,56,40,.8)); }

/* Cards */
.card { background: var(--pf-surface); border: 1px solid var(--pf-border); border-radius: 14px; transition: border-color .2s, box-shadow .3s, transform .3s; }
.card:hover { border-color: var(--pf-leaf); }
.section.alt .card { background: #fff; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.principle { margin: 28px 0 0; padding: 20px 24px; border-left: 3px solid var(--pf-copper); background: var(--pf-sand); border-radius: 0 12px 12px 0; font-family: var(--serif); font-size: 1.18rem; color: var(--pf-forest); }
.pvm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pvm-card { padding: 24px; }
.pvm-card.wide { grid-column: 1 / -1; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--pf-leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Approach — tree */
.approach { background: linear-gradient(rgba(31,77,58,.9), rgba(22,56,40,.95)), url("https://images.unsplash.com/photo-1558694440-03ade9215d7b?auto=format&fit=crop&w=1800&q=70") center/cover no-repeat, var(--pf-forest); }
.approach .section-head p:last-child { color: var(--pf-sand); }
.tree-diagram { display: grid; justify-items: center; }
.canopy { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin-bottom: -8px; position: relative; z-index: 2; }
.leaf { background: var(--theme, rgba(94,140,74,.28)); border: 1px solid rgba(255,255,255,.25); color: var(--theme-ink, var(--pf-leaf-soft)); padding: 8px 18px; border-radius: 999px 999px 999px 4px; font-weight: 600; font-size: .95rem; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.leaf:hover { color: var(--theme-ink); transform: translateY(-2px); box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); }
.section-dark a.leaf { color: var(--theme-ink); }
.trunk-img { width: min(290px, 70vw); aspect-ratio: 1; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle, var(--pf-cream) 55%, rgba(251,248,242,0) 72%); border-radius: 50%; }
.roots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.root { font: inherit; font-weight: 600; cursor: pointer; background: rgba(90,62,43,.55); color: var(--pf-sand); border: 1px solid var(--pf-copper); padding: 10px 22px; border-radius: 4px 4px 999px 999px; transition: background .2s, color .2s; }
.root:hover, .root.active { background: var(--pf-copper-light); color: var(--pf-bark); }
.root-panel { margin-top: 24px; max-width: 560px; text-align: center; background: rgba(22,56,40,.6); border: 1px solid rgba(201,183,156,.35); border-radius: 14px; padding: 22px 28px; min-height: 116px; }
.root-panel h3 { color: var(--pf-copper-light); }
.root-panel p { margin: 0; color: var(--pf-sand); }
.root-panel.swap { animation: fadeUp .35s ease; }

/* Pillars */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pillar { display: grid; grid-template-rows: 200px auto; overflow: hidden; }
.pillar-img { position: relative; background: var(--pf-leaf-soft); }
.pillar-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pillar-body { padding: 24px 26px 26px; }
.pillar h3 { display: flex; align-items: center; gap: 10px; }
.pillar h3 i[data-icon] { color: var(--pf-leaf); width: 26px; height: 26px; }
.pillar ul { margin: 0; padding-left: 1.1em; }
.pillar li { margin-bottom: 6px; }
.pillar li::marker { color: var(--pf-copper); }
.pillar b { color: var(--pf-bark); }

/* Projects */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .92rem; font-weight: 600; border: 0; background: var(--pf-leaf-soft); color: var(--pf-forest); padding: .4rem .95rem; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.chip:hover { background: #d6e4cb; }
.chip.is-active { background: var(--pf-forest); color: #fff; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--pf-border); border-radius: 999px; padding: 6px 16px; min-width: 240px; color: var(--pf-earth); }
.search input { border: 0; background: transparent; font: inherit; color: var(--pf-bark); outline: none; width: 100%; padding: 4px 0; }
.search:focus-within { border-color: var(--pf-leaf); box-shadow: var(--pf-focus); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; text-align: left; animation: fadeUp .4s ease both; }
.project-card:hover, .project-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--pf-leaf-soft); color: var(--pf-leaf); display: grid; place-items: center; }
.card-media > i[data-icon] { width: 56px; height: 56px; opacity: .85; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.project-card:hover .card-media img { transform: scale(1.05); }
.tag, .status { position: absolute; top: 12px; z-index: 2; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag { left: 12px; background: var(--pf-leaf-soft); color: var(--pf-forest); text-transform: uppercase; }
.status { right: 12px; background: var(--pf-forest); color: #fff; }
.status.completed { background: var(--pf-leaf); }
.status.mobilisation { background: var(--pf-cream); color: var(--pf-copper-dark); border: 1.5px solid var(--pf-copper); }
.card-body { padding: 18px 22px 22px; display: flex; flex-direction: column; flex: 1; width: 100%; }
.card-body .meta { font-size: .8rem; color: var(--pf-copper-dark); margin-bottom: 6px; }
.card-body h3 { font-size: 1.15rem; margin-bottom: .4em; }
.card-body p { font-size: .95rem; margin-bottom: 14px; }
.more { margin-top: auto; font-weight: 600; color: var(--pf-forest); font-size: .9rem; }
.empty { text-align: center; padding: 30px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px; width: 2px; background: var(--pf-clay); }
.timeline-item { display: grid; grid-template-columns: 100px 1fr; gap: 44px; padding-bottom: 32px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 112px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--pf-copper); }
.timeline-item.is-upcoming::before { background: var(--pf-sand); border: 2px solid var(--pf-copper); }
.when { font-weight: 700; color: var(--pf-copper-dark); text-align: right; font-size: .95rem; padding-top: 2px; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 1.15rem; margin-bottom: .3em; }
.timeline p { margin: 0; }
.t-state { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.t-state.done { background: var(--pf-leaf-soft); color: var(--pf-forest); }
.t-state.start { background: var(--pf-forest); color: #fff; }
.t-state.mob { border: 1.5px solid var(--pf-copper); color: var(--pf-copper-dark); }

/* Kenya */
.kenya { background: var(--pf-bark); }
.kenya p { color: var(--pf-sand); }
.kenya-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.kenya-photo { margin: 24px 0 0; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; border: 1px solid rgba(201,183,156,.35); }
.kenya-photo img { width: 100%; height: 100%; object-fit: cover; }
.kenya-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kenya-list li { background: rgba(245,239,228,.06); border: 1px solid rgba(201,183,156,.3); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; color: var(--pf-sand); transition: background .2s; }
.kenya-list li:hover { background: rgba(245,239,228,.12); }
.kenya-list i[data-icon] { color: var(--pf-copper-light); width: 24px; height: 24px; }

/* Donate */
.give-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.give { padding: 24px; display: flex; flex-direction: column; }
.give p { flex: 1; }
.give .btn { align-self: stretch; }
.give-note { margin-top: 24px; }

/* Partners */
.partner-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.partner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.mono { flex: none; width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; background: var(--pf-leaf-soft); color: var(--pf-forest); font-family: var(--serif); font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.mono i[data-icon] { width: 34px; height: 34px; }
.partner:hover .mono { background: var(--pf-forest); color: var(--pf-sand); }
.mono { transition: background .2s, color .2s; }
.partner img.logo { width: 52px; height: 52px; object-fit: contain; }
.partner b { display: block; color: var(--pf-bark); line-height: 1.3; }
.partner small { color: var(--pf-copper-dark); font-size: .8rem; }

/* Story & governance */
.story-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.governance { padding: 28px; }
.governance dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: .95rem; }
.governance dt { font-weight: 600; color: var(--pf-bark); }
.governance dd { margin: 0; }

/* Contact */
.cta p { color: var(--pf-sand); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.contact-list b { display: inline-block; width: 90px; color: var(--pf-copper-light); font-weight: 600; }
.form { background: var(--pf-cream); color: var(--pf-text); border-radius: 14px; padding: 28px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--pf-bark); }
input, select, textarea { font: inherit; font-weight: 400; padding: 11px 13px; background: #fff; border: 1px solid var(--pf-border); border-radius: 8px; color: var(--pf-bark); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--pf-leaf); box-shadow: var(--pf-focus); outline: none; }
.form .invalid { border-color: #a4321f; }
.form-note { margin: 0; font-size: .9rem; color: var(--pf-forest); min-height: 1.2em; }

/* Footer */
.site-footer { background: var(--pf-forest-deep); color: var(--pf-sand); padding: 44px 0 30px; font-size: .92rem; }
.site-footer a { color: var(--pf-sand); }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; }
.footer-logo { height: 54px; width: auto; background: var(--pf-cream); padding: 8px 12px; border-radius: 12px; }
.footer-grid p { margin: 0; }

.to-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--pf-forest); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 1.2rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s, transform .3s; z-index: 40; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: #fff; background: var(--pf-forest-deep); }

/* Project modal */
.modal { border: 0; padding: 0; border-radius: 18px; width: min(860px, 100% - 32px); max-height: 90vh; overflow: auto; background: var(--pf-cream); color: var(--pf-text); box-shadow: var(--shadow-lg); }
.modal::backdrop, .lightbox::backdrop { background: rgba(22, 56, 40, .75); }
.modal[open] { animation: pop .25s ease; }
.modal-close { position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--pf-clay); background: var(--pf-cream); color: var(--pf-bark); font-size: 1.6rem; cursor: pointer; }
.modal-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 4px; background: var(--pf-forest); }
.modal-gallery img { height: 340px; width: auto; max-width: 100%; object-fit: cover; scroll-snap-align: start; flex: 0 0 auto; }
.modal-gallery .fallback { height: 200px; width: 100%; display: grid; place-items: center; background: var(--pf-leaf-soft); color: var(--pf-leaf); }
.modal-gallery .fallback i[data-icon] { width: 72px; height: 72px; }
.modal-body { padding: 26px 30px 32px; }
.modal-body h3 { font-size: 1.7rem; }
.modal-body ul { padding-left: 1.2em; }
.modal-body li::marker { color: var(--pf-copper); }
.modal-body blockquote { margin: 18px 0; padding: 14px 18px; background: var(--pf-leaf-soft); border-left: 3px solid var(--pf-leaf); border-radius: 0 12px 12px 0; font-style: italic; }
.modal-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.modal-stats div { background: var(--pf-sand); border: 1px solid var(--pf-clay); border-radius: 10px; padding: 10px 16px; }
.modal-stats strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--pf-copper-dark); line-height: 1.1; }
.modal-stats span { font-size: .8rem; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; max-width: min(1100px, 92vw); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { color: var(--pf-sand); text-align: center; margin-top: 10px; font-weight: 500; }
.lb-close, .lb-nav { position: fixed; border: 0; background: rgba(251,248,242,.92); color: var(--pf-bark); border-radius: 50%; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1000px) {
  .give-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero-grid, .about-grid, .kenya-grid, .story-grid, .cta-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 360px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(245,239,228,.12); }
  .pillars { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav { position: fixed; top: calc(var(--header-h) - 4px); left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 2px; background: var(--pf-forest); border: 1px solid rgba(201,183,156,.35); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-lg); transform: translateY(-10px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a:not(.btn) { padding: 10px 12px; border-radius: 8px; }
  .nav a:not(.btn):hover { background: var(--pf-forest-deep); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 6px; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 160px; }
}
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .brand img { height: 36px; }
  .pvm, .checks, .kenya-list, .form .row, .give-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .timeline::before { left: 6px; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; }
  .timeline-item::before { left: 0; }
  .when { text-align: left; }
  .float-card { max-width: 150px; padding: 10px 12px; }
  .float-card strong { font-size: 1.3rem; }
  .fc1 { left: 0; } .fc2 { right: 0; }
  .search { min-width: 0; width: 100%; }
  .modal-gallery img { height: 230px; }
  .modal-body { padding: 22px; }
  .governance dl { grid-template-columns: 1fr; gap: 2px; }
  .governance dd { margin-bottom: 10px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Theme frames ===== */
.theme-frame { position: relative; border: 3px solid var(--theme); border-radius: 20px; padding: clamp(28px, 4vw, 48px) clamp(18px, 3.5vw, 44px) clamp(22px, 3.5vw, 40px); }
.theme-label { position: absolute; top: 0; left: clamp(18px, 3vw, 36px); transform: translateY(-50%); background: var(--theme); color: var(--theme-ink); font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.theme-frame .section-head { margin-bottom: 28px; }
.theme-frame.kenya-grid { display: grid; }
.theme-card { border: 2px solid var(--theme); }
.theme-card:hover { border-color: var(--theme); box-shadow: 0 14px 30px -18px var(--theme); }
.theme-card .icon-badge, .theme-card h3 i[data-icon] { background: var(--theme-soft); color: var(--theme); }
.pillar.theme-card h3 i[data-icon] { background: none; }
.pillar.theme-card li::marker { color: var(--theme); }
.project-card.theme-card .card-media { background: var(--theme-soft); color: var(--theme); }
.project-card.theme-card .tag { background: var(--theme); color: var(--theme-ink); }
.timeline-item[class*="t-"]::before { background: var(--theme); }
.timeline-item.is-upcoming[class*="t-"]::before { background: var(--pf-sand); border-color: var(--theme); }
.modal.theme-card { border: 0; border-top: 6px solid var(--theme); }
.modal.theme-card .eyebrow { color: var(--theme); }
.modal.theme-card .eyebrow::after { background: var(--theme); }
.theme-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: -12px 0 24px; font-size: .85rem; }
.theme-legend span { display: inline-flex; align-items: center; gap: 6px; }
.theme-legend span::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--theme); }
.t-partners .mono { background: var(--theme-soft); color: var(--theme); }
.t-partners .partner:hover .mono { background: var(--theme); color: var(--theme-ink); }
.t-partners .partner:hover { border-color: var(--theme); }
