:root {
  --bg: #070b14;
  --bg2: #0d1424;
  --ink: #eef2f8;
  --soft: #a6b0c3;
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-hi: rgba(255, 255, 255, 0.14);
  --accent: #8fb8ff;
  --radius: 22px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f6fa;
  --bg2: #e8edf5;
  --ink: #0d1424;
  --soft: #4a5468;
  --line: rgba(13, 20, 36, 0.12);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --accent: #2f6be0;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6fa;
    --bg2: #e8edf5;
    --ink: #0d1424;
    --soft: #4a5468;
    --line: rgba(13, 20, 36, 0.12);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-hi: rgba(255, 255, 255, 0.95);
    --accent: #2f6be0;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, var(--bg2), var(--bg) 70%) fixed, var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }

a { color: inherit; }

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}

.lang {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
}

.lang:hover { background: var(--glass-hi); }

main, .foot, .doc {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 56px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.25; }

.lead { margin: 0 0 28px; color: var(--soft); font-size: 18px; max-width: 34em; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.btn.ghost {
  background: var(--glass);
  color: var(--ink);
  border: 1px solid var(--line);
}

.meta { margin: 18px 0 0; color: var(--soft); font-size: 14px; }

.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  aspect-ratio: 16 / 9;
  background: var(--bg2);
}

.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 0 64px;
}

.features article {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.features h3 { margin: 0 0 6px; font-size: 18px; }
.features p { margin: 0; color: var(--soft); font-size: 15.5px; }

.install { padding: 8px 0 72px; }

.install h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 24px; letter-spacing: -0.01em; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  counter-reset: s;
}

.steps li {
  counter-increment: s;
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px 22px 72px;
}

[dir="rtl"] .steps li { padding: 22px 72px 22px 24px; }

.steps li::before {
  content: counter(s);
  position: absolute;
  inset-inline-start: 22px;
  top: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--glass-hi);
  border: 1px solid var(--line);
}

.steps li:last-child:nth-child(odd) { grid-column: 1 / -1; }

.steps h4 { margin: 0 0 4px; font-size: 17px; }
.steps p { margin: 0; color: var(--soft); font-size: 15.5px; }

.url {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--glass-hi);
  border: 1px solid var(--line);
  font: 600 16px/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  white-space: nowrap;
}

.note { color: var(--soft); font-size: 15px; margin: 22px 0 0; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 14px;
}

.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot p { flex-basis: 100%; margin: 6px 0 0; }

.doc { padding-top: 48px; padding-bottom: 64px; max-width: 760px; }
.doc h1 { font-size: clamp(30px, 4vw, 42px); }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--soft); }
.doc .updated { margin-top: -6px; font-size: 14px; }
.doc [data-show] { display: none; }
html[lang="en"] .doc [data-show="en"],
html[lang="ar"] .doc [data-show="ar"] { display: block; }

@media (max-width: 480px) {
  .steps li { padding: 20px 18px 20px 62px; }
  [dir="rtl"] .steps li { padding: 20px 62px 20px 18px; }
  .steps li::before { inset-inline-start: 16px; }
  .url { font-size: 13.5px; padding: 7px 10px; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

#plus .url { display: block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 14.5px; user-select: all; }
#plus .url + p { margin-top: 14px; }
