/* Шрифты - те же файлы, что самостоятельно хостит и основное приложение
   (@fontsource, без внешнего CDN - см. frontend/src/index.css). Кириллица и латиница
   раздельными @font-face с unicode-range - так браузер грузит только нужный файл,
   а не оба сразу. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/inter/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/inter/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/inter/inter-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/inter/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/inter/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/inter/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/inter/inter-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/inter/inter-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/manrope/manrope-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/manrope/manrope-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/manrope/manrope-cyrillic-800-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/manrope/manrope-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F;
}

/* Палитра - 1:1 из frontend/src/theme/theme.ts (COLORS), чтобы визитка была
   продолжением того же продукта, а не сайтом "с нуля". */
:root {
  --primary: #02b0e1;
  --primary-hover: #4ed7fd;
  --secondary: #d23d9b;
  --neutral-dark: #20242b;
  --bg-layout: #f4f5f7;
  --bg-container: #ffffff;
  --text-primary: #1a1f2b;
  --text-secondary: #5b6472;
  --border: #e2e5ea;
  --success: #2e9e6d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--bg-container);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.heading-font {
  font-family: "Manrope", "Inter", sans-serif;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Логотип - те же пропорции, что и Logo.tsx в приложении (кольцо + подпись) --- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--text-primary);
}
.logo__text {
  white-space: nowrap;
}
.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo__ring {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo__ring svg {
  width: 10px;
  height: 10px;
  fill: #fff;
}

/* --- Шапка --- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.header__nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}
.header__nav a:hover {
  color: var(--text-primary);
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* --- Герой --- */
.hero {
  position: relative;
  overflow: hidden;
  /* Реальный запрос пользователя (повторно): "уменьшим расстояние между всеми
     разделами, особенно между первым и 'о системе'" - общее правило секций
     тоже уменьшено (было 72px, теперь 48px - см. ниже), но у hero нижний
     отступ по-прежнему сокращен отдельно и сильнее: это не рядовая секция,
     переход от кнопок героя к следующему блоку должен идти плотнее, чем
     между двумя обычными разделами подряд. */
  padding: 88px 0 8px;
  background: linear-gradient(180deg, #f0fbff 0%, #ffffff 65%);
}
/* Декоративное розовое пятно - второй фирменный акцентный цвет, помимо основного
   голубого, не как самостоятельный блок контента, просто мягкий фон. */
.hero::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 61, 155, 0.14) 0%, rgba(210, 61, 155, 0) 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e6f8ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.hero h1 span {
  color: var(--primary);
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 auto 32px;
  max-width: 620px;
}
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Секции общее --- */
section {
  padding: 48px 0;
}
.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  text-align: center;
}
h2 {
  font-size: 30px;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  text-align: center;
}
.section-lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}

/* --- Проблема / боль --- */
.problem {
  background: var(--bg-layout);
}
.problem__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.problem__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.problem__item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fdeef0;
  color: #d64550;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}
.problem__item p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}
.problem__item strong {
  color: var(--text-primary);
}

/* --- Как это работает --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step {
  position: relative;
  padding: 28px 24px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
/* Реальный запрос пользователя: "доработать шаги, сейчас это выглядит не так" -
   три карточки рядом смотрелись как независимые блоки, а не последовательность:
   ничего не подсказывало взгляду, что шаг 2 идет ПОСЛЕ шага 1. Стрелка между
   соседними карточками - минимальное изменение, решающее именно это; на узких
   экранах, где .steps уже переходит в одну колонку (см. медиа-запрос ниже),
   стрелка убирается вместе с ним - горизонтальная стрелка между строками,
   идущими одна под другой, не читалась бы как "далее". */
.step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -34px;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--border);
  font-weight: 700;
}
.step__num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--neutral-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 18px;
}
.step h3 {
  font-size: 17px;
  margin: 0 0 8px;
}
.step p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* --- Возможности --- */
.features {
  background: var(--bg-layout);
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.feature-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e6f8ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
}
.feature-card__icon--pink {
  background: #fbe9f3;
  color: var(--secondary);
}
.feature-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}
.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.feature-card .badge {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary);
  background: #fbe9f3;
  padding: 3px 9px;
  border-radius: 999px;
}

/* --- О системе (видео) --- */
.demo-video {
  max-width: 880px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(2, 176, 225, 0.14);
}
.demo-video__player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* --- Для кого --- */
.audience__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.audience-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
}
.audience-card h3 {
  font-size: 17px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.audience-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* --- CTA-блок --- */
.cta {
  background: var(--neutral-dark);
  border-radius: 20px;
  padding: 56px 48px;
  margin: 0 24px;
  text-align: center;
  color: #fff;
}
.cta h2 {
  color: #fff;
  margin-bottom: 12px;
}
.cta p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15.5px;
  margin: 0 0 28px;
}
.cta .btn-ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.cta .btn-ghost:hover {
  border-color: #fff;
}

/* --- Подвал --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.footer__meta {
  font-size: 13px;
  color: #9aa2ad;
  margin: 20px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  max-width: none;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .hero h1 {
    font-size: 32px;
  }
  .problem__list,
  .steps,
  .features__grid,
  .audience__grid {
    grid-template-columns: 1fr;
  }
  .step::after {
    display: none;
  }
  .header__nav {
    display: none;
  }
  .cta {
    padding: 40px 24px;
    margin: 0 16px;
  }
}

/* Отдельный, более узкий брейкпоинт - телефоны. На 860px шапка еще помещается
   (нав уже скрыт), а вот полный текст логотипа + обе кнопки в один ряд на 375-414px
   уже не влезают без переноса - из-за этого и "ломалась" шапка. Прячем текстовую
   часть логотипа (сама иконка узнаваема сама по себе) и чуть уплотняем кнопки -
   этого хватает, чтобы все осталось в один ряд, как и просили. */
@media (max-width: 480px) {
  .logo__text {
    display: none;
  }
  .header__actions {
    gap: 8px;
  }
  .header__actions .btn {
    padding: 9px 14px;
    font-size: 13px;
  }
}
