/* =====================================================================
   NOOL — الصفحة التعريفية

   الفكرة: النَّوْل. «نول» هو اسم آلة نسج السجاد، والسجادة شبكة عُقد.
   فالصفحة منسوجة: البطل بينسج سجادة، وحواف الأقسام بتخلص بشراشيب
   زي طرف السجادة بدل الخطوط الرفيعة.

   الألوان من دليل الهوية، والأزرق هنا **سطح** مش لمسة: تلات مساحات
   كاملة (البطل، المسح، الختام) — عشان التوزيع المعتمد في الدليل
   ٢٥٪ أزرق، والصفحة اللي الأزرق فيها زرار وبس بتطلع بهوية باهتة.

   ملف مستقل عن `app.css`: الزائر جاي من جوجل مش موظف، والسرعة
   جزء من الترتيب في البحث.
   ===================================================================== */

:root {
  --blue:     #2B3BFF;
  --blue-800: #1621A3;
  --blue-700: #1C27B8;
  --blue-300: #8C95FF;
  --blue-100: #DDE1FF;
  --blue-50:  #EEF0FF;
  --cyan:     #5CE1FF;
  --cyan-700: #0E7FA0;
  --cyan-100: #DDF8FF;
  --ink:      #0B1033;
  --ink-2:    #161E54;
  --ink-3:    #05081C;
  --light:    #F2F3F7;
  --g200:     #DCDFE8;
  --g400:     #9AA0B4;
  --g600:     #565B70;

  /* حالات القطعة — نفس ألوان الدليل */
  --ok: #15803D;      --ok-bg: #DCFCE7;
  --warn: #B45309;    --warn-bg: #FEF3C7;
  --transit: #6D28D9; --transit-bg: #EDE9FE;
  --sold: #2B3BFF;    --sold-bg: #E5E8FF;
  --qc: #0E7FA0;      --qc-bg: #DDF8FF;

  /* سلّم الحروف — نسبة ١.٣٣٣ تقريبًا، والعرض يكبر مع الشاشة */
  --fs-display: clamp(48px, 8.2vw, 112px);
  --fs-h2:      clamp(32px, 4.8vw, 60px);
  --fs-h3:      clamp(20px, 1.8vw, 24px);
  --fs-lede:    clamp(18px, 1.55vw, 21px);
  --fs-body:    17px;
  --fs-small:   14.5px;

  --r-sm: 8px;  --r: 12px;  --r-lg: 18px;   /* من توكنز الدليل */
  --maxw: 1200px;
  --pad: clamp(16px, 4vw, 32px);
  --sec: clamp(72px, 10vw, 136px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'Beiruti', 'Bricolage Grotesque', -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
b, strong { font-weight: 700; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: 0; text-wrap: balance; }
/* بيروتي أضيق من الخط القديم، فالسطور بتتكسر في أماكن جديدة. «pretty»
   بيخلي المتصفح يمنع كلمة لوحدها في آخر الفقرة («كام» لوحدها في سطر
   شكلها غلطة)، و«balance» بيوزّع العنوان على سطوره بالتساوي */
p, li, dd, figcaption { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.lede { font-size: var(--fs-lede); font-weight: 400; line-height: 1.85; max-width: 58ch; }

/* ═══════════════════════════════════════════════════════ الشراشيب ═══
   طرف السجادة: خيوط السدى اللي بتطلع برّه النسيج. بنستعملها بدل
   الخط الفاصل بين قسم ملوّن واللي بعده — الخيوط نازلة من اللون
   زي ما الشراشيب نازلة من السجادة. */

.fringe {
  height: 26px;
  background-repeat: repeat-x;
  background-size: 10px 100%;
  --fc: var(--blue);
  background-image: linear-gradient(90deg, transparent 4px, var(--fc) 4px, var(--fc) 6px, transparent 6px);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
          mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.fringe-top {
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent);
          mask-image: linear-gradient(to top, #000 30%, transparent);
}
.fringe-ink { --fc: var(--ink); }

/* ═══════════════════════════════════════════════════════════ أزرار ═══ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border-radius: var(--r); border: 1.5px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: var(--cyan-100); }
.btn-line { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-line:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-nav { min-height: 42px; padding: 9px 18px; font-size: 15px; background: #fff; color: var(--blue); }
/* متوافقة مع صفحة ٤٠٤ */
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }

/* ═════════════════════════════════════════════════════════════ الرأس ═══ */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .25s, box-shadow .25s;
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 74px; }
.nav-logo { position: relative; display: block; width: 100px; height: 44px; flex: 0 0 auto; }
.nav-logo img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .25s; }
.nav-logo .logo-dark { opacity: 0; }
.nav-links { display: flex; gap: 26px; margin-inline-start: auto; }
.nav-links a {
  color: rgba(255,255,255,.86); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav-links a:hover { color: #fff; border-bottom-color: var(--cyan); }

.nav.is-glass { background: rgba(43,59,255,.9); backdrop-filter: saturate(160%) blur(12px);
                box-shadow: 0 1px 0 rgba(255,255,255,.14); }
.nav.is-solid { background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(14px);
                box-shadow: 0 1px 0 var(--g200); }
.nav.is-solid .logo-light { opacity: 0; }
.nav.is-solid .logo-dark  { opacity: 1; }
.nav.is-solid .nav-links a { color: var(--g600); }
.nav.is-solid .nav-links a:hover { color: var(--ink); border-bottom-color: var(--blue); }
.nav.is-solid .btn-nav { background: var(--blue); color: #fff; }
.nav.is-solid .btn-nav:hover { background: var(--blue-700); }

@media (max-width: 980px) { .nav-links { display: none; } .btn-nav { margin-inline-start: auto; } }

/* ═════════════════════════════════════════════════════════════ البطل ═══ */

.hero {
  position: relative; overflow: hidden;
  background: var(--blue);
  color: #fff;
  padding: calc(74px + clamp(48px, 7vw, 96px)) 0 clamp(48px, 6vw, 80px);
  min-height: min(100svh, 980px);
}
/* سدى النول: خيوط رأسية خفيفة على الأزرق كله — نفس الخيوط اللي
   في الكانفس، كأن السجادة جزء من نول أكبر من الشاشة */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 22px 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
}
.hero::after {
  content: ''; position: absolute; pointer-events: none;
  width: 900px; height: 900px; inset-inline-end: -320px; top: -260px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(92,225,255,.28), transparent 70%);
}

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero h1 {
  font-size: var(--fs-display); line-height: 1.1; font-weight: 900;
  margin-bottom: 28px;
}
.hero-lede {
  font-size: var(--fs-lede); font-weight: 400; line-height: 1.85;
  color: rgba(255,255,255,.9); max-width: 50ch; margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-facts {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start;
  gap: 8px 36px; margin: 46px 0 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.22);
}
.hero-facts div { display: grid; gap: 2px; }
.hero-facts dt { font-size: 13px; color: var(--blue-100); opacity: .8; }
.hero-facts dd { margin: 0; font-size: 16px; font-weight: 600; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: repeat(2, auto); }
}

/* ─── النول ───────────────────────────────────────────────────────── */

.loom { margin: 0; display: grid; justify-items: center; gap: 14px; }
.loom-stage { position: relative; width: min(100%, 400px); }
.loom-stage canvas { width: 100%; height: auto; }
.loom-warp { position: absolute; inset: 0; pointer-events: none; }
.loom-knots { filter: drop-shadow(0 26px 34px rgba(5,8,28,.42)); }

.replay {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--blue-100); cursor: pointer;
  font: inherit; font-size: 14px; padding: 6px 8px; border-radius: var(--r-sm);
  opacity: 0; transition: opacity .3s, color .2s;
}
.loom.is-done .replay { opacity: 1; }
.replay:hover { color: #fff; }

/* ─── بطاقة القطعة ────────────────────────────────────────────────── */

.tag {
  position: absolute; z-index: 2;
  inset-inline-end: -14%; bottom: 9%;
  width: min(62%, 236px);
  background: #fff; color: var(--ink);
  border-radius: var(--r);
  padding: 14px 14px 12px;
  box-shadow: 0 18px 40px rgba(5,8,28,.35), 0 2px 0 rgba(5,8,28,.08);
  transform-origin: 50% -30px;
  opacity: 0; transform: translateY(-40px) rotate(-14deg);
}
/* الخيط اللي البطاقة متعلّقة بيه */
.tag::before {
  content: ''; position: absolute; top: -34px; inset-inline-start: 50%;
  width: 1.5px; height: 34px; background: rgba(255,255,255,.75);
}
.tag::after {
  content: ''; position: absolute; top: 9px; inset-inline-start: calc(50% - 5px);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--light); box-shadow: inset 0 0 0 2px var(--g200);
}
.loom.is-done .tag { animation: swing 1.25s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes swing {
  0%   { opacity: 0; transform: translateY(-40px) rotate(-14deg); }
  30%  { opacity: 1; transform: translateY(0) rotate(9deg); }
  55%  { transform: rotate(-5deg); }
  75%  { transform: rotate(2.5deg); }
  100% { opacity: 1; transform: rotate(-3deg); }
}
.tag-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 6px; }
.tag-head img { width: 54px; height: auto; }
.tag-state { font-size: 11.5px; font-weight: 600; color: var(--ok); background: var(--ok-bg);
             padding: 2px 9px; border-radius: 20px; }
.tag-code {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 19px;
  letter-spacing: .03em; font-variant-numeric: tabular-nums; text-align: right; margin-bottom: 8px;
}
.tag-body { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; }
.tag-qr svg { width: 74px; height: 74px; }
.tag-meta { margin: 0; display: grid; gap: 3px; }
.tag-meta div { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; line-height: 1.5; }
.tag-meta dt { color: var(--g400); }
.tag-meta dd { margin: 0; font-weight: 600; white-space: nowrap; }

@media (max-width: 960px) {
  .tag { inset-inline-end: -4%; }
}
@media (max-width: 520px) {
  .tag { width: 64%; padding: 11px 11px 10px; }
  .tag-code { font-size: 16px; }
  .tag-body { grid-template-columns: 58px 1fr; gap: 8px; }
  .tag-qr svg { width: 58px; height: 58px; }
  .tag-meta div { font-size: 10.5px; }
}

/* ═══════════════════════════════════════════════════════ الأقسام ═══ */

.sec { padding: var(--sec) 0; }
.sec-head { margin-bottom: clamp(36px, 5vw, 64px); }
.sec h2, .journey h2, .scan h2, .ledger-sec h2, .closing h2 {
  font-size: var(--fs-h2); line-height: 1.15; margin-bottom: 20px;
}
.sec-head .lede { color: var(--g600); }

/* ═════════════════════════════════════════════════════════ الفكرة ═══ */

.why-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 88px); align-items: center;
}
.why-copy .lede { color: var(--ink); }
.why-copy p:not(.lede) { color: var(--g600); max-width: 56ch; }
.why h2 { font-size: clamp(28px, 3.5vw, 48px); }
/* كل جملة في سطرها — «صنف.» لوحدها في سطر كانت بتكسر المعنى */
.nb { display: block; white-space: nowrap; }
@media (max-width: 960px) { .why-grid { grid-template-columns: 1fr; } }

.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--light); border-radius: calc(var(--r) + 4px);
}
.seg button {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  border: 0; background: transparent; color: var(--g600);
  min-height: 42px; padding: 8px 20px; border-radius: var(--r);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--blue); box-shadow: 0 2px 8px rgba(11,16,51,.1); }
.seg-dark { background: rgba(255,255,255,.12); }
.seg-dark button { color: rgba(255,255,255,.8); }
.seg-dark button[aria-pressed="true"] { background: #fff; color: var(--blue); }

.compare-panel {
  position: relative; margin-top: 18px;
  background: #fff; border: 1px solid var(--g200); border-radius: var(--r-lg);
  padding: 10px; min-height: 0;
  box-shadow: 0 24px 60px rgba(11,16,51,.07);
  transition: min-height .55s cubic-bezier(.2,.8,.2,1);
}
.compare[data-mode="piece"] .compare-panel { min-height: 452px; }

.sku-row {
  border-radius: var(--r); background: var(--light); padding: 20px 22px;
  transition: opacity .35s, transform .35s;
}
.sku-name { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.sku-cells { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14.5px; color: var(--g600); }
.sku-cells b { color: var(--ink); font-family: 'Bricolage Grotesque', 'Beiruti', sans-serif; }

.pieces { list-style: none; margin: 0; padding: 0; position: absolute; inset: 10px; display: grid; gap: 6px; align-content: start; }
.piece {
  display: grid; grid-template-columns: 116px minmax(0, 1fr) 52px auto;
  gap: 14px; align-items: center;
  padding: 13px 16px; border-radius: var(--r);
  background: #fff; border: 1px solid var(--g200);
  font-size: 14.5px;
  opacity: 0; transform: translateY(calc(var(--i) * -58px)) scale(.97);
  pointer-events: none;
}
.p-code { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; letter-spacing: .02em; text-align: right; }
.p-where { color: var(--g600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-cost { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }
.piece-more { display: block; border-style: dashed; color: var(--g600); text-align: center; }

.compare[data-mode="piece"] .sku-row { opacity: 0; transform: scale(.97); }
.compare[data-mode="piece"] .piece {
  opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .45s calc(var(--i) * 70ms), transform .6s cubic-bezier(.2,.8,.2,1) calc(var(--i) * 70ms);
}
.compare[data-mode="sku"] .piece { transition: opacity .2s, transform .3s; }

.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 11px;
        border-radius: 20px; white-space: nowrap; line-height: 1.6; }
.chip-ok      { color: var(--ok);      background: var(--ok-bg); }
.chip-warn    { color: var(--warn);    background: var(--warn-bg); }
.chip-transit { color: var(--transit); background: var(--transit-bg); }
.chip-sold    { color: var(--sold);    background: var(--sold-bg); }
.chip-qc      { color: var(--qc);      background: var(--qc-bg); }

.compare-note { margin: 14px 4px 0; font-size: 14.5px; color: var(--g600); min-height: 1.8em; }

@media (max-width: 620px) {
  .piece { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .p-where { grid-column: 1 / -1; grid-row: 2; }
  .p-cost { display: none; }
  .compare[data-mode="piece"] .compare-panel { min-height: 560px; }
}

/* ══════════════════════════════════════════════════════ رحلة القطعة ═══ */

.journey { position: relative; background: var(--light); height: calc(100vh + var(--n) * 55vh); }
.journey-pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.journey-pin > .wrap { padding-top: 74px; }
.journey-head .lede { color: var(--g600); margin-bottom: 0; }

.track { position: relative; margin: clamp(40px, 6vh, 72px) 44px clamp(36px, 5vh, 56px); height: 92px; }
.track-line {
  position: absolute; inset-inline: 0; top: 36px; height: 4px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--g200) 0 8px, transparent 8px 12px);
}
.track-fill {
  position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 4px;
  width: calc(var(--p, 0) * 100%); background: var(--blue);
}
.track-nodes {
  list-style: none; margin: 0; padding: 0; position: absolute; inset: 0;
  display: flex; justify-content: space-between;
}
.track-nodes li { position: relative; display: grid; justify-items: center; width: 0; }
.node {
  position: absolute; top: 28px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--g200);
  transition: border-color .3s, background-color .3s, transform .3s;
}
.node-nm {
  position: absolute; top: 60px; white-space: nowrap; font-size: 14px; font-weight: 600;
  color: var(--g400); transition: color .3s;
}
.track-nodes li.is-past .node { border-color: var(--blue); background: var(--blue); }
.track-nodes li.is-on .node { border-color: var(--blue); background: #fff; transform: scale(1.25); box-shadow: 0 0 0 6px rgba(43,59,255,.14); }
.track-nodes li.is-past .node-nm, .track-nodes li.is-on .node-nm { color: var(--ink); }

.track-tag {
  position: absolute; top: -4px; inset-inline-start: calc(var(--p, 0) * 100%);
  transform: translateX(50%);
  background: var(--ink); color: #fff; border-radius: var(--r-sm);
  padding: 4px 11px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: .03em; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(11,16,51,.25);
}
.track-tag::after {
  content: ''; position: absolute; bottom: -5px; left: calc(50% - 5px);
  border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink);
}

.stations { list-style: none; margin: 0; padding: 0; position: relative; min-height: 220px; }
.station {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 28px; align-items: start;
  opacity: 0; transform: translateY(18px); transition: opacity .4s, transform .5s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.station.is-on { opacity: 1; transform: none; pointer-events: auto; }
.st-n {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(72px, 9vw, 120px);
  line-height: .9; color: var(--blue); font-variant-numeric: tabular-nums;
}
.st-body h3 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 10px; }
.st-body p { font-size: var(--fs-lede); font-weight: 400; color: var(--ink); max-width: 56ch; margin-bottom: 14px; }
.st-chip { font-size: 14px; color: var(--g600); }
.st-chip b { color: var(--blue); }

/* الموبايل وتقليل الحركة: قايمة عادية بدل التثبيت */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .journey { height: auto; padding: var(--sec) 0; }
  .journey-pin { position: static; height: auto; display: block; }
  .journey-pin > .wrap { padding-top: 0; }
  .track { display: none; }
  .stations { min-height: 0; display: grid; gap: 34px; margin-top: 40px;
              border-inline-start: 3px solid var(--blue-100); padding-inline-start: 22px; }
  .station { position: static; opacity: 1; transform: none; pointer-events: auto; grid-template-columns: 1fr; }
  .st-n { font-size: 40px; margin-bottom: 6px; }
}

/* ══════════════════════════════════════════════════════════ المسح ═══ */

.scan { background: var(--blue); color: #fff; padding: var(--sec) 0; position: relative; overflow: hidden; }
.scan::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 100% 22px;
}
.scan-grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(36px, 6vw, 96px); align-items: center;
}
.scan .lede { color: rgba(255,255,255,.9); }
.scan-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; max-width: 54ch; }
.scan-points li { position: relative; padding-inline-start: 26px; color: rgba(255,255,255,.86); }
.scan-points li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .72em;
  width: 12px; height: 2px; background: var(--cyan);
}
.scan-points b { color: #fff; }
@media (max-width: 960px) { .scan-grid { grid-template-columns: 1fr; } }

.device-wrap { display: grid; justify-items: center; gap: 20px; }
.device {
  position: relative; width: min(100%, 340px); aspect-ratio: 9 / 17.5;
  background: var(--ink); border-radius: 42px; padding: 12px;
  box-shadow: 0 40px 80px rgba(5,8,28,.45), inset 0 0 0 2px rgba(255,255,255,.08);
}
.device-notch { position: absolute; top: 20px; left: 50%; width: 90px; height: 24px; margin-left: -45px;
                background: var(--ink); border-radius: 14px; z-index: 3; }
.screen { position: relative; height: 100%; border-radius: 32px; overflow: hidden; background: #fff; }

.cam {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #2a2f4f, #0B1033 70%);
  transition: opacity .4s, transform .5s;
}
.cam-frame { position: absolute; width: 66%; aspect-ratio: 1; }
.cam-frame i { position: absolute; width: 28px; height: 28px; border: 3px solid var(--cyan); }
.cam-frame i:nth-child(1) { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 10px 0 0; }
.cam-frame i:nth-child(2) { top: 0; left: 0;  border-width: 3px 0 0 3px; border-radius: 10px 0 0 0; }
.cam-frame i:nth-child(3) { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 10px 0; }
.cam-frame i:nth-child(4) { bottom: 0; left: 0;  border-width: 0 0 3px 3px; border-radius: 0 0 0 10px; }
.cam-label {
  width: 48%; background: #fff; border-radius: 10px; padding: 10px; display: grid; gap: 6px; justify-items: center;
  transform: rotate(-4deg); box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.cam-label img { width: 46px; }
.cam-qr svg { width: 100%; height: auto; }
.cam-code { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .04em; }
.laser {
  position: absolute; left: 17%; right: 17%; top: 28%; height: 2px;
  background: var(--cyan); box-shadow: 0 0 14px 3px rgba(92,225,255,.75);
  opacity: 0;
}
.device[data-state="scanning"] .laser { animation: laser 1.1s ease-in-out 2 alternate; }
@keyframes laser { 0% { opacity: 1; top: 28%; } 100% { opacity: 1; top: 70%; } }

.passport {
  position: absolute; inset: 0; padding: 52px 18px 18px; overflow: auto;
  background: #fff; color: var(--ink);
  opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity .45s, transform .55s cubic-bezier(.2,.8,.2,1);
}
.device[data-state="done"] .cam { opacity: 0; transform: scale(1.06); }
.device[data-state="done"] .passport { opacity: 1; transform: none; pointer-events: auto; }

.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
           padding-bottom: 14px; border-bottom: 1px solid var(--g200); margin-bottom: 8px; }
.pp-code { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 13px; color: var(--g400);
           letter-spacing: .05em; text-align: right; }
.pp-name { font-size: 21px; font-weight: 800; line-height: 1.3; }
.pp-sub  { font-size: 13px; color: var(--cyan-700); font-weight: 600; }
.pp-rows { margin: 0; }
.pp-rows .row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #EDEFF5; font-size: 14px;
  max-height: 48px; overflow: hidden;
  transition: max-height .4s, padding .4s, opacity .3s, border-color .4s;
}
.pp-rows dt { color: var(--g400); }
.pp-rows dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.pp-rows dd[dir="ltr"] { font-family: 'Bricolage Grotesque', sans-serif; }
.sw { width: 13px; height: 13px; border-radius: 4px; background: var(--c); display: inline-block; }
.pp-hist { list-style: none; margin: 14px 0 0; padding: 0; padding-inline-start: 18px; border-inline-start: 2px solid var(--blue-100);
           display: grid; gap: 8px; font-size: 13px; max-height: 200px;
           transition: max-height .4s, opacity .3s, margin .4s; }
.pp-hist li { display: grid; position: relative; }
.pp-hist li::before { content: ''; position: absolute; inset-inline-start: -23px; top: 8px; width: 8px; height: 8px;
                      border-radius: 50%; background: var(--blue); }
.pp-hist span { color: var(--g600); }
.pp-public { font-size: 13px; color: var(--cyan-700); background: var(--cyan-100); border-radius: var(--r-sm);
             padding: 10px 12px; margin: 14px 0 0; display: none; }

/* عين الزبون: اللي للموظف بس بيتطوي */
.device[data-view="public"] .staff { max-height: 0; padding-block: 0; opacity: 0; border-color: transparent; margin: 0; overflow: hidden; }
.device[data-view="public"] .pp-public { display: block; }

/* الكشف بالتدريج بعد المسح */
.device[data-state="done"] .pp-rows .row { animation: rowIn .45s both; }
.device[data-state="done"] .pp-rows .row:nth-child(2) { animation-delay: .06s; }
.device[data-state="done"] .pp-rows .row:nth-child(3) { animation-delay: .12s; }
.device[data-state="done"] .pp-rows .row:nth-child(4) { animation-delay: .18s; }
.device[data-state="done"] .pp-rows .row:nth-child(5) { animation-delay: .24s; }
.device[data-state="done"] .pp-rows .row:nth-child(6) { animation-delay: .30s; }
.device[data-state="done"] .pp-rows .row:nth-child(7) { animation-delay: .36s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-14px); } }

.device-ctrl { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ═══════════════════════════════════════════════════ اللي جوّه النظام ═══ */

.tablist {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-bottom: 1px solid var(--g200); margin-bottom: clamp(28px, 4vw, 48px);
}
.tablist [role="tab"] {
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  background: none; border: 0; color: var(--g600);
  padding: 14px 18px 16px; position: relative; min-height: 48px;
  transition: color .2s;
}
.tablist [role="tab"]::after {
  content: ''; position: absolute; inset-inline: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--blue); transform: scaleX(0); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.tablist [role="tab"]:hover { color: var(--ink); }
.tablist [role="tab"][aria-selected="true"] { color: var(--blue); }
.tablist [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }

.tabpanel {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px); align-items: start;
}
.tabpanel[hidden] { display: none; }
.tabpanel.is-in .tp-copy  { animation: tpIn .5s cubic-bezier(.2,.8,.2,1) both; }
.tabpanel.is-in .browser  { animation: tpIn .6s .06s cubic-bezier(.2,.8,.2,1) both; }
@keyframes tpIn { from { opacity: 0; transform: translateY(16px); } }

.tp-copy h3 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 12px; }
.tp-lead { font-size: 18px; font-weight: 400; color: var(--ink); margin-bottom: 22px; }
.caps { list-style: none; margin: 0; padding: 0; display: grid; }
.caps li {
  position: relative; padding: 12px 0 12px; padding-inline-start: 28px;
  border-top: 1px solid var(--g200); font-size: 15.5px; line-height: 1.7;
}
.caps li::before {
  content: ''; position: absolute; inset-inline-start: 2px; top: 21px;
  width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

.browser {
  border-radius: var(--r-lg); overflow: hidden; background: #fff;
  border: 1px solid var(--g200);
  box-shadow: 0 30px 70px rgba(11,16,51,.13);
}
.browser-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: var(--light); border-bottom: 1px solid var(--g200);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--g200); }
.browser-bar span {
  margin-inline-start: auto; margin-inline-end: auto; font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 12px; color: var(--g400); background: #fff; padding: 3px 14px; border-radius: 6px;
}
@media (max-width: 960px) {
  .tabpanel { grid-template-columns: 1fr; }
  .tablist { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tablist [role="tab"] { white-space: nowrap; }
}

/* ══════════════════════════════════════════════════════════ الدفتر ═══ */

.ledger-sec { background: var(--ink); color: #fff; padding: var(--sec) 0; }
.ledger-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 88px); align-items: center;
}
.ledger-sec .lede { color: rgba(214,219,240,.9); }
.guarantees { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 16px; max-width: 56ch; }
.guarantees li { position: relative; padding-inline-start: 26px; color: rgba(214,219,240,.82); }
.guarantees li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .6em; width: 9px; height: 9px;
  border-radius: 2px; background: var(--cyan); transform: rotate(45deg);
}
.guarantees b { color: #fff; }
@media (max-width: 960px) { .ledger-grid { grid-template-columns: 1fr; } }

.ledger { display: grid; gap: 16px; }
.entry {
  background: var(--ink-2); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg);
  padding: 18px 20px; font-size: 14.5px;
}
.entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px;
              padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.1); }
.e-code { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; color: var(--cyan); letter-spacing: .03em; }
.e-desc { color: rgba(214,219,240,.75); }
.ln, .lh, .entry-foot {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) 92px 92px;
  gap: 10px; align-items: center; padding: 9px 0;
}
.ln { border-bottom: 1px dashed rgba(255,255,255,.08); }
.lh { padding: 4px 0 6px; font-size: 12.5px; color: rgba(214,219,240,.5); }
.lh .dr, .lh .cr { font-family: inherit; font-weight: 500; }
.a-code { font-family: 'Bricolage Grotesque', sans-serif; color: var(--blue-300); }
.dr, .cr { font-family: 'Bricolage Grotesque', sans-serif; font-variant-numeric: tabular-nums; text-align: left; font-weight: 600; }
.entry-foot { border-top: 1px solid rgba(255,255,255,.18); margin-top: 4px; padding-top: 12px; position: relative; }
.entry-foot .a-name { grid-column: 1 / 3; color: rgba(214,219,240,.7); }
.entry-foot .a-name { display: flex; align-items: center; gap: 12px; }
.balanced {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--cyan);
  padding: 2px 10px 2px 8px; border-radius: 20px; line-height: 1.6;
}

/* التتابع: السطور بتتكتب، والإجمالي بيبان، وبعدين «متوازن» */
.ledger.is-armed .ln, .ledger.is-armed .entry-foot { opacity: 0; transform: translateX(-12px); }
.ledger.is-armed .balanced { opacity: 0; transform: scale(.6); }
.ledger.is-armed .ledger-profit { opacity: 0; }
.ledger .ln, .ledger .entry-foot, .ledger .balanced, .ledger-profit {
  transition: opacity .45s, transform .5s cubic-bezier(.2,.8,.2,1);
}
.ledger .is-shown { opacity: 1 !important; transform: none !important; }
.ledger .balanced.is-shown { transform: scale(1) !important; }

.ledger-profit { margin: 4px 4px 0; color: rgba(214,219,240,.8); font-size: 15px; }
.ledger-profit b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; color: var(--cyan); margin: 0 6px; }
.ledger-profit span { display: block; font-size: 13.5px; color: rgba(214,219,240,.6); }

@media (max-width: 520px) {
  .ln, .entry-foot { grid-template-columns: 40px minmax(0, 1fr) 70px 70px; font-size: 13px; }
}

/* ══════════════════════════════════════════════════════════ الهوية ═══ */

.identity { background: var(--light); }
.brand-sys { display: grid; gap: 22px; margin-bottom: clamp(40px, 6vw, 72px); }

.dist {
  display: flex; height: 92px; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--g200); background: #fff;
}
.dist span {
  flex: var(--w) 0 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px 14px; font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap;
}
.dist b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 700; line-height: 1.1; }
.d-white { background: #fff; color: var(--g600); }
.d-blue  { background: var(--blue); color: #fff; }
.d-ink   { background: var(--ink); color: #fff; }
.d-light { background: var(--light); color: var(--g600); border-inline-start: 1px solid var(--g200); }
.d-cyan  { background: var(--cyan); }
.d-light b { font-size: 15px; }
@media (max-width: 620px) { .dist span { padding: 10px 8px; font-size: 0; } .dist b { font-size: 16px; } .d-light b { display: none; } }

.swatches { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr; gap: 12px; }
.sw-card {
  border-radius: var(--r-lg); padding: 18px; min-height: 150px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
}
.sw-card span { font-weight: 700; font-size: 17px; }
.sw-card code { font-family: 'Bricolage Grotesque', sans-serif; font-size: 14px; opacity: .85; text-align: right; }
.sw-card small { font-size: 12.5px; opacity: .75; }
.sw-blue  { background: var(--blue); color: #fff; }
.sw-ink   { background: var(--ink); color: #fff; }
.sw-cyan  { background: var(--cyan); color: var(--ink); }
.sw-light { background: #fff; color: var(--ink); border: 1px solid var(--g200); }
@media (max-width: 760px) { .swatches { grid-template-columns: 1fr 1fr; } }

.type-spec { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ts { background: #fff; border: 1px solid var(--g200); border-radius: var(--r-lg); padding: 24px 22px 18px; }
.ts-sample { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.25; margin-bottom: 14px; color: var(--ink); }
.ts-ar { font-weight: 900; }
.ts-lat { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: .02em; color: var(--blue); text-align: right; }
.ts-name { font-size: 14px; color: var(--g600); }
.ts-name b { color: var(--ink); font-weight: 700; }
@media (max-width: 760px) { .type-spec { grid-template-columns: 1fr; } }

.gallery { position: relative; }
.g-track {
  margin-inline-end: calc(50% - 50vw);
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 460px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 6px; scrollbar-width: none;
}
.g-track::-webkit-scrollbar { display: none; }
.g-item { margin: 0; scroll-snap-align: start; }
.g-item img { border-radius: var(--r-lg); aspect-ratio: 960 / 679; object-fit: cover; background: #e8eaf1; }
.g-item figcaption { display: grid; gap: 2px; padding: 12px 4px 0; }
.g-item figcaption b { font-size: 16px; }
.g-item figcaption span { font-size: 14px; color: var(--g600); }
.g-ctrl { display: flex; gap: 8px; margin-top: 18px; }
.g-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--g200); color: var(--ink); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.g-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ════════════════════════════════════════════════════════════ لمين ═══ */

.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.who-col { border-top: 4px solid var(--blue); padding-top: 22px; }
.who-col:nth-child(2) { border-top-color: var(--ink); }
.who-col:nth-child(3) { border-top-color: var(--cyan); }
.who-col h3 { font-size: var(--fs-h3); margin-bottom: 14px; }
.who-col ul { list-style: none; margin: 0; padding: 0; }
.who-col li { padding: 9px 0; border-bottom: 1px solid var(--g200); color: var(--g600); font-size: 15.5px; }
@media (max-width: 860px) { .who-grid { grid-template-columns: 1fr; } }

/* ═════════════════════════════════════════════════════════ الأسئلة ═══ */

.faq-sec { background: var(--light); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); }
.faq-grid .sec-head { position: sticky; top: 110px; align-self: start; }
@media (max-width: 960px) { .faq-grid { grid-template-columns: 1fr; } .faq-grid .sec-head { position: static; } }

.faq details { border-bottom: 1px solid var(--g200); }
.faq details:first-child { border-top: 1px solid var(--g200); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-size: 17.5px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: 0 0 22px; height: 22px; border-radius: 50%;
  background:
    linear-gradient(var(--blue), var(--blue)) center / 10px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center / 2px 10px no-repeat,
    var(--blue-50);
  transition: transform .3s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--g600); max-width: 64ch; line-height: 1.9; }

/* ══════════════════════════════════════════════════════════ الختام ═══ */

.closing { position: relative; overflow: hidden; background: var(--blue); color: #fff; padding: var(--sec) 0; }
.closing-in { position: relative; z-index: 1; }
.closing h2 { max-width: 14ch; }
.closing p { font-size: var(--fs-lede); font-weight: 400; color: rgba(255,255,255,.88); margin-bottom: 30px; }
/* شكل الحلقتين من باكدج الهوية — مُستعمل كعنصر، مش لوجو متعدّل */
.rings {
  position: absolute; width: min(70vw, 760px); aspect-ratio: 1;
  inset-inline-start: max(-14vw, -200px); top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  -webkit-mask: url('../brand/nool-shape-rings-mono-blue.svg') center / contain no-repeat;
          mask: url('../brand/nool-shape-rings-mono-blue.svg') center / contain no-repeat;
}

/* ═════════════════════════════════════════════════════════ التذييل ═══ */

.foot { background: var(--ink-3); color: rgba(200,205,230,.78); padding: 64px 0 34px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
            padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
.foot-brand img { width: 104px; }
.foot-brand p { margin: 16px 0 0; font-size: 14.5px; max-width: 36ch; }
.foot-links { display: grid; grid-template-columns: repeat(4, auto); gap: 12px 30px; align-content: start; }
.foot-links a { text-decoration: none; font-size: 14.5px; }
.foot-links a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; padding-top: 22px; font-size: 13px;
               color: rgba(154,160,180,.76); }
@media (max-width: 620px) { .foot-links { grid-template-columns: repeat(2, auto); } }

/* ════════════════════════════════════════════════════ تقليل الحركة ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
                           transition-duration: .001ms !important; }
  .tag { opacity: 1; transform: rotate(-3deg); }
}
