/* ============================================================
   مبادرة — Landing v2 — النسخة 222
   يعتمد على tokens.css + components.css
   قيم محلية مشتقة فقط، لا hex جديد خارج المشتقات أدناه
   ============================================================ */

:root {
  --ld-pulse:      var(--success);
  --ld-pulse-glow: rgba(22, 128, 60, 0.45); /* مشتق من --success */
}

/* ================= الإطار العام ================= */
.ld-wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.ld-sec { padding-block: var(--space-9); }

.ld-eyebrow {
  display: block;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--indigo-600);
  letter-spacing: var(--tracking-wide);
  margin-block-end: var(--space-2);
}

.ld-h2 {
  text-align: center;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--ink);
  margin-block-end: var(--space-7);
}

.ld-grid { display: grid; gap: var(--space-4); }
.ld-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ================= الهيدر ================= */
.ld-head {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out);
}
.ld-head.is-scrolled { border-bottom-color: var(--border); }

.ld-head__in {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.ld-logo { display: flex; align-items: baseline; gap: var(--space-2); }
.ld-logo__word {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  color: var(--accent);
}
.ld-logo__tag {
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  color: var(--muted);
}

.ld-nav { display: flex; align-items: center; gap: var(--space-2); }

/* ================= الهيرو ================= */
.ld-hero {
  padding-block: var(--space-10) var(--space-7);
  text-align: center;
}

.ld-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}
.ld-badge img { width: var(--icon-md); height: var(--icon-md); }

.ld-hero h1 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-block: var(--space-5) var(--space-3);
}
.ld-hero h1 .u { color: var(--accent); }

.ld-sub {
  font-size: var(--text-md);
  color: var(--body);
  line-height: var(--leading-relaxed);
  max-width: 34rem;
  margin-inline: auto;
}

/* وحدة الدعوة: زر + شريط المتواجدين ملتصقان */
.ld-cta {
  width: min(320px, 100%);
  margin: var(--space-7) auto 0;
}

.ld-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: background var(--duration-fast) var(--ease-out);
}
.ld-cta__btn:hover  { background: var(--accent-hover); }
.ld-cta__btn:active { background: var(--accent-active); }

.ld-cta__live {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--body);
}

.ld-cta__num {
  font-weight: var(--weight-bold);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: opacity var(--duration-fast) var(--ease-out);
}

/* النبض الأخضر بشعاع خفيف */
.ld-pulse { position: relative; width: 9px; height: 9px; flex: none; }
.ld-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: var(--ld-pulse);
  opacity: 0.45;
  animation: ld-ping 1.9s var(--ease-out) infinite;
}
.ld-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: var(--ld-pulse);
  box-shadow: 0 0 8px var(--ld-pulse-glow);
}
@keyframes ld-ping {
  0%        { transform: scale(0.55); opacity: 0.7; }
  80%, 100% { transform: scale(2.6);  opacity: 0; }
}

.ld-loginline {
  margin-block-start: var(--space-4);
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ================= البحث التجريبي ================= */
.ld-search { padding-block: var(--space-6) 0; }

.ld-search__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}

.ld-search__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-block-end: var(--space-1);
}
.ld-search__hint {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-block-end: var(--space-4);
}

.ld-sform {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: stretch;
}

.ld-seg {
  display: inline-flex;
  background: var(--surface-sunk);
  border-radius: var(--radius-md);
  padding: 3px;
  flex: none;
}
.ld-seg__btn {
  height: 36px;
  padding-inline: var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--body);
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}
.ld-seg__btn.is-on {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--weight-semibold);
}

.ld-sform .mb-select-wrap { flex: 1; min-width: 150px; }
.ld-go { flex: none; }

/* كتلة النتائج المقفلة */
.ld-results {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-slow) var(--ease-out);
}
.ld-results.is-open { grid-template-rows: 1fr; }
.ld-results__in { overflow: hidden; }
.ld-results__stage {
  position: relative;
  margin-block-start: var(--space-5);
  padding-block: var(--space-6);
}

.ld-skels {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  filter: blur(3px);
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
}
.ld-skel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.ld-skel__ava {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--border);
  margin-block-end: var(--space-3);
}
.ld-skel__bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border);
  margin-block-end: var(--space-2);
}
.ld-skel__bar--soft { background: var(--surface-sunk); }

.ld-lock {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ld-lock__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-5) var(--space-6);
  text-align: center;
  max-width: 22rem;
}
.ld-lock__card img {
  width: 40px;
  height: 40px;
  margin-inline: auto;
  margin-block-end: var(--space-2);
}
.ld-lock__t {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-block-end: var(--space-1);
}
.ld-lock__d {
  font-size: var(--text-sm);
  color: var(--body);
  margin-block-end: var(--space-4);
}

/* ================= بطاقات القيم ================= */
.ld-vcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}
.ld-vcard img {
  width: 56px;
  height: 56px;
  margin-inline: auto;
  margin-block-end: var(--space-4);
}
.ld-vcard h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  margin-block-end: var(--space-2);
}
.ld-vcard p {
  font-size: var(--text-sm);
  color: var(--body);
  line-height: var(--leading-relaxed);
}

/* ================= بطاقات المزايا ================= */
.ld-fcard {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.ld-fcard__ic {
  width: 64px;
  height: 64px;
  flex: none;
  background: var(--accent-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ld-fcard__ic img { width: 40px; height: 40px; }
.ld-fcard h3 {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-block-end: var(--space-1);
}
.ld-fcard p {
  font-size: var(--text-sm);
  color: var(--body);
  line-height: var(--leading-relaxed);
}

/* ================= قسم العهد ================= */
.ld-oath {
  background: var(--accent-subtle);
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-7);
}
.ld-oath img { width: 110px; height: 110px; flex: none; }
.ld-oath h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-block-end: var(--space-3);
}
.ld-oath p {
  color: var(--body);
  line-height: var(--leading-relaxed);
  max-width: 44rem;
}
.ld-oath__q {
  display: block;
  margin-block-start: var(--space-4);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--accent);
}

/* ================= قصص النجاح ================= */
.ld-stories {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: var(--space-1);
  padding-inline: var(--space-5);
  margin-inline: calc(var(--space-5) * -1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ld-stories::-webkit-scrollbar { display: none; }

.ld-stories-shell { position: relative; }

.ld-snav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-raised);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--body);
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}
.ld-snav:hover {
  color: var(--accent);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.ld-snav:active { transform: translateY(-50%) scale(0.96); }
.ld-snav svg { width: var(--icon-md); height: var(--icon-md); }
.ld-snav--prev { inset-inline-start: -10px; }
.ld-snav--next { inset-inline-end: -10px; }
.ld-story {
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.ld-story__top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block-end: var(--space-3);
}
.ld-story__ava {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--radius-full);
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ld-story__ava img { width: 32px; height: 32px; }
.ld-story__name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-block-end: 2px;
}
.ld-story p {
  font-size: var(--text-sm);
  color: var(--body);
  line-height: var(--leading-loose);
}

/* ================= الأسئلة الشائعة ================= */
.ld-faq { max-width: 44rem; margin-inline: auto; }
.ld-faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-block-end: var(--space-3);
  overflow: hidden;
}
.ld-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}
.ld-faq summary::-webkit-details-marker { display: none; }
.ld-faq summary::after {
  content: '';
  width: 9px;
  height: 9px;
  flex: none;
  border-inline-end: 2px solid var(--muted);
  border-block-end: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--duration-base) var(--ease-out);
}
.ld-faq details[open] summary::after {
  transform: translateY(3px) rotate(-135deg);
}
.ld-faq__a {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-sm);
  color: var(--body);
  line-height: var(--leading-relaxed);
}

/* ================= الدعوة الختامية ================= */
.ld-final {
  background: var(--indigo-900);
  border-radius: var(--radius-2xl);
  padding: var(--space-9) var(--space-6);
  text-align: center;
}
.ld-final h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--stone-0);
  margin-block-end: var(--space-3);
}
.ld-final p {
  color: var(--indigo-200);
  line-height: var(--leading-relaxed);
  max-width: 36rem;
  margin-inline: auto;
  margin-block-end: var(--space-6);
}
.ld-final__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h-lg);
  padding-inline: var(--space-7);
  background: var(--stone-0);
  color: var(--indigo-800);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  transition:
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-instant) var(--ease-out);
}
.ld-final__btn:hover  { background: var(--indigo-50); }
.ld-final__btn:active { transform: scale(0.98); }

/* ================= الفوتر ================= */
.ld-foot {
  margin-block-start: var(--space-9);
  border-top: 1px solid var(--border);
  padding-block: var(--space-7);
}
.ld-foot__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.ld-foot__brand {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--accent);
  margin-block-end: 2px;
}
.ld-foot__tag { font-size: var(--text-xs); color: var(--muted); }
.ld-foot__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
}
.ld-foot__soc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--body);
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}
.ld-foot__soc:hover { color: var(--accent); border-color: var(--border-strong); }
.ld-foot__soc svg { width: var(--icon-md); height: var(--icon-md); }
.ld-foot__copy {
  margin-block-start: var(--space-5);
  font-size: var(--text-2xs);
  color: var(--faint);
  text-align: center;
}

/* ================= ظهور تدريجي عند التمرير ================= */
.ld-rv {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--duration-slower) var(--ease-out),
    transform var(--duration-slower) var(--ease-out);
}
.ld-rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .ld-rv { opacity: 1; transform: none; }
}

/* ================= تجاوب ================= */
@media (max-width: 980px) {
  .ld-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .ld-oath {
    flex-direction: column;
    text-align: center;
    padding: var(--space-7) var(--space-5);
  }
  .ld-oath p { max-width: none; }
}

@media (max-width: 680px) {
  .ld-sec { padding-block: var(--space-8); }
  .ld-head__in { height: 58px; }
  .ld-head .mb-btn { height: 38px; padding-inline: var(--space-4); font-size: var(--text-sm); }
  .ld-logo__word { font-size: var(--text-lg); }
  .ld-hero { padding-block: var(--space-8) var(--space-6); }
  .ld-grid--3 { grid-template-columns: 1fr; }
  .ld-sform { flex-direction: column; }
  .ld-seg {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .ld-seg__btn { width: 100%; }
  .ld-sform .mb-select-wrap { min-width: 0; }
  .ld-go { width: 100%; }
  .ld-skels { grid-template-columns: repeat(2, 1fr); }
  .ld-skels .ld-skel:nth-child(3) { display: none; }
  .ld-stories { grid-auto-columns: 82%; }
  .ld-snav { display: none; }
  .ld-final { padding: var(--space-8) var(--space-5); }
}

/* ================= الصفحات القانونية ================= */
.ld-legal {
  max-width: var(--container-md);
  margin-inline: auto;
  padding-inline: var(--space-5);
  padding-block: var(--space-8) var(--space-9);
}
.ld-legal h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin-block-end: var(--space-2);
}
.ld-legal__upd {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-block-end: var(--space-6);
}
.ld-legal h2 {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin-block: var(--space-7) var(--space-3);
}
.ld-legal p {
  font-size: var(--text-base);
  color: var(--body);
  line-height: var(--leading-relaxed);
  margin-block-end: var(--space-3);
}
.ld-legal ul {
  padding-inline-start: var(--space-5);
  margin-block-end: var(--space-3);
}
.ld-legal li {
  font-size: var(--text-base);
  color: var(--body);
  line-height: var(--leading-relaxed);
  margin-block-end: var(--space-2);
}
.ld-legal .ld-note {
  background: var(--accent-subtle);
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--body);
  line-height: var(--leading-relaxed);
  margin-block: var(--space-4) var(--space-5);
}

.ld-lcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-block-end: var(--space-4);
}
.ld-lcard h2 { margin-block: 0 var(--space-3); }
.ld-lcard > :last-child { margin-block-end: 0; }

@media (max-width: 680px) {
  .ld-lcard { padding: var(--space-4); }
}
