/* ==========================================================================
   Meridian (blue edition) — main stylesheet
   White and royal-blue theme. Visuals sit inside dark charcoal "panels"
   with a faint blue mesh grid, drawn in glowing blue lines and white dots.
   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 */
  --blue: #2a6fdb;            /* main colour: buttons, highlights (white text on it: 4.8:1) */
  --blue-dark: #1f5bbf;       /* blue for small text and links (6.3:1 on white, 5.9:1 on --bg-alt) */
  --blue-glow: #4d8dff;       /* bright blue for lines on dark panels */
  --blue-soft: #8fb8ff;       /* light blue for text on dark panels */
  --navy: #0f1f3d;            /* headlines */
  --panel: #16181d;           /* dark charcoal panels behind visuals */
  --panel-2: #1d2027;
  --bg: #ffffff;              /* main background */
  --bg-alt: #f4f7fb;          /* light grey-blue sections */
  --paper: #ffffff;           /* cards */
  --ink: #23262d;             /* dark charcoal body text */
  --ink-muted: #555d6b;       /* secondary text (6.7:1 on white) */
  --line: #e1e7ef;            /* thin borders on white */
  --line-strong: #c9d3e1;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.74);
  --line-on-dark: rgba(255, 255, 255, 0.14);

  /* Faint blue mesh used inside dark panels */
  --mesh: linear-gradient(rgba(77, 141, 255, 0.07) 1px, transparent 1px) 0 0 / 28px 28px,
          linear-gradient(90deg, rgba(77, 141, 255, 0.07) 1px, transparent 1px) 0 0 / 28px 28px;

  --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, 31, 61, 0.05), 0 8px 24px -12px rgba(15, 31, 61, 0.16);
  --shadow-lift: 0 2px 4px rgba(15, 31, 61, 0.06), 0 22px 40px -18px rgba(15, 31, 61, 0.3);
  --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(--bg);
  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;
  color: var(--navy);
}
h3 { line-height: 1.2; }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--on-dark); }

p { margin: 0 0 1em; }

::selection { background: var(--blue); color: #fff; }

/* Visible keyboard focus everywhere (blue on white, light blue on dark) */
:focus-visible {
  outline: 3px solid var(--blue-dark);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--blue-soft); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  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);
}

/* Dark charcoal panel with blue mesh: the backdrop for every visual */
.panel {
  position: relative;
  border-radius: 20px;
  background: var(--mesh), var(--panel);
  color: var(--on-dark);
  box-shadow: 0 30px 60px -30px rgba(15, 31, 61, 0.45);
}

/* 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: #fff;
  border-right: 1px solid var(--line);
  color: var(--navy);
}

.wordmark {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Small blue globe mark beside the wordmark */
.wordmark::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  background: linear-gradient(90deg, transparent 45%, var(--blue) 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(--ink-muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--navy); background: var(--bg-alt); }
.nav-links a[aria-current="page"] {
  color: var(--blue-dark);
  font-weight: 600;
  background: rgba(42, 111, 219, 0.09);
  box-shadow: inset 3px 0 0 var(--blue);
}

.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;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .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(--navy);
    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: #fff;
    color: var(--navy);
    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); }
  .nav-overlay li:last-child { border-bottom: 1px solid var(--line); }
  .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(--blue-dark); }
  .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(--bg-alt); }
/* Dark charcoal band (numbers) */
.section--dark {
  background: var(--mesh), var(--panel);
  color: var(--on-dark);
}
/* Royal blue band (closing call to action) */
.section--blue {
  background: var(--blue);
  color: var(--on-dark);
}

.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(--blue-dark);
}
.label::before {
  content: "";
  width: 20px; height: 2px;
  background: var(--blue);
}
.section--dark .label { color: var(--blue-soft); }
.section--dark .label::before { background: var(--blue-glow); }
.section--blue .label { color: #fff; }
.section--blue .label::before { background: #fff; }

.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--dark .section-head p { color: var(--on-dark-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): light, with any visual in a dark panel */
.page-head {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--line);
  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(--ink-muted); }

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 85% 20%, rgba(42, 111, 219, 0.07), transparent 55%), #fff;
}
/* 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(--blue); }
.hero-sub { margin: 24px 0 32px; max-width: 34rem; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-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);
  font-size: 14px;
  color: var(--ink-muted);
}
.hero-facts strong { display: block; color: var(--navy); font-size: 16px; font-weight: 600; }

/* Globe sits in a dark panel; never taller than ~70% of the screen */
.hero-visual {
  aspect-ratio: 1;
  width: min(100%, 70vh, 580px);
  justify-self: center;
  overflow: hidden;
}
.hero-canvas { width: 100%; height: 100%; }
.hero-caption {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line-on-dark);
  border-radius: 99px;
  background: rgba(22, 24, 29, 0.85);
  font-size: 13px;
  white-space: nowrap;
  color: var(--on-dark-muted);
}
.hero-caption::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px var(--blue-glow);
}

@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(--blue);
  border-radius: 99px;
  background: var(--blue);
  color: #fff;
  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); background: var(--blue-dark); border-color: var(--blue-dark); box-shadow: 0 10px 24px -10px rgba(42, 111, 219, 0.7); }
/* Outline button: navy on white, white on blue/dark bands */
.btn--outline { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--outline:hover { background: transparent; border-color: var(--navy); box-shadow: none; }
.on-dark .btn--outline { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.on-dark .btn--outline:hover { border-color: #fff; }
/* On the royal-blue band, the main button turns white */
.section--blue .btn:not(.btn--outline) { background: #fff; border-color: #fff; color: var(--blue-dark); }
.section--blue .btn:not(.btn--outline):hover { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35); }
.btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--blue-dark);
  text-decoration: underline;
  text-decoration-color: rgba(42, 111, 219, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: gap 0.2s var(--ease), text-decoration-color 0.2s;
}
.text-link:hover { gap: 12px; text-decoration-color: var(--blue); }
.on-dark .text-link { color: #fff; }

/* Line icons: glowing blue on a small charcoal tile */
.icon {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--panel);
  color: var(--blue-glow);
  flex-shrink: 0;
}
.icon svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(77, 141, 255, 0.7));
}

/* 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), border-color 0.3s;
}
.card:hover { translate: 0 -6px; box-shadow: var(--shadow-lift); border-color: var(--line-strong); }

.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;
}
/* Dashed blue connector line behind the step icons */
.steps-preview::before {
  content: "";
  position: absolute;
  top: 28px; left: 28px; right: 28px;
  border-top: 2px dashed rgba(42, 111, 219, 0.4);
}
.step-mini { position: relative; }
.step-mini .icon { position: relative; box-shadow: 0 0 0 8px var(--bg-alt); }
.step-num {
  display: block;
  margin: 22px 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.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-dark);
}
.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(--blue-soft);
  text-shadow: 0 0 24px rgba(77, 141, 255, 0.55);
  font-variant-numeric: tabular-nums;
}
.number-label { display: block; margin-top: 12px; color: var(--on-dark-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; }
/* Card header: charcoal panel with a glowing blue line drawing */
.business-art {
  position: relative;
  height: 150px;
  display: grid;
  place-items: center;
  background: var(--mesh), var(--panel);
  color: var(--blue-glow);
  overflow: hidden;
}
.business-art::before {
  content: "";
  position: absolute;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 141, 255, 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;
  filter: drop-shadow(0 0 5px rgba(77, 141, 255, 0.8));
  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(42, 111, 219, 0.09);
  color: var(--blue-dark);
  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(--navy); }

/* 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;
  color: var(--navy);
}
.quote blockquote::before {
  content: "\201C";
  display: block;
  height: 36px;
  font-size: 72px;
  line-height: 1;
  color: var(--blue);
}
.quote-result {
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-alt);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-dark);
}
.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: rgba(255, 255, 255, 0.9); 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; }
/* Light track + glowing blue 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-strong);
}
.process-fill {
  background: var(--blue);
  box-shadow: 0 0 8px rgba(42, 111, 219, 0.6);
  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; }
/* Step icon: white circle that turns into a dark panel with a blue glow */
.process-icon {
  position: relative;
  z-index: 1;
  width: 80px; height: 80px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line-strong);
  color: var(--navy);
  transition: background-color 0.6s var(--ease), border-color 0.6s var(--ease), color 0.6s var(--ease), transform 0.6s var(--ease), box-shadow 0.6s;
}
.process-step.is-visible .process-icon {
  background: var(--panel);
  border-color: var(--blue);
  color: var(--blue-glow);
  box-shadow: 0 0 0 6px rgba(42, 111, 219, 0.12), 0 0 22px rgba(42, 111, 219, 0.35);
}
.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-step.is-visible .process-icon svg { filter: drop-shadow(0 0 4px rgba(77, 141, 255, 0.8)); }
.process-body { padding: 8px 28px 28px; }
.process-time {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 99px;
  background: rgba(42, 111, 219, 0.09);
  color: var(--blue-dark);
  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(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' 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; color: var(--navy); }
.checklist span { color: var(--ink-muted); font-size: 16px; }
@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-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  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(--blue);
  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(--blue-dark); }
.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-strong);
  border-radius: 99px;
  background: #fff;
  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(--blue); color: var(--blue-dark); }
.filter-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.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), drawn inside a dark panel -------------------- */
.map-figure { margin: 0; padding: 28px 24px 20px; }
.kenya-map { width: 100%; max-width: 420px; margin: 0 auto; overflow: visible; }
.kenya-map .country {
  fill: rgba(77, 141, 255, 0.08);
  stroke: var(--blue-glow);
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(77, 141, 255, 0.7));
}
.kenya-map .town-dot { fill: #fff; filter: drop-shadow(0 0 4px rgba(77, 141, 255, 1)); }
.kenya-map .town-dot--small { fill: rgba(255, 255, 255, 0.45); }
.kenya-map .town-label { fill: #fff; font-family: var(--sans); font-size: 11px; font-weight: 500; }
.kenya-map .pulse {
  fill: none;
  stroke: var(--blue-glow);
  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-dark-muted); }

/* Team ---------------------------------------------------------------------- */
/* Growth chart in a dark panel beside the page title */
.chart-panel { padding: 24px; }
.growth-chart { width: 100%; height: auto; overflow: visible; }
.growth-chart .bar { fill: rgba(77, 141, 255, 0.14); stroke: rgba(77, 141, 255, 0.45); stroke-width: 1; transform-box: fill-box; transform-origin: bottom; }
.growth-chart .grid-line { stroke: rgba(255, 255, 255, 0.1); stroke-width: 1; }
.growth-chart .rise { fill: none; stroke: var(--blue-glow); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(77, 141, 255, 0.9)); }
.growth-chart .rise-dot { fill: #fff; filter: drop-shadow(0 0 6px rgba(77, 141, 255, 1)); }
.js .growth-chart .bar { transform: scaleY(0); transition: transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .growth-chart.is-visible .bar { transform: scaleY(1); }
.page-head .wrap { position: relative; z-index: 1; }

.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-strong); stroke-width: 2; }
.avatar-ring .arc {
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: 50% 50%;
  animation: spin 14s linear infinite;
}
.avatar-ring .dash {
  stroke: var(--blue-dark);
  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(--mesh), var(--panel);
  color: #fff;
  font-family: var(--serif);
  font-size: 32px;
  text-shadow: 0 0 12px rgba(77, 141, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(77, 141, 255, 0.5);
  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(--blue-dark); }
.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(--panel); }
.story-art * { transition: transform 0.8s var(--ease); transform-box: fill-box; transform-origin: center; }
/* Anything drawn in bright blue gets a soft glow */
.story-art [fill="#4d8dff"], .story-art [stroke="#4d8dff"] { filter: drop-shadow(0 0 6px rgba(77, 141, 255, 0.85)); }
.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(--blue-dark); }
.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-strong);
  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(--blue);
  border-radius: 0 10px 10px 0;
  background: #fff;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
  color: var(--navy);
}
@media (max-width: 767px) { .article { grid-template-columns: 1fr; } }

/* Apply: form + growing-plant illustration (in a dark panel) ------------- */
.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; color: #fff; }
.apply-aside p { margin: 8px 0 0; font-size: 15px; color: var(--on-dark-muted); }

.growth { width: 100%; max-width: 280px; margin: 0 auto; overflow: visible; }
.growth .ground { stroke: rgba(77, 141, 255, 0.6); stroke-width: 2; stroke-linecap: round; }
.growth .soil { fill: rgba(77, 141, 255, 0.1); }
.growth .seed { fill: #fff; filter: drop-shadow(0 0 4px rgba(77, 141, 255, 1)); }
.growth .bar { fill: rgba(77, 141, 255, 0.08); stroke: rgba(77, 141, 255, 0.25); stroke-width: 1; 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(--blue-glow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease); filter: drop-shadow(0 0 5px rgba(77, 141, 255, 0.9)); }
.growth .leaf { fill: rgba(77, 141, 255, 0.28); stroke: var(--blue-glow); stroke-width: 1.4; 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: #fff; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 0.7s var(--ease) 0.2s; filter: drop-shadow(0 0 6px rgba(77, 141, 255, 1)); }
/* 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(77, 141, 255, 0.18); }
.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: rgba(255, 255, 255, 0.12); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--blue-glow); box-shadow: 0 0 10px var(--blue-glow); border-radius: inherit; transition: width 0.6s var(--ease); }
.progress-text { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--blue-soft); }

/* 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; color: var(--navy); }
.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 #b9c4d4;      /* 1.9:1 on white: clearly visible field edges */
  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='%231f5bbf' 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(--blue);
  box-shadow: 0 0 0 3px rgba(42, 111, 219, 0.2);
}
.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(--blue-dark); }
.form-status:not(:empty) { padding: 16px 18px; border-radius: 10px; background: rgba(42, 111, 219, 0.08); }
.form-note { margin: 0; font-size: 14px; color: var(--ink-muted); }

/* 12. Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--panel);
  color: var(--on-dark-muted);
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.site-footer .wordmark { color: #fff; margin-bottom: 14px; }
.site-footer .wordmark::before { border-color: var(--blue-glow); background: linear-gradient(90deg, transparent 45%, var(--blue-glow) 45% 55%, transparent 55%); }
.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: #fff; }
.footer-label {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.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-dark);
  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; }
}
