/* نَظيم · ndhim — الخطوط مستضافة ذاتيًا (OFL، الرخص في /fonts/) */
@font-face { font-family: "Readex Pro"; src: url("/fonts/ReadexPro-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("/fonts/ReadexPro-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Readex Pro"; src: url("/fonts/ReadexPro-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("/fonts/JosefinSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("/fonts/JosefinSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --nd-navy-900: #14213D;
  --nd-navy-800: #1C2D52;
  --nd-navy-500: #3D5C9A;
  --nd-navy-200: #C5CFE4;
  --nd-navy-100: #E3E8F3;
  --nd-gold-700: #8F6724;
  --nd-gold-500: #B8893A;
  --nd-sand-100: #F5F0E6;
  --nd-sand-200: #E3DDD0;
  --nd-sand-300: #CFC8B8;
  --nd-field-border: #8A8375; /* O1 (قرار المالك 3 ديسمبر 2026): حد الحقول ≥ 3:1 على الأبيض والعاجي */
  --nd-sand-600: #6B6457;
  --nd-sand-700: #4E4940;
  --nd-error: #B4453A;
  --nd-radius: 4px;
  --nd-font-ar: "Readex Pro", "Vazirmatn", Tahoma, sans-serif;
  --nd-font-display: "Vazirmatn", "Readex Pro", sans-serif;
  --nd-font-latin-head: "Josefin Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--nd-navy-900);
  font-family: var(--nd-font-ar);
}
a { color: var(--nd-navy-900); }
a:hover { color: var(--nd-navy-500); }

/* تركيز لوحة المفاتيح: حد كحلي وهالة #E3E8F3 بسمك 3px */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--nd-navy-900);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--nd-navy-100);
}
.nd-header a:focus-visible, .nd-footer a:focus-visible { outline-color: var(--nd-navy-100); }

.nd-page { display: flex; flex-direction: column; min-height: 100vh; }

/* الشريط العلوي */
.nd-header { background: var(--nd-navy-900); border-bottom: 1px solid var(--nd-navy-900); }
.nd-header-inner {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nd-logo-link { display: block; border-radius: var(--nd-radius); }
.nd-logo { display: block; height: 44px; width: auto; }

/* مبدّل اللغة: حبّة في آخر الشريط العلوي؛ اللغة الحالية نص عادي والأخرى رابط */
.nd-lang {
  display: inline-flex; align-items: center; flex: none;
  padding: 0 4px;
  border: 1px solid var(--nd-navy-500); border-radius: 999px;
  font: 500 14px/1 var(--nd-font-ar); color: var(--nd-navy-200);
}
.nd-lang a, .nd-lang-current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px;
}
.nd-lang a { color: var(--nd-sand-100); text-decoration: underline; text-underline-offset: 3px; }
.nd-lang a:hover { color: #FFFFFF; }
.nd-lang-current { color: var(--nd-navy-200); }
.nd-lang-sep { color: var(--nd-navy-500); }

/* المحتوى */
.nd-main {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 32px 72px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 64px; flex: 1 0 auto;
}
.nd-hero { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.nd-hero--register { flex-basis: 420px; gap: 20px; }

.nd-h1 {
  margin: 0; font-family: var(--nd-font-display); font-weight: 700;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.35; color: var(--nd-navy-900);
}
.nd-h1--register { font-size: clamp(30px, 4vw, 44px); line-height: 1.45; }
.nd-accent { color: var(--nd-gold-500); }

.nd-lead { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.9; color: var(--nd-sand-700); }
.nd-lead--register { max-width: 520px; }

.nd-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 40px; border: 0; border-radius: var(--nd-radius);
  background: var(--nd-navy-900); color: var(--nd-sand-100);
  font: 600 16px var(--nd-font-ar); text-decoration: none; cursor: pointer;
}
.nd-btn:hover { background: var(--nd-navy-800); color: var(--nd-sand-100); }
.nd-btn:disabled { cursor: progress; background: var(--nd-navy-800); }
.nd-btn--cta { align-self: flex-start; margin-top: 8px; }

.nd-btn-secondary {
  align-self: flex-start; display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 20px; margin-top: 8px;
  border: 1px solid var(--nd-field-border); border-radius: var(--nd-radius);
  background: #FFFFFF; color: var(--nd-navy-900);
  font-size: 15px; font-weight: 500; text-decoration: none;
}

/* البطاقة العاجية */
.nd-card {
  flex: 1 1 360px; min-width: 0; max-width: 460px; padding: 56px 40px;
  background: var(--nd-sand-100); border: 1px solid var(--nd-sand-200); border-radius: var(--nd-radius);
  display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center;
}
.nd-card--form { flex-basis: 380px; padding: 32px; display: block; text-align: start; }
.nd-card-icon { display: block; width: 200px; max-width: 100%; height: auto; }
.nd-card-quote {
  margin: 0; font-family: var(--nd-font-display); font-weight: 500;
  font-size: 20px; line-height: 1.9; color: var(--nd-navy-900);
}

/* النموذج */
.nd-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.nd-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nd-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nd-label { font-size: 13px; font-weight: 500; color: var(--nd-navy-900); }
.nd-field {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--nd-field-border); border-radius: var(--nd-radius);
  background: #FFFFFF; color: var(--nd-navy-900);
  font: 400 15px var(--nd-font-ar); outline: none;
}
.nd-field:focus { border-color: var(--nd-navy-900); box-shadow: 0 0 0 3px var(--nd-navy-100); }
.nd-field[aria-invalid="true"] { border-color: var(--nd-error); }
.nd-field[aria-invalid="true"]:focus { border-color: var(--nd-navy-900); }
.nd-error { margin: 0; font-size: 13px; line-height: 1.7; color: var(--nd-error); }
.nd-form-status { margin: 0; font-size: 14px; line-height: 1.8; color: var(--nd-navy-900); }
.nd-form-status:empty { margin: -16px 0 0; } /* فارغ: يُلغى فراغ الصف (gap) ويبقى العنصر حيًّا لقارئ الشاشة */
.nd-submit { margin-top: 4px; padding: 0 24px; }
.nd-turnstile { min-height: 0; margin-top: -16px; } /* الوضع المخفي: لا يُحجز مكان للأداة ولا فراغ صفّها */

/* v1.2 — خانة الموافقة: غير مؤشَّرة، إلزامية؛ مربع 22px بزاوية 4px وحد كحلي، وعند التأشير كحلي بعلامة ذهبية.
   الصفّ كله (الخانة ونصها) يستقبل النقر عبر <label>، فمساحة اللمس أكبر من المربع. */
.nd-check { display: flex; align-items: flex-start; gap: 10px; }
.nd-checkbox {
  appearance: none; -webkit-appearance: none; flex: none; position: relative;
  width: 22px; height: 22px; margin: 3px 0 0; cursor: pointer;
  border: 1.5px solid var(--nd-navy-900); border-radius: var(--nd-radius); background: #FFFFFF;
}
.nd-checkbox:checked { background: var(--nd-navy-900); }
.nd-checkbox:checked::after {
  content: ""; position: absolute; inset-inline-start: 6.5px; top: 2px; width: 6px; height: 11px;
  border: solid var(--nd-gold-500); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.nd-checkbox:focus-visible {
  outline: 2px solid var(--nd-navy-900); outline-offset: 3px; box-shadow: 0 0 0 3px var(--nd-navy-100);
}
.nd-checkbox[aria-invalid="true"] { border-color: var(--nd-error); }
.nd-check-label { font-size: 13px; line-height: 1.8; color: var(--nd-navy-900); cursor: pointer; }
.nd-check-label a { color: var(--nd-navy-900); }

/* حقل الفخ: خارج الشاشة ومخفي عن قارئات الشاشة */
.nd-hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* رسالة الشكر */
.nd-done { display: flex; flex-direction: column; gap: 16px; padding: 32px 0; }
.nd-done-title {
  margin: 0; font-family: var(--nd-font-display); font-weight: 700;
  font-size: 26px; line-height: 1.5; color: var(--nd-navy-900);
}
.nd-done-title:focus { outline: none; }
.nd-done-text { margin: 0; font-size: 15px; line-height: 1.8; color: var(--nd-sand-700); }

/* الخصوصية و404 */
.nd-prose { flex: 1 1 100%; max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.nd-notice { display: flex; flex-direction: column; gap: 8px; }
.nd-notice h2 {
  margin: 12px 0 0; font-family: var(--nd-font-display); font-weight: 700;
  font-size: 20px; line-height: 1.6; color: var(--nd-navy-900);
}
html[lang="en"] .nd-notice h2 { font-family: var(--nd-font-latin-head); line-height: 1.4; }
.nd-notice p { margin: 0; font-size: 16px; line-height: 1.9; color: var(--nd-sand-700); }
html[lang="en"] .nd-notice p { line-height: 1.75; }
.nd-notice a { color: var(--nd-navy-900); }
.nd-notice p.nd-notice-meta { margin-top: 16px; font-size: 14px; color: var(--nd-sand-600); }
.nd-404 { flex: 1 1 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.nd-404-code {
  margin: 0; font-family: var(--nd-font-latin-head); font-weight: 700;
  font-size: clamp(72px, 14vw, 140px); line-height: 1; color: var(--nd-gold-500);
}
.nd-h1--404 { font-size: clamp(28px, 4vw, 40px); }

/* الشريط السفلي */
.nd-footer { background: var(--nd-navy-900); border-top: 1px solid var(--nd-navy-900); }
.nd-footer-inner {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 13px; line-height: 1.8; color: var(--nd-navy-200);
}
.nd-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.nd-footer-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--nd-sand-100); border-radius: var(--nd-radius);
}
.nd-footer-links a:hover { color: #FFFFFF; }
.nd-email {
  text-decoration: none; font-family: var(--nd-font-latin-head); font-weight: 600; font-size: 15px;
}

/* النسخة الإنجليزية: العناوين بـJosefin Sans 700 والنص بـReadex Pro (فيه اللاتيني) */
html[lang="en"] .nd-h1,
html[lang="en"] .nd-done-title { font-family: var(--nd-font-latin-head); font-weight: 700; }
html[lang="en"] .nd-h1 { line-height: 1.2; }
html[lang="en"] .nd-card-quote { font-family: var(--nd-font-ar); font-weight: 500; }
html[lang="en"] .nd-lead { line-height: 1.75; }

/* شاشات صغيرة حتى 320px */
@media (max-width: 600px) {
  .nd-header-inner { padding: 16px 20px; }
  .nd-main { padding: 32px 20px 56px; gap: 40px; }
  .nd-card { padding: 40px 24px; gap: 32px; }
  .nd-card--form { padding: 24px 20px; }
  .nd-footer-inner { padding: 20px; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
  .nd-footer-links { justify-content: center; }
}
@media (max-width: 420px) {
  .nd-header-inner { gap: 12px; }
  .nd-lang { font-size: 13px; }
  .nd-lang a, .nd-lang-current { padding: 0 8px; }
  .nd-row { grid-template-columns: minmax(0, 1fr); }
  .nd-card-icon { width: 160px; }
}
/* الشعار الإنجليزي أعرض من العربي (217px مقابل 130px)؛ يصغر في الشاشات الصغيرة ليتسع الشريط لمبدّل اللغة */
@media (max-width: 420px) {
  html[lang="en"] .nd-logo { height: 36px; }
}
@media (max-width: 380px) {
  html[lang="en"] .nd-logo { height: 30px; }
}
