:root {
  --bg: #f7f7fb;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --line: #e6e7ef;
  --fg: #12131a;
  --muted: #5d6273;
  --accent: #5b5bf0;
  --accent-2: #8b5cf6;
  --accent-soft: #ececfe;
  --shadow: 0 10px 40px -12px rgba(30, 30, 80, 0.18);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b10;
    --bg-2: #0f1017;
    --panel: #13151d;
    --line: #232634;
    --fg: #eceef5;
    --muted: #9298ab;
    --accent: #8080ff;
    --accent-2: #a78bfa;
    --accent-soft: #1d1d3d;
    --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  direction: ltr;
  unicode-bidi: isolate;
}
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--fg); }
.brand img { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 20px; margin-inline-start: auto; font-size: 14.5px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.lang {
  appearance: none;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a8fa3' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E") no-repeat;
  background-position: 10px center;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 10px;
  padding: 7px 12px 7px 34px;
  font: inherit; font-size: 14px;
  cursor: pointer;
}
[dir='rtl'] .lang { background-position: calc(100% - 10px) center; padding: 7px 34px 7px 12px; }
.gh-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-size: 14px; font-weight: 600; }
.gh-btn svg { width: 18px; height: 18px; }
@media (max-width: 820px) { .nav-links { display: none; } .nav .wrap { gap: 12px; } .lang { margin-inline-start: auto; } }

/* hero */
.hero { position: relative; padding: 72px 0 40px; text-align: center; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto; height: 620px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 28%, transparent), transparent),
    radial-gradient(closest-side at 70% 40%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent);
  filter: blur(10px);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 5px 14px; font-size: 13.5px; color: var(--muted);
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.hero h1 {
  font-size: clamp(36px, 6.4vw, 66px); line-height: 1.08; letter-spacing: -0.03em; margin: 22px 0 18px; font-weight: 850;
  background: linear-gradient(180deg, var(--fg), color-mix(in srgb, var(--fg) 70%, var(--accent)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[dir='rtl'] .hero h1 { letter-spacing: 0; line-height: 1.3; }
.hero p.lead { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 680px; margin: 0 auto 30px; }
.buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px;
  font-weight: 700; font-size: 15px; border: 1px solid transparent; transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 24px -8px var(--accent); }
.btn.ghost { background: var(--panel); color: var(--fg); border-color: var(--line); }
.btn svg { width: 18px; height: 18px; }
.hero small { display: block; margin-top: 16px; color: var(--muted); font-size: 13.5px; }

.frame {
  margin: 54px auto 0; max-width: 1040px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow);
}
.frame-bar { display: flex; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); direction: ltr; }
.frame-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.frame-bar span:nth-child(1) { background: #ff5f57; } .frame-bar span:nth-child(2) { background: #febc2e; } .frame-bar span:nth-child(3) { background: #28c840; }

/* sections */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 12px; }
[dir='rtl'] .section-head h2 { letter-spacing: 0; line-height: 1.45; }
.section-head p { color: var(--muted); margin: 0; }
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.provider {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; font-weight: 600; font-size: 15px;
}
.provider .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .15s, transform .15s; }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.feature .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ico svg { width: 21px; height: 21px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.gallery-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.gallery-tabs button {
  font: inherit; font-size: 14px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
}
.gallery-tabs button[aria-selected='true'] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.gallery .frame { margin-top: 0; }
.gallery img { display: none; }
.gallery img.on { display: block; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800;
}
.step h3 { margin: 0 0 4px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

.install { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 0 0 12px; font-size: 17px; }
.card ol { margin: 0; padding-inline-start: 22px; color: var(--muted); }
.card li { margin: 6px 0; }
.tip { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); font-size: 14.5px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

.cta {
  text-align: center; border-radius: 26px; padding: 56px 24px; margin: 0 auto; max-width: 1040px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.cta h2 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 36px); }
.cta p { margin: 0 0 24px; opacity: .85; }
.cta .btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.cta .btn.white { background: #fff; color: #3b2fd0; }

footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
footer .brand { font-size: 15px; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-inline-start: auto; }
footer a { color: var(--muted); }

/* privacy page */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 20px 40px; }
.doc h1 { font-size: 36px; margin: 8px 0 4px; letter-spacing: -0.02em; }
.doc .muted { color: var(--muted); }
.doc h2 { font-size: 20px; margin-top: 36px; }
.doc p, .doc li { color: color-mix(in srgb, var(--fg) 88%, var(--muted)); }
