/* ── Tokens ─────────────────────────────────────────── */
:root {
  --brand-primary: #D4A537;
  --brand-primary-hover: #E2B54C;
  --brand-on-primary: #120E05;
  --brand-text: #D9AE45;
  --saudi: #006C35;
  --saudi-text: #3DBB78;
  --saudi-border: transparent;
  /* البنفسجي الأصلي كما هو (مطابقة 100%) */
  --tuwaiq: #4931AF;
  --tuwaiq-text: #A898FF;
  --tuwaiq-mark: #6F5BE0;

  --bg: #08060A;
  --bg-warm: #1B1203;
  --surface: rgba(212, 165, 55, 0.08);
  --border: transparent;
  --border-gold: transparent;
  --divider: transparent;
  --text: #F4F1EA;
  --text-2: #C9C2B2;
  --focus: #D9AE45;
  --header-bg: rgba(8, 6, 10, 0.82);
  --card-bg: rgba(22, 17, 8, 0.72);

  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 22px;
  --control-h: 48px;
  --page-pad: clamp(16px, 4vw, 40px);
  --section-gap: clamp(72px, 10vw, 128px);
  --max: min(1440px, 90vw);

  --dur-fast: 150ms; --dur: 240ms; --ease: cubic-bezier(.2,.7,.2,1);
  --sec-top: clamp(28px, 6vh, 56px); --sec-gap: 12px;
}
html[lang="en"] { --font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif; }

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-snap-type: none; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7;
  color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(120% 60% at 50% 100%, var(--bg-warm) 0%, transparent 70%),
    radial-gradient(80% 40% at 80% 0%, rgba(212,165,55,.06) 0%, transparent 60%);
  background-attachment: fixed;
  overflow-x: clip;
}
:where([lang="ar"], :dir(rtl)) { letter-spacing: 0; text-transform: none; }
h1, h2, h3 { line-height: 1.45; margin: 0; font-weight: 700; text-wrap: balance; }
h4 { margin: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -60px; z-index: 100; background: var(--brand-primary); color: var(--brand-on-primary); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.skip:focus { inset-block-start: 12px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--page-pad); width: 100%; box-sizing: border-box; }
section { scroll-margin-top: 84px; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--control-h); padding-inline: 24px; border-radius: var(--radius-md);
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-primary { background: var(--brand-primary); color: var(--brand-on-primary); box-shadow: 0 8px 28px -10px rgba(212,165,55,.65); }
.btn-primary:hover { background: var(--brand-primary-hover); }
.btn-primary:active { transform: translateY(1px) scale(.99); }
.btn-lg { min-height: 56px; padding-inline: 32px; font-size: 1.0625rem; }
.header-cta, .final .btn-primary { box-shadow: none; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--divider);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.logos { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; color: inherit; text-decoration: none; border-radius: 8px; }
.logo-irth { height: 38px; width: auto; }
.logo-word { font-family: "Aref Ruqaa", serif; font-weight: 700; font-size: 1.75rem; line-height: 1; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-cta { min-height: 44px; padding-inline: 18px; }

/* 3D scene — ثابتة خلف المحتوى */
main { position: relative; z-index: 1; }
.site-footer { position: relative; z-index: 1; }
#scene3d { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 600ms var(--ease); }
.has-3d #scene3d { opacity: 1; }

/* ── Section headings ───────────────────────────────── */
.section { padding-block-start: var(--section-gap); }
.sec-head { display: flex; justify-content: center; margin-block-end: var(--sec-gap); }
.sec-head h2 { color: var(--text); font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.375rem); font-weight: 700; line-height: 1.45; text-align: center; }
.sec-intro { text-align: center; color: var(--text-2); max-width: 62ch; margin: 0 auto clamp(28px, 4vw, 40px); }
#journey .sec-intro { color: var(--text-2); margin-block-end: 0; }
#schedule .sec-head h2, .final h2 { color: var(--brand-text); }
#journey .sec-head h2 { color: var(--tuwaiq-text); }
#eligibility .sec-head h2, .nat-line { color: var(--saudi-text); }

/* ── Countdown (عائم) ───────────────────────────────── */
.countdown {
  position: fixed; z-index: 44; inset-block-end: 20px; inset-inline-end: 20px; display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border: 0; border-radius: 14px; text-align: start;
  background: rgba(14, 11, 6, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: opacity var(--dur) var(--ease), visibility 0s linear 0s;
}
.countdown .cd-title { font-size: .8125rem; font-weight: 600; color: var(--text-2); max-width: 7.5em; line-height: 1.35; }
.countdown .cd-grid { margin: 0; display: flex; gap: 10px; direction: rtl; }
html[dir="ltr"] .countdown .cd-grid { direction: ltr; }
.cd-unit { display: grid; gap: 0; justify-items: center; min-width: 2.4em; }
.cd-val { font-family: "IBM Plex Sans", var(--font); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.375rem; line-height: 1.2; color: var(--brand-text); }
.cd-label { color: var(--text-2); font-size: .6875rem; font-weight: 500; }
.countdown .ended { display: none; margin: 0; font-size: .875rem; font-weight: 700; color: var(--brand-text); }
.countdown.is-ended .cd-grid, .countdown.is-ended .cd-title { display: none; }
.countdown.is-ended .ended { display: block; }
.is-loading .countdown { visibility: hidden; }
.at-final .countdown { opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur); }

/* ── كل قسم صفحة كاملة ─────────────────────────────── */
main > section { min-height: calc(100svh - 68px); scroll-margin-top: 68px; display: flex; flex-direction: column; justify-content: center; }
main > section.section { padding-block: clamp(56px, 8vh, 96px); }
main > section#schedule, main > section#journey, main > section#eligibility { justify-content: flex-start; padding-block-start: var(--sec-top); }
main > section#journey { padding-block: clamp(28px, 5vh, 56px) clamp(24px, 4vh, 40px); }
main > section#schedule { padding-block-start: clamp(40px, 7vh, 80px); }

/* ── Hero ───────────────────────────────────────────── */
.hero { position: relative; padding-block: 0; }
.hero .wrap.hero-inner {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; text-align: start;
  min-height: calc(100svh - 68px); padding-block: 24px clamp(40px, 9vh, 96px); gap: 0;
}
.hero .visual.hero-stage { position: absolute; inset-block-start: 3%; inset-inline: 34% 0; height: 50%; width: auto; max-width: none; aspect-ratio: auto; }
.hero-copy { max-width: min(1000px, 100%); text-align: start; position: relative; isolation: isolate; }
.hero h1 { font-size: clamp(2.25rem, 1rem + 3.9vw, 4.5rem); line-height: 1.15; letter-spacing: 0; text-shadow: 0 1px 3px rgba(8, 6, 10, .6); }
.hero h1 .h1-sub { display: block; font-weight: 600; color: var(--brand-text); }
.hero-partner { margin: 20px 0 28px; padding-inline-start: 14px; border-inline-start: 3px solid var(--brand-primary); display: grid; gap: 4px; max-width: 44ch; }
.hero-partner .pt-lead { font-size: .8125rem; font-weight: 500; color: var(--text-2); }
.hero-partner .pt-names { font-size: clamp(.9375rem, .9rem + .3vw, 1.125rem); font-weight: 600; line-height: 1.7; color: var(--text); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.hero .btn-primary:focus-visible { outline-color: var(--text); box-shadow: 0 0 0 6px var(--bg); }
.scroll-hint { position: absolute; inset-block-start: 22px; inset-inline-end: var(--page-pad); margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: 0; color: var(--text-2); }

/* ── رحلة إرث ───────────────────────────────────────── */
.journey { list-style: none; counter-reset: stage; }
.journey-slot { flex: 1 1 auto; min-height: clamp(120px, calc(100svh - 68px - 540px), 240px); }
.journey.route { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-block-start: clamp(20px, 3vh, 36px); }
.route::before {
  content: ""; position: absolute; inset-block-start: 136px; inset-inline: 12.5%; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tuwaiq-text) 45%, transparent) 15%, color-mix(in srgb, var(--tuwaiq-text) 45%, transparent) 85%, transparent);
}
.step { position: relative; display: grid; align-content: start; justify-items: center; text-align: center; gap: 8px; padding-inline: 8px; }
.step-art { width: 100%; max-width: 200px; height: 112px; display: grid; place-items: center; border-radius: 18px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tuwaiq-text) 16%, transparent), transparent); }
.step-art .ill { width: 120px; height: 80px; color: color-mix(in srgb, var(--text) 62%, transparent); overflow: visible; }
.step-art .ill path, .step-art .ill rect, .step-art .ill circle { fill: none; stroke: color-mix(in srgb, var(--text) 82%, transparent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.step-art .ill .a { color: var(--tuwaiq-text); stroke: var(--tuwaiq-text); }
.step-art .ill .g { stroke: var(--brand-text); }
.route .step-no { position: relative; z-index: 1; width: 12px; height: 12px; border: 0; border-radius: 50%; font-size: 0; color: transparent;
  background: var(--tuwaiq-text); box-shadow: 0 0 0 6px var(--bg), 0 0 18px color-mix(in srgb, var(--tuwaiq-text) 60%, transparent); margin-block: 10px 8px; display: grid; place-items: center; }
.route .step:last-child .step-no { background: var(--brand-primary); box-shadow: 0 0 0 6px var(--bg), 0 0 18px rgba(212, 165, 55, .6); }
.route .step::before { counter-increment: stage; content: "المرحلة " counter(stage); order: 0; font-size: .75rem; font-weight: 700; letter-spacing: 0;
  color: var(--tuwaiq-text); background: color-mix(in srgb, var(--tuwaiq-text) 14%, transparent); padding: 3px 10px; border-radius: 999px; }
:root[lang="en"] .route .step::before { content: "Stage " counter(stage); }
.route .step:last-child::before { color: var(--brand-text); background: rgba(212, 165, 55, .14); }
.route .step > * { order: 1; }
.route .step .step-art { order: -1; } .route .step .step-no { order: -1; }
.route .step h3 { font-size: clamp(1.0625rem, .95rem + .5vw, 1.25rem); font-weight: 700; color: var(--text); line-height: 1.45; }
.route .step p { max-width: 28ch; font-size: .9375rem; line-height: 1.75; color: color-mix(in srgb, var(--text) 66%, transparent); }
@media (hover: hover) and (pointer: fine) and (min-width: 721px) { #journey { cursor: grab; user-select: none; } #journey.dragging { cursor: grabbing; } }

/* ── ما داخل إرث ────────────────────────────────────── */
.sched { max-width: 760px; margin: 0 auto; display: grid; gap: clamp(14px, 2vw, 22px); }
.sched-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sched-facts li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: rgba(20, 16, 9, .94);
  box-shadow: inset 0 0 0 1px rgba(212,165,55,.18); font-weight: 700; font-size: 1rem; color: var(--text); white-space: nowrap; }
.sched-facts svg { width: 20px; height: 20px; flex: none; color: var(--brand-text); }
.sched-date { margin: 0; display: grid; gap: 2px; text-align: center; }
.sd-label { color: var(--text-2); font-size: .875rem; font-weight: 600; }
.sd-val { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); font-weight: 800; line-height: 1.3; color: var(--brand-text); }
.sched-periods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sp { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 18px 12px; border-radius: 16px;
  background: rgba(20, 16, 9, .94); box-shadow: inset 0 0 0 1px rgba(212,165,55,.18); }
.sp svg { width: 28px; height: 28px; flex: none; color: var(--brand-text); margin-block-end: 2px; }
.sp-name { color: var(--text-2); font-size: .9375rem; font-weight: 600; }
.sp-time { font-size: clamp(1.0625rem, .95rem + .5vw, 1.375rem); font-weight: 700; color: var(--text); white-space: nowrap; }
.periods-block { margin-block-start: 18px; display: flex; justify-content: center; }
.register-cta { margin: 0; display: block; width: min(100%, 360px); }
.register-cta .btn { width: 100%; min-height: 54px; height: auto; font-size: 1.0625rem; }

/* ── كيف نبني الثقة: ملف تخرج منه وثيقة ───────────── */
.list { list-style: none; display: grid; gap: 12px; }
.list li { display: flex; gap: 12px; align-items: flex-start; }
.check { width: 24px; height: 24px; flex: none; border-radius: 6px; background: var(--brand-primary); color: var(--brand-on-primary); display: grid; place-items: center; margin-block-start: 3px; }
.check svg { width: 16px; height: 16px; }
.note { margin-block-start: 16px; color: var(--text-2); font-size: .875rem; }
.dossier { position: relative; max-width: 860px; width: 100%; margin: calc(28px - var(--sec-gap)) auto 0; padding-block-end: 20px; clip-path: inset(-100vh -40px 0 -40px);
  --fade: linear-gradient(to bottom, #000 calc(100% - 175px), rgba(0,0,0,.86) calc(100% - 140px), rgba(0,0,0,.62) calc(100% - 105px),
          rgba(0,0,0,.36) calc(100% - 70px), rgba(0,0,0,.14) calc(100% - 35px), transparent 100%);
  -webkit-mask-image: var(--fade); mask-image: var(--fade); }
.folder-back { position: absolute; inset-inline: 0; inset-block-end: 0; height: 250px; z-index: 0; border-radius: 6px 18px 0 0;
  background: linear-gradient(#5a4419, #3d2e10); }
.folder-tab { position: absolute; inset-block-start: -26px; inset-inline-start: 0; width: 34%; height: 30px; border-radius: 12px 12px 0 0; background: #5a4419; }
.folder-front { position: absolute; inset-inline: 0; inset-block-end: 0; height: 142px; z-index: 2; pointer-events: none; border-radius: 4px 4px 0 0;
  background: linear-gradient(#b48a32, #8a6620 45%, #5e4515); box-shadow: 0 -10px 26px rgba(0,0,0,.4); }
.doc { position: relative; z-index: 1; margin: 0 clamp(14px, 4%, 36px); padding: clamp(20px, 3vw, 30px) clamp(22px, 4vw, 40px) 130px; border-radius: 6px;
  background: #f3efe4; color: #1c1a16; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transform: translateY(calc(100% - 130px)); transition: transform 1100ms cubic-bezier(.2,.8,.2,1) 250ms; }
.dossier.is-open .doc { transform: translateY(0); }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-block-end: 2px solid #1c1a16; padding-block-end: 10px; margin-block-end: 14px; }
.doc-logos { display: flex; align-items: center; gap: 12px; color: #1c1a16; flex-shrink: 0; }
.doc-logos .logo-irth { height: 34px; }
.doc h3 { font-size: 1.375rem; color: #1c1a16; }
.doc-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.doc-sub { font-size: .8125rem; font-weight: 700; color: #6b5a2a; margin-block-end: 10px; padding-block-end: 6px; border-block-end: 1px dashed #c9bfa6; }
.doc-list { gap: 8px; }
.doc-list li { color: #1c1a16; font-weight: 600; font-size: 1rem; line-height: 1.5; }
.doc .check { background: #0f6b3c !important; color: #fff; }
.doc .note { color: #4a4436; margin-block-start: 12px; font-size: .9375rem; }
.doc-ranks { margin-block-start: 14px; padding-block-start: 12px; border-block-start: 1px dashed #b5ab92; }
.doc-ranks h4 { font-size: 1rem; color: #1c1a16; margin-block: 0 6px; }
.ranks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 20px); }
.rank { margin: 0; display: flex; flex-direction: column; align-items: center; }
.rank .soldier-art { width: 100%; max-width: 112px; height: auto; display: block; }
.doc .soldier-art .line { fill: none; stroke: #2a261e; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.doc .soldier-art .patch { fill: #b89a4a; }
.rank figcaption { margin-block-start: 6px; font-weight: 700; font-size: clamp(.9375rem, .85rem + .4vw, 1.125rem); color: #0f6b3c; }
@media (min-width: 900px) {
  .dossier.is-side { max-width: 1200px; }
  .is-side .doc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 28px; align-items: start; }
  .is-side .doc-head { grid-column: 1 / -1; }
  .is-side .doc-groups { grid-column: 1; grid-row: 2; gap: 14px 28px; }
  .is-side .doc .note { grid-column: 1; grid-row: 3; }
  .is-side .doc-ranks { grid-column: 2; grid-row: 2 / span 2; margin: 0; padding: 0; padding-inline-start: 22px; border-block-start: 0; border-inline-start: 1px dashed #b5ab92; align-self: stretch; }
  .is-side .rank .soldier-art { max-width: 60px; }
  .is-side .rank figcaption { font-size: .9375rem; }
}
@media (min-width: 1024px) and (max-height: 780px) {
  .doc-head { margin-block-end: 10px; padding-block-end: 8px; }
  .doc { padding-top: 18px; }
  .doc h3 { font-size: 1.1875rem; }
}
@media (min-width: 721px) and (max-width: 1023px) {
  .dossier { max-width: none; margin-inline: -8px; }
  .doc { margin-inline: 8px; padding: 22px 24px 130px; }
  .doc-groups { gap: 12px 24px; }
  .doc-list li { font-size: .9375rem; line-height: 1.45; }
  .doc-list { gap: 6px; }
  .rank .soldier-art { max-width: 78px; }
}

/* ── المزايا: أربعة مربّعات ─────────────────────────── */
#benefits { display: flex; flex-direction: column; justify-content: center; padding-block-start: var(--sec-top); }
.bgrid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.bx { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: 18px;
  padding: 0 clamp(14px, 1.4vw, 20px) clamp(16px, 2vw, 24px);
  background: linear-gradient(180deg, rgba(255,244,214,.04), rgba(255,244,214,.012)); box-shadow: inset 0 0 0 1px rgba(212,165,55,.16);
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s var(--ease) calc(var(--i) * 90ms), transform .6s var(--ease) calc(var(--i) * 90ms), box-shadow .3s var(--ease); }
.bgrid4.in .bx { opacity: 1; transform: none; }
.bx:hover { box-shadow: inset 0 0 0 1px rgba(212,165,55,.45); }
.bx-art { width: 100%; height: clamp(150px, calc(100svh - 68px - 400px), 300px); }
.bx-num { font-size: .8125rem; font-weight: 700; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.bx h3 { font-size: clamp(1.0625rem, .95rem + .45vw, 1.375rem); line-height: 1.4; margin-block: 4px 6px; }
.bx-desc { color: var(--text-2); font-size: .9375rem; line-height: 1.6; max-width: 28ch; }

/* ── الختام ─────────────────────────────────────────── */
.final { text-align: center; }
.final h2 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.25rem); color: var(--brand-text); }
.final p { color: var(--text-2); margin-block: 12px 28px; font-size: 1.0625rem; }
.final .nat-line { font-weight: 600; margin-block-end: 6px; color: var(--saudi-text); }
.final .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.final .btns .btn { flex: 1 1 260px; max-width: 360px; }
.slot--final { min-height: clamp(200px, 28vw, 320px); }
.final-cd { display: flex; justify-content: center; gap: clamp(10px, 2vw, 18px); margin-block: 0 22px; }
.fc-unit { display: grid; justify-items: center; min-width: 4.2em; padding: 10px 8px; border-radius: 14px; background: var(--card-bg); }
.fc-val { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 700; line-height: 1.15; color: var(--brand-text); font-variant-numeric: tabular-nums; }
.fc-label { font-size: .75rem; color: var(--text-2); }
main > section.final { padding-block: clamp(56px, 8vh, 96px); min-height: calc(100svh - 68px - var(--foot-h, 0px)); }
@media (min-width: 721px) {
  main > section.final { padding-block: clamp(20px, 3vh, 40px); }
  .final .slot--final { min-height: 0; height: clamp(150px, calc(100svh - 68px - var(--foot-h, 140px) - 410px), 300px); }
}
@media (min-width: 721px) and (max-height: 780px) {
  .final .slot--final { height: clamp(120px, calc(100svh - 68px - var(--foot-h, 140px) - 380px), 300px); }
  .final p { margin-block: 6px 12px; } .final-cd { margin-block-end: 12px; } .fc-unit { padding: 6px 8px; } .fc-val { font-size: 1.375rem; }
}

/* ── التذييل ────────────────────────────────────────── */
.site-footer { padding-block: 18px 12px; border-block-start: 1px solid var(--divider); background: linear-gradient(transparent, rgba(212,165,55,.05)); }
.site-footer .wrap.foot { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.foot-logos { display: flex; align-items: center; justify-content: center; gap: 12px; }
.foot-logos .logo-irth { height: 46px; }
.foot-tag { margin: 0; color: var(--text-2); font-size: .9375rem; }
.site-footer .links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 14px; color: var(--text-2); font-size: .9375rem; }
.site-footer .links .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--brand-primary); }
.site-footer a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--brand-text); text-decoration: underline; }
.foot-copy { margin: 0; color: color-mix(in srgb, var(--text) 55%, transparent); font-size: .8125rem; }
.foot-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 26px; margin-block-start: 2px; }
.foot-sep { width: 1px; height: 18px; background: color-mix(in srgb, var(--text) 25%, transparent); }

/* ── نقاط التنقّل ───────────────────────────────────── */
.page-dots { position: fixed; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); z-index: 45; display: flex; flex-direction: column; gap: 2px; }
.page-dots a { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; text-decoration: none; color: var(--text-2); }
.dot-mark svg { width: 20px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .55;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.page-dots a:hover .dot-mark svg, .page-dots a:focus-visible .dot-mark svg { opacity: 1; }
.page-dots a[aria-current="true"] { color: var(--brand-primary); }
.page-dots a[aria-current="true"] .dot-mark svg { opacity: 1; stroke-width: 3.2; transform: scale(1.3); }
.dot-label { position: absolute; inset-inline-start: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; background: var(--card-bg); border: 1px solid var(--border); color: var(--text);
  font-size: .875rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.page-dots a:hover .dot-label, .page-dots a:focus-visible .dot-label { opacity: 1; }

/* ── شاشة التحميل ───────────────────────────────────── */
#loader, #loader-ui { display: none; }
.is-loading { overflow: hidden; }
.is-loading #loader { display: block; position: fixed; inset: 0; z-index: 100; background: radial-gradient(70% 55% at 50% 60%, #1B1203 0%, var(--bg) 70%); }
.is-loading #scene3d { z-index: 101; opacity: 1; }
.is-loading #loader-ui, .loader-out #loader-ui { display: grid; position: fixed; inset-inline: 0; inset-block-end: clamp(48px, 12vh, 110px); z-index: 102; justify-items: center; gap: 10px; pointer-events: none; }
.ld-num { font-family: "IBM Plex Sans", var(--font); font-variant-numeric: tabular-nums; font-weight: 600; font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); line-height: 1; color: var(--brand-text); direction: ltr; unicode-bidi: isolate; }
.ld-num small { font-size: .5em; margin-inline-start: 2px; color: var(--text-2); }
.ld-bar { width: min(240px, 60vw); height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--text) 14%, transparent); overflow: hidden; }
#ld-fill { display: block; height: 100%; width: 0; background: var(--brand-primary); }
.ld-text { color: var(--text-2); font-size: .9375rem; }
.loader-out #loader { display: block; position: fixed; inset: 0; z-index: 100; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity 800ms var(--ease); }
.loader-out #loader-ui { opacity: 0; transition: opacity 600ms var(--ease); }

/* ── الظهور عند الوصول ──────────────────────────────── */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .reveal:focus-within { opacity: 1; transform: none; transition: none; }
.js-reveal .hero-copy > .reveal { transition-duration: 900ms; }

/* ── زرّا الدعوة: توهّج ذهبي ناعم عند المرور ───────── */
@media (hover: hover) and (pointer: fine) {
  .btn-speed { position: relative; overflow: visible; transition: transform .25s var(--ease); }
  .btn-speed::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    box-shadow: 0 0 26px rgba(212,165,55,.32); transition: opacity .35s var(--ease); }
  .btn-speed:hover, .btn-speed:focus-visible { transform: translateY(-1px); }
  .btn-speed:hover::after, .btn-speed:focus-visible::after { opacity: 1; }
}

/* ── جوال: زر ثابت ──────────────────────────────────── */
.mobile-cta { display: none; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
  .journey.route { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 721px) and (max-width: 1023px) {
  .bgrid4 { grid-template-columns: 1fr 1fr; }
  .bx-art { height: clamp(120px, calc((100svh - 68px - 520px) / 2), 260px); }
}
@media (max-width: 720px) {
  :root { --sec-top: 20px; --sec-gap: 10px; }
  .page-dots { display: none; }
  .header-cta { display: none; }
  .logo-irth { height: 32px; }
  .hero .visual.hero-stage { inset-block-start: 6%; inset-inline: 0; height: 46%; }
  .hero h1 { font-size: clamp(2rem, 1.4rem + 3vw, 2.5rem); line-height: 1.3; }
  .hero-partner { margin: 14px 0 20px; padding-inline-start: 12px; }
  .hero-partner .pt-names { font-size: .9375rem; line-height: 1.65; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .scroll-hint { display: none; }
  .btn-lg { padding-inline: 20px; }

  /* رحلة إرث: شرائح تُسحب أفقياً */
  main > section#journey, main > section#schedule, main > section#eligibility { padding-block-start: var(--sec-top); }
  #journey .journey-slot { flex: 0 0 auto; height: clamp(170px, calc(100svh - 68px - 84px - 446px), 280px); min-height: 0; }
  .journey.route { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--page-pad) * -1); padding-inline: var(--page-pad); padding-block-end: 6px; scrollbar-width: none; }
  .journey.route::-webkit-scrollbar { display: none; }
  .journey.route > .step { flex: 0 0 72%; scroll-snap-align: center; background: var(--card-bg); border-radius: 16px; padding: 14px 12px 16px; }
  .route::before { display: none; }
  .step-art { height: 76px; }
  .step-art .ill { width: 96px; height: 64px; }
  .route .step h3 { font-size: 1rem; }
  .route .step p { font-size: .875rem; }

  /* ما داخل إرث */
  .sched { gap: 12px; }
  .sched-facts { gap: 6px; }
  .sched-facts li { padding: 7px 11px; gap: 6px; font-size: .875rem; }
  .sched-facts svg { width: 17px; height: 17px; }
  .sp { padding: 12px 6px; border-radius: 14px; }
  .sp svg { width: 24px; height: 24px; }
  .sp-name { font-size: .8125rem; }
  .sp-time { font-size: clamp(.8125rem, 3.9vw, 1.0625rem); white-space: normal; }
  .periods-block, #periods .register-cta { display: none; }

  /* الوثيقة */
  main > section#eligibility { padding-block: 12px 0; justify-content: flex-start; }
  .dossier { margin-block-start: 0; padding-block-end: 8px;
    --fade: linear-gradient(to bottom, #000 calc(100% - 92px), rgba(0,0,0,.6) calc(100% - 50px), transparent 100%); }
  .folder-back { height: 132px; } .folder-front { height: 78px; }
  .doc { margin-inline: 10px; padding: 12px 16px 86px; transform: translateY(calc(100% - 86px)); }
  .doc-head { padding-block-end: 6px; margin-block-end: 8px; border-block-end-width: 1.5px; gap: 10px; }
  .doc h3 { font-size: .9375rem; white-space: nowrap; }
  .doc-logos .logo-irth { height: 24px; }
  .doc-groups { grid-template-columns: 1fr; gap: 8px; }
  .doc-sub { font-size: .75rem; margin-block-end: 4px; padding-block-end: 3px; }
  .doc-list { gap: 3px; } .doc-list li { font-size: .8125rem; line-height: 1.4; gap: 8px; }
  .doc .check { width: 18px; height: 18px; border-radius: 5px; margin-block-start: 1px; } .doc .check svg { width: 12px; height: 12px; }
  .doc .note { font-size: .6875rem; line-height: 1.5; margin-block-start: 6px; }
  .doc-ranks { margin-block-start: 6px; padding-block-start: 6px; }
  .doc-ranks h4 { font-size: .8125rem; margin-block-end: 4px; }
  .rank .soldier-art { max-width: 56px; }
  .rank figcaption { font-size: .8125rem; margin-block-start: 2px; }
  .ranks-grid { gap: 6px; }

  /* المزايا */
  #benefits { justify-content: flex-start; padding-block-end: 96px; }
  .bgrid4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bx { padding: 0 10px 12px; border-radius: 14px; }
  .bx-art { height: clamp(84px, calc((100svh - 68px - 92px - 70px - 245px) / 2), 200px); }
  .bx-num { font-size: .75rem; }
  .bx h3 { font-size: .9375rem; line-height: 1.35; margin-block: 2px 4px; }
  .bx-desc { font-size: .8125rem; line-height: 1.5; }

  /* الختام */
  .final .btns .btn { max-width: none; }
  main > section.final { padding-block: 16px; }
  .final .slot--final { min-height: 0; height: clamp(110px, calc(100svh - 68px - var(--foot-h, 150px) - 410px), 260px); }
  .final-cd { gap: 8px; margin-block-end: 14px; }
  .fc-unit { min-width: 3.6em; padding: 6px 4px; } .fc-val { font-size: 1.25rem; } .fc-label { font-size: .6875rem; }
  .site-footer { padding-block: 14px 12px; } .site-footer .wrap.foot { gap: 4px; }
  .foot-logos .logo-irth { height: 36px; }
  .foot-tag { font-size: .8125rem; } .site-footer .links { font-size: .875rem; } .site-footer .links a { min-height: 36px; } .foot-copy { font-size: .75rem; }
  .foot-meta { flex-direction: column; gap: 2px; } .foot-sep { width: 36px; height: 1px; margin-block: 2px; }

  /* العدّاد المصغّر في الشريط العلوي */
  .countdown { z-index: 60; inset-block: 0 auto; inset-inline-start: auto; inset-inline-end: 24px; height: 68px; padding: 0; gap: 0;
    border-radius: 0; box-shadow: none; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .countdown .cd-title, .countdown .cd-unit:last-child { display: none; }
  .countdown .cd-grid { gap: 4px; }
  .countdown .cd-unit { min-width: 1.6em; }
  .countdown .cd-val { font-size: .9375rem; line-height: 1.15; }
  .countdown .cd-label { font-size: .5625rem; }
  .countdown .ended { display: none; }

  /* زر ثابت */
  .mobile-cta { display: block; position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40;
    padding: 12px var(--page-pad) calc(12px + env(safe-area-inset-bottom));
    background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transition: transform var(--dur) var(--ease); }
  .mobile-cta.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur); }
  .mobile-cta .btn { width: 100%; }
  html.js-paging, html.js-paging body { touch-action: pan-x pinch-zoom; }
}
@media (max-width: 380px) {
  .countdown .cd-unit:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .doc, .folder-front { transition: none; }
  .bx { transition: none; opacity: 1; transform: none; }
}
@media (pointer: coarse) { html.js-paging, html.js-paging body { touch-action: pan-x pinch-zoom; } }
@media print {
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
  #scene3d, .mobile-cta, .header-actions, .skip, .page-dots, #loader, #loader-ui { display: none !important; }
}

/* ── زرّا الختام: صغيران متجاوران في الوسط ──────────── */
.btn-md { min-height: 48px; padding-inline: 22px; font-size: .9375rem; }
.final .btns.btns-duo { flex-wrap: nowrap; justify-content: center; gap: 10px; }
.final .btns.btns-duo .btn { flex: 0 1 auto; max-width: none; white-space: nowrap; }
.btn-notify { background: transparent; color: var(--tuwaiq-text); border-color: var(--tuwaiq-text); box-shadow: none; }
.btn-notify:hover { background: rgba(168, 152, 255, .14); }
.btn-notify:active { transform: translateY(1px) scale(.99); }
@media (max-width: 380px) { .btn-md { padding-inline: 16px; font-size: .875rem; } .final .btns.btns-duo { gap: 8px; } }

/* ── نموذج التسجيل المنبثق: بطاقة بسيطة ─────────────── */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 6, 10, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: modal-fade .25s var(--ease); }
.modal-card { position: relative; width: min(92vw, 360px); display: grid; gap: 10px; padding: 26px 22px 22px; border-radius: 20px;
  background: #16120d; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(212, 165, 55, .22); animation: modal-pop .32s var(--ease); }
.modal-card h3 { font-size: 1.25rem; color: var(--brand-text); text-align: center; }
.modal-sub { margin: 0 0 6px; text-align: center; color: var(--text-2); font-size: .875rem; }
.modal-card input[type="text"] { width: 100%; font: inherit; font-size: .9375rem; color: var(--text); background: rgba(255, 244, 214, .05); border: 1px solid rgba(212, 165, 55, .22);
  border-radius: 12px; padding: 12px 14px; }
.modal-card input[type="text"]::placeholder { color: color-mix(in srgb, var(--text) 45%, transparent); }
.modal-card input[type="text"]:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(212, 165, 55, .2); }
.modal-card .btn { width: 100%; margin-top: 4px; }
.modal-card .btn[disabled] { opacity: .6; cursor: default; }
.modal-card .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.modal-x { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.modal-x:hover { background: rgba(255, 244, 214, .08); color: var(--text); }
.form-status { min-height: 20px; margin: 0; font-size: .8125rem; text-align: center; color: var(--text-2); }
.form-status.ok { color: var(--saudi-text); font-weight: 700; }
.form-status.err { color: #E58A7B; }
html.modal-open { overflow: hidden; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-backdrop, .modal-card { animation: none; } }
