/* ==========================================================================
   Faith Foundation — main stylesheet
   Order: tokens → base → layout → components → header → sections → utilities → motion
   Mobile-first; breakpoints at 700px, 1024px and 1200px.
   ========================================================================== */

/* Tokens
   ========================================================================== */

/* Fira Sans, self-hosted, for devices without Trebuchet MS (Android).
   It sits after Trebuchet in the font stack, so Windows, Mac and iPhone,
   which have Trebuchet, never download it. Licence: assets/fonts/OFL.txt */
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("Fira Sans"), local("FiraSans-Regular"), url("../fonts/fira-sans-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local("Fira Sans Bold"), local("FiraSans-Bold"), url("../fonts/fira-sans-latin-700.woff2") format("woff2");
}

:root {
  /* Brand */
  --navy: #12308C;
  --navy-deep: #0B1F5E;
  --magenta: #E80280;
  --magenta-strong: #C8026E; /* same hue, dark enough for white text and link text (AA) */
  --magenta-press: #A3015A;
  --magenta-soft: #FDEAF4;
  --green: #2E7D4F;

  /* Neutrals */
  --ink: #16203A;
  --ink-soft: #5B6477;
  --light: #F6F7FB;
  --line: #E4E7EF;
  --navy-soft: #EBEFFA;
  --paper: #FFFFFF;

  /* Type: Trebuchet MS (a system font, nothing to download) does all the work,
     with Fira Sans standing in where it's missing; Caveat is for the tagline only */
  --font-display: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, "Fira Sans", sans-serif;
  --font-body: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, "Fira Sans", sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-space: clamp(64px, 8vw, 96px);
  --radius: 999px;       /* pill buttons */
  --radius-card: 16px;
  --radius-sm: 10px;
  --focus: var(--navy);
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 479px) {
  body {
    font-size: 1rem;
    line-height: 1.7;
  }
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  color: var(--navy);
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--magenta-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--magenta-press);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

::selection {
  background: var(--navy);
  color: var(--paper);
}

/* Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.section-light {
  background: var(--light);
}

/* Centred section header, as on ing.rw */
.section-header {
  max-width: 680px;
  margin: 0 auto clamp(36px, 4vw, 52px);
  text-align: center;
}

.section-title {
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: var(--navy);
}

.section-title-light {
  color: var(--paper);
}

.section-sub {
  margin-top: 14px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* Components: type
   ========================================================================== */

.tagline {
  font-family: var(--font-hand);
  font-weight: 600;
  line-height: 1.1;
}

.caption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* Components: buttons and links
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 13px 32px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Small phones: less side padding so labels fit; programme buttons span the card */
@media (max-width: 479px) {
  .btn {
    padding-inline: 22px;
  }

  .row .btn {
    width: 100%;
  }
}

.btn .icon {
  width: 17px;
  height: 17px;
  transition: transform 0.25s var(--ease);
}

.btn:hover .icon {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--magenta-strong);
  color: var(--paper);
  box-shadow: 0 8px 20px -10px rgba(200, 2, 110, 0.6);
}

.btn-primary:hover {
  background: var(--magenta-press);
  color: var(--paper);
  box-shadow: 0 12px 26px -12px rgba(163, 1, 90, 0.7);
}

.btn-outline {
  border-color: var(--line);
  background: var(--paper);
  color: var(--navy);
}

.btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--paper);
}

.btn-outline-light:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--navy);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}

.btn-row-center {
  justify-content: center;
}

.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--magenta-strong);
  text-decoration: none;
}

/* A 44px-tall touch area around the link, without moving the layout */
a.link-arrow::before,
.gallery-title a::before,
.feature-project-title a::before {
  content: "";
  position: absolute;
  inset: -12px -4px;
}

.link-arrow .icon {
  width: 17px;
  height: 17px;
  flex: none;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(4px);
}

.icon {
  flex: none;
}

/* Components: photo hover
   A small family of effects, used with variety across pages. Every photo
   sits in <figure class="photo photo--{zoom|drift|veil}">. Photos
   carry no visible captions; alt text describes the frame.
     zoom   slow scale up
     drift  slow sideways pan, like a camera moving
     veil   a navy veil fades in
   Reduced motion keeps the fades but drops every movement.
   ========================================================================== */

.photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.photo img {
  transition: transform 1.2s var(--ease);
}

.photo--veil::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(11, 31, 94, 0.42);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .photo--zoom:hover img {
    transform: scale(1.04);
  }

  .photo--drift img {
    transition-duration: 1.8s;
  }

  .photo--drift:hover img {
    transform: scale(1.06) translateX(-2%);
  }

  .photo--veil:hover::before {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo img {
    transition: none;
  }

  .photo--zoom:hover img,
  .photo--drift:hover img {
    transform: none;
  }
}

/* Components: icon circles (ing.rw's gold circles, in brand colours)
   ========================================================================== */

.icon-circle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: var(--navy);
}

.icon-circle .icon {
  width: 22px;
  height: 22px;
}

.icon-circle-sm {
  width: 40px;
  height: 40px;
}

.icon-circle-sm .icon {
  width: 19px;
  height: 19px;
}

/* Header
   ========================================================================== */

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
  color: var(--paper);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: var(--paper);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(11, 31, 94, 0.06);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: calc(1320px + 2 * var(--gutter));
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
  transition: min-height 0.3s ease;
}

.is-scrolled .site-header-inner {
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  margin-right: auto;
  color: var(--navy);
  text-decoration: none;
}

.brand:hover {
  color: var(--navy);
}

.brand-mark {
  width: auto;
  height: 40px;
  transition: height 0.3s ease;
}

.is-scrolled .brand-mark {
  height: 38px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  line-height: 1.1;
}

.brand-name {
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
}

.brand-strap {
  margin-top: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.btn-donate {
  min-height: 42px;
  padding: 8px 18px;
}

/* Mobile menu toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  order: 3;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle-bars {
  position: relative;
  display: grid;
  gap: 5px;
  width: 22px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-list {
  padding: 0;
  list-style: none;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--navy);
}

/* Mobile navigation panel (JS on) */
.js .site-nav {
  position: fixed;
  inset: var(--nav-top, var(--header-h)) 0 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 16px var(--gutter) 40px;
  overflow-y: auto;
  background: var(--paper);
  border-top: 1px solid var(--line);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease), visibility 0s linear 0.3s;
}

.js .site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease), visibility 0s;
}

.js .nav-list li {
  border-bottom: 1px solid var(--line);
}

.js .nav-list .nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-size: 1.25rem;
  letter-spacing: normal;
}

.js .nav-list .nav-link[aria-current="page"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--magenta);
}

.nav-extra {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.nav-extra .btn {
  width: 100%;
  margin-bottom: 20px;
}

.nav-extra-link {
  display: inline-block;
  padding-block: 10px;
  font-weight: 700;
}

body.nav-open {
  overflow: hidden;
}

/* No-JS fallback: links wrap under the brand */
.no-js .nav-toggle,
.no-js .nav-extra {
  display: none;
}

.no-js .site-header-inner {
  flex-wrap: wrap;
  padding-block: 12px;
}

.no-js .site-nav {
  order: 4;
  width: 100%;
}

.no-js .nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.9375rem;
}

@media (max-width: 479px) {
  .nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .brand-strap {
    font-size: 0.75rem;
  }
}

@media (max-width: 379px) {
  .brand {
    gap: 8px;
  }

  .brand-mark {
    height: 36px;
  }

  /* Stack the name like the logo wordmark; the strap returns on wider screens */
  .brand-name {
    font-size: 0.9375rem;
    line-height: 1.05;
    white-space: normal;
  }

  .brand-strap {
    display: none;
  }

  .btn-donate {
    padding-inline: 14px;
  }
}

@media (min-width: 1200px) {
  :root {
    --header-h: 80px;
  }

  .nav-toggle,
  .nav-extra {
    display: none;
  }

  .js .site-nav,
  .no-js .site-nav {
    position: static;
    order: 0;
    width: auto;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .no-js .site-header-inner {
    flex-wrap: nowrap;
    padding-block: 0;
  }

  .nav-list,
  .no-js .nav-list,
  .js .nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .js .nav-list li {
    border: 0;
  }

  .nav-link,
  .js .nav-list .nav-link {
    position: relative;
    display: block;
    padding: 10px 12px;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
  }

  .nav-link::after,
  .js .nav-list .nav-link[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    width: auto;
    height: 2px;
    border-radius: 2px;
    background: var(--magenta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after,
  .js .nav-list .nav-link[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .brand-mark {
    height: 44px;
  }

  .brand-name {
    font-size: 1.0625rem;
  }

  .btn-donate {
    margin-left: 16px;
    min-height: 42px;
    padding-inline: 22px;
  }
}

/* Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(36px, 6vw, 88px) clamp(64px, 8vw, 104px);
  background: linear-gradient(180deg, var(--paper) 0%, var(--light) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero-tagline {
  margin-bottom: 16px;
  font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.625rem);
  color: var(--magenta-strong);
}

.hero-title {
  max-width: 13em;
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3.125rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero-underline {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.hero-underline svg {
  position: absolute;
  left: -2%;
  bottom: -0.1em;
  width: 104%;
  height: 0.28em;
  overflow: visible;
}

.hero-underline path {
  fill: none;
  stroke: var(--magenta);
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.hero-lede {
  max-width: 32em;
  margin-top: 22px;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.8;
}

.hero .btn-row {
  margin-top: 34px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--magenta);
}

.hero-media {
  position: relative;
}

/* The frame takes the photo's own 4:3 shape so nothing is cropped: the
   client asked for this photo to be shown as it is. */
.hero-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: var(--light);
  box-shadow: 0 30px 60px -30px rgba(11, 31, 94, 0.35);
}

.hero-frame picture,
.hero-frame img {
  width: 100%;
  height: 100%;
}

.hero-frame img {
  object-fit: cover;
}






@media (max-width: 479px) {
  .hero .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 700px) {
  .hero-media {
    width: min(100%, 520px);
    margin-inline: auto;
  }


}

@media (min-width: 1024px) {
  /* The photo column is the wider one, so the uncropped 4:3 photo stands
     about as tall as the text beside it */
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(40px, 5vw, 72px);
  }

  .hero-media {
    width: auto;
  }

}

/* Impact
   ========================================================================== */

/* The homepage owns the impact figures: three, left-aligned, figure over
   label, hairline dividers, no box or shadow. */
.impact {
  position: relative;
  padding-block: 8px 0;
  background: var(--light);
}

/* "A growing community of learning and care" over the figures */
.impact-title {
  padding: 40px 0 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px 12px 24px 16px;
}

.stat:first-child {
  padding-left: 0;
}

.stat-num {
  font-size: clamp(1.625rem, 1.1rem + 2.4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  max-width: 15em;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

@media (min-width: 700px) {
  .stat {
    gap: 10px;
    padding: 36px 32px;
  }

  .stat-label {
    font-size: 0.875rem;
  }
}

/* About: story with the founder, then what guides us
   ========================================================================== */

/* Then and now, in the flow of the story: the year hangs in the margin */
/* Our story: a two-point timeline, 2012 to today, joined by a line */
.timeline {
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.timeline-step {
  position: relative;
  max-width: 34em;
  padding: 0 0 28px 36px;
}

/* The line runs from this step's dot down to the next one */
.timeline-step::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: -6px;
  left: 7px;
  width: 2px;
  background: var(--navy);
  opacity: 0.35;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-step:last-child::before {
  content: none;
}

/* The dot: hollow for where it began, filled for today */
.timeline-step::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 16px;
  height: 16px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: var(--paper);
}

.timeline-step-now::after {
  background: var(--navy);
}

.timeline-mark {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--navy);
}

.timeline-title {
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--ink);
}

.timeline-title + p {
  margin-top: 4px;
}

.timeline-step p + p {
  margin-top: 10px;
}

/* Founder: sits with the story; initials stand in until a portrait arrives */
.founder {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.founder-monogram {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--navy);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--paper);
}

/* Faith's portrait in the founder circle (client request, October 2026) */
.founder-photo {
  width: 76px;
  height: 76px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--navy);
}

.founder-photo picture,
.founder-photo-img {
  display: block;
  width: 100%;
  height: 100%;
}

.founder-photo-img {
  object-fit: cover;
  object-position: 50% 30%;
}

.founder-role {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.founder-name {
  font-size: 1.375rem;
}

.founder .founder-title {
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.founder-title + p {
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.founder-name + p {
  margin-top: 6px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.story-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
}

/* What guides us: the four words centred and in brand colours (client
   request), then vision and mission set large, no box */
.purpose-head {
  text-align: center;
}

.purpose-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 700;
}

.purpose-word--navy {
  color: var(--navy);
}

.purpose-word--magenta {
  color: var(--magenta-strong);
}

.purpose-word--green {
  color: var(--green);
}

.purpose-dot {
  color: var(--ink-soft);
}

.purpose {
  margin-top: clamp(32px, 4vw, 48px);
  border-top: 2px solid var(--navy);
}

.purpose-row {
  display: grid;
  gap: 10px;
  padding-block: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid #D9DEEA;
}

.purpose-row h3 {
  font-size: 1.125rem;
  color: var(--magenta-strong);
}

.purpose-statement {
  max-width: 34em;
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  line-height: 1.5;
  color: var(--navy);
  text-wrap: balance;
}

@media (min-width: 900px) {
  .purpose-row {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 32px;
    align-items: baseline;
  }
}

/* Programme panels (programmes.php): icon tile standing in for a missing photo, title and text
   ========================================================================== */

.panel-icon-tile {
  display: grid;
  place-items: center;
  height: 100%;
  background: var(--navy);
  background-image: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.12), transparent 55%);
  color: var(--paper);
}

.panel-icon-tile .icon {
  width: 72px;
  height: 72px;
  stroke-width: 1.2;
  opacity: 0.9;
}

.panel-title {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
}

.panel-tagline {
  margin-top: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--magenta-strong);
}

.panel-text {
  max-width: 44em;
  margin-top: 14px;
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* Deep brand bands (ing.rw's teal band, in Faith Foundation navy)
   ========================================================================== */

.band {
  --focus: var(--paper);
  position: relative;
  padding-block: var(--section-space);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: rgba(255, 255, 255, 0.82);
}

/* Sponsor */
.sponsor-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.sponsor .btn-row {
  margin-top: 32px;
}

.sponsor-lede {
  max-width: 34em;
  margin-top: 16px;
  font-size: 1rem;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--paper);
}

.price-amount {
  font-size: clamp(2.25rem, 1.9rem + 1.2vw, 2.875rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: normal;
}

.price-per {
  font-size: 0.9375rem;
  font-weight: 600;
  opacity: 0.8;
}

.sponsor-media {
  position: relative;
  max-width: 440px;
  margin-inline: auto;
  border-radius: 20px;
}

.sponsor-media picture,
.sponsor-media img {
  width: 100%;
}

.sponsor-media img {
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  object-position: 50% 32%;
  border-radius: 20px;
}

@media (max-width: 1023px) {
  .sponsor-media {
    order: -1;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .sponsor-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(56px, 7vw, 104px);
  }
}

/* Final CTA */
.cta {
  text-align: center;
}

/* The heart-and-figure mark from the logo, as a quiet watermark */
.cta::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -100px;
  width: 420px;
  height: 440px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-mask: url("../img/logo-mark.png") center / contain no-repeat;
  mask: url("../img/logo-mark.png") center / contain no-repeat;
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.cta-text {
  max-width: 34em;
  margin: 16px auto 0;
}

.cta .btn-row {
  margin-top: 32px;
}

/* Cards: where your support goes
   ========================================================================== */

.card-grid {
  display: grid;
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease);
}

.card:hover {
  box-shadow: 0 20px 40px -28px rgba(11, 31, 94, 0.35);
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--light);
}

.card-media picture,
.card-media img {
  width: 100%;
  height: 100%;
}

.card-media img {
  object-fit: cover;
}



.card-grid > :nth-child(1) .card-media img {
  object-position: 50% 60%;
}

.card-grid > :nth-child(2) .card-media img {
  object-position: 50% 40%;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 26px 26px;
}

.card-title {
  font-size: 1.125rem;
}

.card-list {
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.card-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.card-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--magenta);
}

.card-note {
  margin-top: 14px;
  font-size: 0.875rem;
  line-height: 1.7;
}

.card-body > .link-arrow {
  margin-top: auto;
  padding-top: 20px;
}

@media (min-width: 700px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

/* Human story
   ========================================================================== */

.story-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.story-media {
  overflow: hidden;
  border-radius: 20px;
}

.story-media picture,
.story-media img {
  width: 100%;
}

.story-media img {
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  object-position: 50% 25%;
}

/* Pull quote: large type and a hanging quotation mark, no box */
.pull-quote {
  margin: 28px 0 24px;
}

.pull-quote::before {
  content: "\201C";
  display: block;
  height: 0.5em;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--navy);
}

.pull-quote p {
  max-width: 24em;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--navy);
}

/* Testimonials (about.php): hanging quote marks, no boxes */
.testimonials {
  display: grid;
  gap: 40px;
  margin-top: 36px;
}

.testimonial blockquote {
  position: relative;
  padding-left: 32px;
}

.testimonial blockquote::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  left: 0;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--navy);
}

.testimonial p {
  font-style: italic;
  color: var(--navy);
}

.testimonial-lead p {
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  line-height: 1.6;
}

.testimonial-name {
  margin-top: 12px;
  padding-left: 32px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

@media (min-width: 900px) {
  .testimonials {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: 64px;
  }

  .testimonial-lead {
    grid-row: span 2;
  }
}

.story-copy > p {
  max-width: 36em;
}

.story-copy .btn {
  margin-top: 28px;
}

@media (min-width: 1024px) {
  .story-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(48px, 6vw, 88px);
  }
}

/* Contact details and the Kinigi map (contact.php owns the location)
   ========================================================================== */

.info-grid {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.info {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.info .icon-circle {
  grid-row: span 2;
}

.info h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.info p {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.info a {
  display: inline-block;
  padding-block: 10px;
  margin-block: -10px; /* taller touch area, same layout */
  color: var(--navy);
  text-decoration: none;
}

.info a:hover {
  color: var(--magenta-strong);
}

@media (min-width: 560px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-wide {
    grid-column: 1 / -1;
  }
}

/* Footer
   ========================================================================== */

.site-footer {
  --focus: var(--paper);
  padding-top: clamp(56px, 7vw, 80px);
  padding-bottom: 28px;
  background: #081645;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
}

.footer-brand {
  grid-column: 1 / -1;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}

.footer-logo:hover {
  color: var(--paper);
}

.footer-logo-chip {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--paper);
}

.footer-logo-chip img {
  width: auto;
  height: 36px;
}

.footer-logo .brand-strap {
  color: rgba(255, 255, 255, 0.65);
}

.footer-line {
  max-width: 24em;
  margin-top: 20px;
  line-height: 1.75;
}

.footer-heading {
  margin-bottom: 14px;
  font-size: 0.9375rem;
  color: #F7A6D0;
}

.footer-col ul {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
}

.footer-col ul a {
  display: inline-block;
  padding-block: 10px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--paper);
}

.footer-address {
  display: grid;
  gap: 0;
  font-style: normal;
}

.footer-contact {
  display: flex;
  gap: 10px;
  padding-block: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.footer-contact .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  opacity: 0.7;
}

.footer-contact small {
  font-size: 0.8125rem;
  opacity: 0.8;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}

.footer-social .icon {
  width: 18px;
  height: 18px;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 48px;
  }

  .footer-brand {
    grid-column: auto;
  }

  /* Mouse pointers don't need the tall phone rows */
  .footer-col ul a,
  .footer-contact {
    padding-block: 4px;
  }
}

@media (max-width: 479px) {
  .footer-grid > .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

/* 404
   ========================================================================== */

.not-found {
  min-height: 60vh;
  text-align: center;
}

.not-found-text {
  max-width: 34em;
  margin: 16px auto 0;
}

.not-found-actions {
  margin-top: 32px;
}

/* Inner pages
   ========================================================================== */

/* Page headers: one slim navy band on every inner page, the title centred
   and a sentence under it. */
.page-hero {
  --focus: var(--paper);
  padding-block: 32px 36px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
}

.page-hero-inner {
  text-align: center;
}

.page-title {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--paper);
}

.page-lede {
  max-width: 36em;
  margin: 10px auto 0;
  font-size: 1rem;
  line-height: 1.65;
}

.page-hero a {
  color: var(--paper);
}

.page-hero a:hover {
  color: rgba(255, 255, 255, 0.82);
}

/* Optional quick facts under the lede (sponsor.php) */
.page-hero-facts {
  display: grid;
  gap: 12px 32px;
  max-width: 900px;
  margin: 24px auto 0;
}

.page-hero-facts dt {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
}

.page-hero-facts dd {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.4;
  color: var(--paper);
  overflow-wrap: break-word;
}

@media (min-width: 700px) {
  .page-hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-hero-facts div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.24);
  }
}

@media (min-width: 1024px) {
  .page-hero {
    padding-block: 44px 48px;
  }
}

.prose > * + * {
  margin-top: 16px;
}

.prose p {
  max-width: 65ch;
}

/* Two-column split: photo and text */
.split {
  display: grid;
  gap: 40px;
  align-items: center;
}

.split-media {
  overflow: hidden;
  border-radius: 20px;
}

.split-media picture,
.split-media img {
  width: 100%;
}

.split-media img {
  aspect-ratio: 4 / 3.6;
  object-fit: cover;
}

/* About's story photo: whole and square, as supplied */
.split-media--natural {
  border-radius: 0;
}

.split-media--natural img {
  aspect-ratio: auto;
  height: auto;
}

.split-body .prose {
  margin-top: 18px;
}

.split-body > .btn {
  margin-top: 28px;
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(48px, 6vw, 88px);
  }

  /* About's story: a larger photo that starts level with the story */
  .split--story {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
  }
}

/* Jump navigation on long pages */
.jump-nav {
  position: sticky;
  top: 64px;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.jump-nav ul {
  display: flex;
  gap: 8px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 12px var(--gutter);
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.jump-nav ul::-webkit-scrollbar {
  display: none;
}

.jump-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.jump-nav a:hover {
  border-color: var(--navy);
}

.jump-nav .icon {
  width: 15px;
  height: 15px;
}

@media (min-width: 1024px) {
  .jump-nav ul {
    justify-content: center;
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* Feature rows (programmes): photo left, name and description right */
.rows {
  display: grid;
  gap: 28px;
}

.row {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--light);
  scroll-margin-top: 140px;
}

.row-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--navy-soft);
}

.row-media picture,
.row-media img {
  width: 100%;
  height: 100%;
}

.row-media img {
  object-fit: cover;
}

.row-body {
  padding: clamp(24px, 4vw, 44px);
}

.row-body > .btn {
  margin-top: 24px;
}

.row-green .panel-tagline,
.row-green .tick-list .icon {
  color: var(--green);
}

@media (min-width: 1024px) {
  .row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }

  .row-media {
    aspect-ratio: auto;
    min-height: 100%;
  }

  .row-media picture {
    position: absolute;
    inset: 0;
  }
}

.tick-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.tick-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.tick-list .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--magenta-strong);
  stroke-width: 2.4;
}

@media (min-width: 640px) {
  .row-body .tick-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* Project groups */
.project-group {
  scroll-margin-top: 140px;
}

.project-group + .project-group {
  margin-top: clamp(48px, 6vw, 72px);
}

.group-title {
  margin: 0 0 20px;
  font-size: 1.25rem;
  text-align: center;
}

.card {
  scroll-margin-top: 140px;
}

.card-icon {
  margin-bottom: 16px;
}

.card-tagline {
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--magenta-strong);
}

/* Steps (sponsor) */
.steps {
  display: grid;
  gap: 20px;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--magenta-strong);
  font-weight: 700;
  color: var(--paper);
}

.step h3 {
  font-size: 1.125rem;
}

.step p {
  margin-top: 6px;
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.price-box {
  margin-top: 28px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--light);
}

.price-box .price-main {
  color: var(--navy);
}



@media (min-width: 640px) {
  .price-box .tick-list {
    grid-template-columns: 1fr 1fr;
  }
}









.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 48px);
  border: 1px dashed #CDD3E1;
  border-radius: 20px;
  background: var(--paper);
  text-align: center;
}

.empty-state .icon-circle {
  margin-bottom: 16px;
}

.empty-state h2,
.empty-state h3 {
  font-size: 1.25rem;
}

.empty-state p {
  margin: 8px 0 24px;
  font-size: 0.9375rem;
}

/* Donate */
.give-grid {
  display: grid;
  gap: 20px;
}

.give-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
}

.give-card .icon-circle {
  margin-bottom: 16px;
}

.give-card h3 {
  margin-bottom: 8px;
  font-size: 1.125rem;
}

.give-card p {
  font-size: 0.9375rem;
}

.give-card-accent {
  background: var(--light);
}

.give-details {
  display: grid;
  gap: 8px;
}

.give-details div {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--light);
}

.give-details dt {
  font-size: 0.75rem;
  font-weight: 600;
}

.give-details dd {
  font-weight: 700;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.give-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.give-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.give-links a:hover {
  color: var(--magenta-strong);
}

.give-links .icon {
  width: 18px;
  height: 18px;
  color: var(--magenta-strong);
}

@media (min-width: 900px) {
  .give-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
  }
}










/* News */
.news-card {
  position: relative;
}

.news-card .card-media .panel-icon-tile .icon {
  width: 48px;
  height: 48px;
}

.news-date {
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--magenta-strong);
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

/* Whole card is clickable through the title link */
.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
}

.news-card .link-arrow {
  margin-top: auto;
  padding-top: 18px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  font-size: 0.875rem;
  font-weight: 600;
}

.post-meta {
  margin-bottom: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.post-container {
  max-width: calc(760px + 2 * var(--gutter));
}

.post-figure {
  margin-bottom: 36px;
  border-radius: 20px;
}

.post-image {
  width: 100%;
}

.post-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
}

.post-body > * + * {
  margin-top: 18px;
}

.post-body h2 {
  margin-top: 36px;
  font-size: 1.375rem;
}

.post-body ul {
  padding-left: 1.2em;
}

.post-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

.form-card,
.contact-aside {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 20px 50px -34px rgba(11, 31, 94, 0.3);
  scroll-margin-top: 100px;
}

.contact-aside {
  background: var(--light);
  box-shadow: none;
}

.form-title {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy);
  font-size: 1.25rem;
  text-align: center;
}

.form-row {
  display: grid;
  gap: 0 16px;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.req {
  margin-left: 2px;
  font-weight: 700;
  color: #B42318;
}

.form-required-note {
  margin-bottom: 18px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #D5DAE6;
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px var(--navy-soft);
}

.field [aria-invalid="true"] {
  border-color: #B42318;
}

.field-error {
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #B42318;
}

.form-alert {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-left: 4px solid #B42318;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #FEF3F2;
  font-size: 0.875rem;
  font-weight: 600;
  color: #912018;
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.form-success .icon-circle {
  background: #E4F2EA;
  color: var(--green);
}

.form-success h2 {
  font-size: 1.375rem;
}

.form-success .btn {
  margin-top: 10px;
}

.btn-block {
  width: 100%;
}

/* In place of a form when messages can't be delivered (Vercel preview) */
.form-offline .btn-row {
  margin-top: 20px;
}

.form-offline .form-note {
  margin-top: 18px;
  overflow-wrap: anywhere;
}

.form-note {
  margin-top: 12px;
  font-size: 0.8125rem;
  text-align: center;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.info-grid.info-grid-stack {
  grid-template-columns: 1fr;
}

.btn-whatsapp {
  width: 100%;
  margin-top: 20px;
  background: #1F8F4E;
  color: var(--paper);
}

.btn-whatsapp:hover {
  background: #17703C;
  color: var(--paper);
}

.btn-whatsapp .icon {
  width: 18px;
  height: 18px;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 32px;
  }
}

/* Text-led section: heading left, text right (Donate, Gallery)
   ========================================================================== */

.where-grid {
  display: grid;
  gap: 16px 64px;
}

.where-text p {
  max-width: 38em;
}

.where-text p + p {
  margin-top: 14px;
}

.where-text .where-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 24px;
}

@media (min-width: 1024px) {
  .where-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }
}

/* Sponsorship form (sponsor.php) */
.start-grid {
  display: grid;
  gap: 32px 64px;
  align-items: start;
}

.start-intro p {
  max-width: 30em;
  margin-top: 14px;
}

.start-alt {
  font-size: 0.9375rem;
}

@media (min-width: 1024px) {
  .start-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

/* Gallery (gallery.php) */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: var(--light);
}

.gallery-item picture,
.gallery-item img {
  width: 100%;
  height: 100%;
}

.gallery-item img {
  object-fit: cover;
}

.gallery-art .gallery-item {
  aspect-ratio: 1;
}

.gallery-header {
  margin-bottom: 0;
}

.gallery-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin-top: 18px;
}

.gallery-link {
  display: block;
  border-radius: 6px;
  cursor: zoom-in;
}

.feature-project {
  max-width: 860px;
  margin: 32px auto 0;
  text-align: center;
}

.feature-project-media {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: var(--light);
}

.feature-project-media picture,
.feature-project-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.feature-project-media img {
  object-fit: cover;
}

.feature-project-title {
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.gallery-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* Each turn of an album (main.js): the four on show slide out to the
   left, then the next four slide in from the right one after another */
.gallery-out,
.gallery-in {
  overflow-x: clip;
  overflow-clip-margin: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .gallery-out > li {
    animation: gallery-out 0.45s ease-in forwards;
  }

  .gallery-in > li {
    animation: gallery-in 0.7s ease-out both;
  }
}

@keyframes gallery-out {
  to {
    opacity: 0;
    transform: translateX(-80px);
  }
}

@keyframes gallery-in {
  from {
    opacity: 0;
    transform: translateX(120px);
  }
}

/* Once the album is open the button reads "View less"; its arrow points up */
.gallery-more [aria-expanded="true"] .icon {
  transform: rotate(-90deg);
}

/* Lightbox (main.js): one photo at a time, full size, with previous and
   next. Built only when JS runs; without it the photo link opens the image. */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(11, 31, 94, 0.96);
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(11, 31, 94, 0.96);
}

.lightbox-stage {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 64px 16px 72px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(11, 31, 94, 0.6);
  color: var(--paper);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-btn:hover {
  border-color: var(--paper);
  background: var(--navy);
}

.lightbox-btn:focus-visible {
  outline-color: var(--paper);
}

.lightbox-close {
  top: 12px;
  right: 12px;
}

.lightbox-prev,
.lightbox-next {
  bottom: 12px;
}

.lightbox-prev {
  left: calc(50% - 64px);
}

.lightbox-next {
  right: calc(50% - 64px);
}

.lightbox-count {
  position: absolute;
  top: 24px;
  left: 16px;
  font-size: 0.9375rem;
}

@media (min-width: 700px) {
  .lightbox-stage {
    padding: 64px 88px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .lightbox-prev {
    left: 20px;
  }

  .lightbox-next {
    right: 20px;
  }
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-title {
  margin-top: 12px;
  font-size: 1.125rem;
}

.gallery-title a,
.feature-project-title a {
  position: relative;
}

/* Gira Inka: a line under the heading and a donate button */
.gallery-tagline {
  margin-top: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
}

.gallery-cta {
  margin-top: 22px;
}

/* School projects: one photo per project, each with its own donate button */
.appeal {
  max-width: 760px;
  margin: 48px auto 0;
  text-align: center;
}

.appeal-title,
.appeal-more-title {
  font-size: 1.25rem;
  text-align: center;
}

.appeal-text {
  margin-top: 12px;
}

.appeal-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.appeal-item-title {
  margin-top: 12px;
  font-size: 1.125rem;
}

.appeal-link {
  position: relative;
  margin-top: 6px;
}

.appeal-more-title {
  margin-top: 64px;
}

/* Team (team.php): portrait, name and role, centred */
.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 16px;
  padding: 0;
  list-style: none;
  text-align: center;
}

.team-photo {
  aspect-ratio: 4 / 5;
  margin-bottom: 18px;
  border-radius: 6px;
  background: var(--light);
}

.team-photo picture,
.team-photo img {
  width: 100%;
  height: 100%;
}

.team-photo img {
  object-fit: cover;
  object-position: 50% 20%;
}

.team-name {
  font-size: 1.25rem;
}

.team-role {
  margin-top: 4px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.team-member .link-arrow {
  justify-content: center;
  margin-top: 10px;
  font-size: 0.9375rem;
}

@media (max-width: 479px) {
  .team-name {
    font-size: 1.0625rem;
  }

  .team-role {
    font-size: 0.875rem;
  }

  /* In the narrow two-up grid the link wraps; keep the arrow on the last line */
  .team-member .link-arrow {
    display: inline;
    font-size: 0.875rem;
  }

  .team-member .link-arrow .icon {
    display: inline-block;
    vertical-align: -3px;
  }
}

@media (min-width: 900px) {
  .team {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 24px;
  }
}

/* Contact: embedded map, lazy-loaded, fluid */
.map-embed {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--light);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-links {
  margin-top: 14px;
}

@media (min-width: 700px) {
  .map-embed {
    aspect-ratio: 16 / 7;
  }
}

/* Utilities
   ========================================================================== */

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Motion — only with JS on and when the visitor has not asked for less
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  .js [data-reveal="image"] {
    opacity: 1;
    transform: none;
    clip-path: inset(5% 5% 5% 5% round 20px);
    transition: clip-path 1s var(--ease);
  }

  .js [data-reveal="image"] img {
    transform: scale(1.06);
    transition: transform 1.2s var(--ease);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  .js [data-reveal="image"].is-visible {
    clip-path: inset(0 0 0 0 round 20px);
  }

  .js [data-reveal="image"].is-visible img {
    transform: none;
  }

  .stats .stat:nth-child(2) { transition-delay: 0.08s; }
  .stats .stat:nth-child(3) { transition-delay: 0.16s; }
  .card-grid > :nth-child(2) { transition-delay: 0.1s; }
  .card-grid > :nth-child(3) { transition-delay: 0.2s; }

  /* The underline draws itself on arrival */
  .hero-underline path {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    animation: draw-line 1s 0.35s var(--ease) forwards;
  }
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}


/* In the press (news.php): four article cards, two by two on wide screens */
@media (min-width: 1024px) {
  .press-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1000px;
    margin-inline: auto;
  }
}

/* Homepage helpers
   ========================================================================== */


/* What we do: five programmes in brief, each row links to its owner page */
.programme-list {
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.programme-item a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  column-gap: 18px;
  align-items: center;
  padding: 20px 4px;
  color: inherit;
  text-decoration: none;
}

.programme-icon {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
}

.programme-icon .icon {
  width: 21px;
  height: 21px;
}

.programme-green .programme-icon {
  background: var(--green);
}

.programme-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

.programme-line {
  grid-column: 2;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.programme-item a > .icon {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  color: var(--magenta-strong);
  transition: transform 0.25s var(--ease);
}

.programme-item a:hover .programme-name {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.programme-item a:hover > .icon {
  transform: translateX(4px);
}

@media (min-width: 900px) {
  .programme-item a {
    grid-template-columns: 44px minmax(0, 0.9fr) minmax(0, 1.4fr) 20px;
  }

  .programme-icon {
    grid-row: auto;
  }

  .programme-line {
    grid-column: 3;
  }

  .programme-item a > .icon {
    grid-column: 4;
    grid-row: auto;
  }
}

.more-link {
  margin-top: 28px;
  text-align: center;
}

/* Homepage: the short story excerpt (the full story lives on about.php)
   ========================================================================== */

.about-intro {
  display: grid;
  gap: 20px;
}

.about-intro-text p {
  max-width: 36em;
}

.about-intro-text .btn {
  margin-top: 24px;
}

/* The five pillars (about.php owns them)
   ========================================================================== */

.pillar-set {
  margin-top: clamp(48px, 6vw, 72px);
}

.pillar-set-title {
  margin-bottom: 32px;
  font-size: 1.25rem;
  text-align: center;
}

/* Five points on one thread: navy circles joined by a line.
   Vertical on phones, horizontal from 900px. */
.pillar-line {
  position: relative;
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pillar-line::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 27px;
  width: 2px;
  background: var(--navy);
  opacity: 0.25;
}

.pillar-line li {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 20px;
  align-items: start;
}

.pillar-dot {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 8px var(--light);
  color: var(--paper);
}

.pillar-dot .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
}

.pillar-green .pillar-dot {
  background: var(--green);
}

.pillar-line h4 {
  padding-top: 6px;
  font-size: 1.0625rem;
}

.pillar-line p {
  margin-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .pillar-line {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
  }

  /* The thread runs from the first circle's centre to the last */
  .pillar-line::before {
    top: 32px;
    right: 10%;
    bottom: auto;
    left: 10%;
    width: auto;
    height: 2px;
  }

  .pillar-line li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .pillar-dot {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .pillar-dot .icon {
    width: 28px;
    height: 28px;
  }

  .pillar-line h4 {
    padding-top: 0;
  }

  .pillar-line p {
    max-width: 15em;
  }
}

@media (min-width: 1024px) {
  .about-intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 72px;
    align-items: start;
  }
}

/* Closing band (every page): the real logo mark, in its own colours
   ========================================================================== */

.cta::before {
  position: static;
  display: block;
  width: 96px;
  height: 89px;
  margin: 0 auto 24px;
  background: url("../img/logo-mark-colour.png") center / contain no-repeat;
  -webkit-mask: none;
  mask: none;
}

@media (min-width: 1100px) {
  .cta::before {
    position: absolute;
    top: 50%;
    right: max(32px, calc(50% - 600px));
    width: 180px;
    height: 166px;
    margin: 0;
    transform: translateY(-50%);
  }
}