/* ============================================================
   TaleLogic — тема v2 «светлая и воздушная»
   Самодостаточный CSS: не зависит от Tailwind и от старой темы.
   Откат = переключение SITE_THEME обратно на v1 (файл не мешает).
   ============================================================ */

/* ---------- 1. Токены ---------- */
:root {
  /* Поверхности. Правило: карточка всегда светлее секции, на которой лежит,
     иначе блок держится только на рамке и «не выпрыгивает».
     Порядок по светлоте: card > bg > bg-soft > bg-tint */
  --bg: #ffffff;
  --bg-soft: #f5f1ea;
  --bg-tint: #ebe4d8;
  --card: #ffffff;

  /* Текст */
  --ink: #1a1714;
  --ink-2: #56504a;
  --ink-3: #8c857d;

  /* Линии */
  --line: #ece6de;
  --line-strong: #ddd4c8;

  /* Бренд */
  --brand: #7a4f33;
  --brand-soft: #a9764f;
  --brand-tint: #f6ede3;
  --accent: #d9a566;
  --accent-tint: #fdf5ea;

  /* Семантика */
  --ok: #2f8f5b;
  --ok-tint: #e9f5ee;
  --warn: #c98a1e;
  --warn-tint: #fdf3e0;
  --danger: #c0503f;
  --danger-tint: #fbeceA;

  /* Скругления */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 999px;

  /* Тени — мягкие, «воздушные» */
  --sh-1: 0 1px 2px rgba(26, 23, 20, .04);
  --sh-2: 0 2px 6px rgba(26, 23, 20, .05), 0 12px 28px -16px rgba(26, 23, 20, .16);
  --sh-3: 0 4px 12px rgba(26, 23, 20, .06), 0 28px 60px -30px rgba(26, 23, 20, .28);

  /* Ритм */
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(48px, 7vw, 104px);
  --maxw: 1160px;

  /* Системные гарнитуры — те же, что в приложении (/app работает на дефолтах
     Tailwind). Playfair Display и Inter сняты: декоративная антиква «плясала»
     в мелких блоках с цифрами, а системный стек спокойнее и не требует
     загрузки шрифтов со стороннего домена. */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;

  /* Нативные контролы (чекбоксы, скроллбары) должны следовать за темой,
     иначе в тёмной теме чекбоксы остаются белыми */
  color-scheme: light;
}

/* ---------- 1b. Тёмная тема ---------- */
html.dark {
  color-scheme: dark;

  /* В тёмной теме то же правило, но «светлее» = выше по уровню:
     card светлее и bg, и bg-soft. Раньше card совпадал с bg-soft,
     из-за чего карточки на мягких секциях полностью сливались с фоном. */
  --bg: #17140f;
  --bg-soft: #1c1913;
  --bg-tint: #2d2822;
  --card: #232019;

  --ink: #e2dbcd;
  --ink-2: #b2a89b;
  --ink-3: #857b6f;

  --line: #322c24;
  --line-strong: #423a2f;

  --brand: #d9a566;
  --brand-soft: #e6c28f;
  --brand-tint: #2a2118;
  --accent: #d9a566;
  --accent-tint: #2a2118;

  --ok-tint: #17261d;
  --warn-tint: #2b2214;
  --danger-tint: #2b1a17;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .2);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .25), 0 12px 28px -16px rgba(0, 0, 0, .5);
  --sh-3: 0 4px 12px rgba(0, 0, 0, .3), 0 28px 60px -30px rgba(0, 0, 0, .7);
}

/* ---------- 2. База ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* scroll-padding-top — высота закреплённой шапки: без него переход по якорю
   (#pricing, #faq) ставит заголовок раздела ровно под шапку и прячет его. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 74px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }
svg { display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- 3. Раскладка ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); position: relative; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
/* Соседние мягкие секции — одна сплошная полоса, а не две линии на стыке */
.section--soft + .section--soft { border-top: 0; }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }

.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }

main { flex: 1 0 auto; display: flex; flex-direction: column; }

/* ---------- 4. Типографика ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}

.h1 { font-size: clamp(2rem, 1.35rem + 2.2vw, 3.05rem); }
.h2 { font-size: clamp(1.85rem, 1.2rem + 2.4vw, 3rem); }
.h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); }

.lead {
  font-size: clamp(1.05rem, 1rem + .5vw, 1.28rem);
  color: var(--ink-2);
  line-height: 1.62;
}
.muted { color: var(--ink-3); }
.ital { font-style: italic; color: var(--brand); }

.section-head { max-width: 720px; margin-inline: auto; text-align: center; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head .lead { margin-top: 16px; }

/* ---------- 5. Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  padding: 13px 26px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--sh-2); }
.btn--primary:hover { background: #63402a; box-shadow: var(--sh-3); }

.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--sh-1); }
.btn--ghost:hover { border-color: var(--brand-soft); color: var(--brand); }

.btn--quiet { background: var(--bg-tint); color: var(--ink); }
.btn--quiet:hover { background: var(--brand-tint); color: var(--brand); }

/* Фирменный синий Telegram — одинаковый в обеих темах */
.btn--telegram { background: #2aabee; color: #fff; box-shadow: var(--sh-2); }
.btn--telegram:hover { background: #1d97d6; box-shadow: var(--sh-3); }

.btn--lg { padding: 17px 34px; font-size: 16.5px; }
.btn--sm { padding: 10px 18px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 6. Чипы и бейджи ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border-radius: var(--r-full);
  background: var(--brand-tint);
  border: 1px solid rgba(122, 79, 51, .14);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(47, 143, 91, .18);
}

.badge {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  padding: 5px 14px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: var(--sh-2);
}
.badge--soft { background: var(--accent); color: #422a17; }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--accent-tint);
  border: 1px solid rgba(217, 165, 102, .35);
  color: #8a5d20;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- 7. Шапка (закреплена сверху, полупрозрачная) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  /* Запасной вариант — сплошной фон: если color-mix или backdrop-filter не
     поддерживаются, шапка останется читаемой, просто без прозрачности. */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  /* Размытие обязательно: без него текст страницы просвечивает сквозь пункты
     меню и буквы наезжают друг на друга. */
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* Открытое мобильное меню перекрывает половину экрана — сквозь него читать
   страницу не нужно, поэтому фон снова делается сплошным. */
.topbar:has(.mobile-nav.is-open) {
  background: var(--bg);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--sh-2);
}
.brand__name { font-family: var(--font-serif); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a.nav__link {
  padding: 9px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav__cta { margin-left: 10px; }

.burger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  cursor: pointer;
  color: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  margin-left: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--brand); }

/* Кнопка для узкого экрана: на широком её место занимает та, что в навигации.
   margin-left: auto прижимает её вместе с бургером к правому краю — иначе
   space-between у шапки растащил бы их по разным углам. */
.theme-toggle--mobile { display: none; margin-left: auto; margin-right: 10px; }
.theme-toggle__sun { display: none; }
html.dark .theme-toggle__moon { display: none; }
html.dark .theme-toggle__sun { display: block; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 14px var(--gutter) 22px;
}
.mobile-nav.is-open { display: block; }
/* :not(.btn) обязателен. Иначе правило перебивает кнопку — она ведь тоже
   ссылка, а селектор из класса с элементом весит больше, чем .btn--primary:
   текст съезжал влево (padding 4px вместо 26px), терял белый цвет и получал
   разделительную черту снизу, как обычный пункт меню. */
.mobile-nav a:not(.btn) {
  display: block;
  padding: 13px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn {
  display: flex;
  margin-top: 18px;
  padding: 15px 26px;
  font-size: 15.5px;
}

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .theme-toggle--mobile { display: inline-flex; }
}

.notice-bar {
  background: var(--warn-tint);
  border-bottom: 1px solid rgba(201, 138, 30, .3);
  color: #7a5310;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
  padding: 9px 16px;
}

/* ---------- 8. Герой ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(8px, 1.6vw, 20px) clamp(20px, 3vw, 40px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__actions, .hero .chip, .hero__trust { justify-content: center; }
}

.hero h1 { margin-top: 12px; }
.hero .lead { margin-top: 14px; max-width: 40ch; }
@media (max-width: 940px) { .hero .lead { margin-inline: auto; } }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 13px; color: var(--ink-3); }

.hero > .wrap { position: relative; }

/* ---------- 9. Мокап отчёта в герое ---------- */
.mock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: 22px;
  padding-top: 40px;
  position: relative;
  text-align: left;
  /* Место под висящую снизу подпись: у .hero стоит overflow: hidden */
  margin-bottom: 58px;
}
@media (max-width: 520px) { .mock { margin-bottom: 0; } }
.mock__bar { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mock__file { font-size: 14px; font-weight: 600; }
.mock__meta { font-size: 12px; color: var(--ink-3); }
.mock__dots {
  position: absolute;
  top: 18px; left: 22px;
  display: flex; gap: 7px;
}
.mock__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.mock__dots i:nth-child(1) { background: #ff5f57; }
.mock__dots i:nth-child(2) { background: #febc2e; }
.mock__dots i:nth-child(3) { background: #28c840; }

.mock__score { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.ring { width: 84px; height: 84px; flex: none; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring__track { stroke: var(--bg-tint); }
.ring__fill { stroke: var(--ok); stroke-linecap: round; animation: ringIn 1.6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes ringIn { from { stroke-dashoffset: 226; } }
.ring__val {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 23px; font-weight: 700;
}
.mock__score-title { font-size: 15px; font-weight: 600; }
.mock__score-sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

.mock__list { padding-top: 16px; display: grid; gap: 10px; }
.mock__item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  font-size: 13.5px;
  line-height: 1.45;
}
.mock__item i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.mock__item--danger i { background: var(--danger); }
.mock__item--warn i { background: var(--warn); }
.mock__item--ok i { background: var(--ok); }
.mock__item b { font-weight: 600; }
.mock__item span { color: var(--ink-2); }

/* Подпись висит под карточкой, а не поверх неё: наложение съедало угол мокапа */
.float-note {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  padding: 11px 15px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex; align-items: center; gap: 9px;
}
@media (max-width: 520px) { .float-note { display: none; } }

/* ---------- 10. Карточки и сетки ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
@media (max-width: 940px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.4vw, 30px);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
.card:hover .card__index { color: var(--brand-soft); opacity: .35; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 15px; }

.card__index {
  position: absolute;
  top: 8px; right: 18px;
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 700;
  color: var(--line-strong);
  opacity: .6;
  line-height: 1;
  transition: color .22s ease, opacity .22s ease;
  pointer-events: none;
}

.icon-box {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-tint);
  color: var(--brand);
  margin-bottom: 18px;
}
.icon-box--accent { background: var(--accent-tint); color: #a2762f; }

/* Шаги */
/* Шаги: вместо кружков с соединительной линией — колонки с верхней линейкой.
   Линейка не может «порваться» на любой ширине и читается как единая цепочка. */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

.step { position: relative; padding-top: 22px; border-top: 2px solid var(--line-strong); }
.step::before {
  /* Короткий брендовый акцент поверх линейки — маркер начала шага */
  content: '';
  position: absolute;
  top: -2px; left: 0;
  width: 46px; height: 2px;
  background: var(--brand);
}
.step__num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 15px; }

/* ---------- 12. Тарифы ---------- */
.cycle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: clamp(34px, 4vw, 52px);
  flex-wrap: wrap;
}
.cycle__label { font-size: 14.5px; font-weight: 600; color: var(--ink-3); transition: color .2s ease; display: inline-flex; align-items: center; gap: 9px; }
.cycle__label.is-active { color: var(--ink); }
.switch {
  width: 56px; height: 32px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: var(--bg-tint);
  padding: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.switch__knob {
  display: block;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--brand);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--sh-1);
}
.switch.is-on .switch__knob { transform: translateX(24px); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 28px); align-items: stretch; }
@media (max-width: 940px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 1.9vw, 26px);
  text-align: left;
  transition: box-shadow .22s ease, border-color .22s ease;
}
.plan:hover { box-shadow: var(--sh-2); }
.plan--featured {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
  background: linear-gradient(180deg, var(--card) 0%, var(--card) 40%);
}
.plan__name {
  font-family: var(--font-sans);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.plan__desc { font-size: 13px; color: var(--ink-3); margin-top: 8px; min-height: 38px; line-height: 1.45; }
.plan__price { margin: 16px 0 4px; display: flex; align-items: baseline; gap: 7px; }
.plan__price b {
  font-family: var(--font-sans);
  font-size: clamp(2.1rem, 1.7rem + 1.1vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}
.plan__price span { font-size: 13.5px; color: var(--ink-3); }
.plan__note { font-size: 12px; color: var(--ink-3); min-height: 18px; }
.plan__note s { color: #e0453a; opacity: .9; margin-right: 6px; }
.plan__list {
  margin: 16px 0;
  display: grid;
  align-content: start;
  gap: 9px;
  flex: 1 0 auto;
}
.plan__list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.plan__list svg { flex: none; margin-top: 2px; color: var(--brand-soft); }
.plan__list li.is-locked { color: var(--ink-3); opacity: .75; }

/* Пакеты знаков */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
@media (max-width: 800px) { .packs { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
.pack {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: left;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pack:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.pack--featured { border-color: var(--brand); }
.pack__name { font-family: var(--font-sans); font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.pack__desc { font-size: 13px; color: var(--ink-3); min-height: 38px; }
.pack__price {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 6px 0 16px;
}

/* Enterprise */
/* ---------- Акцентные панели ----------
   Enterprise и финальный CTA делят одну палитру: цвета задаются здесь один раз,
   чтобы блоки не расходились по оттенкам.
   Панель всегда идёт «против» фона страницы: в светлой теме она тёмная,
   в тёмной — светлее фона. Раньше в светлой она была бежевой и терялась
   на бежевой секции тарифов. */
.enterprise, .cta-band {
  --panel-bg: #33261a;
  --panel-line: rgba(217, 165, 102, .28);
  --panel-ink: #fdf8f0;
  --panel-ink-2: rgba(253, 248, 240, .74);
  --panel-brand: #e0b47c;
  --panel-accent: #e6c28f;
  --panel-btn-bg: #d9a566;
  --panel-btn-bg-hover: #e6c28f;
  --panel-btn-ink: #241d12;

  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  border-radius: var(--r-xl);
  color: var(--panel-ink);
}
html.dark .enterprise, html.dark .cta-band {
  --panel-bg: linear-gradient(120deg, #2b2519 0%, #342d22 45%, #2b2318 100%);
  --panel-line: #4a4132;
  --panel-ink: #ede6d8;
  --panel-ink-2: #b8ae9f;
  --panel-brand: #d9a566;
  --panel-accent: #e6c28f;
  --panel-btn-bg: #d9a566;
  --panel-btn-bg-hover: #e6c28f;
  --panel-btn-ink: #241d12;
}
.enterprise h2, .enterprise h3,
.cta-band h2, .cta-band h3 { color: var(--panel-ink); }
.enterprise .ital, .cta-band .ital { color: var(--panel-accent); }
.enterprise .eyebrow, .cta-band .eyebrow { color: var(--panel-brand); }
.enterprise .btn--primary,
.cta-band .btn--primary { background: var(--panel-btn-bg); color: var(--panel-btn-ink); }
.enterprise .btn--primary:hover,
.cta-band .btn--primary:hover { background: var(--panel-btn-bg-hover); }

.enterprise {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: clamp(26px, 3vw, 40px);
  text-align: left;
}
.enterprise .lead--sm { color: var(--panel-ink-2); }
@media (max-width: 880px) { .enterprise { grid-template-columns: 1fr; } }
.enterprise__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; margin-top: 20px; }
@media (max-width: 620px) { .enterprise__list { grid-template-columns: 1fr; } }
.enterprise__list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--panel-ink-2); }
.enterprise__list svg { flex: none; margin-top: 3px; color: var(--panel-accent); }

/* ---------- 13. FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-size: clamp(1rem, .96rem + .3vw, 1.1rem);
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand); }
.faq__icon {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--brand);
  transition: transform .25s ease, background-color .2s ease;
}
.faq details[open] .faq__icon { transform: rotate(45deg); background: var(--brand-tint); }

/* Плавное раскрытие: обёртка тянется по высоте, JS ставит max-height */
.faq__wrap { overflow: hidden; max-height: 0; transition: max-height .32s ease; }
.faq__body { padding: 0 24px 22px; color: var(--ink-2); font-size: 15.5px; }

/* ---------- 14. Финальный CTA ----------
   Цвета берутся из общей палитры акцентных панелей (см. блок выше),
   здесь остаётся только геометрия. */
.cta-band {
  padding: clamp(40px, 6vw, 76px) clamp(24px, 5vw, 64px);
  text-align: center;
}
.cta-band p { color: var(--panel-ink-2); margin: 18px auto 32px; max-width: 54ch; font-size: clamp(1rem, .95rem + .4vw, 1.16rem); }

/* ---------- 15. Подвал ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); margin-top: auto; }
.footer__top {
  display: grid;
  /* Четыре колонки: бренд, «Продукт», «Аккаунт», «Связь». При трёх последняя
     уезжала на вторую строку под бренд и выглядела оторванной. */
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 5vw, 64px);
}
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
.footer__brand p { margin-top: 14px; font-size: 14.5px; color: var(--ink-3); max-width: 34ch; }
.footer h4 { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.footer li + li { margin-top: 10px; }
.footer li a { font-size: 14.5px; color: var(--ink-2); transition: color .18s ease; }
.footer li a:hover { color: var(--brand); }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ---------- 16. Формы / авторизация ---------- */
.auth {
  flex: 1 0 auto;
  display: grid;
  /* Карточка прижата к верху, а не по центру экрана: при центровании над
     заголовком оставалось столько пустоты, что форму приходилось искать. */
  place-items: start center;
  padding: clamp(20px, 2.5vw, 36px) var(--gutter) clamp(36px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}
.auth__card {
  width: 100%;
  max-width: 452px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: clamp(26px, 3.4vw, 40px);
  position: relative;
  z-index: 1;
}
.auth__card--wide { max-width: 520px; }
.auth__title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); text-align: center; }
.auth__sub { text-align: center; color: var(--ink-3); font-size: 14.5px; margin-top: 10px; }
.auth__foot { text-align: center; margin-top: 24px; font-size: 14.5px; color: var(--ink-2); }
.auth__foot a { color: var(--brand); font-weight: 600; }
.auth__foot a:hover { text-decoration: underline; }
/* Связь для тех, кому не пришёл код. Висит под карточкой на всех её
   состояниях, поэтому отделена чертой: это не часть текущего шага, а выход
   из тупика. Тише основного текста, чтобы не спорить с кнопками. */
.auth__help {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.auth__help a { color: var(--brand); font-weight: 600; }
.auth__help a:hover { text-decoration: underline; }

.field { display: block; }
.field + .field, .form > * + * { margin-top: 18px; }
.field label, .label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  font-family: var(--font-sans);
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input::placeholder { color: #b6afa6; }
.input:focus { outline: none; border-color: var(--brand-soft); box-shadow: 0 0 0 4px rgba(169, 118, 79, .14); }
.input--code { text-align: center; letter-spacing: .35em; font-size: 20px; font-weight: 700; }

.form-msg {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  border: 1px solid transparent;
}
.form-msg--error { background: var(--danger-tint); border-color: rgba(192, 80, 63, .25); color: #93392c; }
.form-msg--ok { background: var(--ok-tint); border-color: rgba(47, 143, 91, .25); color: #226b44; }
.form-msg--info { background: var(--accent-tint); border-color: rgba(217, 165, 102, .3); color: #8a5d20; }
.form-msg--warn { background: var(--warn-tint); border-color: rgba(201, 138, 30, .3); color: #7a5310; }
.is-hidden { display: none !important; }

.social { display: grid; gap: 10px; }
.social__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.social__btn:hover { border-color: var(--brand-soft); background: var(--bg-soft); }

.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.divider span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* Сегментированный переключатель канала регистрации */
.segmented { display: flex; gap: 4px; padding: 4px; background: var(--bg-tint); border-radius: var(--r-sm); }
.segmented label { flex: 1; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .seg {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.segmented input:checked + .seg { background: var(--card); color: var(--brand); box-shadow: var(--sh-1); }

.consents { display: grid; gap: 12px; }
.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.consent input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--brand); cursor: pointer; }

/* Согласие со ссылками внутри: галочка ставится только самим чекбоксом.
   Текст не кликабелен — иначе попытка открыть соглашение меняла бы согласие. */
.consent--links { cursor: default; }
.consent--links span { cursor: default; }
.consent--links a { color: var(--brand); text-decoration: underline; }
.consent--links a:hover { text-decoration: none; }
.fineprint { font-size: 12.5px; color: var(--ink-3); text-align: center; line-height: 1.55; }
.fineprint a { color: var(--brand); }
.fineprint a:hover { text-decoration: underline; }

/* ---------- 16b. Ожидание подтверждения в Telegram ---------- */
.tg-wait { text-align: center; padding-top: 8px; }
.tg-wait__title { margin-top: 18px; font-weight: 600; font-size: 16.5px; color: var(--ink); }
.tg-wait__hint { margin-top: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.tg-wait__word {
  margin: 14px 0 12px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .3em;
  text-indent: .3em; /* компенсирует межбуквенный отступ у последнего символа */
  color: var(--brand);
}
.tg-wait .form-msg { text-align: left; }

.spinner {
  width: 34px; height: 34px;
  margin: 0 auto;
  border: 3px solid var(--line);
  border-top-color: #2aabee;
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Тем, кто просил уменьшить анимацию, крутилку не крутим */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--line-strong); }
}

/* ---------- 17. Модальное окно ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(26, 23, 20, .42);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
}
.modal.is-visible { display: flex; }
.modal.is-open { opacity: 1; }
.modal__card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  padding: 28px;
  transform: translateY(10px);
  transition: transform .25s ease;
}
.modal.is-open .modal__card { transform: translateY(0); }
.modal__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal__card p { color: var(--ink-2); font-size: 15px; }
.modal__foot { display: flex; justify-content: flex-end; margin-top: 24px; }

/* ---------- 18. Утилиты (вместо inline-стилей — так страница живёт при строгой CSP) ---------- */
.h2--sm { font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.05rem); }
.section-head--tight { margin-bottom: 32px; }
.lead--sm { margin-top: 12px; font-size: 1rem; }
.icon-box--sm { width: 40px; height: 40px; margin: 0; }

.center { text-align: center; }
.mt-lg { margin-top: clamp(40px, 5vw, 64px); }
.mt-md { margin-top: 28px; }
.mt-sm { margin-top: 14px; }
.divider-line { height: 1px; background: var(--line); border: 0; margin: clamp(40px, 5vw, 64px) 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
