/* Стили сайта Vouchat (marketing / privacy / support).
 * Токены один в один из app/lib/app/theme/design_system.dart и glass.dart:
 * белая поверхность, лавандовый акцент, стеклянные панели, изо-сетка. */
:root {
  --lavender: #aaa4eb;
  --ink: #1a1a1a;
  --ink-muted: #6b6b76;
  --surface: #ffffff;
  --line: #ececf2;
  --panel: #f4f4f6;
  --glass: rgba(255, 255, 255, 0.72);
  --radius-card: 20px;
  --radius-control: 14px;
  --maxw: 1080px;
  --prose: 720px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--surface);
  /* Изо-сетка приложения: горизонтали + две диагонали, очень бледные. */
  background-image:
    repeating-linear-gradient(0deg, rgba(170, 164, 235, 0.06) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(45deg, rgba(170, 164, 235, 0.06) 0 1px, transparent 1px 31.11px),
    repeating-linear-gradient(-45deg, rgba(170, 164, 235, 0.06) 0 1px, transparent 1px 31.11px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--lavender); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 12px; top: -48px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-control); z-index: 50; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 500; text-decoration: none; letter-spacing: 0.2px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; order: 2; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: var(--radius-control); color: var(--ink-muted); font-weight: 500; font-size: 15px; }
.nav a:hover { background: rgba(170, 164, 235, 0.12); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(170, 164, 235, 0.18); }
.lang { position: relative; order: 3; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: #fff; font-size: 15px; font-weight: 500; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--lavender); }
.lang summary svg { width: 18px; height: 18px; flex: none; }
.lang .chev { transition: transform 0.15s ease; }
.lang[open] .chev { transform: rotate(180deg); }
.lang-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); width: min(92vw, 340px); padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: 0 12px 40px rgba(26, 26, 26, 0.12); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.lang-panel a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-size: 15px; }
.lang-panel a:hover { background: var(--panel); }
.lang-panel a[aria-current="true"] { background: rgba(170, 164, 235, 0.18); font-weight: 500; }
.lang-panel .tick { width: 16px; height: 16px; flex: none; }
@media (max-width: 640px) {
  .header .wrap { min-height: 56px; padding-block: 8px; }
  .brand { order: 1; }
  .lang { order: 2; margin-inline-start: auto; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: flex-start; overflow-x: auto; }
  .lang-panel { grid-template-columns: 1fr; max-height: 70vh; overflow-y: auto; }
}

/* ---------- Типографика и общие блоки ---------- */
h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 52px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 18px; font-weight: 500; letter-spacing: 0; }
p { margin: 0; }
.muted { color: var(--ink-muted); }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: var(--radius-card); }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(170, 164, 235, 0.18); border: 1px solid var(--lavender); font-size: 14px; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: var(--radius-control); border: 1.5px solid var(--lavender); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.btn-fill { background: var(--lavender); color: var(--ink); }
.btn-line { background: #fff; color: var(--ink); }
.btn:hover { box-shadow: 0 6px 20px rgba(170, 164, 235, 0.45); transform: translateY(-1px); }
.btn:active { transform: none; }

/* ---------- Marketing ---------- */
.hero { padding-block: clamp(40px, 8vw, 96px) clamp(32px, 6vw, 64px); display: grid; gap: 40px; grid-template-columns: 1.1fr 0.9fr; align-items: center; }
.hero h1 { margin-block: 20px 16px; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-muted); max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.demo { padding: 20px; display: grid; gap: 14px; }
.bubble { max-width: 88%; padding: 12px 16px; border-radius: 18px; font-size: 15px; }
.bubble-user { justify-self: end; background: rgba(170, 164, 235, 0.22); border-end-end-radius: 6px; }
.bubble-bot { justify-self: start; background: var(--panel); border-end-start-radius: 6px; }
.demo-card { padding: 14px 16px; border: 1px solid var(--lavender); border-radius: 16px; background: #fff; display: grid; gap: 4px; }
.demo-card .meta { font-size: 14px; color: var(--ink-muted); }
.section { padding-block: clamp(32px, 6vw, 64px); }
.section > h2 { margin-bottom: 28px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.card { padding: 24px; display: grid; gap: 10px; align-content: start; }
.card p { color: var(--ink-muted); font-size: 15px; }
.icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(170, 164, 235, 0.18); border: 1px solid var(--lavender); }
.icon svg { width: 22px; height: 22px; }
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; padding: 24px; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--lavender); font-weight: 500; }
.steps p { color: var(--ink-muted); font-size: 15px; }
.closing { padding: clamp(28px, 5vw, 48px); text-align: center; display: grid; gap: 14px; justify-items: center; margin-block: 24px 64px; }
.closing p { color: var(--ink-muted); max-width: 36em; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .grid, .steps { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Текстовые страницы (privacy, support) ---------- */
.doc { max-width: var(--prose); margin-inline: auto; padding-block: clamp(32px, 6vw, 64px) 72px; }
.doc h1 { margin-bottom: 12px; }
.doc .updated { color: var(--ink-muted); font-size: 14px; margin-bottom: 24px; }
.doc .intro { font-size: 18px; color: var(--ink-muted); margin-bottom: 28px; }
.toc { padding: 18px 22px; margin-bottom: 36px; }
.toc ol { margin: 8px 0 0; padding-inline-start: 26px; columns: 2; column-gap: 32px; font-size: 15px; }
.toc li { break-inside: avoid; padding-block: 2px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.toc a { text-decoration: none; color: var(--ink-muted); }
.toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lavender); }
.toc strong { font-weight: 500; }
.doc section { margin-top: 36px; }
.doc section h2 { font-size: 24px; margin-bottom: 12px; }
.doc section p + p, .doc section p + ul, .doc section ul + p { margin-top: 12px; }
.doc ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.doc li::marker { color: var(--lavender); }
.contact { padding: 28px; display: grid; gap: 12px; justify-items: start; margin-bottom: 40px; }
.contact .addr { font-size: clamp(18px, 3vw, 24px); font-weight: 500; overflow-wrap: anywhere; }
.faq { display: grid; gap: 10px; margin-top: 16px; }
.faq details { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-control); }
.faq details[open] { border-color: var(--lavender); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--ink-muted); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .ans { padding: 0 18px 16px; color: var(--ink-muted); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); background: var(--glass); padding-block: 24px; font-size: 14px; color: var(--ink-muted); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-decoration-color: var(--lavender); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .header, .footer, .lang { display: none; }
  body { background: #fff; }
}
