:root {
  --bg: #fbfbfd; --bg2: #f2f2f5; --card: #fff; --border: #e3e3e8; --text: #1d1d1f; --muted: #6e6e73;
  --accent: #ff9f0a; --blue: #0a84ff; --wave: #c9c9cf; --btn: #1d1d1f; --btn-text: #fff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.08);
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #161618; --bg2: #1e1e20; --card: #26262a; --border: #38383c; --text: #f5f5f7; --muted: #a1a1a6;
  --wave: #55555c; --btn: #f5f5f7; --btn-text: #1d1d1f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 40px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
a { color: var(--blue); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

html[lang=en] [lang=ru], html[lang=ru] [lang=en] { display: none !important; }
:root:not([data-theme=dark]) .dark-only, :root[data-theme=dark] .light-only { display: none !important; }

/* Nav */
nav { display: flex; align-items: center; gap: 8px; padding: 16px 0; }
nav .name { font-weight: 700; font-size: 18px; margin-right: auto; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
nav .name img { width: 28px; height: 28px; }
nav a.link, nav button {
  color: var(--muted); text-decoration: none; font: inherit; font-size: 14px; line-height: 20px;
  background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
nav a.link:hover, nav button:hover { color: var(--text); border-color: var(--border); }

/* Buttons */
.downloads { display: flex; gap: 10px; flex-wrap: wrap; }
.dl {
  display: inline-flex; align-items: center; gap: 12px; padding: 11px 20px 11px 16px; border-radius: 12px;
  text-decoration: none; background: var(--btn); color: var(--btn-text); font-weight: 600; font-size: 16px; line-height: 1.2;
}
.dl svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.dl small { display: block; font-weight: 400; opacity: .65; font-size: 12.5px; }
.dl.alt { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.dl:hover { opacity: .88; }
.note { color: var(--muted); font-size: 14px; }

/* App screenshot in a window frame */
.window { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--card); }
.window img { display: block; width: 100%; height: auto; }

/* Player */
.player { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px 16px; box-shadow: var(--shadow); }
.player .top { display: flex; align-items: center; gap: 14px; }
.player .title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.player .title small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.player .time { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.play {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; flex: none; padding: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center;
}
.play svg { width: 18px; height: 18px; fill: currentColor; }
.play:disabled { opacity: .5; cursor: progress; }
.wave { position: relative; overflow: hidden; height: 96px; margin: 14px 0 12px; cursor: pointer; user-select: none; }
.wave svg { display: block; width: 100%; height: 100%; }
.wave .bars rect { fill: var(--wave); }
.wave .bars.done rect { fill: var(--blue); }
.wave .clicks line { stroke: var(--blue); stroke-width: 2; opacity: .55; }
.wave.no-clicks .clicks { display: none; }
.wave .head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); opacity: .7; pointer-events: none; }
.wave .one {
  position: absolute; top: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; pointer-events: none;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px;
}
.wave .one::after { content: ""; position: absolute; left: 9px; top: 20px; width: 2px; height: 400px; background: var(--accent); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--bg2); border-radius: 11px; }
.seg button {
  font: inherit; font-size: 14px; padding: 7px 6px; border: none; border-radius: 8px; cursor: pointer;
  background: none; color: var(--muted); white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed=true] { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

@media (max-width: 760px) {
  nav a.link { display: none; }
  .seg { grid-template-columns: repeat(2, 1fr); }
  .dl { flex: 1 1 100%; }
}

/* Page */
h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 16px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 auto 24px; }
.hero { text-align: center; padding: 36px 0 28px; max-width: 760px; margin: 0 auto; }
.hero .downloads { justify-content: center; }
.hero .note { margin: 12px 0 0; }
#demo { max-width: 860px; margin: 0 auto; scroll-margin-top: 24px; }
#demo .wave { height: 120px; }
.shot { max-width: 1000px; margin: 64px auto 0; }

section { padding: 88px 0 0; }
h2 { font-size: clamp(28px, 3.6vw, 36px); letter-spacing: -0.015em; margin: 0 0 8px; text-align: center; }
.sub { color: var(--muted); text-align: center; margin: 0 auto 32px; max-width: 620px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; background: var(--bg2); color: var(--accent); font-weight: 700; }
.card.step .ico { background: var(--accent); color: #fff; border-radius: 50%; }
code { font: 13.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg2); padding: 1px 5px; border-radius: 5px; }

footer { padding: 88px 0 40px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 900px) {
  .grid, .grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid, .grid.two, .grid.four { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; }
  #demo .wave { height: 90px; }
  .shot { margin-top: 40px; }
  section { padding-top: 64px; }
}
