/* Ushirika School Kibera — main stylesheet
   Colours come from the school crest: red #EE1D23 and blue #3389C4. */

:root {
  --red: #EE1D23;        /* crest red: large shapes and accents */
  --red-ink: #CF1A20;    /* darker red: buttons with white text */
  --red-dark: #A9141A;
  --blue: #3389C4;       /* crest blue */
  --blue-ink: #1A5F94;   /* darker blue: links, text, buttons */
  --navy: #0F2D4A;       /* uniform navy: headings, footer */
  --ink: #22303F;        /* body text */
  --muted: #56657A;
  --chalk: #EEF5FB;      /* pale blue section background */
  --chalk-2: #D6E8F6;
  --sky: #9CC7E6;
  --line: #D3E2EF;
  --white: #FFFFFF;

  --font-display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --dur-quick: 160ms;
  --dur-reveal: 700ms;
  --dur-photo: 1100ms;

  --radius-photo: 22px;
  --radius-field: 10px;
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); margin: 0 0 .5em; line-height: 1.02; }
h1 { font-weight: 800; font-stretch: 75%; font-size: clamp(2.75rem, 7vw, 5.5rem); letter-spacing: -.015em; }
h2 { font-weight: 800; font-stretch: 75%; font-size: clamp(2.25rem, 4.6vw, 3.5rem); letter-spacing: -.01em; }
h3 { font-weight: 700; font-stretch: 87.5%; font-size: 1.5rem; line-height: 1.15; }
h4 { font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.prose { max-width: 68ch; }
.prose p { line-height: 1.75; }
.lede { font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); line-height: 1.6; max-width: 60ch; }
.muted { color: var(--muted); }
.section { padding-block: clamp(52px, 7vw, 96px); }
.section--chalk { background: var(--chalk); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { font-size: 1.1875rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-family: var(--font-display); text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Red and blue bar, taken from the "USHIRIKA | SCHOOL" bar on the crest */
.mark { display: flex; width: 76px; height: 9px; margin-bottom: 22px; }
.mark::before, .mark::after { content: ""; flex: 1; }
.mark::before { background: var(--red); }
.mark::after { background: var(--blue); margin-left: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1;
  padding: .95em 1.5em; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--red { background: var(--red-ink); color: #fff; }
.btn--red:hover { background: var(--red-dark); color: #fff; }
.btn--blue { background: var(--blue-ink); color: #fff; }
.btn--blue:hover { background: var(--navy); color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--blue-ink); background: transparent; }
.btn--ghost:hover { background: var(--chalk); color: var(--navy); }
.btn--light { border-color: #fff; color: #fff; background: transparent; }
.btn--light:hover { background: #fff; color: var(--navy); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  color: var(--blue-ink); text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: .3em; text-decoration-color: var(--red);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand img { height: 58px; width: auto; }
.brand__name { display: block; font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 1.625rem; line-height: 1; }
.brand__place { display: block; font-family: var(--font-display); font-size: .875rem; color: var(--muted); margin-top: 4px; line-height: 1; }
.brand:hover { color: var(--navy); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) {
  font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem;
  color: var(--navy); text-decoration: none; padding: 10px 12px; border-radius: 8px;
}
.nav a:not(.btn):hover { background: var(--chalk); }
.nav a[aria-current="page"]:not(.btn) {
  color: var(--blue-ink);
  text-decoration: underline; text-decoration-color: var(--red);
  text-decoration-thickness: 3px; text-underline-offset: 9px;
}
.nav .btn { margin-left: 10px; padding: .8em 1.35em; }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--navy);
  background: var(--chalk); border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.site-header.is-open .nav-toggle .icon-close { display: block; }
.site-header.is-open .nav-toggle .icon-menu { display: none; }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(15, 45, 74, .1);
  }
  .site-header.is-open .nav { display: flex; }
  .nav a:not(.btn) { padding: 14px 6px; font-size: 1.1875rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]:not(.btn) { text-underline-offset: 6px; }
  .nav .btn { margin: 18px 0 0; }
}
@media (max-width: 420px) {
  .brand img { height: 48px; }
  .brand__name { font-size: 1.375rem; }
  .nav-toggle span { display: none; }
}

/* ---------- Home hero ---------- */
.hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: clamp(560px, 86vh, 860px);
  color: #fff; background: var(--navy); overflow: hidden;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 32, 54, .95) 0%, rgba(10, 32, 54, .72) 30%, rgba(10, 32, 54, .18) 60%, rgba(10, 32, 54, 0) 74%);
}
.hero__content { position: relative; z-index: 1; padding-bottom: clamp(40px, 6vw, 80px); }
.hero h1 { color: #fff; font-size: clamp(3.25rem, 6.6vw, 6.5rem); line-height: .9; margin-bottom: .3em; }
.hero__sub { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.55; max-width: 52ch; color: rgba(255, 255, 255, .93); margin-bottom: 1.5em; }

/* Tablets and phones: photo on top, words underneath, so no faces are covered */
@media (max-width: 900px) {
  .hero { display: block; min-height: 0; }
  .hero::after { display: none; }
  .hero__img { position: static; height: auto; aspect-ratio: 4 / 3; object-position: 52% 30%; }
  .hero__content { padding-block: 32px 44px; }
  .hero h1 { font-size: clamp(2.75rem, 11vw, 4.5rem); }
}
@media (max-width: 520px) { .hero__img { aspect-ratio: 1 / 1; object-position: 56% 40%; } }

/* The page's one load-in moment */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero__content > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero__content > :nth-child(2) { animation-delay: .12s; }
.hero__content > :nth-child(3) { animation-delay: .24s; }

/* ---------- Interior page heading ---------- */
.page-head { padding-block: clamp(56px, 8vw, 104px) clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 15ch; }
.page-head .lede { margin-bottom: 0; }

/* ---------- Origin story + crest counters ---------- */
.origin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(40px, 6vw, 96px); align-items: center; }
.origin .prose { max-width: 58ch; }
@media (max-width: 900px) { .origin { grid-template-columns: minmax(0, 1fr); } }

.crest {
  list-style: none; margin: 0 auto; padding: 0;
  width: 100%; max-width: 500px; aspect-ratio: 480 / 560;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  clip-path: url(#crest-clip);
}
.crest li { display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; padding-inline: 7%; }
.crest li:nth-child(1), .crest li:nth-child(4) { background: var(--red); }
.crest li:nth-child(2), .crest li:nth-child(3) { background: var(--blue); }
.crest li:nth-child(1), .crest li:nth-child(2) { justify-content: flex-end; padding-bottom: 11%; }
.crest li:nth-child(3), .crest li:nth-child(4) { justify-content: flex-start; padding-top: 11%; }
.crest__num {
  display: block; font-family: var(--font-display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(2.75rem, 6.4vw, 4.75rem); line-height: .9; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.crest__label {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(.875rem, 1.35vw, 1.0625rem); line-height: 1.25; margin-top: .45em; max-width: 13ch;
}
.crest-note { text-align: center; font-family: var(--font-display); font-size: .9375rem; color: var(--muted); margin-top: 14px; }

/* ---------- Class ladder (PP1 to Senior School) ---------- */
.ladder {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end;
  border-bottom: 5px solid var(--navy);
}
.ladder li { border-radius: 20px 20px 0 0; padding: 24px 22px 26px; display: flex; flex-direction: column; }
.ladder h3 { font-size: 1.25rem; margin: 0 0 .2em; color: inherit; }
.ladder p { font-size: 1rem; line-height: 1.5; margin: 0; }
.ladder .ladder__grades { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1; margin: 0 0 .45em; }
.ladder li:nth-child(1) { min-height: 210px; background: var(--chalk-2); color: var(--navy); }
.ladder li:nth-child(2) { min-height: 260px; background: var(--sky); color: var(--navy); }
.ladder li:nth-child(3) { min-height: 310px; background: var(--blue-ink); color: #fff; }
.ladder li:nth-child(4) { min-height: 360px; background: var(--navy); color: #fff; }
.section--chalk .ladder li:nth-child(1) { background: #fff; }
@media (max-width: 860px) {
  .ladder { grid-template-columns: minmax(0, 1fr); border-bottom: 0; gap: 8px; }
  .ladder li { min-height: 0 !important; border-radius: 16px; }
  .ladder li:nth-child(2) { margin-left: 4%; }
  .ladder li:nth-child(3) { margin-left: 8%; }
  .ladder li:nth-child(4) { margin-left: 12%; }
}

/* ---------- Programmes ---------- */
.programmes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.programmes li { border-top: 1px solid var(--line); padding: 26px 0 30px; }
.programmes svg { width: 34px; height: 34px; color: var(--blue-ink); margin-bottom: 14px; }
.programmes h3 { font-size: 1.375rem; margin-bottom: .35em; }
.programmes p { font-size: 1.0625rem; line-height: 1.6; margin: 0; color: var(--ink); }
@media (max-width: 900px) { .programmes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .programmes { grid-template-columns: minmax(0, 1fr); } }

/* Three photos above the programmes list: one big on the left, two stacked on the right */
.photo-row {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr));
  height: clamp(440px, 48vw, 660px); gap: clamp(10px, 1.4vw, 16px); margin-bottom: clamp(36px, 5vw, 56px);
}
.photo-row figure { margin: 0; min-height: 0; }
.photo-row figure:first-child { grid-row: span 2; }
.photo-row img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
@media (max-width: 700px) {
  .photo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; height: auto; }
  .photo-row figure:first-child { grid-column: span 2; grid-row: auto; }
  .photo-row img { aspect-ratio: 1; height: auto; }
  .photo-row figure:first-child img { aspect-ratio: 3 / 2; }
}

.support-photo { margin: 28px 0 0; }
.support-photo img { width: 100%; border-radius: 18px; }
.support-photo figcaption { font-family: var(--font-display); font-size: .9375rem; color: var(--muted); margin-top: 10px; }

/* ---------- Feature (photo + text) ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.feature--flip > :first-child { order: 2; }
.feature__photo { border-radius: var(--radius-photo); overflow: hidden; }
.feature__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.feature__photo--square img { aspect-ratio: 1; }

@media (max-width: 860px) {
  .feature, .feature--flip { grid-template-columns: minmax(0, 1fr); }
  .feature--flip > :first-child { order: 0; }
  .feature__photo, .feature .photo-slot { max-width: none; }
  .feature__photo img { aspect-ratio: 4 / 3; }
}

/* Spot for a photo that hasn't been sent yet. Replace it with an <img>. */
.photo-slot {
  display: grid; place-items: center; text-align: center; gap: 10px;
  aspect-ratio: 4 / 5; padding: 24px;
  background: var(--chalk); border: 2px dashed #A9C6DE; border-radius: var(--radius-photo);
  color: var(--blue-ink); font-family: var(--font-display); font-size: 1rem; line-height: 1.4;
}
.photo-slot svg { display: block; width: 44px; height: 44px; margin: 0 auto 10px; }
.photo-slot--wide { aspect-ratio: 4 / 3; }
.photo-slot--square { aspect-ratio: 1; }

/* ---------- Sponsorship fee sheet ---------- */
.sponsor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 960px) { .sponsor { grid-template-columns: minmax(0, 1fr); } }
.fee-sheet {
  background: #fff; border-radius: 6px; padding: clamp(24px, 4vw, 40px);
  border-top: 8px solid var(--red);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -24px rgba(15, 45, 74, .25);
}
.fee-sheet__head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.fee-sheet__head img { height: 64px; width: auto; }
.fee-sheet__head h3 { margin: 0; font-size: 1.5rem; }
.fee-sheet__head p { margin: 2px 0 0; font-family: var(--font-display); font-size: .9375rem; color: var(--muted); line-height: 1.3; }
.fees { width: 100%; border-collapse: collapse; font-family: var(--font-display); font-size: 1.0625rem; }
.fees th, .fees td { padding: 14px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fees thead th { font-size: .9375rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--navy); padding-top: 4px; }
.fees .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fees tbody .num { font-weight: 700; color: var(--navy); }
.fees tbody th { font-weight: 600; color: var(--navy); }
.fees small { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }
.fees tr.is-extra th, .fees tr.is-extra .num { color: var(--blue-ink); }
.fee-sheet__foot { font-family: var(--font-display); font-size: .9375rem; color: var(--muted); margin: 16px 0 0; line-height: 1.45; }
.fees .cur-head { display: none; }
/* Phones: "KES" moves into the column headings so the table fits the card */
@media (max-width: 480px) {
  .fee-sheet { padding: 22px 16px; }
  .fees { font-size: 1rem; }
  .fees th, .fees td { padding: 12px 4px; }
  .fees thead th { font-size: .875rem; }
  .fees thead .num { white-space: normal; }
  .fees .cur { display: none; }
  .fees .cur-head { display: inline; }
}

/* M-Pesa strip */
.paybill {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  margin-top: clamp(36px, 5vw, 56px); padding: 22px 28px; border-radius: 18px;
  background: var(--navy); color: #fff; font-family: var(--font-display);
}
.paybill__title { font-weight: 700; font-size: 1.1875rem; margin-right: auto; }
.paybill__item { display: flex; align-items: center; gap: 10px; }
.paybill__item span { color: #B9CDE0; font-size: .9375rem; }
.paybill__item strong { font-size: 1.625rem; font-weight: 800; font-stretch: 75%; letter-spacing: .02em; }

.copy {
  font-family: var(--font-display); font-weight: 600; font-size: .875rem;
  border: 1.5px solid currentColor; background: transparent; color: inherit;
  border-radius: 999px; padding: 5px 12px; cursor: pointer; line-height: 1.2;
}
.copy:hover { background: rgba(255, 255, 255, .12); }
.copy.is-done { border-color: #7FD69B; color: #7FD69B; }

/* ---------- Quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.quote { margin: 0; padding-top: 22px; border-top: 3px solid var(--blue); }
.quote:nth-child(2) { border-top-color: var(--red); }
.quote p { font-size: 1.25rem; line-height: 1.55; font-style: italic; color: var(--navy); }
.quote { display: flex; flex-direction: column; }
.quote p { flex: 1; }
.quote footer { font-family: var(--font-display); font-size: .9375rem; line-height: 1.35; color: var(--muted); }
.quote footer strong { color: var(--navy); font-weight: 700; font-size: 1.0625rem; display: block; margin-bottom: 2px; }
.quote__by { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.quote__photo { flex: none; width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
@media (max-width: 860px) { .quotes { grid-template-columns: minmax(0, 1fr); row-gap: 40px; } .quotes:has([data-draft]) { row-gap: 72px; } }

/* Draft content: remove the data-draft attribute once it has been approved */
[data-draft] { position: relative; outline: 2px dashed var(--red); outline-offset: 12px; border-radius: 2px; }
[data-draft]::before {
  content: "Draft: needs approval before launch";
  position: absolute; top: -12px; left: 0; transform: translateY(-100%); z-index: 2;
  background: var(--red-ink); color: #fff; font-family: var(--font-display); font-style: normal;
  font-size: .75rem; font-weight: 600; line-height: 1.4; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Partners strip ---------- */
.partners-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; margin-bottom: 36px; }
.partners-intro h2 { margin: 0; }
.partners-intro p { margin: 0; max-width: 52ch; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { --marquee-gap: 64px; display: flex; align-items: center; gap: var(--marquee-gap); width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track, .marquee.is-paused .marquee__track { animation-play-state: paused; }
.marquee__track a { flex: none; display: flex; align-items: center; height: 96px; padding: 8px; border-radius: 10px; }
.marquee__track img { height: 60px; width: auto; max-width: 220px; object-fit: contain; }
.marquee__track img.logo--tall { height: 76px; }
.marquee__track img.logo--padded { height: 96px; max-width: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--marquee-gap) / 2)); } }

/* Pause / play button for the moving strips */
.marquee-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem; line-height: 1;
  color: inherit; background: transparent; border: 1.5px solid currentColor; border-radius: 999px; cursor: pointer;
  transition: background-color var(--dur-quick) ease;
}
.marquee-toggle svg { width: 16px; height: 16px; }
.marquee-toggle .i-play { display: none; }
.marquee-toggle.is-paused .i-play { display: block; }
.marquee-toggle.is-paused .i-pause { display: none; }
.partners-intro .marquee-toggle { color: var(--blue-ink); }
.partners-intro .marquee-toggle:hover { background: var(--chalk); }

/* "Life at Ushirika" photo strip on the home page */
.filmstrip { background: var(--navy); color: #fff; }
.filmstrip h2 { color: #fff; margin: 0; }
.strip-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 32px; }
.strip-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.filmstrip .text-link { color: #fff; }
.filmstrip .marquee-toggle:hover { background: rgba(255, 255, 255, .12); }
.marquee--photos .marquee__track { --marquee-gap: 16px; animation-duration: 80s; }
.marquee--photos .marquee__track a { height: auto; padding: 0; border-radius: 18px; overflow: hidden; }
.marquee--photos .marquee__track img { height: clamp(240px, 32vw, 440px); width: auto; max-width: none; object-fit: cover; border-radius: 18px; }

/* ---------- Generic content blocks ---------- */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
@media (max-width: 800px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.statement h3 { font-size: 1.125rem; font-stretch: 100%; color: var(--blue-ink); margin-bottom: .6em; }
.statement p { font-size: 1.3125rem; line-height: 1.55; color: var(--navy); margin: 0; }

.pullquote { margin: clamp(32px, 5vw, 56px) 0; }

/* Photo inside the founding story, wider than the text column */
.story-photo { margin: clamp(32px, 5vw, 56px) 0; max-width: 980px; }
.story-photo img { width: 100%; border-radius: var(--radius-photo); }
.story-photo figcaption { font-family: var(--font-display); font-size: .9375rem; line-height: 1.45; color: var(--muted); margin-top: 12px; max-width: 60ch; }
.pullquote p {
  font-family: var(--font-display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(2.75rem, 6vw, 4.75rem); line-height: .95; color: var(--blue-ink); margin: 0;
}

.values { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 34px; }
.values li { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.05; color: var(--navy); }
.values li::before { content: ""; display: inline-block; width: .3em; height: .3em; margin-right: .22em; vertical-align: .16em; background: var(--red); }
.values li:nth-child(even)::before { background: var(--blue); }

.ydf { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.ydf img { width: 160px; border-radius: 18px; }
@media (max-width: 600px) { .ydf { grid-template-columns: minmax(0, 1fr); } .ydf img { width: 112px; } }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li { position: relative; padding: 0 0 36px 32px; max-width: 64ch; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -10px; top: 10px; width: 17px; height: 17px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; }
.timeline li:last-child::before { background: var(--red); }
.timeline__year { display: block; font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 2.25rem; line-height: 1; color: var(--blue-ink); margin-bottom: 6px; }
.timeline p { margin: 0; }

.motto { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 5vw, 72px); align-items: center; }
.motto img { width: clamp(180px, 22vw, 260px); mix-blend-mode: multiply; } /* hides the logo's white background on pale blue */
.milestones { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
@media (max-width: 800px) { .milestones { grid-template-columns: minmax(0, 1fr); } }
.milestones__photo { margin: clamp(24px, 3vw, 36px) 0 0; }
.milestones__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 53% 50%; border-radius: var(--radius-photo); }
@media (min-width: 801px) {
  /* side by side: the photo stretches down to the end of the timeline, whatever its length */
  .milestones > div:first-child { display: flex; flex-direction: column; align-self: stretch; }
  .milestones__photo { position: relative; flex: 1 1 auto; min-height: 300px; }
  .milestones__photo img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
}
@media (max-width: 700px) { .motto { grid-template-columns: minmax(0, 1fr); } .motto img { order: -1; } }

.welcome { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.welcome blockquote { margin: 0; }
.welcome blockquote p { font-size: 1.25rem; line-height: 1.65; }
.welcome .sign { font-family: var(--font-display); font-size: 1.0625rem; color: var(--muted); margin-top: 1.2em; }
.welcome .sign strong { display: block; font-size: 1.25rem; color: var(--navy); }
@media (max-width: 800px) { .welcome { grid-template-columns: minmax(0, 1fr); } .welcome .photo-slot, .welcome .feature__photo { max-width: 460px; } }
/* David's round portrait in the African-pattern frame (the image already includes the frame) */
.portrait-frame { margin: 0; width: 100%; }
.portrait-frame img { width: 100%; height: auto; }
@media (max-width: 800px) { .portrait-frame { max-width: 380px; justify-self: center; } }

/* Level details on Academics */
.levels { display: grid; gap: 0; }
.level { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr) minmax(0, 540px); gap: clamp(20px, 4vw, 56px); align-items: center; padding: 32px 0; border-top: 1px solid var(--line); }
.level__photo { margin: 0; }
.level__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; }
@media (max-width: 1000px) { .level { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); } .level__photo { grid-column: 1 / -1; order: -1; } }
.level:last-child { border-bottom: 1px solid var(--line); }
.level__grades { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1; color: var(--blue-ink); margin: 0 0 .2em; }
.level h2 { font-size: 1.5rem; font-stretch: 87.5%; margin: 0; }
.level p { margin: 0; max-width: 62ch; }
@media (max-width: 700px) { .level { grid-template-columns: minmax(0, 1fr); padding: 28px 0; } }

.callout {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center;
  padding: clamp(24px, 4vw, 40px); border-radius: 22px; background: var(--chalk); border-left: 0;
}
.callout h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: .3em; }
.callout p { margin: 0; max-width: 56ch; }
@media (max-width: 760px) { .callout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Support page ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; min-height: 34px; padding: 4px 0 0 50px; font-family: var(--font-display); font-size: 1.125rem; line-height: 1.45; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-ink); color: #fff; font-weight: 700; font-size: 1rem;
}
.nowrap { white-space: nowrap; }
.steps strong { color: var(--navy); }

.give { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
@media (max-width: 860px) { .give { grid-template-columns: minmax(0, 1fr); } }
.give__panel { border: 1.5px solid var(--line); border-radius: 22px; padding: clamp(24px, 4vw, 40px); background: #fff; }
.give__panel h2 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); }
.details { margin: 0 0 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; font-family: var(--font-display); }
.details dt, .details dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.details dt { color: var(--muted); font-size: .9375rem; padding-top: 15px; padding-right: 20px; }
.details dd { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--navy); font-weight: 600; font-size: 1.0625rem; word-break: break-word; }
.details .copy { flex: none; color: var(--blue-ink); }
.details .copy:hover { background: var(--chalk); }
.details .copy.is-done { color: #1E7A3E; border-color: #1E7A3E; }
@media (max-width: 480px) { .details { grid-template-columns: minmax(0, 1fr); } .details dt { border-bottom: 0; padding-bottom: 0; } }
.give__note { font-family: var(--font-display); font-size: 1rem; color: var(--muted); margin: 0; }
.sponsor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .sponsor-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: 22px; padding: clamp(24px, 4vw, 44px); border: 1.5px solid var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field legend { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--navy); }
.field .hint { font-family: var(--font-display); font-weight: 400; color: var(--muted); font-size: .875rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-display); font-size: 1.0625rem; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid #B8CCDD; border-radius: var(--radius-field); background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(51, 137, 196, .22); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-family: var(--font-display); font-size: 1rem; margin-bottom: 18px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue-ink); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-family: var(--font-display); font-size: 1rem; line-height: 1.45; margin-top: 14px; }
.form-status:empty { display: none; }
.form-status.is-success { padding: 14px 16px; border-radius: 10px; background: #E7F5EC; color: #1C5631; }
.form-status.is-error { padding: 14px 16px; border-radius: 10px; background: #FDECEC; color: #8E1318; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-list { list-style: none; margin: 0 0 32px; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list svg { width: 26px; height: 26px; color: var(--blue-ink); margin-top: 4px; }
.contact-list span { display: block; font-family: var(--font-display); font-size: .9375rem; color: var(--muted); }
.contact-list a, .contact-list strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--navy); word-break: break-word; }
.map { border: 0; width: 100%; height: clamp(320px, 45vw, 460px); border-radius: var(--radius-photo); display: block; background: var(--chalk); }

/* ---------- Gallery and lightbox ---------- */
/* Gallery mosaic: tiles can be big (2x2), wide (2x1), tall (1x2) or normal.
   "dense" lets later photos fill any gaps, so the grid stays packed. */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 19vw, 270px); grid-auto-flow: dense; gap: clamp(8px, 1.2vw, 14px); }
.g-item { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: var(--chalk); }
.g-item--big { grid-column: span 2; grid-row: span 2; }
.g-item--wide { grid-column: span 2; }
.g-item--tall { grid-row: span 2; }
.g-item a { display: block; height: 100%; }
.g-item a:focus-visible { outline-offset: -4px; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.g-item a:hover img, .g-item a:focus-visible img { transform: scale(1.04); }
.g-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 36px 14px 12px; pointer-events: none;
  font-family: var(--font-display); font-weight: 500; font-size: .9375rem; line-height: 1.3; color: #fff;
  background: linear-gradient(to top, rgba(8, 24, 40, .85), rgba(8, 24, 40, 0));
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 42vw, 230px); }
  .g-item figcaption { font-size: .8125rem; padding: 28px 10px 8px; }
}

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; color: #fff; }
.lightbox::backdrop { background: rgba(8, 24, 40, .92); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 12px; }
.lightbox p { font-family: var(--font-display); text-align: center; margin: 12px 0 0; }
.lightbox__bar { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.lightbox button { font-family: var(--font-display); font-weight: 600; font-size: 1rem; background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }

/* ---------- News ---------- */
.empty { max-width: 640px; padding: clamp(32px, 5vw, 56px); border-radius: 22px; background: var(--chalk); }
.empty h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); }
.post { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); padding: 40px 0; border-top: 1px solid var(--line); }
.post img { border-radius: 16px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post time { font-family: var(--font-display); color: var(--muted); font-size: .9375rem; }
@media (max-width: 760px) { .post { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #D3E0EC; font-family: var(--font-display); font-size: 1rem; line-height: 1.55; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 40px; padding-block: 72px 48px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 56px; } }
.footer-logo { display: inline-block; background: #fff; border-radius: 16px; padding: 10px 12px; margin-bottom: 18px; }
.footer-logo img { height: 88px; width: auto; }
.site-footer h2 { color: #fff; font-size: 1.125rem; font-stretch: 100%; font-weight: 700; letter-spacing: 0; margin: 0 0 14px; line-height: 1.3; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer p { margin: 0 0 12px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); display: grid; place-items: center; }
.social a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.social svg { width: 20px; height: 20px; }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.newsletter input[type="email"] {
  flex: 1 1 180px; min-width: 0; font-family: var(--font-display); font-size: 1rem; color: var(--ink);
  padding: 12px 16px; border-radius: 999px; border: 0; background: #fff;
}
.newsletter .btn { padding: .85em 1.3em; }
.newsletter .form-status { width: 100%; margin-top: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); padding-block: 20px 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: .9375rem; color: #AFC3D6; }

/* ---------- Photo layouts that fill the empty space ---------- */
/* Inner page headers: the photo runs to the right edge of the screen at full header height.
   --bleed is the (negative) distance from the content edge to the screen edge. */
.page-head--photo { padding: 0; border-bottom: 0; }
.page-head--photo .wrap {
  --bleed: calc((min(100vw - 2 * var(--gutter), var(--wrap)) - 100vw) / 2);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 80px);
  align-items: stretch; min-height: clamp(440px, 66vh, 720px);
}
.page-head--photo .page-head__text { align-self: center; padding-block: clamp(40px, 6vw, 88px); }
.page-head__photo {
  margin: 0 var(--bleed) 0 0; min-height: 100%; overflow: hidden; background: var(--chalk);
  border-radius: 0 0 0 clamp(56px, 9vw, 160px); /* the curve echoes the bottom of the crest shield */
}
.page-head__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .page-head--photo .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  .page-head__photo { order: -1; margin: 0 var(--bleed); aspect-ratio: 4 / 3; min-height: 0; border-radius: 0 0 0 64px; }
  .page-head--photo .page-head__text { padding-block: 28px 44px; }
}

/* About: the old photo stays beside the story while you read */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.story .story-photo { margin: 0; max-width: none; }
.story__aside { position: sticky; top: 110px; }
.story--today { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; margin-top: clamp(16px, 3vw, 32px); }
.story--today .story__aside { position: static; }
@media (max-width: 960px) {
  .story, .story--today { grid-template-columns: minmax(0, 1fr); }
  .story__aside { position: static; }
}

/* About: mission and vision on a full-width photo */
.photo-band { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; }
.photo-band__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.photo-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 32, 54, .86); }
.photo-band .statement h3 { color: var(--sky); }
.photo-band .statement p { color: #fff; }

/* About: YDF logo, text and a large photo */
.ydf { grid-template-columns: 140px minmax(0, 1fr) minmax(0, 560px); align-items: center; }
.ydf > img { width: 100%; max-width: 140px; }
.ydf__photo { margin: 0; }
.ydf__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; }
@media (max-width: 1000px) { .ydf { grid-template-columns: 120px minmax(0, 1fr); } .ydf__photo { grid-column: 1 / -1; } }
@media (max-width: 600px) { .ydf { grid-template-columns: minmax(0, 1fr); } }

/* News: the "on its way" box beside four event photos */
.news-empty { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 14px); }
.mosaic figure { margin: 0; }
.mosaic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; }
@media (max-width: 900px) { .news-empty { grid-template-columns: minmax(0, 1fr); } .news-empty .empty { max-width: none; } }

/* About: school leaders, grouped by school */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.team__group h3 { font-size: 1.25rem; font-stretch: 100%; color: var(--blue-ink); padding-bottom: 12px; margin-bottom: 20px; border-bottom: 3px solid var(--blue); }
.team__group:first-child h3 { border-bottom-color: var(--red); }
.team__people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.person__photo { margin: 0 0 14px; border-radius: 18px; overflow: hidden; background: var(--chalk-2); }
.person__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.person__name { font-family: var(--font-display); font-weight: 700; font-size: 1.3125rem; line-height: 1.2; color: var(--navy); margin: 0 0 4px; }
.person__role { font-family: var(--font-display); font-size: 1rem; line-height: 1.35; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .team { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) { .person__name { font-size: 1.125rem; } .person__role { font-size: .9375rem; } }

/* Home: wide photo between the "PP1 to senior school" heading and the class ladder */
.wide-photo { margin: 0 0 clamp(32px, 4vw, 48px); }
.wide-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius-photo); }
@media (max-width: 700px) { .wide-photo img { aspect-ratio: 4 / 3; } }
/* Support: students opening letters, under the ways to give */
.give-photo { margin: clamp(32px, 4vw, 48px) 0 0; }
.give-photo img { object-position: 50% 34%; }

/* Home: Sarah's story as one card, photo on the left, story on the right */
.story-card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch;
  background: #fff; border-radius: 28px; overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -40px rgba(15, 45, 74, .35);
}
.story-card__photo { position: relative; margin: 0; min-height: 100%; background: var(--chalk-2); }
.story-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 35%; }
.story-card__photo figcaption {
  position: absolute; left: 16px; bottom: 16px; max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 999px; background: rgba(10, 32, 54, .78); color: #fff;
  font-family: var(--font-display); font-size: .875rem; font-weight: 500; line-height: 1.3;
}
.story-card__body { padding: clamp(28px, 4.5vw, 64px); align-self: center; }
.story-card__body h2 { font-size: clamp(2.25rem, 4vw, 3.25rem); margin-bottom: .4em; }
.story-card__body .lede { margin-bottom: 1.4em; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 1.6em; }
.facts > div { border-top: 3px solid var(--blue); padding-top: 12px; }
.facts > div:first-child { border-top-color: var(--red); }
.facts dt { font-family: var(--font-display); font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.25; color: var(--navy); }
.story-card__body > p:not(.lede) { font-size: 1.0625rem; color: var(--ink); margin-bottom: 1.6em; }
@media (max-width: 900px) {
  .story-card { grid-template-columns: minmax(0, 1fr); }
  .story-card__photo { min-height: 0; }
  .story-card__photo img { aspect-ratio: 4 / 3; height: auto; }
}
@media (max-width: 480px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-top-width: 2px; padding: 10px 0; }
  .facts dt { margin: 0; }
  .facts dd { text-align: right; font-size: 1rem; }
  .story-card__photo figcaption { font-size: .8125rem; left: 10px; bottom: 10px; }
}

/* About: partner spotlight on Lotte Davis and One Girl Can. Story on the left, the big group photo
   on the right, with the building-work photo pinned over its bottom-left corner */
.lotte { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.lotte__text h2 { margin-bottom: .45em; }
/* round partner icon beside the name (Lotte Davis, Vonda-Lee Sharun) */
.lotte__byline, .vonda__byline { display: flex; align-items: center; gap: 18px; margin: 0 0 26px; }
.lotte__byline img, .vonda__byline img { flex: none; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--blue); }
.lotte__byline p, .vonda__byline p { margin: 0; font-family: var(--font-display); font-size: 1rem; line-height: 1.35; color: var(--muted); }
.lotte__byline strong, .vonda__byline strong { display: block; font-size: 1.375rem; color: var(--navy); }
.lotte__text .lede { margin-bottom: 1.4em; }
.lotte__text > p:not(.lede) { font-size: 1.0625rem; }
.lotte__text .btn-row { margin-top: 8px; }
.lotte__photos { position: relative; padding: 0 0 clamp(44px, 6vw, 80px) clamp(44px, 6vw, 80px); }
.lotte__group { margin: 0; }
.lotte__group img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 55% 50%; border-radius: var(--radius-photo); }
.lotte__build {
  position: absolute; left: 0; bottom: 0; width: 42%; margin: 0;
  padding: 8px; background: #fff; border-radius: 22px;
  box-shadow: 0 24px 48px -18px rgba(15, 45, 74, .45);
}
.lotte__build img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 15px; }
.lotte__build figcaption { padding: 8px 4px 2px; font-family: var(--font-display); font-size: .875rem; line-height: 1.3; color: var(--muted); }
@media (max-width: 900px) {
  .lotte { grid-template-columns: minmax(0, 1fr); }
  .lotte__photos { max-width: 600px; padding: 0 0 56px 28px; }
  .lotte__group img { aspect-ratio: 1; }
  .lotte__build { width: 46%; }
}
@media (max-width: 480px) {
  .lotte__byline img, .vonda__byline img { width: 80px; height: 80px; }
  .lotte__build { padding: 6px; border-radius: 18px; }
  .lotte__build figcaption { font-size: .8125rem; }
}

/* About: partner spotlight on Vonda-Lee Sharun, champion in Canada. Two columns of text:
   heading, round icon with her name and the lede on the left; the story, commitments and
   button on the right */
.vonda { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.vonda__intro h2 { margin-bottom: .45em; }
.vonda__intro .lede { margin-bottom: 0; }
.vonda__more > p { font-size: 1.0625rem; margin-bottom: 1.4em; }
.vonda__causes { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0 0 28px; padding: 0; }
.vonda__causes li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem; color: var(--navy);
}
.vonda__causes li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.vonda__causes li:first-child::before { background: var(--red); }
@media (max-width: 860px) {
  .vonda { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 480px) {
  .vonda__causes li { font-size: .875rem; padding: 7px 13px; }
}

/* Home: photo under the sponsor text */
.sponsor__photo { margin: clamp(32px, 4vw, 48px) 0 0; }
.sponsor__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; }

/* Callout boxes with a photo */
.callout--photo { grid-template-columns: 300px minmax(0, 1fr) auto; }
.callout__photo { margin: 0; }
.callout__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
@media (max-width: 860px) {
  .callout--photo { grid-template-columns: minmax(0, 1fr); }
  .callout__photo img { aspect-ratio: 3 / 2; }
}

/* ---------- Motion ----------
   Only runs when JavaScript is on and the visitor hasn't asked their device for less motion
   (site.js adds the "motion" class to <html>). Only opacity, transform and clip-path animate,
   so nothing on the page moves around or jumps. */
.btn { transition: background-color .15s, color .15s, border-color .15s, transform var(--dur-quick) ease; }
.btn:active { transform: scale(.97); }
.site-header { transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 30px -12px rgba(15, 45, 74, .25); }

/* Slow zoom on the home hero photo */
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.motion .hero__img { transform-origin: 50% 30%; animation: slow-zoom 24s ease-in-out infinite alternate; }

/* Inner page headers play once when the page opens (no flash before it starts) */
@keyframes unveil { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.12); } to { transform: none; } }
.motion .page-head__photo { animation: unveil var(--dur-photo) var(--ease-out) .15s both; }
.motion .page-head__photo img { animation: settle calc(var(--dur-photo) + 500ms) var(--ease-out) .15s both; }
.motion .page-head__text > * { animation: rise .8s var(--ease-out) both; }
.motion .page-head__text > :nth-child(2) { animation-delay: .08s; }
.motion .page-head__text > :nth-child(3) { animation-delay: .16s; }

/* Text and boxes fade up as they come into view */
.motion .rv { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: var(--rv-delay, 0ms); }
.motion .rv.is-in { opacity: 1; transform: none; }

/* Photos unveil from the bottom, then their caption fades in.
   The photo inside is clipped, not its frame, so the browser can still see the frame arrive on screen. */
.motion .rv-photo img { clip-path: inset(100% 0 0 0); transition: clip-path var(--dur-photo) var(--ease-out); transition-delay: var(--rv-delay, 0ms); }
.motion .rv-photo.is-in img { clip-path: inset(0 0 0 0); }
.motion .rv-photo figcaption { opacity: 0; transition: opacity .6s ease; transition-delay: calc(var(--rv-delay, 0ms) + 450ms); }
.motion .rv-photo.is-in figcaption { opacity: 1; }
/* the pinned building-work card on About: the white card itself rises in too, a beat after the big photo */
.motion .lotte__build.rv-photo { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--rv-delay, 0ms) + 300ms); }
.motion .lotte__build.rv-photo.is-in { opacity: 1; transform: none; }

/* The class ladder grows up from the ground line, one step at a time */
.motion .rv-rise { clip-path: inset(100% 0 0 0); transition: clip-path 900ms var(--ease-out); transition-delay: var(--rv-delay, 0ms); }
.motion .rv-rise.is-in { clip-path: inset(0 0 0 0); }

/* Printed pages always show everything */
@media print {
  .motion .rv, .motion .rv-photo, .motion .rv-rise { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .motion .rv-photo img { transform: none !important; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { flex-wrap: wrap; justify-content: center; width: auto; gap: 24px 48px; }
  .marquee__track [aria-hidden="true"] { display: none; }
  .marquee-toggle { display: none; }
  /* the photo strip becomes a row you can swipe or scroll through */
  .marquee--photos { overflow-x: auto; }
  .marquee--photos .marquee__track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; gap: 16px; padding-inline: var(--gutter); }
}
