:root {
  --brand: #4361ee;
  --brand-2: #7209b7;
  --accent: #ff8a3d;
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f0f2fa;
  --line: #e6e8f2;
  --text: #111827;
  --text-soft: #4b5563;
  --text-faint: #9ca3af;
  --ok: #10b981;
  --bad: #ef4444;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(30, 42, 120, .28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --surface: #141a2e;
    --surface-2: #1b2340;
    --line: #263052;
    --text: #f3f4f6;
    --text-soft: #b4bcd0;
    --text-faint: #6b7591;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 50; }

/* خلفية ضوئية */
.glow { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.glow span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; }
.glow span:nth-child(1) { width: 420px; height: 420px; background: var(--brand); top: -160px; left: -120px; }
.glow span:nth-child(2) { width: 380px; height: 380px; background: var(--brand-2); top: 260px; right: -160px; opacity: .25; }
.glow span:nth-child(3) { width: 300px; height: 300px; background: var(--accent); bottom: -120px; left: 30%; opacity: .18; }

/* الشريط العلوي */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--shadow); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .lang-btn { color: var(--text-soft); font-weight: 700; font-size: 14px; padding: 7px 12px; border-radius: 12px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.lang-btn { border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-family: inherit; }

/* البطل */
.hero { text-align: center; padding: 70px 0 36px; }
.app-icon { width: 120px; height: 120px; border-radius: 34px; box-shadow: 0 24px 50px -20px rgba(67, 97, 238, .6); background: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 14px; border-radius: 30px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); font-weight: 800; font-size: 13px; }
h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.25; margin: 14px 0 10px; font-weight: 800; letter-spacing: -.5px; }
.grad { background: linear-gradient(120deg, var(--brand), var(--brand-2) 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 680px; margin: 0 auto; color: var(--text-soft); font-size: 18px; }
.btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 16px; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(120deg, var(--brand), var(--brand-2)); box-shadow: 0 14px 30px -14px rgba(67, 97, 238, .8); border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: linear-gradient(120deg, #ef4444, #b91c1c); box-shadow: 0 14px 30px -14px rgba(239, 68, 68, .8); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn svg, .ico svg { width: 20px; height: 20px; }

/* المتاجر */
.stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.store { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 16px; background: #111827; color: #fff; min-width: 190px; }
.store:hover { text-decoration: none; filter: brightness(1.15); }
.store small { display: block; font-size: 11px; opacity: .75; line-height: 1.2; }
.store b { display: block; font-size: 16px; line-height: 1.3; }
.store.soon { opacity: .55; pointer-events: none; }

/* بطاقات */
.grid { display: grid; gap: 16px; }
.features { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 30px 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 17px; margin-top: 12px; }
.tile span { color: var(--text-soft); font-size: 14.5px; }
.ico { width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #3b82f6, #4f46e5); flex: none; }
.ico.violet { background: linear-gradient(135deg, #a855f7, #6366f1); }
.ico.orange { background: linear-gradient(135deg, #fb923c, #f43f5e); }
.ico.green { background: linear-gradient(135deg, #22c55e, #0d9488); }
.ico.red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.ico.gray { background: linear-gradient(135deg, #64748b, #334155); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h2 { display: flex; align-items: center; gap: 12px; font-size: 21px; margin: 0 0 12px; line-height: 1.4; }
.card h3 { font-size: 17px; margin: 18px 0 6px; }
.card p, .card li { color: var(--text-soft); font-size: 15.5px; }
.card ul, .card ol { padding-inline-start: 22px; margin: 6px 0; }
.card li { margin: 4px 0; }
.trial { text-align: center; background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; border: 0; }
.trial h2 { justify-content: center; color: #fff; }
.trial p { color: rgba(255, 255, 255, .88); }

.doc { max-width: 880px; padding-bottom: 70px; }
.meta { color: var(--text-faint); font-size: 14px; text-align: center; margin-top: -8px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 26px; }
.toc a { font-size: 13px; padding: 6px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text-soft); font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text); background: var(--surface-2); }
td { color: var(--text-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }

.pill { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; font-weight: 700; font-size: 14.5px; margin: 6px 0; }
.pill.no { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); }
.pill.yes { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }

/* نموذج الحذف */
.form { display: grid; gap: 12px; margin-top: 10px; }
.form label { font-weight: 700; font-size: 14px; color: var(--text-soft); }
.form input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 16px; font-family: inherit; direction: ltr; text-align: left; }
.form input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent); border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-soft); }
.check input { width: 20px; height: 20px; margin-top: 4px; }
.msg { padding: 12px 16px; border-radius: 14px; font-weight: 700; display: none; }
.msg.show { display: block; }
.msg.err { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.msg.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }

footer { border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--text-faint); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
footer a { color: var(--text-soft); font-weight: 700; }

/* اللغات */
[data-lang] { display: none; }
[data-lang].active { display: block; }
html:not(.js) [data-lang="ar"] { display: block; }

.reveal { animation: up .7s cubic-bezier(.2, .8, .2, 1) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .hero { padding-top: 46px; }
  .card { padding: 20px; }
}
