:root {
  --primary: #4F7BF0;
  --primary-dark: #3A5BD0;
  --primary-light: #9DB4F8;
  --accent: #E8B96A;
  --accent-dark: #CC9A45;
  --success: #6DD6A8;

  --bg: #FAF9FE;
  --surface: #FFFFFF;
  --surface-alt: #F3F1FB;
  --text: #1A1625;
  --text-muted: #6E6A7C;
  --outline: #E4E1F0;
  --shadow: 0 8px 30px rgba(79, 123, 240, .14);

  --radius: 20px;
  --max: 1080px;
  --serif: "Fraunces", "Noto Serif Arabic", serif;
}

:root[data-theme="dark"] {
  --bg: #0C0B10;
  --surface: #16141C;
  --surface-alt: #1C1A24;
  --text: #F1EEF7;
  --text-muted: #A7A2B5;
  --outline: #2A2733;
  --shadow: 0 8px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Kufi Arabic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 16px;
  transition: background .25s, color .25s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-muted); font-size: 15px; padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--outline);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-alt); }

@media (max-width: 680px) {
  .nav a.hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero-icon {
  width: 112px; height: 112px; border-radius: 28px;
  box-shadow: var(--shadow); margin: 0 auto 24px; display: block;
}
.hero h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.3; margin-bottom: 14px; }
.hero h1 .grad {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  max-width: 640px; margin: 0 auto 28px; color: var(--text-muted); font-size: clamp(16px, 2.4vw, 19px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 16px; font-size: 17px; font-weight: 700;
  border: 0; cursor: pointer; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; box-shadow: 0 10px 26px rgba(79, 123, 240, .40);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 123, 240, .48); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--outline); }
.btn-ghost:hover { background: var(--surface-alt); }

.hero-meta {
  margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px;
  color: var(--text-muted); font-size: 14px;
}
.hero-meta .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--outline);
  padding: 4px 14px; border-radius: 999px;
}
.hero-note { margin-top: 12px; color: var(--text-muted); font-size: 13px; }
.hero-note a { color: var(--primary); }

/* ---------- Sections ---------- */
section { padding: 56px 0; scroll-margin-top: 64px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 4.2vw, 34px); margin-bottom: 8px; }
.section-head p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius); padding: 24px;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ico {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: var(--surface-alt);
}
.card h3 { font-size: 18px; margin-bottom: 6px; }
.card p { color: var(--text-muted); font-size: 15px; line-height: 1.75; }
.card svg { width: 24px; height: 24px; stroke: var(--primary); }

/* ---------- Formats / language chips ---------- */
.formats { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.chip.c1 { background: #4F7BF0; }
.chip.c2 { background: #6DD6A8; }
.chip.c3 { background: #4FA8D8; }
.chip.c4 { background: #E17055; }
.chip.c5 { background: #E8B96A; }

/* ---------- Equalizer spotlight ---------- */
.eq-list { display: flex; flex-direction: column; gap: 22px; }
.eq-item { display: flex; gap: 16px; }
.eq-item .num {
  font-family: var(--serif); color: var(--primary); font-size: 20px; font-weight: 700;
  width: 34px; flex-shrink: 0; padding-top: 1px;
}
.eq-item h3 { font-size: 17px; margin-bottom: 6px; }
.eq-item p { color: var(--text-muted); font-size: 15px; }

.note-box {
  margin-top: 28px;
  border-inline-start: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 16px 20px; border-radius: 0 14px 14px 0;
  font-size: 14.5px; color: var(--text-muted);
}
.note-box strong { color: var(--accent-dark); font-weight: 700; }
.help-note { max-width: 620px; margin: 28px auto 0; }
.help-note ol { margin: 8px 0 0; padding-inline-start: 22px; }
.help-note li { margin-top: 4px; }
:root[data-theme="dark"] .note-box strong { color: var(--accent); }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.step {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 24px; position: relative; counter-increment: s;
}
.step::before {
  content: counter(s); position: absolute; top: -14px; right: 20px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ---------- Honest / pros & cons ---------- */
.honest-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .honest-grid { grid-template-columns: 1fr; } }
.honest-col {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
  padding: 28px 24px;
}
.honest-col h3 { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.honest-col h3 svg { width: 20px; height: 20px; flex-shrink: 0; }
.honest-col.good h3 { color: var(--success); }
.honest-col.good h3 svg { stroke: var(--success); }
.honest-col.limit h3 { color: var(--accent-dark); }
.honest-col.limit h3 svg { stroke: var(--accent-dark); }
:root[data-theme="dark"] .honest-col.limit h3 { color: var(--accent); }
:root[data-theme="dark"] .honest-col.limit h3 svg { stroke: var(--accent); }
.honest-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.honest-col li { display: flex; gap: 12px; font-size: 14.5px; color: var(--text-muted); }
.honest-col li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; }
.honest-col.good li svg { stroke: var(--success); }
.honest-col.limit li svg { stroke: var(--accent-dark); }
:root[data-theme="dark"] .honest-col.limit li svg { stroke: var(--accent); }
.honest-col li b { color: var(--text); font-weight: 700; }

/* ---------- Trust band ---------- */
.trust {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: 28px; padding: 40px 28px; text-align: center;
}
.trust h2 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 10px; }
.trust p { opacity: .92; max-width: 620px; margin: 0 auto 20px; }
.trust .btn-ghost { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .35); }
.trust .btn-ghost:hover { background: rgba(255, 255, 255, .25); }

/* ---------- Install help ---------- */
details {
  background: var(--surface); border: 1px solid var(--outline); border-radius: 16px;
  padding: 16px 20px; margin-bottom: 12px;
}
summary { cursor: pointer; font-weight: 700; }
details p, details ol { color: var(--text-muted); margin-top: 10px; font-size: 15px; }
details ol { padding-inline-start: 22px; }

/* ---------- Requirements ---------- */
.req { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.req div {
  background: var(--surface); border: 1px solid var(--outline); border-radius: 14px;
  padding: 12px 18px; font-size: 15px;
}
.req b { color: var(--primary); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--outline); padding: 32px 0 40px; margin-top: 24px; }
.footer .container {
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  color: var(--text-muted); font-size: 14px;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }

/* ---------- Privacy page ---------- */
.doc { padding: 48px 0 24px; max-width: 780px; margin: 0 auto; }
.doc h1 { font-size: clamp(28px, 5vw, 38px); margin-bottom: 8px; }
.doc .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 21px; margin: 32px 0 10px; color: var(--primary-dark); }
:root[data-theme="dark"] .doc h2 { color: var(--primary-light); }
.doc p { margin-bottom: 12px; color: var(--text); }
.doc ul { padding-inline-start: 24px; margin-bottom: 12px; }
.doc li { margin-bottom: 6px; }
.doc code { background: var(--surface-alt); border: 1px solid var(--outline); border-radius: 6px; padding: 2px 7px; font-size: .85em; color: var(--primary-dark); }
:root[data-theme="dark"] .doc code { color: var(--primary-light); }
.doc .callout {
  background: var(--surface-alt); border: 1px solid var(--outline);
  border-inline-start: 4px solid var(--success); border-radius: 14px;
  padding: 16px 20px; margin: 20px 0;
}
.doc .lang-divider {
  display: flex; align-items: center; gap: 16px; margin: 48px 0 8px;
  color: var(--text-muted); font-size: 13px;
}
.doc .lang-divider::before, .doc .lang-divider::after { content: ""; flex: 1; height: 1px; background: var(--outline); }
.doc .en { direction: ltr; text-align: left; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Download cards ---------- */
.dl-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 900px; margin: 0 auto; }
.dl-card {
  position: relative; background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius); padding: 28px 22px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.dl-card h3 { font-size: 19px; }
.dl-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; flex: 1; }
.dl-card .btn { width: 100%; margin-top: 8px; }
.dl-card.recommended { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.dl-size { font-weight: 700; font-size: 22px; color: var(--primary); margin-top: 6px; }
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #1A1625; font-size: 13px; font-weight: 700;
  padding: 3px 14px; border-radius: 999px; white-space: nowrap;
}
.dl-help { text-align: center; color: var(--text-muted); font-size: 14px; max-width: 620px; margin: 24px auto 0; }

/* ================= Phone frame ================= */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 751;
  background: #0d0b14;
  border-radius: 34px;
  padding: 9px;
  box-shadow:
    0 0 0 1.5px #2b2740,
    0 22px 50px rgba(80, 60, 180, .22),
    0 6px 14px rgba(80, 60, 180, .14);
}
.phone::before {
  content: ""; position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: #05040a; z-index: 2;
  box-shadow: inset 0 0 0 1.5px #1c1830;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 26px; overflow: hidden;
  background: #131019;
}
.phone-screen picture, .phone-screen img { display: block; width: 100%; height: 100%; }
.phone-screen img { object-fit: cover; object-position: top center; }

/* ================= Hero: text + phones ================= */
.hero-grid { display: block; }
.hero-visual { position: relative; margin: 44px auto 0; width: min(76vw, 330px); }
.hero-visual .phone-main { position: relative; z-index: 2; }
.hero-visual .phone-back { display: none; }

@media (min-width: 900px) {
  .hero { padding: 72px 0 56px; text-align: start; }
  .hero-grid {
    display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px;
  }
  .hero-icon { margin: 0 0 22px; }
  .hero p.lead { margin: 0 0 28px; }
  .hero-meta { justify-content: flex-start; }
  .hero-visual { margin: 0; width: 100%; max-width: 440px; justify-self: center; height: 560px; }
  .hero-visual .phone { width: 250px; position: absolute; }
  .hero-visual .phone-main { top: 0; inset-inline-start: 30px; }
  .hero-visual .phone-back {
    display: block; top: 58px; inset-inline-end: 0; z-index: 1;
    transform: rotate(6deg); opacity: .96;
  }
  .hero-visual::before {
    content: ""; position: absolute; inset: 8% -6% 4%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 30%, transparent), transparent 72%);
    z-index: 0; filter: blur(8px);
  }
}

/* ================= Equalizer spotlight visuals ================= */
.eq-visual { position: relative; display: flex; gap: 20px; justify-content: center; padding: 10px 0; }
.eq-visual .phone { width: 210px; }
.eq-visual .phone:nth-child(2) { margin-top: 40px; }

/* ================= Screenshots gallery ================= */
.screens { padding-inline: 0; background: var(--surface-alt); }
.shots-track {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 30px;
  scrollbar-width: thin; scrollbar-color: var(--primary-light) transparent;
}
.shots-track:focus-visible { outline: 3px solid var(--primary-light); outline-offset: -3px; }
.shots-row {
  display: flex; gap: 22px; width: max-content; min-width: 100%;
  padding-inline: max(20px, calc((100vw - var(--max)) / 2 + 20px));
}
.shot {
  flex: 0 0 auto; width: 232px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 0;
}
.shot-btn {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 34px; transition: transform .2s;
}
.shot-btn:hover { transform: translateY(-4px); }
.shot-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.shot figcaption { text-align: center; display: flex; flex-direction: column; gap: 4px; padding: 0 6px; }
.shot figcaption b { font-size: 16px; }
.shot figcaption span { font-size: 13.5px; color: var(--text-muted); line-height: 1.7; }

@media (min-width: 700px) { .shot { width: 250px; } }

/* ================= Lightbox ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 8, 18, .86); backdrop-filter: blur(6px);
  padding: 24px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(92vw, 460px); max-height: calc(100vh - 64px); margin-top: 40px; width: auto; height: auto;
  border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox-close {
  position: absolute; top: 6px; inset-inline-start: 8px;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .26); }
html.no-scroll { overflow: hidden; }

/* الوضع المظلم: ظلال أخف */
:root[data-theme="dark"] .phone { box-shadow: 0 0 0 1.5px #3a3556, 0 22px 50px rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .screens { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }

/* ================= Cross-promo card ================= */
.cross-promo { padding: 12px 0 36px; }
.promo-card {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 26px; border-radius: var(--radius);
  background: var(--surface-alt); border: 1px solid var(--outline);
  text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.promo-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-2px); }
.promo-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--outline);
  display: flex; align-items: center; justify-content: center;
}
.promo-icon svg { width: 24px; height: 24px; stroke: var(--primary); }
.promo-text { flex: 1; min-width: 0; }
.promo-eyebrow { font-size: 12.5px; color: var(--primary); font-weight: 700; }
.promo-text h3 { font-size: 17px; margin: 4px 0 4px; color: var(--text); }
.promo-text p { font-size: 14px; color: var(--text-muted); margin: 0; }
.promo-arrow {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--outline); background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  transition: border-color .2s, color .2s;
}
.promo-arrow svg { width: 16px; height: 16px; }
.promo-card:hover .promo-arrow { border-color: var(--primary-light); color: var(--primary); }
@media (max-width: 640px) {
  .promo-card { flex-wrap: wrap; padding: 20px; }
  .promo-arrow { display: none; }
}

/* WardTube: بلا لقطات في الهيرو، وثلاث بطاقات تنزيل */
.hero-grid{grid-template-columns:1fr;text-align:center}
.hero-text{margin-inline:auto;max-width:720px}
.hero-meta{justify-content:center}
.dl-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.dl-size:empty{display:none}

/* رسوم الواجهة التوضيحية */
.phone-screen svg.mk{display:block;width:100%;height:auto}
.mk text{font-family:inherit}
.cross-promo .promo-card + .promo-card{margin-top:14px}
