:root {
  color-scheme: light dark;
  --bg: #0b1220;
  --bg-soft: #111a2e;
  --card: rgba(255, 255, 255, 0.04);
  --text: #f4f7fb;
  --muted: #9aa8bf;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(59, 130, 246, 0.22), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: inherit;
}

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  padding: 1rem 0 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 2.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  max-width: 38rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.125rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.button-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.875rem;
}

.hero-card li {
  display: grid;
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

.hero-card strong {
  font-size: 0.95rem;
}

.hero-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.features,
.faq {
  padding: 1rem 0 3rem;
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.feature-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.feature,
.faq-item {
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

.feature h3,
.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.feature p,
.faq-item p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

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

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

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.lang-switch a[aria-current="true"] {
  color: var(--text);
  font-weight: 700;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .feature-grid,
  .faq-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fc;
    --bg-soft: #eef2f8;
    --card: #fff;
    --text: #0f172a;
    --muted: #5b6475;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  }

  body {
    background:
      radial-gradient(1200px 600px at 100% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
      radial-gradient(900px 500px at 0% 0%, rgba(34, 211, 238, 0.08), transparent 55%),
      var(--bg);
  }

  .button-secondary,
  .button-ghost {
    background: #fff;
  }
}

/* Download page (/download/) — shared shell with landing */
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.shell { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.topbar { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-cta {
  text-decoration: none;
  font-weight: 700;
  color: var(--accent);
}
.install-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}
.install-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #2563eb); color: #fff; }
.btn-secondary,
.btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: var(--border); }
.footer { margin-top: auto; padding: 2rem 0; color: var(--muted); border-top: 1px solid var(--border); }
.note a { color: var(--accent); }
