/* The Barakah Foundation — site styles
   Brand tokens come from brand/brand-guidelines.html.
   --gold (#D9B90B) is used for the logo, Donate buttons and headline figures. Never as a large background.
   Underlines and accents use the softer --accent tones (proposed 2026-11-06, not yet added to the brand guide). */
:root {
  --gold: #D9B90B;          /* logo, Donate buttons, key figures */
  --gold-hover: #C4A70A;
  --gold-text: #806600;     /* gold-coloured text on white or stone */
  --accent: #E6D290;        /* soft gold: buttons, underlines, accents on black */
  --accent-hover: #D9C47A;
  --accent-pale: #F7F0DA;   /* soft gold for large backgrounds */
  --black: #0A0A0A;
  --stone: #FBF9F4;
  --white: #FFFFFF;
  --ink: #0A0A0A;
  --muted: #4A4A4A;
  --muted-on-dark: #C9C6BD;
  --line: #ECE7D9;
  --radius: 14px;
  --btn-radius: 10px;
  --shadow: 0 10px 30px rgba(10, 10, 10, .07);
  --hh: 100px;              /* header height */
  --logo-w: 245px;          /* horizontal logo width in the header (about 74px tall) */
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --wrap: 1160px;
}
@media (max-width: 700px) { :root { --hh: 76px; --logo-w: 188px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scrollbar-width: none; }
/* No visible scroll bar (scrolling still works as normal) */
*, *::before, *::after { scrollbar-width: none; -ms-overflow-style: none; }
/* The page scrolls inside a full-screen layer that is 24px wider than the screen. Phones draw their own
   scroll indicator at the layer's right edge, which is just off-screen, so it can never be seen. */
html, body { height: 100%; overflow: hidden; }
#scroller { position: fixed; top: 0; bottom: 0; left: 0; width: calc(100% + 24px); padding-right: 24px; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: none; outline: none; }
::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0 !important; height: 0 !important; background: transparent; }
/* No blue flash or selection highlight when tapping or clicking anything */
a, button, [tabindex], .way, .nav-toggle { -webkit-tap-highlight-color: transparent; }
.way, .nav-toggle, .btn { -webkit-user-select: none; user-select: none; }
:focus:not(:focus-visible) { outline: none; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7;
  overflow-x: clip;
}
main { padding-top: var(--hh); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--black); }
:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
h2 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--black); color: var(--white); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- Buttons: rounded squares ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; letter-spacing: .02em;
  padding: .9em 1.6em; border-radius: var(--btn-radius); text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
/* Gold buttons: flat brand gold. A soft band of light glides across from left to right, then rests for about
   two seconds before the next pass, just enough to catch the eye. */
/* The band of light is part of the button's own background (not a separate layer), so it is always clipped
   exactly to the button's rounded edges and the text stays crisp. */
.btn-gold {
  background-color: var(--gold); color: var(--black);
  background-image: linear-gradient(100deg, rgba(255, 250, 225, 0) 40%, rgba(255, 250, 225, .5) 50%, rgba(255, 250, 225, 0) 60%);
  background-size: 250% 100%; background-repeat: no-repeat; background-position: 105% 0;
  animation: gold-sheen 3s ease-in-out infinite;
}
.btn-gold:hover { background-color: var(--gold-hover); color: var(--black); }
@keyframes gold-sheen {
  0% { background-position: 105% 0; }
  33%, 100% { background-position: -5% 0; }
}
@media (prefers-reduced-motion: reduce) { .btn-gold { animation: none; background-image: none; } }
.btn-black { background: var(--black); color: var(--white); }
.btn-black:hover { background: #2A2A2A; color: var(--white); }
.btn-outline { border-color: currentColor; color: var(--black); background: transparent; }
.btn-outline:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.on-dark .btn-outline { color: var(--white); }
.on-dark .btn-outline:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row, .btn-row.center { justify-content: center; }

/* ---------- Header: centred stacked logo, menu behind a button ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--white); border-bottom: 1px solid transparent; transition: border-color .3s; }
/* No outline under the top bar (light or dark) */
.nav-wrap { position: relative; height: var(--hh); display: flex; align-items: center; justify-content: flex-end; }
.brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; display: block; }
/* Horizontal logo in two layers: the emblem (inline SVG, so it can be traced) and the lettering,
   which sits in a clip that starts at the emblem's right edge, so it can slide out from behind it. */
.logo-box { display: block; position: relative; width: var(--logo-w); aspect-ratio: 1913 / 579; transform-origin: 50% 50%; }
.logo-box .emblem-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.emblem-svg .fill { fill: var(--gold); }
.emblem-svg .trace { display: none; }
/* The lettering slides out from behind the emblem through an even-width blank margin that follows the
   emblem's actual outline (letter-mask.svg), so it never touches or overlaps the emblem. */
.letter-clip { position: absolute; inset: 0; overflow: hidden;
  -webkit-mask: url("../img/letter-mask.svg") 0 0 / 100% 100% no-repeat; mask: url("../img/letter-mask.svg") 0 0 / 100% 100% no-repeat; }
.letter-clip img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; }
/* Opening trace (homepage only) */
.intro-page .emblem-svg .trace { display: inline; }
.intro-page .emblem-svg .trace path { fill: none; stroke: var(--gold); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linecap: butt; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 1.9s cubic-bezier(.65, 0, .35, 1) .3s forwards, trace-out .6s ease 2s forwards; }
.intro-page .emblem-svg .fill { opacity: 0; animation: fill-in .8s ease 1.65s forwards; }
/* "Solid draw" variant (data-intro="snake"): each solid gold stroke is drawn along its length, like a pen.
   Every piece of the emblem has its own mask, drawn along that piece's centre line, so a stroke can only
   ever reveal itself, never a neighbour. Nothing is visible before the drawing starts. */
.emblem-svg .solid { display: none; fill: var(--gold); }
.emblem-svg .draw { fill: none; stroke: #fff; stroke-linecap: butt; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.intro-page[data-intro="snake"] .emblem-svg .trace,
.intro-page[data-intro="snake"] .emblem-svg .fill { display: none; }
.intro-page[data-intro="snake"] .emblem-svg .solid { display: inline; }
/* Starts slow, speeds up through the middle, eases gently to a stop (a strong ease-in-out) */
.intro-page[data-intro="snake"] .emblem-svg .draw { stroke-dashoffset: 1; animation: trace 1.9s cubic-bezier(.7, 0, .3, 1) .4s forwards; }
.intro-page[data-intro="snake"] .emblem-svg .draw.d1 { animation-duration: .3s; animation-delay: 1.95s; animation-timing-function: ease-out; }
.intro-page[data-intro="snake"] .emblem-svg .draw.d3 { animation-duration: .3s; animation-delay: 2.07s; animation-timing-function: ease-out; }
.intro-page[data-intro="snake"] .emblem-svg .draw.d4 { animation-duration: .3s; animation-delay: 2.19s; animation-timing-function: ease-out; }
.intro-page[data-intro="snake"] .emblem-svg .draw.d6 { animation-duration: .35s; animation-delay: 2.31s; animation-timing-function: ease-out; }
/* If someone starts scrolling before the opening animation has finished, complete it quickly */
.intro-page.intro-done .emblem-svg .fill { animation: none; opacity: 1; transition: opacity .35s ease; }
.intro-page.intro-done .emblem-svg .trace { opacity: 0; transition: opacity .35s ease; }
.intro-page.intro-done .emblem-svg .draw { animation: none; stroke-dashoffset: 0; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes trace-out { to { opacity: 0; } }
@keyframes fill-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .intro-page .emblem-svg .trace { display: none; }
  .intro-page .emblem-svg .fill { opacity: 1; animation: none; }
  .intro-page .emblem-svg .draw { stroke-dashoffset: 0 !important; animation: none !important; }
}
.nav-toggle { transition: opacity .4s, visibility .4s; }
.nav-toggle.hide { opacity: 0; visibility: hidden; }
.nav-toggle { position: relative; z-index: 3; width: 48px; height: 48px; margin-right: -10px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 10px; cursor: pointer; }
/* Menu button: no hover patch (it used to stick on phones). Gold while the menu is open, then back to the bar. */
.nav-toggle { transition: background-color .3s ease, opacity .4s, visibility .4s; }
.nav-toggle[aria-expanded="true"] { background: var(--gold); }
.nav-toggle[aria-expanded="true"] .bars::before, .nav-toggle[aria-expanded="true"] .bars::after { background: var(--black) !important; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 26px; height: 2px; background: var(--black); position: relative; transition: transform .5s cubic-bezier(.65, 0, .35, 1), top .5s cubic-bezier(.65, 0, .35, 1), background-color .3s ease; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -8px; } .nav-toggle .bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-8px) rotate(-45deg); }

/* Dark top bar variant (body data-header="dark"): black bar, white lettering and menu icon.
   The homepage opening screen is dark too, so the white lettering shows as it slides out. */
[data-header="dark"] .site-header { background: var(--black); }
[data-header="dark"] .letter-clip img { filter: invert(1); }
[data-header="dark"] .nav-toggle .bars, [data-header="dark"] .nav-toggle .bars::before, [data-header="dark"] .nav-toggle .bars::after { background: var(--white); }
[data-header="dark"] .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
[data-header="dark"] .intro { background: var(--black); }
[data-header="dark"].intro-page main { background: var(--black); }   /* also behind the bar on the homepage */
[data-header="dark"].intro-page main > section, [data-header="dark"].intro-page main > .cta { background-color: var(--white); }
[data-header="dark"].intro-page main > .section-stone, [data-header="dark"].intro-page main > .cta { background-color: var(--stone); }
[data-header="dark"].intro-page main > .hero, [data-header="dark"].intro-page main > .section-black { background-color: var(--black); }
[data-header="dark"] .intro .cue { color: var(--muted-on-dark); }
[data-header="dark"] .intro .cue::after { border-color: var(--muted-on-dark); }

/* Menu: a small panel that slides out from the right */
/* the dimmed backdrop starts below the top bar, so the bar itself never darkens */
.nav-scrim { position: fixed; inset: var(--hh) 0 0 0; z-index: 40; background: rgba(10, 10, 10, .28); opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.nav-scrim.open { opacity: 1; visibility: visible; }
@media (min-width: 761px) { .nav-scrim { background: transparent; } }   /* desktop: the page keeps its brightness behind the menu */
.site-nav {
  position: fixed; z-index: 60; top: var(--hh); bottom: 0; right: 0; width: min(380px, 88vw);
  display: flex; flex-direction: column; overflow: hidden;
  background: #1E1E1E; border-left: 1px solid #2E2E2E; box-shadow: -24px 0 60px rgba(10, 10, 10, .3);
  transform: translateX(100%); visibility: hidden;
  /* a gentle start and a soft landing, rather than a fast snap out */
  transition: transform .9s cubic-bezier(.45, 0, .2, 1), visibility .9s;
}
.site-nav.open { transform: none; visibility: visible; }
/* Rounded top-left and bottom-left corners, on every screen size */
.site-nav { border-top-left-radius: 22px; border-bottom-left-radius: 22px; border-top: 1px solid #2E2E2E; border-bottom: 1px solid #2E2E2E; }
.site-nav ul { list-style: none; margin: 0; padding: clamp(12px, 3vh, 32px) 20px 28px; display: flex; flex-direction: column; flex: 1; gap: 2px; }
/* Charcoal menu, white links; hovering gives a faint stone wash, and the current page sits on a solid light-stone highlight */
.site-nav a:not(.btn) { display: block; padding: clamp(.45em, 1.6vh, .8em) 12px; border-radius: 10px; font-family: var(--font-display); font-size: 1.25rem; color: var(--white); text-decoration: none; transition: background-color .25s ease, color .25s ease; }
.site-nav a:not(.btn):hover { background: rgba(251, 249, 244, .12); color: var(--white); }
.site-nav a[aria-current="page"], .site-nav a[aria-current="page"]:hover { background: #E8E3D6; color: var(--ink); }
.site-nav .btn-outline { color: var(--white); border-color: var(--white); }
.site-nav .btn-outline:hover { background: var(--white); color: var(--black); }
.site-nav .nav-btns { display: grid; gap: 10px; padding-top: 24px; margin-top: auto; }
/* Liquid glass, matching the floating Volunteer / Donate buttons: smoky see-through black that blurs the page
   behind it, a fine light edge and a soft highlight along the top */
/* Glass the whole time, kept light enough to slide smoothly: the blur is a little softer (cheaper to redraw on
   every frame), the slide runs on the graphics card, and nothing else fades at the same moment. */
.site-nav {
  background: linear-gradient(160deg, rgba(40, 40, 40, .64), rgba(10, 10, 10, .74));
  border-left: 1px solid rgba(255, 255, 255, .2); border-top: 1px solid rgba(255, 255, 255, .26); border-bottom: 1px solid rgba(255, 255, 255, .12);
  box-shadow: -18px 0 40px rgba(10, 10, 10, .22), inset 1px 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  transform: translate3d(100%, 0, 0); will-change: transform; backface-visibility: hidden;
  transition: transform .85s cubic-bezier(.22, .8, .24, 1), visibility .85s;
}
.site-nav.open { transform: translate3d(0, 0, 0); }
/* the floating buttons step aside instantly when the menu opens, so two glass layers never animate together */
.float-cta.instant { transition: none !important; }
.site-nav a:not(.btn) { text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.site-nav a:not(.btn):hover { background: rgba(255, 255, 255, .13); }
/* the current page: frosted stone rather than a solid block */
.site-nav a[aria-current="page"], .site-nav a[aria-current="page"]:hover {
  background: rgba(232, 227, 214, .88); color: var(--ink); text-shadow: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.site-nav .btn-gold { background: linear-gradient(180deg, rgba(232, 206, 70, .94), rgba(217, 185, 11, .88)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 10px rgba(217, 185, 11, .22); }
.site-nav .btn-gold:hover { background: linear-gradient(180deg, rgba(232, 206, 70, 1), rgba(217, 185, 11, .96)); }
.site-nav .btn-outline { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .7); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .site-nav { background: #1E1E1E; } }

/* ---------- Homepage logo intro ---------- */
.intro { display: none; }
/* Tall, empty section: scrolling through it drives the logo sequence. Its height is set by main.js. */
.js .intro { display: block; position: relative; height: 260svh; overflow-x: clip; }   /* the hidden lettering can't widen the page */
/* The opening logo is pinned (sticky) in the centre of the screen. The browser holds it there, and when the
   hero's top edge reaches it, the browser carries it up with the page, as smoothly as the page itself.
   main.js only changes its size. Sizes are set by main.js (--stage-top, --stage-h, --gap, --box-w). */
.intro-stage { position: sticky; z-index: 55; top: var(--stage-top, 40vh); height: var(--stage-h, 20vh); pointer-events: none; }
.intro-stage .logo-box { position: absolute; left: 50%; bottom: var(--gap, 0px); width: var(--box-w, 600px); margin-left: calc(var(--box-w, 600px) / -2); transform-origin: 50% 100%; will-change: transform; }
.intro-stage.handed-over { visibility: hidden; }
/* Homepage: the bar's own logo only appears when the pinned logo arrives in the bar (an exact handover);
   until then the bar is see-through so the arriving logo isn't covered */
/* The bar's logo (and its home link) doesn't exist for the pointer until the opening logo has settled into the bar */
.intro-page .site-header .brand { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-page .site-header.settled .brand { opacity: 1; visibility: visible; pointer-events: auto; }
.no-intro .intro { display: none !important; }
.intro-page .site-header { background: transparent; }
.intro-page .site-header.settled { background: var(--white); }
[data-header="dark"].intro-page .site-header.settled { background: var(--black); }
.intro .cue { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 5; opacity: 0; transition: opacity .7s ease; pointer-events: none; }
.intro .cue.show { opacity: 1; }
.intro .cue { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.intro .cue::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(5px) rotate(45deg); } }

/* ---------- Underlined labels (no short accent bars) ---------- */
/* Small uppercase heading: always centred, with its underline centred under the text. The extra .2em on the left
   balances the letter-spacing that trails the last letter, so the words sit exactly in the middle. */
.eyebrow { position: relative; display: table; margin-left: auto; margin-right: auto; font-size: .8rem; font-weight: 700; letter-spacing: .2em; padding-left: .2em; text-transform: uppercase; color: var(--gold-text); padding-bottom: 12px; margin-bottom: 16px; text-align: center; }
.eyebrow::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: calc(100% + 120px); max-width: 92vw; height: 2px; background: var(--accent); }
.eyebrow + h1, .eyebrow + h2 { text-align: center; }
/* Large section headings with a gold underline (used where the small gold label above has been removed) */
.h-line { position: relative; display: table; margin-left: auto; margin-right: auto; text-align: center; padding-bottom: 14px; margin-bottom: 22px; }
.h-line::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: calc(100% + 40px); max-width: 92vw; height: 2px; background: var(--accent); }   /* faded brand gold, 20px past each end of the heading */
.section-black h2.h-line { color: var(--white); }
.meaning h2#meaning-h { color: var(--accent); }
.on-dark .eyebrow, .section-black .eyebrow { color: var(--accent); }
.on-dark .eyebrow::after, .section-black .eyebrow::after { background: rgba(230, 210, 144, .55); }

/* ---------- Sections ---------- */
.section { padding: clamp(40px, 5.5vw, 68px) 0; }
.section-stone { background: var(--stone); }
.section-black { background: var(--black); color: var(--white); }
.section-black p { color: var(--muted-on-dark); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 46em; }
.center .lede, .center p { margin-left: auto; margin-right: auto; }
.section-head { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.center { text-align: center; }
.narrow { max-width: 700px; margin-left: auto; margin-right: auto; }
.flagship { max-width: 1000px; }

/* ---------- Hero (compact, centred) ---------- */
.hero { background: var(--black); color: var(--white); padding: clamp(44px, 6vw, 72px) 0; text-align: center; }
.hero h1 { max-width: 20em; margin-left: auto; margin-right: auto; }
.hero .lede { color: var(--muted-on-dark); margin: 0 auto 28px; }
.hero .btn-row { justify-content: center; }
.page-hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
/* Get Involved, desktop: the heading and the line under it each sit on a single line */
@media (min-width: 1000px) {
  .gi-hero h1, .gi-hero .lede { white-space: nowrap; max-width: none; text-wrap: nowrap; }
}
/* Homepage hero (version 3, 2026-11-15): centred heading and buttons over our own photo of a volunteer in a Barakah
   vest (assets/img/hero-volunteer.webp), in full colour. A soft dark fade sits behind the words so they stay easy to
   read, lightening towards the edges so the photo's colour shows around them.
   Earlier versions: v1 left-aligned over an Unsplash street photo (assets/img/hero.jpg, unsplash.com/photos/IWJH-l-vb4k);
   v2 black and white with colour showing only through a large emblem shape. */
.hero-home {
  position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(72px, 10vw, 128px) 0;
  background: var(--black);
}
.hero-home::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(ellipse 62% 78% at 50% 50%, rgba(10, 10, 10, .78) 0%, rgba(10, 10, 10, .6) 45%, rgba(10, 10, 10, .2) 100%),
    url("../img/hero-volunteer.webp");
  background-repeat: no-repeat; background-size: cover; background-position: center, center 60%;
}
.hero-home h1 { margin-left: auto; margin-right: auto; max-width: none; font-size: clamp(1.55rem, 3vw, 2.3rem); text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.hero-home .btn-row { justify-content: center; padding-top: clamp(14px, 1.6vw, 20px); }   /* a little more room under the heading */
@media (max-width: 560px) {
  /* narrow screens: zoom the photo in on the volunteer in the Barakah vest so the vest fills the frame, and
     widen the fade so the whole stacked heading and both buttons sit on it */
  .hero-home::before {
    background-image:
      radial-gradient(ellipse 95% 80% at 50% 50%, rgba(10, 10, 10, .74) 0%, rgba(10, 10, 10, .56) 50%, rgba(10, 10, 10, .26) 100%),
      url("../img/hero-volunteer.webp");
    background-size: 100% 100%, auto 165%;
    background-position: center, 94% 62%;
  }
}

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card .num { font-family: var(--font-display); color: var(--gold-text); font-size: 1rem; font-weight: 700; letter-spacing: .1em; display: block; margin-bottom: 10px; }
.card .more { font-weight: 700; text-decoration: none; }
.card .more::after { content: " →"; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: .55em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 14px; height: 8px; border-left: 3px solid var(--accent-hover); border-bottom: 3px solid var(--accent-hover); transform: rotate(-45deg); }
.panel { background: var(--black); color: var(--white); border-radius: var(--radius); padding: clamp(32px, 5vw, 56px); position: relative; overflow: hidden; }
.panel p { color: var(--muted-on-dark); }
.panel img.mark { width: 120px; margin-bottom: 24px; }

/* ---------- How it works: the programme tile sits in the middle, then slides left as the page scrolls, drawing the
   description out from behind it like a document pulled from a folder ---------- */
.howit-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(28px, 4vw, 48px); align-items: stretch; max-width: 1080px; }
.howit-tile { display: flex; align-items: center; justify-content: center; z-index: 2; box-shadow: 0 24px 60px rgba(10, 10, 10, .22); }
.howit-tile img { width: min(260px, 72%); margin: 0 auto; }
.howit-doc { position: relative; z-index: 1; background: var(--stone); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); }
/* On the black section: the description sits on a dark panel in white text, beside the programme tile */
.section-black .howit-doc { background: #141414; border-color: #2A2A2A; color: var(--white); }
.section-black .howit-doc p, .section-black .howit-doc li { color: var(--white); }
.section-black .howit-tile { border: 0; box-shadow: none; padding: 16px; }
.howit-doc > :last-child { margin-bottom: 0; }
.howit-doc h2 { margin-bottom: .5em; }
.howit-doc .ticks { margin-bottom: .8em; }
.howit-doc .ticks li { margin-bottom: .3em; padding-left: 24px; }
/* gold diamonds instead of ticks, matching the list under "Where we're heading" */
.howit-doc .ticks li::before { width: 9px; height: 9px; top: .55em; left: 2px; border: 0; background: var(--gold); transform: rotate(45deg); }
.howit-tile img { width: min(340px, 88%); }
.howit-doc { text-align: center; }
.howit-doc .ticks li { padding-left: 0; }
.howit-doc .ticks li::before { position: static; display: inline-block; vertical-align: .12em; margin-right: 10px; }
@media (max-width: 860px) { .howit-grid { grid-template-columns: 1fr; gap: 16px; } .howit-tile { padding: 22px 20px; } .howit-tile img { width: 220px; } }


/* ---------- Impact ---------- */
.impact-total { text-align: center; margin-bottom: 26px; }
.impact-total .big { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 8vw, 5rem); line-height: 1; color: var(--gold); }
.section-black .impact-total .big { color: var(--gold); }
.impact-total .label { display: block; font-family: var(--font-display); font-size: clamp(1.1rem, 2.2vw, 1.5rem); margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 22px 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2rem); color: var(--ink); line-height: 1.1; }
.stat span { display: block; font-size: .9rem; color: var(--muted); margin-top: 6px; font-weight: 600; }
.section-black .stat { background: #161616; border-color: #2A2A2A; }
.section-black .stat b { color: var(--accent); }
.section-black .stat span { color: var(--muted-on-dark); }
.note { font-size: .92rem; color: var(--muted); text-align: center; margin-top: 24px; }

/* ---------- Impact breakdown: each category centred (name, total), its items as tiles with the figure in gold ---------- */
.impact-groups { display: grid; gap: clamp(48px, 7vw, 80px); margin-top: 12px; }
.ig { text-align: center; }
.ig-name { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); }
.ig-total { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 4.4vw, 3rem); line-height: 1.1; margin: 8px 0 28px; }
.ig-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.ig-list li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 26px; display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.ig-list li:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(10, 10, 10, .08); }
.ig-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 3.6vw, 2.8rem); line-height: 1; color: var(--gold); margin-bottom: 16px; }
.ig-item { font-weight: 700; font-size: 1.1rem; }
.ig-desc { display: block; margin-top: 6px; font-size: .92rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 860px) { .ig-list { grid-template-columns: 1fr; gap: 14px; } .ig-list li { padding: 22px 22px 20px; } }
/* All six figures in one wide card: a row per category, its name and total on the left, its three items beside it */
.impact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 12px; }
.ic-row { display: grid; grid-template-columns: 230px 1fr; }
.ic-row + .ic-row { border-top: 1px solid var(--line); }
.ic-group { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 28px 20px; background: var(--stone, #F6F3EC); border-right: 1px solid var(--line); }
.ic-group .ig-total { margin: 8px 0 0; }
.impact-card .ig-list { gap: 0; }
.impact-card .ig-list li { background: none; border: 0; border-radius: 0; padding: 30px 28px 28px; text-align: center; align-items: center; }
.impact-card .ig-list li + li { border-left: 1px solid var(--line); }
.impact-card .ig-list li:hover, .ig-anim .impact-card .ig-list li.in:hover { transform: none; box-shadow: none; }
@media (max-width: 860px) {
  .ic-row { grid-template-columns: 1fr; }
  .ic-group { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; }
  .impact-card .ig-list { gap: 0; }
  .impact-card .ig-list li { padding: 22px 22px 20px; }
  .impact-card .ig-list li + li { border-left: 0; border-top: 1px solid var(--line); }
}
/* Compact: smaller figures and tighter padding so the whole breakdown takes far less scrolling */
.impact-total { margin-bottom: 20px; }
.impact-total .big { font-size: clamp(2.6rem, 6vw, 3.8rem); }
.impact-total .label { font-size: clamp(1rem, 1.8vw, 1.25rem); margin-top: 6px; }
.ic-row { grid-template-columns: 200px 1fr; }
.ic-group { padding: 18px 16px; }
.ic-group .ig-total { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-top: 4px; }
.impact-card .ig-list li { padding: 20px 20px 18px; }
.impact-card .ig-num { font-size: clamp(1.8rem, 2.8vw, 2.2rem); margin-bottom: 8px; }
.impact-card .ig-item { font-size: 1rem; }
.impact-card .ig-desc { font-size: .86rem; line-height: 1.45; margin-top: 4px; }
@media (max-width: 860px) {
  .ic-row { grid-template-columns: 1fr; }
  /* Phones and small tablets: two separate tiles (Food and drink, Warmth and essentials),
     each with its name on top and its total underneath */
  .impact-card { background: none; border: 0; border-radius: 0; overflow: visible; display: grid; gap: 16px; }
  /* a darker stone outline, so each tile's top stands out from the section's stone background */
  .ic-row { background: var(--white); border: 1.5px solid #CFC9B8; border-radius: var(--radius); overflow: hidden; }
  .ic-row + .ic-row { border-top: 1.5px solid #CFC9B8; }
  .ic-group { flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 14px 16px 12px; }
  .ic-group .ig-total { margin: 0; font-size: 1.6rem; }
  .impact-card .ig-list li { padding: 14px 18px 13px; }
  .impact-card .ig-num { font-size: 1.6rem; margin-bottom: 4px; }
  .impact-card .ig-desc { font-size: .84rem; }
}
/* Tiles rise into place as they come into view (JS adds .ig-anim only when motion is allowed) */
.ig-anim .ig-list li { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.ig-anim .ig-list li.in { opacity: 1; transform: none; }
.ig-anim .ig-list li.in:hover { transform: translateY(-3px); }
.section-black .note { color: var(--muted-on-dark); }

/* ---------- Get involved: angled panels that expand ---------- */
.ways { display: flex; height: 360px; padding: 0 28px; margin: 0 auto; max-width: 1060px; }
/* One slow, smooth curve for everything that moves here, so it all moves together */
/* Steady speed (no slow-fast-slow), and opening and closing run at exactly the same time */
.ways { --ease: linear; --dur: .55s; }
.way {
  position: relative; flex: 1 1 0; min-width: 0; margin-left: -18px;
  transform: skewX(-9deg); border-radius: 18px; overflow: hidden; cursor: pointer;
  box-shadow: -12px 0 28px rgba(10, 10, 10, .14);
  transition: flex-grow var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.way:first-child { margin-left: 0; }
.way-1 { background: var(--black); color: var(--white); z-index: 1; }
.way-2 { background: var(--stone); color: var(--ink); z-index: 2; border: 1px solid var(--line); }
.way-3 { background: var(--white); color: var(--ink); z-index: 3; border: 1px solid var(--line); }
.way-in { position: relative; height: 100%; transform: skewX(9deg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px clamp(28px, 4vw, 56px); }
.way h3 { font-size: clamp(1.3rem, 2.4vw, 2rem); margin: 0; white-space: nowrap; }
/* Desktop: a panel's full content (title, description, button) is always laid out exactly as it looks when
   open: same size, same position, never faded, never resized. The only movement is sideways. As a panel
   narrows, its content slides away and hides behind the neighbouring tile or the panel's edge. As it widens,
   the content slides back out the same way. Fixed width, so the text never re-wraps. */
.way-full { flex: none; width: 22rem; display: flex; flex-direction: column; align-items: center; transition: transform var(--dur) var(--ease); }
.ways .way-1:not(.active) .way-full { transform: translateX(110%); }   /* Volunteer hides to the right, behind Donate */
.ways .way-3:not(.active) .way-full { transform: translateX(-110%); }  /* Partner hides to the left */
.ways .way-2:not(.active) .way-full { transform: translateX(110%); }   /* Donate hides away from the open tile */
.ways[data-active="3"] .way-2:not(.active) .way-full { transform: translateX(-110%); }
/* All collapsed (nothing hovered): three equal tiles with horizontal titles. When a tile opens, the horizontal
   titles fade away and the vertical titles fade in on the narrow tiles; closing them all reverses it. */
.way-hlabel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center; white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.1vw, 1.6rem); line-height: 1.2; letter-spacing: .01em; pointer-events: none; opacity: 0; transition: opacity calc(var(--dur) * .35) linear; }
.ways:not(.has-active) .way-hlabel { opacity: 1; transition: opacity calc(var(--dur) * .45) linear calc(var(--dur) * .55); }
@media (max-width: 760px) { .way-hlabel { display: none; } }
/* Vertical title shown only while a panel is narrow; it simply fades, it never rotates */
.way-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: .08em; opacity: 0; pointer-events: none; transition: opacity calc(var(--dur) * .35) linear; }
/* The vertical title never moves: it fades in once the panel's own content has gone, and fades out first when it reopens */
.ways.has-active .way:not(.active) .way-label { opacity: 1; transition: opacity calc(var(--dur) * .45) linear calc(var(--dur) * .55); }
/* Each vertical title sits in a fixed slot the width of a narrow tile, pinned to the edge of its tile that
   doesn't move, so it stays put while the tile widens or narrows (it only fades). */
.ways { --wc: calc((min(1060px, min(1160px, 100vw) - 48px) - 20px) * .142857); }
.way-label { right: auto; width: var(--wc); }
.way-3 .way-label { left: auto; right: 0; }
.ways[data-active="1"] .way-2 .way-label,
.ways[data-active="2"][data-prev="1"] .way-2 .way-label { left: auto; right: 0; }
.way.relabel .way-label { animation: relabel var(--dur) linear; }
@keyframes relabel { 0% { opacity: 1; } 25%, 75% { opacity: 0; } 100% { opacity: 1; } }
.ways.no-anim .way, .ways.no-anim .way-full, .ways.no-anim .way-label { transition: none !important; }
.way-more { width: 100%; }
.way-more p { margin: 14px 0 22px; }
.way-1 .way-more p { color: var(--muted-on-dark); }
.ways.has-active .way { flex-grow: .6; }
.ways .way.active { flex-grow: 3; z-index: 4; box-shadow: -16px 0 40px rgba(10, 10, 10, .22); }
@media (max-width: 760px) {
  .ways { flex-direction: column; height: auto; padding: 0; }
  /* Stacking stays fixed on phones (no z-index swap when a tile opens), so the overlaps never flip = no jump */
  .way, .ways.has-active .way, .ways .way.active { flex: 0 0 auto; transform: none; margin: -14px 0 0; border-radius: 16px; box-shadow: 0 -10px 24px rgba(10, 10, 10, .12); transition: none; }
  .ways .way-1.active { z-index: 1; } .ways .way-2.active { z-index: 2; } .ways .way-3.active { z-index: 3; }
  .way:first-child { margin-top: 0; }
  /* Bottom padding = the 14px the next tile overlaps, so the description's reveal edge sits exactly under the
     next tile's top edge: the text emerges straight from behind that tile, with no blank band in between. */
  .way-in { transform: none; padding: 30px 24px 14px; }
  .way h3 { white-space: normal; margin-bottom: 16px; }
  .way:last-child .way-in { padding-bottom: 16px; }
  .way-more p { margin-top: 0; }
  .way-more .wm > :last-child { margin-bottom: 18px; }   /* space under the button, kept inside the hidden area */
  .way-label { display: none; }
  .way-full { width: auto; transform: none !important; }
  /* Phone: tiles start collapsed; tap to open, tap again to close (each tile on its own).
     The title is pinned to the top of the tile, so opening only ever grows the tile downwards. */
  .way-in { justify-content: flex-start; }
  .way-more { display: grid; grid-template-rows: 0fr; opacity: 1; transition: grid-template-rows var(--dur) var(--ease); }
  .way-more > .wm { overflow: hidden; min-height: 0; }
  .way.open .way-more { grid-template-rows: 1fr; }
  .way-more { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) { .way, .way-more, .way-full, .way-label, .site-nav { transition: none !important; } .intro .cue::after { animation: none; } }

/* ---------- CTA band (same stone background as Get involved) ---------- */
.cta { background: var(--stone); border-top: 1px solid var(--line); color: var(--black); padding: clamp(36px, 5vw, 56px) 0; text-align: center; }
.cta h2 { margin: 0 0 .3em; }
.cta p { margin: 0 auto 24px; max-width: 38em; }
.cta .btn-row { justify-content: center; }
.cta-white { background: var(--white); }
/* ---------- Donation form (Stripe) ---------- */
.give-card { max-width: 640px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); text-align: center; }
.give-card h2 { margin: 0 0 18px; }
.give-form { text-align: left; }
.give-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--stone); border: 1.5px solid #CFC9B8; border-radius: 12px; padding: 4px; gap: 4px; }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr) 1.4fr; gap: 8px; }
@media (max-width: 560px) { .amounts { grid-template-columns: repeat(4, 1fr); } .amounts .other { grid-column: 1 / -1; } }
.seg label, .amounts label { position: relative; margin: 0; cursor: pointer; }
.seg input, .amounts input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: .6em; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg input:checked + span { background: var(--black); color: var(--white); }
.amounts span { display: block; text-align: center; padding: .75em .4em; border: 1.5px solid #CFC9B8; border-radius: 10px; font-weight: 700; font-size: 1.05rem; background: var(--white); }
.amounts input:checked + span { border-color: var(--accent); background: var(--accent-pale); box-shadow: 0 0 0 2px var(--accent) inset; }
.seg input:focus-visible + span, .amounts input:focus-visible + span { outline: 3px solid var(--gold-text); outline-offset: 2px; }
.amounts .other { display: flex; align-items: center; border: 1.5px solid #CFC9B8; border-radius: 10px; background: var(--white); padding: 0 .7em; }
.amounts .other.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: var(--accent-pale); }
.amounts .other .pound { border: 0; padding: 0; font-weight: 700; background: none; box-shadow: none; }
.form .amounts .other input { border: 0; padding: .7em .3em; background: transparent; box-shadow: none; font-weight: 700; min-width: 0; }
.giftaid { background: var(--stone); border-radius: 12px; padding: 14px 16px; display: grid; gap: 14px; }
.giftaid-decl { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.give-pay { text-align: left; display: grid; gap: 16px; }
.give-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--stone); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.give-back { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--gold-text); text-decoration: underline; cursor: pointer; }
#checkout-form { min-height: 120px; }
.give-small { margin-top: 16px; }
.give-error { margin: 0; color: #9B1C1C; background: #FBEAEA; border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.give-submit { width: 100%; font-size: 1.1rem; padding: 1em; }
.give-submit[disabled] { opacity: .6; cursor: wait; }
.give-small { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
.give-fallback p { color: var(--muted); }
.give-loading { margin: 18px 0 8px; text-align: center; color: var(--muted); font-size: .95rem; }
/* Bank transfer details: label on the left, value on the right, numbers easy to read and copy */
.bank { margin: 0 0 1.1em; background: var(--stone); border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px; }
.bank > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; }
.bank > div + div { border-top: 1px solid var(--line); }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-align: right; user-select: all; }
/* Sections where every line, cards included, is centred */
.all-center, .all-center .card { text-align: center; }
.all-center .lede, .all-center p { margin-left: auto; margin-right: auto; }

/* Cards on a black section: dark tiles with white headings and gold numbers */
.section-black .card { background: #141414; border-color: #2A2A2A; box-shadow: none; color: var(--white); }
.section-black .card p { color: var(--muted-on-dark); }
.section-black .card .num { color: var(--accent); }

/* ---------- Trustees: four tall tiles leaning to the right (rising from bottom left to top right), joined edge to
   edge inside one gold outline. Each has a large photo on top, then the name, role and a short background.
   The tiles are slanted; everything inside is turned back upright, and the photo is drawn wider than the tile so
   it fills the slanted corners. ---------- */
.trustees { --tilt: 7deg; display: flex; position: relative; left: 50%; transform: translateX(-50%); width: min(1500px, calc(100vw - 40px)); padding: 0 clamp(40px, 5vw, 80px); }
.trustee { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; background: #1C1C1C; color: var(--white);
  border: 2px solid #E8E3D6; margin-left: -2px; transform: skewX(calc(-1 * var(--tilt))); overflow: hidden; }
.section-black .trustee p { color: var(--muted-on-dark); }
/* A large, faded gold emblem in the top-right corner behind the trustees, partly cropped by the section edge */
.trustees-sec { position: relative; overflow: hidden; isolation: isolate; }
.trustees-sec::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: clamp(-520px, -30vw, -200px); right: clamp(-560px, -32vw, -220px);
  width: clamp(760px, 95vw, 1500px); aspect-ratio: 1;
  /* the emblem's shape used as a mask over plain white, so the watermark is white */
  background: var(--white);
  -webkit-mask: url("../img/barakah-emblem-gold.svg") center / contain no-repeat; mask: url("../img/barakah-emblem-gold.svg") center / contain no-repeat;
  opacity: .06;
}
.trustee:first-child { margin-left: 0; border-radius: 18px 0 0 18px; }
.trustee:last-child { border-radius: 0 18px 18px 0; }
.trustee-photo { position: relative; height: clamp(240px, 22vw, 360px); overflow: hidden; background: #262626; }
.trustee-photo > * { position: absolute; top: 0; bottom: 0; left: -28px; width: calc(100% + 56px); height: 100%; transform: skewX(var(--tilt)); }
.trustee-photo img { object-fit: cover; object-position: 50% 8%; display: block; max-width: none; }
.trustee-photo .ph { background: #262626 url("../img/barakah-emblem-gold.svg") center / 34% no-repeat; }
.trustee-text { transform: skewX(var(--tilt)); padding: clamp(16px, 1.6vw, 24px) clamp(36px, 3.6vw, 56px) clamp(18px, 1.8vw, 28px); text-align: center; flex: 1; }
.trustee h3 { color: var(--white); margin: 0 0 6px; font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
.trustee-role { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.trustee p { margin: 0; color: var(--muted-on-dark); font-size: clamp(.92rem, 1.1vw, 1.05rem); line-height: 1.6; }
/* About: Our purpose sits on white with darker stone tiles; Our values sits on stone with white tiles */
.purpose-sec .card { background: var(--stone); border-color: var(--line); box-shadow: none; }
.values-sec .card { background: var(--white); }
/* A black closing call to action (About: "Be part of what comes next") */
.cta-black { background: var(--black); color: var(--white); border-top: 0; }
.cta-black h2 { color: var(--white); }
.cta-black p { color: var(--muted-on-dark); }
/* Two stone sections in a row (e.g. About: Our story, then Our purpose) get a fine line between them */
.section-stone + .section-stone { border-top: 1px solid var(--line); }
/* About: official charity partners, their logos side by side on white tiles */
.partner-logos { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 760px; }
.partner-logos li { flex: 1 1 260px; max-width: 340px; display: flex; height: 170px; }
.partner-logos a { flex: 1; display: flex; align-items: center; justify-content: center; padding: 22px 28px; background: var(--white); border: 1.5px solid #E8E3D6; border-radius: var(--radius); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.partner-logos a:hover { border-color: #CFC9B8; box-shadow: 0 10px 26px rgba(10, 10, 10, .08); transform: translateY(-2px); }
.partner-logos a:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }
.partner-logos img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 560px) { .partner-logos li { height: 140px; } }
.partners-sec .section-head { margin-bottom: 22px; }/* Photos hidden for now: each tile is just the name, role and background */
.trustees.no-photos .trustee-photo { display: none; }
.trustees.no-photos .trustee-text { display: flex; flex-direction: column; justify-content: center; padding-top: clamp(26px, 2.6vw, 38px); padding-bottom: clamp(26px, 2.6vw, 38px); }
/* Tablets: two by two. Phones: one under another. Both upright, each trustee its own rounded tile. */
@media (max-width: 960px) {
  .trustees { --tilt: 0deg; padding: 0; display: grid; grid-template-columns: 1fr 1fr; left: auto; transform: none; width: auto; max-width: 900px; margin: 0 auto; gap: 16px; }
  .trustee-photo { height: 300px; }
  .trustee, .trustee:first-child, .trustee:last-child { border: 2px solid #E8E3D6; margin: 0; border-radius: 18px; background: #1C1C1C; }
  .trustee-photo > * { left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .trustees { grid-template-columns: 1fr; max-width: 460px; }
  .trustee-photo { height: 300px; }
  .trustee-text { padding: 18px 20px 22px; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; text-align: left; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.form .hint { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1.5px solid #CFC9B8; border-radius: 10px; padding: .75em .9em;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(230, 210, 144, .7); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--black); }
.hidden { display: none; }
/* Anything the page hides (the hidden attribute) stays hidden, even where a layout rule like .form sets display */
[hidden] { display: none !important; }
/* On-brand dropdown: the browser's own list can't be styled (it shows a blue highlight and square corners), so
   JS swaps in this rounded list with a faded-gold highlight. The real select stays underneath for the form. */
.dd { position: relative; }
.dd-native { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.form .dd-btn {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid #CFC9B8; border-radius: 10px; padding: .75em 2.6em .75em .9em;
}
.dd-btn::after { content: ""; position: absolute; right: 1em; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--gold-text); border-bottom: 2px solid var(--gold-text); transform: rotate(45deg); transition: transform .2s ease, margin-top .2s ease; }
.dd.open .dd-btn::after { transform: rotate(-135deg); margin-top: -1px; }
.form .dd-btn:focus-visible, .dd.open .dd-btn { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(230, 210, 144, .7); }
.dd-list {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none;
  background: var(--white); border: 1.5px solid #CFC9B8; border-radius: 14px; box-shadow: 0 14px 34px rgba(10, 10, 10, .12); max-height: 290px; overflow-y: auto;
}
.dd.open .dd-list { display: block; }
.dd-list li { padding: .6em .8em; border-radius: 9px; cursor: pointer; }
.dd-list li + li { margin-top: 2px; }
.dd-list li:hover, .dd-list li:focus, .dd-list li:focus-visible { outline: none; background: var(--accent-pale); }
.dd-list li[aria-selected="true"] { background: rgba(230, 210, 144, .5); font-weight: 700; }
/* Text selection and checkboxes on brand too */
::selection { background: rgba(230, 210, 144, .6); color: var(--ink); }
/* Tick boxes: a plain white box with a stone border; ticked, it fills black with a clean white tick.
   No glow or highlight around it, whether ticked, unticked or just clicked. */
.form .check input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin: 2px 0 0; padding: 0; flex: none; cursor: pointer;
  border: 1.5px solid #CFC9B8; border-radius: 6px; background: var(--white) no-repeat center / 14px 14px;
  box-shadow: none; outline: none; transition: background-color .15s ease, border-color .15s ease;
}
.form .check input[type="checkbox"]:checked {
  background-color: var(--black); border-color: var(--black);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3 3 6.6-6.8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form .check input[type="checkbox"]:focus { box-shadow: none; outline: none; }
/* keyboard users still get a fine outline so they can see where they are */
.form .check input[type="checkbox"]:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

/* ---------- Misc ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.callout { border-top: 4px solid var(--accent); background: var(--stone); padding: 26px clamp(22px, 4vw, 40px); border-radius: var(--radius); text-align: center; max-width: 820px; margin: 0 auto; }
.callout p { margin-left: auto; margin-right: auto; }
.callout p:last-child { margin-bottom: 0; }
.prose { max-width: 760px; }
.prose h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: 1.4em 0 .4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
/* footer legal links, separated by small dots */
.foot-legal { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; }
.foot-legal a + a::before { content: "·"; margin: 0 .6em; color: var(--muted-on-dark); }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 1.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--muted-on-dark); padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand img { height: 52px; width: auto; margin-bottom: 18px; }
.foot-brand p { max-width: 30em; }
.site-footer h2 { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.foot-base { border-top: 1px solid #262626; margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; }
/* Everything in the footer centred */
.site-footer { text-align: center; }
.foot-brand img { display: block; margin-left: auto; margin-right: auto; }
.foot-brand p { margin-left: auto; margin-right: auto; }
.foot-base { flex-direction: column; align-items: center; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover { transition: none; transform: none; }
}

/* ---------- Our name: the emblem's own lines bend into the Arabic word, then the meaning opens below ---------- */
.meaning h2.eyebrow { font-family: var(--font-body); font-size: .8rem; line-height: 1.4; text-transform: uppercase; letter-spacing: .2em; color: var(--accent); }
.meaning-stage { position: relative; display: block; width: min(330px, 76vw); margin: 0 auto; padding: 0; background: none; border: 0; border-radius: 16px; cursor: pointer; color: inherit; font: inherit; }
.meaning-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }
.meaning-svg { display: block; width: 100%; height: auto; overflow: visible; shape-rendering: geometricPrecision; }
/* The gold shapes are filled with a gradient whose light band glides across them (see #m-sheen in the page),
   so only the emblem's lines (and the Arabic word) catch the light, never the black around them */
.meaning-svg .m-piece, .meaning-svg .m-dot { fill: var(--gold); fill: url(#m-sheen); }
.meaning-svg .m-fatha { fill: var(--gold); fill: url(#m-sheen); opacity: 0; transform-box: fill-box; }
.meaning-cue { position: relative; display: inline-block; margin-top: 30px; font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); transition: opacity .5s ease; }
.cue-tap { display: none; }
@media (hover: none) and (pointer: coarse) { .cue-click { display: none; } .cue-tap { display: inline; } }
.meaning.morphing .meaning-cue { opacity: 0; pointer-events: none; }
/* the cue text can be clicked or tapped as well as the emblem */
.meaning-cue { cursor: pointer; -webkit-user-select: none; user-select: none; }
/* The meaning: short, and wide rather than tall */
.js .meaning-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .9s cubic-bezier(.65, 0, .35, 1); }
.js .meaning.open .meaning-body { grid-template-rows: 1fr; }
.meaning-body .mb-in { overflow: hidden; min-height: 0; max-width: 980px; margin: 0 auto; }
.js .meaning-body .mb-in > * { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .meaning.open .mb-in > * { opacity: 1; transform: none; }
.js .meaning.open .mb-in > :nth-child(1) { transition-delay: .35s; }
.js .meaning.open .mb-in > :nth-child(2) { transition-delay: .5s; }
.js .meaning.open .mb-in > :nth-child(3) { transition-delay: .65s; }
.meaning .meaning-word { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: .08em; margin: 0; padding-top: 6px; color: var(--white); }
.meaning .meaning-say { display: block; margin-top: 0; font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.meaning .meaning-def { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.45; color: var(--white); margin: 22px auto 14px; }
.meaning .meaning-more { font-size: .98rem; line-height: 1.65; margin: 0 auto; max-width: none; }
/* One line wherever it fits; phones wrap it naturally */
@media (min-width: 900px) { .meaning .meaning-more { white-space: nowrap; font-size: .94rem; } }
@media (prefers-reduced-motion: reduce) { .js .meaning .mb-in > * { transition: none; transform: none; } }
/* Side panels: off-white tiles filling the left and right of the section, each with a large faded emblem, and a
   slanted inner edge (leaning like the trustee tiles) drawn in gold. The black middle keeps the emblem and its
   animation. Each panel is a gold shape with a slightly narrower off-white face on top, so only the slanted edge
   shows gold. Wide screens only; on narrower screens the middle needs the room. */
.meaning { position: relative; overflow: hidden; isolation: isolate; }
.meaning > .container { position: relative; z-index: 1; }
.m-side { --slant: 90px; --edge: 0px; position: absolute; top: 0; bottom: 0; width: calc(50% - 430px); z-index: 0; pointer-events: none; background: none; }
.m-left { left: 0; clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%); }
.m-right { right: 0; clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%); }
.m-face { position: absolute; inset: 0; overflow: hidden; }
/* Darkest beside the black middle, easing out to a lighter charcoal towards the outer edges of the screen */
.m-left .m-face { background: linear-gradient(285deg, #050505 0%, #0E0E0E 30%, #1C1C1C 70%, #2A2A2A 100%); }
.m-right .m-face { background: linear-gradient(75deg, #050505 0%, #0E0E0E 30%, #1C1C1C 70%, #2A2A2A 100%); }.m-right .m-face { clip-path: polygon(calc(var(--slant) + var(--edge)) 0, 100% 0, 100% 100%, var(--edge) 100%); }
.m-face::before { content: ""; position: absolute; width: 760px; aspect-ratio: 1; top: 50%; background: #C8C8C8; -webkit-mask: url("../img/barakah-emblem-gold.svg") center / contain no-repeat; mask: url("../img/barakah-emblem-gold.svg") center / contain no-repeat; opacity: .1; }
.m-left .m-face::before { right: -170px; transform: translateY(-58%) rotate(-8deg); }
.m-right .m-face::before { left: -170px; transform: translateY(-42%) rotate(8deg); }
.meaning .meaning-body .mb-in { max-width: 760px; }
/* ===== Meaning section, version 2 (2026-11-08): no tiles. A black-to-charcoal gradient runs from the middle out to the
   sides, with the faded emblems sitting in the side areas and fading away towards the middle.
   To go back to the slanted tiles, delete this block (down to "end of version 2"). ===== */
.meaning { background: linear-gradient(90deg, #262626 0%, #141414 22%, #0A0A0A 38%, #0A0A0A 62%, #141414 78%, #262626 100%); }
.m-left, .m-right { clip-path: none; }
.m-face { background: none !important; clip-path: none !important; }
.m-left { -webkit-mask: linear-gradient(90deg, #000 45%, transparent 100%); mask: linear-gradient(90deg, #000 45%, transparent 100%); }
.m-right { -webkit-mask: linear-gradient(270deg, #000 45%, transparent 100%); mask: linear-gradient(270deg, #000 45%, transparent 100%); }
/* ===== end of version 2 ===== */
/* Phones only: plain black behind the meaning section, no gradient (desktop and tablet keep the gradient) */
@media (max-width: 760px) { .meaning { background: var(--black); } }
@media (max-width: 1100px) { .m-side { display: none; } }

/* ---------- Get Involved: the partner form under the four partner cards ---------- */
.partner-card { max-width: 760px; margin: 40px auto 0; scroll-margin-top: 110px; }
#volunteer-form { scroll-margin-top: 110px; }
/* the introduction beside the volunteer form: centred */
.vol-intro { text-align: center; }

/* ---------- Floating Volunteer / Donate buttons, bottom right (added by main.js) ----------
   A dark capsule holding the two actions; it rises into view only when the page's own buttons are off screen. */
.float-cta { position: fixed; z-index: 60; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px;
  /* liquid glass: a smoky, see-through black that blurs and brightens what's behind it, with a soft light edge */
  background: linear-gradient(160deg, rgba(40, 40, 40, .55), rgba(10, 10, 10, .62));
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(255, 255, 255, .06);
  /* a lighter blur: it's redrawn behind the bar as the page scrolls, so a smaller radius keeps scrolling smooth */
  -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .45s; }
.float-cta.show { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.float-cta a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease; }
.float-cta .fc-vol { color: var(--white); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.float-cta .fc-vol:hover { background: rgba(255, 255, 255, .14); color: var(--white); }
/* the gold pill is glassy too: slightly see-through gold with a light sheen along its top */
.float-cta .fc-don { color: var(--black);
  background: linear-gradient(180deg, rgba(232, 206, 70, .92), rgba(217, 185, 11, .86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 8px rgba(217, 185, 11, .25); }
.float-cta .fc-don:hover { color: var(--black); background: linear-gradient(180deg, rgba(232, 206, 70, 1), rgba(217, 185, 11, .95)); }
/* browsers without background blur get a solid version so the text stays readable */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .float-cta { background: rgba(10, 10, 10, .92); }
}
.float-cta a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) {
  .float-cta { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .float-cta a { min-height: 42px; padding: 0 18px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .float-cta, .float-cta.show { transform: none; transition: opacity .2s ease, visibility 0s; } }
@media print { .float-cta { display: none; } }

/* ---------- Programme: where we're heading ---------- */
.goal-intro { max-width: 46em; margin: 0 auto 28px; text-align: center; }
/* wider text in this section, so each paragraph takes fewer lines */
.goal .section-head { max-width: 1000px; }
.goal .lede, .goal .goal-intro, .goal .goal-partner p { max-width: 1000px; }
.goal-lead { max-width: 1000px; margin: 0 auto 22px; text-align: center; font-weight: 700; color: var(--gold-text) !important; }
.section-black .goal-lead { color: var(--accent) !important; }
/* The six kinds of support: no boxes, just the names flowing in centred lines, each led by a small gold diamond
   (the emblem's own dot), with a fine gold rule above and below the group */
.goal-list { list-style: none; margin: 0 auto; padding: 26px 0; max-width: 860px; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.goal-list li { display: inline-flex; align-items: center; gap: 12px; }
.goal-list li::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.goal-list b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--ink); white-space: nowrap; }
.section-black .goal-list b { color: var(--white); }
@media (max-width: 560px) { .goal-list { flex-direction: column; align-items: center; gap: 14px; } }
.goal-partner { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; flex-wrap: wrap; margin-top: 28px; padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line); background: var(--stone); border-radius: var(--radius); }
.goal-partner h3 { color: var(--ink); margin: 0 0 6px; }
.goal-partner p { margin: 0 auto; max-width: 40em; }
