/* ==========================================================================
   Sharif Memorial Trust — site stylesheet
   Hand-written, no framework. Edit freely; there is no build step.
   ========================================================================== */

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope.woff2') format('woff2-variations'),
       url('../fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --teal-50:   #f0fdfa;
  --teal-100:  #ccfbf1;
  --teal-500:  #14b8a6;
  --teal-600:  #0d9488;

  --ink:       #111827;
  --body:      #4b5563;
  --muted:     #6b7280;
  --faint:     #9ca3af;
  --line:      #e5e7eb;
  --line-soft: #f3f4f6;
  --surface:   #ffffff;
  --page:      #ffffff;
  --raised:    #f9fafb;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow:    0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px -6px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .18);

  --r-sm: 8px;  --r: 12px;  --r-lg: 16px;  --r-xl: 24px;  --r-full: 999px;
  --nav-h: 64px;
  --wrap: 1140px;
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem;   font-weight: 700; }
p  { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }

:focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--green-600); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--r) 0; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.wrap-narrow { max-width: 820px; }
main { flex: 1 0 auto; padding-top: var(--nav-h); }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--raised); }

.page-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.page-head p { color: var(--muted); font-size: 1.08rem; }
.rule { width: 88px; height: 4px; background: var(--green-500); border-radius: var(--r-full); margin: 0 auto 20px; }
.rule-left { margin-inline: 0; }

.eyebrow {
  display: inline-block; font-size: .84rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green-700); background: var(--green-50);
  border: 1px solid var(--green-100); padding: 5px 12px; border-radius: var(--r-full);
  margin-bottom: 16px;
}

.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand b { display: block; color: var(--ink); font-size: 1.02rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.brand span { display: block; color: var(--muted); font-size: .82rem; font-weight: 600; }
@media (max-width: 420px) { .brand span { display: none; } }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
@media (max-width: 1023px) { .nav-links { display: none; } }
.nav-links > * { position: relative; }
.nav-links a, .nav-links button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 12px; border-radius: var(--r-sm);
  font: inherit; font-size: .93rem; font-weight: 600; color: var(--body);
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav-links a:hover, .nav-links button:hover { background: var(--green-50); color: var(--green-700); text-decoration: none; }
.nav-links a[aria-current="page"] { background: var(--green-50); color: var(--green-700); font-weight: 700; }
.caret { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
         transform: rotate(45deg) translate(-2px, -2px); opacity: .6; }

.menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 246px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 7px;
  display: flex; flex-direction: column; gap: 2px;
  /* Animated rather than display:none so opening reads as a movement, not a
     jump. visibility (not display) keeps it out of the tab order when closed
     and still allows a transition. */
  opacity: 0; visibility: hidden; transform: translateY(-5px) scale(.985);
  transform-origin: top left; pointer-events: none;
  transition: opacity .12s ease-out, transform .12s ease-out, visibility 0s linear .12s;
}
/* Bridge the gap between the trigger and the panel, so the pointer never
   crosses dead space on the way down. */
.menu::before {
  content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}
.has-menu[data-open="true"] > .menu,
.has-menu:focus-within > .menu {          /* keyboard fallback if JS fails */
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity .12s ease-out, transform .12s ease-out, visibility 0s;
}
.has-menu[data-open="true"] > a,
.has-menu:focus-within > a { background: var(--green-50); color: var(--green-700); }
.menu a { transition: background .1s ease-out, color .1s ease-out; }
.caret { transition: transform .15s ease-out, opacity .15s ease-out; }
.has-menu[data-open="true"] > a .caret { opacity: .9; }
.menu a { padding: 11px 12px; font-weight: 600; font-size: .92rem; border-radius: var(--r-sm); }

.nav-cta {
  margin-left: 6px; padding: 9px 18px !important; border-radius: var(--r-full) !important;
  background: var(--green-600) !important; color: #fff !important; font-weight: 700 !important;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--green-700) !important; }

.burger {
  margin-left: auto; display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
@media (max-width: 1023px) { .burger { display: flex; } }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 99;
  background: #fff; overflow-y: auto; padding: 16px 20px 40px;
  display: none; border-top: 1px solid var(--line);
}
.drawer[data-open="true"] { display: block; }
.drawer a { display: block; padding: 12px 14px; border-radius: var(--r); color: var(--ink); font-weight: 600; }
.drawer a:hover { background: var(--green-50); text-decoration: none; }
.drawer a[aria-current="page"] { background: var(--green-50); color: var(--green-700); }
.drawer .grp { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
               color: var(--faint); padding: 18px 14px 6px; }
.drawer .sub { padding-left: 28px; font-weight: 500; font-size: .94rem; color: var(--body); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: var(--r-full); border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; cursor: pointer; text-align: center;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--green-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--green-500); color: var(--green-700); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: box-shadow .22s, transform .22s;
}
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-top { border-top: 4px solid var(--green-500); }
.card-flat { box-shadow: none; background: var(--raised); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--body); font-size: .97rem; }

.icon-badge {
  width: 56px; height: 56px; border-radius: var(--r); background: var(--green-50);
  border: 1px solid var(--green-100); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; margin-bottom: 16px;
}
.icon-badge img { width: 30px; height: 30px; }
.icon-badge-round { border-radius: var(--r-full); }

.initials {
  width: 60px; height: 60px; border-radius: var(--r-full); margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem; color: var(--green-700); background: var(--green-100);
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px);
  background: linear-gradient(160deg, var(--teal-50) 0%, var(--green-50) 45%, #ecfeff 100%);
  border-bottom: 1px solid var(--green-100);
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px);
  opacity: .34; pointer-events: none;
}
.hero::before { width: 380px; height: 380px; background: var(--green-500); top: -90px; left: -90px; }
.hero::after  { width: 460px; height: 460px; background: var(--teal-500); bottom: -170px; right: -110px; }
.hero > .wrap { position: relative; z-index: 1; }
.hero img.mark { width: clamp(120px, 20vw, 168px); margin: 0 auto 28px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.12)); }
.hero p.lede { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--body); max-width: 680px; margin: 0 auto 12px; }
.hero .sub { color: var(--muted); max-width: 640px; margin: 0 auto 32px; font-size: .98rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero .since { margin-top: 28px; font-size: .88rem; color: var(--muted); font-weight: 600; }

.page-hero {
  background: linear-gradient(160deg, var(--teal-50), var(--green-50));
  border-bottom: 1px solid var(--green-100);
  padding: clamp(40px, 6vw, 68px) 0 clamp(32px, 5vw, 52px); text-align: center;
}
.page-hero h1 { margin-bottom: .3em; }
.page-hero p { color: var(--body); max-width: 720px; margin: 0 auto; font-size: 1.05rem; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 18px; }
.stat { text-align: center; background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--r-lg); padding: 22px 16px; }
.stat b { display: block; font-size: clamp(1.6rem, 3.6vw, 2.1rem); font-weight: 800; color: var(--green-600); line-height: 1.1; }
.stat span { display: block; font-size: .9rem; color: var(--muted); font-weight: 600; margin-top: 4px; }
.stat em { display: block; font-size: .84rem; color: var(--faint); font-style: normal; margin-top: 2px; }

/* ---------- lists ---------- */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; color: var(--body); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: .42em; width: 18px; height: 18px;
  border-radius: var(--r-full); background: var(--green-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}
/* Minutes list. Deliberately not .ticks: these are resolutions and pending
   actions, and a green tick would read them as things already achieved. */
.mins { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.mins li { position: relative; padding-left: 26px; color: var(--body); }
.mins li::before {
  content: ''; position: absolute; left: 1px; top: .68em; width: 12px; height: 2px;
  border-radius: 1px; background: var(--green-600); opacity: .75;
}

.num-card { position: relative; overflow: hidden; }
.num-card .n {
  position: absolute; right: 16px; top: 6px; font-size: 3.1rem; font-weight: 800;
  color: var(--green-100); line-height: 1; pointer-events: none; user-select: none;
}

/* ---------- quote ---------- */
.quote {
  background: linear-gradient(135deg, var(--green-50), var(--teal-50));
  border: 1px solid var(--green-100); border-left: 5px solid var(--green-500);
  border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px);
}
.quote p { font-size: clamp(1.05rem, 2.2vw, 1.32rem); color: var(--ink); font-weight: 600; line-height: 1.55; font-style: italic; }
.quote cite { display: block; margin-top: 14px; font-style: normal; font-size: .86rem; font-weight: 700;
              letter-spacing: .1em; text-transform: uppercase; color: var(--green-700); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gallery button {
  padding: 0; border: 1px solid var(--line); background: var(--raised); cursor: pointer;
  border-radius: var(--r); overflow: hidden; aspect-ratio: 3 / 4; display: block; width: 100%;
  transition: box-shadow .2s, transform .2s;
}
.gallery button:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh;
  overflow: visible; color: #fff;
}
dialog.lightbox::backdrop { background: rgba(8, 12, 20, .9); }
dialog.lightbox img { max-width: 92vw; max-height: 84vh; width: auto; margin: 0 auto;
                      border-radius: var(--r); object-fit: contain; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.lb-bar button {
  width: 44px; height: 44px; border-radius: var(--r-full); border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.2rem; line-height: 1;
}
.lb-bar button:hover { background: rgba(255, 255, 255, .28); }
.lb-count { font-size: .9rem; font-variant-numeric: tabular-nums; opacity: .85; min-width: 68px; text-align: center; }

/* ---------- media ---------- */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
         background: #0b1220; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video button.play {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer;
  background: transparent; display: flex; align-items: center; justify-content: center; padding: 0;
}
.video button.play::after {
  content: ''; width: 66px; height: 66px; border-radius: var(--r-full);
  background: rgba(220, 38, 38, .95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 30px no-repeat;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .45); transition: transform .2s, background .2s;
}
.video button.play:hover::after { transform: scale(1.09); background-color: #dc2626; }
.video-title { font-size: .95rem; font-weight: 600; color: var(--ink); margin-top: 10px; line-height: 1.45; }

.map-frame { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
             box-shadow: var(--shadow-sm); aspect-ratio: 16 / 10; position: relative; background: var(--raised); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- donation ---------- */
.pay { text-align: center; position: relative; overflow: hidden; }
.pay::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
               background: linear-gradient(90deg, var(--green-400, #4ade80), var(--green-600)); }
.pay.pay-bank::before { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.pay img.logo { height: 52px; width: auto; margin: 6px auto 16px; object-fit: contain; }
.pay .field {
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; margin-top: 12px; text-align: left;
}
.pay .field .k { font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
                 color: var(--faint); display: block; margin-bottom: 4px; }
.pay .field .v { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
                 font-size: 1.02rem; font-weight: 700; color: var(--ink); word-break: break-all; line-height: 1.4; }
.pay .field.v-big .v { font-size: 1.4rem; letter-spacing: .04em; }
.copy {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 7px; font-size: .82rem;
  font-weight: 700; color: var(--green-700); background: var(--green-50);
  border: 1px solid var(--green-100); border-radius: var(--r-full);
  padding: 12px 20px; min-height: 44px; cursor: pointer; font-family: var(--font);
}
.copy:hover { background: var(--green-100); }
.copy[data-done="1"] { color: #fff; background: var(--green-600); border-color: var(--green-600); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; position: relative; padding-left: 54px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px;
  border-radius: var(--r-full); background: var(--green-600); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem;
}
.steps li b { display: block; color: var(--ink); margin-bottom: 2px; }
.steps li p { font-size: .95rem; margin: 0; }

.callout {
  border-radius: var(--r-lg); padding: 20px 24px; border: 1px solid var(--green-100);
  background: var(--green-50); color: var(--body); font-size: .95rem;
}
.callout b { color: var(--ink); }
.callout-amber { background: #fffbeb; border-color: #fde68a; }

/* ---------- downloads ---------- */
.dl { display: grid; gap: 12px; }
.dl a {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.dl a:hover { text-decoration: none; box-shadow: var(--shadow-md); border-color: var(--green-200); transform: translateY(-1px); }
.dl .vol {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--r); background: var(--green-50);
  border: 1px solid var(--green-100); color: var(--green-700); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 800; line-height: 1;
}
.dl .vol small { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; font-weight: 700; }
.dl .vol b { font-size: 1.05rem; }
.dl .meta { flex: 1; min-width: 0; }
.dl .meta b { display: block; color: var(--ink); font-size: 1.02rem; font-weight: 700; }
.dl .meta span { font-size: .85rem; color: var(--muted); }
.dl .go { flex-shrink: 0; font-size: .84rem; font-weight: 700; color: var(--green-700);
          background: var(--green-50); border: 1px solid var(--green-100);
          padding: 8px 15px; border-radius: var(--r-full); white-space: nowrap; }
@media (max-width: 560px) {
  .dl a { flex-wrap: wrap; }
  .dl .go { width: 100%; text-align: center; }
}

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .94rem; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { background: var(--raised); font-weight: 700; color: var(--ink); font-size: .88rem;
     letter-spacing: .06em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

/* ---------- footer ---------- */
.foot { background: #0f172a; color: #94a3b8; margin-top: auto; font-size: .92rem; }
.foot a { color: #cbd5e1; }
.foot a:hover { color: #fff; }
.foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding: 52px 0 40px; }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 560px) { .foot-top { grid-template-columns: 1fr; } }
.foot h4 { color: #f1f5f9; font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.foot ul a { display: inline-block; padding: 11px 0; min-height: 44px; }
.foot .fbrand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.foot .fbrand img { width: 40px; height: 40px; }
.foot .fbrand b { color: #fff; font-size: 1.05rem; font-weight: 800; }
.foot-bottom {
  border-top: 1px solid #1e293b; padding: 20px 0; display: flex; flex-wrap: wrap;
  gap: 12px; justify-content: space-between; align-items: center; font-size: .85rem;
}
.social { display: flex; gap: 10px; }
.social a {
  width: 44px; height: 44px; border-radius: var(--r-full); background: #1e293b;
  display: flex; align-items: center; justify-content: center; color: #cbd5e1;
}
.social a:hover { background: var(--green-600); color: #fff; }
.social svg { width: 18px; height: 18px; }

/* ---------- utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 32px; } .mt-4 { margin-top: 48px; }
.mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 32px; } .mb-4 { margin-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lede { font-size: 1.1rem; color: var(--body); }
.flow > * + * { margin-top: 18px; }
.tag {
  display: inline-block; font-size: .82rem; font-weight: 700; padding: 10px 16px;
  border-radius: var(--r-full); background: var(--green-50); color: var(--green-700);
  border: 1px solid var(--green-100);
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.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;
}

@media print {
  .nav, .drawer, .foot, .hero::before, .hero::after, .skip { display: none !important; }
  main { padding-top: 0; }
  body { color: #000; }
}

/* ---------- mobile-first touch sizing ----------
   Standalone links and controls must be comfortably tappable. Inline links
   inside a paragraph are deliberately left at text size (WCAG 2.2 exempts
   links whose target is inline within a sentence). */
.card a.tel {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: var(--r-full);
  background: var(--green-50); border: 1px solid var(--green-100);
  color: var(--green-700); font-weight: 700; text-decoration: none;
}
.card a.tel:hover { background: var(--green-100); text-decoration: none; }
.brand { min-height: 44px; padding-right: 4px; }
.initials { width: 56px; height: 56px; }

/* Illustrations must never out-size a narrow screen. An inline max-width
   would otherwise beat the `img { max-width:100% }` rule above. */
.illus { width: 100%; height: auto; margin-inline: auto; display: block; }

@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  body { font-size: 16.5px; }
  .section { padding: 40px 0; }
  .wrap { padding-inline: 16px; }
  .card { padding: 20px; }
  .btn { padding: 14px 24px; width: 100%; }        /* full-width, thumb-friendly */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dl .vol { width: 48px; height: 48px; }
  .foot-top { padding: 36px 0 28px; }
  .lb-bar button { width: 48px; height: 48px; }
}
@media (max-width: 380px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .brand b { font-size: .95rem; }
}

/* Links in the governance table are standalone controls, not inline prose. */
td a { display: inline-block; padding: 11px 0; min-height: 44px; font-weight: 700; }

/* Explanatory note under a payment field (e.g. an account title that differs
   from the Trust's name, which a donor will otherwise meet cold in their app). */
.pay .field .note {
  display: block; margin-top: .55rem; font-size: .86rem; line-height: 1.5;
  color: var(--body); font-family: var(--font); font-weight: 500;
  padding-top: .55rem; border-top: 1px dashed var(--line);
}

/* ---------- self-hosted video ----------
   preload="none" plus a poster means nothing downloads until the visitor
   presses play, so these cost the page nothing on load. */
.clip {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: #0b1220; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.clip video { display: block; width: 100%; height: auto; background: #0b1220; }
.clip figcaption,
.clip-cap {
  font-size: .9rem; color: var(--muted); margin-top: 10px; line-height: 1.5;
}
figure.clip-wrap { margin: 0; }
.clip-portrait { max-width: 360px; margin-inline: auto; }

/* photo with a caption underneath, used where an image is making a claim */
figure.shot { margin: 0; }
figure.shot img {
  width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
figure.shot figcaption {
  font-size: .88rem; color: var(--muted); margin-top: 9px; line-height: 1.5;
}

/* wide feature image at the top of a page */
.feature {
  width: 100%; border-radius: var(--r-xl); border: 1px solid var(--line);
  box-shadow: var(--shadow-md); aspect-ratio: 16 / 9; object-fit: cover;
}

/* phase / cost table emphasis */
tr.total td { background: var(--green-50); font-weight: 700; color: var(--ink); }
td.cost { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: var(--ink); }

/* ---------- home programme rows ----------
   Alternating full-width rows so each programme gets its own moment as the
   visitor scrolls, rather than competing in a grid of equal cards. */
.prog { display: grid; gap: clamp(24px, 4vw, 52px); align-items: center;
        grid-template-columns: 1fr 1fr; }
.prog + .prog { margin-top: clamp(48px, 7vw, 88px); }
/* Alternate sides. Counting .prog-rows children keeps this independent of any
   heading or other element sitting alongside the rows. */
.prog-rows > .prog:nth-child(odd) .prog-media { order: 2; }
.prog-media { position: relative; }
.prog-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.prog-tag {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  background: rgba(255, 255, 255, .94); color: var(--green-700);
  border: 1px solid var(--green-100); border-radius: var(--r-full);
  padding: 8px 16px; font-size: .84rem; font-weight: 800;
  letter-spacing: .04em; box-shadow: var(--shadow-sm);
}
.prog h3 { font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 800;
           letter-spacing: -.02em; margin-bottom: .35em; }
.prog .lede { font-size: 1.05rem; margin-bottom: 20px; }
.prog .ticks { margin-bottom: 22px; }
.prog .ticks li { font-size: .96rem; }

.prog-addr {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 20px;
}
.prog-addr svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; color: var(--green-600); }
.prog-addr .a { font-size: .95rem; line-height: 1.55; color: var(--body); }
/* standalone control, not inline prose - give it a real tap target */
.prog-addr .a a {
  display: inline-flex; align-items: center; min-height: 44px;
  margin-top: 2px; font-weight: 700; font-size: .92rem;
}
@media (max-width: 860px) {
  .prog { grid-template-columns: 1fr; }
  .prog:nth-child(even) .prog-media { order: 0; }
  .prog-media img { aspect-ratio: 16 / 10; }
}

/* ---------- hero video (the VSL) ---------- */
.hero-clip {
  max-width: 860px; margin: 30px auto 30px; border-radius: var(--r-xl);
  overflow: hidden; border: 1px solid var(--green-100);
  box-shadow: 0 24px 60px -20px rgba(16, 24, 40, .32); background: #0b1220;
}
.hero-clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
/* With a film carrying the message the logo steps back. These need to match
   the specificity of `.hero img.mark` above, or that rule wins. */
.hero-video img.mark { width: clamp(84px, 12vw, 108px); margin-bottom: 18px; }
.hero-video h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero-video p.sub { margin-top: 20px; }
@media (max-width: 640px) { .hero-clip { margin: 22px auto 24px; border-radius: var(--r-lg); } }

/* standalone directions link inside an office card */
a.dirlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* hunger relief mosaic: video centred among photos */
.hm{grid-template-columns:repeat(4,1fr);grid-auto-rows:210px;grid-auto-flow:dense;gap:12px}
.hm .hm-v{grid-column:2/4;grid-row:1/3;border-radius:14px;overflow:hidden;background:#0b1220}
.hm .hm-v figure,.hm .hm-v .clip{height:100%;max-width:none;margin:0}
.hm .hm-v video{width:100%;height:100%;object-fit:contain}
@media (max-width:860px){.hm{grid-template-columns:1fr 1fr;grid-auto-rows:150px;gap:10px}.hm .hm-v{grid-column:1/-1;grid-row:span 3}}

.hm button{height:100%;aspect-ratio:auto;min-height:0;overflow:hidden}
.hm button img{height:100%}


/* ---------- donation form (modal) ---------- */
dialog.donate-modal {
  border: 0; padding: 0; background: transparent; max-width: 760px; width: calc(100% - 32px);
  max-height: calc(100dvh - 32px); overflow: visible; margin: auto;
}
dialog.donate-modal::backdrop { background: rgba(8, 12, 20, .6); }
html.dm-lock { overflow: hidden; }
.dm-box {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 32px;
  max-height: calc(100dvh - 32px); overflow-y: auto; text-align: center;
}
.dm-box h2 { font-size: 1.5rem; margin: .2em 0 .3em; }
.dm-x {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font);
}
.dm-x:hover { border-color: var(--green-500); color: var(--green-700); }
.dm-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.dm-opt {
  padding: 16px 18px; min-height: 56px; border-radius: var(--r-lg); border: 2px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 700; font-size: 1rem; cursor: pointer;
  font-family: var(--font);
}
@media (hover: hover) { .dm-opt:hover { border-color: var(--green-500); color: var(--green-700); } }
.dm-opt[aria-pressed="false"] { background: #fff; }
.dm-opt[aria-pressed="true"] { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); }
.dm-out:empty { display: none; }
.dm-out { margin-top: 20px; text-align: left; }
.dm-for { font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
          color: var(--faint); text-align: center; margin: 0 0 12px; }
.dm-grid { gap: 16px; }
.dm-tip { margin-top: 14px; text-align: center; }
@media (max-width: 640px) {
  dialog.donate-modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .dm-box { padding: 24px 18px; max-height: calc(100dvh - 20px); border-radius: var(--r-lg); }
  .dm-box h2 { font-size: 1.25rem; padding-right: 36px; }
  .dm-opts { grid-template-columns: 1fr; }
}
