/* ==========================================================================
   المعمار الذكي — أنماط الموقع
   الهوية: كحلي #0C233B، فيروزي #00968D، أبيض. الخط: Noto Kufi Arabic للعربية،
   و Noto Sans للأرقام والحروف اللاتينية (عائلة واحدة مركّبة باسم "Mimar").
   ========================================================================== */

/* ---------- الخطوط (مستضافة ذاتيًا، رخصة OFL) ---------- */
@font-face {
  font-family: "Mimar";
  src: url("../fonts/noto-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+2000-200B, U+2010-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Mimar";
  src: url("../fonts/noto-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+2000-200B, U+2010-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Mimar";
  src: url("../fonts/noto-kufi-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+25CC, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Mimar";
  src: url("../fonts/noto-kufi-arabic-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+25CC, U+FB50-FDFF, U+FE70-FEFF;
}

/* ---------- المتغيرات ---------- */
:root {
  --navy: #0C233B;
  --navy-deep: #081A2C;
  --teal: #00968D;
  --teal-ink: #007A72;      /* فيروزي للنصوص الصغيرة على الفاتح (5.2:1) */
  --teal-light: #4FC1B8;    /* فيروزي للنصوص على الكحلي (7.3:1) */
  --teal-tint: #EEF7F6;
  --paper: #F6F9FA;
  --mist: #EBF3F3;
  --line: #DFE8EB;
  --field: #7D8FA1;         /* حدود الحقول (3.3:1) */
  --ink: #0C233B;
  --ink-2: #4C5F73;         /* نص ثانوي (6.6:1) */
  --on-navy: #C3CEDA;       /* نص ثانوي على الكحلي (10:1) */
  --on-navy-2: #9FB0C0;     /* مصادر على الكحلي (7.2:1) */
  --danger: #B42318;
  --white: #FFFFFF;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 20px;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(64px, 8vw, 104px);
  --header-h: 84px;

  --font: "Mimar", "Noto Kufi Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ---------- الأساس ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, p, ul, ol, figure, figcaption { margin: 0; }
ul, ol { padding: 0; }
ul[role="list"],
ol[role="list"] { list-style: none; }

[hidden] { display: none !important; }

a {
  color: var(--teal-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }   /* يستقبل التركيز من رابط «تخطَّ إلى المحتوى» دون إطار */

h1, h2, h3, h4 { font-weight: 700; color: var(--navy); text-wrap: balance; }
p, li, summary, td { text-wrap: pretty; }   /* يمنع بقاء كلمة وحيدة في آخر السطر حيث يدعمه المتصفح */
h1 { font-size: clamp(2rem, 1.15rem + 2.6vw, 3.25rem); line-height: 1.4; }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.25vw, 2.25rem); line-height: 1.45; }
h3 { font-size: 1.1875rem; line-height: 1.6; }
h4 { font-size: 1.0625rem; line-height: 1.6; }

b, strong { font-weight: 700; }

.icon { width: 1em; height: 1em; flex: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -120px;
  inset-inline-start: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-s);
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 28px;
  border: 2px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 1.1875rem;   /* 19px عريض: نص كبير وفق WCAG */
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--teal-ink); color: var(--white); }
.btn-sm { min-height: 46px; padding: 6px 20px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- الترويسة ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}
.brand { display: block; flex: none; border-radius: 6px; }
.brand img { width: 180px; }   /* الحد الأدنى لحجم الشعار رقميًا: 180px */

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav ul { display: flex; gap: 2px; list-style: none; }
.site-nav a:not(.btn) {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  color: var(--navy);
  font-size: 1rem;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { background: var(--paper); color: var(--teal-ink); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font-size: 24px;
  cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1079px) {
  .js .nav-toggle { display: inline-flex; }
  .site-nav ul { flex-wrap: wrap; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;   /* الحاوية تشمل الهوامش الجانبية أصلًا */
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -28px rgba(12, 35, 59, 0.45);
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav a:not(.btn) {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1.0625rem;
  }
  .js .site-nav .btn { min-height: 52px; font-size: 1.0625rem; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .site-nav { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; }
  html:not(.js) .site-nav ul { gap: 0 2px; }
  html:not(.js) .site-nav a:not(.btn) { padding: 6px 8px; }
}

/* ---------- الواجهة الرئيسية ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 104px); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero-copy h1 .line { display: block; }   /* سطر لكل عبارة بدل كسر عشوائي */
.lead {
  max-width: 34em;
  margin-top: 24px;
  font-size: 1.1875rem;
  line-height: 1.9;
  color: var(--ink-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 36px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 36px;
  list-style: none;
  color: var(--navy);
  font-size: 1rem;
}
.hero-facts li { display: flex; align-items: center; gap: 10px; }
.hero-facts li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--teal);
}

.hero-visual { position: relative; }
.hero-photo { margin-inline-start: 14%; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: 70% 50%;
  border-radius: var(--radius-l);
}
/* المربعات الرقمية الثلاثة من الشعار */
.squares {
  position: absolute;
  top: -28px;
  left: 30px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: var(--teal);
  box-shadow: -32px 18px 0 0 var(--teal), -12px 35px 0 0 var(--navy);
}

/* سجل الطلب: العنصر المميز في الواجهة */
.record {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin-top: -132px;
  padding: 22px 24px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 32px 64px -32px rgba(12, 35, 59, 0.5);
}
.record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.record-kind { font-size: 0.875rem; font-weight: 700; color: var(--teal-ink); }
.record-title { font-size: 1.125rem; font-weight: 700; line-height: 1.55; color: var(--navy); }
.tag {
  flex: none;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--mist);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 700;
}
.record-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 16px 0 4px;
}
.record-progress span {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}
.record-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--teal);
  transform-origin: right center;
  transition: transform 0.5s ease;
}
.record-steps { list-style: none; margin-top: 6px; }
.record-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.record-steps li:last-child { border-bottom: 0; }
.mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border: 1.5px solid var(--teal);
  border-radius: 7px;
  background: var(--teal);
  color: var(--white);
  font-size: 17px;
}
.step-text b { display: block; font-size: 1rem; line-height: 1.6; color: var(--navy); }
.step-text span { display: block; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); }
.step-time {
  margin-top: 3px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  transition: opacity 0.3s ease;
}
.step-text { transition: opacity 0.3s ease; }
.record-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-2);
}
.record-foot .icon { font-size: 16px; color: var(--teal-ink); }

/* تسلسل الختم: يعمل فقط مع JavaScript ودون تفضيل تقليل الحركة */
.js-anim .record-progress span:not(.is-on)::after { transform: scaleX(0); }
.js-anim .record-steps li:not(.is-stamped) .mark { background: var(--white); border-color: var(--line); color: transparent; }
.js-anim .record-steps li:not(.is-stamped) .step-text { opacity: 0.45; }
.js-anim .record-steps li:not(.is-stamped) .step-time { opacity: 0; }
.js-anim .record-steps li.is-stamped .mark { animation: stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
@keyframes stamp {
  0% { transform: scale(1.7) rotate(-10deg); opacity: 0; }
  60% { transform: scale(0.9) rotate(0); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- الأقسام ---------- */
.section { padding-block: var(--section-y); }
.section-paper { background: var(--paper); }
.section-mist { background: var(--mist); }
.band-navy { background: var(--navy); color: var(--white); }
.band-navy h2,
.band-navy h3 { color: var(--white); }

.section-head { max-width: 46rem; margin-bottom: clamp(32px, 4.5vw, 56px); }
.section-head p { margin-top: 14px; font-size: 1.125rem; line-height: 1.9; color: var(--ink-2); }
.band-navy .section-head p { color: var(--on-navy); }

.source { margin-top: 10px; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); }

.sq-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--mist);
  color: var(--teal-ink);
  font-size: 24px;
}
.section-mist .sq-icon { background: var(--white); }
.sq-dark { background: var(--navy); color: var(--white); }

/* ---------- التحدي ---------- */
.ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}
.ledger li { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
/* الترتيب: عنوان المشكلة، ثم الشريط، ثم الرقم، ثم ما يقيسه الرقم بالضبط */
.ledger h3 { font-size: 1.125rem; }
.meter {
  display: block;
  height: 6px;
  margin: 14px 0 18px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}
.meter > span { display: block; width: var(--v); height: 100%; border-radius: 3px; background: var(--teal); }
.ledger .ledger-fig {
  font-size: clamp(2.75rem, 2rem + 2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
}
.ledger .ledger-cap { margin-top: 10px; font-size: 1rem; line-height: 1.85; color: var(--on-navy); }
.ledger .source { margin-top: 12px; font-size: 0.875rem; color: var(--on-navy-2); }

/* ---------- كيف تعمل ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}
.flow-step { position: relative; }
.flow-step::before {
  content: "";
  position: absolute;
  top: 23px;
  inset-inline-start: 64px;
  inset-inline-end: -48px;
  height: 2px;
  background: repeating-linear-gradient(to left, var(--teal) 0 10px, transparent 10px 18px);
}
.flow-step:last-child::before { display: none; }
.flow-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
}
.flow-icon { display: block; margin-top: 28px; font-size: 32px; color: var(--teal-ink); }
.flow-step h3 { margin-top: 12px; font-size: 1.375rem; }
.flow-step p { margin-top: 8px; color: var(--ink-2); }

.always {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--paper);
}
.always-title { font-size: 1.25rem; }
.always-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  margin-top: 24px;
}
.always-item { display: flex; align-items: flex-start; gap: 16px; }
.always-item h4 { font-size: 1.125rem; }
.always-item p { margin-top: 6px; color: var(--ink-2); }

/* ---------- الوحدات (تبويبات) ---------- */
.modules {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.tablist { display: flex; flex-direction: column; gap: 8px; }
.tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: start;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tab .icon { font-size: 22px; color: var(--teal-ink); }
.tab:hover { border-color: var(--teal); }
.tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tab[aria-selected="true"] .icon { color: var(--teal-light); }

.panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 32px;
  align-items: center;
  min-height: 380px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--white);
}
.panel { grid-column: 1; grid-row: 1; }
.panel:focus-visible { outline-offset: 8px; }
.panel h3 { font-size: 1.5rem; }
.panel p { margin-top: 12px; color: var(--ink-2); }
.modules-art { grid-column: 2; grid-row: 1; }
.modules-art img { width: 100%; }

/* دون JavaScript: تظهر الوحدات الأربع متتالية بدل التبويبات */
html:not(.js) .tablist { display: none; }
html:not(.js) .modules { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .panel[hidden] { display: block !important; }
html:not(.js) .panel { grid-row: auto; }
html:not(.js) .panel + .panel { padding-top: 24px; border-top: 1px solid var(--line); }
html:not(.js) .modules-art { grid-row: 1 / span 4; align-self: start; }

.ticks { display: grid; gap: 10px; margin-top: 22px; list-style: none; }
.ticks li { position: relative; padding-inline-start: 30px; color: var(--navy); }
.ticks li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  inset-inline-start: 2px;
  width: 13px;
  height: 7px;
  border-bottom: 2.5px solid var(--teal);
  border-left: 2.5px solid var(--teal);
  transform: rotate(-45deg);
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  color: var(--ink-2);
}
.note .icon { margin-top: 5px; font-size: 22px; color: var(--teal-ink); }
.note b { color: var(--navy); }
.note-quiet { background: var(--paper); }

/* ---------- لمن ---------- */
.segments {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.segments li { padding-top: 24px; border-top: 2px solid var(--navy); }
.segments h3 { margin-top: 18px; }
.segments p { margin-top: 8px; color: var(--ink-2); }

.market {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin-top: clamp(56px, 7vw, 88px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-l);
  background: var(--paper);
}
.market-art img { width: 100%; mix-blend-mode: multiply; }
.market-title { font-size: 1.375rem; margin-bottom: 8px; }
.market-figs li { padding-block: 18px; border-bottom: 1px solid var(--line); }
.market-figs li:last-child { border-bottom: 0; padding-bottom: 0; }
.mf { font-size: 1.125rem; font-weight: 700; line-height: 1.5; color: var(--navy); }
.mf .num { font-size: 2.25rem; line-height: 1.2; color: var(--teal-ink); }
.market-figs p:not(.mf):not(.source) { color: var(--ink-2); }
.market-figs .source { margin-top: 4px; }

/* ---------- القيمة ---------- */
.value-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 40px;
}
.benefits li { display: flex; gap: 16px; }
.benefits h3 { font-size: 1.125rem; }
.benefits p { margin-top: 6px; color: var(--ink-2); }

.example {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 36px 36px 32px;
  border-radius: var(--radius-l);
  background: var(--navy);
  color: var(--white);
}
.example-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
  font-weight: 700;
}
.example-fig { margin-top: 20px; font-size: 1.375rem; font-weight: 700; line-height: 1.4; }
.example-fig .num { font-size: 3.5rem; line-height: 1.1; color: var(--teal-light); }
.example-cap { margin-top: 6px; font-weight: 700; }
.example-text { margin-top: 12px; color: var(--on-navy); }
/* الخطوط الصاعدة من الهوية */
.rise { display: grid; gap: 8px; margin-top: 28px; }
.rise i { display: block; height: 6px; border-radius: 3px; background: var(--teal); }
.rise i:nth-child(1) { width: 38%; opacity: 0.5; }
.rise i:nth-child(2) { width: 64%; opacity: 0.75; }
.rise i:nth-child(3) { width: 90%; }

/* ---------- المقارنة ---------- */
.compare-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-l); }
.compare { width: 100%; border-collapse: collapse; }
.compare th,
.compare td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
  line-height: 1.75;
}
.compare thead th { background: var(--paper); color: var(--ink-2); font-size: 0.9375rem; }
.compare thead th.col-us { background: var(--navy); color: var(--white); }
.compare tbody th { width: 20%; color: var(--navy); font-weight: 700; }
.compare td { color: var(--ink-2); }
.compare td.col-us { background: var(--teal-tint); color: var(--navy); font-weight: 700; }
.compare tbody tr:last-child > * { border-bottom: 0; }

/* ---------- البدء ---------- */
.journey {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
}
.journey li { position: relative; }
.journey li::before {
  content: "";
  position: absolute;
  top: 21px;
  inset-inline-start: 56px;
  inset-inline-end: -28px;
  height: 2px;
  background: var(--line);
}
.journey li:last-child::before { display: none; }
.j-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 700;
}
.journey .is-key .j-num { border-color: var(--teal-ink); background: var(--teal-ink); color: var(--white); }
.journey h3 { margin-top: 18px; font-size: 1.0625rem; }
.journey p { margin-top: 6px; font-size: 1rem; color: var(--ink-2); }

.plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.plan p { max-width: 44rem; color: var(--ink-2); }
.plan b { color: var(--navy); }
.plan .btn { flex: none; }

/* ---------- الامتثال ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.trust li { display: flex; gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.trust li:nth-child(odd) { padding-inline-end: 40px; }
.trust li:nth-child(even) { padding-inline-start: 40px; border-inline-start: 1px solid var(--line); }
.trust p { margin-top: 6px; color: var(--ink-2); }

/* ---------- رؤية 2030 ---------- */
.v2030 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.aligns { display: grid; gap: 28px; }
.aligns li { display: flex; gap: 16px; }
.aligns p { margin-top: 6px; color: var(--ink-2); }
.aligns .source { margin-top: 4px; }
.context img { width: 100%; max-width: 400px; margin-inline: auto; mix-blend-mode: multiply; }
.context-item { margin-top: 16px; padding: 20px 24px; border-radius: 14px; background: var(--white); }
.context-item p:not(.mf):not(.source) { margin-top: 4px; color: var(--ink-2); }
.context-item .mf .num { font-size: 2rem; }

/* ---------- من نحن ---------- */
.about-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.about-top .section-head { margin-bottom: 0; }
.about-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-l); }

.vm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 56px;
  border-block: 1px solid var(--line);
}
.vm-item { padding-block: 32px; }
.vm-item:first-child { padding-inline-end: 40px; }
.vm-item + .vm-item { padding-inline-start: 40px; border-inline-start: 1px solid var(--line); }
.vm-item h3 { font-size: 1rem; color: var(--teal-ink); }
.vm-item p { margin-top: 10px; font-size: 1.25rem; line-height: 1.9; color: var(--navy); }

.sub-title { margin-top: 72px; font-size: 1.5rem; }
.sub-lead { margin-top: 8px; color: var(--ink-2); }

.traction,
.team {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 28px;
}
.traction li { padding-top: 20px; border-top: 2px solid var(--navy); }
.t-fig { display: block; font-size: 2.75rem; font-weight: 700; line-height: 1.15; color: var(--teal-ink); }
.traction h4 { margin-top: 12px; }
.traction p,
.team p { margin-top: 6px; font-size: 1rem; color: var(--ink-2); }
.team li { padding-top: 20px; border-top: 1px solid var(--line); }
.team li::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 14px;
  border-radius: 3px;
  background: var(--teal);
}

/* ---------- الأسئلة الشائعة ---------- */
.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 56px;
  align-items: start;
}
.faq-wrap .section-head { position: sticky; top: calc(var(--header-h) + 24px); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.6;
  list-style: none;
  text-wrap: balance;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background:
    linear-gradient(var(--teal-ink), var(--teal-ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--teal-ink), var(--teal-ink)) center / 2px 12px no-repeat,
    var(--white);
  border: 1px solid var(--line);
}
.faq details[open] > summary::after {
  background:
    linear-gradient(var(--white), var(--white)) center / 12px 2px no-repeat,
    var(--navy);
  border-color: var(--navy);
}
.faq summary:hover { color: var(--teal-ink); }
.faq details p { max-width: 60ch; padding-bottom: 22px; color: var(--ink-2); }

/* ---------- التواصل ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}
.contact-copy p { margin-top: 16px; font-size: 1.125rem; color: var(--on-navy); }
.contact-list { display: grid; gap: 14px; margin-top: 32px; }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.contact-list .icon { font-size: 22px; color: var(--teal-light); }
.contact-list a { color: var(--white); font-size: 1.0625rem; }
.contact-list a:hover { color: var(--teal-light); }

.form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-l);
  background: var(--white);
  color: var(--ink);
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field label { display: block; margin-bottom: 6px; color: var(--navy); font-size: 1rem; font-weight: 700; }
.optional { color: var(--ink-2); font-size: 0.9375rem; font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1.5px solid var(--field);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
}
.field input[dir="ltr"] { text-align: left; }
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230C233B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--navy); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--navy); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin-top: 6px; color: var(--danger); font-size: 0.9375rem; font-weight: 700; }
/* حقل فخ للرسائل المزعجة: مخفي بالقص لا بالإزاحة (الإزاحة تُحدث تمريرًا أفقيًا في الصفحات العربية) */
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.form-note { font-size: 0.875rem; line-height: 1.7; color: var(--ink-2); }
/* دون JavaScript لا يعمل النموذج، فيُخفى وتظهر وسائل التواصل المباشر */
html:not(.js) .form { display: none; }
.noscript-note {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: var(--radius-m);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.form-status { font-weight: 700; color: var(--teal-ink); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }

/* ---------- التذييل ---------- */
.site-footer { padding-block: 56px 28px; background: var(--navy-deep); color: var(--on-navy); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.footer-brand img { width: 200px; }
.footer-brand p { max-width: 22em; margin-top: 16px; }
.site-footer ul { display: grid; align-content: start; gap: 8px; list-style: none; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--teal-light); text-decoration: underline; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}

/* ---------- الصفحات النصية (الخصوصية و404) ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 88px) clamp(32px, 4vw, 48px); background: var(--paper); border-bottom: 1px solid var(--line); }
.page-hero p { margin-top: 12px; color: var(--ink-2); }
.prose { max-width: 46rem; padding-block: clamp(40px, 6vw, 72px); }
.prose h2 { margin-top: 44px; font-size: 1.375rem; }
.prose h2:first-child { margin-top: 0; }
.prose p,
.prose ul { margin-top: 12px; color: var(--ink-2); }
.prose ul { padding-inline-start: 1.4em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--navy); }

.notfound { padding-block: clamp(72px, 12vw, 140px); }
.notfound .notfound-code { margin-top: 0; font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 700; line-height: 1; color: var(--teal); }
.notfound h1 { margin-top: 16px; font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); }
.notfound p { max-width: 34em; margin-top: 14px; color: var(--ink-2); }
.notfound .hero-actions { margin-top: 32px; }

/* ==========================================================================
   الاستجابة للشاشات
   ========================================================================== */
@media (max-width: 999px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 640px; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .flow { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .flow-step { min-height: 48px; padding-inline-start: 72px; }
  .flow-num { position: absolute; top: 0; inset-inline-start: 0; }
  .flow-step::before {
    top: 60px;
    bottom: -28px;
    inset-inline-start: 23px;
    inset-inline-end: auto;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(to bottom, var(--teal) 0 10px, transparent 10px 18px);
  }
  .flow-icon { margin-top: 6px; font-size: 28px; }
  .flow-step h3 { margin-top: 6px; }

  .modules { grid-template-columns: minmax(0, 1fr); }
  .tablist {
    flex-direction: row;
    gap: 8px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .tab { flex: none; width: auto; min-height: 52px; white-space: nowrap; }
  .panels { grid-template-columns: minmax(0, 1fr) 180px; min-height: 0; }

  .segments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
  .market { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .market-art { max-width: 460px; }

  .value-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .example { position: static; }

  .journey { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .journey li { min-height: 44px; padding-inline-start: 68px; padding-bottom: 28px; }
  .journey li:last-child { padding-bottom: 0; }
  .j-num { position: absolute; top: 0; inset-inline-start: 0; }
  .journey li::before { top: 52px; bottom: 6px; inset-inline-start: 21px; inset-inline-end: auto; width: 2px; height: auto; }
  .journey h3 { margin-top: 8px; }

  .v2030 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .context picture { grid-column: 1 / -1; }
  .context-item { margin-top: 0; }

  .about-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .traction,
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

  .faq-wrap { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .faq-wrap .section-head { position: static; }

  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 719px) {
  :root { --header-h: 76px; }
  body { font-size: 1rem; }
  .brand img { width: 180px; }
  .lead { font-size: 1.0625rem; }
  .section-head p { font-size: 1.0625rem; }

  .hero-photo { margin-inline-start: 0; }
  .hero-photo img { aspect-ratio: 16 / 10; }
  .record { width: auto; margin: -56px 12px 0; padding: 18px 18px 14px; }
  .squares { top: -24px; left: 40px; }
  .hero-actions .btn { flex: 1 1 100%; }

  .ledger { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .always-grid,
  .benefits,
  .segments { grid-template-columns: minmax(0, 1fr); }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .modules-art { grid-column: 1; grid-row: 2; max-width: 200px; margin-inline: auto; }

  .trust { grid-template-columns: minmax(0, 1fr); }
  .trust li:nth-child(n) { padding-inline: 0; border-inline-start: 0; }

  .context { grid-template-columns: minmax(0, 1fr); }
  .vm { grid-template-columns: minmax(0, 1fr); }
  .vm-item:first-child { padding-inline-end: 0; }
  .vm-item + .vm-item { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .vm-item p { font-size: 1.125rem; }
  .team { grid-template-columns: minmax(0, 1fr); }

  .plan { flex-direction: column; align-items: stretch; }

  /* جدول المقارنة كبطاقات مكدسة على الجوال */
  .compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .compare,
  .compare tbody,
  .compare tr,
  .compare th,
  .compare td { display: block; width: 100%; }
  .compare tbody tr { border-bottom: 1px solid var(--line); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th { width: 100%; padding: 18px 18px 6px; border-bottom: 0; font-size: 1.0625rem; }
  .compare td { padding: 8px 18px 14px; border-bottom: 0; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--ink-2);
    font-size: 0.875rem;
    font-weight: 700;
  }
  .compare td.col-us { margin-bottom: 0; padding-top: 12px; }
  .compare td.col-us::before { color: var(--teal-ink); }

  .field-row { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* الشاشات الضيقة جدًا: بطاقة السجل تمنح النص كامل العرض، والوقت تحت الوصف */
@media (max-width: 480px) {
  .record { padding: 16px 16px 12px; }
  .record-head { flex-direction: column; gap: 6px; }
  .record-head .tag { order: -1; }
  .record-steps li { grid-template-columns: 26px minmax(0, 1fr); gap: 2px 10px; }
  .record-steps .mark { grid-row: 1 / span 2; width: 26px; height: 26px; }
  .step-time { grid-column: 2; grid-row: 2; justify-self: start; margin-top: 0; font-size: 0.8125rem; }
}
@media (max-width: 360px) {
  h1 { font-size: 1.75rem; }
}

/* ---------- وضع التباين العالي (Windows) ---------- */
@media (forced-colors: active) {
  /* الشعاران على خلفيتهما الأصلية حتى يبقيا مقروءين في أي سمة */
  .brand { forced-color-adjust: none; background: #FFFFFF; border-radius: 6px; }
  .footer-brand img { forced-color-adjust: none; background: #0C233B; padding: 8px; border-radius: 8px; }
  /* التبويب المختار لا يُعرف بلون الخلفية في هذا الوضع */
  .tab[aria-selected="true"] { outline: 3px solid Highlight; outline-offset: -4px; }
  /* مؤشرات بصرية مرسومة بالخلفيات */
  .faq summary::after,
  .meter > span,
  .record-progress span::after,
  .hero-facts li::before,
  .team li::before { forced-color-adjust: none; }
}

/* ---------- تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- الطباعة ---------- */
@media print {
  @page { margin: 14mm; }
  body { font-size: 11pt; }
  .skip-link,
  .site-nav,
  .nav-toggle,
  .form,
  .hero-actions,
  .plan .btn,
  .squares,
  .rise,
  .tablist,
  .modules-art,
  .faq summary::after,
  .footer-brand img { display: none !important; }
  .site-header { position: static; border: 0; background: none; }
  .hero,
  .section { padding-block: 14pt; }
  .band-navy,
  .site-footer,
  .example { background: none !important; }
  .band-navy h2,
  .band-navy h3,
  .band-navy p,
  .band-navy a,
  .band-navy .section-head p,
  .band-navy .ledger-fig,
  .band-navy .ledger-cap,
  .band-navy .source,
  .site-footer,
  .site-footer a,
  .example,
  .example p,
  .example .num { color: #000 !important; }
  .example { border: 1px solid #999; position: static; }
  .compare thead th.col-us { background: none !important; color: #000 !important; }
  .panel[hidden] { display: block !important; }
  .panel { grid-row: auto; }
  .panel + .panel { margin-top: 12pt; }
  /* عناصر صغيرة تحمل معنى بلونها: تُطبع بألوانها */
  .mark,
  .flow-num,
  .j-num,
  .sq-icon,
  .tag,
  .meter,
  .meter > span,
  .record-progress span,
  .record-progress span::after,
  .hero-facts li::before,
  .team li::before {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .js-anim .record-steps li:not(.is-stamped) .mark { background: var(--teal); border-color: var(--teal); color: var(--white); }
  .js-anim .record-steps li:not(.is-stamped) .step-text,
  .js-anim .record-steps li:not(.is-stamped) .step-time { opacity: 1; }
  .js-anim .record-progress span:not(.is-on)::after { transform: none; }
  .record { box-shadow: none; }
  .ledger li,
  .segments li,
  .trust li,
  .benefits li,
  .journey li,
  .traction li,
  .team li,
  .faq details,
  .compare tr,
  .record,
  .always,
  .note { break-inside: avoid; }
  h2,
  h3 { break-after: avoid; }
}
