/* Лендинг kachalka-app.ru. Самостоятельная статика, в сборку приложения не входит.
   Палитра и шрифты — те же, что в src/index.css («Спорт-блоки»); акцент — бирюзовый, как на кадрах. */
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/Onest-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/Onest-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/Onest-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Sofia Sans Condensed'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('fonts/SofiaSansCondensed-Black-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: 'Sofia Sans Condensed'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('fonts/SofiaSansCondensed-Black-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: dark;
  --bg: #111827;
  --bg-2: #0d1320;
  --surface: #1C2433;
  --surface-solid: rgba(17, 24, 39, .94);
  --border: #2F3A50;
  --text: #F8FAFC;
  --muted: #AEB6C4;
  --acc: #00E5FF;
  --acc-2: #6FEFFF;
  --on-acc: #04201C;
  --acc-fill: linear-gradient(90deg, var(--acc), var(--acc-2));
  --r-md: 12px;
  --r-card: 20px;
  --r-phone: 30px;
  --r-pill: 999px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Sofia Sans Condensed', 'Onest', system-ui, sans-serif;
  --gutter: 16px;
  --section-y: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--font);
  font-feature-settings: "case" 1;
  font-variant-numeric: lining-nums proportional-nums;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: var(--acc-2); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 14px; background: var(--acc); color: var(--on-acc); border-radius: var(--r-md); }
.skip:focus { top: 10px; }

h1, h2, .final-title {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1;
}
h1 { font-size: clamp(50px, 14.5vw, 92px); line-height: .95; text-wrap: balance; }
h2 { font-size: clamp(38px, 9vw, 56px); text-wrap: balance; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.25; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 26px;
  background: var(--acc-fill); color: var(--on-acc);
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { box-shadow: 0 8px 28px rgba(0, 229, 255, .28); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--acc); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface-solid);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-weight: 700; text-decoration: none; }
.brand img { border-radius: 9px; }
.top-nav { display: none; gap: 28px; margin-left: auto; }
.top-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 16px; padding: 10px 0; }
.top-nav a:hover { color: var(--text); }

.phone {
  overflow: hidden;
  width: min(100%, 300px);
  aspect-ratio: 786 / 1538;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-phone);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.hero { overflow: hidden; background: radial-gradient(90% 70% at 85% 10%, rgba(0, 229, 255, .13), transparent 70%); }
.hero-grid { display: grid; gap: 44px; padding-top: 44px; padding-bottom: 56px; }
.eyebrow { margin-bottom: 14px; color: var(--acc-2); font-weight: 600; }
.lead { margin: 20px 0 28px; max-width: 34em; color: var(--muted); font-size: 19px; }
.hero-text .btn { flex: 1 1 100%; }
.note { margin-top: 16px; color: var(--muted); font-size: 15px; }
.note b { color: var(--text); font-weight: 600; }
.hero-shots { position: relative; display: flex; justify-content: center; }
.phone--back { display: none; }
.phone--front { position: relative; width: min(82%, 300px); }

.section { padding: var(--section-y) 0; }
.section--alt { background: var(--bg-2); }
.section-lead { margin-top: 14px; max-width: 36em; color: var(--muted); font-size: 19px; }

.feature { display: grid; gap: 28px; justify-items: center; margin-top: 52px; }
.feature-text { width: 100%; }
.feature-text p { margin-top: 12px; color: var(--muted); }
.feature-text ul { margin-top: 16px; display: grid; gap: 10px; }
.feature-text li { position: relative; padding-left: 20px; }
.feature-text li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--acc);
}

.duo { display: grid; gap: 44px; margin-top: 40px; }
.duo-item .phone { margin: 0 auto 22px; }
.duo-item p { margin-top: 8px; color: var(--muted); }

.tiles { display: grid; gap: 12px; margin-top: 32px; }
.tile { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.tile h3 { font-size: 19px; }
.tile p { margin-top: 6px; color: var(--muted); font-size: 16px; }

.steps { display: grid; gap: 12px; margin-top: 32px; }
.step { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.step p { margin-top: 8px; color: var(--muted); font-size: 16px; }

.install { margin-top: 18px; color: var(--muted); font-size: 16px; }
.install b { color: var(--text); font-weight: 600; }

.final { display: grid; gap: 22px; justify-items: center; margin-top: 56px; text-align: center; }
.final-title { font-size: clamp(36px, 8vw, 52px); text-wrap: balance; }
.final .btn { width: 100%; max-width: 340px; }

.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; padding-top: 18px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.foot a:hover { color: var(--text); }

@media (min-width: 620px) {
  :root { --gutter: 28px; --section-y: 84px; }
  .hero-text .btn { flex: 0 0 auto; }
  .duo { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  :root { --section-y: 104px; }
  .top-nav { display: flex; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; padding-top: 72px; padding-bottom: 88px; }
  .hero-shots { min-height: 640px; }
  .phone--back { display: block; position: absolute; left: 0; top: 56px; width: 270px; opacity: .55; transform: rotate(-6deg); }
  .phone--front { position: absolute; right: 0; top: 0; width: 310px; }
  .feature { grid-template-columns: 300px 1fr; gap: 72px; align-items: center; justify-items: stretch; margin-top: 72px; }
  .feature--flip .phone { order: 2; }
  .feature--flip { grid-template-columns: 1fr 300px; }
  .feature-text { max-width: 520px; }
  .duo { max-width: 760px; margin-inline: auto; }
  .duo-item { width: 300px; justify-self: center; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

/* Страница «Быстрый старт» (собирается scripts/quick-start-page.mjs). */
.top-nav a[aria-current] { color: var(--text); }
.doc-page { padding: 40px 0 var(--section-y); }
.doc-page h1 { font-size: clamp(46px, 11vw, 72px); }
.doc-grid { display: grid; gap: 40px; margin-top: 32px; }
.doc { min-width: 0; max-width: 720px; }
.doc h2 {
  margin: 56px 0 16px;
  font-size: clamp(30px, 7vw, 40px);
  scroll-margin-top: 84px;
}
.doc h2:first-of-type { margin-top: 32px; }
.doc h3 { margin: 32px 0 10px; }
.doc p, .doc ul, .doc ol { margin-bottom: 14px; }
.doc p, .doc li { color: #D5DAE3; overflow-wrap: anywhere; }
.doc strong { color: var(--text); font-weight: 600; }
.doc ul, .doc ol { padding-left: 24px; }
.doc ul { list-style: disc; }
.doc ol { list-style: decimal; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--acc); }
.doc code { padding: 1px 6px; background: var(--surface); border-radius: 6px; font: .92em ui-monospace, Consolas, monospace; }
.doc .final-title { margin-bottom: 0; color: var(--text); }
.doc blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--surface);
  border-left: 3px solid var(--acc);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: 16px;
}
.toc-side { display: none; }
.toc-fold { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.toc-fold summary { display: flex; align-items: center; min-height: 52px; padding: 0 20px; font-weight: 600; cursor: pointer; }
.toc-fold ol { margin: 0; padding: 0 20px 12px; list-style: none; }
.toc-fold a { display: block; padding: 7px 0; }
.toc-side ol { margin: 0; padding: 0; list-style: none; }
.toc-side a { display: block; padding: 5px 0; color: var(--muted); font-size: 15px; line-height: 1.35; text-decoration: none; }
.toc-side a:hover { color: var(--text); }

@media (min-width: 960px) {
  .doc-grid { grid-template-columns: 240px minmax(0, 720px); gap: 64px; }
  .toc-side { display: block; }
  .toc-side nav { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; }
  .toc-fold { display: none; }
  .doc h2:first-of-type { margin-top: 0; }
}

/* Анимации. Двигаем только translate/rotate/opacity; отдельные свойства, а не transform: наклон
   заднего телефона живет в transform. Первый экран — чистый CSS, остальное включает reveal.js. */
@keyframes rise { from { opacity: 0; translate: 0 26px; } }
@keyframes fan-out { from { opacity: 0; translate: 90px 24px; rotate: 6deg; } }
@keyframes float { to { translate: 0 -10px; } }
@keyframes fade { from { opacity: 0; } }

.hero-text > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .18s; }
.hero-text > :nth-child(4) { animation-delay: .28s; }
.hero-text > :nth-child(5) { animation-delay: .36s; }
.phone--front {
  animation: rise .8s .2s cubic-bezier(.2, .7, .2, 1) both, float 3.2s 1.1s ease-in-out infinite alternate;
}
.phone--back { animation: fan-out .9s .5s cubic-bezier(.2, .7, .2, 1) both; }

.js :is(.section h2, .section-lead, .feature .phone, .feature-text, .duo-item, .tile, .step, .final) {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .6s ease-out, translate .7s cubic-bezier(.2, .7, .2, 1);
}
.js :is(.section h2, .section-lead, .feature .phone, .feature-text, .duo-item, .tile, .step, .final).is-in {
  opacity: 1;
  translate: none;
}
.js :is(.tile, .step, .duo-item):nth-child(3n + 2) { transition-delay: .09s; }
.js :is(.tile, .step):nth-child(3n) { transition-delay: .18s; }

@media (min-width: 960px) {
  .js .feature .phone { translate: -56px 0; }
  .js .feature--flip .phone { translate: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  /* Без сдвигов и покачивания: прозрачность не двигает экран, поэтому проявление остается. */
  .hero-text > *, .phone--back { animation-name: fade; }
  .phone--front { animation: fade .8s .2s ease-out both; }
  .js :is(.section h2, .section-lead, .feature .phone, .feature-text, .duo-item, .tile, .step, .final) { translate: none !important; }
}
