/* =========================================================
   Лендинги — визуал для аудитории 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; }
}

/* =========================================================
   Варианты оформления (поля в JSON):
   "layout": "glass" | "bottom" | "minimal" | "split"
   "buttonStyle": "pill"
   "pointsStyle": "numbers"
   ========================================================= */

/* ---------- Номера вместо галочек ---------- */
.num {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.points-num .tick {
  color: #fff;
  background: var(--btn-deep);
}

/* ---------- Кнопка-«таблетка» с пульсацией ---------- */
.btn-pill .cta {
  border-radius: 999px;
  animation: cta-pulse 2.4s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--btn) 55%, transparent); }
  50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--btn) 0%, transparent); }
}

/* ---------- 1. Стекло: полупрозрачная карточка ---------- */
.layout-glass .backdrop {
  filter: saturate(105%);
}

.layout-glass .veil {
  background: linear-gradient(180deg, rgba(10, 14, 20, .15), rgba(10, 14, 20, .45));
}

.layout-glass {
  --ink: #fff;
  --ink-soft: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .75);
  --line: rgba(255, 255, 255, .22);
  --accent: #fff;
  --accent-bg: rgba(255, 255, 255, .2);
}

.layout-glass .card {
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .28);
  border-top: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.layout-glass .points li,
.layout-glass .subtitle {
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.layout-glass .cta {
  background: #fff;
  color: var(--btn-deep);
}

.layout-glass .cta:hover {
  background: #f1f4f7;
}

.layout-glass .badge {
  color: #fff;
  background: rgba(34, 163, 95, .55);
  border-color: rgba(255, 255, 255, .3);
}

/* ---------- 2. Снизу: фото открыто, карточка-шторка внизу ---------- */
.layout-bottom {
  align-items: flex-end;
  padding-bottom: 0;
}

.layout-bottom .backdrop {
  filter: none;
  transform: none;
}

.layout-bottom .veil {
  background: linear-gradient(180deg, rgba(10, 14, 20, 0) 30%, rgba(10, 14, 20, .55) 100%);
}

.layout-bottom .card {
  animation: none;
  border-radius: 24px 24px 0 0;
  border-top: none;
  padding-top: 30px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .3);
}

.layout-bottom .card::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  margin: -12px auto 22px;
  border-radius: 3px;
  background: var(--line);
}

.layout-bottom .logo-wrap {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 18px;
}

.layout-bottom .logo {
  max-height: 64px;
}

/* ---------- 3. Минимал: без карточки, крупный текст на фото ---------- */
.layout-minimal {
  --ink: #fff;
  --ink-soft: #fff;
  --muted: rgba(255, 255, 255, .8);
  --line: rgba(255, 255, 255, .25);
  --accent: #fff;
  --accent-bg: var(--btn-deep);
}

.layout-minimal .backdrop {
  filter: saturate(90%);
}

.layout-minimal .veil {
  background: linear-gradient(180deg, rgba(8, 11, 16, .62), rgba(8, 11, 16, .86));
}

.layout-minimal .card {
  max-width: 600px;
  background: none;
  border: none;
  box-shadow: none;
  padding-left: 8px;
  padding-right: 8px;
}

.layout-minimal .logo-wrap {
  border-bottom: none;
  padding-bottom: 0;
}

.layout-minimal .points {
  gap: 20px;
}

.layout-minimal .points li {
  font-size: clamp(19px, 4.8vw, 23px);
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.layout-minimal .cta {
  background: var(--btn);
  min-height: 68px;
  font-size: 21px;
}

/* ---------- 4. Сплит: фото сверху (телефон) / слева (компьютер) ---------- */
.layout-split {
  display: block;
  padding: 0;
  background: var(--card-bg);
}

.layout-split .backdrop {
  position: relative;
  inset: auto;
  height: 36vh;
  min-height: 220px;
  filter: none;
  transform: none;
}

.layout-split .veil {
  display: none;
}

.layout-split .card {
  position: relative;
  max-width: none;
  margin: -28px 0 0;
  border-radius: 24px 24px 0 0;
  border-top: none;
  box-shadow: none;
  padding: 30px 22px 36px;
  animation: none;
}

.layout-split .logo-wrap {
  position: absolute;
  top: -48px;
  left: 50%;
  transform: translateX(-50%);
  border: none;
  padding: 0;
  margin: 0;
}

.layout-split .logo {
  width: 84px;
  height: 84px;
  max-width: none;
  padding: 6px;
  border-radius: 50%;
  background: var(--card-bg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}

.layout-split .badge-wrap {
  margin-top: 40px;
}

.layout-split .badge-wrap + .points,
.layout-split .logo-wrap + .points {
  margin-top: 46px;
}

.layout-split .badge-wrap + .points {
  margin-top: 0;
}

@media (min-width: 900px) {
  .layout-split .backdrop {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    height: auto;
  }

  .layout-split .card {
    margin: 0 0 0 50%;
    width: 50%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 8vw;
    border-radius: 0;
  }

  .layout-split .logo-wrap {
    position: static;
    transform: none;
    justify-content: flex-start;
    margin-bottom: 30px;
  }

  .layout-split .badge-wrap {
    margin-top: 0;
    justify-content: flex-start;
  }

  .layout-split .logo-wrap + .points {
    margin-top: 0;
  }
}

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

/* Сплит: логотип всегда на белом круге, без рамки у карточки */
.layout-split .card { border: none; }
.layout-split .logo {
  width: 96px;
  height: 96px;
  padding: 4px;
  object-fit: contain;
  background: #fff;
}
.layout-split .logo-wrap { top: -54px; }
.theme-dark.layout-split .logo { box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }


/* =========================================================
   Сплит 2.0: плавный переход фото → карточка, кольцо у логотипа,
   «живой» бейдж. Палитры: "palette": "sky" | "pearl" | "slate"
   ========================================================= */
.layout-split .backdrop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--card-bg) 35%, transparent));
}

.layout-split .logo {
  box-shadow: 0 0 0 4px var(--card-bg), 0 0 0 6px var(--ring, rgba(31, 63, 143, .25)), 0 10px 26px rgba(0, 0, 0, .22);
}

.layout-split .badge {
  animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 163, 95, 0); }
  50% { box-shadow: 0 0 0 6px rgba(34, 163, 95, .18), 0 0 18px rgba(34, 163, 95, .35); }
}

.layout-split .points li {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--row-bg, transparent);
}

.layout-split .points { gap: 10px; }

/* --- Небо: прохладный белый, тёмно-синий как в логотипе --- */
.pal-sky {
  --card-bg: #f5f8fd;
  --ink: #12224a;
  --ink-soft: #2a3a5e;
  --muted: #5a6a88;
  --line: #dbe3f1;
  --accent: #1d7a4a;
  --accent-bg: #dff1e7;
  --row-bg: #ffffff;
  --ring: rgba(30, 64, 160, .3);
  --button-color: #1e40a0 !important;
}

/* --- Жемчуг: тёплый светлый, приглушённый сине-серый --- */
.pal-pearl {
  --card-bg: #f7f5f2;
  --ink: #2b3440;
  --ink-soft: #46505c;
  --muted: #7a828c;
  --line: #e6e1da;
  --accent: #4d6f8a;
  --accent-bg: #e4ebf1;
  --row-bg: #ffffff;
  --ring: rgba(77, 111, 138, .3);
  --button-color: #3e5f7c !important;
}

/* --- Графит: тёмный сланец с золотыми акцентами --- */
.pal-slate {
  --card-bg: #1b232d;
  --ink: #eef2f6;
  --ink-soft: #d3dbe4;
  --muted: #9aa7b5;
  --line: rgba(255, 255, 255, .1);
  --accent: #e3c27a;
  --accent-bg: rgba(227, 194, 122, .14);
  --row-bg: rgba(255, 255, 255, .04);
  --ring: rgba(227, 194, 122, .45);
  --button-color: #d6b065 !important;
}

.pal-slate .cta { color: #1b232d; }
.pal-slate .cta:hover { background: #e2bf77; }
.pal-slate .badge {
  color: #f0d79e;
  background: rgba(227, 194, 122, .12);
  border-color: rgba(227, 194, 122, .4);
}
.pal-slate .badge-dot,
.pal-slate .badge-dot::after { background: #e3c27a; }
@keyframes badge-glow-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 194, 122, 0); }
  50% { box-shadow: 0 0 0 6px rgba(227, 194, 122, .15), 0 0 18px rgba(227, 194, 122, .35); }
}
.pal-slate.layout-split .badge { animation-name: badge-glow-gold; }

@media (prefers-reduced-motion: reduce) {
  .layout-split .badge { animation: none; }
}
.pal-sky, .pal-pearl, .pal-slate {
  --btn: var(--button-color);
  --btn-deep: color-mix(in srgb, var(--btn) 80%, #0b1a2a);
}
