/* ʿAtaʾ — warm and human. Clean white ground, deep leaf ink, a sun-yellow hand-drawn marker,
   soft organic blobs, and a "how you can help" band (donate / volunteer / partner). */
:root {
    --accent: #16a34a;
    --accent-ink: #fff;
    --sun: #f6b81a;
    --sun-ink: #2a1e00;
    --sky: #3f8fd2;
    --bg: #ffffff;
    --bg-2: #f1f6f1;
    --surface: #ffffff;
    --ink: #142219;
    --ink-soft: #4f5f55;
    --line: #e2ebe3;
    --deep: color-mix(in srgb, var(--accent) 30%, #0b1a10);
    --display: "Alexandria", "Almarai", system-ui, sans-serif;
    --body: "Almarai", system-ui, sans-serif;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0d1610;
    --bg-2: #122019;
    --surface: #16251c;
    --ink: #e7f0e9;
    --ink-soft: #a5b8ab;
    --line: #23362a;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); font: 400 1.02rem/1.8 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.2; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.hide, .is-empty { display: none !important; }
[dir="rtl"] .arr { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .hero-cta .arr { transform: none; }

.kicker { margin: 0 0 .7rem; font: 800 .9rem/1 var(--body); color: var(--accent); display: inline-flex; align-items: center; gap: .55rem; }
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 30%, transparent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .75rem 1.6rem; border-radius: 16px; font: 800 1rem/1 var(--body); border: 2px solid transparent; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px) rotate(-.5deg); }
.btn-ink { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 0 var(--deep); }
.btn-ink:hover { box-shadow: 0 8px 0 var(--deep); }
.btn-sun { background: var(--sun); color: var(--sun-ink); box-shadow: 0 6px 0 color-mix(in srgb, var(--sun) 55%, #000); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost--light { border-color: rgba(255, 255, 255, .35); color: #fff; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); transition: box-shadow .25s; }
.hdr.is-stuck { box-shadow: 0 1px 0 var(--line); }
.hdr-in { display: flex; align-items: center; gap: 1.5rem; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font: 800 1.2rem/1.2 var(--display); }
.brand-logo { height: 44px; width: auto; }
.brand-logo--dark { display: none; }
:root[data-theme="dark"] .brand-logo--light { display: none; }
:root[data-theme="dark"] .brand-logo--dark { display: block; }
.nav { display: flex; gap: 1.4rem; margin-inline-start: auto; font-weight: 700; }
.nav a { color: var(--ink-soft); background: linear-gradient(var(--sun), var(--sun)) 0 100% / 0 6px no-repeat; transition: background-size .3s, color .2s; padding: 0 .1rem; }
[dir="rtl"] .nav a { background-position: 100% 100%; }
.nav a:hover { color: var(--ink); background-size: 100% 6px; }
.hdr-tools { display: flex; align-items: center; gap: .6rem; }
.theme-toggle { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.hdr-cta { min-height: 44px; padding: .55rem 1.2rem; box-shadow: 0 4px 0 color-mix(in srgb, var(--sun) 55%, #000); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.08; color: var(--accent); }
:root[data-theme="dark"] .hero h1 { color: color-mix(in srgb, var(--accent) 70%, #fff); }
.hero-tagline { margin: 1.4rem 0 2.2rem; font: 700 clamp(1.3rem, 2.4vw, 1.9rem)/1.5 var(--display); }
.marker { position: relative; display: inline; z-index: 0; }
.marker svg { position: absolute; inset-inline: -2%; bottom: -.35em; width: 104%; height: .7em; z-index: -1; overflow: visible; }
.marker path { fill: none; stroke: var(--sun); stroke-width: 10; stroke-linecap: round; opacity: .85; stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 1.1s .5s cubic-bezier(.6, 0, .2, 1) forwards; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }

.hero-visual { position: relative; aspect-ratio: 1; max-width: 480px; justify-self: center; width: 100%; }
.blob { position: absolute; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
.blob-a { inset: 8% -4% -2% 10%; background: var(--sun); animation: morph 14s ease-in-out infinite alternate; }
.blob-b { width: 34%; aspect-ratio: 1; top: -4%; inset-inline-start: -4%; background: color-mix(in srgb, var(--accent) 22%, transparent); animation: morph 11s ease-in-out infinite alternate-reverse; }
.hero-photo { position: absolute; inset: 0 8% 8% 0; border-radius: 48% 52% 44% 56% / 52% 46% 54% 48%; overflow: hidden; display: grid; place-items: center;
    background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 75%, #fff), var(--accent)); background-size: cover; background-position: center;
    box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 70%, #000); }
[dir="rtl"] .hero-photo { inset: 0 0 8% 8%; }
.hero-photo[style*="url("] .hands { display: none; }
.hero-photo[style*="url("] { filter: brightness(1.2); }
.hands { width: 46%; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }

/* Sections */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.sec-head { margin-bottom: 2.4rem; max-width: 720px; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }

/* How you can help */
.help { background: var(--bg-2); border-radius: 48px 48px 0 0; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.way { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: 2rem 1.8rem 1.8rem; border-radius: 28px; background: var(--surface); border: 2px solid var(--line); transition: transform .25s, border-color .25s, box-shadow .25s; overflow: hidden; }
.way::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; inset-inline-end: -60px; top: -60px; background: var(--c); opacity: .12; transition: transform .4s; }
.way:hover { transform: translateY(-6px); border-color: var(--c); box-shadow: 0 24px 40px -28px var(--c); }
.way:hover::after { transform: scale(1.4); }
.way--sun { --c: var(--sun); }
.way--leaf { --c: var(--accent); }
.way--sky { --c: var(--sky); }
.way-ic { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); margin-bottom: .6rem; }
.way--sun .way-ic { color: color-mix(in srgb, var(--sun) 70%, #000); }
.way-ic svg { width: 28px; height: 28px; }
.way h3 { font-size: 1.5rem; font-weight: 800; }
.way p { margin: 0; color: var(--ink-soft); flex: 1; }
.way-go { margin-top: .8rem; font-weight: 800; color: var(--accent); }

/* Mission */
.mission-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.mission-grid:not(:has(.about-photo)) { grid-template-columns: 1fr; max-width: 860px; margin-inline: auto; text-align: center; }
.mission-media:empty { display: none; }
.about-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 200px 200px 28px 28px; }
blockquote { margin: 0; font: 700 clamp(1.35rem, 2.6vw, 2rem)/1.6 var(--display); position: relative; }
blockquote::before { content: "“"; display: block; font: 900 5rem/0.6 Georgia, serif; color: var(--sun); margin-bottom: .6rem; }
[dir="rtl"] blockquote::before { content: "”"; }
.sig { display: block; margin-top: 1.4rem; font-weight: 800; color: var(--accent); }

/* Programs */
.programs { background: var(--bg-2); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.pcard { position: relative; min-height: 360px; border-radius: 28px; overflow: hidden; display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.pcard-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s; }
.pcard:hover .pcard-cover { transform: scale(1.06); }
.pcard-cover--blank { background: radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--sun) 70%, transparent) 0 18%, transparent 19%), linear-gradient(160deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--deep)); }
.pcard:nth-child(3n+2) .pcard-cover--blank { background: radial-gradient(circle at 20% 85%, color-mix(in srgb, var(--sun) 70%, transparent) 0 22%, transparent 23%), linear-gradient(200deg, var(--sky), color-mix(in srgb, var(--sky) 40%, #0b1a2a)); }
.pcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(8, 18, 12, .82)); }
.pcard-body { padding: 1.6rem; }
.pcard h3 { font-size: 1.4rem; font-weight: 800; }
.pcard p { margin: .4rem 0 0; font-size: .95rem; opacity: .9; line-height: 1.6; }
.pcard-price { display: inline-block; margin-top: .8rem; padding: .3rem .8rem; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-weight: 800; font-size: .85rem; }

/* Stories */
.masonry { columns: 3 260px; column-gap: 14px; }
.gallery-item { margin: 0 0 14px; break-inside: avoid; border-radius: 22px; overflow: hidden; }
.gallery-item img { width: 100%; height: auto; transition: transform .6s; }
.gallery-item:nth-child(4n+1) img { aspect-ratio: 4 / 5; object-fit: cover; }
.gallery-item:hover img { transform: scale(1.04); }

/* Team */
.tgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.tcard { padding: 1.8rem 1.4rem; border-radius: 24px; background: var(--surface); border: 2px solid var(--line); text-align: center; }
.tcard-avatar { width: 84px; height: 84px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; background: var(--sun); color: var(--sun-ink); font: 800 1.5rem/1 var(--display); }
.tcard:nth-child(2n) .tcard-avatar { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--accent); }
.tcard h3 { font-size: 1.1rem; font-weight: 700; }
.tcard p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .92rem; }

/* Contact */
.contact { background: var(--deep); color: #fff; padding: clamp(4rem, 8vw, 6rem) 0; border-radius: 48px 48px 0 0; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; width: 420px; height: 420px; inset-inline-end: -140px; top: -160px; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; background: color-mix(in srgb, var(--sun) 22%, transparent); }
.contact-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.contact h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 900; }
.contact-copy p { margin: 1rem 0 2rem; opacity: .85; max-width: 48ch; font-size: 1.08rem; }
.contact-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.contact-list li { padding: 1.1rem 1.4rem; border-radius: 20px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-weight: 700; }
.contact-list small { display: block; font-weight: 400; opacity: .7; font-size: .82rem; margin-bottom: .2rem; }

/* Footer */
.ftr { background: var(--deep); color: rgba(255, 255, 255, .72); padding: 1rem 0 0; font-size: .94rem; }
.ftr-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding-top: 2.5rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-logo { height: 46px; width: auto; margin-bottom: .7rem; filter: brightness(0) invert(1); }
.footer-name { display: block; font: 800 1.3rem/1.3 var(--display); color: #fff; }
.ftr-col { display: flex; flex-direction: column; gap: .5rem; }
.ftr-col h4 { margin: 0 0 .4rem; color: var(--sun); font-size: .95rem; }
.ftr-col a:hover { color: #fff; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; }
.socials a:hover { background: var(--sun); color: var(--sun-ink); }
.socials svg { width: 17px; height: 17px; }
.ftr-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding: 1.4rem 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }
.footer-credit a { color: var(--sun); font-weight: 700; }

.wa { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .4); transition: transform .2s; }
.wa:hover { transform: translateY(-3px) rotate(-4deg); }

/* Motion */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes morph { 50% { border-radius: 58% 42% 37% 63% / 56% 59% 41% 44%; } 100% { border-radius: 40% 60% 54% 46% / 49% 38% 62% 51%; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    .marker path { stroke-dashoffset: 0; }
    html { scroll-behavior: auto; }
}

@media (max-width: 960px) {
    .nav { display: none; }
    .hdr-tools { margin-inline-start: auto; }
    .hero-grid, .mission-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 360px; }
    .ways { grid-template-columns: 1fr; }
    .ftr-grid { grid-template-columns: 1fr 1fr; }
    .ftr-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .brand-name, .hdr-cta { display: none; }
    .help, .contact { border-radius: 28px 28px 0 0; }
    .ftr-grid { grid-template-columns: 1fr; }
}
