/* ==========================================================================
   خِبرة — نظام التصميم
   مشتق حرفياً من هوية التطبيق (أيقونة App Store):
     الفحمي  #313132   ·  الذهبي  #8D722B   ·  الأرضية  #F8FAFB
   ========================================================================== */

:root {
  /* --- ألوان الهوية --- */
  --ink:        #313132;   /* فحمي العلامة */
  --ink-soft:   #55555A;
  --ink-mute:   #80808A;
  --gold:       #8D722B;   /* ذهبي العلامة */
  --gold-deep:  #6F5A20;
  --gold-soft:  #B99A58;
  --gold-wash:  #F3EEE2;

  --sand:       #F8FAFB;   /* أرضية الأيقونة */
  --surface:    #FFFFFF;
  --line:       rgba(49, 49, 50, .10);
  --line-soft:  rgba(49, 49, 50, .06);

  /* --- مقاييس --- */
  --radius:     18px;
  --radius-sm:  12px;
  --radius-pill: 999px;
  --shell:      1180px;
  --gutter:     20px;

  --shadow-sm:  0 1px 2px rgba(49,49,50,.05), 0 2px 8px rgba(49,49,50,.04);
  --shadow-md:  0 2px 4px rgba(49,49,50,.04), 0 14px 38px rgba(49,49,50,.08);
  --shadow-lg:  0 8px 20px rgba(49,49,50,.08), 0 36px 80px rgba(49,49,50,.14);

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

/* ==========================================================================
   أساسيات
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Almarai", "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--ink);
}

p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s var(--ease);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold); color: #fff; }

/* اللغة الإنجليزية تنقلب للـLTR */
html[lang="en"] body { font-family: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif; }

/* ==========================================================================
   تخطيط
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 116px); }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section--tight { padding-block: clamp(48px, 6vw, 76px); }

.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--gold);
  margin-bottom: 14px;
}
/* المعيّن الذهبي — مأخوذ من الأيقونة */
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.section-title { font-size: clamp(27px, 3.6vw, 42px); }

.section-sub {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.85;
}

/* ==========================================================================
   أزرار
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--ink   { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn--ink:hover { background: #1F1F20; box-shadow: var(--shadow-md); }

.btn--gold  { background: var(--gold); color: #fff; box-shadow: var(--shadow-sm); }
.btn--gold:hover { background: var(--gold-deep); box-shadow: var(--shadow-md); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: #fff; }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--gold-wash); }

/* زرّا المتجرين */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.store-btn:hover { transform: translateY(-2px); background: #1F1F20; box-shadow: var(--shadow-md); }
.store-btn svg { width: 25px; height: 25px; flex: none; fill: currentColor; }
.store-btn b { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; }
.store-btn span { display: block; font-size: 11.5px; opacity: .72; line-height: 1.3; }

.store-btn--alt { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.store-btn--alt:hover { background: #fff; border-color: var(--ink); }

/* على الخلفية الداكنة */
.on-dark .store-btn { background: #fff; color: var(--ink); border-color: #fff; }
.on-dark .store-btn:hover { background: var(--gold-wash); }
.on-dark .store-btn--alt { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.on-dark .store-btn--alt:hover { background: rgba(255,255,255,.08); border-color: #fff; }

/* ==========================================================================
   الهيدر
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 250, 251, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line); background: rgba(248, 250, 251, .94); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 74px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand img { height: 30px; width: auto; }
.brand__name {
  font-family: "Almarai", sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--gold);
  padding-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* مبدّل اللغة — رابط لكل لغة مفعّلة، يُبنى من الخادم */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
}
.lang-opt {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mute);
  line-height: 1.6;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-opt:hover { color: var(--ink); background: var(--sand); }
.lang-opt.on { background: var(--ink); color: #fff; }

.burger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.burger svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; }

/* قائمة الجوال */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--sand);
  padding: 10px var(--gutter) 22px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 13px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a:hover { color: var(--ink); }
.mobile-nav .btn { width: 100%; margin-top: 18px; }

/* ==========================================================================
   الهيرو
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 92px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}

/* هالة ذهبية خفيفة خلف الهيرو */
.hero::before {
  content: "";
  position: absolute;
  inset-block-start: -220px;
  inset-inline-start: -160px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(141,114,43,.09) 0%, rgba(141,114,43,0) 68%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero h1 .gold { color: var(--gold); }

.hero__lead {
  margin-top: 20px;
  max-width: 50ch;
  font-size: clamp(16px, 1.7vw, 18.5px);
  line-height: 1.9;
  color: var(--ink-soft);
}

.hero .store-row { margin-top: 32px; }

.hero__note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 9px;
}
.hero__note::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--gold-soft);
  transform: rotate(45deg);
  flex: none;
}

/* --- ماكيت الجوال (CSS خالص، بلا صور ثقيلة) --- */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
}
.phone-stage::before {
  content: "";
  position: absolute;
  inset-block: 8%;
  inset-inline: 12%;
  background: radial-gradient(ellipse at center, rgba(49,49,50,.14) 0%, rgba(49,49,50,0) 70%);
  filter: blur(26px);
}

.phone {
  position: relative;
  width: min(292px, 76vw);
  aspect-ratio: 292 / 596;
  background: var(--ink);
  border-radius: 44px;
  padding: 9px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255,255,255,.14);
}

.phone__screen {
  position: relative;
  height: 100%;
  background: #fff;
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone__notch {
  position: absolute;
  top: 9px; left: 50%;
  transform: translateX(-50%);
  width: 86px; height: 23px;
  background: var(--ink);
  border-radius: var(--radius-pill);
  z-index: 3;
}

.phone__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
}

.phone__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.phone__top strong { font-size: 13px; font-weight: 700; }
.phone__top span { font-size: 11px; color: var(--gold); font-weight: 600; }

.phone__body { padding: 15px 14px; flex: 1; overflow: hidden; }
.phone__label { font-size: 11px; font-weight: 700; color: var(--ink-soft); margin-bottom: 11px; }

.phone__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.phone__card {
  background: var(--sand);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 11px 10px;
}
.phone__card i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--gold-wash);
  margin-bottom: 8px;
}
.phone__card i svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 1.7; }
.phone__card b { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.4; }
.phone__card small { display: block; font-size: 8.5px; color: var(--ink-mute); line-height: 1.55; margin-top: 3px; }

.phone__cta {
  margin-top: 12px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  text-align: center;
  padding: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================================================
   شريط التخصصات السريع
   ========================================================================== */

.strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-block: 22px;
}
.strip__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
  margin-inline-end: 6px;
}
.chip {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--sand);
}

/* ==========================================================================
   الخطوات
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step { position: relative; padding-top: 26px; }

/* الخط الفاصل العلوي + الرقم */
.step::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--line);
}
.step::after {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 34px; height: 2px;
  background: var(--gold);
}

.step__num {
  font-family: "Almarai", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .1em;
}
.step h3 { margin-top: 10px; font-size: 18px; }
.step p { margin-top: 9px; font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); }

/* ==========================================================================
   البطاقات — الخدمات / المميزات
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(141,114,43,.3);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--gold-wash);
  margin-bottom: 18px;
}
.card__icon svg {
  width: 22px; height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { font-size: 18.5px; }
.card p { margin-top: 10px; font-size: 14.5px; line-height: 1.85; color: var(--ink-soft); }

/* بطاقات التخصصات — أهدأ */
.card--quiet { padding: 24px 22px; }
.card--quiet h3 { font-size: 16.5px; }
.card--quiet p  { font-size: 13.5px; }

/* قائمة المميزات */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px 34px;
}
.feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.feature__tick {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold-wash);
  display: flex; align-items: center; justify-content: center;
  margin-top: 3px;
}
.feature__tick svg { width: 13px; height: 13px; stroke: var(--gold); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.feature b { display: block; font-size: 15.5px; font-weight: 600; }
.feature p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.75; margin-top: 2px; }

/* ==========================================================================
   قسم داكن — للمحامين + الدعوة النهائية
   ========================================================================== */

.on-dark {
  background: var(--ink);
  color: #fff;
}
.on-dark h2, .on-dark h3 { color: #fff; }
.on-dark .section-sub, .on-dark p { color: rgba(255,255,255,.72); }
.on-dark .eyebrow { color: var(--gold-soft); }
.on-dark .eyebrow::before { background: var(--gold-soft); }

.band {
  position: relative;
  overflow: hidden;
}
/* معيّنات ذهبية باهتة — زخرفة الهوية */
.band::before {
  content: "";
  position: absolute;
  inset-block-start: -90px;
  inset-inline-end: -90px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(185,154,88,.22) 0%, rgba(185,154,88,0) 70%);
  pointer-events: none;
}

.band__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

.cta-final { text-align: center; }
.cta-final .store-row { justify-content: center; margin-top: 30px; }
.cta-final__mark { height: 46px; width: auto; margin-inline: auto; margin-bottom: 24px; opacity: .95; }

/* ==========================================================================
   الفوتر
   ========================================================================== */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 64px) 26px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.footer__about p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 34ch;
}

.footer__col h4 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink);
  margin-bottom: 15px;
}
.footer__col a, .footer__col li {
  display: block;
  padding-block: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer__col a:hover { color: var(--gold); }

.social { display: flex; gap: 9px; margin-top: 16px; }
.social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.social a:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--ink-mute);
}

/* ==========================================================================
   ظهور تدريجي عند التمرير
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .store-btn:hover, .social a:hover { transform: none; }
}

/* ==========================================================================
   الاستجابة
   ========================================================================== */

@media (max-width: 1024px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 22px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .band__grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .nav { display: none; }
  .lang-opt { padding: 5px 10px; font-size: 12px; }
  .burger { display: inline-flex; }
  .header__actions { margin-inline-start: auto; }
  .header__actions .btn { display: none; }

  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero .store-row, .hero__note { justify-content: center; }
  .section-head { margin-inline: auto; text-align: center; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .store-row { flex-direction: column; }
  .store-btn { justify-content: flex-start; }
  .header__inner { height: 64px; }
  .brand img { height: 26px; }
}
