/* ============================================================
   Мини-лендинг «Светофор» — Диагностика готовности к школе
   Mobile-only (99% трафика — телефоны). Палитра светофора.
   ============================================================ */

:root {
  /* Фон и нейтральные */
  --bg: #ffffff;
  --bg-soft: #fbfaf7;
  --text: #2d2a26;
  --muted: #5f5a54;
  --muted-soft: #837d75;

  /* Светофор (акценты с визитки) */
  --orange: #e8772e;
  --orange-ink: #c75f1c; /* затемнённый для мелкого текста (контраст AA) */
  --green: #6cb33f;
  --green-ink: #4f8b2a;
  --blue: #4a90c2;
  --blue-ink: #2f6e9c;

  /* Линии, карточки */
  --line: rgba(45, 42, 38, 0.1);
  --line-strong: rgba(45, 42, 38, 0.16);
  --card: #ffffff;
  --shadow: 0 12px 32px rgba(45, 42, 38, 0.08);
  --shadow-soft: 0 6px 18px rgba(45, 42, 38, 0.06);

  /* Мессенджеры (фирменные цвета) */
  --tg: #29a9ea;
  --tg-dark: #1f93d0;
  --vk: #0077ff;
  --vk-dark: #0067dd;
  --max-from: #8a5cf6;
  --max-to: #5b2fd6;

  /* Радиусы */
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;

  /* Высота sticky-бара */
  --sticky-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100dvw;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 6%, rgba(108, 179, 63, 0.06), transparent 40%),
    radial-gradient(circle at 90% 12%, rgba(232, 119, 46, 0.06), transparent 38%),
    radial-gradient(circle at 80% 88%, rgba(74, 144, 194, 0.06), transparent 40%),
    var(--bg);
  /* резерв под sticky-bar, чтобы не перекрывал футер */
  padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

/* ---------- Контейнер ---------- */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Бренд ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand__icon {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: block;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__descriptor {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand__name {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.brand__name--o {
  color: var(--orange);
}
.brand__name--g {
  color: var(--green-ink);
}

/* ---------- Теги-таблетки (направления центра) ---------- */
.tags {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag--orange {
  background: rgba(232, 119, 46, 0.16);
  color: var(--orange-ink);
}
.tag--pink {
  background: rgba(232, 92, 142, 0.16);
  color: #c23b72;
}
.tag--yellow {
  background: rgba(240, 188, 50, 0.22);
  color: #a9790a;
}
.tag--blue {
  background: rgba(74, 144, 194, 0.16);
  color: var(--blue-ink);
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero__title {
  margin: 4px 0 0;
  font-size: 27px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--orange);
}
.hero__subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

/* ---------- CTA ---------- */
.cta-label {
  margin: 6px 0 -4px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.msg-btn__icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.msg-btn__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.msg-btn:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.97);
}
.msg-btn:focus-visible {
  outline: 3px solid rgba(45, 42, 38, 0.35);
  outline-offset: 2px;
}

.msg-btn--tg {
  background: linear-gradient(180deg, var(--tg), var(--tg-dark));
  box-shadow: 0 10px 22px rgba(41, 169, 234, 0.28);
}
.msg-btn--vk {
  background: linear-gradient(180deg, var(--vk), var(--vk-dark));
  box-shadow: 0 10px 22px rgba(0, 119, 255, 0.26);
}
.msg-btn--max {
  background: linear-gradient(180deg, var(--max-from), var(--max-to));
  box-shadow: 0 10px 22px rgba(91, 47, 214, 0.26);
}

/* ---------- Trust-строка ---------- */
.trust-line {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-soft);
}

/* ---------- Карточки ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  /* цветная индикация слева (цвет задаёт модификатор ниже) */
  border-left: 5px solid var(--green);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 22px 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Экран 2 «Что проверим» — зелёная полоса (по умолчанию) */
.card--check {
  border-left-color: var(--green);
}
/* Экран 3 «Почему бесплатно» — оранжевая полоса */
.card--accent {
  border-color: rgba(108, 179, 63, 0.4);
  border-left: 5px solid var(--orange);
  background: linear-gradient(180deg, #ffffff, #f6fbf1);
}
/* Экран 4 «Как проходит» — синяя полоса */
.card--steps {
  border-left-color: var(--blue);
}
/* Экран 5 «Финал» — оранжевая полоса */
.card--final {
  border-color: rgba(232, 119, 46, 0.35);
  border-left: 5px solid var(--orange);
  background: linear-gradient(180deg, #ffffff, #fff7f1);
  box-shadow: var(--shadow);
}
.card__title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.card__note {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Список «что проверим» ---------- */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: 16px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4 10-10'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Блок «почему бесплатно» ---------- */
.why-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.why-block p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.why-block strong {
  color: var(--text);
}
.why-block__lead {
  font-size: 16px !important;
  color: var(--text) !important;
}

/* ---------- Шаги ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: step;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step__num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: inline-grid;
  place-items: center;
}
.step__text {
  font-size: 15px;
  padding-top: 3px;
}

/* ---------- Футер ---------- */
.footer {
  margin-top: 4px;
  padding: 18px 16px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.footer__logo {
  height: 64px;
  width: auto;
  display: block;
}
.footer__line {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.footer__muted {
  color: var(--muted-soft);
}
.footer__line a {
  color: var(--blue-ink);
  text-decoration: none;
}
.footer__policy {
  text-decoration: underline !important;
}

/* ---------- Sticky-bar ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  /* непрозрачный фон — надёжно читается и быстро рендерится на слабых Android
     (backdrop-filter намеренно не используем: тяжёлый композитный слой) */
  background: #ffffff;
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -6px 20px rgba(45, 42, 38, 0.08);
  transform: translateY(120%);
  transition: transform 240ms ease;
}
.sticky-cta.is-visible {
  transform: translateY(0);
}
.sticky-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--orange), var(--orange-ink));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(232, 119, 46, 0.32);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sticky-cta__btn:active {
  transform: scale(0.99);
}

/* ---------- Десктоп (≈1% трафика): тот же узкий контейнер ---------- */
@media (min-width: 620px) {
  .app {
    padding-top: 32px;
  }
  .hero__title {
    font-size: 30px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
