:root {
  --dark: #1B423A;
  --dark-2: #163830;
  --mid: #288C4A;
  --light: #71A44A;
  --pale: #B9D6AA;
  --bg: #F5F8F2;
  --tint: #E8F0E3;
  --ink: #162824;
  --muted: #5C7068;
  --line: #D5DFD3;
  --white: #FFFFFF;
  --warm: #E3B34C;
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(22, 40, 36, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Poppins", "Noto Sans", "Noto Sans Arabic", "Noto Sans Tifinagh", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--dark); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--dark); color: #DCE9D5; }
.section-dark h2 { color: #fff; }

.eyebrow { color: var(--mid); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8em; }
.eyebrow-light { color: var(--pale); }
.sub { color: var(--muted); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .lang button:focus-visible, .way:focus-visible, .soc:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }
.btn-primary { background: var(--mid); color: #fff; }
.btn-primary:hover { background: #237d42; }
.btn-ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-light { background: #fff; color: var(--dark); }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--dark); transition: box-shadow .2s; }
.nav.is-scrolled { box-shadow: 0 6px 24px -10px rgba(0,0,0,.45); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand img { height: 24px; width: auto; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: #DCE9D5; text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.lang button {
  border: 0; background: transparent; color: #DCE9D5; font-family: inherit; font-weight: 600; font-size: .8rem; line-height: 1;
  padding: .5em .8em; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--dark); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--dark); color: #DCE9D5; padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #C8DCC0; max-width: 46ch; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.leaf { position: absolute; border-radius: 0 100% 0 100%; background: rgba(255,255,255,.035); pointer-events: none; }
.leaf-a { width: 520px; height: 520px; right: -140px; top: -160px; transform: rotate(10deg); }
.leaf-b { width: 300px; height: 300px; left: -120px; bottom: -150px; transform: rotate(-20deg); background: rgba(113,164,74,.08); }

.hero-card {
  background: #fff; color: var(--ink); border-radius: 22px; padding: 22px 22px 16px;
  box-shadow: 0 30px 70px -25px rgba(0,0,0,.55); transform: rotate(1.2deg);
}
.hc-top { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.hc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--light); box-shadow: 0 0 0 4px rgba(113,164,74,.2); }
.hc-total { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 14px; }
.hc-total b { font-size: 2.6rem; color: var(--dark); line-height: 1; }
.hc-total span { font-weight: 600; color: var(--muted); }
.hc-bars { display: grid; gap: 10px; }
.hc-row { display: grid; grid-template-columns: 88px 1fr 52px; align-items: center; gap: 10px; font-size: .85rem; }
.hc-row i { height: 10px; border-radius: 99px; background: var(--tint); position: relative; overflow: hidden; }
.hc-row i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); background: linear-gradient(90deg, var(--mid), var(--light)); border-radius: 99px; }
.hc-row em { font-style: normal; text-align: end; color: var(--muted); font-weight: 500; }
.hc-tip { margin-top: 16px; display: flex; gap: 10px; align-items: flex-start; background: #FFF6E0; border-radius: 12px; padding: 10px 12px; font-size: .85rem; line-height: 1.45; }
.hc-tag { background: var(--warm); color: var(--ink); font-weight: 700; font-size: .7rem; border-radius: 6px; padding: 2px 6px; margin-top: 1px; }
.hc-note { font-size: .72rem; color: #8A9792; margin: 12px 0 0; text-align: center; }

/* ---------- problem ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.stat b { display: block; font-size: clamp(2.4rem, 4.5vw, 3.2rem); color: var(--dark); line-height: 1; margin-bottom: 12px; }
.stat p { font-weight: 500; margin-bottom: 14px; }
.stat small { color: var(--muted); font-size: .78rem; }
.note-line { margin-top: 28px; padding-inline-start: 16px; border-inline-start: 4px solid var(--light); color: var(--muted); max-width: 70ch; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.step { background: #fff; border-radius: var(--radius); padding: 28px; }
.ic { width: 64px; height: 64px; border-radius: 16px; background: var(--tint); color: var(--mid); display: grid; place-items: center; margin-bottom: 18px; }
.ic svg { width: 36px; height: 36px; }
.step h3 span:first-child { color: var(--light); }
.step p { color: var(--muted); margin: 0; }

/* ---------- benefits ---------- */
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.benefits h2 { max-width: 20ch; }
.ben-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ben-list li { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 18px 20px; }
.ben-list b { display: block; color: #fff; font-size: 1.05rem; }
.ben-list span { color: #C8DCC0; font-size: .95rem; }

/* ---------- status ---------- */
.status { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.status p { color: var(--muted); max-width: 56ch; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 11px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 26px; padding-inline-start: 42px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 3px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line); }
.timeline li.done::before { background: var(--mid); border-color: var(--mid); }
.timeline li.now::before { background: #fff; border-color: var(--warm); box-shadow: 0 0 0 5px rgba(227,179,76,.25); }
.timeline b { display: block; color: var(--dark); }
.timeline span { color: var(--muted); font-size: .92rem; }
.text-link { display: inline-block; margin-top: 8px; color: var(--mid); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.form-grid > div p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-inline-start: 32px; font-weight: 500; }
.checks li::before { content: ""; position: absolute; inset-inline-start: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--mid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat; }

.card { background: #fff; border-radius: 22px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px 4px; font-size: .85rem; font-weight: 600; color: var(--dark); }
.form label > input, .form label > select, .form label > textarea { flex: 1 1 100%; }
.form input, .form select, .form textarea {
  width: 100%; font-family: inherit; font-size: 1rem; line-height: 1.4; color: var(--ink);
  padding: .75em .9em; border-radius: 12px; border: 1.5px solid var(--line); background: #FBFCFA;
  transition: border-color .15s, box-shadow .15s;
}
.form textarea { resize: vertical; min-height: 90px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--mid); box-shadow: 0 0 0 4px rgba(40,140,74,.15); background: #fff; }
.was-validated :invalid { border-color: #C2453A; }
.hp { position: absolute !important; inset-inline-start: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg:empty { display: none; }
.form-msg { margin: 0; font-size: .92rem; color: var(--muted); }
.form-msg.is-ok { color: var(--mid); font-weight: 600; }
.form-msg.is-err { color: #B23A30; font-weight: 600; }

/* ---------- support ---------- */
.ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0 28px; }
.way {
  text-align: start; font-family: inherit; font-size: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.way:hover { border-color: var(--light); transform: translateY(-2px); box-shadow: var(--shadow); }
.way-static { cursor: default; }
.way-static:hover { transform: none; box-shadow: none; border-color: var(--line); }
.way b { color: var(--dark); font-size: 1.05rem; }
.way > span:not(.way-ic) { color: var(--muted); font-size: .92rem; }
.way-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--mid); display: grid; place-items: center; margin-bottom: 8px; }
.way-ic svg { width: 22px; height: 22px; }
.way[data-kind="donate"] .way-ic { background: #FFF1D6; color: #C98A12; }

.ways-3 { grid-template-columns: repeat(3, 1fr); }
.support-form { max-width: 760px; }
.form-head h3 { margin: 0 0 2px; font-size: 1.35rem; }
.form-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.js-rotate::placeholder { color: #8A9792; }
.kinds { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kinds legend { font-size: .85rem; font-weight: 600; color: var(--dark); margin-bottom: 8px; padding: 0; }
.pill { position: relative; display: inline-flex !important; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { padding: .5em 1em; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 500; font-size: .9rem; color: var(--ink); transition: all .15s; }
.pill input:checked + span { background: var(--dark); color: #fff; border-color: var(--dark); }
.pill input:focus-visible + span { outline: 3px solid var(--warm); outline-offset: 2px; }
.kind-hint { margin: 0; background: #FFF6E0; border-radius: 12px; padding: 10px 14px; font-size: .9rem; }

.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.soc { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--dark); border: 0; cursor: pointer; transition: background .15s, color .15s; }
.soc svg { width: 18px; height: 18px; }
.soc:hover { background: var(--mid); color: #fff; }

/* ---------- footer ---------- */
.footer { background: var(--dark-2); color: #C8DCC0; padding: 48px 0 28px; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.foot-in img { height: 24px; width: auto; margin-bottom: 10px; }
.foot-links { display: grid; gap: 6px; justify-items: end; }
.foot-links a { color: #fff; text-decoration: none; font-weight: 500; }
.footer .soc { background: rgba(255,255,255,.08); color: #DCE9D5; }
.footer .soc:hover { background: var(--mid); color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 18px; font-size: .82rem; color: #9DB59A; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 100; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero-in, .benefits, .status, .form-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 420px; transform: none; }
  .ways, .ways-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-cta { display: none; }
  .stats, .steps { grid-template-columns: 1fr; }
  .ways, .ways-3 { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 auto; }
  .foot-links { justify-items: start; }
  .hc-row { grid-template-columns: 76px 1fr 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- consent + legal page ---------- */
.form label.consent { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.form label.consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--mid); }
.form label.consent a { color: var(--mid); font-weight: 600; }
.foot-legal { color: #DCE9D5; }
.legal { background: var(--bg); }
.legal-in { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-top: .2em; }
.legal h2 { font-size: 1.25rem; margin: 1.8em 0 .5em; max-width: none; }
.legal p, .legal li, .legal dd { color: var(--ink); }
.legal ul { padding-inline-start: 1.2em; } .legal li { margin-bottom: .4em; }
.legal a { color: var(--mid); font-weight: 600; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0 40px; }
.lead-dark { font-size: 1.1rem; color: var(--muted) !important; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 10px 20px; margin: 20px 0 24px; }
.facts dt { font-weight: 600; color: var(--dark); } .facts dd { margin: 0; }
.l-fr, .l-ar, .l-ber { display: none; }
html:lang(fr) .l-en, html:lang(ar) .l-en, html:lang(ber) .l-en { display: none; }
html:lang(fr) .l-fr, html:lang(ar) .l-ar, html:lang(ber) .l-ber { display: block; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

/* ---------- Algerian Arabic (Darija), right-to-left ---------- */
/* Arabic letters join, so no letter-spacing or uppercase; Arabic also needs taller lines. */
html:lang(ar) body { line-height: 1.85; }
html:lang(ar) h1, html:lang(ar) h2, html:lang(ar) h3 { line-height: 1.45; letter-spacing: 0; }
html:lang(ar) .eyebrow { letter-spacing: 0; text-transform: none; font-size: .95rem; }
html:lang(ar) .hero h1 { max-width: 17ch; }
html:lang(ar) .lang button[lang] { font-size: .85rem; padding-block: .42em; }
[dir="rtl"] .hc-row i::after { background: linear-gradient(270deg, var(--mid), var(--light)); }
[dir="rtl"] .hero-card { transform: rotate(-1.2deg); }
[dir="rtl"] .leaf-a { right: auto; left: -140px; transform: rotate(-10deg) scaleX(-1); }
[dir="rtl"] .leaf-b { left: auto; right: -120px; transform: rotate(20deg) scaleX(-1); }
[dir="rtl"] .step h3 span:first-child { display: inline-block; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .form input[type="email"], [dir="rtl"] .form input[type="tel"] { direction: ltr; text-align: right; }
[dir="rtl"] .stat b { direction: ltr; text-align: right; }
@media (max-width: 980px) { [dir="rtl"] .hero-card { transform: none; } }

/* ---------- Tamazight (Latin) ---------- */
/* Letters Poppins lacks (ɛ, ɣ…) fall back to Noto Sans from the font stack. */
.lang button[data-lang="ber"] { font-family: "Noto Sans Tifinagh", sans-serif; font-size: 1rem; padding-block: .32em; }
