/* ════════════════════════════════════════════════════════════
   nexcode — أنماط الموقع
   كل قيمة هنا مأخوذة من دليل الهوية. لا تُضاف ألوان أو خطوط
   خارج المتغيّرات أدناه.
   ════════════════════════════════════════════════════════════ */

:root {
  /* الألوان — القسم ٣ من الدليل */
  --ink: #0B1220;
  --navy: #16233F;
  --blue: #2F6BFF;
  --blue-on-dark: #5B8CFF;
  --teal: #17D1C6;
  --teal-on-dark: #2FE3D0;
  --surface: #F7F8FA;
  --bg: #EEF0F4;
  --text-secondary: #6B7280;
  --text-secondary-dark: #8B94A5;

  --grad-dark: linear-gradient(150deg, #16233F 0%, #0B1220 100%);
  --grad-accent: linear-gradient(90deg, #2F6BFF, #17D1C6);

  /* الخطوط — القسم ٤ */
  --font-en: 'Space Grotesk', sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* الأسطح — القسم ٥ */
  --radius-card: 22px;
  --radius-btn: 10px;
  --shadow-card: 0 1px 3px rgba(11, 18, 32, .06), 0 12px 40px rgba(11, 18, 32, .08);

  --wrap: 1200px;
  --gutter: 24px;
  --header-h: 72px;
}

/* ── إعادة ضبط ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* الروابط الداخلية ما تختفي تحت الهيدر الثابت */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-ar);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

/* إخفاء بالقصّ لا بالإزاحة: ‏inset-inline-start سالبة تعني في RTL دفع
   العنصر آلاف البكسلات يمين الصفحة، فيتمدّد عرض المستند */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  width: auto;
  height: auto;
  clip-path: none;
  top: 8px;
  inset-inline-start: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-btn);
}

/* ── مساعدات ───────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 860px; }

/* النصوص المونو إنجليزية دائماً — نعزلها عن اتجاه الصفحة
   حتى لا تنقلب علامات الترقيم والأرقام */
.mono, .mono-label {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
}

/* ‏direction:ltr أعلاه يجعل المحاذاة الافتراضية لهذه العناصر الكتلية
   يساراً، فتنفصل عن النص العربي المحاذى يميناً. نعيدها للبداية.
   ‏.code-body مستثنى عمداً — داخل نافذة LTR والكود يبدأ من اليسار. */
.mono-label,
.card-index,
.step-num,
.promise-num,
.channel-label,
.channel-value { text-align: right; }

.mono-label {
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
}
.mono-label-blue { color: var(--blue); }
.mono-label-teal { color: var(--teal-on-dark); }
.mono-label-gray { color: var(--text-secondary-dark); }

.c-teal { color: var(--teal-on-dark); }
.c-blue-light { color: var(--blue-on-dark); }
.c-white { color: #fff; }
.c-mut { color: var(--text-secondary-dark); }
.c-blue { color: var(--blue-on-dark); }

/* الخط الفاصل المميز — القسم ٥ */
.accent-rule {
  height: 3px;
  background: var(--grad-accent);
}

/* العلامة المائية — القسم ٥: شفافية ٠٫٠٧–٠٫٠٨.
   خصائص فيزيائية لا منطقية: الصفحة RTL فالنص يبدأ من اليمين،
   والزاوية اليسرى العليا هي المساحة الفاضية الوحيدة في كل قسم داكن */
.watermark {
  position: absolute;
  top: -110px;
  left: -140px;
  width: 420px;
  height: 420px;
  opacity: 0.07;
  pointer-events: none;
}
.watermark-sm {
  width: 260px;
  height: 260px;
  top: -56px;
  left: -66px;
}

/* ── اللوك أب ──────────────────────────────────────────── */

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;   /* الفجوة ≈ ٠٫٢ من ارتفاع العلامة */
  /* الاسم لاتيني يُقرأ LTR، والدليل يفرض العلامة يسار الاسم —
     بدون هذا السطر يقلبها اتجاه الصفحة RTL فتصير على اليمين */
  direction: ltr;
}
.lockup-mark {
  width: 38px;
  height: 38px;
  flex: none;
}
.lockup-name {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.02em;
  color: #fff;
}
.lockup-x { color: var(--blue-on-dark); }

/* ── الأزرار — القسم ٥ ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease,
              border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* أساسي على داكن: خلفية فيروزية ونص حبر */
.btn-primary-teal {
  background: var(--teal-on-dark);
  color: var(--ink);
}
/* أساسي على فاتح: خلفية حبر ونص أبيض */
.btn-primary-dark {
  background: var(--ink);
  color: #fff;
}
/* ثانوي: حدود شفافة بدون تعبئة */
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
}

@media (hover: hover) {
  .btn-primary-teal:hover {
    background: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(23, 209, 198, .25);
  }
  .btn-primary-dark:hover {
    background: var(--navy);
    transform: translateY(-2px);
  }
  .btn-ghost:hover {
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .06);
  }
}
.btn:active { transform: translateY(0); }

/* ── الهيدر ────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-inline-end: auto;
  margin-inline-start: 44px;
}
.nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  transition: color .18s ease;
  padding-block: 6px;
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transition: transform .22s ease;
}
@media (hover: hover) {
  .nav a:hover { color: #fff; }
  .nav a:hover::after { transform: scaleX(1); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-btn);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── الهيرو ────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-dark);
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 64px;
  padding-block: 104px 112px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero-sub {
  max-width: 46ch;
  font-size: 17px;
  color: rgba(255, 255, 255, .74);
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary-dark);
}
.hero-meta .mono { font-size: 11px; letter-spacing: 0.2em; }
.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal-on-dark);
  flex: none;
}

/* نافذة الكود — محتواها كله لاتيني، فتُعرض LTR كنافذة طرفية حقيقية
   (النقاط يسار واسم الملف يمين) */
.code-card {
  direction: ltr;
  border-radius: 18px;
  /* معتمة بما يكفي لتحجب العلامة المائية خلفها ويبقى الكود مقروءاً */
  background: rgba(9, 15, 27, .72);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}
.code-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  flex: none;
}
.code-file {
  margin-inline-start: auto;
  font-size: 11px;
  color: var(--text-secondary-dark);
  letter-spacing: 0.06em;
}
.code-body {
  margin: 0;
  padding: 22px 20px 26px;
  font-size: 13px;
  line-height: 2.15;
  color: #fff;
  white-space: pre;
  overflow-x: auto;
}
.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-inline-start: 4px;
  vertical-align: -2px;
  background: var(--teal-on-dark);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }

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

.section { padding-block: 96px; }
.section-bg { background: var(--bg); }
.section-surface { background: var(--surface); }
.section-dark {
  position: relative;
  overflow: hidden;
  background: var(--grad-dark);
  color: #fff;
}

.section-head { margin-bottom: 54px; max-width: 640px; }
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.45;
}
.section-sub {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text-secondary);
}
.section-dark .section-sub { color: rgba(255, 255, 255, .7); }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ── البطاقات ──────────────────────────────────────────── */

.card {
  position: relative;
  padding: 32px 28px 28px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1px 3px rgba(11, 18, 32, .06), 0 22px 54px rgba(11, 18, 32, .12);
  }
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--bg);
  margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; }

/* ‏.card p أدناه أعلى أولوية من ‎.card-index، فنرفع أولويته بمُحدِّد مزدوج.
   الموضع فيزيائي: الأيقونة في بداية السطر (يمين) فالرقم يقابلها يساراً —
   والخصائص المنطقية هنا تُحسب بـ ltr الموروث من ‎.mono فتضعه فوق الأيقونة. */
.card .card-index {
  position: absolute;
  top: 30px;
  left: 28px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #C3C9D4;
  margin: 0;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}
.card p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
/* الرقائق العربية ترجع لخط عربي — لا نستخدم خطاً إنجليزياً للعربي */
.chips li:not([dir="ltr"]) {
  font-family: var(--font-ar);
  font-size: 12px;
  letter-spacing: 0;
}

/* ── المراحل ───────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 30px;
  border-top: 2px solid #E1E5EC;
}
/* الخط المتدرج فوق كل مرحلة — ظاهر افتراضياً، والسكربت هو من
   يخفيه (.will-fill) ليرسمه متحرّكاً عند الوصول إليه بالتمرير */
.step::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -2px;
  height: 2px;
  background: var(--grad-accent);
  transform-origin: right;
  transition: transform .5s ease;
}
.step.will-fill::before { transform: scaleX(0); }
.step.will-fill.is-in::before { transform: scaleX(1); }

.step-num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--blue);
  margin-bottom: 12px;
}
.step h3 { font-size: 18px; margin-bottom: 10px; }
.step p { font-size: 15px; color: var(--text-secondary); }

/* ── لوحة الالتزامات ───────────────────────────────────── */

.promise-panel {
  position: relative;
  overflow: hidden;
  padding: 56px 48px;
  border-radius: var(--radius-card);
  background: var(--grad-dark);
  color: #fff;
  box-shadow: var(--shadow-card);
}
.promise-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
/* مُحدِّد مزدوج ليغلب ‎.promise p (حجم ١٥px) */
.promise .promise-num {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.promise h3 { font-size: 18px; margin-bottom: 10px; }
/* ‏:not يستثني الرقم — وإلا غلب لونُ الوصف كلاسات ‎.c-teal / ‎.c-blue-light */
.promise p:not(.promise-num) {
  font-size: 15px;
  color: rgba(255, 255, 255, .68);
}

/* ── التقنيات ──────────────────────────────────────────── */

.stack { margin-top: 56px; }
.stack .mono-label { color: var(--text-secondary); }
.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stack-chips li {
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid #DDE2EA;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

/* ── الأسئلة الشائعة ───────────────────────────────────── */

.faq {
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq details + details { border-top: 1px solid #E7EAF0; }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
  transition: color .18s ease;
}
.faq summary::-webkit-details-marker { display: none; }

/* علامة + / − مرسومة بالـ CSS — بدون أيقونات خارجية */
.faq summary::after {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--blue), var(--blue)) center/13px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center/2px 13px no-repeat;
  transition: transform .25s ease;
}
.faq details[open] summary::after {
  transform: rotate(90deg);
  background:
    linear-gradient(var(--blue), var(--blue)) center/13px 2px no-repeat;
}
@media (hover: hover) {
  .faq summary:hover { color: var(--blue); }
}

.faq-body {
  padding: 0 28px 24px;
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* ── التواصل ───────────────────────────────────────────── */

.contact-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  margin-bottom: 16px;
}
.contact-sub {
  font-size: 16px;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 36px;
  max-width: 42ch;
}

/* محدودة العرض: المحتوى يلتصق بالبداية (يمين) فبطاقة بعرض العمود
   كامل تترك فراغاً ميتاً يقرأ كخطأ تخطيط لا كبياض مقصود */
.channels { display: grid; gap: 12px; max-width: 400px; }
.channels a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.channels svg { width: 22px; height: 22px; flex: none; }
.channel-text { display: grid; gap: 2px; }
.channel-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-secondary-dark);
}
.channel-value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
  direction: ltr;
  unicode-bidi: isolate;
}
@media (hover: hover) {
  .channels a:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(47, 227, 208, .45);
    transform: translateY(-2px);
  }
}

/* النموذج */
.contact-form {
  padding: 34px 32px;
  border-radius: var(--radius-card);
  /* نفس زجاج بطاقات القنوات المجاورة */
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 8px; }
.field label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .82);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(11, 18, 32, .45);
  color: #fff;
  font-family: var(--font-ar);
  font-size: 15px;
  line-height: 1.6;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: #6E7A8F; }
.field select { appearance: none; cursor: pointer; }
/* قائمة الاختيار المنسدلة تُرسم بألوان النظام — نثبّت التباين */
.field select option { background: var(--ink); color: #fff; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal-on-dark);
  box-shadow: 0 0 0 3px rgba(47, 227, 208, .16);
}
.field .invalid { border-color: #E4606D; }

.form-note {
  font-size: 13px;
  color: var(--text-secondary-dark);
  text-align: center;
}
.form-note.is-error { color: #FF9AA2; }
.form-note.is-ok { color: var(--teal-on-dark); }

/* ── الفوتر ────────────────────────────────────────────── */

.site-footer {
  background: var(--ink);
  color: #fff;
  padding-block: 62px 34px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tagline {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-secondary-dark);
}
.footer-nav {
  display: flex;
  gap: 72px;
}
.footer-nav div { display: grid; gap: 10px; align-content: start; }
.footer-nav .mono-label { margin-bottom: 4px; }
.footer-nav a {
  font-size: 15px;
  color: rgba(255, 255, 255, .74);
  transition: color .18s ease;
}
@media (hover: hover) {
  .footer-nav a:hover { color: var(--teal-on-dark); }
}

.footer-rule {
  height: 1px;
  background: rgba(255, 255, 255, .1);
  margin-bottom: 22px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary-dark);
  letter-spacing: 0.08em;
}

/* ════════════════════════════════════════════════════════
   التجاوب
   ════════════════════════════════════════════════════════ */

@media (max-width: 1040px) {
  .hero-inner { gap: 44px; padding-block: 84px 92px; }
  .nav { gap: 22px; margin-inline-start: 28px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 22px; }
  .promise-panel { padding: 46px 36px; }
  .promise-grid { gap: 32px; }
  .footer-nav { gap: 48px; }
}

@media (max-width: 900px) {
  /* التنقل ينطوي في لوحة تحت الهيدر */
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset-block-start: var(--header-h);
    inset-inline: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    /* معتمة بلا backdrop-filter: الهيدر الأب عنده واحد، وتداخلهما
       يجعل اللوحة تبدو شفافة ويظهر محتوى الصفحة خلف الروابط */
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav a {
    padding-block: 15px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  .nav a::after { display: none; }

  .hero-inner { grid-template-columns: 1fr; padding-block: 68px 76px; }
  .code-card { order: 2; }
  .contact-inner { grid-template-columns: 1fr; gap: 44px; }
  .promise-grid { grid-template-columns: 1fr; gap: 34px; }
  .section { padding-block: 72px; }
  .section-head { margin-bottom: 40px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }

  .grid-3, .steps { grid-template-columns: 1fr; }
  .steps { gap: 28px; }

  .header-actions .btn-sm { display: none; }

  .hero-inner { padding-block: 56px 64px; }
  .hero h1 { font-size: 31px; line-height: 1.4; }
  .hero-sub { font-size: 16px; }
  .hero-cta .btn { flex: 1 1 100%; }

  .code-body { font-size: 11.5px; padding: 18px 16px 22px; }

  .section { padding-block: 60px; }
  .card { padding: 26px 22px 24px; }
  .promise-panel { padding: 36px 24px; }
  .promise-num { font-size: 40px; }
  .contact-form { padding: 26px 20px; }

  .faq summary { padding: 18px 20px; font-size: 16px; }
  .faq-body { padding: 0 20px 20px; }

  .footer-top { flex-direction: column; gap: 34px; }
  .footer-nav { gap: 40px; }
  .watermark { width: 300px; height: 300px; inset-inline-start: -70px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
