/* =========================================================================
   ТЕНвизор — «Живой тур по платформе» (walkthrough)
   Добавлено 2026-06-04. Полностью изолировано: все классы с префиксом .wt-,
   токены берутся из styles.css (:root). Анимации только transform/opacity.
   Уважает prefers-reduced-motion. Откат: убрать <link> walkthrough.css,
   <script> walkthrough.js и HTML-секцию .wt — остальной лендинг не зависит.
   ========================================================================= */

.wt { background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%); }
.wt .inner { max-width: var(--content); margin-inline: auto; padding-inline: var(--pad-x); }
.wt .section-head { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }
.wt .section-head h2 { margin: 12px auto 0; max-width: 18ch; }
.wt-lead { color: var(--muted); max-width: 56ch; margin: 14px auto 0; text-align: center; font-size: 16px; line-height: 1.55; }

/* ---------- вертикальный «спайн», связывающий этапы ---------- */
.wt-flow { position: relative; }
.wt-spine { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 2px; transform: translateX(-50%);
  background: var(--green-soft); border-radius: 2px; overflow: hidden; }
.wt-spine-fill { position: absolute; inset: 0 0 auto 0; height: var(--wt-progress, 0%);
  background: linear-gradient(180deg, var(--green) 0%, var(--green-700) 100%); border-radius: 2px;
  transition: height .12s linear; }

/* ---------- этап ---------- */
.wt-stage { position: relative; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: clamp(28px, 5vw, 72px); padding: clamp(26px, 4vw, 44px) 0; }
.wt-stage + .wt-stage { margin-top: 6px; }
/* чётные — меняем местами визуал и текст (зигзаг) */
.wt-stage:nth-child(even) .wt-visual { order: 2; }
.wt-stage:nth-child(even) .wt-copy   { order: 1; }

/* узел на спайне */
.wt-node { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--green-soft); display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font: 700 15px/1 "Exo 2", system-ui, sans-serif; z-index: 2;
  box-shadow: var(--shadow-sm); transition: border-color .45s, color .45s, transform .45s, box-shadow .45s; }
.wt-stage.wt-on .wt-node { border-color: var(--green); color: var(--green-700);
  box-shadow: 0 0 0 6px rgba(14,165,233,.12); }

/* ---------- копирайт этапа ---------- */
.wt-copy .wt-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--green-700);
  font: 600 12.5px/1 "Inter", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.wt-copy .wt-kicker::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--green); }
.wt-copy h3 { margin: 10px 0 8px; font-size: clamp(20px, 2.6vw, 27px); line-height: 1.18;
  text-wrap: balance; overflow-wrap: break-word; }
.wt-copy p { color: var(--muted); font-size: 15.5px; line-height: 1.6; max-width: 42ch; text-wrap: pretty; }
.wt-stage:nth-child(even) .wt-copy { text-align: right; }
.wt-stage:nth-child(even) .wt-copy p { margin-left: auto; }

/* ---------- общий каркас визуала-мокапа ---------- */
.wt-visual { display: flex; justify-content: center; }
.wt-card { position: relative; width: min(440px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 18px; overflow: hidden; }
.wt-card-head { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line); font: 600 13.5px/1 "Inter", sans-serif; color: var(--ink); }
.wt-card-head .wt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.wt-card-head .wt-grow { margin-left: auto; color: var(--muted-2); font-weight: 500; font-size: 12px; }

/* появление визуала/текста (мягче, чем у hero); скрытое состояние только .has-js */
.has-js .wt-stage .wt-visual,
.has-js .wt-stage .wt-copy { opacity: 0; transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.has-js .wt-stage:nth-child(even) .wt-visual { transform: translateY(26px); }
.has-js .wt-stage.wt-on .wt-visual,
.has-js .wt-stage.wt-on .wt-copy { opacity: 1; transform: none; }
.has-js .wt-stage.wt-on .wt-copy { transition-delay: .08s; }

/* =========================================================================
   1 · ПОИСК ТЕНДЕРОВ
   ========================================================================= */
.wt-search-bar { display: flex; align-items: center; gap: 10px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 11px 16px; color: var(--muted); font-size: 14px; }
.wt-search-bar svg { width: 17px; height: 17px; color: var(--muted-2); flex: none; }
.wt-typed { color: var(--ink); }
.wt-caret { display: inline-block; width: 1.5px; height: 15px; background: var(--green); margin-left: 1px;
  vertical-align: -2px; }
.wt-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0 4px; }
.wt-chip { font: 600 12px/1 "Inter", sans-serif; color: var(--green-700); background: var(--green-soft);
  border-radius: var(--r-pill); padding: 6px 11px; }
.wt-results { margin-top: 12px; display: grid; gap: 8px; }
.wt-result { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: var(--r-md);
  background: var(--surface-2); }
.wt-result .wt-rico { width: 30px; height: 30px; border-radius: 9px; background: var(--green-soft);
  color: var(--green-700); display: flex; align-items: center; justify-content: center; flex: none; }
.wt-result .wt-rico svg { width: 16px; height: 16px; }
.wt-result .wt-rt { font: 600 13px/1.3 "Inter", sans-serif; color: var(--ink); }
.wt-result .wt-rs { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.wt-result .wt-ramt { margin-left: auto; font: 700 13px/1 "Exo 2", sans-serif; color: var(--ink); white-space: nowrap; }

/* =========================================================================
   2 · ИИ СОБИРАЕТ ДАННЫЕ
   ========================================================================= */
.wt-scan-hub { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.wt-scan-ring { position: relative; width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; }
.wt-scan-ring img { width: 26px; height: 26px; z-index: 2; }
.wt-scan-ring::before, .wt-scan-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--green); opacity: 0; }
.wt-scan-htext .a { font: 700 14px/1 "Exo 2", sans-serif; color: var(--ink); }
.wt-scan-htext .b { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.wt-tasks { display: grid; gap: 9px; }
.wt-task { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); }
.wt-task .wt-tbox { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--green-soft);
  display: flex; align-items: center; justify-content: center; flex: none; color: #fff; background: transparent;
  transition: background .5s ease, border-color .5s ease; }
.wt-task .wt-tbox svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4);
  transition: opacity .45s ease, transform .45s cubic-bezier(.34,1.56,.64,1); }
.wt-task.is-done .wt-tbox { background: var(--green); border-color: var(--green); }
.wt-task.is-done .wt-tbox svg { opacity: 1; transform: scale(1); }
.wt-task.is-done { color: var(--ink); }
.wt-task:not(.is-done) { color: var(--muted-2); }
.wt-progress-line { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 16px; overflow: hidden; }
.wt-progress-line i { display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--green), var(--green-700)); }

/* =========================================================================
   3 · КАРТОЧКИ РЕЗУЛЬТАТА
   ========================================================================= */
.wt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wt-mini { background: var(--surface-2); border-radius: var(--r-md); padding: 13px 14px; }
.wt-mini .wt-ml { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.wt-mini .wt-ml svg { width: 14px; height: 14px; }
.wt-mini .wt-mv { font: 700 18px/1.1 "Exo 2", sans-serif; color: var(--ink); margin-top: 7px; }
.wt-mini .wt-mv.ok { color: #16a34a; }
.wt-mini .wt-mv.warn { color: #d97706; }
.wt-mini.span2 { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  background: var(--green-section); color: #fff; }
.wt-mini.span2 .wt-ml { color: rgba(255,255,255,.72); }
.wt-mini.span2 .wt-mv { color: #fff; margin-top: 4px; }
.wt-mini.span2 .wt-mv { white-space: nowrap; }
.wt-mini.span2 .wt-badge { background: rgba(255,255,255,.16); color: #fff; border-radius: var(--r-pill);
  padding: 7px 13px; font: 600 12.5px/1 "Inter", sans-serif; white-space: nowrap; }

/* находка из глубины документа (блок «знает текст каждого документа») */
.wt-find { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 11px 12px;
  border-radius: var(--r-md); background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  font: 500 12.5px/1.45 "Inter", sans-serif; }
.wt-find svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #ea580c; }
.wt-find b { color: #7c2d12; font-weight: 700; }
.wt-task .wt-fname { font: 600 13px/1.3 "Inter", sans-serif; }
.wt-result .wt-ramt.ok { color: #16a34a; }

/* =========================================================================
   4 · БЫСТРЫЙ ОТЧЁТ
   ========================================================================= */
.wt-report .wt-rep-title { font: 700 15px/1.3 "Exo 2", sans-serif; color: var(--ink); margin-bottom: 3px; }
.wt-report .wt-rep-sub { font-size: 11.5px; color: var(--muted-2); margin-bottom: 14px; }
.wt-rep-block { margin-bottom: 13px; }
.wt-rep-h { display: flex; align-items: center; gap: 7px; font: 600 12px/1 "Inter", sans-serif;
  color: var(--green-700); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.wt-rep-h::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.wt-line { height: 9px; border-radius: 5px; background: var(--surface-2); margin: 6px 0; }
.wt-line.w90 { width: 90%; } .wt-line.w70 { width: 70%; } .wt-line.w80 { width: 80%; } .wt-line.w55 { width: 55%; }
.wt-rep-verdict { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 12px 14px;
  border-radius: var(--r-md); background: #ecfdf5; color: #047857; font: 600 13.5px/1.3 "Inter", sans-serif; }
.wt-rep-verdict svg { width: 18px; height: 18px; flex: none; }

/* =========================================================================
   5 · КНОПКА «АНАЛИЗ» + ВОПРОСЫ
   ========================================================================= */
.wt-analyze-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  background: var(--green); color: #fff; border-radius: var(--r-md); padding: 13px; margin-bottom: 16px;
  font: 600 15px/1 "Inter", sans-serif; box-shadow: 0 10px 24px -12px rgba(14,165,233,.7); }
.wt-analyze-btn svg { width: 18px; height: 18px; }
.wt-qa { display: grid; gap: 10px; }
.wt-bubble { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.wt-bubble.user { justify-self: end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; }
.wt-bubble.ai { justify-self: start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 5px;
  display: flex; gap: 9px; }
.wt-bubble.ai .wt-av { width: 27px; height: 27px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex: none;
  overflow: hidden; box-shadow: var(--shadow-sm); }
.wt-bubble.ai .wt-av img { width: 18px; height: 18px; object-fit: contain; }
.wt-typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.wt-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); opacity: .5; }

/* =========================================================================
   6 · ПОДПИСКА НА ПОИСК
   ========================================================================= */
.wt-sub-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r-md);
  background: var(--surface-2); margin-bottom: 14px; }
.wt-sub-row .wt-sico { width: 34px; height: 34px; border-radius: 10px; background: var(--green-soft);
  color: var(--green-700); display: flex; align-items: center; justify-content: center; flex: none; }
.wt-sub-row .wt-sico svg { width: 17px; height: 17px; }
.wt-sub-row .wt-st { font: 600 13.5px/1.3 "Inter", sans-serif; color: var(--ink); }
.wt-sub-row .wt-ss { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.wt-switch { margin-left: auto; width: 40px; height: 23px; border-radius: var(--r-pill); background: var(--muted-2);
  position: relative; flex: none; transition: background .4s; }
.wt-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; transition: transform .4s cubic-bezier(.22,1,.36,1); box-shadow: var(--shadow-sm); }
.wt-stage.wt-on .wt-switch { background: var(--green); }
.wt-stage.wt-on .wt-switch::after { transform: translateX(17px); }
.wt-toasts { display: grid; gap: 8px; }
.wt-toast { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.wt-toast .wt-tbell { width: 28px; height: 28px; border-radius: 8px; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none; }
.wt-toast .wt-tbell svg { width: 15px; height: 15px; }
.wt-toast .wt-tt { font: 600 12.5px/1.3 "Inter", sans-serif; color: var(--ink); }
.wt-toast .wt-ts { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.wt-toast .wt-tnew { margin-left: auto; font: 600 10.5px/1 "Inter", sans-serif; color: var(--green-700);
  background: var(--green-soft); border-radius: var(--r-pill); padding: 5px 9px; }

/* =========================================================================
   АНИМАЦИИ (играют только когда этап в зоне видимости: .wt-on, и только
   при разрешённом движении). Без has-js / при reduce — всё статично и видно.
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  /* 1 · печать запроса */
  .wt-stage.wt-on .wt-caret { animation: wtBlink 1s steps(1) infinite; }
  @keyframes wtBlink { 50% { opacity: 0; } }
  .wt-stage.wt-on .wt-result { animation: wtRise .7s cubic-bezier(.22,1,.36,1) both; }
  .wt-stage.wt-on .wt-result:nth-child(1) { animation-delay: .2s; }
  .wt-stage.wt-on .wt-result:nth-child(2) { animation-delay: .5s; }
  .wt-stage.wt-on .wt-result:nth-child(3) { animation-delay: .8s; }
  @keyframes wtRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  /* 2 · сканирование: пульс колец + прогресс */
  .wt-stage.wt-on .wt-scan-ring::before { animation: wtPulse 2.1s ease-out infinite; }
  .wt-stage.wt-on .wt-scan-ring::after  { animation: wtPulse 2.1s ease-out infinite 1.05s; }
  @keyframes wtPulse { 0% { opacity: .5; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.25); } }
  .wt-stage.wt-on .wt-progress-line i { animation: wtFill 3.8s cubic-bezier(.4,0,.2,1) .3s forwards; }
  @keyframes wtFill { to { width: 100%; } }

  /* галочки задач зажигаются по очереди */
  .wt-stage.wt-on .wt-task { animation: wtTaskOn .01s linear both; }
  .wt-stage.wt-on .wt-task:nth-child(1) { animation-delay: .35s; }
  .wt-stage.wt-on .wt-task:nth-child(2) { animation-delay: .95s; }
  .wt-stage.wt-on .wt-task:nth-child(3) { animation-delay: 1.55s; }
  .wt-stage.wt-on .wt-task:nth-child(4) { animation-delay: 2.15s; }
  @keyframes wtTaskOn { to { } }
  .wt-stage.wt-on .wt-task { /* класс is-done добавляет JS по таймингу выше через CSS-задержку */ }

  /* 3 · мини-карточки появляются стаггером */
  .wt-stage.wt-on .wt-mini { animation: wtPop .62s cubic-bezier(.22,1,.36,1) both; }
  .wt-stage.wt-on .wt-mini:nth-child(1) { animation-delay: .18s; }
  .wt-stage.wt-on .wt-mini:nth-child(2) { animation-delay: .4s; }
  .wt-stage.wt-on .wt-mini:nth-child(3) { animation-delay: .62s; }
  .wt-stage.wt-on .wt-mini:nth-child(4) { animation-delay: .84s; }
  @keyframes wtPop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

  /* 4 · строки отчёта «заполняются» */
  .wt-stage.wt-on .wt-line { animation: wtLineIn .6s ease both; }
  .wt-stage.wt-on .wt-rep-block:nth-child(2) .wt-line { animation-delay: .3s; }
  .wt-stage.wt-on .wt-rep-block:nth-child(3) .wt-line { animation-delay: .7s; }
  .wt-stage.wt-on .wt-rep-verdict { animation: wtRise .7s cubic-bezier(.22,1,.36,1) 1.25s both; }
  @keyframes wtLineIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

  /* 5 · кнопка пульсирует, реплики появляются */
  .wt-stage.wt-on .wt-analyze-btn { animation: wtBtnPulse 2.4s ease-in-out infinite; }
  @keyframes wtBtnPulse { 0%,100% { box-shadow: 0 10px 24px -12px rgba(14,165,233,.7); }
    50% { box-shadow: 0 10px 30px -8px rgba(14,165,233,.95); } }
  .wt-stage.wt-on .wt-bubble { animation: wtRise .6s cubic-bezier(.22,1,.36,1) both; }
  .wt-stage.wt-on .wt-bubble:nth-child(1) { animation-delay: .3s; }
  .wt-stage.wt-on .wt-bubble:nth-child(2) { animation-delay: .9s; }
  .wt-stage.wt-on .wt-bubble:nth-child(3) { animation-delay: 1.55s; }
  .wt-stage.wt-on .wt-typing span { animation: wtBounce 1.1s ease-in-out infinite; }
  .wt-stage.wt-on .wt-typing span:nth-child(2) { animation-delay: .18s; }
  .wt-stage.wt-on .wt-typing span:nth-child(3) { animation-delay: .36s; }
  @keyframes wtBounce { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }

  /* 6 · уведомления выезжают */
  .wt-stage.wt-on .wt-toast { animation: wtSlide .7s cubic-bezier(.22,1,.36,1) both; }
  .wt-stage.wt-on .wt-toast:nth-child(1) { animation-delay: .65s; }
  .wt-stage.wt-on .wt-toast:nth-child(2) { animation-delay: 1.05s; }
  @keyframes wtSlide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
}

/* =========================================================================
   АДАПТИВ
   ========================================================================= */
@media (max-width: 860px) {
  .wt-spine { left: 21px; }
  .wt-stage { grid-template-columns: 1fr; gap: 18px; padding-left: 52px; }
  .wt-stage:nth-child(even) .wt-visual { order: 0; }
  .wt-stage:nth-child(even) .wt-copy   { order: 0; }
  .wt-stage:nth-child(even) .wt-copy,
  .wt-stage:nth-child(even) .wt-copy p { text-align: left; margin-left: 0; }
  .wt-node { left: 21px; top: 26px; transform: translate(-50%, 0); width: 38px; height: 38px; font-size: 13px; }
  .wt-visual { justify-content: flex-start; }
  .has-js .wt-stage:nth-child(even) .wt-visual { transform: translateY(26px); }
  /* кикер вплотную к заголовку, заголовок без рваных переносов */
  .wt-copy h3 { margin-top: 7px; font-size: 21px; }
  /* НМЦК-карточка: цена и бейдж в столбик, ничего не наезжает */
  .wt-mini.span2 { flex-direction: column; align-items: flex-start; gap: 11px; }
  .wt-mini.span2 .wt-badge { align-self: flex-start; }
}
