:root {
  --bg: #0F0A1E;
  --bg-soft: #1A1330;
  --surface: #FFFFFF;
  --primary: #6C47FF;
  --primary-dark: #5435DC;
  --primary-soft: rgba(108, 71, 255, 0.12);
  --accent: #A55EEA;
  --text: #1B1731;
  --text-soft: #5B5876;
  --text-dim: #9694A8;
  --border: #ECEAF5;
  --shadow: 0 10px 30px -10px rgba(108, 71, 255, 0.25);
  --radius: 18px;
  --gradient: linear-gradient(135deg, #6C47FF 0%, #A55EEA 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
}
.nav-brand img { width: 36px; height: 36px; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--text-soft);
  font-weight: 500;
  transition: color 0.15s;
  font-size: 15px;
}
.nav-links a:hover { color: var(--primary); }
.nav-cta {
  background: var(--gradient);
  color: white;
  padding: 9px 22px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); margin: 5px 0; transition: 0.3s;
}

/* ─── Hero ─── */
.hero {
  padding: 64px 0 100px;
  background:
    radial-gradient(ellipse at top right, rgba(165, 94, 234, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(108, 71, 255, 0.12) 0%, transparent 50%);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-soft);
  margin-bottom: 32px;
  max-width: 540px;
  line-height: 1.9;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px -10px rgba(108, 71, 255, 0.4);
}
.btn-outline {
  border-color: var(--border);
  background: white;
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.hero-visual {
  position: relative;
  text-align: center;
}
.hero-logo {
  width: clamp(220px, 32vw, 380px);
  height: auto;
  filter: drop-shadow(0 24px 60px rgba(108, 71, 255, 0.35));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ─── Sections ─── */
section { padding: 80px 0; }
.section-eyebrow {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--text);
}
.section-desc {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 640px;
  margin-bottom: 50px;
  line-height: 1.9;
}
.text-center { text-align: center; }
.text-center .section-desc { margin-inline: auto; }

/* ─── Features Grid ─── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 100%; height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 54px; height: 54px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px;
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.feature-card p {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.85;
}

/* ─── Services Carousel ─── */
.services-bg { background: linear-gradient(180deg, transparent 0%, rgba(108, 71, 255, 0.04) 100%); }
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.service-pill {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}
.service-pill:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.service-pill .dot {
  width: 10px; height: 10px;
  background: var(--gradient);
  border-radius: 50%;
  flex-shrink: 0;
}
.service-pill span {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

/* ─── Stats ─── */
.stats {
  background: var(--bg);
  color: white;
  border-radius: 24px;
  padding: 50px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(165, 94, 234, 0.2), transparent 60%);
}
.stat-item { position: relative; z-index: 1; }
.stat-num {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #d4c5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ─── CTA Section ─── */
.cta-section {
  text-align: center;
  background: var(--gradient);
  border-radius: 24px;
  padding: 64px 32px;
  color: white;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.15), transparent 50%);
}
.cta-section h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  margin-bottom: 14px;
  position: relative;
}
.cta-section p {
  font-size: 17px;
  margin-bottom: 28px;
  max-width: 560px;
  margin-inline: auto;
  opacity: 0.95;
  position: relative;
}
.cta-section .btn {
  background: white;
  color: var(--primary);
  position: relative;
}
/* ─── Download — Premium Card ────────────────────────── */
.download-card {
  position: relative;
  background: linear-gradient(135deg, #1A0F3D 0%, #2D1B5F 50%, #3F1B7A 100%);
  border-radius: 28px;
  padding: clamp(48px, 6vw, 80px) clamp(28px, 4vw, 56px);
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 80px -20px rgba(108, 71, 255, 0.35);
}
.download-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.download-orb-1 {
  width: 320px; height: 320px;
  background: #6C47FF;
  top: -100px; right: -80px;
}
.download-orb-2 {
  width: 280px; height: 280px;
  background: #FF6B9D;
  bottom: -120px; left: -60px;
}
.download-content {
  position: relative;
  z-index: 1;
  color: #fff;
}
.download-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.download-eyebrow svg { color: #FFD700; }
.download-card h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  color: #fff;
}
.download-card > .download-content > p {
  font-size: clamp(15px, 1.5vw, 18px);
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 36px;
  max-width: 580px;
  margin-inline: auto;
  line-height: 1.7;
}

/* الصف الرئيسي للأزرار */
.store-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 820px;
  margin: 0 auto 28px;
}
.store-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.store-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.store-pill:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 20px 40px -15px rgba(108, 71, 255, 0.6);
}
.store-pill:hover::before { opacity: 1; }
.store-pill:active { transform: translateY(-1px); }

.store-pill-icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  color: #fff;
}
.store-pill-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: start;
  min-width: 0;
}
.store-pill-small {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 3px;
  letter-spacing: 0.3px;
}
.store-pill-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* أيقونة التحميل المتحركة (أسهم تنزل) */
.store-pill-dl {
  width: 22px; height: 22px;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
  transition: color 0.25s;
}
.store-pill:hover .store-pill-dl {
  color: #fff;
  animation: dlBounce 1s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
@keyframes dlBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  40%      { transform: translateY(4px); opacity: 0.85; }
  60%      { transform: translateY(-2px); opacity: 1; }
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 8px;
}
.download-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.download-meta svg { color: rgba(255, 255, 255, 0.5); }

@media (max-width: 768px) {
  .store-row { grid-template-columns: 1fr; gap: 12px; max-width: 380px; }
  .download-meta { gap: 14px; font-size: 11px; }
}

/* ─── Footer ─── */
footer {
  background: var(--bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 28px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: white;
  margin-bottom: 14px;
}
.footer-brand img { width: 36px; height: 36px; }
.footer-about {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 320px;
}
.footer h4 {
  color: white;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14.5px;
  transition: color 0.15s;
}
.footer ul a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 26px;
  text-align: center;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom a {
  color: var(--accent);
  font-weight: 700;
  transition: color 0.15s;
}
.footer-bottom a:hover { color: #d4a8f5; }

/* ─── Article Pages (Privacy, Terms, FAQ) ─── */
.page-header {
  background: linear-gradient(180deg, var(--primary-soft) 0%, transparent 100%);
  padding: 56px 0 36px;
  text-align: center;
}
.page-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}
.page-header p {
  color: var(--text-soft);
  font-size: 16px;
}
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 50px 24px 80px;
}
.article h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 36px 0 14px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-soft);
}
.article h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text);
}
.article p, .article li {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.95;
  margin-bottom: 14px;
}
.article ul, .article ol { padding-right: 24px; margin-bottom: 18px; }
.article strong { color: var(--text); font-weight: 700; }
.article .updated {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 10px;
}

/* ─── FAQ Accordion ─── */
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--primary); }
.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
  transform: rotate(0deg);
}
.faq-item .answer {
  padding: 0 22px 18px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-line;
}

/* ─── Responsive ─── */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-grid .hero-buttons { justify-content: center; }
  .hero-grid p.lead { margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .nav-links { display: none; position: absolute; top: 100%; right: 0; left: 0;
    background: white; flex-direction: column; padding: 16px; gap: 14px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
