/* ==========================================================================
   Meridian — main stylesheet
   One file shared by every page. Sections:
   1. Tokens         6. Buttons & links     11. Stories
   2. Base           7. Cards & benefits    12. Footer
   3. Navigation     8. Steps               13. Motion & utilities
   4. Sections       9. Numbers
   5. Hero          10. Businesses
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Brand colours */
  --green: #0f3d2e;           /* main colour */
  --green-2: #164b39;         /* raised surfaces on green */
  --green-deep: #0a2c21;
  --gold: #d9a441;            /* accent: decoration, and text on green only */
  --gold-text: #8a5a0b;       /* gold for text on cream (5.6:1 contrast) */
  --cream: #f7f3ea;           /* main background */
  --cream-2: #efe7d6;         /* alternate sections */
  --paper: #fffdf8;           /* cards */
  --ink: #23251f;             /* charcoal body text (14:1 on cream) */
  --ink-muted: #565a51;       /* secondary text (6.4:1 on cream) */
  --line: rgba(35, 37, 31, 0.14);
  --on-green: #f7f3ea;
  --on-green-muted: rgba(247, 243, 234, 0.78);
  --line-on-green: rgba(247, 243, 234, 0.16);

  --serif: "Instrument Serif", "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --nav-w: 240px;
  --gutter: clamp(16px, 5vw, 80px);
  --max: 1200px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 61, 46, 0.06), 0 8px 24px -12px rgba(15, 61, 46, 0.18);
  --shadow-lift: 0 2px 4px rgba(15, 61, 46, 0.06), 0 22px 40px -18px rgba(15, 61, 46, 0.35);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
}
h3 { line-height: 1.2; }

p { margin: 0 0 1em; }

::selection { background: var(--gold); color: var(--green-deep); }

/* Visible keyboard focus everywhere (green on cream, gold on green) */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-green :focus-visible,
.site-nav :focus-visible,
.nav-overlay :focus-visible { outline-color: var(--gold); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--green-deep);
  font-weight: 600;
  border-radius: 6px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Main content sits to the right of the fixed nav on large screens */
.page { padding-left: var(--nav-w); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 3. Navigation ------------------------------------------------------------ */
.site-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav-w);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 36px 28px 28px;
  background: var(--green-deep);
  color: var(--on-green);
}

.wordmark {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Small gold globe mark beside the wordmark */
.wordmark::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: linear-gradient(90deg, transparent 45%, var(--gold) 45% 55%, transparent 55%);
}

.nav-links {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-links a {
  display: block;
  padding: 9px 12px;
  margin: 0 -12px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  color: var(--on-green-muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--on-green); background: rgba(247, 243, 234, 0.06); }
.nav-links a[aria-current="page"] {
  color: var(--on-green);
  background: rgba(217, 164, 65, 0.14);
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-cta { margin-top: 28px; }
/* Compact button so "Apply for funding" stays on one line in the sidebar */
.nav-cta .btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
}

/* Mobile top bar + hamburger (hidden on desktop) */
.nav-toggle { display: none; }
.nav-overlay { display: none; }

@media (max-width: 1023px) {
  .page { padding-left: 0; padding-top: 64px; }

  .site-nav {
    inset: 0 0 auto 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 20px;
  }
  .wordmark { font-size: 26px; }
  .site-nav .nav-links, .site-nav .nav-cta { display: none; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px; height: 44px;
    padding: 0 10px;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 120;
  }
  .nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--on-green);
    transition: transform 0.3s var(--ease);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  /* Full-screen overlay menu */
  .nav-overlay {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 110;
    padding: 96px 24px 32px;
    overflow-y: auto;
    background: var(--green-deep);
    color: var(--on-green);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s var(--ease);
  }
  .nav-overlay ul { list-style: none; margin: 0; padding: 0; }
  .nav-overlay li { border-top: 1px solid var(--line-on-green); }
  .nav-overlay li:last-child { border-bottom: 1px solid var(--line-on-green); }
  .nav-overlay a:not(.btn) {
    display: block;
    padding: 14px 0;
    font-family: var(--serif);
    font-size: clamp(30px, 8vw, 44px);
    line-height: 1.15;
    text-decoration: none;
  }
  .nav-overlay a[aria-current="page"] { color: var(--gold); }
  .nav-overlay .nav-cta { margin-top: 28px; }
  .nav-overlay .nav-cta .btn { min-height: 48px; padding: 12px 24px; font-size: 16px; }

  body.menu-open { overflow: hidden; }
}

/* 4. Sections -------------------------------------------------------------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--alt { background: var(--cream-2); }
.section--green {
  background: var(--green);
  color: var(--on-green);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.label::before {
  content: "";
  width: 20px; height: 2px;
  background: var(--gold);
}
.section--green .label, .hero .label, .page-head .label { color: var(--gold); }

.section-head { max-width: 46rem; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(36px, 4.6vw, 60px); }
.section-head p { margin-top: 18px; font-size: 18px; color: var(--ink-muted); }
.section--green .section-head p { color: var(--on-green-muted); }

.section-foot { margin-top: 40px; }

/* Big one-sentence summary */
.summary {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  max-width: 30ch;
  margin: 0;
}

/* Inner-page header (non-home pages) */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--green);
  color: var(--on-green);
  padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px);
}
.page-head h1 { font-size: clamp(44px, 6vw, 84px); max-width: 16ch; }
.page-head p { margin-top: 20px; max-width: 38rem; font-size: 19px; color: var(--on-green-muted); }

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 45%, var(--green-2) 0%, var(--green) 55%, var(--green-deep) 100%);
  color: var(--on-green);
}
/* Desktop: hero fills the first screen; text and globe are centred vertically */
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 40px;
  padding-bottom: 40px;
}
/* The headline is sized from its own column width (cqi), so the three
   lines "Funding for / small businesses / ready to grow." never re-wrap. */
.hero-text { container-type: inline-size; }
.hero h1 {
  font-size: clamp(40px, 6vw, 80px);              /* fallback for older browsers */
  font-size: clamp(40px, 13.2cqi, 82px);
  line-height: 1.02;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub { margin: 24px 0 32px; max-width: 34rem; font-size: clamp(17px, 1.5vw, 20px); color: var(--on-green-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 40px 0 0;
  padding: 24px 0 0;
  list-style: none;
  border-top: 1px solid var(--line-on-green);
  font-size: 14px;
  color: var(--on-green-muted);
}
.hero-facts strong { display: block; color: var(--on-green); font-size: 16px; font-weight: 600; }

/* Globe: never taller than ~70% of the screen, so it always fits the first view */
.hero-visual {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 70vh, 580px);
  justify-self: center;
}
.hero-canvas { width: 100%; height: 100%; }
.hero-caption {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line-on-green);
  border-radius: 99px;
  background: rgba(10, 44, 33, 0.6);
  font-size: 13px;
  white-space: nowrap;
  color: var(--on-green-muted);
}
.hero-caption::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; gap: 8px; }
  .hero-visual { width: min(100%, 420px); margin: 24px auto 0; }
}
@media (max-width: 767px) {
  .hero-visual { width: min(100%, 360px); }
}

/* 6. Buttons & links ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--gold);
  border-radius: 99px;
  background: var(--gold);
  color: var(--green-deep);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background-color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(217, 164, 65, 0.8); }
.btn--outline { background: transparent; color: var(--on-green); border-color: rgba(247, 243, 234, 0.45); }
.btn--outline:hover { border-color: var(--on-green); box-shadow: none; }
.btn--green { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn--green:hover { box-shadow: 0 10px 24px -10px rgba(15, 61, 46, 0.6); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: gap 0.2s var(--ease);
}
.text-link:hover { gap: 12px; }
.section--green .text-link { color: var(--on-green); }

/* Line icons (inline SVG, stroke = currentColor) */
.icon {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green);
  color: var(--gold);
  flex-shrink: 0;
}
.icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 7. Cards & benefits ------------------------------------------------------ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /* Hover lift uses `translate` so it never fights the scroll-reveal `transform` */
  transition: translate 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { translate: 0 -6px; box-shadow: var(--shadow-lift); }

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0; padding: 0; list-style: none;
}
.benefit { padding: 32px 28px; }
.benefit h3 { font-size: 28px; margin: 24px 0 10px; }
.benefit p { margin: 0; color: var(--ink-muted); }

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 64px;
  align-items: end;
  margin-bottom: 56px;
}
.intro p { margin: 0; font-size: 18px; color: var(--ink-muted); }

@media (max-width: 1023px) {
  .benefits { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; }
}

/* 8. Steps (home preview) -------------------------------------------------- */
.steps-preview {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0; padding: 0; list-style: none;
  counter-reset: step;
}
/* Dashed connector line behind the step icons */
.steps-preview::before {
  content: "";
  position: absolute;
  top: 28px; left: 28px; right: 28px;
  border-top: 2px dashed rgba(15, 61, 46, 0.25);
}
.step-mini { position: relative; }
.step-mini .icon { position: relative; box-shadow: 0 0 0 8px var(--cream-2); }
.step-num {
  display: block;
  margin: 22px 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.step-mini h3 { font-size: 26px; margin-bottom: 8px; }
.step-mini p { margin: 0; color: var(--ink-muted); font-size: 16px; }

@media (max-width: 1023px) {
  .steps-preview { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .steps-preview::before { display: none; }
}
@media (max-width: 559px) {
  .steps-preview { grid-template-columns: 1fr; }
}

/* 9. Numbers --------------------------------------------------------------- */
.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0; padding: 0; list-style: none;
}
.number {
  padding: 8px 28px;
  border-left: 1px solid var(--line-on-green);
}
.number:first-child { border-left: 0; padding-left: 0; }
.number-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(52px, 5.6vw, 80px);
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.number-label { display: block; margin-top: 12px; color: var(--on-green-muted); font-size: 15px; max-width: 14rem; }

@media (max-width: 1023px) {
  .numbers { grid-template-columns: 1fr 1fr; gap: 36px 0; }
  .number:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 400px) {
  .numbers { grid-template-columns: 1fr; }
  .number { border-left: 0; padding-left: 0; }
}

/* 10. Businesses ----------------------------------------------------------- */
.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}
.business {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.business[hidden] { display: none; }
.business-art {
  position: relative;
  height: 150px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--gold);
  overflow: hidden;
}
/* Soft circle behind each business illustration */
.business-art::before {
  content: "";
  position: absolute;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.22), transparent 70%);
  transition: transform 0.5s var(--ease);
}
.business:hover .business-art::before { transform: scale(1.25); }
.business-art svg {
  position: relative;
  width: 76px; height: 76px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}
.business:hover .business-art svg { transform: translateY(-4px) rotate(-4deg); }
.business-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.business-tag {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(217, 164, 65, 0.18);
  color: var(--gold-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.business h3 { font-size: 26px; }
.business-owner { margin: 4px 0 14px; font-size: 14px; color: var(--ink-muted); }
.business-result { margin: 0; font-size: 15.5px; }
.business-result strong { color: var(--green); }

/* 11. Stories -------------------------------------------------------------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.quote {
  display: flex;
  flex-direction: column;
  margin: 0;                 /* quotes are <figure>s; drop the browser's default side margin */
  padding: 32px 28px 28px;
}
.quote blockquote {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.3;
}
.quote blockquote::before {
  content: "\201C";
  display: block;
  height: 36px;
  font-size: 72px;
  line-height: 1;
  color: var(--gold);
}
.quote-result {
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--cream-2);
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
}
.quote-who { margin: 16px 0 0; font-size: 14px; color: var(--ink-muted); }
.quote-who strong { color: var(--ink); }

@media (max-width: 1023px) { .quotes { grid-template-columns: 1fr; } }

/* Closing call to action */
.cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.cta h2 { font-size: clamp(38px, 5vw, 68px); }
.cta p { margin: 18px 0 0; font-size: 18px; color: var(--on-green-muted); max-width: 32rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 1023px) {
  .cta { grid-template-columns: 1fr; }
  .cta-actions { justify-content: flex-start; }
}

/* Page header with a visual on the right ---------------------------------- */
.page-head-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px 48px;
  align-items: center;
}
@media (max-width: 1023px) { .page-head-grid { grid-template-columns: 1fr; } }

/* Draw-in line art: give SVG shapes pathLength="1" and they draw when the
   parent gets .is-visible (or immediately with reduced motion). */
.js .draw [pathLength] {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .draw.is-visible [pathLength] { stroke-dashoffset: 0; }

/* How it works: scroll-drawn process path ------------------------------- */
.process { position: relative; }
.process-list { list-style: none; margin: 0; padding: 0; }
/* Grey track + gold fill; JS scales the fill as you scroll */
.process-track, .process-fill {
  position: absolute;
  left: 39px; top: 40px; bottom: 40px;
  width: 2px;
  background: var(--line);
}
.process-fill {
  background: var(--gold);
  transform-origin: top;
  transform: scaleY(var(--progress, 1));
}
.js .process-fill { transform: scaleY(var(--progress, 0)); }

.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0 32px;
  padding: 0 0 56px;
}
.process-step:last-child { padding-bottom: 0; }
.process-icon {
  position: relative;
  z-index: 1;
  width: 80px; height: 80px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  color: var(--green);
  transition: background-color 0.6s var(--ease), border-color 0.6s var(--ease), color 0.6s var(--ease), transform 0.6s var(--ease);
}
.process-step.is-visible .process-icon { background: var(--green); border-color: var(--gold); color: var(--gold); }
.js .process-step .process-icon { transform: scale(0.8); }
.js .process-step.is-visible .process-icon { transform: none; }
.process-icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.process-body { padding: 8px 28px 28px; }
.process-time {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 99px;
  background: rgba(217, 164, 65, 0.18);
  color: var(--gold-text);
  font-size: 13px;
  font-weight: 600;
}
.process-body h3 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 10px; }
.process-body p { color: var(--ink-muted); }
.process-body ul { margin: 0; padding-left: 20px; color: var(--ink-muted); }
.process-body li { margin-bottom: 4px; }
@media (max-width: 559px) {
  .process-track, .process-fill { left: 27px; top: 28px; }
  .process-step { grid-template-columns: 56px 1fr; gap: 0 16px; }
  .process-icon { width: 56px; height: 56px; }
  .process-icon svg { width: 26px; height: 26px; }
  .process-body { padding: 4px 18px 22px; }
}

/* Checklist ---------------------------------------------------------------- */
.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
  margin: 0; padding: 0; list-style: none;
}
.checklist li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.checklist li::before {
  content: "";
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9a441' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.checklist strong { display: block; margin-bottom: 2px; }
.checklist span { color: var(--ink-muted); font-size: 16px; }
.section--green .checklist li { border-color: var(--line-on-green); }
.section--green .checklist span { color: var(--on-green-muted); }
.section--green .checklist li::before { background-color: var(--gold); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f3d2e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"); }
@media (max-width: 767px) { .checklist { grid-template-columns: 1fr; } }

.benefits--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1199px) { .benefits--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 559px) { .benefits--4 { grid-template-columns: 1fr; } }

/* FAQ (native <details>, so it works with keyboard and without JS) ------- */
.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* Plus sign that turns into a minus */
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  width: 16px; height: 2px;
  background: var(--green);
  transition: transform 0.3s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--green); }
.faq details p { margin: 0 0 24px; max-width: 44rem; color: var(--ink-muted); }

/* Filter buttons ----------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.filter-btn {
  min-height: 44px;
  padding: 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.filter-btn:hover { border-color: var(--green); }
.filter-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--on-green); }
.count-status { margin: 0 0 32px; font-size: 14px; color: var(--ink-muted); }
.business-meta {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  color: var(--ink-muted);
}
.business-result + .business-meta { margin-top: auto; }
.business-body .business-result { margin-bottom: 16px; }

/* Kenya map (businesses page) ---------------------------------------------- */
.map-figure { margin: 0; }
.kenya-map { width: 100%; max-width: 440px; margin: 0 auto; overflow: visible; }
.kenya-map .country {
  fill: rgba(217, 164, 65, 0.1);
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.kenya-map .town-dot { fill: var(--gold); }
.kenya-map .town-dot--small { fill: rgba(247, 243, 234, 0.45); }
.kenya-map .town-label { fill: var(--on-green); font-family: var(--sans); font-size: 11px; font-weight: 500; }
.kenya-map .pulse {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.8s var(--ease) infinite;
  animation-delay: var(--d, 0s);
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(3.4); opacity: 0; }
}
/* Fill fades in after the outline draws; towns pop in one by one */
.js .kenya-map .country { fill-opacity: 0; transition: fill-opacity 1s ease 1.4s; }
.js .map-figure.is-visible .kenya-map .country { fill-opacity: 1; }
.js .kenya-map .town {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .map-figure.is-visible .kenya-map .town { opacity: 1; }
.map-caption { margin-top: 12px; text-align: center; font-size: 14px; color: var(--on-green-muted); }

/* Team ---------------------------------------------------------------------- */
.growth-bg {
  position: absolute;
  right: 0; bottom: 0;
  width: min(70%, 760px);
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}
.growth-bg .bar { fill: rgba(247, 243, 234, 0.06); transform-box: fill-box; transform-origin: bottom; }
.growth-bg .grid-line { stroke: var(--line-on-green); stroke-width: 1; }
.growth-bg .rise { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.growth-bg .rise-dot { fill: var(--gold); }
.js .growth-bg .bar { transform: scaleY(0); transition: transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .growth-bg.is-visible .bar { transform: scaleY(1); }
.page-head .wrap { position: relative; z-index: 1; }
@media (max-width: 767px) { .growth-bg { width: 100%; opacity: 0.35; } }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1199px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 679px) { .team-grid { grid-template-columns: 1fr; } }
.member { padding: 32px 28px; }
.avatar {
  position: relative;
  width: 104px; height: 104px;
  margin-bottom: 22px;
}
.avatar-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.avatar-ring circle { fill: none; }
.avatar-ring .track { stroke: var(--line); stroke-width: 2; }
.avatar-ring .arc {
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: 50% 50%;
  animation: spin 14s linear infinite;
}
.avatar-ring .dash {
  stroke: var(--green);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  transform-origin: 50% 50%;
  animation: spin 40s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-initials {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 32px;
  transition: transform 0.4s var(--ease);
}
.member:hover .avatar-initials { transform: scale(1.06); }
.member h3 { font-size: 30px; }
.member-role { margin: 4px 0 14px; font-size: 14px; font-weight: 600; color: var(--gold-text); }
.member p:last-child { margin: 0; color: var(--ink-muted); font-size: 16px; }

/* Stories --------------------------------------------------------------- */
.story-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1023px) { .story-cards { grid-template-columns: 1fr; } }
.story-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; }
.story-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--green); }
.story-art * { transition: transform 0.8s var(--ease); transform-box: fill-box; transform-origin: center; }
.story-card:hover .story-art .float-a { transform: translate(6px, -6px); }
.story-card:hover .story-art .float-b { transform: translate(-8px, 4px) rotate(10deg); }
.story-card:hover .story-art .float-c { transform: scale(1.12); }
.story-card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 28px; }
.story-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: 13px; color: var(--ink-muted); }
.story-meta .tag { font-weight: 600; color: var(--gold-text); }
.story-card h2, .story-card h3 { font-size: 28px; margin-bottom: 12px; }
.story-card p { color: var(--ink-muted); font-size: 16px; }
.story-card .text-link { margin-top: auto; align-self: flex-start; }

.article {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px 64px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.article h2 { font-size: clamp(32px, 3.6vw, 48px); }
.article-body { max-width: 42rem; }
.article-body h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin: 28px 0 8px; }
.article-body ol, .article-body ul { padding-left: 22px; }
.article-body li { margin-bottom: 10px; }
.article-body .pull {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: var(--cream-2);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
}
@media (max-width: 767px) { .article { grid-template-columns: 1fr; } }

/* Apply: form + growing-plant illustration ------------------------------- */
.apply-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}
.apply-aside { position: sticky; top: 32px; padding: 28px; text-align: center; }
@media (max-width: 1023px) {
  .apply-grid { grid-template-columns: 1fr; }
  .apply-aside { position: static; order: -1; }
  .apply-aside .growth { max-width: 200px; }
}
.apply-aside h2 { font-size: 26px; margin-top: 8px; }
.apply-aside p { margin: 8px 0 0; font-size: 15px; color: var(--ink-muted); }

.growth { width: 100%; max-width: 280px; margin: 0 auto; overflow: visible; }
.growth .ground { stroke: var(--green); stroke-width: 2; stroke-linecap: round; }
.growth .soil { fill: rgba(15, 61, 46, 0.08); }
.growth .seed { fill: var(--gold-text); }
.growth .bar { fill: rgba(15, 61, 46, 0.12); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform 0.8s var(--ease), fill 0.4s; }
.growth .stem { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease); }
.growth .leaf { fill: var(--green); transform-box: fill-box; transform: scale(0); transition: transform 0.7s var(--ease); }
.growth .leaf--l { transform-origin: right bottom; }
.growth .leaf--r { transform-origin: left bottom; }
.growth .flower { fill: var(--gold); transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 0.7s var(--ease) 0.2s; }
/* Stages 0–9 are set by apply.js as the form is filled in */
.growth .stem { stroke-dashoffset: calc(1 - var(--grow, 0.36)); }   /* 0.36 = seedling height, also without JS */
.growth .leaf--seedling { transform: scale(1); }
.growth .bar.on { transform: scaleY(1); fill: rgba(15, 61, 46, 0.2); }
.growth .leaf.on { transform: scale(1); }
.growth .flower.on { transform: scale(1); }
.growth-sway { transform-box: fill-box; transform-origin: bottom center; animation: sway 5s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }

.progress { margin-top: 20px; }
.progress-bar { height: 8px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: inherit; transition: width 0.6s var(--ease); }
.progress-text { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--green); }

/* Forms ------------------------------------------------------------------- */
.form { display: grid; gap: 24px; padding: clamp(24px, 4vw, 40px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 767px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.field .hint { display: block; margin: -2px 0 8px; font-size: 14px; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid rgba(35, 37, 31, 0.28);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f3d2e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 61, 46, 0.18);
}
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-muted); }
.input-prefix input { padding-left: 50px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #b3261e; }
.field-error { display: block; min-height: 1.3em; margin-top: 6px; font-size: 14px; color: #b3261e; }
.field-count { float: right; font-size: 13px; font-weight: 400; color: var(--ink-muted); }
.form .btn { justify-self: start; }
.form-status { margin: 0; padding: 0; font-weight: 600; color: var(--green); }
.form-status:not(:empty) { padding: 16px 18px; border-radius: 10px; background: rgba(15, 61, 46, 0.08); }
.form-note { margin: 0; font-size: 14px; color: var(--ink-muted); }

/* 12. Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--green-deep);
  color: var(--on-green-muted);
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.site-footer .wordmark { color: var(--on-green); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--on-green); }
.footer-label {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line-on-green);
  font-size: 12.5px;
}
.footer-base a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-base { flex-direction: column; }
}

/* 13. Motion & utilities --------------------------------------------------- */
/* Elements are only hidden when JS is running (html.js), so content is
   never lost if scripts fail. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), translate 0.3s var(--ease), box-shadow 0.3s var(--ease);
  transition-delay: var(--delay, 0s), var(--delay, 0s), 0s, 0s;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover { translate: none; }
}
