/* ═══════════════════════════════════════════════════════════════════════════
   MAKAN — الموقع العام / public website
   ⚠️ مبني على توكنز «مَكَان الفاتح» في التطبيق نفسه (src/shared/theme/themes/makan-light.css):
   نفس الرماديات، نفس الخطوط (IBM Plex Sans Arabic + Inter)، نفس الزوايا 4–8px،
   نفس الأزرار والشرائح والجداول. الموقع امتداد للتطبيق، مش هوية تانية.
   Built on the app's own MAKAN Light tokens — same neutrals, fonts, radii, buttons, chips, tables.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --l-0: #FFFFFF; --l-50: #FAFAFA; --l-100: #F4F4F5; --l-150: #ECECEE; --l-200: #E4E4E7;
  --l-300: #D4D4D8; --l-500: #71717A; --l-600: #52525B; --l-700: #3F3F46; --l-900: #18181B;
  --green: #15803D; --green-bg: rgba(21,128,61,.10);
  --amber: #B45309; --amber-bg: rgba(180,83,9,.10);
  --red: #B91C1C;   --red-bg: rgba(185,28,28,.10);
  --blue: #1D4ED8;  --blue-bg: rgba(29,78,216,.10);
  --warm: #F7F6F3;
  --r-xs: 4px; --r-sm: 5px; --r-md: 6px; --r-lg: 8px;
  --shadow-flat: 0 1px 2px rgba(24,24,27,.08);
  --shadow-float: 0 4px 12px rgba(24,24,27,.08), 0 1px 2px rgba(24,24,27,.06);
  --font: 'Inter', 'IBM Plex Sans Arabic', -apple-system, system-ui, sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  --max: 1200px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--l-0); color: var(--l-900); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }
html[lang="ar"] .en, html[lang="en"] .ar { display: none !important; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.num, [dir="ltr"] { font-family: 'Inter', var(--font-ar); font-variant-numeric: tabular-nums; }
.muted { color: var(--l-500); }
.fine { color: var(--l-500); font-size: 13px; margin-top: 14px; }
.fine a { color: var(--l-900); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; inset-inline-start: 12px; top: -48px; background: var(--l-900); color: #fff; padding: 8px 12px; border-radius: var(--r-md); z-index: 50; font-size: 13px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--l-900); outline-offset: 2px; border-radius: var(--r-xs); }

/* ── primitives from the app ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-md); font: inherit; font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn--primary { background: var(--l-900); color: #fff; }
.btn--primary:hover { background: var(--l-700); }
.btn--quiet { background: transparent; color: var(--l-600); }
.btn--quiet:hover { background: var(--l-100); color: var(--l-900); }
.btn--line { background: var(--l-0); color: var(--l-900); border-color: var(--l-300); }
.btn--line:hover { border-color: var(--l-500); }
.btn--lg { height: 40px; padding: 0 18px; font-size: 14.5px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border: 1px solid var(--l-200); border-radius: 999px; font-size: 12.5px; color: var(--l-600); background: var(--l-0); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; background: var(--l-100); color: var(--l-600); white-space: nowrap; }
.tag--info { background: var(--blue-bg); color: var(--blue); }
.tag--green { background: var(--green-bg); color: var(--green); }
.tag--amber { background: var(--amber-bg); color: var(--amber); }
.tag--demo { background: transparent; border: 1px dashed var(--l-300); color: var(--l-500); font-weight: 450; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--l-500); display: inline-block; flex-shrink: 0; }
.dot--green { background: var(--green); } .dot--amber { background: var(--amber); } .dot--red { background: var(--red); } .dot--blue { background: var(--blue); }
.card { background: var(--l-0); border: 1px solid var(--l-200); border-radius: var(--r-lg); box-shadow: var(--shadow-flat); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--l-100); border: 1px solid var(--l-200); display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--l-700); flex-shrink: 0; font-family: 'Inter', sans-serif; }
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--l-100); overflow: hidden; flex: 1; }
.bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); background: var(--l-900); border-radius: 3px; transition: width .7s var(--ease); }
.arrow { display: inline-block; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .15s; }
[dir="rtl"] .arrow { transform: scaleX(-1); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--l-900); }
.link-arrow:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .link-arrow:hover .arrow { transform: scaleX(-1) translateX(3px); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--l-100); border-radius: var(--r-md); }
.seg button { height: 28px; padding: 0 11px; border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; font-size: 13px; color: var(--l-600); cursor: pointer; white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--l-0); color: var(--l-900); box-shadow: var(--shadow-flat); font-weight: 500; }
.panel { background: var(--l-0); border: 1px solid var(--l-200); border-radius: var(--r-lg); padding: 16px; }
.panel__head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--l-900); margin-bottom: 14px; }
.panel__head .tag, .panel__head .switch { margin-inline-start: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--l-200); }
.tbl thead th { font-size: 12.5px; font-weight: 500; color: var(--l-500); background: var(--l-50); }
.tbl tbody th { font-weight: 500; color: var(--l-700); }

/* ── nav ────────────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--l-200); }
.nav__in { max-width: var(--max); margin: 0 auto; height: 56px; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
/* العلامة زي التطبيق بالظبط (BrandMark.jsx): قناع بلون النص، مش صورة بيضا. Same as the app's BrandMark. */
.nav__brand { display: inline-flex; text-decoration: none; }
.brand-mark { display: block; background: var(--l-900); -webkit-mask: url(/brand-en.png) center/contain no-repeat; mask: url(/brand-en.png) center/contain no-repeat; width: 78px; aspect-ratio: 3.4 / 1; }
.brand-mark.ar { -webkit-mask-image: url(/brand-ar.png); mask-image: url(/brand-ar.png); width: 62px; aspect-ratio: 2.4 / 1; }
.nav__links { display: flex; gap: 2px; }
.nav__links a { height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: var(--r-md); font-size: 13.5px; color: var(--l-600); text-decoration: none; }
.nav__links a:hover { background: var(--l-100); color: var(--l-900); }
.nav__login-m { display: none !important; }
.nav__end { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.nav__menu { display: none; height: 32px; padding: 0 10px; border: 1px solid var(--l-200); border-radius: var(--r-md); background: var(--l-0); font: inherit; font-size: 13px; cursor: pointer; }

/* ── sections ───────────────────────────────────────────────────────────── */
.section { max-width: var(--max); margin: 0 auto; padding: 96px 24px; }
.section__head { max-width: 640px; margin-bottom: 36px; }
.section__head--row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; }
html[lang="ar"] h1 { letter-spacing: 0; line-height: 1.3; font-weight: 700; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
.section__head p, .lead { color: var(--l-600); font-size: 16.5px; max-width: 58ch; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { max-width: var(--max); margin: 0 auto; padding: 72px 24px 88px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.hero__copy h1 { margin: 18px 0 16px; }
.hero__actions { display: flex; align-items: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }

.stage { position: relative; }
.stage::before { content: ''; position: absolute; inset: -28px -28px -28px 28px; background: var(--warm); border-radius: 12px; z-index: -1; }
[dir="rtl"] .stage::before { inset: -28px 28px -28px -28px; }
.win { background: var(--l-50); border: 1px solid var(--l-200); border-radius: 10px; box-shadow: var(--shadow-float); overflow: hidden; }
.win__bar { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 12px; border-bottom: 1px solid var(--l-200); background: var(--l-0); font-size: 12.5px; color: var(--l-500); }
.win__crumb { display: flex; gap: 6px; align-items: center; } .win__crumb b { font-weight: 400; color: var(--l-300); }
.win__body { padding: 14px; display: grid; gap: 10px; }
.lead-card { padding: 12px 14px; transition: box-shadow .3s, transform .3s var(--ease); }
.lead-card.is-bump { transform: translateY(-2px); box-shadow: var(--shadow-float); }
.lead-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.lead-card__meta { display: flex; justify-content: space-between; margin: 6px 0 10px; font-size: 13px; color: var(--l-600); }
.lead-card__meta b { color: var(--l-900); font-weight: 600; }
.lead-card__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--l-150); font-size: 12.5px; }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-sm); background: var(--l-100); font-size: 12.5px; font-weight: 500; }
.stage-pill .dot { background: var(--blue); transition: background .3s; }
.stage-pill__label { display: inline-block; animation: pill .35s var(--ease); }
@keyframes pill { from { opacity: 0; transform: translateY(4px); } }

.card__head { font-size: 12.5px; color: var(--l-500); margin-bottom: 8px; }

/* ── flow ───────────────────────────────────────────────────────────────── */
.flow { border-top: 1px solid var(--l-200); }
#flow-detail { font-size: 14px; color: var(--l-700); min-height: 2.9em; }

/* ── intelligence ───────────────────────────────────────────────────────── */
.intel { background: var(--warm); max-width: none; padding-inline: max(24px, calc((100% - var(--max)) / 2 + 24px)); border-block: 1px solid var(--l-200); }
.intel__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; align-items: start; }
.alerts { list-style: none; display: grid; }
.alerts li { display: flex; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--l-150); }
.alerts li:first-child { border-top: 0; padding-top: 2px; }
.alerts .dot { margin-top: 8px; }
.alerts b { display: block; font-size: 14px; font-weight: 600; }
.alerts li div > span { font-size: 13px; color: var(--l-500); }
.agents .seg { margin-bottom: 16px; }
.agent__score { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.agent__score b { font-size: 40px; font-weight: 600; line-height: 1; }
.agent__score > span { color: var(--l-500); font-size: 13px; }
.agent__score .tag { margin-inline-start: auto; align-self: center; }
.agent__rows { display: grid; gap: 10px; }
.agent__rows > div { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; font-size: 13.5px; }
.agent__rows dt { color: var(--l-600); }
.agent__rows dd { display: flex; align-items: center; gap: 10px; }
.agent__rows dd b { min-width: 74px; text-align: end; font-weight: 600; font-size: 13px; }
.agent__note { margin-top: 14px; font-size: 13px; color: var(--l-700); padding: 10px 12px; background: var(--l-50); border-radius: var(--r-md); border: 1px solid var(--l-150); }

/* ── operations ─────────────────────────────────────────────────────────── */
.ops__grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 16px; align-items: start; }
.switch { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--l-300); border: 0; cursor: pointer; transition: background .2s; }
.switch i { position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-flat); transition: inset-inline-start .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--l-900); }
.switch[aria-checked="true"] i { inset-inline-start: 16px; }
.rule__if, .rule__then { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--l-200); border-radius: var(--r-md); font-size: 13.5px; background: var(--l-50); }
.rule__if small, .rule__then small { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--l-500); width: 34px; }
.rule__then { margin-top: 6px; }
.rule__log { margin-top: 12px; font-size: 12.5px; color: var(--l-500); display: flex; gap: 6px; align-items: center; min-height: 22px; }
.rule__log.is-on { color: var(--green); }
.people { list-style: none; display: grid; gap: 10px; }
.people li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.people li .tag { margin-inline-start: auto; }

/* ── screens ────────────────────────────────────────────────────────────── */
.screens { padding-top: 24px; }
.shot { background: var(--l-100); border: 1px solid var(--l-200); border-radius: 10px; padding: clamp(12px, 2.4vw, 28px); overflow: hidden; }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--r-lg); border: 1px solid var(--l-200); box-shadow: var(--shadow-float); background: #fff; transition: opacity .25s;
  /* الشاشة بتكمّل تحت الإطار — التلاشي بيقول «فيه تمرير» بدل ما يبان قصّ. The screen continues below; the fade reads as scroll, not a crop. */
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent); mask-image: linear-gradient(to bottom, #000 86%, transparent); }
.shot img.is-fading { opacity: 0; }
.shot__hint { display: none; font-size: 12px; color: var(--l-500); margin-top: 10px; }
.shot figcaption { font-size: 13px; color: var(--l-500); margin-top: 14px; }

/* ── pricing ────────────────────────────────────────────────────────────── */
.pricing { border-top: 1px solid var(--l-200); }
.seg--plans { display: none; margin-bottom: 14px; }
.tbl-wrap { border: 1px solid var(--l-200); border-radius: var(--r-lg); overflow: hidden; }
.tbl--price thead th { font-size: 14px; color: var(--l-900); font-weight: 600; background: var(--l-0); padding-block: 14px; }
.tbl--price .row-price td { font-size: 17px; font-weight: 600; }
.tbl--price .is-pick { background: var(--l-50); }
.tbl--price thead th.is-pick { box-shadow: inset 0 2px 0 var(--l-900); }
.tbl--price tr:last-child th, .tbl--price tr:last-child td { border-bottom: 0; }

/* ── final + footer ─────────────────────────────────────────────────────── */
.final { text-align: center; border-top: 1px solid var(--l-200); }
.final p { color: var(--l-600); max-width: 52ch; margin: 0 auto; }
.final .hero__actions { justify-content: center; }
.foot { border-top: 1px solid var(--l-200); background: var(--l-50); }
.foot__in { max-width: var(--max); margin: 0 auto; padding: 32px 24px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 13px; }
.foot__links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot__links a { color: var(--l-600); text-decoration: none; } .foot__links a:hover { color: var(--l-900); }
.foot .muted { margin-inline-start: auto; }

/* ── reveal ─────────────────────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── tablet ─────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 64px; padding-top: 56px; }
  .hero__copy { max-width: 640px; }
  .ops__grid { grid-template-columns: 1fr 1fr; }
  .ops__grid > :first-child { grid-column: 1 / -1; }
  .intel__grid { grid-template-columns: 1fr; }
  /* الخلفية الدافئة خلف اللوحة ماتعدّيش هامش الصفحة. The warm backdrop stays inside the page gutter. */
  .stage::before { inset: -18px -18px -18px 18px; }
  [dir="rtl"] .stage::before { inset: -18px 18px -18px -18px; }
}
@media (max-width: 900px) {
  .nav__links { display: none; position: absolute; top: 56px; inset-inline: 0; background: var(--l-0); border-bottom: 1px solid var(--l-200); padding: 8px 16px 14px; flex-direction: column; }
  .nav__links.is-open { display: flex; }
  .nav__links a { height: 40px; font-size: 15px; }
  .nav__menu { display: inline-flex; align-items: center; }
  .nav__login { display: none; }
  .nav__login-m { display: inline-flex !important; }
}

/* ── phone ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .nav__in { padding: 0 16px; gap: 10px; }
  .nav__end .btn--primary { height: 32px; padding: 0 10px; }
  #lang { padding: 0 8px; }
  .hero { padding: 36px 16px 56px; gap: 44px; }
  .hero__copy h1 { margin: 14px 0 12px; }
  .lead, .section__head p { font-size: 15.5px; }
  .hero__actions { gap: 14px; margin-top: 22px; }
  .stage::before { inset: -14px -16px -14px 14px; }
  [dir="rtl"] .stage::before { inset: -14px 14px -14px -16px; }
  .section { padding: 64px 16px; }
  .intel { padding-inline: 16px; }
  .section__head { margin-bottom: 24px; }
  .ops__grid { grid-template-columns: 1fr; }
  .agent__rows > div { grid-template-columns: 1fr; gap: 4px; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .screens { padding-top: 8px; }
  /* اللقطات العريضة تتسحب أفقيًا بحجم مقروء بدل ما تتصغّر لحد ما تختفي. Wide shots pan at a readable size. */
  .shot { padding: 10px; }
  .shot__pan { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .shot__pan img { width: 820px; max-width: none; }
  .shot__hint { display: block; }
  .seg--plans { display: inline-flex; }
  .tbl--price th:not(:first-child), .tbl--price td { display: none; }
  .tbl--price[data-plan="1"] :is(th, td):nth-child(2),
  .tbl--price[data-plan="2"] :is(th, td):nth-child(3),
  .tbl--price[data-plan="3"] :is(th, td):nth-child(4),
  .tbl--price[data-plan="4"] :is(th, td):nth-child(5) { display: table-cell; background: var(--l-0); box-shadow: none; text-align: end; }
  .final { text-align: start; } .final .hero__actions { justify-content: flex-start; } .final p { margin: 0; }
  .hero__actions .btn--lg { flex: 1 1 100%; }
  .foot .muted { margin-inline-start: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ── platform groups · Lucide line icons, same stroke as the app ─────────── */
.ico { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sys__grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--l-200); border-radius: var(--r-lg); }
.sys__col { padding: 20px; border-inline-start: 1px solid var(--l-200); }
.sys__col:first-child { border-inline-start: 0; }
.sys__col h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.sys__col h3 .ico { color: var(--l-600); }
.sys__col p { color: var(--l-600); font-size: 13.5px; margin-bottom: 14px; min-height: 3em; }
.sys__col ul { list-style: none; display: grid; gap: 7px; font-size: 13.5px; color: var(--l-700); }
.sys__col li { padding-inline-start: 12px; position: relative; }
.sys__col li::before { content: ""; position: absolute; inset-inline-start: 0; top: .72em; width: 4px; height: 4px; border-radius: 50%; background: var(--l-300); }
@media (max-width: 900px) {
  .sys__grid { grid-template-columns: 1fr 1fr; }
  .sys__col:nth-child(3) { border-inline-start: 0; }
  .sys__col:nth-child(n+3) { border-top: 1px solid var(--l-200); }
}
@media (max-width: 600px) {
  .sys__grid { grid-template-columns: 1fr; }
  .sys__col { border-inline-start: 0; }
  .sys__col:nth-child(n+2) { border-top: 1px solid var(--l-200); }
  .sys__col p { min-height: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAKAN OS — الموقع بيتصرّف زي النظام اللي بيبيعه / the site behaves like the system it sells
   ⚠️ كل حركة هنا transform/opacity بس، وكلها بتتوقف مع prefers-reduced-motion.
   Every motion is transform/opacity only, and all of it stops under reduced motion.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── نبرة أقل «كروت» / fewer boxes ────────────────────────────────────────── */
.sys__grid { border: 0; border-radius: 0; border-top: 1px solid var(--l-900); }
.sys__col { padding: 22px 20px 4px; }
.sys__col:first-child { padding-inline-start: 0; }

/* ── تنقّل: خط تحتي يمشي / nav: sliding underline ───────────────────────── */
.nav__links a { position: relative; }
.nav__links a::after { content: ''; position: absolute; inset-inline: 10px; bottom: 5px; height: 1px; background: var(--l-900); transform: scaleX(0); transform-origin: var(--ul-origin, left); transition: transform .25s var(--ease); }
[dir="rtl"] .nav__links a::after { --ul-origin: right; }
.nav__links a:hover::after { transform: scaleX(1); }
.btn--primary .arrow, .btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .link-arrow .arrow { transform: scaleX(-1); }
[dir="rtl"] .link-arrow:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* ── إبراز بعد أمر / spotlight after a command ───────────────────────────── */
.is-spot { animation: spot 1.8s var(--ease); }
@keyframes spot { 0% { box-shadow: 0 0 0 0 rgba(24,24,27,.35); } 30% { box-shadow: 0 0 0 6px rgba(24,24,27,.12); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ── الهيرو: سجل العملية / hero: the operation log ───────────────────────── */
.stage-pill .dot { background: var(--blue); transition: background .3s; }
.stage[data-step="2"] .stage-pill .dot, .stage[data-step="3"] .stage-pill .dot { background: var(--amber); }
.stage[data-step="4"] .stage-pill .dot, .stage[data-step="5"] .stage-pill .dot { background: var(--green); }
.oplog { list-style: none; display: grid; gap: 0; background: var(--l-0); border: 1px solid var(--l-200); border-radius: var(--r-lg); box-shadow: var(--shadow-flat); }
.oplog li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; padding: 11px 14px; font-size: 13.5px; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.oplog li + li { border-top: 1px solid var(--l-150); }
.oplog .ico { margin-top: 2px; color: var(--l-500); transition: color .3s; }
.oplog b { display: block; font-weight: 600; font-size: 13.5px; }
.oplog span { color: var(--l-600); font-size: 12.5px; }
.oplog__units { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.oplog__units em { font-style: normal; font-size: 12px; padding: 2px 8px; border: 1px solid var(--l-200); border-radius: 999px; color: var(--l-700); font-variant-numeric: tabular-nums; }
/* بتشتغل بس مع JS والحركة مسموحة؛ غير كده السجل كامل ظاهر. Only live with JS and motion; otherwise the full log shows. */
.stage.is-live .oplog li:not(.is-on) { opacity: .32; }
.stage.is-live .oplog li:not(.is-on) b, .stage.is-live .oplog li:not(.is-on) span { color: var(--l-500); }
.stage.is-live .oplog li.is-now { animation: opin .45s var(--ease); }
@keyframes opin { from { opacity: .32; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.stage.is-live .oplog li.is-now .ico { color: var(--l-900); }
.stage.is-live .oplog li.is-now::before { content: ''; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 2px; background: var(--l-900); border-radius: 2px; }

/* ── القصة: سجل واحد من الليد للعمولة / story ───────────────────────────── */
.story { max-width: var(--max); margin: 0 auto; padding: 104px 24px 40px; border-top: 1px solid var(--l-200); }
.story__intro { max-width: 720px; margin-bottom: 56px; }
.story__intro h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -.02em; font-weight: 600; }
[dir="rtl"] .story__intro h2 { letter-spacing: 0; line-height: 1.35; }
.story__intro p { margin-top: 14px; color: var(--l-600); font-size: 17px; max-width: 56ch; }
.story__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 72px; align-items: start; }
.story__steps { list-style: none; }
.story__step { min-height: 46vh; padding: 8px 0 0; display: flex; flex-direction: column; justify-content: flex-start; opacity: 1; transition: opacity .4s var(--ease); }
.story__step small { font-size: 12.5px; color: var(--l-500); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.story__step h3 { margin: 6px 0 8px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
[dir="rtl"] .story__step h3 { letter-spacing: 0; line-height: 1.4; }
.story__step p { color: var(--l-600); font-size: 16px; max-width: 46ch; }
.story-live .story__step { opacity: .28; }
.story-live .story__step.is-on { opacity: 1; }
.story-live .story__step.is-past { opacity: .45; }
.story__pin { position: sticky; top: 96px; }
.story-card { padding: 18px; display: grid; gap: 14px; }
.story-card__head { display: flex; align-items: center; gap: 10px; }
.story-card__head strong { font-size: 15px; }
.story-card__head .stage-pill { margin-inline-start: auto; }
.story-card__track { height: 3px; background: var(--l-150); border-radius: 2px; overflow: hidden; }
.story-card__track i { display: block; height: 100%; background: var(--l-900); transform-origin: var(--track-origin, left); transform: scaleX(1); transition: transform .5s var(--ease); }
[dir="rtl"] .story-card__track i { --track-origin: right; }
.story-card__rows { display: grid; gap: 0; }
.story-card__rows > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--l-150); font-size: 13.5px; transition: opacity .35s var(--ease), transform .35s var(--ease), background .6s; }
.story-card__rows dt { color: var(--l-500); }
.story-card__rows dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.story-live .story-card__rows > div:not(.is-on) { opacity: .22; }
.story-live .story-card__rows > div:not(.is-on) dd { filter: blur(3px); }
.story-live .story-card__rows > div.is-new { animation: rowin .5s var(--ease); }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.story-card .tag--demo { justify-self: start; }

/* ── لحظة الأرقام: بلا كارت / data moment: no card ──────────────────────── */
.moment { max-width: var(--max); margin: 0 auto; padding: 40px 24px 112px; }
.moment__eyebrow { font-size: 13px; color: var(--l-500); margin-bottom: 18px; }
.moment__row { display: grid; grid-template-columns: auto minmax(0, 520px); gap: 56px; align-items: end; border-top: 1px solid var(--l-900); padding-top: 28px; }
.moment__figure { display: flex; align-items: baseline; gap: 12px; line-height: .9; }
.moment__num { font-size: clamp(96px, 14vw, 184px); font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; font-family: 'Inter', var(--font-ar); }
.moment__figure > span { font-size: clamp(22px, 2.4vw, 30px); color: var(--l-500); }
.moment__copy { font-size: 20px; font-weight: 500; line-height: 1.45; padding-bottom: 14px; }
.moment__copy span { display: block; margin-top: 10px; font-size: 15.5px; font-weight: 400; color: var(--l-600); line-height: 1.7; }

/* ── اسأل مَكَان / Ask Makan trigger ──────────────────────────────────────── */
.ask { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; border: 1px solid var(--l-200); border-radius: var(--r-md); background: var(--l-0); color: var(--l-600); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s; }
[dir="rtl"] .ask { padding: 0 10px 0 8px; }
.ask:hover { border-color: var(--l-500); color: var(--l-900); }
.ask__kbd { font: 500 11px/1 'Inter', sans-serif; padding: 3px 5px; border-radius: 4px; background: var(--l-100); color: var(--l-500); }
.has-layer body { overflow: hidden; }

/* ── لوحة الأوامر / command palette ───────────────────────────────────────── */
.palette, .peek { position: fixed; inset: 0; z-index: 60; }
.palette__scrim, .peek__scrim { position: absolute; inset: 0; background: rgba(24,24,27,.28); opacity: 0; transition: opacity .18s; }
.is-open > .palette__scrim, .is-open > .peek__scrim { opacity: 1; }
.palette__panel { position: relative; width: min(600px, calc(100% - 32px)); margin: 14vh auto 0; background: var(--l-0); border: 1px solid var(--l-200); border-radius: 10px; box-shadow: 0 24px 60px rgba(24,24,27,.18); overflow: hidden; opacity: 0; transform: translateY(-8px) scale(.985); transition: opacity .18s, transform .22s var(--ease); }
.palette.is-open .palette__panel { opacity: 1; transform: none; }
.palette__field { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--l-200); color: var(--l-500); }
.palette__field input { flex: 1; height: 54px; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--l-900); }
.palette__list { list-style: none; max-height: min(52vh, 420px); overflow-y: auto; padding: 6px; }
.palette__list li { padding: 11px 12px; border-radius: var(--r-md); font-size: 14.5px; cursor: pointer; color: var(--l-700); }
.palette__list li[aria-selected="true"] { background: var(--l-100); color: var(--l-900); }
.palette__list li.is-empty { color: var(--l-500); cursor: default; }
.palette__foot { padding: 10px 16px; border-top: 1px solid var(--l-150); font-size: 12px; color: var(--l-500); }

/* ── Product Peek ─────────────────────────────────────────────────────────── */
.shot { position: relative; }
.shot img { cursor: zoom-in; transition: opacity .25s, transform .5s var(--ease), box-shadow .5s var(--ease); }
.shot:hover img { transform: translateY(-3px) scale(1.006); box-shadow: 0 18px 40px rgba(24,24,27,.14); }
.shot__open { position: absolute; top: clamp(20px, 3vw, 40px); inset-inline-end: clamp(20px, 3vw, 40px); z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--l-200); border-radius: var(--r-md); background: rgba(255,255,255,.94); font: inherit; font-size: 13px; font-weight: 500; color: var(--l-900); cursor: pointer; box-shadow: var(--shadow-flat); transition: transform .2s var(--ease); }
.shot__open:hover { transform: translateY(-1px); }
.peek__frame { position: relative; display: flex; flex-direction: column; width: min(1440px, calc(100% - 48px)); height: calc(100% - 48px); margin: 24px auto; background: var(--l-0); border: 1px solid var(--l-200); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(24,24,27,.25); opacity: 0; transform: translateY(14px) scale(.975); transition: opacity .2s, transform .28s var(--ease); }
.peek.is-open .peek__frame { opacity: 1; transform: none; }
.peek__bar { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--l-200); }
.peek__crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.peek__crumb .brand-mark { width: 58px; } .peek__crumb .brand-mark.ar { width: 46px; }
.peek__crumb b { font-weight: 400; color: var(--l-300); }
.peek__bar .tag { margin-inline-start: auto; }
.peek__close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--r-md); background: none; cursor: pointer; color: var(--l-600); }
.peek__close:hover { background: var(--l-100); color: var(--l-900); }
.peek__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.peek__view { min-height: 0; overflow: auto; background: var(--l-100); padding: 20px; display: flex; align-items: flex-start; justify-content: center; }
.peek__view img { width: 100%; height: auto; border-radius: var(--r-lg); border: 1px solid var(--l-200); box-shadow: var(--shadow-float); background: #fff; }
.peek__notes { display: flex; flex-direction: column; gap: 16px; padding: 22px 20px; border-inline-start: 1px solid var(--l-200); overflow-y: auto; }
.peek__notes > p { font-size: 15px; font-weight: 500; line-height: 1.55; }
.peek__notes ol { list-style: none; counter-reset: n; display: grid; gap: 14px; }
.peek__notes li { counter-increment: n; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 14px; color: var(--l-700); line-height: 1.55; }
.peek__notes li::before { content: counter(n); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--l-300); font: 500 11.5px/1 'Inter', sans-serif; color: var(--l-600); }
.peek__nav { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--l-150); font-size: 13px; color: var(--l-500); font-variant-numeric: tabular-nums; }
.peek__nav button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--l-200); border-radius: var(--r-md); background: var(--l-0); cursor: pointer; color: var(--l-900); }
.peek__nav button:hover { border-color: var(--l-500); }
[dir="rtl"] .peek__nav .ico { transform: scaleX(-1); }

/* ── نبض مَكَان / Makan pulse ─────────────────────────────────────────────── */
.pulse { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 40; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 36px); padding: 8px 8px 8px 12px; background: rgba(255,255,255,.96); border: 1px solid var(--l-200); border-radius: 999px; box-shadow: var(--shadow-float); font-size: 12.5px; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
[dir="rtl"] .pulse { padding: 8px 12px 8px 8px; }
.pulse.is-in { opacity: 1; transform: none; }
.pulse__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.pulse__dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: beat 2.4s ease-out infinite; }
@keyframes beat { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.pulse__label { color: var(--l-500); white-space: nowrap; padding-inline-end: 10px; border-inline-end: 1px solid var(--l-200); }
.pulse__event { display: flex; gap: 8px; min-width: 0; transition: opacity .2s, transform .2s var(--ease); }
.pulse.is-swap .pulse__event { opacity: 0; transform: translateY(4px); }
.pulse__event b { font-weight: 600; white-space: nowrap; }
.pulse__event span { color: var(--l-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse__x { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: var(--l-500); cursor: pointer; flex-shrink: 0; }
.pulse__x .ico { width: 14px; height: 14px; }
.pulse__x:hover { background: var(--l-100); color: var(--l-900); }
.has-layer .pulse { opacity: 0; pointer-events: none; }

/* ── المقاسات / responsive ─────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .story__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 40px; }
  .peek__body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .peek__notes { border-inline-start: 0; border-top: 1px solid var(--l-200); max-height: 38vh; }
  .ask__kbd { display: none; }
}
@media (max-width: 900px) {
  /* على الموبايل: الكارت ثابت فوق بشكل مضغوط، والخطوات تحته — مفيش عمودين متزاحمين.
     On phones the card pins compactly above the steps — no cramped two-column layout. */
  .story { padding: 72px 16px 24px; }
  .story__intro { margin-bottom: 28px; }
  .story__grid { grid-template-columns: 1fr; gap: 0; }
  .story__pin { order: -1; top: 56px; z-index: 5; margin: 0 -16px; padding: 10px 16px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--l-200); }
  .story-card { padding: 12px 14px; gap: 10px; box-shadow: none; }
  .story-card__rows > div:not(.is-new) { display: none; }
  .story-live .story-card__rows > div.is-new { display: grid; }
  html:not(.story-live) .story-card__rows > div:last-child { display: grid; }
  .story-card .tag--demo { display: none; }
  .story__step { min-height: 52vh; padding-top: 32px; }
  .moment__row { grid-template-columns: 1fr; gap: 16px; }
  .moment { padding: 24px 16px 80px; }
  .ask > .ar, .ask > .en { display: none !important; }
  .ask { padding: 0; width: 32px; justify-content: center; }
}
@media (max-width: 600px) {
  .peek__frame { width: 100%; height: 100%; margin: 0; border-radius: 0; border: 0; }
  .peek__view { padding: 10px; justify-content: flex-start; }
  .peek__view img { width: 820px; max-width: none; }
  .shot__open { top: 16px; inset-inline-end: 16px; }
  .pulse { bottom: 12px; inset-inline-start: 12px; max-width: calc(100% - 24px); }
  .pulse__label { display: none; }
  .palette__panel { margin-top: 10vh; }
  .sys__col:first-child { padding-inline-start: 20px; }
  .oplog li { padding: 10px 12px; }
}
@media (max-width: 380px) {
  .pulse__event span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse__dot::after { animation: none; }
  .shot:hover img { transform: none; }
}
@media print { .pulse, .palette, .peek, .ask { display: none !important; } }
