/* =========================================================
   Лендинги — визуал для аудитории 35–55 лет:
   крупный шрифт, высокий контраст, спокойная светлая карточка,
   большая понятная кнопка, мягкое ровное затемнение фона.
   ========================================================= */

:root {
  --ink: #1b2430;          /* основной текст */
  --ink-soft: #3c4756;     /* второстепенный текст */
  --muted: #5d6877;        /* подписи */
  --card-bg: #fbfaf7;      /* тёплый белый */
  --line: #e4e0d8;
  --accent: #1f7a4d;       /* галочки — спокойный зелёный */
  --accent-bg: #e3f2ea;
  /* кнопка: цвет из JSON, затемнённый для контраста с белым текстом */
  --btn: var(--button-color, #1DA1F2);
  --btn-deep: color-mix(in srgb, var(--btn) 70%, #0b1a2a);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: #1c2229;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Фон и затемнение ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.06);
  filter: blur(3px) saturate(85%);
}

/* Ровное, неагрессивное затемнение: фон читается, но не спорит с текстом */
.veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(18, 24, 32, .38) 0%, rgba(18, 24, 32, .52) 60%, rgba(18, 24, 32, .66) 100%);
}

/* ---------- Карточка ---------- */
.card {
  width: 100%;
  max-width: 540px;
  padding: 40px 40px 34px;
  text-align: left;
  background: var(--card-bg);
  border-radius: 18px;
  border-top: 6px solid var(--btn-deep);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .08),
    0 18px 50px rgba(0, 0, 0, .32);
  animation: rise .5s ease-out both;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.logo {
  display: block;
  max-width: 240px;
  max-height: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.title {
  margin: 0 0 18px;
  font-size: clamp(26px, 5.4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.005em;
  color: var(--ink);
  text-align: center;
}

.subtitle {
  margin: 0;
  font-size: clamp(18px, 4.2vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
  white-space: pre-line;
}

/* ---------- Пункты с галочками ---------- */
.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: clamp(17px, 4.2vw, 19px);
  line-height: 1.5;
  color: var(--ink-soft);
}

.tick {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-top: -1px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-bg);
}

/* ---------- Кнопка ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin-top: 32px;
  padding: 16px 24px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  color: #fff;
  background: var(--btn);           /* запасной вариант для старых браузеров */
  background: var(--btn-deep);
  border-radius: 12px;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, .18),
    0 8px 20px color-mix(in srgb, var(--btn) 35%, transparent);
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.cta:hover {
  background: color-mix(in srgb, var(--btn) 60%, #0b1a2a);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, .2),
    0 12px 26px color-mix(in srgb, var(--btn) 45%, transparent);
}

.cta:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}

.cta:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.cta-icon {
  flex: 0 0 auto;
}

.cta-arrow {
  flex: 0 0 auto;
  transition: transform .15s ease;
}

.cta:hover .cta-arrow {
  transform: translateX(3px);
}

.note {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Мобильные ---------- */
@media (max-width: 480px) {
  body {
    padding: 20px 16px;
    align-items: flex-start;
  }

  .card {
    margin-top: 4vh;
    padding: 30px 22px 26px;
    border-radius: 16px;
  }

  .logo-wrap {
    padding-bottom: 20px;
    margin-bottom: 22px;
  }

  .logo {
    max-width: 200px;
    max-height: 90px;
  }

  .cta {
    min-height: 62px;
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
  }

  .cta,
  .cta-arrow {
    transition: none;
  }
}

/* ---------- Служебные страницы (список, 404) ---------- */
.plain {
  width: 100%;
  max-width: 560px;
  padding: 36px 32px;
  text-align: center;
  color: var(--ink);
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.plain a {
  color: #1d5fa8;
}

.plain .cta {
  color: #fff;
}

.list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
  text-align: left;
}

.list a {
  display: block;
  padding: 14px 18px;
  font-size: 18px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.list a:hover {
  border-color: #b9c3cf;
  background: #f3f5f8;
}

/* ---------- Тёмная тема: "theme": "dark" в JSON ---------- */
.theme-dark {
  --ink: #f4f6f9;
  --ink-soft: #dbe2ea;
  --muted: #a9b4c1;
  --card-bg: #141a22;
  --line: rgba(255, 255, 255, .12);
  --accent: #5fd39a;
  --accent-bg: rgba(95, 211, 154, .14);
}

.theme-dark .veil {
  background:
    linear-gradient(180deg, rgba(8, 11, 16, .55) 0%, rgba(8, 11, 16, .7) 60%, rgba(8, 11, 16, .82) 100%);
}

.theme-dark .card {
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 6px solid var(--btn);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .3),
    0 22px 60px rgba(0, 0, 0, .55);
}


.theme-dark .cta {
  background: var(--btn);
}

.theme-dark .cta:hover {
  background: color-mix(in srgb, var(--btn) 85%, #fff);
}

.theme-dark .cta:focus-visible {
  outline-color: #fff;
}

/* ---------- Бейдж: "badge": "Набор открыт" в JSON ---------- */
.badge-wrap {
  display: flex;
  justify-content: center;
  margin: -6px 0 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
  color: #17603c;
  background: #e3f2ea;
  border: 1px solid #bfe3cf;
  border-radius: 999px;
}

.badge-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22a35f;
}

.badge-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22a35f;
  animation: badge-pulse 1.8s ease-out infinite;
}

@keyframes badge-pulse {
  from { transform: scale(1); opacity: .7; }
  to { transform: scale(2.6); opacity: 0; }
}

.theme-dark .badge {
  color: #7fe0ae;
  background: rgba(95, 211, 154, .12);
  border-color: rgba(95, 211, 154, .35);
}

@media (prefers-reduced-motion: reduce) {
  .badge-dot::after { animation: none; }
}
