/* Говорок — сайт. Набор значений выбран, а не накоплен:
   кегли 14/16/19/24/36/56(72), радиусы 10/16/28, тени 2, длительности 3, одна кривая. */

:root {
  --bg: #0D0D11;          /* плоскость страницы — фон значка */
  --raised: #17171F;      /* поверхности: окна, поля */
  --line: #2B2B36;        /* линейки и рамки */
  --text: #EDEDF2;        /* чернила */
  --quiet: #A3A3B2;       /* второстепенный текст, 7.6:1 на фоне */
  --voice: #FF4D3D;       /* идёт запись — как в приложении */
  --cyan: #22D3EE;
  --pink: #E11FA6;
  --brand: linear-gradient(120deg, var(--cyan), var(--pink));
  --ok: #34D07F;
  --danger: #FF6B5E;

  --r-s: 10px; --r-m: 16px; --r-l: 28px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px rgba(0,0,0,.35);
  --shadow-2: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 80px rgba(0,0,0,.55);

  --t-micro: 140ms; --t-move: 280ms; --t-enter: 600ms;
  --ease: cubic-bezier(.16,1,.3,1);

  --wrap: 1120px;
  --gutter: 24px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--cyan); }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan); border-radius: 6px; }
::selection { background: rgba(34,211,238,.35); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--raised); padding: 10px 14px; border-radius: var(--r-s); z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── шкала ────────────────────────────────────────────── */
h1, h2, h3 { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif; font-weight: 700; }
.t-hero { font-size: 56px; line-height: 1.04; letter-spacing: -0.035em; }
.t-xl   { font-size: 36px; line-height: 1.14; letter-spacing: -0.025em; }
.t-l    { font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 650; }
.t-m    { font-size: 19px; line-height: 1.45; }
.t-s    { font-size: 14px; line-height: 1.45; }
.quiet  { color: var(--quiet); }
.nw { white-space: nowrap; }
.measure { max-width: min(34rem, 100%); }
p { margin: 0; }
@media (min-width: 1024px) { .t-hero { font-size: 72px; } }
@media (max-width: 560px) { .t-hero { font-size: 40px; } .t-xl { font-size: 30px; } }

/* ── шапка ────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(13,13,17,.82); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--t-move) var(--ease); }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.logo img { width: 30px; height: 30px; border-radius: 7px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a { text-decoration: none; color: var(--quiet); padding: 10px 12px; border-radius: var(--r-s); font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; transition: color var(--t-micro) var(--ease); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 560px) { .top nav .hide-s { display: none; } }

/* ── кнопки ───────────────────────────────────────────── */
.btn { --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--h); padding: 0 24px; border-radius: 999px; border: 0; font: 600 16px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; transition: transform var(--t-micro) var(--ease), background-color var(--t-micro) var(--ease), opacity var(--t-micro); touch-action: manipulation; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-main { background: var(--text); color: #0D0D11; }
@media (hover: hover) { .btn-main:hover { background: #fff; } }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) { .btn-ghost:hover { box-shadow: inset 0 0 0 1px #4A4A58; } }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255,107,94,.4); }
.btn-small { --h: 44px; padding: 0 16px; font-size: 14px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .5; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ── первый экран ─────────────────────────────────────── */
.hero { padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { margin-bottom: 36px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cta-note { color: var(--quiet); font-size: 14px; }
.t-hero .kbd { font-size: .62em; height: 1.32em; min-width: 1.5em; border-radius: .22em; vertical-align: .12em; box-shadow: inset 0 -.08em 0 rgba(0,0,0,.45), inset 0 0 0 1px #3A3A46; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7em; padding: 0 .4em; height: 1.5em; border-radius: 6px; background: var(--raised); box-shadow: inset 0 -2px 0 rgba(0,0,0,.4), inset 0 0 0 1px var(--line); font-size: .86em; font-weight: 600; vertical-align: .08em; }
@media (max-width: 900px) {
  .hero { padding: 40px 0 72px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
}

/* сцена: клавиша → остров с волной → текст в поле */
.scene { position: relative; aspect-ratio: 5 / 5.4; max-width: 460px; width: 100%; justify-self: end; }
@media (max-width: 900px) { .scene { justify-self: center; max-width: 420px; } }
.scene .window { position: absolute; inset: 14% 0 0 0; background: var(--raised); border-radius: var(--r-l); box-shadow: var(--shadow-2); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.window .bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.window .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3A3A46; }
.window .bar span { margin-left: 10px; font-size: 14px; color: var(--quiet); }
.chat { flex: 1; padding: 20px 18px; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.bubble { align-self: flex-start; max-width: 82%; background: #23232D; padding: 10px 14px; border-radius: 18px 18px 18px 6px; font-size: 14px; line-height: 1.45; }
.bubble.mine { align-self: flex-end; background: #2C2C38; border-radius: 18px 18px 6px 18px; }
.composer { margin: 0 14px 14px; min-height: 52px; border-radius: 26px; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; padding: 10px 18px; font-size: 16px; line-height: 1.4; }
.composer .typed { white-space: pre-wrap; }
.composer .caret { display: inline-block; width: 2px; height: 1.15em; background: var(--cyan); margin-left: 1px; vertical-align: -0.18em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.island { position: absolute; top: 0; left: 50%; transform: translateX(-50%) scale(.6); opacity: 0; height: 52px; padding: 0 18px; border-radius: 26px; background: #000; box-shadow: var(--shadow-1); display: flex; align-items: center; gap: 12px; transition: transform var(--t-move) var(--ease), opacity var(--t-move) var(--ease); }
.scene.listening .island, .scene.writing .island { transform: translateX(-50%) scale(1); opacity: 1; }
.island .rec { width: 10px; height: 10px; border-radius: 50%; background: var(--voice); box-shadow: 0 0 0 4px rgba(255,77,61,.18); }
.island .wave { display: flex; align-items: center; gap: 3px; height: 24px; }
.island .wave b { width: 3px; border-radius: 2px; background: var(--voice); height: 4px; transition: height 120ms linear; }
.scene.writing .island .rec { background: var(--cyan); box-shadow: 0 0 0 4px rgba(34,211,238,.18); }
.scene.writing .island .wave b { background: var(--cyan); }
.island .time { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--quiet); min-width: 2.6em; }

.keycap { position: absolute; right: -28px; bottom: -44px; width: 92px; height: 84px; border-radius: 18px; background: linear-gradient(#24242E, #1A1A22); box-shadow: inset 0 -5px 0 rgba(0,0,0,.45), inset 0 0 0 1px #34343F, var(--shadow-1); display: grid; padding: 10px 12px; transition: transform var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease); }
.keycap .sym { justify-self: end; font-size: 26px; font-weight: 500; line-height: 1; }
.keycap .side { align-self: end; justify-self: end; font-size: 12px; color: var(--quiet); }
.scene.listening .keycap { transform: translateY(4px); box-shadow: inset 0 -1px 0 rgba(0,0,0,.45), inset 0 0 0 1px var(--voice), 0 0 0 6px rgba(255,77,61,.12); }
@media (max-width: 560px) { .keycap { width: 76px; height: 70px; right: -6px; bottom: -36px; } }

/* ── полоса «где работает» ────────────────────────────── */
.anywhere { padding: 32px 0 88px; }
.anywhere p { font-size: 36px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 650; max-width: 22ch; }
.anywhere p .quiet { font-weight: 500; }
@media (max-width: 560px) { .anywhere p { font-size: 28px; } }

/* ── доводы ───────────────────────────────────────────── */
.reasons { padding: 88px 0; border-top: 1px solid var(--line); }
.reasons .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
.reasons dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 40px; }
.reasons dt { font-size: 19px; font-weight: 650; margin-bottom: 8px; letter-spacing: -0.01em; }
.reasons dd { margin: 0; color: var(--quiet); }
.reasons .big { font-size: 56px; line-height: 1; letter-spacing: -0.04em; font-weight: 700; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .reasons .wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .reasons dl { grid-template-columns: 1fr; gap: 32px; } }

/* ── шаги ─────────────────────────────────────────────── */
.steps { padding: 88px 0 104px; }
.steps h2 { margin-bottom: 40px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.steps li { counter-increment: s; padding: 28px 24px; border-radius: var(--r-m); background: var(--raised); border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; margin-bottom: 20px; }
.steps li h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.01em; }
.steps li p { color: var(--quiet); }
@media (max-width: 900px) { .steps ol { grid-template-columns: 1fr; } }

/* ── финальный призыв: плоскость акцента ──────────────── */
/* розовый край осветлён до #F04CBB: тёмный текст на нём — 5.2:1 */
.final { margin: 0 var(--gutter) 64px; border-radius: var(--r-l); background: linear-gradient(120deg, var(--cyan), #F04CBB); color: #0D0D11; padding: 72px 24px; text-align: center; }
.final h2 { margin-bottom: 14px; }
.final p { margin: 0 auto 32px; max-width: 30rem; font-size: 19px; color: #0D0D11; }
.final .btn-main { background: #0D0D11; color: var(--text); }
@media (hover: hover) { .final .btn-main:hover { background: #000; } }
.final .cta-note { color: #0D0D11; display: block; margin-top: 16px; }

/* ── подвал ───────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--quiet); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.foot a { color: var(--quiet); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot a:hover { color: var(--text); }
.foot .grow { flex: 1; }

/* ── внутренние страницы ──────────────────────────────── */
.page { padding: 56px 0 96px; }
.page h1 { margin-bottom: 16px; }
.page .lead { margin-bottom: 40px; color: var(--quiet); }
.prose { max-width: min(40rem, 100%); }
.prose h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; margin: 40px 0 12px; }
.prose p, .prose ul { margin: 0 0 14px; color: #CFCFD9; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

.panel { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-m); padding: 28px; }
.stack > * + * { margin-top: 24px; }

/* скачивание */
.dl-head { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-bottom: 48px; }
.dl-head img { width: 120px; height: 120px; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--quiet); font-size: 14px; margin: 10px 0 24px; }
.howto { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: s; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 18px; align-items: start; padding: 20px; border-radius: var(--r-m); background: var(--raised); border: 1px solid var(--line); }
.howto li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.howto h3 { font-size: 19px; margin-bottom: 6px; }
.howto p { color: var(--quiet); }
.notes { white-space: pre-line; color: #CFCFD9; }
@media (max-width: 560px) { .dl-head { grid-template-columns: 1fr; } .dl-head img { width: 88px; height: 88px; } }

/* формы */
.auth { max-width: 420px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-weight: 600; font-size: 14px; }
.input { width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 17px; transition: border-color var(--t-micro) var(--ease); }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input.code { font-size: 28px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.help { font-size: 14px; color: var(--quiet); }
.error { font-size: 14px; color: var(--danger); min-height: 1.45em; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; min-height: 44px; }
.linkbtn[disabled] { color: var(--quiet); text-decoration: none; cursor: default; }
[hidden] { display: none !important; }

/* кабинет */
.acc-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .acc-grid { grid-template-columns: 1fr; } }
.acc-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.meter { height: 10px; border-radius: 5px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; margin: 14px 0 8px; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 5px; transition: width var(--t-enter) var(--ease); }
.today { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: end; gap: 3px; height: 140px; margin: 20px 0 8px; }
.chart i { display: block; background: var(--cyan); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .9; }
.chart i.zero { background: var(--line); }
.chart i.today-bar { background: var(--pink); }
.axis { display: flex; justify-content: space-between; font-size: 14px; color: var(--quiet); }
.devices { list-style: none; padding: 0; margin: 0; }
.devices li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.devices li:first-child { border-top: 0; }
.devices .name { font-weight: 600; }
.devices .meta { font-size: 14px; color: var(--quiet); }
.devices .grow { flex: 1; min-width: 0; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(34,211,238,.14); color: var(--cyan); }
.danger-zone { border-color: rgba(255,107,94,.3); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: #0D0D11; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: transform var(--t-move) var(--ease), opacity var(--t-move) var(--ease); z-index: 50; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
dialog { background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-m); padding: 28px; max-width: min(420px, 100% - 32px); box-shadow: var(--shadow-2); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font-size: 24px; margin-bottom: 10px; }
dialog p { color: var(--quiet); margin-bottom: 24px; }
dialog .row { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* ошибка 404/500 */
.lost { padding: 120px 0; }
.lost .t-hero { margin-bottom: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
