:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --text: #1b2430;
  --text-body: #333d49;
  --muted: #64707e;
  --accent: #4a7fd0;
  --accent-soft: #dceafb;
  --border: #e6ecf3;
  --header-bg: rgba(255, 255, 255, 0.9);
  --radius: 16px;
  --maxw: 1000px;
}

/* Dark theme: follows the visitor's system preference. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --bg-soft: #171e2c;
    --text: #eef2f7;
    --text-body: #c6d0dd;
    --muted: #93a0b2;
    --accent: #6fa2e8;
    --accent-soft: #1d2c46;
    --border: #27313f;
    --header-bg: rgba(15, 20, 32, 0.85);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Language switching: show only the active language. */
html[data-lang="ru"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-ru { display: none !important; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 18px;
  vertical-align: middle;
}
.lang-switch button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.lang-switch button.active { background: var(--accent); color: #fff; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-header nav a { margin-left: 20px; color: var(--muted); font-size: 15px; }

/* Hero */
.hero {
  text-align: center;
  padding: 72px 24px 64px;
  background: radial-gradient(1200px 400px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.hero img.app-icon {
  width: 108px; height: 108px;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(40, 80, 150, 0.18);
}
.hero h1 { font-size: 40px; margin: 22px 0 6px; letter-spacing: -0.5px; }
.hero .tagline { font-size: 21px; font-weight: 600; margin: 0 0 12px; }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 560px; margin: 0 auto; }
.platforms { margin-top: 22px; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0.3px; }

/* Sections */
section { padding: 60px 0; }
/* Content sections carry .wrap, whose horizontal padding would otherwise
   cancel the section's vertical padding, so restore it more specifically. */
main section.wrap { padding-top: 64px; padding-bottom: 52px; }
h2 { font-size: 26px; text-align: center; margin: 0 0 36px; letter-spacing: -0.3px; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Screenshots */
.shots {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.shots img {
  width: 260px;
  max-width: 70vw;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(30, 60, 110, 0.16);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 36px 0;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.site-footer nav a { margin-left: 18px; }

/* Legal pages */
.legal { padding: 48px 0 72px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: 32px; margin: 0 0 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.legal h2 { text-align: left; font-size: 20px; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--text-body); font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.back { display: inline-block; margin-bottom: 24px; font-size: 15px; }

@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero .tagline { font-size: 18px; }
  .site-header nav a { margin-left: 14px; }
}
