/* Страница загрузки Гроссбуха (scripts/download-page.mjs). Палитра — из темы приложения (packages/ui/src/theme.css):
   нейтральные поверхности и один синий; тёмная тема — свои ступени. Шрифт — системный: кириллица без сторонних
   запросов (страница о том, что данные никуда не уходят, не тянет шрифты с чужих серверов). */
:root {
  --surface: #fcfcfb;
  --sunken: #f4f3ef;
  --raised: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #6f6d68;
  --line: #e1e0d9;
  --accent: #2a78d6;
  /* заливка главной кнопки: белый текст на ней ≥ 4.5:1 (сам --accent даёт 4.4) */
  --accent-fill: #2470cc;
  --accent-fill-hover: #1f62b8;
  --accent-soft: rgb(42 120 214 / 0.1);
  --accent-ink: #1f5fae;
  --good: #0a8a0a;
  --shadow: 0 1px 2px rgb(16 29 54 / 0.06), 0 24px 60px -24px rgb(16 29 54 / 0.28);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #141413;
    --sunken: #1a1a19;
    --raised: #222220;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --ink-3: #9a988f;
    --line: #2f2f2c;
    --accent: #3987e5;
    --accent-fill: #2f6fd0;
    --accent-fill-hover: #2466c2;
    --accent-soft: rgb(57 135 229 / 0.16);
    --accent-ink: #7fb2f0;
    --good: #3fbf3f;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 30px 80px -30px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* шапка */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 10px 12px; border-radius: 8px; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--accent-soft); color: var(--ink); }

/* первый экран */
.hero { text-align: center; padding: 56px 0 40px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2); background: var(--sunken); border: 1px solid var(--line); text-decoration: none; }
.badge b { color: var(--accent-ink); font-weight: 600; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.06; letter-spacing: -0.03em; margin: 22px auto 18px; max-width: 14ch; text-wrap: balance; }
.lead { font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-2); max-width: 40em; margin: 0 auto; text-wrap: pretty; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, transform .15s; }
.btn small { font-weight: 450; opacity: .8; }
.btn.primary { background: var(--accent-fill); color: #fff; }
.btn.primary:hover { background: var(--accent-fill-hover); }
.btn.ghost { background: var(--raised); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }

/* снимок окна */
.shot { margin: 32px auto 0; max-width: 1040px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #1a1a19; }
.shot .bar { display: flex; gap: 8px; padding: 12px 14px; background: #222220; border-bottom: 1px solid #2c2c2a; }
.shot .bar i { width: 12px; height: 12px; border-radius: 50%; background: #3a3a37; }
.shot img { display: block; width: 100%; height: auto; }

/* обещания */
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 48px 0 0; padding: 0; list-style: none; }
.promises li { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--sunken); color: var(--ink-2); font-size: 15px; }
.promises .icon { color: var(--good); }

/* разделы */
section { padding: 72px 0 0; scroll-margin-top: 16px; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
.sub { color: var(--ink-2); margin: 0 0 32px; max-width: 46em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 24px; border-radius: var(--radius); background: var(--raised); border: 1px solid var(--line); }
.card h3 { font-size: 17px; margin: 14px 0 6px; }
.card > h3:first-child { margin-top: 0; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }

/* установка */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.tab .icon { width: 18px; height: 18px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* вкладки лежат друг на друге: высота карточки — по самой высокой, при переключении ничего не прыгает */
.panels { display: grid; margin-top: 20px; }
.panel { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-content: start; }
.panel[aria-hidden] { visibility: hidden; }
.panel h3 { margin: 0; }
.card .phone { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 15px; }
.card .phone[hidden] { display: none; }
.phone .icon { color: var(--accent-ink); margin-top: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cmd { position: relative; margin: 16px 0 12px; padding: 10px 44px 10px 16px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.cmd code { display: block; overflow-wrap: anywhere; line-height: 1.5; font-size: 13px; }
/* значок «копировать» в правом верхнем углу команды; после нажатия на 1,6 с — галочка */
.copy { position: absolute; top: 6px; right: 6px; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); cursor: pointer; transition: background-color .15s, color .15s; }
.copy:hover { background: var(--raised); color: var(--ink); }
.copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.copy .icon { grid-area: 1 / 1; width: 16px; height: 16px; }
.copy .icon:last-child, .copy.done .icon:first-child { visibility: hidden; }
.copy.done .icon:last-child { visibility: visible; }
.copy.done { color: var(--good); }
.note { font-size: 14px; color: var(--ink-3); margin: 10px 0 0; }
.note code { overflow-wrap: anywhere; font-size: 13px; background: var(--sunken); padding: 1px 5px; border-radius: 5px; color: var(--ink-2); }
.downloads { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 14px; }
.downloads .btn { padding: 12px 18px; }
.downloads .btn span { flex: 1; }
.btn small { white-space: nowrap; }

/* что нового */
.notes { padding: 8px 28px 24px; }
.notes h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 22px 0 10px; }
.notes ul { margin: 0; padding-left: 20px; }
.notes li { margin: 6px 0; }
.notes li ul { margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.notes code { overflow-wrap: anywhere; font-size: 14px; background: var(--sunken); padding: 1px 5px; border-radius: 5px; }

footer { margin: 80px 0 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 14px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .promises { grid-template-columns: repeat(2, 1fr); }
  .panel { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .hero { padding: 32px 0 8px; }
  section { padding-top: 48px; }
  .promises { gap: 8px; margin-top: 32px; }
  .grid, .promises { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .notes { padding: 4px 18px 18px; }
  .cmd { padding-left: 14px; }
  .tabs { display: flex; }
  .tab { flex: 1; justify-content: center; gap: 6px; padding: 6px 4px; font-size: 14px; }
  .tab .icon { width: 16px; height: 16px; }
  .downloads .btn { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
