:root {
  --bg: #0b0e14;
  --bg-elevated: rgba(21, 25, 34, 0.72);
  --bg-card-hover: rgba(28, 34, 46, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(16, 185, 129, 0.35);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-secondary: #38bdf8;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'Cairo', 'Inter', sans-serif;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(255, 255, 255, 0.96);
  --border: rgba(15, 23, 42, 0.09);
  --border-accent: rgba(16, 185, 129, 0.4);
  --text: #0f172a;
  --text-muted: #475569;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

html[dir="rtl"] body {
  font-family: var(--font-ar);
}

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

.svg-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b0e14;
  display: grid;
  place-items: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preloader-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.preloader-pulse {
  position: absolute;
  width: 104px;
  height: 104px;
  border-radius: 28px;
  border: 2px solid rgba(16, 185, 129, 0.45);
  animation: pulseRing 1.4s ease-out infinite;
}

.preloader-logo {
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.25);
}

.preloader-brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f3f4f6;
}

.preloader-bar {
  width: 140px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.preloader-bar-fill {
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 999px;
  animation: loadingSlide 0.9s ease-in-out infinite alternate;
}

@keyframes pulseRing {
  0% { transform: scale(0.92); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}

@keyframes loadingSlide {
  0% { transform: translateX(-30%); }
  100% { transform: translateX(150%); }
}

/* Ambient Background */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
}

.bg-glow-1 {
  width: 520px;
  height: 520px;
  background: var(--accent);
  top: -160px;
  inset-inline-start: -120px;
}

.bg-glow-2 {
  width: 460px;
  height: 460px;
  background: var(--accent-secondary);
  bottom: -140px;
  inset-inline-end: -100px;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 80%);
  opacity: 0.45;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-icon {
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
  padding-inline: 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  height: 38px;
  padding-inline: 0.95rem;
  font-size: 0.88rem;
}

.btn-lg {
  height: 48px;
  padding-inline: 1.4rem;
  font-size: 0.98rem;
}

.btn-primary {
  background: var(--accent);
  color: #04130d;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--border-accent);
}

/* Glass Card */
.glass-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: border-color 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
}

/* Hero */
.hero {
  padding: 5.5rem 0 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 3rem;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.15rem;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-card {
  position: relative;
  padding: 2.75rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  overflow: hidden;
}

.hero-card-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-app-icon {
  position: relative;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hero-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.meta-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feature-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.feature-card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step-card {
  padding: 1.85rem;
}

.step-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Specs */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.5rem;
  gap: 1rem;
}

.spec-item {
  padding: 0.75rem 1rem;
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.spec-item:last-child {
  border-inline-end: none;
}

.spec-label {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.spec-value {
  font-size: 1.05rem;
  font-weight: 700;
}

/* CTA */
.cta-box {
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-box h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 800;
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-brand img {
  border-radius: 7px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner,
  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spec-item {
    border-inline-end: none;
    border-bottom: 1px solid var(--border);
  }

  .spec-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .nav-links {
    display: none;
  }

  .feature-card-wide {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .specs-grid {
    grid-template-columns: 1fr;
  }

  .spec-item:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .spec-item:last-child {
    border-bottom: none;
  }

  .nav-dl {
    display: none;
  }
}
