:root {
  --primary: #0f5b44;
  --primary-2: #1f7a5c;
  --accent: #e0b563;
  --ink: #0f1720;
  --muted: #52606f;
  --surface: #f7f8fb;
  --card: rgba(255, 255, 255, 0.72);
  --border: rgba(14, 27, 39, 0.1);
  --shadow: 0 20px 45px rgba(13, 23, 33, 0.12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: min(1120px, 92vw);
}

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

body {
  min-height: 100vh;
  font-family: "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(224, 181, 99, 0.24), transparent 35%),
    radial-gradient(circle at 88% 90%, rgba(31, 122, 92, 0.16), transparent 35%),
    linear-gradient(160deg, #f8fafc 0%, #f3f7f5 42%, #f7f8fb 100%);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
.page { width: var(--container); margin: 0 auto; padding: 24px 0 40px; }

.navbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.logo img { width: 36px; height: 36px; }

.nav-links { display: flex; align-items: center; gap: 18px; color: var(--muted); font-weight: 500; }
.nav-links a { padding: 6px 10px; border-radius: 999px; transition: 0.25s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: rgba(15, 91, 68, 0.11); }

.lang-switcher select {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 12px;
  font: inherit;
  min-width: 110px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(140deg, rgba(15, 91, 68, 0.96), rgba(31, 122, 92, 0.9));
  color: #effaf4;
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 62px);
  margin-bottom: 24px;
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  top: -60px;
  right: -30px;
  background: radial-gradient(circle, rgba(224, 181, 99, 0.42), transparent 68%);
}

.eyebrow { display: inline-block; font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(239, 250, 244, 0.84); }
.hero h1 { margin: 10px 0 12px; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.1; }
.hero p { margin: 0; max-width: 65ch; color: rgba(239, 250, 244, 0.94); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.9); box-shadow: 0 8px 26px rgba(8, 19, 32, 0.06); padding: 22px; }
.about-card { grid-column: span 7; }
.features-card { grid-column: span 5; }
.card h2, .card h3 { margin: 0 0 10px; }
.card p { margin: 0; color: #354354; }
.features { margin: 10px 0 0; padding-inline-start: 18px; color: #334152; }
.features li { margin: 8px 0; }

.downloads { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 148px; border-radius: 999px; border: 1px solid rgba(239, 250, 244, 0.44); background: rgba(255, 255, 255, 0.12); color: #fff; padding: 11px 16px; font-weight: 600; transition: 0.25s ease; }
.store-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.2); }

.legal { display: grid; gap: 14px; }
.legal section { border: 1px solid var(--border); border-radius: var(--radius-md); background: #ffffffcc; padding: 16px; }
.legal h3 { margin: 0 0 8px; }
.meta { color: var(--muted); margin-bottom: 14px; font-size: 0.95rem; }

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  padding: 18px 4px 12px;
  color: #4d5b68;
}
.footer-links { display: inline-flex; gap: 14px; }
.footer-links a { opacity: 0.9; }
.footer-links a:hover { opacity: 1; }

[dir="rtl"] body { font-family: "Noto Sans Arabic", "Geeza Pro", "Tahoma", sans-serif; }
[dir="rtl"] .navbar { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }

.fade-in { animation: rise 0.7s ease both; }
.fade-delay-1 { animation-delay: 0.08s; }
.fade-delay-2 { animation-delay: 0.16s; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .about-card, .features-card { grid-column: span 12; }
  .navbar { flex-wrap: wrap; justify-content: center; }
  .nav-links { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .navbar {
    top: 8px;
    margin-bottom: 22px;
  }

  .page { width: min(96vw, 1120px); padding-top: 14px; }
  .hero { padding: 24px 20px; }
  .card { padding: 18px; }

  .lang-switcher select {
    min-width: 88px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .downloads {
    gap: 10px;
  }

  .store-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  .hero::after {
    width: 150px;
    height: 150px;
    top: -46px;
    right: -34px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 375px) {
  .navbar {
    padding: 10px 12px;
    gap: 10px;
  }

  .nav-links {
    gap: 12px;
    font-size: 0.92rem;
  }

  .eyebrow {
    letter-spacing: 0.1em;
    font-size: 0.76rem;
  }

  .downloads {
    flex-direction: column;
  }

  .store-btn {
    width: 100%;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecf1f6;
    --muted: #b8c4cf;
    --surface: #0f141a;
    --card: rgba(19, 25, 32, 0.76);
    --border: rgba(236, 241, 246, 0.12);
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  }

  body {
    background:
      radial-gradient(circle at 8% 8%, rgba(224, 181, 99, 0.17), transparent 32%),
      radial-gradient(circle at 90% 92%, rgba(31, 122, 92, 0.2), transparent 34%),
      linear-gradient(160deg, #070b0f 0%, #0d141b 48%, #101922 100%);
  }

  .lang-switcher select, .legal section, .card { background: rgba(21, 29, 38, 0.9); color: var(--ink); }
  .card p, .features, footer, .meta { color: #d0dae4; }
}
