/* Ahmed Welfare Foundation
   A quiet memorial site: one bold element (the arched portrait), family photos set like prints,
   large readable type for an older audience. Colours are defined once here and reused everywhere. */
:root {
  --bg: #F2F4F1;
  --band: #E6EBE5;
  --card: #FBFCFA;
  --ink: #1B2620;
  --muted: #52605A;
  --green: #1F5A43;
  --green-ink: #F2F4F1;
  --brass: #94712E;
  --line: #CAD3CB;
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111713; --band: #18201B; --card: #1C2520; --ink: #E5ECE7; --muted: #9BA8A0;
    --green: #78BC9C; --green-ink: #0F1512; --brass: #D3AE67; --line: #2D3832;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.125rem; line-height: 1.7; }
img { max-width: 100%; }
.wrap { max-width: 68rem; margin: 0 auto; padding-inline: 1.25rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; max-width: 62ch; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
.ar { font-family: var(--arabic); font-size: 1.15em; line-height: 1.6; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.prose { display: grid; gap: 1.15rem; }
.prose strong { font-family: var(--display); font-weight: 400; color: var(--green); }
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: var(--green-ink); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .85rem; }
.brand { font-family: var(--display); font-size: 1.2rem; color: var(--ink); text-decoration: none; }
nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
nav a { color: var(--muted); text-decoration: none; font-size: 1rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-block; background: var(--green); color: var(--green-ink); font: 700 1.05rem var(--body); text-decoration: none; padding: .85rem 1.4rem; border-radius: 6px; border: 2px solid var(--green); cursor: pointer; justify-self: start; }
.button:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--green); }
.more { font-weight: 700; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; padding-block: 4rem 4.5rem; }
.hero-text { display: grid; gap: 1.4rem; min-width: 0; }
.hero-text .lede { font-size: 1.25rem; color: var(--muted); }
.promise { font-weight: 700; color: var(--green); border-left: 3px solid var(--brass); padding: .35rem 0 .35rem .9rem; }
.portrait { justify-self: center; width: min(100%, 22rem); display: grid; gap: .8rem; margin: 0; }
.arch { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 999px 999px 8px 8px; border: 2px solid var(--brass); padding: .65rem; }
.arch-inner { height: 100%; border-radius: 999px 999px 4px 4px; background: var(--band); overflow: hidden; }
.arch-inner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.portrait figcaption { text-align: center; color: var(--muted); font-size: .95rem; display: grid; gap: .1rem; }
.portrait figcaption strong { font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--ink); line-height: 1.3; }

/* Inner page header */
.page-head .wrap { display: grid; gap: .8rem; padding-block: 3.5rem 1rem; }
.page-head p { font-size: 1.2rem; color: var(--muted); }

/* Sections */
section.block { padding-block: 4.5rem; }
section.band { background: var(--band); }
.section-head { display: grid; gap: .6rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); }

/* Note */
.note .wrap { display: grid; gap: 1.2rem; max-width: 46rem; }
.note .prose p { font-size: 1.25rem; line-height: 1.6; }
.signature { font-family: var(--display); font-size: 1.5rem; color: var(--green); }

/* Home story teaser */
.teaser { display: grid; grid-template-columns: minmax(0, 18rem) 1fr; gap: 3rem; align-items: center; }
.teaser-text { display: grid; gap: 1.2rem; min-width: 0; }

/* Story */
.story { display: grid; grid-template-columns: 1.55fr 1fr; gap: 3.5rem; align-items: start; }
.story-text { display: grid; gap: 1.15rem; min-width: 0; }
.chapter { display: grid; gap: 1.15rem; }
.chapter + .chapter h3 { margin-top: 1.8rem; }
.chapter h3 { color: var(--green); }
.pull { font-family: var(--display); font-size: 1.5rem; line-height: 1.35; color: var(--ink); border-left: 3px solid var(--brass); padding: .2rem 0 .2rem 1.1rem; margin: .6rem 0; max-width: 34ch; }
.pull cite { display: block; font: 400 .95rem var(--body); color: var(--muted); margin-top: .5rem; font-style: normal; }
.faith { font-style: italic; color: var(--muted); margin-top: 1rem; }
.photo { margin: .6rem 0; display: grid; gap: .55rem; justify-self: start; width: 100%; max-width: 30rem; }
.photo.portrait-shape { max-width: 20rem; }
.photo .print { background: var(--card); border: 1px solid var(--line); padding: .55rem; border-radius: 3px; }
.photo img { display: block; width: 100%; height: auto; }
.photo figcaption { font-size: .95rem; color: var(--muted); line-height: 1.45; }
.aside { position: sticky; top: 6rem; display: grid; gap: 2rem; min-width: 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.2rem 1.5rem; display: grid; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--green); }
.timeline .year { font-family: var(--display); font-size: 1.25rem; color: var(--green); line-height: 1.3; font-variant-numeric: tabular-nums; }
.timeline .what { color: var(--muted); font-size: .98rem; line-height: 1.5; }
.resting { border-top: 1px solid var(--line); padding-top: 1.5rem; display: grid; gap: .8rem; }
.resting p { font-size: 1rem; color: var(--muted); }
.map { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 6px; display: block; background: var(--band); }

/* Causes */
.causes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cause { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; display: grid; gap: .7rem; align-content: start; min-width: 0; }
.cause .where { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.cause p { font-size: 1.05rem; }

/* Money */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.stat { display: grid; gap: .35rem; align-content: start; border-top: 2px solid var(--green); padding-top: 1rem; min-width: 0; }
.stat .num { font-family: var(--display); font-size: clamp(2.6rem, 6vw, 3.6rem); color: var(--green); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .num-label { color: var(--muted); font-size: 1.02rem; line-height: 1.5; }
.money-text { display: grid; gap: 1.2rem; max-width: 46rem; margin-top: 2.75rem; }
.status { border-left: 3px solid var(--brass); padding: .9rem 1.1rem; background: var(--card); font-size: 1rem; max-width: none; }
.after { margin-top: 2rem; }

/* Memories */
.memory-list { display: grid; gap: 1.25rem; }
.memory { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem 1.6rem; display: grid; gap: .8rem; }
.memory .who { font-size: .95rem; color: var(--muted); }
.memory .who strong { color: var(--ink); font-weight: 700; }
.empty { border: 2px dashed var(--line); border-radius: 8px; padding: 1.5rem; color: var(--muted); font-size: 1rem; }

/* Forms */
.two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3.5rem; align-items: start; }
.col-text { display: grid; gap: 1.2rem; min-width: 0; }
form { display: grid; gap: 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.75rem; min-width: 0; }
label { display: grid; gap: .35rem; font-weight: 700; font-size: 1rem; }
label.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; }
label.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--green); }
input[type="text"], input[type="email"], textarea { font: 400 1.05rem var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .7rem .8rem; width: 100%; }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .95rem; color: var(--muted); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.email { font-weight: 700; word-break: break-all; }
.copy { font: 700 .9rem var(--body); background: transparent; color: var(--green); border: 1px solid var(--line); border-radius: 6px; padding: .35rem .7rem; cursor: pointer; }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; color: var(--muted); font-size: .95rem; }
footer p { max-width: 56ch; }

@media (max-width: 56rem) {
  .hero .wrap, .story, .two-col, .teaser { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero .wrap { padding-block: 2.75rem 3.5rem; }
  .portrait { width: min(100%, 17rem); justify-self: start; }
  .teaser .photo { max-width: 16rem; }
  .causes { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; gap: 1.5rem; }
  .aside { position: static; }
  section.block { padding-block: 3.25rem; }
  .page-head .wrap { padding-block: 2.5rem .5rem; }
}
@media (max-width: 36rem) { .causes { grid-template-columns: 1fr; } }
