/* ============================================================
   НАША НОРА — стили лендинга.

   ⚠️ ПАЛИТРА ИЗ ТЗ:
     • лазурный  — основной акцент (кнопки, ссылки, активное);
     • зелёный   — вторичный акцент (успех, готово, позитив);
     • белый     — фон, карточки, воздух.
   ⚠️ Цвета заданы ПЕРЕМЕННЫМИ, а не раскиданы по файлу: так
   палитру можно поменять в одном месте, не переписывая вёрстку.

   ⚠️ MOBILE-FIRST. Базовые стили — для телефона, расширения
   идут через @media (min-width). Наоборот делать нельзя: на
   телефоне сломается то, что не успели переписать.
   ============================================================ */

:root {
  /* Лазурный — основной */
  --azure-50:  #eef8ff;
  --azure-100: #d6eeff;
  --azure-300: #7cc4f5;
  --azure-500: #1f9bf0;
  --azure-600: #0d84d6;
  --azure-700: #0a6cae;

  /* Зелёный — вторичный */
  --green-50:  #eefaf1;
  --green-500: #2fb457;
  --green-600: #229646;

  /* Нейтральные */
  --white: #ffffff;
  --grey-50: #f7f9fb;
  --grey-100: #eef1f5;
  --grey-200: #dfe4ea;
  --grey-500: #6b7683;
  --grey-700: #3d4653;
  --grey-900: #1c2430;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 8px rgba(28, 36, 48, .06), 0 12px 32px rgba(28, 36, 48, .07);
  --shadow-hover: 0 4px 12px rgba(28, 36, 48, .09), 0 18px 44px rgba(28, 36, 48, .11);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ⚠️ Отступ под шапку: она фиксированная, и без этого якоря
   (#features и др.) уезжают под неё. */
:target { scroll-margin-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  /* ⚠️ Крупный базовый размер: читаемость на телефоне в
     приоритете (требование ТЗ). */
  font-size: 17px;
  line-height: 1.6;
  color: var(--grey-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--azure-600); text-decoration: none; }
a:hover { color: var(--azure-700); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; letter-spacing: -.015em; }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}
.wrap--narrow { max-width: 760px; }

/* ============ ШАПКА ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  /* ⚠️ backdrop-filter: шапка «просвечивает». Если браузер не
     поддерживает — фон всё равно плотный, читаемость не страдает. */
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--grey-200);
}
.header__in {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--grey-900);
  flex-shrink: 0;
}
.logo:hover { color: var(--azure-600); }
.logo__img { width: 38px; height: 38px; border-radius: 50%; }
.logo__text { font-size: 1.05rem; }

/* ⚠️ Меню на телефоне СКРЫТО: четыре ссылки не помещаются и
   ломают шапку. Навигация остаётся доступной через прокрутку
   страницы — для лендинга этого достаточно. */
.nav { display: none; }

/* ============ КНОПКИ ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--azure-500);
  color: var(--white);
  font-weight: 600;
  font-size: .98rem;
  border: 2px solid var(--azure-500);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:hover {
  background: var(--azure-600);
  border-color: var(--azure-600);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn:active { transform: translateY(0); }

/* ⚠️ Видимый фокус обязателен: без него по кнопкам нельзя
   ходить с клавиатуры. */
.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--azure-300);
  outline-offset: 2px;
}

.btn--sm { padding: 9px 16px; font-size: .9rem; }
.btn--big { padding: 16px 28px; font-size: 1.05rem; }
.btn--full { width: 100%; }

.btn--ghost {
  background: transparent;
  color: var(--azure-600);
  border-color: var(--grey-200);
}
.btn--ghost:hover {
  background: var(--azure-50);
  border-color: var(--azure-300);
  color: var(--azure-700);
}

.btn--light {
  background: var(--white);
  color: var(--azure-700);
  border-color: var(--white);
}
.btn--light:hover {
  background: var(--azure-50);
  border-color: var(--azure-50);
  color: var(--azure-700);
}

/* ============ ГЛАВНЫЙ ЭКРАН ============ */
.hero {
  /* ⚠️ Градиент из палитры ТЗ: лазурный → зелёный, очень
     светлый, чтобы текст оставался читаемым. */
  background:
    radial-gradient(900px 420px at 12% -8%, var(--azure-100), transparent 62%),
    radial-gradient(700px 380px at 92% 4%, var(--green-50), transparent 60%),
    var(--white);
  padding: 40px 0 32px;
}
.hero__in { display: grid; gap: 28px; }

.hero__badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-600);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.hero__lead {
  font-size: 1.08rem;
  color: var(--grey-700);
  max-width: 34em;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 24px;
}
.hero__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: .96rem;
  color: var(--grey-700);
}
.hero__points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
/* ⚠️ Галочку рисуем через ::before, а не эмодзи: эмодзи
   выглядит по-разному в разных системах. */
.hero__points li::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--green-500)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    center / 13px no-repeat;
}

.hero__art { display: flex; justify-content: center; }
/* ⚠️ Логотип круглый: у файла белый фон, и без скругления он
   выглядит как белый квадрат на градиенте. */
.hero__art img {
  width: 220px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

/* ============ СЕКЦИИ ============ */
.section { padding: 48px 0; }
.section--tint { background: var(--grey-50); }
.section__title { text-align: center; }
.section__lead {
  text-align: center;
  color: var(--grey-500);
  max-width: 46ch;
  margin: 0 auto 32px;
  font-size: 1.02rem;
}

/* ============ КАРТОЧКИ ============ */
.cards { display: grid; gap: 16px; }

.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--azure-300);
}
.card__icon {
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 12px;
}
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--grey-700); font-size: .97rem; }

/* ============ ШАГИ ============ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  counter-reset: step;
}
.step {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 24px 22px;
  position: relative;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--azure-500);
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: .3em; }
.step p { margin: 0; color: var(--grey-700); font-size: .97rem; }

/* ============ ТАРИФЫ ============ */
.plans { display: grid; gap: 18px; }

.plan {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
}
.plan--best {
  /* ⚠️ Выделяем платный тариф, но НЕ делаем его навязчивым:
     граница и лёгкая тень, без кричащих цветов. */
  border-color: var(--azure-300);
  box-shadow: var(--shadow);
  position: relative;
}
.plan__tag {
  position: absolute;
  top: -12px;
  left: 22px;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--green-500);
  color: var(--white);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.plan__name { margin-bottom: .2em; font-size: 1.15rem; }
.plan__price {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--grey-900);
}
.plan__price span {
  font-size: .95rem;
  font-weight: 500;
  color: var(--grey-500);
}
.plan__list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: .96rem;
  color: var(--grey-700);
  /* ⚠️ Прижимаем список вверх, а кнопку вниз: иначе при разной
     длине списков кнопки в карточках стоят на разной высоте. */
  flex-grow: 1;
}
.plan__list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.plan__list li::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--azure-100)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6' fill='none' stroke='%230d84d6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    center / 12px no-repeat;
}
.plans__note {
  text-align: center;
  color: var(--grey-500);
  font-size: .92rem;
  margin: 22px auto 0;
  max-width: 52ch;
}

/* ============ ВОПРОСЫ ============ */
.faq {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* ⚠️ Убираем штатный треугольник и рисуем свой плюс: он
   одинаково выглядит во всех браузерах. */
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--azure-500);
  line-height: 1;
  transition: transform .18s ease;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq[open] summary { color: var(--azure-700); }
.faq p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--grey-700);
  font-size: .97rem;
}

/* ============ ПРИЗЫВ ============ */
.cta {
  background: linear-gradient(135deg, var(--azure-600), var(--azure-500) 55%, var(--green-500));
  color: var(--white);
  padding: 48px 0;
  text-align: center;
}
.cta__in { display: grid; justify-items: center; gap: 4px; }
.cta__img {
  width: 92px;
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.cta h2 { color: var(--white); }
.cta p { color: rgba(255, 255, 255, .92); max-width: 42ch; }
.cta .btn { margin-top: 8px; }
.cta__note {
  margin-top: 14px;
  font-size: .88rem;
  color: rgba(255, 255, 255, .8);
}

/* ============ ПОДВАЛ ============ */
.footer {
  background: var(--grey-900);
  color: var(--grey-200);
  padding: 36px 0 22px;
  font-size: .95rem;
}
.footer__in {
  display: grid;
  gap: 24px;
  margin-bottom: 26px;
}
.footer__col { display: grid; gap: 6px; align-content: start; }
.footer__title {
  font-weight: 700;
  color: var(--white);
  margin: 0 0 4px;
}
.footer__col a { color: var(--grey-200); }
.footer__col a:hover { color: var(--white); }
.footer__muted { color: var(--grey-500); margin: 0; }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: .88rem;
}
.footer__bottom p { margin: 0; }

/* ============================================================
   РАСШИРЕНИЯ ДЛЯ БОЛЬШИХ ЭКРАНОВ (mobile-first)
   ============================================================ */

@media (min-width: 640px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .section { padding: 64px 0; }

  .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .plans { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer__in { grid-template-columns: 2fr 1fr 1fr; }

  .hero { padding: 56px 0 44px; }
  .hero__art img { width: 300px; }
}

@media (min-width: 900px) {
  body { font-size: 18px; }
  h1 { font-size: 2.7rem; }
  h2 { font-size: 2rem; }
  .section { padding: 80px 0; }

  /* ⚠️ Меню показываем только здесь: раньше ему не хватает места. */
  .nav {
    display: flex;
    gap: 22px;
    margin-left: auto;
    font-size: .96rem;
    font-weight: 500;
  }
  .nav a { color: var(--grey-700); }
  .nav a:hover { color: var(--azure-600); }

  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }

  .hero { padding: 72px 0 64px; }
  .hero__in {
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 40px;
  }
  .hero__art { justify-content: flex-end; }
  .hero__art img { width: 340px; }
}

/* ⚠️ Уважаем настройку «меньше движения»: у части людей
   анимации вызывают дискомфорт. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .card:hover, .btn:hover { transform: none; }
}

/* ⚠️ Тёмная тема — опционально по ТЗ. Переопределяем только
   переменные, вёрстка не меняется. */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #131a24;
    --grey-50: #0e141d;
    --grey-100: #1a222e;
    --grey-200: #2a3441;
    --grey-500: #93a0b0;
    --grey-700: #c2cbd6;
    --grey-900: #eef2f7;
  }
  body { background: var(--white); }
  .header { background: rgba(19, 26, 36, .92); }
  .hero {
    background:
      radial-gradient(900px 420px at 12% -8%, #16324a, transparent 62%),
      radial-gradient(700px 380px at 92% 4%, #14301f, transparent 60%),
      var(--white);
  }
  .footer { background: #0a0f16; }
  .plan__price { color: var(--grey-900); }
  .faq summary::after { color: var(--azure-300); }
  .hero__points li::before {
    background-color: var(--green-600);
  }
}
