:root {
  --ink: #0B1020; --panel: #131A2E; --card: #1A2238; --line: rgba(255,255,255,0.12);
  --text: #fff; --muted: rgba(255,255,255,0.64);
  --mint: #2DD4BF; --blue: #3B82F6; --indigo: #6366F1;
  --grad: linear-gradient(120deg, var(--mint), var(--blue) 50%, var(--indigo));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 17px/1.55 "Inter", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.glow { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .35; pointer-events: none; z-index: -1; }
.glow.a { width: 520px; height: 520px; background: var(--blue); top: -160px; left: -140px; animation: drift 14s ease-in-out infinite alternate; }
.glow.b { width: 420px; height: 420px; background: var(--mint); top: 30%; right: -160px; animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 80px) scale(1.1); } }

nav { display: flex; align-items: center; gap: 28px; padding: 18px 0; }
nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; color: #fff; letter-spacing: -0.5px; }
nav .brand img { width: 36px; height: 36px; }
nav .spacer { flex: 1; }
nav a.link { color: var(--muted); font-weight: 600; font-size: 15px; }
nav a.link:hover, nav .brand:hover { color: #fff; text-decoration: none; }
/* The language switch sits apart from the page links, after a thin divider. */
nav a.link[lang] { padding-inline-start: 28px; border-inline-start: 1px solid var(--line); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 16px;
  font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 10px 30px rgba(59,130,246,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 16px 40px rgba(59,130,246,.45); }
.btn.ghost { background: var(--card); box-shadow: none; border: 1px solid var(--line); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
/* Store buttons: the App Store one is live; "soon" ones are greyed out until their store has the app. */
.btn.store.soon { background: var(--card); color: var(--muted); border: 1px solid var(--line); box-shadow: none; cursor: not-allowed; }
.btn.store.soon:hover { transform: none; }
.btn.store em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: var(--mint); }
[dir="rtl"] .btn.store em { letter-spacing: 0; font-size: 12px; }
.video video { pointer-events: none; }

.hero { display: grid; grid-template-columns: 0.85fr 1.35fr; gap: 40px; align-items: center; padding: 48px 0 72px; }
/* The first screen shows the hero alone; the next section starts below the fold. */
.hero { min-height: calc(100vh - 72px); min-height: calc(100svh - 72px); align-content: center; }
/* Phones: the menu wraps under the name, so the nav is about 120px tall. */
@media (max-width: 600px) { .hero { min-height: calc(100vh - 120px); min-height: calc(100svh - 120px); } }
.hero h1 { font-size: clamp(42px, 5vw, 68px); line-height: 1.02; letter-spacing: -2.5px; margin: 0 0 18px; font-weight: 900; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 520px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
/* The store buttons, one under the other, as wide as the text above them: App Store, then Google Play (coming soon). */
.hero .ctas { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 520px; }
.hero > div { min-width: 0; }
.hero .ctas .store { justify-content: center; padding: 12px 18px; font-size: 18px; white-space: nowrap; }
.hero .ctas .store svg { width: 26px; height: 26px; flex-shrink: 0; }
.hero .ctas .store .label { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.hero .ctas .store .label small { font-size: 11px; font-weight: 600; opacity: .85; }
.video { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 80px rgba(0,0,0,.6); background: #000; aspect-ratio: 16 / 9; }
.video video { width: 100%; height: 100%; display: block; object-fit: cover; }

section { padding: 64px 0; }
section h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -1.5px; margin: 0 0 10px; font-weight: 900; }
section p.sub { color: var(--muted); margin: 0 0 36px; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px;
  transition: transform .2s ease, border-color .2s ease;
  opacity: 0; transform: translateY(24px);
}
.card.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.card:hover { border-color: rgba(255,255,255,.28); }
.card .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { position: relative; padding: 24px 24px 24px 76px; background: var(--panel); border-radius: 22px; border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 22px; top: 22px; width: 38px; height: 38px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 900; display: grid; place-items: center; }
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.open { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 40px; }
.open ul { margin: 0; padding: 0; list-style: none; }
.open li { padding: 8px 0 8px 30px; position: relative; color: var(--muted); }
.open li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 900; }
code, pre { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 14px; }
pre { background: #000; border: 1px solid var(--line); border-radius: 14px; padding: 16px; overflow-x: auto; margin: 0; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
footer .spacer { flex: 1; }

.doc { max-width: 760px; padding: 24px 0 64px; }
.doc h1 { font-size: 44px; letter-spacing: -1.5px; margin: 12px 0 8px; }
.doc h2 { margin-top: 36px; }
.doc p, .doc li { color: rgba(255,255,255,.82); }
.doc .updated { color: var(--muted); }

@media (max-width: 900px) {
  /* Phones and small screens: everything centred, the video right under the headline. */
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; text-align: center; }
  .hero .hero-text { display: contents; }
  .hero h1 { order: 1; margin: 0; }
  .hero .video { order: 2; }
  .hero p.lead { order: 3; margin: 4px auto 0; }
  .hero .ctas { order: 4; width: 100%; margin-inline: auto; }
  .grid, .steps { grid-template-columns: 1fr 1fr; }
  .open { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 600px) {
  .grid, .steps { grid-template-columns: 1fr; }
  nav a.link.hide { display: none; }
  /* On phones the menu goes on its own line under the name, so nothing is cut off. */
  nav { flex-wrap: wrap; gap: 12px 18px; }
  nav .spacer { flex-basis: 100%; height: 0; }
  /* Centred, as the rest of the page on phones. */
  nav { justify-content: center; }
  nav a.link[lang] { padding-inline-start: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .card { opacity: 1; transform: none; }
}

/* Grid children may shrink below their content (long code lines scroll instead). */
.hero > *, .open > *, .grid > *, .steps > * { min-width: 0; }
@media (max-width: 600px) {
  .hero h1 { font-size: 40px; letter-spacing: -1.5px; }
  .hero p.lead { font-size: 18px; }
  .open { padding: 22px; }
  section { padding: 44px 0; }
}

/* Arabic pages (ar/): right to left, the system Arabic font, no negative tracking. */
[dir="rtl"] body { font-family: -apple-system, "SF Arabic", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] .hero h1, [dir="rtl"] section h2, [dir="rtl"] .doc h1, [dir="rtl"] nav .brand { letter-spacing: 0; line-height: 1.25; }
[dir="rtl"] .step { padding: 24px 76px 24px 24px; }
[dir="rtl"] .step::before { left: auto; right: 22px; }
[dir="rtl"] .open li { padding: 8px 30px 8px 0; }
[dir="rtl"] .open li::before { left: auto; right: 0; }
[dir="rtl"] .glow.a { left: auto; right: -140px; }
[dir="rtl"] .glow.b { right: auto; left: -160px; }
@media (max-width: 520px) {
  .hero .ctas .store { padding: 12px 10px; }
}

/* Support questions: tap a question to open its answer. */
.doc details { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); margin: 10px 0; }
.doc details summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.doc details summary::-webkit-details-marker { display: none; }
.doc details summary::after { content: "+"; margin-inline-start: auto; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s ease; }
.doc details[open] summary::after { transform: rotate(45deg); color: #fff; }
.doc details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }
