/* =========================================================
   دشليون v2 — «مكتب يتكلّم عربي»
   تصميم أولي مستقل: لا يلمس ملفات الإصدار الحالي.
   ========================================================= */

/* خط Cairo محلي — نفس خط هوية التطبيق، بلا اعتماد على شبكة */
@font-face { font-family: "Cairo Local"; src: url("../fonts/cairo-300.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Cairo Local"; src: url("../fonts/cairo-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cairo Local"; src: url("../fonts/cairo-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cairo Local"; src: url("../fonts/cairo-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cairo Local"; src: url("../fonts/cairo-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0a1424;
  --navy-2: #0e2035;
  --ink: #10203a;
  --muted: #5b6b82;
  --brand: #1c80a5;
  --brand-2: #22d3ee;
  --mint: #10b981;
  --paper: #f5f8fc;
  --surface: #ffffff;
  --line: #e2e9f2;
  --shadow: 0 18px 50px rgba(12, 32, 58, .10);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "Cairo Local", "Cairo", Tahoma, Arial, sans-serif;
  --mono: "Cairo Local", "Cairo", monospace;
}

[data-theme="dark"] {
  --ink: #e8f1fb;
  --muted: #9fb0c6;
  --paper: #081322;
  --surface: #0f1e31;
  --line: #1f344c;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
svg { width: 20px; height: 20px; fill: currentColor; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: .98rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { padding: 9px 16px; font-size: .88rem; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-primary { background: linear-gradient(135deg, #1c80a5, #1a6d96); color: #fff; box-shadow: 0 10px 26px rgba(28, 128, 165, .28); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(28, 128, 165, .38); }
.btn-ghost { background: rgba(255, 255, 255, .07); color: #eaf4ff; border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .13); }
.btn-outline-light { border-color: rgba(255, 255, 255, .3); color: #eaf4ff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); }

.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 700; }
.text-link svg { width: 17px; height: 17px; transform: scaleX(-1); transition: transform .2s ease; }
.text-link:hover svg { transform: scaleX(-1) translateX(4px); }

/* ---------- هيدر ---------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background: rgba(10, 20, 36, .72);
  backdrop-filter: blur(14px);
  border-block-end: 1px solid rgba(255, 255, 255, .08);
  transition: background .25s ease;
}
.header-inner { min-height: 70px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand img { border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; }
.brand-text small { font-size: .68rem; color: #9fb6cd; }
.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { color: #c8d7e8; font-size: .9rem; font-weight: 600; transition: color .2s ease; }
.nav a:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06); color: #dbe8f6; cursor: pointer;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ---------- بطل ---------- */
.hero { position: relative; background: var(--navy); color: #fff; padding-block: 70px 64px; overflow: hidden; }
.hero-glow {
  position: absolute; inset-block-start: -220px; inset-inline-end: -160px;
  width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 128, 165, .28), rgba(13, 32, 53, 0) 66%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .18; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .28);
  color: #9be8f7; font-size: .82rem; font-weight: 700;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(34, 211, 238, .16); }
.hero h1 { margin: 22px 0 18px; font-size: clamp(2.3rem, 4.5vw, 3.9rem); line-height: 1.28; letter-spacing: 0; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--brand-2); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; inset-inline: 4%; inset-block-end: -4px; height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--brand-2), transparent); }
.lead { color: #b9cadd; font-size: 1.02rem; max-width: 56ch; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 20px; color: #9fb6cd; font-size: .88rem; }
.trust li { display: flex; align-items: center; gap: 7px; }
.trust svg { width: 16px; height: 16px; color: var(--mint); }

.film-card {
  position: relative; display: block; width: 100%; padding: 0;
  aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  background: #0a1526; box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  cursor: pointer;
}
.film-card video { width: 100%; height: 100%; object-fit: cover; }
.film-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 14, 26, .55), transparent 45%); pointer-events: none; }
.film-card-badge { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; z-index: 2; background: rgba(8, 20, 34, .72); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 5px 12px; font-size: .74rem; color: #d5e6f7; }
.film-play {
  position: absolute; inset-block-start: 50%; inset-inline-start: 50%; z-index: 3;
  width: 62px; height: 62px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #0d2740;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  transition: transform .25s ease, background .25s ease;
}
.film-play svg { width: 26px; height: 26px; }
.film-card:hover .film-play, .proof-poster:hover .film-play { transform: translate(-50%, -50%) scale(1.1); background: #fff; }

.stat-strip {
  position: relative; z-index: 3; margin-block-start: 54px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.stat-strip > div { padding: 22px 26px; text-align: center; border-inline-end: 1px solid var(--line); }
.stat-strip > div:last-child { border-inline-end: 0; }
.stat-strip strong { display: block; font-family: var(--mono); font-size: 2rem; color: var(--brand); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-strip span { display: block; margin-block-start: 7px; font-size: .85rem; color: var(--muted); }

/* ---------- أقسام عامة ---------- */
.section { padding-block: 96px; }
.section-head { margin-block-end: 38px; max-width: 720px; }
.kicker { display: inline-block; color: var(--brand); font-size: .84rem; font-weight: 700; letter-spacing: .02em; margin-block-end: 10px; }
.kicker-light { color: var(--brand-2); display: inline-flex; align-items: center; gap: 7px; }
.kicker-light svg { width: 16px; height: 16px; }
.section h2 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.38; letter-spacing: 0; }
.section h2 em { font-style: normal; color: var(--brand); }
.section-head p { margin: 0; color: var(--muted); }

/* ---------- لحظات اليوم ---------- */
.moment-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-block-end: 22px; }
.moment-tab {
  display: flex; align-items: center; gap: 14px; text-align: start;
  padding: 18px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.moment-tab:hover { transform: translateY(-2px); border-color: var(--brand); }
.moment-tab.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.moment-num { font-family: var(--mono); font-size: .78rem; opacity: .7; }
.moment-name { display: flex; flex-direction: column; font-weight: 700; line-height: 1.35; }
.moment-name small { font-size: .76rem; font-weight: 500; opacity: .72; }
.moment-tab > svg { margin-inline-start: auto; opacity: .75; }
.moment-panel { display: grid; grid-template-columns: .85fr 1.15fr; gap: 46px; align-items: center; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.moment-copy h3 { margin: 0 0 10px; font-size: 1.5rem; }
.moment-copy p { color: var(--muted); margin: 0 0 16px; }
.moment-copy ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; }
.moment-copy li { position: relative; padding-inline-start: 22px; font-size: .92rem; }
.moment-copy li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--mint); font-weight: 700; }
.browser-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 12px 36px rgba(10, 30, 55, .12); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #eef3f9; border-block-end: 1px solid #e0e8f2; }
.browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: #cbd7e6; }
.browser-bar small { margin-inline-start: 10px; color: #7d8fa6; font-size: .72rem; }
.browser-frame img { width: 100%; display: block; }

/* ---------- المساعد ---------- */
.ai { background: var(--navy-2); color: #fff; position: relative; overflow: hidden; }
.ai::before { content: ""; position: absolute; inset-inline-start: -240px; inset-block-start: 20%; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(16, 185, 129, .16), transparent 65%); }
.ai-inner { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.ai-copy h2 em { color: var(--mint); }
.ai-copy > p { color: #b3c6da; }
.ai-list { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 11px; }
.ai-list li { position: relative; padding-inline-start: 26px; color: #d6e4f2; font-size: .94rem; }
.ai-list li::before { content: "→"; position: absolute; inset-inline-start: 0; color: var(--mint); font-weight: 700; }
.chat-card { background: #f7fafc; color: #14243d; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .12); }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 14px 18px; background: #fff; border-block-end: 1px solid #e6edf5; }
.chat-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, #1c80a5, #22d3ee); color: #fff; font-weight: 700; }
.chat-head strong { display: block; font-size: .92rem; line-height: 1.2; }
.chat-head small { display: block; font-size: .72rem; color: #71849c; }
.chat-status { margin-inline-start: auto; font-family: var(--mono); font-size: .7rem; color: #6b7f96; background: #eef3f8; padding: 4px 9px; border-radius: 999px; }
.chat-body { padding: 20px; display: grid; gap: 12px; }
.bubble { max-width: 92%; padding: 12px 16px; border-radius: 14px; font-size: .9rem; }
.bubble-user { background: #1c80a5; color: #fff; border-start-end-radius: 4px; justify-self: end; }
.bubble-ai { background: #fff; border: 1px solid #e4ecf5; border-start-start-radius: 4px; box-shadow: 0 4px 14px rgba(20, 40, 70, .05); }
.typing { display: block; color: #71849c; font-size: .8rem; margin-block-end: 10px; }
.answer-table { width: 100%; border-collapse: collapse; font-size: .82rem; direction: rtl; }
.answer-table td { padding: 7px 4px; border-block-end: 1px solid #edf2f7; }
.answer-table td:last-child { font-family: var(--mono); text-align: end; white-space: nowrap; color: #17324f; font-weight: 700; font-variant-numeric: tabular-nums; }
.answer-table tr.is-good td:last-child { color: var(--mint); }
.answer-table tr.is-total td { background: #eef8f4; font-weight: 700; }
.answer-table tr.is-total td:last-child { color: #0b8f69; }
.answer-meta { display: flex; justify-content: space-between; gap: 10px; margin-block-start: 10px; font-size: .76rem; color: #71849c; }
.answer-meta strong { color: #0b8f69; }
.chat-hint { padding: 11px 18px; background: #eef3f8; color: #6b7f96; font-size: .76rem; text-align: center; }

/* ---------- الوحدات ---------- */
.module-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.module-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.module-group h3 { margin: 0 0 4px; font-size: 1.2rem; }
.module-group > p { margin: 0 0 18px; color: var(--muted); font-size: .88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 8%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); color: var(--ink); font-size: .8rem; font-weight: 600; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }

/* ---------- إثبات ---------- */
.proof { background: color-mix(in srgb, var(--brand) 5%, var(--paper)); }
.proof-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.proof-copy p { color: var(--muted); }
.proof-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 24px; }
.proof-actions .btn-ghost { color: var(--ink); background: var(--surface); border-color: var(--line); }
.proof-poster { position: relative; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); }
.proof-poster img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- تحميل ---------- */
.download { padding-block: 80px 100px; }
.download-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  background: linear-gradient(135deg, #0a2339 0%, #0e3450 55%, #123f56 100%);
  color: #fff; border-radius: 30px; padding: 56px 60px;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 30px 80px rgba(8, 28, 48, .28);
}
.download-glow {
  position: absolute; inset-inline-start: -140px; inset-block-end: -220px;
  width: 560px; height: 560px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(28, 128, 165, .26), transparent 66%);
}
.download-main { position: relative; z-index: 1; }
.kicker-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-inline-end: 8px; vertical-align: middle; }
.download-card h2 { margin: 6px 0 16px; font-size: clamp(1.9rem, 3.1vw, 2.75rem); line-height: 1.38; }
.download-card h2 em { font-style: normal; color: var(--brand-2); }
.download-card p { color: #b9d0e4; margin: 0 0 22px; max-width: 54ch; }
.download-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.download-checks li { position: relative; padding-inline-start: 22px; font-size: .86rem; color: #d6e6f4; }
.download-checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--mint); font-weight: 700; }

.download-panel {
  position: relative; z-index: 1; display: grid; gap: 12px;
  padding: 20px; border-radius: 20px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
}
.download-action {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.download-action:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .28); }
.download-action.is-primary { background: linear-gradient(135deg, #1c80a5, #1a6d96); border-color: transparent; box-shadow: 0 10px 26px rgba(28, 128, 165, .26); }
.download-action.is-primary:hover { background: linear-gradient(135deg, #238fb6, #1a6d96); }
.download-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, .1); }
.download-icon svg { width: 19px; height: 19px; }
.download-action.is-primary .download-icon { background: rgba(255, 255, 255, .18); }
.download-action-text { display: flex; flex-direction: column; line-height: 1.35; }
.download-action-text strong { font-size: .98rem; }
.download-action-text small { font-size: .75rem; color: #a9c6dd; }
.download-action.is-primary .download-action-text small { color: #d5ecf8; }
.download-arrow { width: 16px; height: 16px; margin-inline-start: auto; opacity: .75; }
.download-social {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 14px 6px 2px; margin-block-start: 2px;
  border-block-start: 1px solid rgba(255, 255, 255, .12);
  font-size: .8rem; color: #9fb6cd;
}
.download-social a:hover { color: #fff; }

/* ---------- تذييل ---------- */
.site-footer { background: var(--navy); color: #93abc4; padding-block: 26px; }
.footer-inner { display: flex; align-items: center; gap: 12px; font-size: .86rem; }
.footer-inner a { margin-inline-start: auto; }
.footer-inner a:hover { color: #fff; }

/* ---------- نافذة الفيلم ---------- */
.film-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.film-modal[hidden] { display: none; }
.film-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 12, 22, .82); backdrop-filter: blur(6px); }
.film-modal-box { position: relative; width: min(1000px, 100%); background: #000; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.film-modal-box video { width: 100%; display: block; aspect-ratio: 16 / 9; }
.film-close { position: absolute; inset-block-start: 8px; inset-inline-end: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
body.modal-open { overflow: hidden; }

/* ---------- ظهور تدريجي ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- تجاوب ---------- */
@media (max-width: 980px) {
  .hero-inner, .ai-inner, .moment-panel, .proof-inner, .download-card { grid-template-columns: 1fr; gap: 34px; }
  .module-groups { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-block-start: 46px; }
  .nav { display: none; }
  .moment-panel { padding: 24px; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .section { padding-block: 64px; }
  .brand-text small { display: none; }
  .hero h1 { font-size: 2.15rem; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip > div:nth-child(2) { border-inline-end: 0; }
  .stat-strip > div:nth-child(-n+2) { border-block-end: 1px solid var(--line); }
  .moment-tabs { grid-template-columns: 1fr; }
  .module-groups { grid-template-columns: 1fr; }
  .download-card { padding: 28px 22px; border-radius: 20px; }
  .download-panel { padding: 14px; }
  .download-action { padding: 12px; }
  .download-action-text small { font-size: .7rem; }
  .trust { gap: 12px; }
}
