/* ==========================================================================
   Himmah Research Centre — styles
   Light, editorial, minimal. Brand: dark brown · terracotta · beige · white
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "FS Siena";
  src: url("../fonts/FSSiena-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "FS Siena";
  src: url("../fonts/FSSiena-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Amiri Quran";
  src: url("../fonts/AmiriQuran-subset.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* colour */
  --paper: #faf6ef;
  --paper-2: #f4ede2;
  --white: #ffffff;
  --beige: #e8d9c4;
  --beige-2: #d9c3a6;
  --terracotta: #a8431a;
  --terracotta-2: #8e3514;
  --terracotta-soft: #d9794d;
  --brown: #3b2419;
  --brown-2: #2a1a12;
  --ink: #2a1a12;
  --muted: #6b5548;
  --line: rgba(59, 36, 25, 0.14);
  --line-strong: rgba(59, 36, 25, 0.28);

  /* type */
  --font: "FS Siena", "Helvetica Neue", Arial, sans-serif;
  --arabic: "Amiri Quran", "Amiri", "Scheherazade New", serif;
  --fs-body: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.55vw, 1.4375rem);
  --fs-h1: clamp(3rem, 1.6rem + 6vw, 7.25rem);
  --fs-h2: clamp(2.125rem, 1.4rem + 3vw, 4.25rem);
  --fs-h3: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --fs-small: 0.875rem;

  /* layout */
  --max: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(88px, 12vw, 176px);
  --radius: 22px;
  --radius-lg: 36px;
  --header-h: 84px;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.65s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 100;
  font-size: var(--fs-body);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; } /* layout rules must never un-hide hidden elements */
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--brown);
  text-wrap: balance;
}
p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 400; color: var(--brown); }
em { font-style: normal; color: var(--terracotta); }
::selection { background: var(--terracotta); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 4px;
  border-radius: 6px;
}

/* Page load: the content fades in on its own. The header never animates.
   (Cross-document view transitions were removed: overlapping the old and new
   pages while entrance animations ran caused a visible jump.) */
main { animation: page-in 0.35s ease-out backwards; }
@keyframes page-in { from { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--brown); color: var(--paper);
  padding: 12px 18px; border-radius: 999px;
  font-weight: 400;
}
.skip-link:focus { top: 16px; }

.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;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); position: relative; }
.measure { max-width: 64ch; }
.lead { font-size: var(--fs-lead); line-height: 1.6; }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: ""; width: 36px; height: 1px; background: currentColor;
  transform-origin: left; transform: scaleX(var(--line-scale, 1));
  transition: transform 0.8s var(--ease-out) 0.15s;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--brown); --fg: var(--paper);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 14px 28px;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 400; font-size: 1rem; letter-spacing: 0.02em; line-height: 1.2;
  transition: color 0.45s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.45s var(--ease-out);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--terracotta);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:active { transform: scale(0.97); }
.btn .arrow { transition: transform 0.45s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--accent { --bg: var(--terracotta); --fg: var(--white); }
.btn--accent::before { background: var(--brown); }
.btn--ghost {
  --bg: transparent; --fg: var(--brown);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--ghost:hover { --fg: var(--white); box-shadow: inset 0 0 0 1px transparent; }
.btn--light { --bg: var(--paper); --fg: var(--brown); }
.btn--light::before { background: var(--beige); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 400; font-size: 1rem; letter-spacing: 0.02em; color: var(--brown);
  padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease-out), color 0.3s;
}
.link-arrow:hover { background-size: 0% 1px; background-position: right bottom; color: var(--terracotta); }
.link-arrow .arrow { transition: transform 0.45s var(--ease-out); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: transform 0.5s var(--ease-out), background-color 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.site-header.is-scrolled {
  background: rgba(250, 246, 239, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 40px; height: auto; transition: transform 0.8s var(--ease-out); }
.brand:hover img { transform: rotate(-8deg) scale(1.04); }
.brand__text {
  display: flex; flex-direction: column;
  font-weight: 400; line-height: 1.05; color: var(--brown);
  text-transform: uppercase;
}
.brand__text span:first-child { font-size: 1.125rem; letter-spacing: 0.26em; }
.brand__text span:last-child { font-size: 0.625rem; letter-spacing: 0.3em; color: var(--muted); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav__list { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative; font-weight: 400; font-size: 0.9688rem; color: var(--brown);
  padding-block: 10px;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: var(--terracotta);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--terracotta); }
.nav .btn { min-height: 46px; padding: 11px 24px; }
.ext-icon { width: 0.7em; height: 0.7em; display: inline-block; margin-left: 3px; vertical-align: 0.1em; opacity: 0.6; }

.menu-toggle {
  display: none;
  width: 48px; height: 48px; border-radius: 50%;
  align-items: center; justify-content: center;
  position: relative; z-index: 120;
}
.menu-toggle span {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--brown);
  transition: transform 0.5s var(--ease-out), opacity 0.3s;
}
.menu-toggle span:nth-child(1) { transform: translateY(-4px); }
.menu-toggle span:nth-child(2) { transform: translateY(4px); }
.menu-open .menu-toggle span:nth-child(1) { transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 110;
  background: var(--paper);
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  clip-path: circle(0% at calc(100% - 44px) 42px);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease-in-out), visibility 0s linear 0.8s;
  overflow-y: auto;
}
.menu-open .mobile-menu {
  clip-path: circle(150% at calc(100% - 44px) 42px);
  visibility: visible;
  transition: clip-path 0.9s var(--ease-in-out), visibility 0s;
}
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li {
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out);
}
.menu-open .mobile-menu li { opacity: 1; transform: none; transition-delay: calc(0.25s + var(--i) * 0.06s); }
.mobile-menu a.mobile-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0;
  font-weight: 400; font-size: clamp(1.75rem, 7vw, 2.5rem); color: var(--brown); line-height: 1.1;
}
.mobile-menu a.mobile-link[aria-current="page"] { color: var(--terracotta); }
.mobile-menu__foot {
  margin-top: auto; padding-top: 32px;
  display: flex; flex-direction: column; gap: 20px;
  opacity: 0; transition: opacity 0.6s 0.55s;
}
.menu-open .mobile-menu__foot { opacity: 1; }
.menu-open { overflow: hidden; }
.menu-open .site-header { z-index: 130; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }

@media (max-width: 1023px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1024px) {
  .mobile-menu { display: none; }
}

/* ---------- Reveal system ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur) var(--ease-out), transform calc(var(--dur) + 0.2s) var(--ease-out);
  transition-delay: calc(var(--d, 0) * 0.7s);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(0.96); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-stagger] > * {
  opacity: 0; transform: translateY(36px);
  transition: opacity var(--dur) var(--ease-out), transform calc(var(--dur) + 0.2s) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.08s + var(--d, 0) * 0.7s);
}
.js [data-stagger].is-in > * { opacity: 1; transform: none; }

.js .eyebrow[data-reveal] { --line-scale: 0; }
.js .eyebrow[data-reveal].is-in { --line-scale: 1; }

/* split words (masked rise) — hidden until JS has split them, so the
   heading never flashes in full and then jumps back down */
.js [data-split]:not(.is-split) { visibility: hidden; }
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.split-word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.8s var(--ease-out);
  transition-delay: calc(var(--w) * 0.05s + var(--d, 0) * 0.7s);
}
.is-in .split-word > span, .split-word.is-in > span { transform: none; }

/* image mask reveal */
.js [data-reveal="mask"] {
  opacity: 1; transform: none;
  clip-path: inset(100% 0 0 0 round var(--radius));
  transition: clip-path 1s var(--ease-in-out);
  transition-delay: calc(var(--d, 0) * 0.7s);
}
.js [data-reveal="mask"].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js [data-reveal="mask"] img { transform: scale(1.18); transition: transform 1.3s var(--ease-out); transition-delay: calc(var(--d, 0) * 0.7s); }
.js [data-reveal="mask"].is-in img { transform: scale(1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(32px, 6vw, 88px));
  padding-bottom: clamp(72px, 9vw, 140px);
  overflow-x: clip; overflow-y: visible;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 85% 20%, rgba(232, 217, 196, 0.75), transparent 70%),
    radial-gradient(40% 40% at 5% 90%, rgba(217, 121, 77, 0.10), transparent 70%);
}
.hero__grid {
  display: grid; gap: clamp(40px, 6vw, 96px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}
.hero h1 { font-size: var(--fs-h1); line-height: 0.98; letter-spacing: -0.03em; margin-bottom: clamp(28px, 3.5vw, 44px); }
.hero h1 .accent { color: var(--terracotta); }
.hero__copy p { max-width: 52ch; }
.hero__copy .lead { max-width: 46ch; color: var(--brown); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }

.hero__media { position: relative; }
.arch {
  position: relative; overflow: hidden;
  border-radius: 999px 999px var(--radius) var(--radius);
  aspect-ratio: 4 / 5;
  background: var(--beige);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.js .hero .arch[data-reveal="mask"] { clip-path: inset(100% 0 0 0 round 999px 999px var(--radius) var(--radius)); }
.js .hero .arch[data-reveal="mask"].is-in { clip-path: inset(0 0 0 0 round 999px 999px var(--radius) var(--radius)); }
.hero__block {
  position: absolute; z-index: -1;
  width: 62%; aspect-ratio: 1;
  right: -8%; bottom: -8%;
  border-radius: 999px 999px 0 0;
  background: var(--terracotta);
  opacity: 0.92;
}
.hero__ring {
  position: absolute; left: -14%; top: 8%; width: 36%; z-index: 2;
  color: var(--terracotta); opacity: 0.9;
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 899px) {
  .hero__media { max-width: 460px; margin-inline: auto; width: 88%; }
  .hero__ring { width: 30%; left: -10%; }
}
.scroll-cue {
  display: none;
  position: absolute; left: var(--gutter); bottom: 32px;
  font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 400; color: var(--muted);
  align-items: center; gap: 14px;
}
.scroll-cue i { display: block; width: 1px; height: 48px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: var(--terracotta); animation: cue 2.2s var(--ease-in-out) infinite; }
@keyframes cue { to { top: 100%; } }
@media (min-width: 1200px) and (min-height: 760px) { .scroll-cue { display: inline-flex; } }

/* ---------- Section heads ---------- */
.section-head {
  display: grid; gap: 28px 64px;
  margin-bottom: clamp(56px, 7vw, 104px);
}
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1.1fr 0.9fr; align-items: end; }
}
.section-head h2 { font-size: var(--fs-h2); }

/* ---------- Offerings ---------- */
.offerings { list-style: none; margin: 0; padding: 0; counter-reset: offer; }
.offer {
  position: relative;
  display: grid; gap: 16px 48px;
  grid-template-columns: 1fr;
  align-items: start;
  padding-block: clamp(36px, 5vw, 64px);
}
.offer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong);
  transform-origin: left; transform: scaleX(var(--rule, 1));
  transition: transform 1s var(--ease-in-out);
}
.offerings .offer:last-child::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-strong); }
.js .offer[data-reveal] { --rule: 0; }
.js .offer[data-reveal].is-in { --rule: 1; }
.offer__num {
  font-weight: 400; font-size: 0.875rem; letter-spacing: 0.16em; color: var(--terracotta);
  padding-top: 0.5em;
}
.offer__title { font-size: var(--fs-h3); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.offer__body { max-width: 60ch; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 400;
  padding: 7px 14px; border-radius: 999px;
  background: var(--beige); color: var(--brown); line-height: 1;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; transform: scale(0.8); } }
@media (min-width: 900px) {
  .offer { grid-template-columns: 90px minmax(0, 0.9fr) minmax(0, 1.3fr); }
}
.offer:hover .offer__title { color: var(--terracotta); }
.offer__title { transition: color 0.4s; }
.offerings-cta { margin-top: clamp(28px, 3vw, 40px); display: flex; justify-content: center; }

/* Dark variant (Services) */
.section--dark {
  background: var(--brown); color: #fbf6ef;
  --line-strong: rgba(250, 246, 239, 0.22);
}
.section--dark h2, .section--dark h3, .section--dark strong { color: #ffffff; }
.section--dark .lead { color: #fbf6ef; }
.section--dark .eyebrow, .section--dark .offer__num { color: var(--terracotta-soft); }
.section--dark .offer:hover .offer__title { color: var(--terracotta-soft); }
.section--dark .pill { background: rgba(250, 246, 239, 0.14); color: #ffffff; }
.section--dark .pill::before { background: var(--terracotta-soft); }
.section--dark .btn--accent::before { background: var(--paper); }
.section--dark .btn--accent:hover { --fg: var(--brown); }

/* ---------- Principles ---------- */
.principles-intro { text-align: center; max-width: 880px; margin-inline: auto; margin-bottom: clamp(56px, 7vw, 96px); }
.principles-intro h2 { font-size: var(--fs-h2); margin-bottom: 36px; }
.principles-intro p { max-width: 62ch; margin-inline: auto; }
.principles-intro .guided { font-weight: 400; color: var(--terracotta); margin-top: 28px; letter-spacing: 0.02em; }

.values { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .values { grid-template-columns: repeat(3, 1fr); } }
.value {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 3.5vw, 48px);
  padding-top: clamp(120px, 12vw, 180px);
  min-height: 100%;
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
}
.value:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(59, 36, 25, 0.45); }
.value h3 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); margin-bottom: 24px; color: inherit; }
.value em { color: inherit; font-weight: 400; }
.value strong { color: inherit; }
.value__ar {
  position: absolute; z-index: -1; top: 8px; right: 20px;
  font-family: var(--arabic); font-size: clamp(6rem, 5rem + 4vw, 9rem); line-height: 1.4;
  opacity: 0.16; pointer-events: none;
  transition: transform 1.2s var(--ease-out);
}
.value:hover .value__ar { transform: translateY(-8px) scale(1.04); }
.value__num {
  position: absolute; top: clamp(32px, 3.5vw, 48px); left: clamp(32px, 3.5vw, 48px);
  font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.2em;
  display: flex; align-items: center; gap: 12px;
}
.value__num::after { content: ""; width: 32px; height: 1px; background: currentColor; opacity: 0.6; }
.value--ilm { background: var(--terracotta); color: #fff7ef; }
.value--rifq { background: var(--brown); color: var(--beige); }
.value--amal { background: var(--beige); color: var(--brown); }
.value--amal .value__ar { color: var(--terracotta); opacity: 0.22; }

/* ---------- Āyah banner ---------- */
.ayah {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--brown);
  color: var(--beige);
  text-align: center;
  padding-block: clamp(72px, 9vw, 136px);
}
.ayah__pattern {
  position: absolute; inset: 0; z-index: -1; opacity: 0.07; color: var(--beige);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e8d9c4' stroke-width='1'%3E%3Cpath d='M60 10 L74 46 L110 60 L74 74 L60 110 L46 74 L10 60 L46 46 Z'/%3E%3Crect x='32' y='32' width='56' height='56' transform='rotate(45 60 60)'/%3E%3Crect x='32' y='32' width='56' height='56'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
}
.ayah__star {
  width: 44px; height: 44px; margin: 0 auto 28px; color: var(--terracotta-soft);
  animation: spin 40s linear infinite;
}
.ayah__ar {
  font-family: var(--arabic);
  font-weight: 400;
  font-size: clamp(1.5rem, 0.6rem + 4.2vw, 4rem);
  line-height: 1.9;
  color: var(--paper);
  margin: 0 auto;
  white-space: nowrap;
  word-spacing: 0.06em;
}
.ayah__ar .w { display: inline-block; }
.js .ayah__ar .w {
  opacity: 0; filter: blur(8px); transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out), filter 0.9s var(--ease-out);
  transition-delay: calc(var(--w) * 0.15s + 0.05s);
}
.js .ayah__ar.is-in .w { opacity: 1; filter: none; transform: none; }
.ayah__ar .w--name { color: var(--terracotta-soft); }
.ayah__rule {
  width: min(280px, 50%); height: 1px; margin: clamp(24px, 3vw, 40px) auto;
  background: linear-gradient(90deg, transparent, var(--terracotta-soft), transparent);
}
.ayah__en {
  font-size: clamp(1.1875rem, 0.95rem + 1vw, 1.75rem);
  line-height: 1.45; color: var(--beige); max-width: 34ch; margin: 0 auto 18px;
}
.ayah__ref { font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--terracotta-soft); }

/* ---------- Research ---------- */
.research-intro { display: grid; gap: 28px 72px; margin-bottom: clamp(8px, 1.5vw, 24px); }
.research-intro h2 { font-size: var(--fs-h2); }
@media (min-width: 900px) {
  .research-intro { grid-template-columns: 0.9fr 1.1fr; }
  .research-intro__text { max-width: 64ch; }
}
.study {
  display: grid; gap: clamp(32px, 5vw, 88px);
  grid-template-columns: 1fr;
  align-items: start;
  padding-block: clamp(40px, 5vw, 72px);
}
.study + .study { border-top: 1px solid var(--line); }
.research-intro + .study { padding-top: clamp(16px, 2vw, 32px); }
@media (min-width: 900px) {
  .study { grid-template-columns: 0.85fr 1.15fr; }
  .study--flip .study__media { order: 2; }
  .study__media { position: sticky; top: calc(var(--header-h) + 32px); }
}
.study__media { position: relative; }
.study__frame { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: var(--beige); }
.study__frame img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.study__label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--terracotta);
}
.study__q {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.375rem);
  line-height: 1.22; letter-spacing: -0.01em;
  margin-bottom: clamp(28px, 3vw, 40px);
  position: relative;
}
.study__q::before {
  content: "“"; position: absolute; left: -0.5em; top: -0.1em;
  color: var(--terracotta); opacity: 0.35; font-size: 1.6em; line-height: 1;
}
@media (max-width: 600px) { .study__q::before { display: none; } }

/* ---------- Contribute ---------- */
.contribute {
  position: relative; overflow: clip; isolation: isolate; /* clip (not hidden) keeps position: sticky working */
  background: var(--paper-2);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 104px);
  display: grid; gap: 32px 72px;
}
@media (max-width: 599px) {
  .contribute { padding: 32px 16px 16px; border-radius: var(--radius); }
  .contribute__intro { padding-inline: 8px; }
}
@media (min-width: 900px) { .contribute { grid-template-columns: 0.9fr 1.1fr; align-items: start; } .contribute__intro { position: sticky; top: calc(var(--header-h) + 32px); } }
.contribute h2 { font-size: var(--fs-h2); margin-bottom: 32px; }

/* contact form */
.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(20px, 3.5vw, 44px);
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -44px rgba(59, 36, 25, 0.35);
}
.contact-form__fields { display: grid; gap: 22px; }
.field-row { display: grid; gap: 22px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label {
  display: block; margin-bottom: 8px;
  font-weight: 400; font-size: 0.9375rem; color: var(--brown);
}
.field .req { font-weight: 100; color: var(--muted); font-size: 0.875rem; }
.contact-form .input--plain { padding: 14px 18px; font-size: 1.0625rem; line-height: 1.5; min-height: 54px; }
.contact-form .input--area { min-height: 150px; resize: vertical; line-height: 1.6; }
.field .error-msg { margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-actions .btn { min-width: 180px; }
@media (max-width: 420px) { .contact-actions .btn { flex: 1 1 100%; } }
.contact-submit[disabled] { opacity: 0.6; cursor: progress; }
.contact-success { text-align: center; padding: 32px 8px; outline: none; }
.contact-success h3 { font-size: var(--fs-h3); margin-bottom: 12px; color: var(--terracotta); }
.js .contact-success:not([hidden]) { animation: vt-fade-in 0.6s var(--ease-out) both; }
.contribute__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Instagram ---------- */
.insta-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; }
.insta-head h2 { font-size: var(--fs-h2); }
.insta-head h2 a { transition: color 0.3s; }
.insta-head h2 a:hover { color: var(--terracotta); }
.insta-feed { min-height: 240px; }
.insta-fallback {
  display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .insta-fallback { grid-template-columns: repeat(4, 1fr); } }
.insta-fallback a {
  position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center;
  transition: transform 0.6s var(--ease-out);
}
.insta-fallback a:hover { transform: scale(0.98); }
.insta-fallback a:nth-child(1) { background: var(--brown); }
.insta-fallback a:nth-child(2) { background: var(--beige); }
.insta-fallback a:nth-child(3) { background: var(--paper-2); }
.insta-fallback a:nth-child(4) { background: var(--brown-2); }
.insta-fallback img { width: 34%; }
.insta-note { font-size: var(--fs-small); color: var(--muted); margin-top: 16px; }
behold-widget { display: block; border-radius: 16px; overflow: hidden; }

/* ---------- Newsletter ---------- */
.newsletter {
  display: grid; gap: 28px 64px; align-items: center;
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--beige);
}
@media (min-width: 900px) { .newsletter { grid-template-columns: 1fr 1.1fr; } }
.newsletter h2 { font-size: clamp(1.875rem, 1.3rem + 2vw, 3rem); margin-bottom: 14px; }
.newsletter .eyebrow { margin-bottom: 18px; }
.newsletter__copy p:last-child { max-width: 44ch; color: var(--brown); }
.newsletter__fields { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter .input--plain {
  flex: 1 1 240px; min-height: 54px; padding: 14px 20px;
  font-size: 1rem; background: var(--white); border-radius: 999px;
}
.newsletter__submit { flex: 0 0 auto; }
@media (max-width: 480px) { .newsletter__submit { flex: 1 1 100%; } }
.newsletter__help { font-size: 0.875rem; color: var(--muted); margin-top: 12px; }
.newsletter__help a { color: var(--terracotta); border-bottom: 1px solid currentColor; }
.newsletter__success { font-weight: 400; color: var(--terracotta); font-size: 1.125rem; outline: none; }
.newsletter .error-msg { margin-top: 10px; }

/* ---------- Articles ---------- */
#articles-app { opacity: 1; }
#articles-app.is-loaded > * { animation: page-in 0.5s var(--ease-out) both; }
.article-grid { display: grid; gap: clamp(28px, 3vw, 44px) clamp(20px, 2.5vw, 32px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .article-grid { grid-template-columns: repeat(3, 1fr); } }
.article-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.article-card__media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 10; background: var(--paper-2); margin-bottom: 20px;
}
.article-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.article-card__link:hover .article-card__media img { transform: scale(1.04); }
.article-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: var(--beige); }
.article-card__placeholder img { width: 22%; height: auto; object-fit: contain; }
.article-card__meta { font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 10px; }
.article-card__title { font-size: clamp(1.375rem, 1.15rem + 0.7vw, 1.75rem); line-height: 1.2; margin-bottom: 12px; transition: color 0.3s; }
.article-card__link:hover .article-card__title { color: var(--terracotta); }
.article-card__excerpt { color: var(--muted); margin-bottom: 18px; }
.article-card__more { margin-top: auto; font-weight: 400; font-size: 1rem; color: var(--brown); display: inline-flex; gap: 10px; align-items: center; }
.article-card__more .arrow { transition: transform 0.4s var(--ease-out); }
.article-card__link:hover .article-card__more .arrow { transform: translateX(4px); }
.article-card__link:focus-visible { outline-offset: 8px; }

/* skeleton loading */
.is-skeleton .article-card__media, .sk {
  background: linear-gradient(90deg, var(--paper-2) 0%, #efe5d6 50%, var(--paper-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.sk { height: 18px; border-radius: 8px; margin-bottom: 12px; width: 85%; }
.sk--s { width: 30%; height: 12px; }
.sk--l { height: 26px; width: 92%; }
.sk--xl { height: 48px; width: 90%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty / error state */
.articles-state { text-align: center; max-width: 520px; margin: clamp(24px, 5vw, 64px) auto; }
.articles-state img { width: 64px; height: auto; margin: 0 auto 24px; }
.articles-state h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 12px; }
.articles-state p { color: var(--muted); margin-bottom: 28px; }

/* single article */
.article-head { max-width: 860px; }
.back-link { margin-bottom: 36px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.article-meta::before { display: none; }
.article-head h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.025em; }
.article-excerpt { margin-top: 24px; color: var(--brown); max-width: 60ch; }
.article-cover { margin: clamp(36px, 5vw, 64px) 0 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--paper-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 720px; margin: clamp(40px, 5vw, 72px) auto 0; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); }
.article-body blockquote {
  margin: 1.6em 0; padding: 8px 0 8px 26px; border-left: 2px solid var(--terracotta);
  font-weight: 400; font-size: 1.25em; line-height: 1.45; color: var(--brown);
}
.article-body ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.article-figure { margin: 2em 0; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 10px; text-align: center; }
.article-end {
  max-width: 720px; margin: clamp(48px, 6vw, 80px) auto 0; padding-top: 32px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
}
.article-end .back-link { margin-bottom: 0; }
.more-articles { margin-top: clamp(72px, 9vw, 128px); }
.more-articles__title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 36px; }
.article-head.is-skeleton { padding-top: 8px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  overflow-x: clip; overflow-y: visible; /* let the logo run into the page below, uncut */
  padding-top: calc(var(--header-h) + clamp(56px, 9vw, 140px));
  padding-bottom: clamp(48px, 6vw, 96px);
}
.page-hero h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; line-height: 0.98; }
.page-hero .lead { margin-top: 32px; max-width: 52ch; }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin: 2.2em 0 0.8em; }
.prose h3 { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem); margin: 2em 0 0.8em; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.6em; padding-left: 0.3em; }
.prose li::marker { color: var(--terracotta); }
.prose a:not(.btn) { color: var(--terracotta); background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; transition: background-size 0.4s var(--ease-out); word-break: break-word; }
.prose a:not(.btn):hover { background-size: 0 1px; background-position: right bottom; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 40px 96px; }
@media (min-width: 1000px) { .about-grid { grid-template-columns: 0.8fr 1.2fr; } .about-grid__aside { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; } }
.about-grid__aside h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem); }
.pullquote {
  font-family: var(--font); font-weight: 400;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  line-height: 1.18; letter-spacing: -0.015em;
  color: var(--terracotta);
  margin: 1.2em 0; padding: 0; border: 0;
}
.pullquote strong { color: inherit; }
.ways { list-style: none; margin: 40px 0; padding: 0; display: grid; gap: 14px; }
.ways li {
  padding: 28px 30px; border-radius: var(--radius);
  background: var(--white); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.ways li:hover { box-shadow: inset 0 0 0 1px var(--terracotta); transform: translateX(6px); }
.ways li strong { color: var(--terracotta); }
.closing { background: var(--brown); color: var(--beige); border-radius: var(--radius-lg); padding: clamp(40px, 7vw, 104px); text-align: center; }
.closing p { font-size: clamp(1.25rem, 1rem + 1.1vw, 1.875rem); line-height: 1.45; max-width: 34ch; margin-inline: auto; }
.closing p strong { color: var(--paper); }
.closing .final { font-weight: 400; color: var(--terracotta-soft); font-size: clamp(2rem, 1.4rem + 2.6vw, 3.75rem); margin-top: 0.8em; letter-spacing: -0.02em; }
.closing .final strong { color: inherit; }
.closing .btn { margin-top: 40px; }

/* ---------- FAQ ---------- */
.faq { max-width: 920px; }
.faq-item { border-top: 1px solid var(--line-strong); }
.faq-item:last-child { border-bottom: 1px solid var(--line-strong); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  text-align: left; padding: clamp(24px, 3vw, 34px) 0;
  font-weight: 400; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem); line-height: 1.3; color: var(--brown);
  transition: color 0.3s;
}
.faq-q:hover { color: var(--terracotta); }
.faq-icon {
  flex-shrink: 0; position: relative; width: 44px; height: 44px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background 0.4s, box-shadow 0.4s, transform 0.6s var(--ease-out);
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor;
  transform: translate(-50%, -50%); transition: transform 0.5s var(--ease-out);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon { background: var(--terracotta); color: var(--white); box-shadow: none; transform: rotate(180deg); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-a[data-open="true"] { grid-template-rows: 1fr; }
.faq-a__inner { padding-bottom: 34px; max-width: 70ch; opacity: 0; transform: translateY(-8px); transition: opacity 0.5s, transform 0.6s var(--ease-out); }
.faq-a[data-open="true"] .faq-a__inner { opacity: 1; transform: none; transition-delay: 0.1s; }
.faq-a a { color: var(--terracotta); border-bottom: 1px solid currentColor; }
.no-js .faq-a { grid-template-rows: 1fr; }
.no-js .faq-a__inner { opacity: 1; transform: none; }

.cta-band {
  display: grid; gap: 32px 72px; align-items: center;
  background: var(--terracotta); color: #fff7ef;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 88px);
}
.cta-band p { font-size: var(--fs-lead); line-height: 1.55; max-width: 52ch; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.4fr auto; } }

/* ---------- Privacy ---------- */
.legal { display: grid; gap: 48px 88px; }
@media (min-width: 1000px) { .legal { grid-template-columns: 260px minmax(0, 1fr); } }
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; font-size: 0.9375rem; }
.toc p { font-weight: 400; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 16px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 18px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); line-height: 1.35; transition: color 0.3s, border-color 0.3s; }
.toc a:hover, .toc a.is-active { color: var(--brown); border-color: var(--terracotta); font-weight: 400; }
@media (max-width: 999px) { .toc { display: none; } }
.updated { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--paper-2); font-weight: 400; font-size: 0.875rem; margin-bottom: 32px; }

/* ---------- Donate ---------- */
.donate-wrap { display: grid; gap: 48px clamp(48px, 7vw, 112px); align-items: start; }
@media (min-width: 1000px) { .donate-wrap { grid-template-columns: 1fr 1fr; } .donate-copy { position: sticky; top: calc(var(--header-h) + 40px); } }
.donate-copy h1 { font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.75rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 32px; }
.hadith {
  margin: 40px 0 0; padding: 28px 30px; border-left: 2px solid var(--terracotta);
  background: var(--white); border-radius: 0 var(--radius) var(--radius) 0;
}
.hadith p { font-size: 1.125rem; line-height: 1.6; color: var(--brown); }
.hadith cite { display: block; margin-top: 14px; font-style: normal; font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--terracotta); }

.donate-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -48px rgba(59, 36, 25, 0.35);
}
.donate-card fieldset { border: 0; margin: 0 0 32px; padding: 0; min-width: 0; }
.donate-card legend, .field-label { font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; padding: 0; display: block; }

.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--paper-2); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { position: relative; z-index: 1; text-align: center; padding: 13px 10px; min-height: 48px; display: grid; place-items: center; cursor: pointer; font-weight: 400; border-radius: 999px; transition: color 0.4s; }
.segmented__thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--brown); transition: transform 0.55s var(--ease-out); }
.segmented input:checked + label { color: var(--paper); }
.segmented input:focus-visible + label { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.segmented:has(#freq-monthly:checked) .segmented__thumb { transform: translateX(100%); }

.amounts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 520px) { .amounts { grid-template-columns: repeat(4, 1fr); } }
.amounts input { position: absolute; opacity: 0; pointer-events: none; }
.amounts label {
  display: grid; place-items: center; min-height: 64px; border-radius: 16px; cursor: pointer;
  font-weight: 400; font-size: 1.25rem; color: var(--brown);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow 0.35s, background 0.35s, color 0.35s, transform 0.3s var(--ease-out);
  font-variant-numeric: tabular-nums;
}
.amounts label:hover { box-shadow: inset 0 0 0 1px var(--terracotta); }
.amounts label:active { transform: scale(0.97); }
.amounts input:checked + label { background: var(--terracotta); color: var(--white); box-shadow: none; }
.amounts input:focus-visible + label { outline: 2px solid var(--brown); outline-offset: 2px; }

.custom-amount { position: relative; margin-top: 12px; }
.custom-amount span { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-weight: 400; font-size: 1.25rem; color: var(--muted); pointer-events: none; }
.input {
  width: 100%; min-height: 60px; border-radius: 16px; border: 0;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: var(--paper); color: var(--ink);
  font: 400 1.25rem/1.2 var(--font);
  padding: 16px 20px 16px 44px;
  transition: box-shadow 0.3s;
  -moz-appearance: textfield; appearance: textfield;
}
.input::-webkit-outer-spin-button, .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--terracotta); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #b3261e; }
.help { font-size: 0.9375rem; color: var(--muted); margin-top: 10px; }
.error-msg { color: #9f1d15; font-size: 0.9375rem; margin-top: 10px; font-weight: 400; min-height: 0; }
.error-msg:empty { display: none; }

.donate-submit { width: 100%; min-height: 60px; }
.donate-submit[disabled] { opacity: 0.6; cursor: progress; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; display: none; }
.is-loading .spinner { display: inline-block; }
.is-loading .arrow { display: none; }
.secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 0.875rem; color: var(--muted); text-align: center; }
.secure svg { width: 14px; height: 14px; flex-shrink: 0; }
.impact { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--muted); }
.notice { padding: 16px 20px; border-radius: 14px; background: var(--paper-2); margin-bottom: 24px; font-size: 0.9375rem; }

.thanks { min-height: 80vh; display: grid; place-items: center; text-align: center; padding-top: var(--header-h); }
.thanks h1 { font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem); margin-bottom: 24px; }
.thanks__mark { width: 96px; margin: 0 auto 40px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-3deg); } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown); color: var(--beige);
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: 32px;
  margin-top: var(--section);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative; overflow: hidden; isolation: isolate;
}
.site-footer a { transition: color 0.3s; }
.site-footer a:hover { color: var(--terracotta-soft); }
.footer-top { display: grid; gap: 48px; padding-bottom: clamp(56px, 7vw, 96px); border-bottom: 1px solid rgba(232, 217, 196, 0.16); }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand img { width: 170px; margin-bottom: 28px; }
.footer-brand p { max-width: 32ch; color: rgba(232, 217, 196, 0.8); }
.footer-col h3 { font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--terracotta-soft); margin-bottom: 20px; font-weight: 400; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-col a { display: inline-block; padding-block: 6px; }
.socials { display: flex; gap: 10px; margin-top: 8px; }
.socials a {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(232, 217, 196, 0.3);
  transition: background 0.4s, box-shadow 0.4s, color 0.4s, transform 0.4s var(--ease-out);
}
.socials a:hover { background: var(--beige); color: var(--brown); box-shadow: none; transform: translateY(-3px); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; font-size: 0.875rem; color: rgba(232, 217, 196, 0.7); }
.footer-giant {
  font-weight: 400; font-size: clamp(3rem, 12vw, 11rem); line-height: 0.9; letter-spacing: -0.04em;
  color: rgba(232, 217, 196, 0.07); white-space: nowrap; user-select: none; pointer-events: none;
  margin-top: 40px; text-align: center;
}

/* ---------- Utilities ---------- */
.bg-white { background: var(--white); }
.center { text-align: center; }
.mt-l { margin-top: clamp(40px, 5vw, 72px); }

/* ---------- Reduced motion ---------- */
html:focus-within { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .js [data-stagger] > *, .split-word > span, .js .ayah__ar .w { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
  .js [data-reveal="mask"] img { transform: none !important; }
  main { animation: none !important; }
}
