
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-text); text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }

.container { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 8px;
  background: var(--surface-2); color: var(--ink); padding: 10px 18px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-2); z-index: 40;
}
.skip-link:focus { inset-inline-start: 24px; }

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

/* ── الترويسة ── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: inline-block; }
.brand-name { font-size: 19px; font-weight: 700; display: inline-flex; align-items: baseline; gap: 8px; }
.brand-latin { font-size: 12px; font-weight: 500; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.12em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-soft); font-size: 15px; padding: 8px 13px; border-radius: var(--radius-pill); transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--fill-hover); }
.nav a[aria-current="page"] { color: var(--brand-text); background: var(--brand-dim); }
@media (max-width: 760px) { .nav { display: none; } }

/* ── مسار التنقّل ── */
/* `padding` المختصرة كانت تصفّر الحشوة الأفقية التي تعطيها `.container`
   (العنصر يحمل الصنفين)، فيلتصق المسار بحافّة الشاشة على كل عرض دون
   ‎1170px. الخاصية المفردة تضيف الرأسية ولا تمسّ الأفقية. */
.crumbs { padding-top: 20px; font-size: 13.5px; color: var(--ink-faint); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li::after { content: "‹"; margin-inline-start: 8px; color: var(--line-2); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink); }

/* ── الواجهة ── */
.hero { padding: 40px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: var(--radius-pill); background: var(--brand-dim); color: var(--brand-text);
  font-size: 13px; font-weight: 500; border: 1px solid var(--brand-edge);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.hero h1 {
  font-size: clamp(32px, 4.6vw, 52px); line-height: 1.16; font-weight: 700;
  color: var(--ink); margin: 22px 0 16px; letter-spacing: -0.5px;
}
/* النصّ المتدرّج — يشمل ترويسة المقال أيضاً (صفحات الحالات والأدوات
   كانت تحمل الوسم بلا تنسيق، فيسقط التدرّج صامتاً).

   `padding-bottom` ضروري لا تزييني: `background-clip: text` يقصّ إلى
   صندوق المحتوى، ونزول المحارف العربية تحت خطّ الأساس (نقطتا الياء،
   وذيول ج ح ع ي) يتجاوزه. قِيس على الرئيسية: الحبر ينزل 30.9px والصندوق
   يسمح بـ13.2px، فتُقصّ 17.7px — نقاط «في» تختفي. والحشوة الرأسية على
   عنصر سطري توسّع مساحة الطلاء **بلا أي أثر على التخطيط** (تُحقّق منه:
   ارتفاع h1 وموضع الفقرة التالية لم يتغيّرا بأي بكسل). */
.hero h1 .grad,
.art-head h1 .grad {
  background: linear-gradient(120deg, var(--grad-a) 0%, var(--grad-b) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.38em;
}
.hero .lead { color: var(--ink-soft); font-size: 18.5px; max-width: 54ch; margin: 0 0 30px; }

.shot { display: flex; justify-content: center; }
.shot picture { display: contents; }
.shot img {
  width: min(340px, 78vw); height: auto; border-radius: 26px;
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}

/* ── زر المتجر ── */
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 24px;
  border-radius: 15px; background: var(--surface-1); border: 1px solid var(--line-2);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.store-btn:hover { transform: translateY(-2px); border-color: var(--brand-edge-2); }
.store-btn .apple-logo { width: 26px; height: 26px; fill: var(--ink); }
.store-btn-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.store-btn-top { font-size: 13px; color: var(--ink-soft); }
.store-btn-main { font-size: 20px; font-weight: 600; color: var(--ink); }
.cta-note { color: var(--ink-faint); font-size: 14px; }

/* ── الأقسام ── */
section { padding: 74px 0 0; }
.sec-head { max-width: 62ch; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(25px, 3.4vw, 36px); line-height: 1.24; font-weight: 700; margin: 0; letter-spacing: -0.3px; }
.sec-head p { color: var(--ink-soft); margin: 12px 0 0; font-size: 17px; }

/* ── شبكة القدرات ── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 24px;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: var(--brand-edge-2); }
.card h3 { font-size: 18.5px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.card-icon {
  width: 44px; height: 44px; border-radius: 13px; background: var(--brand-dim);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--brand-text);
}
.card-icon svg { width: 22px; height: 22px; }

/* ── صفّ شرح مع لقطة ── */
.split { display: grid; grid-template-columns: 1fr 340px; gap: 52px; align-items: center; }
.split.flip { grid-template-columns: 340px 1fr; }
.split.flip .split-text { order: 2; }
.split.flip .shot { order: 1; }
@media (max-width: 900px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
  .split.flip .split-text, .split.flip .shot { order: initial; }
}
.split-text h3 { font-size: clamp(21px, 2.6vw, 27px); line-height: 1.3; margin: 0 0 14px; font-weight: 700; }
.split-text p { color: var(--ink-soft); margin: 0 0 16px; }

/* لوحة نصّية — للصفحات التي لها شاشة واحدة فلا تُكرَّر لقطتها */
.split-solo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 38px 36px;
}
@media (max-width: 800px) { .split-solo { grid-template-columns: 1fr; gap: 24px; padding: 30px 24px; } }
.split-solo h3 { font-size: clamp(21px, 2.6vw, 27px); line-height: 1.3; margin: 0 0 14px; font-weight: 700; }
.split-solo > div > p { color: var(--ink-soft); margin: 0; }

ul.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.ticks li { position: relative; padding-inline-start: 26px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.75; }
ul.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-dim); border: 1.5px solid var(--brand);
}
ul.ticks li strong { color: var(--ink); font-weight: 600; }

/* ── خطوات ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 24px 22px; counter-increment: s;
}
.step::before {
  content: counter(s); display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-dim); border: 1px solid var(--brand-edge);
  color: var(--brand-text); font-size: 15px; font-weight: 600; margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 17.5px; margin: 0 0 7px; font-weight: 600; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.75; }

/* ── الأسئلة الشائعة ── */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq details {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 4px 24px;
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0;
  font-size: 17px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--brand-text); font-size: 22px; font-weight: 400;
  line-height: 1; flex: none; transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { color: var(--ink-soft); font-size: 15.5px; padding: 0 0 20px; margin: 0; line-height: 1.85; }

/* ── روابط المزايا الأخرى ── */
.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .more { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .more { grid-template-columns: 1fr; } }
.more a {
  display: block; background: var(--surface-1); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 22px; color: var(--ink);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.more a:hover { border-color: var(--brand-edge-2); transform: translateY(-2px); }
.more strong { display: block; font-size: 16.5px; font-weight: 600; margin-bottom: 5px; }
.more span { color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; }

/* ── دعوة ختامية ── */
.closer {
  margin-top: 80px; text-align: center;
  background: var(--surface-1); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); padding: 52px 32px;
}
.closer h2 { font-size: clamp(24px, 3.2vw, 34px); margin: 0 0 12px; font-weight: 700; }
.closer p { color: var(--ink-soft); margin: 0 auto 28px; max-width: 52ch; }
.closer .cta-row { justify-content: center; }

/* ── التذييل ── */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 34px 0 44px; text-align: center; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; }
.footer-nav a { color: var(--ink-soft); font-size: 14px; }
.footer-nav a:hover { color: var(--ink); }
.footer-email a { color: var(--brand-text); font-size: 14px; }
.disclaimer { color: var(--ink-faint); font-size: 13px; max-width: 620px; margin: 16px auto 6px; line-height: 1.7; }
.copyright { color: var(--ink-faint); font-size: 13px; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* رابط الدليل من صفحة ميزة التحاليل */
.guide-link { margin: 26px 0 0; font-size: 16.5px; }
.guide-link a {
  display: inline-block; background: var(--brand-dim);
  border: 1px solid var(--brand-edge); border-radius: var(--radius-pill);
  padding: 10px 20px; color: var(--brand-text); font-weight: 500;
  transition: border-color .2s var(--ease);
}
.guide-link a:hover { border-color: var(--brand); }

/* رفع خفيف للأسطح — قيمته `none` في الداكن، فلا أثر له هناك */
.card, .step, .more a, .feature, .split-solo, .closer, .faq details,
.tool-card, .note-box, .marker-grid a { box-shadow: var(--surface-lift); }
