:root {
  --bg: #100C1C;
  --surface: #17121F;
  --surface-2: #1E1830;
  --line: #2A2438;
  --text: #F0EDF7;
  --muted: #A79CC0;
  --accent: #7C5CBF;
  --accent-2: #C9B8F0;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent-2); }
a:hover { color: #fff; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Language: both texts are in the page, the html element says which one shows */
html[data-lang="en"] [lang="ru"], html[data-lang="ru"] [lang="en"] { display: none !important; }

/* Header */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(16, 12, 28, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: 0.2px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
nav.links { margin-left: auto; display: flex; align-items: center; gap: 18px; }
nav.links a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--text); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; padding: 4px 10px; cursor: pointer; }
html[data-lang="en"] .lang [data-set="en"], html[data-lang="ru"] .lang [data-set="ru"] { background: var(--accent); color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("bg.webp") center 30% / cover no-repeat;
  opacity: 0.16; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 70% at 75% 40%, rgba(124, 92, 191, 0.28), transparent 70%),
              linear-gradient(to bottom, transparent 60%, var(--bg));
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -0.5px; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.hero .logo { width: 100%; height: auto; max-width: 340px; justify-self: center; filter: drop-shadow(0 20px 50px rgba(124, 92, 191, 0.45)); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.btn:hover { background: #8c6fd0; color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); }

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: 30px; margin: 0 0 8px; }
section .sub { color: var(--muted); margin: 0 0 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.dl { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s; }
a.dl:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.dl .os { font-weight: 700; font-size: 18px; }
.dl .what { color: var(--muted); font-size: 13px; }
.dl .go { margin-top: auto; padding-top: 12px; color: var(--accent-2); font-weight: 600; font-size: 14px; }
.dl.soon { opacity: 0.55; }
.note { color: var(--muted); font-size: 14px; margin-top: 18px; }

/* Text pages */
.doc { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.doc h1 { font-size: 38px; margin: 0 0 6px; }
.doc .updated { color: var(--muted); margin: 0 0 32px; font-size: 14px; }
.doc h2 { font-size: 22px; margin: 32px 0 8px; }
.doc p, .doc li { color: #DCD6EA; }
.doc ul { padding-left: 22px; }
.doc code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 900px) {
  .downloads { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 48px; }
  .hero .logo { max-width: 180px; order: -1; justify-self: start; }
  nav.links a.hide-sm { display: none; }
}
@media (max-width: 420px) {
  .downloads { grid-template-columns: 1fr; }
}
