/* الصفحة الرئيسية: ليل فوق الأهوار — كحلي وذهبي وماء، مع وضع نهاري */
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url('../themes/fonts/IBMPlexSansArabic-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Plex Arabic'; font-weight: 500; font-display: swap; src: url('../themes/fonts/IBMPlexSansArabic-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url('../themes/fonts/IBMPlexSansArabic-Bold.woff2') format('woff2'); }

:root {
  --bg: #071019;
  --text: #eef2f5;
  --muted: #93a4b5;
  --gold: #e0b45a;
  --water: #4cc3d9;
  --line: rgba(255, 255, 255, .13);
  --glow: #10273a;
  --panel: #0c1a27;
  --band: #091420;
  --accent-text: #e0b45a;
  --ok: #5fd3a0;
  --info: #7cc4f0;
  --wait: #f0c063;
}
:root[data-theme="light"] {
  --bg: #f4f6f8;
  --text: #0f2233;
  --muted: #526578;
  --gold: #c8942f;
  --line: rgba(15, 34, 51, .14);
  --glow: #e3edf4;
  --panel: #ffffff;
  --band: #ebeff3;
  --accent-text: #85590c;
  --ok: #0f7a51;
  --info: #14689c;
  --wait: #8a5a06;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  background: radial-gradient(1200px 800px at 25% 20%, var(--glow) 0%, var(--bg) 65%) fixed, var(--bg);
  color: var(--text);
  font: 400 16px/1.8 'Plex Arabic', Tahoma, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 5; background: var(--gold); transform: scaleX(0); transform-origin: right; }
.bar {
  position: fixed; inset: 0 0 auto; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1rem, 5vw, 4rem);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.bar.solid { background: color-mix(in srgb, var(--bg) 88%, transparent); border-color: var(--line); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: .7rem; line-height: 1.35; }
.brand img { object-fit: contain; }
.brand b { display: block; font-size: .95rem; }
.brand small { color: var(--muted); font-size: .75rem; }
.bar nav { display: flex; gap: 1.8rem; font-size: .9rem; color: var(--muted); }
.bar nav a { position: relative; transition: color .2s; }
.bar nav a::after { content: ''; position: absolute; inset: auto 0 -4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .3s; }
.bar nav a:hover, .bar nav a.on { color: var(--text); }
.bar nav a.on::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: .6rem; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; background: none; border: 1px solid var(--line); border-radius: 2px; color: inherit; cursor: pointer; }
.icon-btn:hover { border-color: var(--gold); }
.icon-btn .half { fill: currentColor; stroke: none; }
.menu-btn { display: none; }

.btn {
  display: inline-block; padding: .65rem 1.6rem; border: 1px solid transparent; border-radius: 2px;
  font-weight: 500; font-size: .92rem; white-space: nowrap;
  transition: background .25s, border-color .25s, transform .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .35rem 1.1rem; }
.btn-gold { background: var(--gold); color: #1a1204; }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 82%, #fff); }
.btn-line { border-color: var(--line); }
.btn-line:hover { border-color: var(--gold); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.rail { position: fixed; z-index: 3; left: 1.4rem; top: 50%; transform: translateY(-50%); list-style: none; display: grid; gap: .6rem; transition: opacity .3s; }
.rail.off { opacity: 0; }
.rail li { width: 2px; height: 22px; background: var(--line); transition: background .3s, height .3s; }
.rail li.on { background: var(--gold); height: 38px; }

main { position: relative; z-index: 1; }
.scene { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 6rem clamp(1rem, 6vw, 6rem); pointer-events: none; }
.copy { width: min(31rem, 100%); pointer-events: auto; }
.js .copy > * { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .scene.in .copy > * { opacity: 1; transform: none; }
.js .scene.in .copy > :nth-child(2) { transition-delay: .08s; }
.js .scene.in .copy > :nth-child(3) { transition-delay: .16s; }
.js .scene.in .copy > :nth-child(4) { transition-delay: .24s; }
.js .scene.in .copy > :nth-child(5) { transition-delay: .32s; }

.eyebrow { display: flex; align-items: center; gap: .7rem; color: var(--accent-text); font-size: .82rem; font-weight: 500; margin-bottom: 1rem; }
.eyebrow::before { content: ''; width: 32px; height: 1px; background: currentColor; flex-shrink: 0; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); line-height: 1.35; font-weight: 700; margin-bottom: 1.2rem; }
h1 span { display: block; overflow: hidden; }
h1 i { display: block; font-style: normal; }
h1 span:last-child { color: var(--accent-text); }
.js h1 i { animation: line-up .9s cubic-bezier(.2, .7, .2, 1) both; }
.js h1 span:nth-child(2) i { animation-delay: .12s; }
.js h1 span:nth-child(3) i { animation-delay: .24s; }
@keyframes line-up { from { transform: translateY(110%); } }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.45; margin-bottom: 1rem; text-wrap: balance; }
h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .45rem; }
.lead { color: var(--muted); font-size: 1.02rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.note { margin-top: 1.6rem; color: var(--muted); font-size: .85rem; }
.note b { color: var(--accent-text); font-size: 1.05rem; }

.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--band); padding: .9rem 0; direction: ltr; }
.ticker > div { display: flex; width: max-content; animation: ticker 45s linear infinite; }
.ticker span { direction: rtl; white-space: nowrap; padding-inline: 2rem; color: var(--muted); font-size: .95rem; }
.ticker span::after { content: '◆'; color: var(--gold); font-size: .55rem; position: relative; right: -2rem; vertical-align: middle; }
@keyframes ticker { to { transform: translateX(-50%); } }

.block { background: var(--bg); padding: clamp(4rem, 9vw, 7.5rem) max(1rem, calc((100% - 74rem) / 2)); border-bottom: 1px solid var(--line); }
.head { max-width: 42rem; margin-bottom: 3rem; }
.js [data-reveal] { opacity: 0; translate: 0 32px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }

.bento { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); perspective: 1200px; }
.bento li {
  position: relative; overflow: hidden; padding: 2rem 1.6rem 2.4rem; background: var(--panel);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.js .bento li { transition: opacity .8s ease, translate .8s ease, transform .18s ease-out; }
.bento li::before {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--gold) 20%, transparent), transparent 70%);
}
.bento li:hover::before { opacity: 1; }
.bento svg { width: 34px; height: 34px; color: var(--accent-text); margin-bottom: 1.4rem; stroke-width: 1.2; }
.bento p { color: var(--muted); font-size: .92rem; }
.bento em { position: absolute; left: 1.2rem; top: 1rem; font-style: normal; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bento li:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 1.5rem; align-items: start; }
.bento li:last-child svg { grid-row: span 2; width: 48px; height: 48px; margin: 0; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; background: var(--band); }
.reasons { list-style: none; counter-reset: r; margin-top: 2.2rem; }
.reasons li { counter-increment: r; position: relative; padding: 1.1rem 3.2rem 1.1rem 0; border-top: 1px solid var(--line); }
.reasons li::before { content: counter(r, decimal-leading-zero); position: absolute; right: 0; top: 1.2rem; color: var(--accent-text); font-size: .85rem; }
.reasons p { color: var(--muted); font-size: .92rem; }
.stage { perspective: 1100px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1.6rem;
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .55);
  transform: rotateX(calc(var(--tip, 0) * 22deg)) rotateY(calc(var(--tip, 0) * 14deg)) scale(calc(1 - var(--tip, 0) * .07));
}
.panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.panel small { color: var(--muted); border: 1px solid var(--line); padding: 0 .6rem; border-radius: 2px; font-size: .72rem; }
.panel ul { list-style: none; }
.panel li { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.js .panel li { opacity: 0; translate: 24px 0; transition: .6s ease calc(.3s + var(--d) * .25s); }
.js .in .panel li { opacity: 1; translate: 0 0; }
.panel em { font-style: normal; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.panel em::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-left: .45rem; }
.ok { color: var(--ok); } .info { color: var(--info); } .wait { color: var(--wait); }
.panel footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; padding-top: 1.2rem; font-size: .9rem; }
.panel footer b { color: var(--ok); }
.panel footer i { width: 100%; height: 4px; background: var(--line); position: relative; }
.panel footer i::after { content: ''; position: absolute; inset: 0 0 0 auto; width: var(--v); background: var(--ok); transition: width 1.4s cubic-bezier(.2, .7, .2, 1) .8s; }
.js .stage:not(.in) footer i::after { width: 0; }

.stats { padding-block: 3.5rem; }
.stats dl { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats dl div { padding: .5rem 1.5rem; border-right: 1px solid var(--line); }
.stats dd { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 700; line-height: 1.3; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.stats dt { color: var(--muted); font-size: .9rem; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; padding-top: 2rem; }
.steps::before, .steps::after { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: var(--line); }
.steps::after { height: 2px; background: var(--gold); transform: scaleX(var(--fill, 1)); transform-origin: right; }
.steps b { display: block; font-size: 2.6rem; font-weight: 400; color: transparent; -webkit-text-stroke: 1px var(--accent-text); margin-bottom: .6rem; }
.steps p { color: var(--muted); font-size: .92rem; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.quotes figure { display: flex; flex-direction: column; gap: 1.2rem; padding: 1.8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.stars { color: var(--gold); letter-spacing: 3px; font-size: .85rem; }
.quotes blockquote { flex: 1; font-size: .98rem; line-height: 2; }
.quotes figcaption { border-top: 1px solid var(--line); padding-top: 1rem; }
.quotes figcaption b { display: block; font-size: .9rem; }
.quotes figcaption span { color: var(--muted); font-size: .82rem; }

.scene.end { justify-content: center; text-align: center; min-height: 85vh; }
.copy.center {
  width: min(46rem, 100%); padding: 3rem 2rem;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 92%, transparent) 55%, transparent);
}
.copy.center .lead { margin-inline: auto; }
.copy.center .actions { justify-content: center; }

.foot { position: relative; z-index: 1; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding: 3.5rem max(1rem, calc((100% - 74rem) / 2)) 1.5rem; background: var(--band); border-top: 1px solid var(--line); font-size: .9rem; }
.foot h4 { font-size: .9rem; margin-bottom: .9rem; }
.foot > div > a:not(.brand), .foot > div > span { display: block; width: fit-content; color: var(--muted); padding: .2rem 0; }
.foot > div > a:not(.brand):hover { color: var(--accent-text); }
.about p { color: var(--muted); max-width: 22rem; margin-top: 1rem; }
.legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); padding-top: 1.2rem; color: var(--muted); font-size: .78rem; }

@media (max-width: 1050px) {
  .bar nav { position: absolute; inset: 100% 0 auto; display: none; flex-direction: column; gap: 0; padding: .5rem 1.2rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
  .bar nav.open { display: flex; }
  .bar nav a { padding: .6rem 0; }
  .menu-btn { display: grid; }
}
@media (max-width: 900px) {
  .rail { display: none; }
  .scene { align-items: flex-end; padding-bottom: 3rem; }
  .scene .copy { text-shadow: 0 1px 12px var(--bg), 0 0 4px var(--bg); }
  .scene:not(.end) { background: linear-gradient(transparent 36%, color-mix(in srgb, var(--bg) 88%, transparent) 50%); }
  h1 { font-size: 2.15rem; }
  .scene.end { align-items: center; }
  .split { grid-template-columns: 1fr; }
  .bento, .quotes { grid-template-columns: 1fr; }
  .stats dl, .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .foot { grid-template-columns: 1fr 1fr; }
  .about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .brand b { font-size: .82rem; }
  .bar .btn { display: none; }
  .steps { grid-template-columns: 1fr; }
  .bento li:last-child { grid-template-columns: 1fr; row-gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .copy > *, .js [data-reveal], .js .panel li { opacity: 1; transform: none; translate: none; }
}
@media print { #map, .rail, .progress, .ticker, .tools { display: none; } .bar { position: static; } .js .copy > *, .js [data-reveal], .js .panel li { opacity: 1; translate: none; transform: none; } }

/* ===== الصور ===== */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr)); gap: 1px; background: var(--line); position: relative; z-index: 1; }
.photos figure { position: relative; overflow: hidden; height: clamp(18rem, 55vh, 34rem); background: var(--panel); }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.photos figure:hover img { transform: scale(1.05); }
.photos figcaption { position: absolute; inset: auto 0 0; padding: 3rem 1.5rem 1.2rem; color: #fff; background: linear-gradient(transparent, rgba(4, 10, 16, .85)); font-size: .92rem; }

/* ===== أنماط الواجهة (رسوم مجردة) ===== */
.shots { max-width: 62rem; margin-inline: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.tabs button { font: inherit; font-size: .9rem; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 2px; padding: .35rem 1.2rem; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); border-color: var(--gold); }
.window { border: 1px solid var(--line); border-radius: 6px; padding: 28px 0 0; background: var(--panel); position: relative; overflow: hidden; box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .6); }
.window::before { content: ''; position: absolute; top: 10px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); box-shadow: -14px 0 var(--line), -28px 0 var(--line); }
.mock {
  --a: #4a5560; --canvas: #f6f7f8; --paper: #fff; --ink: #d9dde2; --nav: #fff; --nav-ink: #dfe3e8; --bar: #fff;
  display: grid; aspect-ratio: 16 / 9; width: 100%; background: var(--canvas);
  grid-template: 'menu bar' 11% 'menu body' 1fr / 19% 1fr;
  animation: mock-in .5s ease both;
}
.mock[hidden] { display: none; }
.mock-rail { --a: #0f7b72; --nav: #fff; grid-template: 'rail menu bar' 11% 'rail menu body' 1fr / 5% 17% 1fr; }
.mock-top { --a: #1a66ff; --bar: #17191c; --canvas: #f2f3f5; grid-template: 'bar bar' 11% 'menu body' 1fr / 19% 1fr; }
.mock i, .mock u, .mock b, .mock em { display: block; text-decoration: none; font-style: normal; border-radius: 3px; background: var(--ink); }

.mk-rail { display: none; grid-area: rail; background: #101c20; flex-direction: column; align-items: center; gap: 4%; padding-top: 30%; }
.mock-rail .mk-rail { display: flex; }
.mk-rail i { width: 48%; aspect-ratio: 1; background: #33474d !important; }
.mk-rail i:nth-child(2) { background: var(--a) !important; }
.mk-menu { grid-area: menu; background: var(--nav); border-left: 1px solid var(--ink); padding: 9% 8%; display: flex; flex-direction: column; gap: 4.5%; }
.mk-menu b { height: 5%; width: 62%; margin-bottom: 6%; background: var(--a); }
.mk-menu span { display: flex; align-items: center; gap: 8%; padding: 4% 5%; border-radius: 4px; }
.mk-menu span:nth-of-type(2) { background: color-mix(in srgb, var(--a) 14%, transparent); }
.mk-menu span i { width: 9%; aspect-ratio: 1; flex-shrink: 0; }
.mk-menu span u { height: 6px; width: 58%; }
.mk-menu span:nth-of-type(even) u { width: 44%; }
.mk-bar { grid-area: bar; background: var(--bar); border-bottom: 1px solid var(--ink); display: flex; align-items: center; gap: 1.4%; padding: 0 2.5%; }
.mk-bar u { height: 46%; width: 26%; margin-left: auto; opacity: .7; }
.mk-bar i { height: 38%; aspect-ratio: 1; border-radius: 50%; }
.mock-top .mk-bar { border: 0; }
.mock-top .mk-bar u, .mock-top .mk-bar i { background: #3a3f45; }
.mock-top i, .mock-top u { border-radius: 0; }

.mk-body { grid-area: body; padding: 3%; display: grid; grid-template-rows: auto 24% 1fr; gap: 4%; min-height: 0; }
.mk-title { display: flex; justify-content: space-between; align-items: center; }
.mk-title u { height: 10px; width: 20%; background: #aab2bb; }
.mk-title em { height: 22px; width: 11%; background: var(--a); }
.mk-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2%; }
.mk-tiles span, .mk-wide > div { background: var(--paper); border: 1px solid var(--ink); border-radius: 6px; }
.mock-top .mk-tiles span, .mock-top .mk-wide > div { border-radius: 0; }
.mk-tiles span { display: flex; flex-direction: column; justify-content: center; gap: 14%; padding: 0 10%; }
.mk-tiles i { height: 6px; width: 50%; }
.mk-tiles u { height: 26%; width: 36%; background: color-mix(in srgb, var(--a) 70%, transparent); }
.mk-wide { display: grid; grid-template-columns: 2.4fr 1fr; gap: 2%; min-height: 0; }
.mk-bars { display: flex; align-items: flex-end; gap: 4%; padding: 5% 5% 3%; min-height: 0; }
.mk-bars i { flex: 1; height: var(--h); background: color-mix(in srgb, var(--a) 78%, transparent); transform-origin: bottom; animation: mock-grow 3.2s ease-in-out calc(var(--i) * .12s) infinite alternate; }
.mk-ring { position: relative; }
.mk-ring::before {
  content: ''; position: absolute; inset: 0; margin: auto; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--a) 0 68%, var(--ink) 0);
  -webkit-mask: radial-gradient(closest-side, transparent 66%, #000 67%); mask: radial-gradient(closest-side, transparent 66%, #000 67%);
}
@keyframes mock-grow { from { transform: scaleY(.72); } }
@keyframes mock-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 600px) {
  .mock { aspect-ratio: 4 / 3; }
  .mk-tiles { grid-template-columns: repeat(2, 1fr); }
  .mk-tiles span:nth-child(n+3) { display: none; }
  .mk-menu span u, .mk-menu b { display: none; }
  .mk-menu span i { width: 60%; margin: 0 auto; }
  .mock { grid-template-columns: 12% 1fr; }
  .mock-rail { grid-template-columns: 8% 11% 1fr; }
}

/* ===== التحقق من وثيقة ===== */
.verify > * { min-width: 0; }
.verify { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; background: var(--band); }
.verify label { display: block; margin-bottom: .5rem; font-size: .9rem; }
.verify form > div { display: flex; gap: .6rem; }
.verify input { flex: 1; min-width: 0; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: .6rem 1rem; }
.verify input:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.verify .error { color: var(--wait); font-size: .85rem; margin-top: .6rem; }
@media (max-width: 900px) { .verify { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
