/* IHYA Charity — "Clean & bright" design system
   Cool white surfaces, deep navy ink, the logo's teal→aqua gradient for action and emphasis.
   Logical properties throughout so one stylesheet serves RTL Arabic and LTR English/Turkish. */

/* ---------- Tokens ---------- */
:root {
  --navy-950: #050d1a;
  --navy-900: #0b1b33;
  --navy-800: #12284a;
  --teal-700: #076a5b;
  --teal-600: #0a8573;
  --teal-500: #0fa892;
  --aqua-500: #0e9fb0;
  --teal-100: #d9f3ee;
  --teal-50: #ebf8f5;

  --bg: #f6f8fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: var(--navy-900);
  --text-2: #4b5a70;
  --text-3: #6b7a90;
  --line: #e3e9f1;
  --line-strong: #cfd8e4;
  --brand: var(--teal-600);
  --brand-ink: #0a7d6d;
  --brand-tint: var(--teal-50);
  --brand-tint-2: var(--teal-100);
  --grad: linear-gradient(135deg, #0a8573 0%, #076a5b 100%);
  --grad-text: linear-gradient(90deg, #0a8f7e 0%, #0e9fb0 100%);
  --grad-bar: linear-gradient(90deg, #0fa892, #1cc2cf);
  --deep: var(--navy-900);
  --on-deep: #ffffff;
  --on-deep-2: #a9b6c8;

  --shadow-sm: 0 1px 2px rgba(11, 27, 51, 0.05);
  --shadow-md: 0 1px 2px rgba(11, 27, 51, 0.04), 0 12px 32px -12px rgba(11, 27, 51, 0.14);
  --shadow-lg: 0 24px 60px -20px rgba(11, 27, 51, 0.28);
  --shadow-btn: 0 10px 24px -10px rgba(10, 133, 115, 0.8);

  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --gutter: 16px;
  --wrap: 1240px;
  --section: clamp(64px, 8vw, 112px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --f: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --f-quran: 'Amiri', 'Readex Pro', serif;
  --lh: 1.65;

  color-scheme: light;
}
html[lang='ar'] { --lh: 1.85; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #070f1d; --bg-alt: #0a1527; --surface: #0f1c32; --surface-2: #14233d;
    --text: #e8eef6; --text-2: #a3b1c4; --text-3: #8392a8;
    --line: rgba(232, 238, 246, 0.09); --line-strong: rgba(232, 238, 246, 0.18);
    --brand-ink: #3fd3bd; --brand-tint: rgba(15, 168, 146, 0.13); --brand-tint-2: rgba(15, 168, 146, 0.22);
    --grad-text: linear-gradient(90deg, #2fd1b8 0%, #3cc8e0 100%);
    --deep: #0c1a30;
    --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #070f1d; --bg-alt: #0a1527; --surface: #0f1c32; --surface-2: #14233d;
  --text: #e8eef6; --text-2: #a3b1c4; --text-3: #8392a8;
  --line: rgba(232, 238, 246, 0.09); --line-strong: rgba(232, 238, 246, 0.18);
  --brand-ink: #3fd3bd; --brand-tint: rgba(15, 168, 146, 0.13); --brand-tint-2: rgba(15, 168, 146, 0.22);
  --grad-text: linear-gradient(90deg, #2fd1b8 0%, #3cc8e0 100%);
  --deep: #0c1a30;
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--f); font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem); line-height: var(--lh);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
bdi[dir='ltr'] { unicode-bidi: isolate; direction: ltr; }
.topbar bdi, .footer bdi, .license bdi, .bento bdi, .stats bdi { white-space: nowrap; }
::selection { background: var(--teal-100); color: var(--navy-900); }
:focus-visible { outline: 3px solid var(--aqua-500); outline-offset: 3px; border-radius: 8px; }
main:focus { outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--r-xs); font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 12px; }

.icon { flex: none; }
[dir='rtl'] .icon--flip { transform: scaleX(-1); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

/* Photos are shown exactly as published; the container colour only shows while they load. */
.bento__tall, .bento__photo, .pcard__media, .phero__media, .campaign__media, .tier__media, .promise__media {
  background: var(--surface-2);
}

/* ---------- Type ---------- */
.display, .h2, .h3, .h4 { color: var(--text); letter-spacing: -0.02em; }
html[lang='ar'] :is(.display, .h2, .h3, .h4) { letter-spacing: 0; }
.display { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.75rem); line-height: 1.1; font-weight: 700; }
.display--xl { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); line-height: 1.08; }
html[lang='ar'] .display, html[lang='ar'] .display--xl { line-height: 1.3; }
.h2 { font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.6rem); line-height: 1.2; }
.h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); line-height: 1.35; font-weight: 600; }
.h4 { font-size: 1.125rem; line-height: 1.4; font-weight: 600; }
html[lang='ar'] .h2 { line-height: 1.4; }

.grad { background: linear-gradient(90deg, #0a8f7e, #0e9fb0, #0fa892, #0a8f7e); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; display: inline; animation: shine 8s linear infinite; }
:root[data-theme='dark'] .grad { background-image: linear-gradient(90deg, #2fd1b8, #3cc8e0, #5fe3c6, #2fd1b8); }
.display--xl .grad { display: block; }
.lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); color: var(--text-2); max-width: 60ch; font-weight: 300; }
html[lang='ar'] .lead { font-weight: 400; }

/* Eyebrows and badges are small tinted pills. */
.eyebrow, .badge {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  background: var(--brand-tint); color: var(--brand-ink);
  font-size: 0.8125rem; font-weight: 500; line-height: 1.4;
}
.badge__dot { width: 7px; height: 7px; border-radius: 99px; background: var(--teal-500); box-shadow: 0 0 0 4px var(--brand-tint-2); }

.prose > * + * { margin-top: 1rem; }
.prose > .h2 + p { margin-top: 1.25rem; }
.prose > .h4 { margin-top: 2rem; }
.prose p { color: var(--text-2); max-width: 66ch; }
.prose p.eyebrow { color: var(--brand-ink); }

.link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 5px; }
.link .icon { transition: transform 0.25s var(--ease); }
.link:hover .icon { transform: translateX(4px); }
[dir='rtl'] .link:hover .icon { transform: scaleX(-1) translateX(4px); }
.more { margin-top: 32px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  font-weight: 600; font-size: 0.9375rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s, filter 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--primary { position: relative; overflow: hidden; isolation: isolate; background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-btn); }
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 14px 28px -10px rgba(10, 133, 115, 0.9); }
.btn--ghost { background: var(--surface); }
.btn--ghost:hover { border-color: var(--text-3); }
.btn--light { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn--light:hover { background: rgba(255, 255, 255, 0.14); }
.btn--sm { min-height: 42px; padding: 0 16px; font-size: 0.875rem; border-radius: 12px; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn .icon { width: 18px; height: 18px; }

.iconbtn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.iconbtn:hover { border-color: var(--line-strong); background: var(--surface-2); }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy-900); color: var(--on-deep-2); font-size: 0.8125rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar p, .topbar a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar__contact { display: flex; gap: 20px; }
@media (max-width: 760px) {
  .topbar__license { display: none; }
  .topbar__inner { justify-content: center; }
  .topbar__contact a:first-child { display: none; }
}

.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line); transition: box-shadow 0.3s;
}
/* The frosted glass lives on a layer behind the header: backdrop-filter on .header itself would
   make it the containing block for the fixed-position phone menu and squash it to header height. */
.header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px);
}
.header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(11, 27, 51, 0.35); }
.header__inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); transition: min-height 0.3s var(--ease); }
.header.is-scrolled .header__inner { min-height: 62px; }
.brand { display: block; flex: none; }
.brand img { height: 44px; width: auto; }
.brand__light { height: 50px !important; width: auto; }
.brand__dark { display: none; }
:root[data-theme='dark'] .brand__light { display: none; }
:root[data-theme='dark'] .brand__dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .brand__light { display: none; }
  :root:not([data-theme='light']) .brand__dark { display: block; }
}
.header__tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 10px;
  text-decoration: none; font-weight: 400; color: var(--text-2); transition: color 0.2s, background 0.2s;
}
.nav__link:hover, .nav__group:focus-within > .nav__link { color: var(--text); background: var(--surface-2); }
.nav__link[aria-current='page'], .nav__group.is-active > .nav__link { color: var(--text); font-weight: 600; }
.nav__link[aria-current='page']::after, .nav__group.is-active > .nav__link::after {
  content: ''; position: absolute; inset-inline: 14px; bottom: -15px; height: 2px; border-radius: 2px; background: var(--grad-bar);
}
.nav__chev { opacity: 0.6; transition: transform 0.2s; }
.nav__group { position: relative; }
.nav__sub {
  position: absolute; top: calc(100% + 14px); inset-inline-start: 0; min-width: 240px; padding: 8px;
  border-radius: var(--r-md); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all 0.2s var(--ease);
}
.nav__sub::before { content: ''; position: absolute; inset-inline: 0; top: -16px; height: 16px; }
.nav__sub a { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.nav__sub a:hover, .nav__sub a[aria-current='page'] { background: var(--brand-tint); color: var(--brand-ink); }
.nav__group:hover .nav__sub, .nav__group:focus-within .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__group:hover .nav__chev, .nav__group:focus-within .nav__chev { transform: rotate(180deg); }
.nav__langs { display: none; }

.langmenu { position: relative; }
.langmenu summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 0.8125rem;
}
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary:hover { border-color: var(--line-strong); }
.langmenu ul {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 160px; padding: 6px;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.langmenu li > * { display: block; padding: 9px 14px; border-radius: 10px; text-decoration: none; }
.langmenu a:hover { background: var(--surface-2); }
.langmenu [aria-current] { color: var(--brand-ink); font-weight: 600; background: var(--brand-tint); }

.only-dark { display: none; }
:root[data-theme='dark'] .only-dark { display: block; }
:root[data-theme='dark'] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .only-dark { display: block; }
  :root:not([data-theme='light']) .only-light { display: none; }
}

.nav-toggle, .nav-toggle__close { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; }
  .header__donate span { display: none; }
  .header__donate { width: 42px; padding: 0; }
  .langmenu { display: none; }
  .nav {
    position: fixed; inset: var(--nav-top, calc(36px + var(--header-h))) 0 0 0; z-index: 49; overflow-y: auto;
    background: var(--bg-alt); padding: 12px var(--gutter) 40px;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.25s var(--ease);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list > li { border-bottom: 1px solid var(--line); }
  .nav__link { padding: 16px 4px; font-size: 1.125rem; border-radius: 0; }
  .nav__link:hover { background: none; }
  .nav__link::after, .nav__chev { display: none !important; }
  .nav__sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 12px; min-width: 0; }
  .nav__sub a { padding: 10px 16px; color: var(--text-2); border-inline-start: 2px solid var(--line); border-radius: 0; }
  .nav__sub a:hover, .nav__sub a[aria-current='page'] { background: none; border-color: var(--teal-500); color: var(--brand-ink); }
  .nav__langs { display: flex; gap: 8px; margin-top: 24px; }
  .nav__langs li > * { display: block; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; }
  .nav__langs [aria-current] { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle__open { display: none; }
  body.nav-open .nav-toggle__close { display: block; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--sand { background: var(--bg-alt); }
.shead { margin-bottom: clamp(32px, 4vw, 52px); max-width: 720px; }
.shead .lead { margin-top: 14px; }
.shead--center { margin-inline: auto; text-align: center; }
.shead--center .eyebrow { margin-inline: auto; }
.shead--center .lead { margin-inline: auto; }

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--cards, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid--3, .grid--cards { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Home hero (text + bento) ---------- */
.hero { position: relative; padding-block: clamp(36px, 5vw, 72px) clamp(56px, 7vw, 96px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset-block-start: -30%; inset-inline-start: -15%; width: 55%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(15, 168, 146, 0.12), transparent 70%);
}
.hero__grid { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: 1fr 1.05fr; gap: 56px; } }
.hero__text .lead { margin-top: 22px; }

.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(20px, 4vw, 48px); margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dd { margin: 0; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.stats dt { font-size: 0.8125rem; color: var(--text-3); }

.bento { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 250px 190px 128px; gap: 14px; }
.bento > * { border-radius: var(--r-lg); overflow: hidden; }
.bento img { width: 100%; height: 100%; object-fit: cover; }
.bento__tall { grid-row: span 2; }
.bento__card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-md); transition: transform 0.3s var(--ease);
}
.bento__card:hover { scale: 1.02; }
.bento__label { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 0.8125rem; color: var(--text-3); line-height: 1.45; }
.bento__label .icon { color: var(--brand-ink); margin-top: 2px; }
.bento__big { font-size: 2.25rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.bento__big small { font-size: 0.875rem; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.bento__dark {
  grid-column: span 2; display: flex; align-items: center; gap: 16px; padding: 22px 26px;
  background: var(--navy-900); color: #fff; position: relative;
}
.bento__dark::after { content: ''; position: absolute; inset-inline-end: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(28, 194, 207, 0.35), transparent); }
.bento__dark strong { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.01em; }
.bento__dark span { color: var(--on-deep-2); font-size: 0.875rem; }
@media (max-width: 640px) {
  .bento { grid-template-rows: 200px 150px auto; gap: 10px; }
  .bento__dark { flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px 20px; }
  .bento__dark strong { font-size: 1.3rem; }
  .bento__big { font-size: 1.75rem; }
  .bento__card { padding: 16px; }
}

/* ---------- Progress ---------- */
.progress { display: grid; gap: 10px; margin-block: 24px; }
.progress__row { display: flex; justify-content: space-between; color: var(--text-2); font-size: 0.9375rem; }
.progress__row strong { color: var(--text); }
.progress__bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress__bar > span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: var(--grad-bar); transform-origin: left; animation: grow 1.4s var(--ease) both 0.3s; }
[dir='rtl'] .progress__bar > span { transform-origin: right; background: linear-gradient(270deg, #0fa892, #1cc2cf); }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- Campaign ---------- */
.campaign { display: grid; gap: 40px; align-items: center; }
.campaign__media { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5; max-height: 620px; }
.campaign__media img { width: 100%; height: 100%; object-fit: cover; }
.campaign .shead { margin-bottom: 8px; }
.campaign .donate { margin-top: 8px; }
@media (min-width: 1024px) { .campaign { grid-template-columns: 0.9fr 1fr; gap: 64px; } }

/* ---------- Project cards ---------- */
.pcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.pcard { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); }
.pcard:hover { --ty: -6px; box-shadow: var(--shadow-lg); border-color: transparent; }
.pcard__media { position: relative; aspect-ratio: 16 / 11; overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--r-lg) - 6px); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.05); }
.pcard__icon {
  position: absolute; inset-inline-start: 12px; top: 12px; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.92); color: var(--teal-600); backdrop-filter: blur(6px);
}
.pcard__icon .icon { width: 20px; height: 20px; }
.pcard__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 20px; }
.pcard__body > p { color: var(--text-2); font-size: 0.9375rem; }
.pcard__link { text-decoration: none; }
.pcard__link:hover { color: var(--brand-ink); }
.pcard__price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; padding-top: 10px; font-size: 0.8125rem; color: var(--text-3); }
.pcard__price strong { font-size: 1.5rem; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
.pcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pcard__body > p:not(.pcard__price) + .pcard__actions { margin-top: auto; padding-top: 10px; }
.pcard__actions .btn { flex: 1; }

/* ---------- Ramadan ---------- */
.ramadan { background: var(--bg); }
.ramadan__motto { font-family: var(--f-quran); font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); margin-top: 6px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; margin-inline: auto; }
.ramadan .shead .lead { margin-top: 10px; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 16px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step { position: relative; display: grid; gap: 8px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.3s, box-shadow 0.3s; }
.step:hover { border-color: var(--brand-tint-2); box-shadow: var(--shadow-md); }
.step__num { position: absolute; inset-inline-end: 22px; top: 22px; font-size: 0.8125rem; font-weight: 600; color: var(--text-3); letter-spacing: 0.04em; }
.step__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; margin-bottom: 8px; box-shadow: var(--shadow-btn); }
.step p { color: var(--text-2); font-size: 0.9375rem; }
.steps--three { max-width: 1040px; margin-inline: auto; }
@media (min-width: 1024px) { .steps--three { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Scripture / verse bands ---------- */
.verse {
  position: relative; overflow: hidden; padding-block: clamp(64px, 8vw, 104px); text-align: center; color: #fff;
  background: radial-gradient(60% 120% at 50% 0%, rgba(28, 194, 207, 0.22), transparent 70%), radial-gradient(50% 100% at 90% 100%, rgba(15, 168, 146, 0.25), transparent 70%), var(--navy-900);
}
.verse--soft { padding-block: clamp(48px, 6vw, 80px); }
.verse__inner { max-width: 880px; }
.scripture { display: grid; justify-items: center; gap: 14px; }
.scripture__mark { color: #1cc2cf; }
.scripture__ar { margin: 0; font-family: var(--f-quran); font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.6rem); line-height: 1.7; font-weight: 700; }
.scripture__tr { font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.2rem); color: var(--on-deep-2); max-width: 56ch; font-weight: 300; }
.scripture figcaption { font-size: 0.8125rem; color: #5fd6c4; letter-spacing: 0.02em; }
.scripture--inline { justify-items: start; text-align: start; margin-top: 20px; padding: 20px 22px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text); }
.scripture--inline .scripture__ar { font-size: 1.35rem; }
.scripture--inline .scripture__tr { color: var(--text-2); font-size: 0.9375rem; }
.scripture--inline figcaption { color: var(--brand-ink); }
.scripture--inline .scripture__mark { display: none; }

/* ---------- Voices ---------- */
.voice { display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.voice__mark { color: var(--teal-500); }
.voice blockquote { margin: 0; font-size: 1.0625rem; line-height: 1.9; font-family: var(--f); }
.voice__tr { color: var(--text-2); font-size: 0.9375rem; font-weight: 300; border-inline-start: 2px solid var(--brand-tint-2); padding-inline-start: 14px; }
.voice figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.voice figcaption strong { display: block; font-weight: 600; }
.voice figcaption small { color: var(--text-3); font-size: 0.8125rem; }
.voice__avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 600; }

/* ---------- Countries ---------- */
.countries { display: flex; flex-wrap: wrap; gap: 10px; }
.countries li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.countries .icon { color: var(--brand-ink); }
.where .shead { margin-bottom: 28px; }

/* ---------- CTA band ---------- */
.cta { padding-block: 0 var(--section); }
.section--sand + .cta { padding-top: var(--section); background: var(--bg-alt); }
.cta__inner {
  position: relative; overflow: hidden; display: grid; gap: 28px; align-items: center;
  padding: clamp(32px, 5vw, 64px); border-radius: var(--r-xl); color: #fff;
  background: radial-gradient(60% 140% at 100% 0%, rgba(28, 194, 207, 0.35), transparent 60%), radial-gradient(50% 120% at 0% 100%, rgba(15, 168, 146, 0.4), transparent 60%), var(--navy-900);
}
.cta .h2 { color: #fff; }
.cta .lead { color: var(--on-deep-2); margin-top: 12px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .cta__inner { grid-template-columns: 1.4fr auto; } }

/* ---------- Inner page hero ---------- */
.phero { padding-block: clamp(24px, 4vw, 48px) clamp(48px, 6vw, 80px); }
.phero__grid { display: grid; gap: 32px; align-items: center; }
.phero .lead { margin-top: 18px; }
.phero__media { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16 / 11; }
.phero__media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .phero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; } .phero__media { aspect-ratio: 5 / 4; } }

.crumbs { margin-bottom: 24px; font-size: 0.8125rem; color: var(--text-3); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--brand-ink); }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }
.crumbs__sep { transform: rotate(-90deg); opacity: 0.5; }
[dir='rtl'] .crumbs__sep { transform: rotate(90deg); }

/* ---------- Split: content + donate ---------- */
.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 1024px) {
  .split { grid-template-columns: 1fr 420px; gap: 64px; }
  .split__aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Tiers (water) ---------- */
.tier { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.tier__media { aspect-ratio: 16 / 9; overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--r-lg) - 6px); }
.tier__media img { width: 100%; height: 100%; object-fit: cover; }
.tier__body { display: flex; flex-direction: column; gap: 12px; padding: 22px; flex: 1; }
.tier__price { font-size: 2.5rem; line-height: 1; font-weight: 700; letter-spacing: -0.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.tier .specs { margin-block: 6px 10px; }
.tier .btn { margin-top: auto; }

.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.specs__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.specs__item { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.specs__item .icon { grid-row: span 2; color: var(--brand-ink); }
.specs dt { font-size: 0.75rem; color: var(--text-3); }
.specs dd { margin: 0; font-weight: 600; font-size: 0.9375rem; }
.prose .specs { max-width: 640px; }

.checks { display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .icon { flex: none; margin-top: 3px; width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: var(--grad); color: #fff; }
html[lang='ar'] .checks .icon { margin-top: 6px; }

.receive { display: grid; gap: 12px; margin-top: 4px; }
.receive li { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.receive .icon { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-ink); }
.prose .receive { max-width: 560px; }

/* ---------- Donate panel ---------- */
.donate { display: grid; gap: 18px; padding: clamp(20px, 3vw, 28px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.donate--compact { box-shadow: var(--shadow-md); }
.dialog .donate { box-shadow: none; }
.donate__title { font-size: 1.2rem; font-weight: 600; }
.donate fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.chip { position: relative; display: grid; gap: 2px; align-content: center; min-height: 64px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.chip:hover { border-color: var(--teal-500); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip__amt { font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.chip__label { font-size: 0.75rem; color: var(--text-3); line-height: 1.35; }
.chip:has(input:checked) { border-color: var(--teal-600); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--teal-600); }
.chip:has(input:checked) .chip__amt { color: var(--brand-ink); }
.chip:has(input:focus-visible) { outline: 3px solid var(--aqua-500); outline-offset: 2px; }
.chip--custom { grid-column: 1 / -1; min-height: 50px; }
.chip--custom .chip__amt { font-size: 0.9375rem; font-weight: 600; }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--r-sm); background: var(--surface-2); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 10px; text-align: center; border-radius: 10px; font-weight: 600; font-size: 0.875rem; color: var(--text-3); transition: all 0.2s; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); }
.seg input:focus-visible + span { outline: 3px solid var(--aqua-500); }

.field { display: grid; gap: 8px; }
.field__label { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); }
.field input, .field__money { width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus, .field__money:focus-within { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 4px var(--brand-tint); }
.field__money { display: flex; align-items: center; gap: 8px; direction: ltr; }
.field__money span { font-weight: 700; color: var(--text-3); }
.field__money input { border: 0; padding: 0; min-height: 46px; box-shadow: none !important; background: transparent; }
.field[hidden] { display: none; }

.donate__summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--line-strong); color: var(--text-3); font-size: 0.9375rem; }
.donate__total { font-size: 1.75rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.donate__error { color: #c0262d; font-size: 0.875rem; font-weight: 500; }
:root[data-theme='dark'] .donate__error { color: #ff8a80; }
.donate__note { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8125rem; color: var(--text-3); line-height: 1.5; }
.donate__note .icon { margin-top: 2px; color: var(--brand-ink); }
.donate.is-shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Dialog ---------- */
.dialog { width: min(500px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(5, 13, 26, 0.5); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop 0.3s var(--ease); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.dialog .donate { border: 0; padding-top: 16px; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@media (max-width: 560px) { .dialog { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; } }

/* ---------- About ---------- */
.letter { display: grid; gap: 40px; align-items: start; }
.letter__portrait { max-width: 320px; }
/* The source is a screenshot with a white margin and a baked-in shadow; zoom past both. */
.letter__frame { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-xl); background: var(--surface-2); }
.letter__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); transform-origin: 42% 38%; }
.letter__portrait figcaption { display: grid; margin-top: 16px; }
.letter__portrait figcaption strong { font-weight: 600; }
.letter__portrait figcaption span { color: var(--text-3); font-size: 0.875rem; }
.letter__sign { color: var(--text) !important; font-weight: 500; }
@media (min-width: 900px) { .letter { grid-template-columns: 320px 1fr; gap: 64px; } }

.panel { padding: clamp(24px, 3vw, 32px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.panel .h3 { margin-block: 16px 12px; }
.panel > p { color: var(--text-2); }
.panel__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: var(--shadow-btn); }

.license { display: flex; gap: 16px; align-items: center; margin-top: 36px; padding: 20px 24px; max-width: 640px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--brand-ink); }
.license p { color: var(--text-2); }
.license strong { color: var(--text); font-weight: 600; }

/* ---------- Initiatives ---------- */
.promise { align-items: center; gap: clamp(32px, 6vw, 64px); }
.promise__media { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5; max-height: 560px; }
.promise__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-950); color: var(--on-deep-2); padding-block: 72px 0; font-size: 0.9375rem; }
.footer__grid { display: grid; gap: 40px; }
.footer__brand img { height: 46px; width: auto; margin-bottom: 18px; }
.footer__brand p { max-width: 40ch; }
.footer__license { display: flex; gap: 10px; align-items: center; margin-top: 18px; color: #fff; }
.footer__title { font-size: 0.875rem; font-weight: 600; color: #fff; margin-bottom: 18px; }
.footer__col ul { display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__contact li, .footer__contact a { display: flex; gap: 10px; align-items: center; }
.footer__contact .icon { color: #5fd6c4; }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.8125rem; }
.footer__base p { display: inline-flex; align-items: center; gap: 8px; }
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.6fr repeat(4, 1fr); } }

/* ---------- Floating actions ---------- */
.fab {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 40; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 18px; background: #25d366; color: #fff;
  box-shadow: 0 12px 28px -8px rgba(37, 211, 102, 0.6); transition: transform 0.25s var(--ease), bottom 0.3s var(--ease);
}
.fab:hover { transform: translateY(-2px) scale(1.04); }
.sticky-donate { display: none; }
@media (max-width: 1023px) {
  .sticky-donate {
    display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 39;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 0.35s var(--ease);
  }
  .sticky-donate.is-visible { transform: none; }
  body.has-sticky.sticky-on .fab { bottom: 88px; }
  body.has-sticky .footer { padding-bottom: 72px; }
}

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity 0.8s var(--ease), translate 0.8s var(--ease), transform 0.45s var(--ease), box-shadow 0.35s, border-color 0.35s; }
.js .reveal.is-in { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; translate: none; }
}

@media print {
  .topbar, .header, .fab, .sticky-donate, .cta, .donate, .dialog { display: none !important; }
  body { background: #fff; color: #000; }
}

/* =====================================================================
   Motion & micro-interactions
   Everything below is decorative; prefers-reduced-motion (above) cuts it to the end state.
   ===================================================================== */

@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(22px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { translate: 0 -8px; } }
@keyframes drift { to { transform: translate(10%, 12%) scale(1.2); } }
@keyframes shine { to { background-position: 300% 0; } }
@keyframes kenburns { from { scale: 1; } to { scale: 1.12; } }
@keyframes chip-pop { 40% { scale: 1.05; } }
@keyframes bump { 40% { scale: 1.12; color: var(--brand-ink); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes marquee { to { translate: -100% 0; } }
@keyframes marquee-rtl { to { translate: 100% 0; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(15, 168, 146, 0.45); } 100% { box-shadow: 0 0 0 10px rgba(15, 168, 146, 0); } }

/* Hero: staggered entrance, drifting light, slow photo zoom, floating campaign card. */
.hero::before { animation: drift 16s ease-in-out infinite alternate; }
.hero::after {
  content: ''; position: absolute; inset-block-end: -35%; inset-inline-end: -12%; width: 48%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(28, 194, 207, 0.14), transparent 70%); animation: drift 21s ease-in-out infinite alternate-reverse;
}
.hero__grid { z-index: 1; }
.js .hero__text > *, .js .phero__text > * { animation: rise 0.9s var(--ease) both; }
.js :is(.hero__text, .phero__text) > :nth-child(1) { animation-delay: 0.05s; }
.js :is(.hero__text, .phero__text) > :nth-child(2) { animation-delay: 0.15s; }
.js :is(.hero__text, .phero__text) > :nth-child(3) { animation-delay: 0.28s; }
.js :is(.hero__text, .phero__text) > :nth-child(4) { animation-delay: 0.4s; }
.js :is(.hero__text, .phero__text) > :nth-child(5) { animation-delay: 0.52s; }
.js :is(.hero__text, .phero__text) > :nth-child(6) { animation-delay: 0.64s; }
.js .bento > *, .js .phero__media { animation: pop-in 1s var(--ease) both; }
.js .bento > :nth-child(1) { animation-delay: 0.25s; }
.js .bento > :nth-child(2) { animation-delay: 0.38s; }
.js .bento > :nth-child(3) { animation: pop-in 1s var(--ease) 0.5s both, float 7s ease-in-out 1.8s infinite; }
.js .bento > :nth-child(4) { animation-delay: 0.62s; }
.js .phero__media { animation-delay: 0.2s; }
.bento__tall img, .bento__photo img, .phero__media img { animation: kenburns 22s ease-in-out infinite alternate; }
.badge__dot { animation: ping 1.8s ease-out infinite; }

/* Scroll progress bar. */
.scrollbar { position: fixed; inset-inline: 0; top: 0; z-index: 70; height: 3px; pointer-events: none; }
.scrollbar span { display: block; height: 100%; background: var(--grad-bar); transform: scaleX(var(--s, 0)); transform-origin: left; }
[dir='rtl'] .scrollbar span { transform-origin: right; }

/* Primary buttons: a light sweep on hover. */
.btn--primary::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  translate: -120% 0; transition: translate 0.8s var(--ease);
}
[dir='rtl'] .btn--primary::after { translate: 120% 0; }
.btn--primary:hover::after { translate: 120% 0; }
[dir='rtl'] .btn--primary:hover::after { translate: -120% 0; }
.btn:active { scale: 0.97; }

/* Images fade in over a shimmer while they load. */
.js .photo { opacity: 0; transition: opacity 0.7s var(--ease); }
.js .photo.is-loaded { opacity: 1; }
.js :is(.bento__tall, .bento__photo, .pcard__media, .phero__media, .campaign__media, .tier__media, .promise__media):has(.photo:not(.is-loaded)) {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}

/* Progress bars fill when they scroll into view. */
.js .progress__bar > span { animation: none; scale: 0 1; transition: scale 1.6s var(--ease) 0.2s; }
.js .progress__bar.is-in > span { scale: 1 1; }

/* Card + step micro-interactions. */
.pcard, .tier, .step, .panel, .voice { transition: transform 0.45s var(--ease), box-shadow 0.35s, border-color 0.35s, opacity 0.8s var(--ease), translate 0.8s var(--ease); }
.step__icon, .panel__icon { transition: transform 0.4s var(--ease); }
.step:hover .step__icon, .panel:hover .panel__icon { transform: rotate(-8deg) scale(1.08); }
.pcard__icon { transition: transform 0.4s var(--ease); }
.pcard:hover .pcard__icon { transform: scale(1.1); }
.chip:has(input:checked) { animation: chip-pop 0.35s var(--ease); }
.donate__total.bump { animation: bump 0.4s var(--ease); }
.countries li { transition: border-color 0.2s, translate 0.2s; }
.countries li:hover { border-color: var(--teal-500); translate: 0 -2px; }

/* Countries marquee (home). Two identical tracks loop seamlessly; hover pauses. */
.marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .countries { flex: none; flex-wrap: nowrap; padding-inline-end: 10px; animation: marquee 32s linear infinite; }
[dir='rtl'] .marquee .countries { animation-name: marquee-rtl; }
.marquee:hover .countries { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; }
  .marquee .countries { flex-wrap: wrap; animation: none; }
  .marquee .countries[aria-hidden] { display: none; }
}

/* Testimonials become a swipeable carousel on phones. */
@media (max-width: 639px) {
  .voices { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 18px; scrollbar-width: none; }
  .voices::-webkit-scrollbar { display: none; }
  .voice { flex: 0 0 86%; scroll-snap-align: center; }
}

/* Back to top + toast. */
.totop {
  position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 40; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-md); cursor: pointer; opacity: 0; translate: 0 16px; pointer-events: none;
  transition: opacity 0.3s, translate 0.3s var(--ease), bottom 0.3s var(--ease);
}
.totop.is-visible { opacity: 1; translate: none; pointer-events: auto; }
.totop .icon { rotate: -90deg; }
[dir='rtl'] .totop .icon { rotate: -90deg; transform: none; }
@media (max-width: 1023px) { body.has-sticky.sticky-on .totop { bottom: 88px; } }
.toast {
  position: fixed; inset-inline: 0; bottom: 28px; z-index: 80; width: fit-content; max-width: calc(100% - 32px); margin-inline: auto;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
  background: var(--navy-900); color: #fff; font-size: 0.9375rem; box-shadow: var(--shadow-lg);
  opacity: 0; translate: 0 20px; pointer-events: none; transition: opacity 0.3s, translate 0.4s var(--ease);
}
.toast.is-visible { opacity: 1; translate: none; }
.toast .icon { color: #5fd6c4; }

/* Smooth cross-page transitions where supported (same-origin navigations). */
@view-transition { navigation: auto; }
.header { view-transition-name: site-header; }
::view-transition-old(root) { animation: 0.22s var(--ease) both vt-out; }
::view-transition-new(root) { animation: 0.4s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* =====================================================================
   Opening intro (home page, first visit). Controlled by the inline script in layout.mjs:
   html.intro while it plays, html.intro-leaving while the curtain lifts.
   ===================================================================== */
.intro-overlay { display: none; }
html.intro, html.intro body { overflow: hidden; }
:is(html.intro, html.intro-leaving) .intro-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 24px;
  color: #fff; text-align: center; cursor: pointer;
  background:
    radial-gradient(40% 50% at 50% 42%, rgba(32, 208, 208, 0.18), transparent 70%),
    radial-gradient(70% 70% at 50% 50%, #10345a 0%, #0b1b33 55%, #050d1a 100%);
}
.intro__logo { width: min(260px, 62vw); height: auto; animation: intro-logo 1.1s var(--ease) 0.1s both; }
.intro__verse { margin: 0; font-family: var(--f-quran); font-size: clamp(1.4rem, 1rem + 2.2vw, 2.4rem); font-weight: 700; line-height: 1.8; }
.intro__verse span { display: inline-block; animation: intro-word 0.8s var(--ease) both; animation-delay: calc(0.75s + var(--i) * 0.13s); }
.intro__tr { margin: -10px 0 0; max-width: 36ch; color: #a9b6c8; font-size: 0.95rem; font-weight: 300; animation: intro-word 0.8s var(--ease) 1.45s both; }
.intro__line { position: relative; width: 168px; height: 2px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.12); }
.intro__line::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #20d0d0, #08f0a8); transform-origin: left; animation: intro-load 2.3s cubic-bezier(0.65, 0, 0.35, 1) both; }
[dir='rtl'] .intro__line::after { transform-origin: right; }
.intro__skip { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); inset-inline: 0; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.45); animation: intro-word 0.6s ease 1s both; }

/* The curtain lifts upward; the logo and verse drift up a little faster for depth. */
html.intro-leaving .intro-overlay { animation: intro-out 0.85s cubic-bezier(0.76, 0, 0.24, 1) forwards; pointer-events: none; }
html.intro-leaving .intro-overlay > * { animation: intro-content-out 0.6s cubic-bezier(0.76, 0, 0.24, 1) forwards; }

/* The page's own hero entrance waits behind the curtain, then plays as it lifts. */
html.intro :is(.hero__text > *, .bento > *, .header) { animation-play-state: paused; }
html.intro .header { opacity: 0; }
html.intro-leaving .header { animation: rise 0.8s var(--ease) 0.25s both; }

@keyframes intro-logo { from { opacity: 0; transform: scale(0.82); filter: blur(12px); } to { opacity: 1; transform: none; filter: blur(0) drop-shadow(0 0 28px rgba(32, 208, 208, 0.35)); } }
@keyframes intro-word { from { opacity: 0; transform: translateY(14px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes intro-load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes intro-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }
@keyframes intro-content-out { to { opacity: 0; transform: translateY(-40px); } }

/* Handoff from the root intro ("/"): show the intro's final frame instantly, then lift. */
html.intro-handoff .intro-overlay *, html.intro-handoff .intro-overlay *::after { animation: none !important; }
html.intro-handoff .intro__logo { filter: drop-shadow(0 0 28px rgba(32, 208, 208, 0.35)); }

/* =====================================================================
   Premium pass: impact slider · world map · FAQ · phone tab bar
   ===================================================================== */
:root { interpolate-size: allow-keywords; }

/* ---------- "What does your gift do?" ---------- */
.impact__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .impact__grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.impact__media { position: relative; aspect-ratio: 5 / 4; border-radius: var(--r-xl); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-lg); }
.impact__img { position: absolute; inset: 0; opacity: 0; scale: 1.06; transition: opacity 0.8s var(--ease), scale 1.4s var(--ease); }
.impact__img.is-active { opacity: 1; scale: 1; }
.impact__img img { width: 100%; height: 100%; object-fit: cover; }
.impact__chip {
  position: absolute; inset-inline-start: 16px; bottom: 16px; display: grid; gap: 2px; padding: 12px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(12px); color: var(--navy-900); box-shadow: var(--shadow-md);
}
.impact__chip span { font-size: 0.75rem; color: #4b5a70; }
.impact__chip strong { font-size: 1.6rem; line-height: 1.1; letter-spacing: -0.02em; }
.impact__card { padding: clamp(20px, 3vw, 28px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.impact__amount { font-size: clamp(2.6rem, 2rem + 2.4vw, 3.75rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin-bottom: 12px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.impact__text { color: var(--text-2); margin-top: 8px; }
.impact__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.impact__facts li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--brand-tint); color: var(--brand-ink); font-size: 0.8125rem; font-weight: 500; }
.impact__card.is-swapping > * { animation: swap-in 0.5s var(--ease) both; }
.impact__card.is-swapping > :nth-child(2) { animation-delay: 0.04s; }
.impact__card.is-swapping > :nth-child(3) { animation-delay: 0.08s; }
.impact__card.is-swapping > :nth-child(4) { animation-delay: 0.12s; }
@keyframes swap-in { from { opacity: 0; translate: 0 10px; } }

.impact__slider { margin: 28px 0 26px; }
.impact__slider input {
  --track: var(--surface-2); --dir: 90deg;
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px; margin: 10px 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(var(--dir), #0fa892 0%, #1cc2cf var(--fill), var(--track) var(--fill));
}
[dir='rtl'] .impact__slider input { --dir: 270deg; }
.impact__slider input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 7px solid var(--teal-600);
  box-shadow: 0 6px 16px -4px rgba(10, 133, 115, 0.7); transition: scale 0.2s var(--ease);
}
.impact__slider input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 7px solid var(--teal-600); box-shadow: 0 6px 16px -4px rgba(10, 133, 115, 0.7); }
.impact__slider input:active::-webkit-slider-thumb { scale: 1.15; }
.impact__slider input:focus-visible { outline: 3px solid var(--aqua-500); outline-offset: 6px; }
.impact__ticks { display: flex; justify-content: space-between; margin-top: 6px; }
.impact__ticks button { padding: 4px 2px; border: 0; background: none; color: var(--text-3); font-size: 0.8125rem; font-weight: 500; cursor: pointer; transition: color 0.2s; }
.impact__ticks button:hover { color: var(--text); }
.impact__ticks button[aria-current] { color: var(--brand-ink); font-weight: 700; }

/* ---------- World map ---------- */
.mapcard {
  position: relative; overflow: hidden; display: grid; gap: 32px; padding: clamp(28px, 4vw, 56px); border-radius: var(--r-xl); color: #fff;
  background: radial-gradient(60% 90% at 72% 40%, rgba(20, 163, 139, 0.22), transparent 62%), radial-gradient(40% 60% at 0% 100%, rgba(28, 194, 207, 0.14), transparent 70%), var(--navy-900);
}
@media (min-width: 1024px) { .mapcard { grid-template-columns: 0.78fr 1.5fr; align-items: center; gap: 40px; } }
.mapcard .h2 { color: #fff; }
.mapcard .lead { color: var(--on-deep-2); margin-top: 14px; }
.mapcard .eyebrow { background: rgba(255, 255, 255, 0.08); color: #5fd6c4; }
.maplist { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 22px; margin-top: 26px; font-size: 0.9375rem; color: #dbe4ef; }
.maplist li { display: flex; align-items: center; gap: 8px; }
.maplist i { width: 7px; height: 7px; border-radius: 99px; background: #08f0a8; box-shadow: 0 0 10px #08f0a8; }
.worldmap { position: relative; aspect-ratio: 160 / 82; margin: 0; }
.worldmap img { width: 100%; height: 100%; display: block; }
.worldmap__fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.worldmap__arc { fill: none; stroke: url(#arcGrad); stroke-width: 0.38; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) calc(0.35s + var(--i) * 0.14s); }
.mapcard.is-in .worldmap__arc, html:not(.js) .worldmap__arc { stroke-dashoffset: 0; }
/* Pins use physical left/top: geography does not mirror in RTL. */
.worldmap__pin, .worldmap__hq { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; display: grid; place-items: center; width: 26px; height: 26px; }
.worldmap__pin i, .worldmap__hq i { position: relative; width: 9px; height: 9px; border-radius: 99px; background: #08f0a8; box-shadow: 0 0 0 3px rgba(8, 240, 168, 0.18), 0 0 14px #08f0a8; scale: 0; transition: scale 0.5s var(--ease) calc(1.2s + var(--i) * 0.14s); }
.worldmap__pin i::after { content: ''; position: absolute; inset: -6px; border-radius: 99px; border: 1px solid rgba(8, 240, 168, 0.6); animation: ring 2.6s ease-out infinite; animation-delay: calc(var(--i) * 0.3s); }
.worldmap__hq i { width: 13px; height: 13px; background: #fff; box-shadow: 0 0 0 4px rgba(32, 208, 208, 0.35), 0 0 22px #20d0d0; transition-delay: 0.2s; }
.mapcard.is-in :is(.worldmap__pin, .worldmap__hq) i, html:not(.js) :is(.worldmap__pin, .worldmap__hq) i { scale: 1; }
.worldmap__pin b, .worldmap__hq b {
  position: absolute; bottom: calc(100% + 2px); left: 50%; translate: -50% 4px; white-space: nowrap; padding: 3px 9px; border-radius: 8px;
  background: rgba(5, 13, 26, 0.85); border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; font-size: 0.75rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, translate 0.2s var(--ease);
}
.worldmap__pin:hover b { opacity: 1; translate: -50% 0; }
.mapcard.is-in .worldmap__hq b, html:not(.js) .worldmap__hq b { opacity: 1; translate: -50% 0; transition-delay: 0.9s; }
@keyframes ring { 0% { scale: 0.6; opacity: 1; } 100% { scale: 2.4; opacity: 0; } }
@media (max-width: 640px) { .maplist { grid-template-columns: repeat(2, auto); } .worldmap__hq b { font-size: 0.6875rem; } }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .faq__grid { grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; } .faq__head { position: sticky; top: calc(var(--header-h) + 32px); } }
.faq__ask { display: grid; gap: 14px; justify-items: start; margin-top: 4px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.faq__ask p { color: var(--text-2); }
.faq__list { display: grid; gap: 12px; }
.faq__item { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.3s, box-shadow 0.3s; }
.faq__item[open] { border-color: var(--brand-tint-2); box-shadow: var(--shadow-md); }
.faq__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 600; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--brand-ink); }
.faq__icon { position: relative; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--brand-tint); transition: background 0.3s, rotate 0.4s var(--ease); }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; inset: 0; margin: auto; width: 12px; height: 2px; border-radius: 2px; background: var(--brand-ink); transition: rotate 0.4s var(--ease), background 0.3s; }
.faq__icon::after { rotate: 90deg; }
.faq__item[open] .faq__icon { background: var(--grad); rotate: 180deg; }
.faq__item[open] .faq__icon::before, .faq__item[open] .faq__icon::after { background: #fff; }
.faq__item[open] .faq__icon::after { rotate: 0deg; }
.faq__a { padding: 0 22px 20px; color: var(--text-2); }
.faq__item::details-content { block-size: 0; overflow: clip; transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete; }
.faq__item[open]::details-content { block-size: auto; }

/* ---------- Phone tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: 4px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(11, 27, 51, 0.35);
  }
  .tabbar__item, .tabbar__donate {
    position: relative; display: grid; justify-items: center; align-content: end; gap: 3px; min-height: 54px; padding: 6px 2px 2px;
    border: 0; background: none; color: var(--text-3); font: inherit; font-size: 0.6875rem; font-weight: 500; text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: color 0.2s;
  }
  .tabbar__item[aria-current] { color: var(--brand-ink); }
  .tabbar__item[aria-current]::before { content: ''; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad-bar); }
  .tabbar__item .icon { transition: scale 0.2s var(--ease); }
  .tabbar__item:active .icon, .tabbar__donate:active .tabbar__fab { scale: 0.9; }
  .tabbar__donate { color: var(--brand-ink); font-weight: 600; }
  .tabbar__fab {
    display: grid; place-items: center; width: 54px; height: 54px; margin-top: -28px; border-radius: 18px; background: var(--grad); color: #fff;
    box-shadow: var(--shadow-btn), 0 0 0 5px var(--bg); transition: scale 0.2s var(--ease);
  }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .fab, .totop { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .fab { width: 50px; height: 50px; border-radius: 16px; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .header__donate { display: none; }
  .sticky-donate { display: none !important; }
  /* Bottom-sheet dialogs get a grab handle. */
  .dialog::before { content: ''; display: block; width: 40px; height: 5px; margin: 10px auto 0; border-radius: 99px; background: var(--line-strong); }
}

/* Phones: the top bar keeps only the WhatsApp number (the selector must beat .topbar p),
   and the tab bar makes the back-to-top button redundant. */
@media (max-width: 760px) { .topbar .topbar__license { display: none; } }
@media (max-width: 900px) { .totop { display: none; } .fab { width: 48px; height: 48px; } }

/* Phones: the menu panel stops above the tab bar so the tab bar (with Menu active) stays visible. */
@media (max-width: 900px) { .nav { bottom: calc(66px + env(safe-area-inset-bottom)); } }

@media (max-width: 900px) {
  .tabbar { z-index: 55; }
  body.nav-open .tabbar__item[aria-current] { color: var(--text-3); }
  body.nav-open .tabbar__item[aria-current]::before { display: none; }
  body.nav-open [data-tab-menu] { color: var(--brand-ink); }
}

/* =====================================================================
   Funding bars ("$500 of $1,000 · 5 donors · $500 remaining")
   Filled by site.js; .is-loading shows a skeleton, .is-done the fully-funded state.
   ===================================================================== */
.fund { --pct: 0; display: grid; gap: 10px; margin-top: 4px; }
.fund__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fund__raised { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fund__pct {
  display: inline-grid; place-items: center; min-width: 46px; padding: 2px 10px; border-radius: 99px;
  background: var(--brand-tint); color: var(--brand-ink); font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fund__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.8125rem; color: var(--text-3); }
.fund__meta [data-f='donors'] { display: inline-flex; align-items: center; gap: 8px; }
.fund__meta [data-f='remaining'] { font-weight: 500; }

/* The bar: thicker track, flowing gradient, a moving shine and a glowing tip. */
.fund .progress__bar { position: relative; height: 10px; overflow: visible; background: var(--surface-2); box-shadow: inset 0 1px 2px rgba(11, 27, 51, 0.06); }
.fund .progress__bar > span {
  position: relative; overflow: hidden; scale: 1 1 !important;
  width: var(--p); min-width: 0; transition: width 1.4s var(--ease) 0.15s;
  background: linear-gradient(90deg, #0a8f7e, #0fa892, #1cc2cf, #0fa892, #0a8f7e); background-size: 300% 100%;
  animation: fund-flow 6s linear infinite;
}
[dir='rtl'] .fund .progress__bar > span { margin-inline-start: 0; background-image: linear-gradient(270deg, #0a8f7e, #0fa892, #1cc2cf, #0fa892, #0a8f7e); }
.fund .progress__bar > span::before {
  content: ''; position: absolute; inset: 0; translate: -100% 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  animation: fund-shine 2.8s ease-in-out 1.6s infinite;
}
[dir='rtl'] .fund .progress__bar > span::before { animation-name: fund-shine-rtl; }
.fund .progress__bar > span::after {
  content: ''; position: absolute; inset-block: -3px; inset-inline-end: -3px; width: 16px; border-radius: 99px;
  background: #fff; border: 3px solid #1cc2cf; box-shadow: 0 0 0 4px rgba(28, 194, 207, 0.18), 0 0 14px rgba(28, 194, 207, 0.65);
}
.fund[style*='--pct: 0;'] .progress__bar > span::after, .fund.is-loading .progress__bar > span::after { display: none; }
@keyframes fund-flow { to { background-position: 300% 0; } }
@keyframes fund-shine { 0% { translate: -100% 0; } 60%, 100% { translate: 100% 0; } }
@keyframes fund-shine-rtl { 0% { translate: 100% 0; } 60%, 100% { translate: -100% 0; } }

/* Donor "faces": a small stack of gradient bubbles before the donor count. */
.fund__faces { display: inline-flex; }
.fund__faces i {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface);
  background: linear-gradient(135deg, hsl(calc(165 + var(--i) * 18) 70% 45%), hsl(calc(185 + var(--i) * 18) 75% 55%));
  animation: face-in 0.5s var(--ease) both; animation-delay: calc(0.6s + var(--i) * 0.12s);
}
.fund__faces i + i { margin-inline-start: -8px; }
@keyframes face-in { from { opacity: 0; scale: 0.4; } }

/* Fully funded: gold-teal check badge and a soft sparkle on the bar. */
.fund.is-done .fund__pct { background: linear-gradient(135deg, #0a8573, #12b3a0); color: #fff; box-shadow: 0 6px 14px -6px rgba(10, 133, 115, 0.8); }
.fund.is-done .fund__pct::before { content: '✓'; margin-inline-end: 4px; }
.fund.is-done [data-f='remaining'] { color: var(--brand-ink); font-weight: 700; }
.fund.is-done .progress__bar > span::after { border-color: #f5b83d; box-shadow: 0 0 0 4px rgba(245, 184, 61, 0.22), 0 0 16px rgba(245, 184, 61, 0.8); animation: sparkle 2s ease-in-out infinite; }
@keyframes sparkle { 50% { scale: 1.25; } }

/* Skeleton while the numbers load. */
.fund.is-loading :is(.fund__raised, [data-f='donors']) {
  min-width: 110px; border-radius: 8px; color: transparent;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.fund.is-loading .fund__pct { visibility: hidden; }

/* Sizes: compact on cards, large in the campaign section. */
.fund--sm { gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fund--sm .fund__raised { font-size: 0.875rem; }
.fund--sm .progress__bar { height: 8px; }
.fund--sm .fund__faces i { width: 18px; height: 18px; }
.fund--lg { gap: 12px; margin: 20px 0 8px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.fund--lg .fund__raised { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); }
.fund--lg .fund__pct { font-size: 1rem; padding: 4px 14px; }
.fund--lg .progress__bar { height: 14px; }
.fund--lg .fund__meta { font-size: 0.9375rem; }
.donate .fund { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); }
.donate .fund .progress__bar { background: var(--surface); }
.pcard__price + .fund--sm { margin-top: -2px; }

.fund__pct { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.fund__faces i { display: block; flex: none; }

/* =====================================================================
   "From the field" gallery + full-screen viewer (photos uploaded in /admin/)
   ===================================================================== */
.gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; grid-auto-flow: dense; gap: 12px; }
@media (min-width: 760px) { .gallery__grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 14px; } }
/* Every 6th photo (starting with the first) is a large 2x2 tile, for an editorial rhythm. */
.gallery__item:nth-child(6n + 1) { grid-column: span 2; grid-row: span 2; }
.gallery__grid.is-few { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-auto-rows: 280px; }
.gallery__grid.is-few .gallery__item { grid-column: auto; grid-row: auto; }
.gallery__item {
  position: relative; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; cursor: zoom-in;
  background: var(--surface-2); animation: pop-in 0.7s var(--ease) both; animation-delay: calc(min(var(--i), 8) * 0.06s);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale 0.6s var(--ease), filter 0.4s; }
.gallery__item::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(11, 27, 51, 0.45), transparent 50%); opacity: 0; transition: opacity 0.3s;
}
.gallery__item:hover img { scale: 1.06; }
.gallery__item:hover::after { opacity: 1; }
.gallery__item:focus-visible { outline: 3px solid var(--aqua-500); outline-offset: 3px; }

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(5, 13, 26, 0.94); color: #fff; overscroll-behavior: contain;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; animation: lb-in 0.3s var(--ease); }
.lightbox__stage { position: relative; margin: 0; height: 100%; display: grid; place-items: center; padding: 64px 8px 56px; min-width: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); opacity: 0; scale: 0.97; transition: opacity 0.35s, scale 0.45s var(--ease); user-select: none; -webkit-user-drag: none; }
.lightbox__stage img.is-in { opacity: 1; scale: 1; }
.lightbox__count { position: absolute; bottom: 18px; inset-inline: 0; text-align: center; font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }
.lightbox__close, .lightbox__nav {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: #fff; backdrop-filter: blur(8px);
  transition: background 0.2s, scale 0.2s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox__nav:active { scale: 0.92; }
.lightbox__close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; }
.lightbox__nav { margin: 0 16px; }
.lightbox.is-single .lightbox__nav { visibility: hidden; }
body.lb-open { overflow: hidden; }
@keyframes lb-in { from { opacity: 0; } }
@media (max-width: 640px) {
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 10px; width: 46px; height: 46px; margin: 0; z-index: 2; }
  .lightbox__nav--prev { inset-inline-start: 14px; }
  .lightbox__nav--next { inset-inline-end: 14px; }
  .lightbox__stage { padding: 64px 0 72px; }
  .lightbox__count { bottom: 24px; }
}

/* ---------- Fully funded: donations closed ---------- */
.btn.is-closed {
  cursor: not-allowed; transform: none; filter: none; box-shadow: none;
  background: var(--brand-tint); color: var(--brand-ink); border-color: var(--brand-tint-2);
}
.btn.is-closed > * { display: none; }
.btn.is-closed::before { content: attr(data-closed-label); font-weight: 700; }
.btn.is-closed::after { display: none; }
.donate.is-closed > :not(.donate__title, .fund, .donate__closed) { display: none; }
.donate__closed {
  display: grid; justify-items: center; gap: 8px; padding: 22px 18px; border-radius: var(--r-md); text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(15, 168, 146, 0.14), transparent 70%), var(--surface-2);
  border: 1px solid var(--brand-tint-2); animation: pop-in 0.6s var(--ease) both;
}
.donate__closed-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; font-size: 1.5rem; font-weight: 700;
  background: var(--grad); box-shadow: 0 0 0 6px var(--brand-tint), 0 10px 24px -8px rgba(10, 133, 115, 0.8);
}
.donate__closed strong { font-size: 1.15rem; color: var(--text); }
.donate__closed p { color: var(--text-2); font-size: 0.9375rem; max-width: 34ch; }
.donate__closed .btn { margin-top: 6px; }

/* Buttons whose label is a bare text node: hide it via font-size and show only the funded label. */
.btn.is-closed { font-size: 0 !important; }
.btn.is-closed::before { font-size: 0.875rem; }
.btn--lg.is-closed::before { font-size: 1rem; }

/* ---------- Projects added in /admin/ ---------- */
.btn.is-closed { pointer-events: none; }
/* No photo yet: a calm branded placeholder instead of an unrelated stock image. */
:is(.pcard__media, .phero__media).pcard__media--empty, .phero__media--empty {
  background: radial-gradient(70% 90% at 70% 20%, rgba(28, 194, 207, 0.35), transparent 60%), linear-gradient(135deg, #0b1b33, #0a6e5f);
}
:is(.pcard__media--empty, .phero__media--empty) img { visibility: hidden; }
.pcard__media--empty::after, .phero__media--empty::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 34%; aspect-ratio: 1; pointer-events: none; opacity: 0.9;
  background: url('icons/icon-512.png') center / contain no-repeat; mix-blend-mode: screen;
}
.phero__media--empty { position: relative; }
.custom-loading { padding-block: clamp(48px, 8vw, 96px); }
.custom-loading .wrap { display: grid; gap: 16px; }
.custom-loading span { display: block; height: 22px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.custom-loading span:first-child { height: 48px; width: min(520px, 80%); }
.custom-loading span:nth-child(2) { width: min(680px, 95%); }
.custom-loading span:nth-child(3) { height: 320px; border-radius: var(--r-xl); }
.custom-missing { display: grid; justify-items: center; gap: 16px; text-align: center; padding-block: 40px; }
.custom-missing__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: var(--brand-tint); color: var(--brand-ink); }
.custom-missing .lead { margin-inline: auto; }

.pcard__media--empty, .phero__media--empty {
  background: radial-gradient(70% 90% at 70% 20%, rgba(28, 194, 207, 0.35), transparent 60%), linear-gradient(135deg, #0b1b33, #0a6e5f) !important;
  animation: none !important;
}

/* ---------- Visitor feedback ---------- */
.voices__cta { display: flex; justify-content: center; margin-top: 28px; }
.voices__cta .icon { color: var(--brand-ink); }
.voice--visitor { animation: pop-in 0.6s var(--ease) both; }
.feedback-form textarea { width: 100%; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); font: inherit; color: var(--text); resize: vertical; min-height: 110px; }
.feedback-form textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 4px var(--brand-tint); }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.feedback-done { display: grid; justify-items: center; gap: 12px; padding: 24px 24px 32px; text-align: center; }
.feedback-done[hidden] { display: none; }
.feedback-done .icon { width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: 0 0 0 6px var(--brand-tint); }
.feedback-done p { color: var(--text-2); max-width: 34ch; }

/* ---------- 404 ---------- */
.nf { position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 96px) var(--section); text-align: center; }
.nf::before {
  content: ''; position: absolute; inset-block-start: -30%; inset-inline: 0; margin: auto; width: min(900px, 120%); aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(15, 168, 146, 0.16), transparent 70%); animation: drift 14s ease-in-out infinite alternate;
}
.nf__inner { position: relative; display: grid; justify-items: center; gap: 18px; }
.nf__art { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 18px); direction: ltr; margin-bottom: 6px; }
.nf__num {
  font-size: clamp(6rem, 4rem + 12vw, 13rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.04em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise 0.9s var(--ease) both;
}
.nf__num:last-child { animation-delay: 0.15s; }
.nf__mark {
  display: grid; place-items: center; width: clamp(5.5rem, 3.5rem + 10vw, 11rem); aspect-ratio: 1; border-radius: 32%;
  box-shadow: 0 30px 60px -24px rgba(10, 133, 115, 0.6); animation: pop-in 0.9s var(--ease) 0.08s both, float 6s ease-in-out 1.2s infinite;
}
.nf__mark img { width: 100%; height: 100%; border-radius: inherit; }
.nf .lead { max-width: 52ch; margin-inline: auto; }
.nf__actions { justify-content: center; margin-top: 8px; }
.nf__links { display: grid; gap: 12px; width: min(100%, 760px); margin-top: 28px; text-align: start; }
@media (min-width: 640px) { .nf__links { grid-template-columns: 1fr 1fr; } }
.nf__links a {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-md); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); transition: border-color 0.2s, translate 0.25s var(--ease), box-shadow 0.25s;
}
.nf__links a:hover { border-color: var(--brand-tint-2); translate: 0 -2px; box-shadow: var(--shadow-md); }
.nf__links a > .icon:last-child { margin-inline-start: auto; color: var(--text-3); }
.nf__links strong { display: block; font-weight: 600; }
.nf__links small { color: var(--text-3); font-size: 0.8125rem; }
.nf__icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--brand-tint); color: var(--brand-ink); }
.nf__langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 18px; font-size: 0.875rem; }
.nf__langs a { color: var(--text-3); text-decoration: none; }
.nf__langs a:hover { color: var(--brand-ink); }
.voice[hidden] { display: none; }
