/* =========================================================
   ATFALI · أطفالي — Warm botanical editorial for a cause
   ========================================================= */

:root {
  /* Palette */
  --sand:        #FBF7EF;
  --sand-2:      #F4ECDD;
  --dawn:        #EADFCB;
  --olive:       #3B4A2F;
  --olive-mid:   #6B7B4A;
  --olive-soft:  #9AA77E;
  --clay:        #C0664A;
  --clay-deep:   #A5502F;
  --gold:        #C6973F;
  --ink:         #2A2620;
  --ink-soft:    #5A5346;
  --line:        #E3D9C6;

  /* Type */
  --serif: "Fraunces", Georgia, serif;
  --body:  "Newsreader", Georgia, serif;
  --ar-serif: "Amiri", "Newsreader", serif;
  --ar-ui: "Tajawal", system-ui, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Arabic swaps the body font stacks */
html[lang="ar"] {
  --serif: "Amiri", Georgia, serif;
  --body:  "Amiri", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.6;
  font-size: clamp(16px, 1.05vw, 18px);
  overflow-x: hidden;
  position: relative;
}

html[lang="ar"] body { line-height: 1.9; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--clay-deep); }
html[lang="ar"] em { color: var(--clay-deep); font-style: normal; font-weight: 700; }

::selection { background: var(--olive); color: var(--sand); }

/* ---------- Ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.ambient__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.ambient__glow--dawn {
  width: 60vw; height: 60vw; top: -22vw; right: -12vw;
  background: radial-gradient(circle, rgba(234,223,203,.9), rgba(198,151,63,.18) 60%, transparent 72%);
  animation: drift 26s var(--ease) infinite alternate;
}
.ambient__glow--olive {
  width: 52vw; height: 52vw; bottom: -20vw; left: -14vw;
  background: radial-gradient(circle, rgba(154,167,126,.55), rgba(59,74,47,.1) 60%, transparent 72%);
  animation: drift 32s var(--ease) infinite alternate-reverse;
}
.ambient__grain {
  position: absolute; inset: 0; opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate3d(4%, 5%, 0) scale(1.12); } }

/* ---------- Buttons ---------- */
.btn {
  --pad: .8em 1.5em;
  display: inline-flex; align-items: center; gap: .5em;
  padding: var(--pad);
  font-family: var(--serif); font-weight: 500; font-size: .98rem;
  letter-spacing: .01em; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .35s var(--ease), background .35s, color .35s, box-shadow .35s;
  will-change: transform;
}
html[lang="ar"] .btn { font-family: var(--ar-ui); font-weight: 700; }
.btn--lg { --pad: 1em 2em; font-size: 1.05rem; }
.btn--block { width: 100%; justify-content: center; }
.btn--solid {
  background: var(--olive); color: var(--sand);
  box-shadow: 0 10px 26px -12px rgba(59,74,47,.7);
}
.btn--solid:hover { background: var(--clay); transform: translateY(-3px); box-shadow: 0 16px 34px -12px rgba(192,102,74,.6); }
.btn--ghost { border-color: var(--olive); color: var(--olive); }
.btn--ghost:hover { background: var(--olive); color: var(--sand); transform: translateY(-3px); }

.eyebrow {
  font-family: var(--serif); font-weight: 500; font-size: .82rem;
  letter-spacing: .28em; text-transform: uppercase; color: var(--clay-deep);
  margin-bottom: 1.1rem;
}
html[lang="ar"] .eyebrow { font-family: var(--ar-ui); letter-spacing: .05em; font-weight: 700; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1rem clamp(1.1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--sand) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, padding .4s, background .4s;
}
.nav.is-scrolled { border-color: var(--line); padding-top: .7rem; padding-bottom: .7rem; }
.nav__brand { display: flex; align-items: center; gap: .6rem; }
.nav__mark { color: var(--olive); display: grid; place-items: center; transition: transform .6s var(--ease); }
.nav__brand:hover .nav__mark { transform: rotate(-12deg); }
.nav__wordmark { display: flex; flex-direction: column; line-height: 1; }
.nav__name { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; color: var(--olive); }
.nav__ar { font-family: var(--ar-serif); font-size: 1rem; color: var(--clay-deep); margin-top: .1em; }
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-size: .96rem; color: var(--ink-soft); position: relative; padding: .2em 0;
  transition: color .3s;
}
html[lang="ar"] .nav__links a, html[lang="ar"] .lang-toggle { font-family: var(--ar-ui); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--clay); transition: width .35s var(--ease);
}
.nav__links a:hover { color: var(--olive); }
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: 1rem; }
.lang-toggle {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: .45em .85em; font-family: var(--serif); font-size: .9rem; color: var(--ink-soft);
  cursor: pointer; display: flex; gap: .35em; align-items: center; transition: all .3s;
}
.lang-toggle:hover { border-color: var(--olive); color: var(--olive); }
.lang-toggle__ar { font-family: var(--ar-serif); }
html[lang="en"] .lang-toggle__en, html[lang="ar"] .lang-toggle__ar { color: var(--clay-deep); font-weight: 700; }

/* ---------- HERO ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.1rem, 4vw, 3rem) 3rem;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center;
}
.hero__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem); line-height: 1.02; letter-spacing: -.02em;
  color: var(--olive); margin-bottom: 1.4rem;
}
html[lang="ar"] .hero__title { font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.hero__lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 34ch; margin-bottom: 2rem; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.hero__note {
  font-size: .95rem; color: var(--ink-soft); max-width: 40ch;
  padding-inline-start: 1rem; border-inline-start: 2px solid var(--gold);
}

.hero__art { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.branch { width: min(100%, 340px); overflow: visible; }
.hero__seal {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: .6rem 1.4rem; width: fit-content; max-width: 100%; margin-inline: auto;
  padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--olive-mid);
}
html[lang="ar"] .hero__seal { font-family: var(--ar-ui); letter-spacing: 0; text-transform: none; font-size: .88rem; }
.hero__seal span { position: relative; padding-inline-start: 1.15rem; white-space: nowrap; }
.hero__seal span::before {
  content: "✦"; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: .7em;
}

/* branch draw animation */
.branch__stem path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s var(--ease) forwards; }
.branch__stem path:nth-child(n+2) { animation-delay: .5s; }
.branch__leaves ellipse, .branch__olives circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .7s var(--ease) forwards; }
.branch__leaves ellipse { animation-delay: 1.6s; }
.branch__olives circle { animation-delay: 2.1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }

/* ---------- Ticker ---------- */
.ticker {
  border-block: 1px solid var(--line); background: var(--sand-2);
  overflow: hidden; padding: .9rem 0; margin-top: 1rem;
}
.ticker__track {
  display: inline-flex; align-items: center; gap: 2rem; white-space: nowrap;
  font-family: var(--serif); font-size: 1.1rem; color: var(--olive);
  animation: ticker 34s linear infinite;
}
.ticker__track i { color: var(--clay); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }
html[dir="rtl"] .ticker__track { animation-direction: reverse; }

/* ---------- Section shell ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) clamp(1.1rem, 4vw, 3rem); }
.section__head { max-width: 46rem; margin-bottom: 3rem; }
.section__head.center { margin-inline: auto; text-align: center; }
.section__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -.015em; color: var(--olive);
}
html[lang="ar"] .section__title { font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.section__sub { margin-top: 1.2rem; font-size: 1.1rem; color: var(--ink-soft); }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.4rem); color: var(--ink); max-width: 40ch; }

/* ---------- Human moment ---------- */
.human {
  display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.human__media { margin: 0; }
.human__frame {
  position: relative; border-radius: 26px; overflow: hidden;
  padding: 10px; background: linear-gradient(160deg, var(--sand-2), var(--dawn));
  box-shadow: 0 40px 70px -34px rgba(59,74,47,.6), 0 4px 14px -8px rgba(42,38,32,.3);
  transform: rotate(-1.4deg);
  transition: transform .7s var(--ease);
}
.human:hover .human__frame { transform: rotate(0deg); }
.human__frame img {
  width: 100%; height: clamp(380px, 44vw, 560px); object-fit: cover; object-position: center 42%;
  border-radius: 18px; display: block;
  filter: saturate(.96) contrast(1.03);
}
/* warm brand wash lifts the photo into the palette (also softens it with dignity) */
.human__wash {
  position: absolute; inset: 10px; border-radius: 18px; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(59,74,47,0) 45%, rgba(59,74,47,.42) 100%),
    radial-gradient(120% 90% at 50% 0%, rgba(234,223,203,.28), transparent 55%);
  mix-blend-mode: multiply;
}
.human__pin {
  position: absolute; top: 22px; inset-inline-end: 22px; z-index: 2;
  display: inline-flex; align-items: center; gap: .4em;
  background: rgba(42,38,32,.55); color: var(--sand); backdrop-filter: blur(6px);
  font-family: var(--serif); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .35em .8em; border-radius: 999px;
}
.human__pin::before { content: "◈"; color: var(--clay); }
html[lang="ar"] .human__pin { font-family: var(--ar-ui); letter-spacing: 0; text-transform: none; }
.human__cap { margin-top: 1rem; font-size: .82rem; color: var(--ink-soft); font-style: italic; text-align: center; opacity: .8; }
html[lang="ar"] .human__cap { font-family: var(--ar-ui); font-style: normal; }
.human__copy .section__title { margin-bottom: 1.2rem; }
.human__p2 { margin-top: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.human__copy .btn { margin-top: 2rem; }

/* ---------- The Need ---------- */
.need__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.need__lead { font-family: var(--serif); font-weight: 300; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.4; color: var(--olive); }
html[lang="ar"] .need__lead { font-weight: 400; }
.need__stats { display: flex; flex-direction: column; gap: 1.4rem; }
.stat { padding-inline-start: 1.2rem; border-inline-start: 2px solid var(--gold); }
.stat__num { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--clay-deep); font-weight: 500; }
.stat__label { color: var(--ink-soft); font-size: .98rem; }
.need__foot { margin-top: 3rem; max-width: 52ch; font-size: 1.1rem; color: var(--ink-soft); padding-top: 2rem; border-top: 1px solid var(--line); }

/* ---------- Kafalah ---------- */
.kafalah { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hadith {
  position: relative; background: linear-gradient(160deg, var(--olive), #2b3722);
  color: var(--sand); border-radius: 24px; padding: clamp(2rem, 4vw, 3.2rem);
  box-shadow: 0 30px 60px -30px rgba(59,74,47,.8); overflow: hidden;
}
.hadith::before {
  content: "”"; position: absolute; top: -.2em; inset-inline-start: .1em;
  font-family: var(--serif); font-size: 10rem; color: rgba(198,151,63,.22); line-height: 1;
}
.hadith p { position: relative; font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.35; }
html[lang="ar"] .hadith p { font-weight: 400; }
.hadith p span { color: var(--gold); font-style: italic; }
.hadith cite { display: block; margin-top: 1.6rem; font-style: normal; font-size: .92rem; color: var(--olive-soft); letter-spacing: .02em; }
.kafalah__compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.compare { border-radius: 18px; padding: 1.6rem; border: 1px solid var(--line); background: var(--sand-2); }
.compare h3 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5em; }
.compare--yes { border-color: var(--olive-soft); }
.compare--yes h3 { color: var(--olive); }
.compare--yes h3::before { content: "✓"; color: var(--olive-mid); }
.compare--no h3 { color: var(--clay-deep); }
.compare--no h3::before { content: "✕"; color: var(--clay); }
.compare ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.compare li { font-size: .95rem; color: var(--ink-soft); padding-inline-start: 1rem; position: relative; }
.compare li::before { content: "—"; position: absolute; inset-inline-start: 0; color: var(--olive-soft); }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: s; }
.step { position: relative; padding: 2rem 1.6rem; border-radius: 20px; background: var(--sand-2); border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s; }
.step:hover { transform: translateY(-8px); box-shadow: 0 24px 44px -26px rgba(59,74,47,.5); }
.step__num { font-family: var(--serif); font-size: 1rem; color: var(--gold); letter-spacing: .1em; }
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; color: var(--olive); margin: 1rem 0 .6rem; }
.step p { font-size: .95rem; color: var(--ink-soft); }
.step::after { content: "→"; position: absolute; top: 50%; inset-inline-end: -1rem; color: var(--olive-soft); font-size: 1.1rem; transform: translateY(-50%); }
html[dir="rtl"] .step::after { content: "←"; }
.step:last-child::after { display: none; }

/* ---------- Provides ---------- */
.provides__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.provide { padding: 2rem; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--sand), var(--sand-2)); transition: transform .5s var(--ease), border-color .5s; }
.provide:hover { transform: translateY(-6px); border-color: var(--olive-soft); }
.provide__icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--dawn); color: var(--clay-deep); font-size: 1.3rem; margin-bottom: 1.1rem; }
.provide h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; color: var(--olive); margin-bottom: .5rem; }
.provide p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- Trust ---------- */
.trust { background: linear-gradient(180deg, transparent, var(--sand-2) 30%, var(--sand-2) 70%, transparent); border-radius: 40px; }
.guarantees { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2.4rem; }
.guarantee { display: flex; gap: 1.2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.guarantee__n { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--olive); color: var(--sand); font-family: var(--serif); font-size: 1rem; }
.guarantee h3 { font-family: var(--serif); font-weight: 500; font-size: 1.12rem; color: var(--olive); margin-bottom: .25rem; }
.guarantee p { font-size: .92rem; color: var(--ink-soft); }
.board { margin-top: 3rem; text-align: center; padding: 2.4rem; border-radius: 22px; border: 1px dashed var(--olive-soft); background: color-mix(in srgb, var(--dawn) 40%, transparent); }
.board h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; color: var(--olive); margin-bottom: .8rem; }
.board p { color: var(--ink-soft); max-width: 60ch; margin-inline: auto; }

/* ---------- Forms ---------- */
.forms { max-width: 760px; }
.forms__intro { text-align: center; margin-bottom: 2.4rem; }
.forms__intro .section__sub { margin-inline: auto; max-width: 52ch; }
.forms__tabs { display: flex; gap: .5rem; background: var(--sand-2); padding: .4rem; border-radius: 999px; border: 1px solid var(--line); width: fit-content; margin: 0 auto 2rem; }
.ftab { border: none; background: none; cursor: pointer; padding: .75em 1.6em; border-radius: 999px; font-family: var(--serif); font-size: 1rem; color: var(--ink-soft); transition: all .35s var(--ease); }
html[lang="ar"] .ftab { font-family: var(--ar-ui); }
.ftab.is-active { background: var(--olive); color: var(--sand); box-shadow: 0 8px 20px -10px rgba(59,74,47,.6); }
.form-panel { display: none; flex-direction: column; gap: 1.2rem; animation: fadeUp .5s var(--ease); }
.form-panel.is-active { display: flex; }
.field { display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.field-row { display: flex; gap: 1.2rem; }
label { font-family: var(--serif); font-size: .92rem; color: var(--olive); font-weight: 500; }
html[lang="ar"] label, html[lang="ar"] input, html[lang="ar"] select, html[lang="ar"] textarea { font-family: var(--ar-ui); }
input, select, textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--sand); border: 1px solid var(--line); border-radius: 12px;
  padding: .85em 1em; transition: border-color .3s, box-shadow .3s; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--olive-mid); box-shadow: 0 0 0 4px rgba(107,123,74,.14); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-family: var(--body); font-size: .9rem; color: var(--ink-soft); font-weight: 400; cursor: pointer; }
.check input { width: auto; margin-top: .25em; accent-color: var(--olive); }
.form-status { text-align: center; font-size: .95rem; color: var(--olive-mid); min-height: 1.2em; }
.form-status.is-success { color: var(--olive); font-family: var(--serif); font-size: 1.05rem; }

/* ---------- Closing (cinematic full-bleed) ---------- */
.closing { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: clamp(5rem, 14vw, 10rem) 1.5rem; }
.closing__media { position: absolute; inset: 0; z-index: -1; }
.closing__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.closing__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(42,38,32,.55), rgba(59,74,47,.86)),
    radial-gradient(120% 80% at 50% 120%, rgba(59,74,47,.9), transparent 60%);
}
.closing__inner { position: relative; max-width: 40rem; margin-inline: auto; }
.closing__ar { font-family: var(--ar-serif); font-size: clamp(4rem, 16vw, 11rem); color: rgba(198,151,63,.32); line-height: 1; user-select: none; margin-bottom: -.35em; }
.closing h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 4.6vw, 3.5rem); line-height: 1.16; color: var(--sand); max-width: 22ch; margin: 0 auto 2rem; position: relative; text-shadow: 0 2px 30px rgba(0,0,0,.3); }
html[lang="ar"] .closing h2 { font-weight: 700; line-height: 1.45; }
.closing .btn--solid { background: var(--clay); box-shadow: 0 14px 34px -12px rgba(192,102,74,.75); }
.closing .btn--solid:hover { background: var(--sand); color: var(--olive); }

/* ---------- Footer ---------- */
.footer { background: var(--olive); color: var(--sand); padding: clamp(3rem, 6vw, 5rem) clamp(1.1rem, 4vw, 3rem) 2rem; margin-top: 3rem; }
.footer__top { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(251,247,239,.16); }
.footer__brand .nav__name { color: var(--sand); }
.footer__brand .nav__ar { color: var(--gold); }
.footer__brand p { margin-top: 1rem; max-width: 40ch; color: var(--olive-soft); font-size: .96rem; }
.footer__nav { display: flex; flex-direction: column; gap: .7rem; }
.footer__nav a { color: var(--sand); opacity: .82; transition: opacity .3s, color .3s; }
.footer__nav a:hover { opacity: 1; color: var(--gold); }
.footer__bottom { max-width: var(--maxw); margin: 2rem auto 0; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; font-size: .82rem; color: var(--olive-soft); }
.footer__bottom p { max-width: 70ch; }

/* ---------- Verified case files ---------- */
.cases__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.case {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.8rem; border-radius: 22px; background: var(--sand);
  border: 1px solid var(--line); box-shadow: 0 20px 40px -30px rgba(59,74,47,.5);
  transition: transform .5s var(--ease), box-shadow .5s;
}
.case:hover { transform: translateY(-6px); box-shadow: 0 30px 54px -30px rgba(59,74,47,.6); }
.case__top { display: flex; align-items: center; justify-content: space-between; }
.case__avatar {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--dawn), var(--sand-2));
  color: var(--olive-mid); border: 1px solid var(--line);
}
.case__avatar--b { color: var(--clay); }
.case__avatar svg { width: 60%; height: 60%; }
.case__verified {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--serif); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--olive); background: color-mix(in srgb, var(--gold) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  padding: .3em .7em; border-radius: 999px;
}
.case__verified::before { content: "✓"; color: var(--gold); }
html[lang="ar"] .case__verified { font-family: var(--ar-ui); letter-spacing: 0; text-transform: none; }
.case__meta { display: flex; flex-direction: column; gap: .2rem; }
.case__id { font-family: var(--serif); font-size: .85rem; letter-spacing: .04em; color: var(--clay-deep); }
html[lang="ar"] .case__id { font-family: var(--ar-ui); }
.case__age { font-size: .9rem; color: var(--ink-soft); }
.case__line { font-family: var(--serif); font-size: 1.12rem; line-height: 1.45; color: var(--olive); font-style: italic; }
html[lang="ar"] .case__line { font-style: normal; font-weight: 400; }
.case__needs { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; }
.case__needs li {
  font-size: .8rem; color: var(--ink-soft); background: var(--sand-2);
  border: 1px solid var(--line); padding: .3em .75em; border-radius: 999px;
}
.case--cta { justify-content: center; text-align: center; gap: 1.2rem; background: linear-gradient(160deg, var(--olive), #2b3722); border-color: transparent; }
.case--cta h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; color: var(--sand); }
html[lang="ar"] .case--cta h3 { font-weight: 700; }
.case--cta p { font-size: .96rem; color: var(--olive-soft); }
.case--cta .btn--solid { background: var(--clay); }
.case--cta .btn--solid:hover { background: var(--sand); color: var(--olive); }
.cases__note { margin-top: 2rem; text-align: center; font-size: .85rem; font-style: italic; color: var(--ink-soft); opacity: .85; }
html[lang="ar"] .cases__note { font-style: normal; }

/* ---------- Invitation letter ---------- */
.invite { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.invite__media { margin: 0; }
.invite__frame { position: relative; border-radius: 26px; overflow: hidden; box-shadow: 0 40px 70px -34px rgba(59,74,47,.6); transform: rotate(1.2deg); transition: transform .7s var(--ease); }
.invite:hover .invite__frame { transform: rotate(0); }
.invite__frame img { width: 100%; height: clamp(360px, 40vw, 520px); object-fit: cover; object-position: center 35%; display: block; filter: saturate(.96) contrast(1.02); }
.invite__wash { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(59,74,47,0) 55%, rgba(59,74,47,.4)); }
.invite__letter { position: relative; }
.invite__body { margin-top: .4rem; }
.invite__body p { font-family: var(--serif); font-weight: 300; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.5; color: var(--olive); margin-bottom: 1rem; }
html[lang="ar"] .invite__body p { font-weight: 400; line-height: 1.9; }
.invite__sign { margin: 1.6rem 0 2rem; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--clay-deep); }
html[lang="ar"] .invite__sign { font-style: normal; font-family: var(--ar-serif); }

/* ---------- Assurance strip ---------- */
.assure { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 1.8rem; margin-top: 1.6rem; }
.assure li { display: inline-flex; align-items: center; gap: .5em; font-size: .92rem; color: var(--ink-soft); }
.assure__i { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--dawn); font-size: .85rem; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1rem; background: color-mix(in srgb, var(--sand) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -18px rgba(42,38,32,.5);
  transform: translateY(120%); transition: transform .45s var(--ease);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta__text { display: flex; flex-direction: column; line-height: 1.2; }
.sticky-cta__text strong { font-family: var(--serif); font-size: 1rem; color: var(--olive); }
.sticky-cta__text span { font-size: .78rem; color: var(--ink-soft); }
html[lang="ar"] .sticky-cta__text strong { font-family: var(--ar-ui); }
.sticky-cta .btn { flex: none; }

/* ==========================================================
   LANDING SPLASH (index.html) — full-height, NO SCROLL
   Hadith + a wall of children's faces, both visible at once.
   ========================================================== */
.is-landing { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.is-landing .nav { flex: 0 0 auto; position: static; }
.landing { flex: 1; min-height: 0; }
.splash {
  height: 100%; overflow: hidden;
  display: grid; grid-template-columns: 1.02fr 0.98fr; grid-template-rows: minmax(0, 1fr);
}

/* text side */
.splash__text {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: clamp(.7rem, 1.8vh, 1.5rem);
  padding: clamp(1rem, 3vh, 2.4rem) clamp(1.4rem, 4vw, 3.5rem);
  min-height: 0; min-width: 0;
}
.hadith-hero { display: flex; flex-direction: column; align-items: center; gap: clamp(.7rem, 1.8vh, 1.3rem); width: 100%; }
.hadith-hero__ar {
  font-family: var(--ar-serif); font-weight: 400;
  font-size: clamp(1.5rem, 3.3vh, 2.9rem); line-height: 1.6; color: var(--olive);
  max-width: 20ch; text-align: center;
}
.hadith-hero__en {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1rem, 1.9vh, 1.45rem); line-height: 1.5; color: var(--ink-soft);
  max-width: 42ch;
}
.hadith-hero__en em { color: var(--clay-deep); font-style: italic; }
.hadith-hero__cite {
  font-family: var(--serif); font-style: normal; font-size: clamp(.72rem, 1.1vh, .82rem);
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
/* the "two parted fingers" motif from the hadith */
.two-fingers svg { width: clamp(40px, 4.6vh, 58px); height: auto; overflow: visible; }
.two-fingers path {
  fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 1.6s var(--ease) .5s forwards;
}
.splash__cta { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; }

/* faces side — a full-height 2x2 wall */
.splash__faces {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 4px;
  height: 100%; min-height: 0; min-width: 0;
}
.splash__faces figure { margin: 0; overflow: hidden; position: relative; min-width: 0; min-height: 0; }
.splash__faces figure::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(42,38,32,.05);
  background: linear-gradient(180deg, rgba(59,74,47,0) 70%, rgba(59,74,47,.16));
}
.splash__faces img {
  width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; object-position: center 34%;
  filter: saturate(.92) contrast(1.03) brightness(1.02) sepia(.05);
  transition: transform 1.4s var(--ease);
}
.splash__faces figure:hover img { transform: scale(1.05); }
html[lang="ar"] .splash__cta { font-family: var(--ar-ui); }

/* Phones: hadith on top (never clipped), a big faces band right below — pics
   are visible immediately; the page flows naturally instead of crushing text. */
@media (max-width: 860px) {
  .is-landing { height: auto; min-height: 100dvh; overflow: visible; }
  .splash { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .splash__text {
    flex: 1 1 auto; justify-content: center;
    padding: clamp(1.2rem, 3.5vh, 2.2rem) 1.35rem clamp(1rem, 3vh, 1.8rem);
    gap: clamp(.55rem, 1.6vh, 1.05rem);
  }
  .splash__text { width: 100vw; max-width: 100vw; box-sizing: border-box; }
  .hadith-hero { gap: clamp(.55rem, 1.6vh, 1.05rem); width: 90vw; max-width: 90vw; }
  .hadith-hero__ar { font-size: clamp(1.2rem, 4.8vw, 1.8rem); line-height: 1.65; width: 90vw; max-width: 90vw; overflow-wrap: anywhere; }
  .hadith-hero__en { font-size: clamp(.92rem, 3.6vw, 1.12rem); line-height: 1.5; width: 90vw; max-width: 90vw; overflow-wrap: anywhere; }
  .splash__cta { width: 90vw; max-width: 90vw; }
  .splash__faces {
    flex: 0 0 auto; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
    height: 42dvh; min-height: 260px;
  }
}
@media (max-width: 430px) {
  .splash__cta { gap: .7rem; }
  .splash__cta .btn { --pad: .82em 1.4em; font-size: .96rem; }
}

/* ---------- Faces of hope (bento gallery) ---------- */
.faces__grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 210px; gap: 14px; }
.faces__item {
  position: relative; margin: 0; overflow: hidden; border-radius: 18px;
  grid-column: span 2; box-shadow: 0 20px 40px -30px rgba(59,74,47,.55);
}
.faces__item--feature { grid-column: span 2; grid-row: span 2; }
.faces__item img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 32%; display: block;
  /* one shared treatment unifies disparate stock into a single warm system */
  filter: saturate(.9) contrast(1.03) brightness(1.02) sepia(.06);
  transition: transform 1s var(--ease);
}
.faces__item:hover img { transform: scale(1.06); }
.faces__item::after {
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(42,38,32,.07);
  background: linear-gradient(180deg, transparent 60%, rgba(59,74,47,.24));
}
.faces__note { margin-top: 1.4rem; text-align: center; font-size: .82rem; font-style: italic; color: var(--ink-soft); opacity: .82; }
html[lang="ar"] .faces__note { font-style: normal; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-group .reveal.is-in:nth-child(2) { transition-delay: .08s; }
.reveal-group .reveal.is-in:nth-child(3) { transition-delay: .16s; }
.reveal-group .reveal.is-in:nth-child(4) { transition-delay: .24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- FAQ ---------- */
.faq__list { display: flex; flex-direction: column; gap: .8rem; max-width: 820px; }
.qa { border: 1px solid var(--line); border-radius: 16px; background: var(--sand-2); overflow: hidden; transition: border-color .3s; }
.qa[open] { border-color: var(--olive-soft); }
.qa summary { list-style: none; cursor: pointer; padding: 1.3rem 1.6rem; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--olive); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
html[lang="ar"] .qa summary { font-family: var(--ar-ui); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 1.5rem; color: var(--clay); transition: transform .3s; flex: none; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { padding: 0 1.6rem 1.4rem; color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero__art { order: -1; max-width: 300px; margin-inline: auto; }
  .hero__seal { position: static; text-align: center; flex-direction: row; justify-content: center; margin-top: 1rem; }
  .need__grid, .kafalah, .human, .invite { grid-template-columns: 1fr; }
  .human__media, .invite__media { max-width: 480px; margin-inline: auto; }
  .invite__media { order: -1; }
  .cases__grid { grid-template-columns: 1fr 1fr; }
  .faces__grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; }
  .sticky-cta { display: flex; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
  .provides__grid { grid-template-columns: 1fr 1fr; }
  .guarantees { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps, .provides__grid, .kafalah__compare, .cases__grid { grid-template-columns: 1fr; }
  .faces__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 148px; gap: 10px; }
  .faces__item { grid-column: span 1; }
  .faces__item--feature { grid-column: span 2; grid-row: span 2; }
  .field-row { flex-direction: column; }
  .footer__top { flex-direction: column; }
  .sticky-cta__text span { display: none; }
  /* nav CTA is redundant on mobile — the sticky bar handles conversion */
  .nav__actions .btn--solid { display: none; }
  .nav { gap: 1rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .branch__stem path { stroke-dashoffset: 0; }
  .branch__leaves ellipse, .branch__olives circle { opacity: 1; }
}
