:root {
  --bg: #0b0e14;
  --bg-soft: #121722;
  --card: #151b28;
  --card-2: #1a2130;
  --line: #232c3d;
  --text: #e7ecf5;
  --muted: #9aa7bd;
  --brand: #ff4d4d;
  --brand-2: #ff8a3d;
  --accent: #4da3ff;
  --radius: 16px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.rtl {
  direction: rtl;
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  inset-inline-start: 12px;
  top: 12px;
  z-index: 99;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  background: var(--card);
  padding: 10px 14px;
  border-radius: 10px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 14, 20, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 20px; margin-inline-start: auto; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); filter: brightness(1.12); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 77, 77, 0.28);
}
.btn-sm { padding: 9px 14px; font-size: 14px; }

.hero {
  padding: 76px 0 40px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(255, 77, 77, 0.16), transparent 60%),
    radial-gradient(820px 420px at 92% 0%, rgba(77, 163, 255, 0.14), transparent 60%);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
}
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.08; margin: 20px 0 14px; letter-spacing: -0.5px; }
.hero h1 span {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lede { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 640px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.cta-note { color: var(--muted); font-size: 13.5px; }
.shot {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}

section { padding: 68px 0; border-top: 1px solid var(--line); }
section h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 10px; letter-spacing: -0.3px; }
.sub { color: var(--muted); margin: 0 0 34px; max-width: 680px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 12px 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.6px; }
.ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--card-2);
  border: 1px solid var(--line);
  font-size: 20px;
}
.new { border-color: rgba(255, 138, 61, 0.4); background: linear-gradient(180deg, rgba(255, 138, 61, 0.08), var(--card)); }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--brand-2);
  border: 1px solid rgba(255, 138, 61, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
  margin-inline-start: 8px;
  vertical-align: middle;
}

.dl-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.dl { display: flex; flex-direction: column; gap: 14px; }
.dl .os { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.dl ul { margin: 0; padding-inline-start: 20px; color: var(--muted); font-size: 14.4px; }
.dl .btn { width: 100%; }
.dl-alt { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-alt .btn { width: auto; flex: 1 1 120px; }
.hashes { margin-top: 10px; font-size: 13px; color: var(--muted); }

.steps { counter-reset: step; display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px 18px 16px 60px;
}
body.rtl .steps li { padding: 16px 60px 16px 18px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 18px;
  top: 15px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--card); }
.gallery figcaption { padding: 10px 13px; color: var(--muted); font-size: 13.4px; border-top: 1px solid var(--line); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 460px; }
th, td { text-align: start; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14.6px; }
th { background: var(--card-2); font-size: 13px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13.4px; }

details { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 4px 18px; margin-bottom: 12px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: inline-end; color: var(--muted); font-weight: 700; }
details[open] summary::after { content: "\2013"; }
details p { margin: 0 0 16px; color: var(--muted); font-size: 14.8px; }

code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13.4px; }
pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; direction: ltr; text-align: left; }
pre code { border: 0; background: none; padding: 0; }

footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.note { margin-top: 18px; font-size: 13px; opacity: 0.75; max-width: 760px; }

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    inset-inline: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .hero { padding-top: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
