/* SafeTe — лёгкий дизайн без фреймворков. Палитра преемственна станции продукта. */

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3fa;
  --text: #182230;
  --muted: #5c6a80;
  --line: #e2e9f2;
  --blue: #3478f6;
  --blue-soft: #e7efff;
  --green: #159b68;
  --green-soft: #e8f8f0;
  --amber: #b7791f;
  --amber-soft: #fff5df;
  --red: #d84d57;
  --red-soft: #fff0f1;
  --shadow: 0 14px 38px rgba(28, 49, 82, .07), 0 2px 6px rgba(28, 49, 82, .04);
  --radius: 14px;
}

:root[data-theme="dark"] {
  --bg: #0e1420;
  --surface: #161f30;
  --surface-2: #1c283d;
  --text: #e6edf7;
  --muted: #93a1b8;
  --line: #273349;
  --blue: #5b93f8;
  --blue-soft: #1d2c4a;
  --green: #3ecf93;
  --green-soft: #14352a;
  --amber: #e0aa4e;
  --amber-soft: #383021;
  --red: #ef7a83;
  --red-soft: #3a2226;
  --shadow: 0 14px 38px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
}

:root[data-theme="dark"] .btn:not(.ghost) { color: #0d1524; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.6vw, 34px); }
h3 { font-size: 19px; }
.section { padding: 72px 0; }
.section + .section { padding-top: 0; }
.center { text-align: center; }
.lead { color: var(--muted); font-size: clamp(17px, 2.2vw, 20px); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); /* фолбэк для браузеров без color-mix */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 22px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; }
.logo .te { color: var(--blue); }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

.theme-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-btn:hover { border-color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 16px;
  border: none; border-radius: 12px; padding: 13px 24px; cursor: pointer;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn.small { padding: 10px 18px; font-size: 14px; border-radius: 10px; line-height: 1.2; }

.burger { display: none; border: none; background: none; color: var(--text); font-size: 22px; cursor: pointer; margin-left: auto; }

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px 18px; gap: 4px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 4px; font-size: 16px; }
  .burger { display: block; }
  .theme-btn { margin-left: 8px; }
}

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin: 18px 0 16px; }
.hero .lead { max-width: 34em; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-soft); color: var(--blue);
  border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 600;
}

.hero-visual { position: relative; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.msg.in { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.out { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg .meta { display: block; font-size: 11px; opacity: .75; margin-top: 4px; }
.hero-note {
  margin-top: 14px; display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; color: var(--muted); line-height: 1.5;
}
.hero-note b { color: var(--text); font-weight: 600; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}

/* ---------- Карточки / сетки ---------- */
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 12px 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .ico {
  width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue);
}
.card .ico.green { background: var(--green-soft); color: var(--green); }
.card .ico.amber { background: var(--amber-soft); color: var(--amber); }

.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ---------- Сравнение (есть/нет) ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.compare .card { padding: 0; overflow: hidden; }
.compare .card h3 { margin: 0; padding: 15px 22px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.compare .yes h3 { background: var(--green-soft); color: var(--green); }
.compare .no h3 { background: var(--red-soft); color: var(--red); }
.compare ul { margin: 0; padding: 16px 22px 20px; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.compare li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.compare .yes li { color: var(--text); }
.compare .no li { color: var(--muted); }

/* ---------- Шаги ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps.cols3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .steps, .steps.cols3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .steps, .steps.cols3 { grid-template-columns: 1fr; } }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; width: 30px; height: 30px; border-radius: 9px;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 14px;
  align-items: center; justify-content: center; margin-bottom: 12px;
}
.step h3 { font-size: 16.5px; margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Схема ---------- */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 20px; }
.diagram svg { width: 100%; height: auto; display: block; }

/* ---------- Тарифы ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 460px)); gap: 22px; justify-content: center; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); position: relative; }
.plan.featured { border-color: var(--blue); border-width: 2px; }
.plan .name { font-weight: 700; font-size: 17px; }
.plan .price { font-size: 34px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -.02em; }
.plan .price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; margin: 18px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "✓"; color: var(--green); font-weight: 700; }
.plan li.muted::before { content: "—"; color: var(--muted); }
.plan li.muted { color: var(--muted); }
.plan .tag {
  position: absolute; top: -13px; right: 22px; background: var(--blue); color: #fff;
  font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 4px 12px;
}

/* ---------- Roadmap ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 14.5px; color: var(--muted); }
.pill b { color: var(--text); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 22px; margin-bottom: 12px;
}
details.faq summary {
  cursor: pointer; font-weight: 600; font-size: 16px; padding: 17px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform .2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .a { color: var(--muted); font-size: 15px; padding: 0 0 18px; max-width: 72ch; }
details.faq .a b { color: var(--text); }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--blue-soft), var(--surface));
  border: 1px solid var(--line); border-radius: 22px; padding: 46px 30px; text-align: center;
}
.cta-band h2 { margin: 0 0 10px; }
.cta-band p { color: var(--muted); margin: 0 0 24px; }

/* ---------- Футер ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 72px; }
.footer .cols { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .col { display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.footer .col .t { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer .copy { margin-top: 34px; color: var(--muted); font-size: 13.5px; }

/* ---------- Юридические документы ---------- */
.doc { padding: 48px 0 80px; }
.doc h1 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 6px; }
.doc .edition { color: var(--muted); margin-bottom: 30px; }
.doc article { font-size: 15.5px; line-height: 1.7; }
.doc article h2 { font-size: 20px; margin: 40px 0 14px; scroll-margin-top: 80px; }
.doc article h3 { font-size: 16.5px; margin: 24px 0 10px; }
.doc article p { margin: 10px 0; }
.doc article ul { margin: 10px 0; padding-left: 22px; }
.doc article li { margin: 5px 0; }
.doc .note {
  background: var(--amber-soft); border-left: 3px solid var(--amber);
  padding: 12px 16px; border-radius: 8px; margin: 18px 0; font-size: 14.5px;
}
.doc table.requisites { border-collapse: collapse; margin: 14px 0; }
.doc table.requisites td { border: 1px solid var(--line); padding: 9px 14px; font-size: 14.5px; }
.doc table.requisites td:first-child { color: var(--muted); background: var(--surface-2); }
.doc .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 28px; }
.doc .toc .t { font-weight: 700; margin-bottom: 8px; }
.doc .toc ol { margin: 0; padding-left: 20px; }
.doc .toc li { margin: 4px 0; font-size: 14.5px; }

/* Плейсхолдеры для заполнения владельцем */
.ph {
  background: var(--amber-soft); color: var(--amber);
  border-bottom: 2px dashed var(--amber); padding: 0 4px; border-radius: 4px;
  font-weight: 600;
}

/* Баннер локальной версии */
.local-banner {
  background: var(--amber-soft); color: var(--amber);
  text-align: center; font-size: 13px; padding: 7px 14px; border-bottom: 1px solid var(--line);
}
.local-banner a { color: inherit; text-decoration: underline; }

/* Мини-таблица «вопрос-ответ» для страницы безопасности */
.qa-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.qa h3 { margin: 0 0 8px; font-size: 16px; }
.qa p { margin: 0; color: var(--muted); font-size: 14.5px; }
.qa p + p { margin-top: 8px; }
