/* =========================================================================
   نظام التصميم — Design System
   منصة رقمية احترافية (Arabic-first, RTL, Premium, Conversion-focused)
   ملف واحد يحكم: الألوان، الخطوط، المسافات، المكوّنات المشتركة.
   ========================================================================= */

/* ---------------------------------------------------------------
   1) Design Tokens
   --------------------------------------------------------------- */
:root {
  /* Brand accent — بنفسجي/إنديجو (مستمدّ من اللوقو) */
  --accent:        #2563EB;
  --accent-strong: #1B4ED4;
  --accent-deep:   #163C9E;
  --accent-tint:   #E6EEFD;
  --accent-tint-2: #F1F6FF;
  --accent-bright: #5B8DEF;   /* بنفسجي أفتح للتفاعل */

  /* Sale / discount — تيراكوتا دافئ راقٍ (للخصومات والعروض) */
  --sale:        #C2410C;
  --sale-strong: #9A3412;
  --sale-bg:     #FBEDE6;
  --gold:        #B7791F;   /* تقييمات / نجوم */

  /* Ink / neutrals — إنديجو داكن (متناسق مع اللوقو) */
  --ink:        #13223F;   /* عناوين + أزرار رئيسية + مقاطع داكنة */
  --ink-soft:   #3A4360;   /* نص أساسي */
  --muted:      #5F6884;   /* نص ثانوي */
  --muted-2:    #99A0B5;   /* نص خافت */

  /* Surfaces */
  --bg:         #FAFBFF;   /* خلفية باردة off-white بلمسة لافندر */
  --surface:    #FFFFFF;
  --surface-2:  #F2F5FC;   /* بطاقات هادئة */
  --ink-panel:  #0F1D3D;   /* مقاطع داكنة إنديجو */
  --ink-panel-2:#17264A;

  /* Lines */
  --line:       #E5E9F3;
  --line-2:     #D6DCEC;
  --line-dark:  rgba(255,255,255,.10);
  --line-dark-2:rgba(255,255,255,.16);

  /* Typography */
  --font: "IBM Plex Sans Arabic", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-eyebrow: .8125rem;
  --fs-body:    1.0625rem;
  --fs-lead:    1.25rem;

  /* Fluid display sizes */
  --fs-h1: clamp(2.35rem, 1.6rem + 3.4vw, 4.4rem);
  --fs-h2: clamp(1.9rem, 1.4rem + 2.1vw, 3rem);
  --fs-h3: clamp(1.35rem, 1.15rem + .8vw, 1.75rem);

  /* Radius */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  /* Shadows — خفيفة وراقية */
  --sh-1: 0 1px 2px rgba(16,21,27,.05);
  --sh-2: 0 6px 24px -12px rgba(16,21,27,.16);
  --sh-3: 0 24px 60px -28px rgba(16,21,27,.28);

  --container: 1200px;
  --header-h: 74px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------------------------------------------------------------
   2) Reset / Base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,h2,h3,h4 { color: var(--ink); line-height: 1.18; font-weight: 700; letter-spacing: -.01em; }
/* عناوين العرض الكبيرة: خط Tajawal الثقيل لطاقة عصرية جريئة */
h1, h2 { font-family: "Tajawal", var(--font); font-weight: 800; letter-spacing: -.022em; line-height: 1.14; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

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

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

/* الأرقام والكلمات اللاتينية داخل نص عربي تبقى LTR ومرتّبة */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------------------------------------------------------------
   3) Layout helpers
   --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 5vw, 112px); }
.section--tight { padding-block: clamp(48px, 4vw, 80px); }
.section--dark { background: var(--ink-panel); color: rgba(255,255,255,.72); }
.section--dark h1,.section--dark h2,.section--dark h3,.section--dark h4 { color: #fff; }
.section--alt { background: var(--surface); }

.stack > * + * { margin-top: var(--sp-4); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-sm { max-width: 560px; }
.maxw-md { max-width: 680px; }
.maxw-lg { max-width: 820px; }

.grid { display: grid; gap: 24px; }
@media (min-width: 720px)  { .g-2 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 720px)  { .g-3-sm { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 980px)  { .g-3 { grid-template-columns: repeat(3,1fr); } .g-3-sm { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 980px)  { .g-4 { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 720px) and (max-width: 979px) { .g-4 { grid-template-columns: repeat(2,1fr); } }

/* ---------------------------------------------------------------
   4) Typography components
   --------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .02em;
  color: var(--accent-strong); text-transform: none;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.section--dark .eyebrow { color: #9CC0FF; }
.section--dark .eyebrow::before { background: #5B8DEF; }

.lead { font-size: var(--fs-lead); line-height: 1.7; color: var(--muted); }
.section--dark .lead { color: rgba(255,255,255,.66); }

.section-head { max-width: 700px; margin-bottom: clamp(40px, 4vw, 64px); }
.section-head .lead { margin-top: 16px; }
.section-head--center { margin-inline: auto; text-align: center; }

.kicker-num {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  font-weight: 700; color: var(--line-2); line-height: 1;
  letter-spacing: -.02em;
}

/* ---------------------------------------------------------------
   5) Buttons
   --------------------------------------------------------------- */
.btn {
  --_bg: var(--ink); --_fg: #fff; --_bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: .975rem; font-weight: 600; line-height: 1;
  padding: 15px 26px; border-radius: var(--r-pill);
  background: var(--_bg); color: var(--_fg); border: 1px solid var(--_bd);
  transition: transform .18s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }

.btn--accent { --_bg: var(--accent); --_bd: var(--accent); --_fg:#fff; }
.btn--accent:hover { --_bg: var(--accent-strong); }

.btn--ghost {
  --_bg: transparent; --_fg: var(--ink); --_bd: var(--line-2);
}
.btn--ghost:hover { --_bg: var(--surface); box-shadow: var(--sh-2); border-color: var(--ink); }

.btn--light { --_bg:#fff; --_fg: var(--ink); --_bd:#fff; }

.btn--on-dark-ghost { --_bg: transparent; --_fg:#fff; --_bd: var(--line-dark-2); }
.btn--on-dark-ghost:hover { --_bg: rgba(255,255,255,.06); border-color: rgba(255,255,255,.4); }

.btn--sm { padding: 11px 18px; font-size: .9rem; }

/* أهداف لمس ≥ 44px على الأجهزة اللمسية (Priority 2 — Touch) */
@media (pointer: coarse) {
  .btn--sm { min-height: 44px; }
  .header-cta { min-height: 40px; }
}
.btn--lg { padding: 17px 32px; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--ink); font-size: .975rem;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--accent-strong); }
.link-arrow:hover svg { transform: translateX(-5px); } /* RTL: السهم لليسار */
.section--dark .link-arrow { color:#fff; }

/* ---------------------------------------------------------------
   6) Pills / chips / badges
   --------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .875rem; font-weight: 500; color: var(--ink-soft);
}
.pill--tint { background: var(--accent-tint); border-color: transparent; color: var(--accent-strong); }
.tag {
  font-size: .8rem; font-weight: 600; color: var(--muted);
  padding: 5px 11px; border-radius: 7px; background: var(--surface-2);
}

.chk {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 1rem; color: var(--ink-soft); line-height: 1.6;
}
.chk::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px;
  border-radius: 50%; background: var(--accent-tint) center/12px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.section--dark .chk { color: rgba(255,255,255,.8); }
.section--dark .chk::before { background-color: rgba(59,130,246,.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CC0FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------
   7) Cards
   --------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--line-2); }
.card__ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent-strong); margin-bottom: 18px;
}
.card__ic svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------
   8) Icon stroke helper
   --------------------------------------------------------------- */
.ic { width: 24px; height: 24px; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------
   9) Placeholders (بدل الصور الحقيقية — قابلة للاستبدال)
   --------------------------------------------------------------- */
.ph {
  position: relative; border-radius: var(--r);
  background:
    repeating-linear-gradient(-45deg, transparent 0 11px, rgba(16,21,27,.025) 11px 12px),
    var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
  color: var(--muted-2);
}
.ph::after {
  content: attr(data-label);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------------------------------------------------------------
   10) Divider
   --------------------------------------------------------------- */
.hr { height: 1px; background: var(--line); border: 0; }
.section--dark .hr { background: var(--line-dark); }

/* ---------------------------------------------------------------
   11) Reveal on scroll
   --------------------------------------------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------
   12) Utilities
   --------------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mt-0{margin-top:0}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}
.mt-5{margin-top:24px}.mt-6{margin-top:32px}.mt-7{margin-top:48px}
.mb-0{margin-bottom:0}
.flex{display:flex}.items-center{align-items:center}.justify-between{justify-content:space-between}
.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.wrap{flex-wrap:wrap}
.hide-mobile{display:none}
@media (min-width:900px){ .hide-mobile{display:initial} .hide-desktop{display:none} }
