/* whoisme.top — общее оформление витрины и страниц под поиск.
   Мир страницы: светлый, чуть фиолетовый «бумажный» фон с точечной фактурой,
   один акцент (фиолетовый бренда), шрифт Onest с кириллицей, лежит локально.
   Без куки и сторонних подключений — поэтому и без плашки о куки. */

/* Onest — отдельный файл на каждую толщину (400/500/600/700), а не один переменный:
   WebKit под Windows переменную толщину не рисует вовсе (проверено 09-24), и проверка
   «как в Safari» была бы нечестной. Браузер качает только те толщины, что есть на странице. */
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("/fonts/onest-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 500;
  src: url("/fonts/onest-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("/fonts/onest-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("/fonts/onest-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("/fonts/onest-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 500;
  src: url("/fonts/onest-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("/fonts/onest-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("/fonts/onest-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #efedf8;
  --ink: #1d1b2e;
  --ink-2: #4a4764;
  --ink-3: #6b6886;
  --line: rgba(29, 27, 46, 0.10);
  --accent: #5a45d6;
  --accent-ink: #ffffff;
  --accent-soft: #ebe7ff;
  --accent-deep: #3f2fb0;
  --shadow: 0 1px 2px rgba(40, 30, 110, 0.06), 0 8px 24px -8px rgba(40, 30, 110, 0.18);
  --shadow-lg: 0 2px 4px rgba(40, 30, 110, 0.06), 0 24px 48px -16px rgba(40, 30, 110, 0.28);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg);
  min-height: 100dvh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Фон — один общий неподвижный слой: мягкий свет сверху и точечная сетка,
   гаснущая к краям. Страница едет поверх, стыков между разделами нет. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 45vh at 15% -5%, rgba(122, 98, 240, 0.20), transparent 70%),
    radial-gradient(50vw 40vh at 95% 10%, rgba(214, 110, 190, 0.14), transparent 70%),
    radial-gradient(circle at center, rgba(29, 27, 46, 0.09) 1px, transparent 1.3px) 0 0 / 24px 24px,
    var(--bg);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 70%, rgba(0,0,0,.6) 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 70%, rgba(0,0,0,.6) 100%);
}

::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #c9c3ea transparent; }
a { color: var(--accent); text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px;
  background: var(--ink); color: #fff; border-radius: var(--r-sm); text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── Шапка ─────────────────────────────────────────────── */
/* Шапка — плавающая плашка со скруглением, а не полоса во всю ширину (оунер 09-24:
   «шапка сайта белая полоска… если можно сделать лучше»). Фон страницы под ней
   виден по краям; при прокрутке плашка плотнее и с тенью. */
.top { position: sticky; top: 0; z-index: 20; padding: 10px 0 0; }
/* Полоса над плашкой: без неё при прокрутке в щели мелькал текст страницы
   (критик 09-24). Мягкий переход в цвет фона, плашка остаётся «плавающей». */
.top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 44px; z-index: -1;
               pointer-events: none; background: linear-gradient(to bottom, var(--bg) 50%, rgba(246, 245, 251, 0)); }
.top .wrap { display: flex; align-items: center; gap: 16px; }
.top-bar {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 60px;
  padding: 8px 8px 8px 16px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
  box-shadow: inset 0 0 0 1px rgba(90, 69, 214, 0.10), 0 1px 2px rgba(40, 30, 110, 0.04);
  transition: background-color .3s, box-shadow .3s;
}
.top.is-scrolled .top-bar {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(90, 69, 214, 0.12), 0 12px 32px -12px rgba(40, 30, 110, 0.25);
}
.top-cta { display: flex; gap: 8px; margin-left: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink);
         text-decoration: none; letter-spacing: -0.01em; min-height: 44px; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent);
              display: grid; place-items: center; color: #fff; }
.brand-mark .ico { width: 18px; height: 18px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500;
         padding: 10px 12px; border-radius: var(--r-sm); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--ink); background: rgba(90, 69, 214, 0.07); }
.nav a { white-space: nowrap; }
/* Пункты меню + две кнопки в одну строку помещаются только на широком экране;
   на 1024 они переносились по словам (снимок 09-24). Уже — только кнопки. */
@media (max-width: 1100px) { .nav { display: none; } .top-cta { margin-left: auto; } }

/* ── Кнопки ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 14px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:active { transform: scale(0.97); }
.btn-main { background: var(--accent); color: var(--accent-ink);
            box-shadow: 0 1px 2px rgba(63, 47, 176, .3), 0 10px 24px -10px rgba(63, 47, 176, .7); }
.btn-main:hover { background: var(--accent-deep); }
.btn-soft { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.btn-soft:hover { box-shadow: inset 0 0 0 1px rgba(90, 69, 214, .35), var(--shadow); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 15px; border-radius: 12px; }

/* ── Первый экран ──────────────────────────────────────── */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
h1 {
  font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700;
  text-wrap: balance;
}
h1 .soft { color: var(--accent); }
.lead { font-size: 19px; color: var(--ink-2); max-width: 34em; margin-top: 20px; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.note { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

/* Витрина справа: две карточки из бота лесенкой. В потоке, а не абсолютом —
   иначе при любой длине текста нижняя закрывала верхнюю (снимок 09-24). */
.stage { display: flex; flex-direction: column; padding: 8px 0 16px; }
.chat-card {
  position: relative; width: min(340px, 88%); background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 18px 18px 16px;
}
/* Без поворота: повёрнутый текст браузер пересчитывает, и он выглядит мыльным
   (оунер 09-24: «картинки немножко размыты»). Лесенку держим сдвигом. */
.chat-card.one { align-self: flex-end; z-index: 1; }
.chat-card.two { align-self: flex-start; margin-top: -14px; z-index: 2; }
.chat-head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-3); margin-bottom: 10px; }
.chat-head b { color: var(--ink); font-weight: 600; }
.bot-dot { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.bot-dot .ico { width: 16px; height: 16px; }
.msg-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.quote { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); }
.bars { display: grid; gap: 8px; margin-top: 10px; }
.bar { position: relative; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: #d9d2ff; border-radius: 10px; width: 0; transition: width .9s var(--ease); }
.bar.win i { background: #c3b8ff; }
.bar span { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 14.5px; }
.bar b { font-variant-numeric: tabular-nums; font-weight: 600; }
.tag-demo { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink-3);
            background: var(--surface-2); border-radius: 6px; padding: 2px 8px; margin-left: auto; }

/* ── Разделы ───────────────────────────────────────────── */
section { padding: 88px 0; scroll-margin-top: 96px; }  /* шапка-плашка кончается на ~70px */
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.sec-lead { font-size: 18px; color: var(--ink-2); max-width: 36em; margin-top: 14px; text-wrap: pretty; }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.split.flip { grid-template-columns: 1.1fr 0.9fr; }
.split.flip > :first-child { order: 2; }
.after { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Колода квиза */
.deck { position: relative; height: 470px; max-width: 420px; margin-left: auto; width: 100%; }
.qcard {
  position: absolute; inset: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 22px; display: flex; flex-direction: column;
  transition: transform .6s var(--ease), opacity .45s var(--ease);
}
.qcard[data-pos="1"] { transform: translateY(14px) scale(0.955); opacity: .9; }
.qcard[data-pos="2"] { transform: translateY(28px) scale(0.91); opacity: .7; }
.qcard[data-pos="3"] { transform: translateY(40px) scale(0.87); opacity: 0; }
.qcard.gone { transform: translateX(120%) rotate(12deg); opacity: 0; pointer-events: none; }
/* Порядок наложения без скрипта: первая карточка сверху (скрипт потом ставит свой). */
.qcard:nth-of-type(1) { z-index: 4; } .qcard:nth-of-type(2) { z-index: 3; }
.qcard:nth-of-type(3) { z-index: 2; } .qcard:nth-of-type(4) { z-index: 1; }
.who { display: flex; align-items: center; gap: 12px; }
.ava { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); }
.who b { display: block; font-weight: 600; line-height: 1.3; }
.who small { color: var(--ink-3); font-size: 14px; }
.qtext { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; margin: 18px 0 16px; text-wrap: balance; }
.opts { display: grid; gap: 10px; list-style: none; }
.opt {
  width: 100%; text-align: left; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 0; color: var(--ink);
  background: var(--surface-2); position: relative; overflow: hidden;
  transition: background-color .2s, transform .15s var(--ease);
}
.opt:hover { background: #e4e0f6; }
.opt:active { transform: scale(0.98); }
.opt .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #d9d2ff; transition: width .9s var(--ease); }
.opt.mine .fill { background: #c3b8ff; }
.opt .row { position: relative; display: flex; justify-content: space-between; gap: 12px; }
.opt .pct { font-variant-numeric: tabular-nums; font-weight: 700; opacity: 0; transition: opacity .3s .3s; }
.qcard.voted .opt { cursor: default; }
.qcard.voted .opt:hover { background: var(--surface-2); }
.qcard.voted .pct { opacity: 1; }
.qfoot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-3); }
.qfoot .next { margin-left: auto; }
.qcard:not(.voted) .next { visibility: hidden; }
.deck-end { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
            background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.deck-end h3 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 8px; }
.deck-end p { color: var(--ink-2); margin-bottom: 20px; }

/* Анонимка */
.anon-demo { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px; max-width: 460px; }
.anon-demo label { display: block; font-weight: 600; margin: 14px 0 8px; }
.anon-demo textarea {
  width: 100%; min-height: 104px; resize: none; font: inherit; font-size: 16px; color: var(--ink);
  border: 0; border-radius: 12px; padding: 12px 14px; background: var(--surface-2);
}
.anon-demo textarea::placeholder { color: #807c9c; }
.anon-demo textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.anon-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.anon-meta small { color: var(--ink-3); font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.inbox { margin-top: 18px; display: none; }
.inbox.show { display: block; animation: rise .6s var(--ease); }
.flying { position: fixed; z-index: 40; pointer-events: none; background: var(--accent); color: #fff; border-radius: 14px;
          padding: 10px 14px; font-size: 14px; max-width: 260px; box-shadow: var(--shadow-lg);
          transition: transform .7s var(--ease), opacity .7s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fake-btn { font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }

/* Канал */
.post { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 20px; max-width: 440px; }
.post-btn { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
            border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }

/* Шаги — одной линией, без карточек */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; list-style: none; counter-reset: s; }
.steps li { border-top: 2px solid var(--line); padding-top: 18px; }
.steps li:first-child { border-top-color: var(--accent); }
.steps h3 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.steps h3 .ico { color: var(--accent); }
.steps p { color: var(--ink-2); font-size: 16px; }

/* Вопросы для друзей — превью */
.qlist { columns: 2; column-gap: 40px; margin-top: 36px; list-style: none; }
.qlist li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }

/* FAQ — заголовок слева, вопросы справа */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.faq-grid h2 { position: sticky; top: 96px; }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
          min-height: 60px; padding: 14px 0; font-weight: 600; font-size: 18px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 12px; height: 12px; flex: none; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
                 transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
details p { color: var(--ink-2); padding-bottom: 18px; max-width: 38em; }

/* Финал */
.final { text-align: center; }
.final .box { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 56px 24px; }
.final .cta-row { justify-content: center; }
.final .sec-lead { margin-left: auto; margin-right: auto; }

/* Подвал */
footer { margin-top: auto; padding: 36px 0 44px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer a { color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
footer a:hover { color: var(--accent); }
footer .legal { margin-left: auto; }
footer .chan { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }

/* Страницы под поиск */
.page { padding: 56px 0 24px; }
.page .wrap { max-width: 820px; }
.crumbs { font-size: 14.5px; color: var(--ink-3); margin-bottom: 20px; }
.crumbs a { color: var(--ink-3); }
.prose h2 { font-size: clamp(26px, 3.2vw, 34px); margin: 48px 0 12px; }
.prose p { color: var(--ink-2); margin-top: 12px; max-width: 40em; }
.prose ol, .prose ul { margin: 16px 0 0 1.2em; color: var(--ink); }
.prose li { padding: 6px 0; }
.inline-cta { margin: 36px 0; padding: 24px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.inline-cta p { margin: 0 0 16px; color: var(--ink); font-weight: 500; }

/* Появление при прокрутке: прячем, только когда скрипт точно покажет обратно */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero .wrap, .split, .split.flip, .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .split.flip > :first-child { order: 0; }
  .faq-grid h2 { position: static; }
  .deck { margin: 0 auto; }
  .nav { display: none; }
  .top-cta { margin-left: auto; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 24px; }
  section { padding: 64px 0; }
  .cta-row .btn { flex: 1 1 100%; }
  .qlist { columns: 1; }
  .deck { height: 490px; }
  footer .legal { margin-left: 0; }
  .top .long { display: none; }          /* в шапке — «Telegram» и «MAX» без «Открыть в» */
  .brand-name { display: none; }         /* на телефоне в плашке только значок, иначе две кнопки не влезут */
  .top-bar { padding-left: 10px; }
  .top .btn-sm { padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
