:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --brand-deep: #1e1b4b;
  --brand-soft: #eef2ff;
  --amber: #f59e0b;
  --ink: #16151f;
  --muted: #5d5b6e;
  --line: #e6e5ef;
  --bg: #fbfbfe;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  font-size: 16.5px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.hidden { display: none !important; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 15.5px;
  border: 1.5px solid transparent; cursor: pointer; transition: .15s; white-space: nowrap; font-family: inherit;
}
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(79,70,229,.28); }
.btn.primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn.ghost { border-color: var(--line); background: #fff; }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.light { background: #fff; color: var(--brand-deep); }
.btn.light:hover { background: var(--brand-soft); }
.btn.big { padding: 15px 28px; font-size: 17px; }
.btn.small { padding: 8px 14px; font-size: 14.5px; }

/* ---------- الشريط العلوي ---------- */
.nav {
  position: sticky; top: 0; z-index: 20; background: rgba(251,251,254,.86);
  backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid transparent; transition: .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; letter-spacing: -.2px; }
.brand img { width: 36px; height: 36px; }
.brand b { color: var(--brand); }
.nav-links { display: flex; gap: 24px; margin-inline-start: 14px; color: var(--muted); font-weight: 500; font-size: 15.5px; }
.nav-links a:hover { color: var(--brand); }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; background: #f0eff7; border-radius: 10px; padding: 3px; }
.lang button { border: 0; background: none; padding: 5px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--muted); }
.lang button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lang-m, .m-only { display: none !important; }
.menu-btn { display: none; border: 0; background: none; font-size: 24px; cursor: pointer; padding: 4px 8px; }

/* ---------- الواجهة ---------- */
.hero { position: relative; overflow: hidden; padding: 70px 0 90px; }
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto; height: 120%;
  background: radial-gradient(600px 380px at 75% 30%, rgba(99,102,241,.16), transparent 70%),
              radial-gradient(500px 300px at 15% 10%, rgba(245,158,11,.10), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--muted);
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.15); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.22; margin: 18px 0 16px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--brand); position: relative; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 30px; max-width: 34em; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 16px; font-size: 14.5px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero .note span::before { content: '✓'; color: #16a34a; font-weight: 700; margin-inline-end: 6px; }

/* ---------- نموذج الواجهة (رسم بالـ CSS) ---------- */
.mock {
  background: #fff; border-radius: 22px; border: 1px solid var(--line);
  box-shadow: 0 30px 70px -20px rgba(30,27,75,.30), 0 8px 20px rgba(30,27,75,.06);
  display: grid; grid-template-columns: 54px 200px 1fr; height: 430px; overflow: hidden; font-size: 13.5px;
}
.mock-rail { background: var(--brand-deep); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 0; }
.mock-rail img { width: 30px; height: 30px; }
.mock-rail span { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.12); }
.mock-rail span.on { background: rgba(255,255,255,.32); }
.mock-list { border-inline-end: 1px solid var(--line); overflow: hidden; }
.mock-list .hd { padding: 12px; font-weight: 700; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.mock-list .hd small { background: var(--brand); color: #fff; border-radius: 99px; padding: 0 8px; font-size: 11.5px; line-height: 20px; }
.chat-row { display: flex; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #f2f1f7; align-items: center; }
.chat-row.on { background: var(--brand-soft); }
.av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.chat-row .t { min-width: 0; flex: 1; }
.chat-row b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .acc { font-size: 10.5px; padding: 0 6px; border-radius: 6px; display: inline-block; line-height: 17px; margin-top: 2px; }
.chat-row .dot { width: 18px; height: 18px; border-radius: 50%; background: #22c55e; color: #fff; font-size: 10.5px; display: grid; place-items: center; }
.mock-chat { background: #eeedf4; display: flex; flex-direction: column; }
.mock-chat .hd { background: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.mock-chat .hd b { font-size: 13.5px; }
.mock-chat .hd small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.msgs { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 78%; padding: 7px 11px; border-radius: 12px; background: #fff; line-height: 1.5; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.bub.out { align-self: flex-end; background: #e0e7ff; }
.bub.bot { align-self: flex-end; background: #fef6e4; }
.bub small { display: block; font-size: 10.5px; color: var(--muted); }
.mock-input { background: #fff; margin: 0 10px 10px; border-radius: 10px; padding: 9px 12px; color: #9b99ad; font-size: 12.5px; display: flex; justify-content: space-between; }
.mock-input i { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); display: inline-block; }
html[dir="rtl"] .bub.out, html[dir="rtl"] .bub.bot { align-self: flex-start; }

/* ---------- الأقسام ---------- */
section { padding: 90px 0; }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 50px; }
.kicker { color: var(--brand); font-weight: 700; font-size: 14.5px; letter-spacing: .3px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.3; margin: 8px 0 12px; letter-spacing: -.3px; }
.sec-head p { color: var(--muted); margin: 0; font-size: 17.5px; }

.problem { background: #fff; border-block: 1px solid var(--line); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compare > div { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.compare h3 { margin: 0 0 14px; font-size: 20px; }
.compare ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.compare li { display: flex; gap: 10px; }
.compare .bad { background: #fbfafc; }
.compare .bad li::before { content: '✕'; color: #dc2626; font-weight: 700; }
.compare .good { background: linear-gradient(160deg, #eef2ff, #fff 60%); border-color: #c7d2fe; }
.compare .good li::before { content: '✓'; color: #16a34a; font-weight: 700; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: .2s; }
.feat:hover { border-color: #c7d2fe; transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(79,70,229,.3); }
.feat .ic { width: 46px; height: 46px; border-radius: 13px; background: var(--brand-soft); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.feat h3 { margin: 0 0 6px; font-size: 17.5px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 28px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.step::before {
  counter-increment: s; content: counter(s); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 14px; font-size: 18px;
}
.step h3 { margin: 0 0 6px; font-size: 18.5px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- الأسعار ---------- */
.pricing-bg { background: linear-gradient(180deg, #fff, var(--brand-soft)); border-top: 1px solid var(--line); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px 26px; display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--brand); box-shadow: 0 24px 50px -20px rgba(79,70,229,.45); }
.plan .badge { position: absolute; top: -13px; inset-inline-start: 50%; translate: -50% 0; background: var(--amber); color: #1f1300; font-size: 13px; font-weight: 700; padding: 3px 14px; border-radius: 99px; white-space: nowrap; }
html[dir="rtl"] .plan .badge { translate: 50% 0; }
.plan h3 { margin: 0; font-size: 21px; }
.plan .price { font-size: 44px; font-weight: 700; margin: 12px 0 2px; letter-spacing: -1px; line-height: 1.1; direction: ltr; text-align: start; }
html[dir="rtl"] .plan .price { text-align: right; }
.plan .per { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 15.5px; }
.plan li::before { content: '✓'; color: #16a34a; font-weight: 700; }
.plan li.no { color: #a3a1b3; }
.plan li.no::before { content: '—'; color: #c4c2d1; }
.plan .btn { width: 100%; }
.price-note { text-align: center; color: var(--muted); margin-top: 26px; font-size: 15px; }

/* ---------- الأسئلة ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; }
.faq details[open] { border-color: #c7d2fe; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; line-height: 1; color: var(--brand); transition: .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* ---------- الدعوة الأخيرة ---------- */
.cta-band { padding: 0 0 90px; }
.cta-box {
  background: radial-gradient(500px 260px at 85% 0%, rgba(245,158,11,.28), transparent 70%), linear-gradient(135deg, #4f46e5, #1e1b4b);
  color: #fff; border-radius: 28px; padding: 56px 40px; text-align: center;
}
.cta-box h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 10px; line-height: 1.3; }
.cta-box p { margin: 0 0 28px; opacity: .85; font-size: 18px; }
.cta-box .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-box .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.cta-box .btn.ghost:hover { border-color: #fff; color: #fff; }

/* ---------- التذييل ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 15px; background: #fff; }
footer .wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
footer .links { display: flex; gap: 20px; margin-inline-start: auto; flex-wrap: wrap; }
footer a:hover { color: var(--brand); }

/* ---------- زر واتساب العائم ---------- */
.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 30; width: 58px; height: 58px; border-radius: 50%;
  background: #22c55e; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(34,197,94,.45); transition: .15s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- الصفحات القانونية ---------- */
.legal { padding: 50px 0 80px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: 36px; margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin-bottom: 34px; }
.legal h2 { font-size: 21px; margin: 34px 0 8px; }
.legal p, .legal li { color: #34323f; }
.legal ul { padding-inline-start: 22px; }
.legal .box { background: var(--brand-soft); border-radius: 14px; padding: 16px 20px; margin: 20px 0; }

/* ---------- الحركة ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- الموبايل ---------- */
@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 44px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links { display: none; position: absolute; top: 70px; inset-inline: 0; background: #fff; flex-direction: column; gap: 0; margin: 0; border-bottom: 1px solid var(--line); padding: 6px 20px 14px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid #f2f1f7; }
  .menu-btn { display: block; }
  body:not([data-legal]) .nav-end .lang { display: none; }
  body[data-legal] .nav-end .btn.primary { display: none; }
  .nav-links .lang-m { display: inline-flex !important; align-self: flex-start; margin-top: 12px; }
  .nav-links .m-only { display: block !important; }
  .nav .login-link { display: none; }
  .nav .wrap { gap: 10px; }
  .brand { font-size: 19px; }
  .compare, .steps, .features { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .mock { grid-template-columns: 0 150px 1fr; height: 360px; font-size: 12.5px; }
  .mock-rail { display: none; }
  .chat-row .acc { display: none; }
  .cta-box { padding: 40px 22px; }
  footer .links { margin-inline-start: 0; }
}
@media (max-width: 420px) {
  .mock { grid-template-columns: 1fr; }
  .mock-list { display: none; }
  .lang button { padding: 5px 7px; }
}
