/* B2B-лендинг simple-loyalty-pass.ru — только то, что есть ТОЛЬКО здесь.
 * Общая хрома (шапка, полоса прогресса, типографика героя, подвал) — в
 * /shared/css/page.css: она общая с гостевым лендингом, править надо там.
 *
 * Адресат — управляющий и инвестор, а не кассир: механику операций не
 * показываем, показываем что умеет платформа и в чём сила.
 *
 * Главный приём страницы — КАРТА ПЛАТФОРМЫ: индекс-табы слева, живая сцена
 * справа. Разделы переключает посетитель (или автопоказ, пока он не вмешался),
 * скролл секция не забирает. Виньетки — не скриншоты, а тёмные живые макеты.
 */

/* ======================= ГЕРОЙ ======================= */

/* Обёртка даёт герою запас прокрутки, на котором он ПРИБИТ. Без этого объект
   переворачивался уже за нижней кромкой экрана — то есть в пустоту. */
.hero-wrap {
  height: 190svh;
}

.hero {
  position: sticky;
  top: 0;
  height: 100svh;
  margin-top: -66px;
  padding-top: 66px;
}

.hero-in {
  grid-template-columns: 1fr 380px;
}

/* --- переворот: чек → гость --------------------------------------------- */

.flip-shell {
  --rx: 0deg;
  --ry: 0deg;
  justify-self: end;
  width: 100%;
  max-width: 380px;
  height: min(480px, 62svh);
  perspective: 1600px;
  opacity: 0;
  animation: rise 1000ms var(--ease) 400ms forwards;
}

/* Наклон и переворот разведены: иначе дерутся за один transform и наклон
   теряет плавный переход. Курсор крутит .flip-tilt, скролл — .flip. */
.flip-tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 200ms var(--ease);
}

.flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.face-guest { transform: rotateY(180deg); }

/* Переворот укладываем в первый экран прокрутки — герой в это время прибит,
   поэтому его видно от начала до конца. */
@supports (animation-timeline: scroll()) {
  .flip {
    animation: flip linear both;
    animation-timeline: scroll(root block);
    animation-range: 5svh 85svh;
  }

  @keyframes flip {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(-180deg); }
  }
}

.face-cap {
  margin: 16px 0 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* --- лицо: чек ----------------------------------------------------------- */

.tape-window {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 3px 3px 0 0;
  padding: 22px 24px 24px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}

/* Фактура термобумаги: продольный ворс + неровность тона по краям. */
.tape-window::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.022) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.07));
}

.tape-sheen {
  position: absolute;
  inset: -40% -60%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 236, 196, 0.45) 50%, transparent 58%);
  animation: sheen 7s var(--ease) 1600ms infinite;
}

@keyframes sheen {
  0%, 62% { transform: translateX(-120%); }
  92%, 100% { transform: translateX(120%); }
}

.tape-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-fade);
  padding-bottom: 16px;
}

.tape-head b {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--paper-ink);
}

.t-rows { display: grid; gap: 8px; }

.t {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  color: #4a463f;
}

.t i { font-style: normal; }

.t-dash {
  height: 1px;
  margin: 13px 0;
  background: repeating-linear-gradient(90deg, var(--paper-fade) 0 4px, transparent 4px 8px);
  opacity: 0.6;
}

.t-pay {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--paper-ink);
}

.t-foot {
  margin-top: 20px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--paper-fade);
  text-align: center;
}

.tape-tear {
  height: 12px;
  background: var(--paper);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12'%3E%3Cpath d='M0 0h16v5l-4 4-4-4-4 4-4-4z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12'%3E%3Cpath d='M0 0h16v5l-4 4-4-4-4 4-4-4z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.6));
}

/* --- оборот: гость ------------------------------------------------------- */

.guest-card {
  flex: 1;
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--e-3);
  display: flex;
  flex-direction: column;
}

.g-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.g-ava {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
}

.g-id b {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.g-id span { font-size: 11.5px; color: var(--text-3); }

.g-tier {
  margin-left: auto;
  align-self: flex-start;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid var(--brass-deep);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}

.g-rows {
  margin: 0;
  padding-top: 4px;
  display: grid;
  gap: 1px;
  flex: 1;
  align-content: start;
}

.g-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.g-rows dt { font-size: 12px; color: var(--text-3); letter-spacing: 0.04em; }

.g-rows dd { margin: 0; font-size: 14px; font-weight: 600; text-align: right; }

.g-seg { color: var(--accent); }

/* Атрибуция официанта — то, чего нет ни у кого: подсвечиваем латунью. */
.g-staff { color: var(--brass); }

.g-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.g-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bonus);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 216, 196, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(139, 216, 196, 0); }
}

/* ======================= КАРТА ПЛАТФОРМЫ ======================= */

/* Один экран вместо девяти: слева индекс-табы, справа сцена. Никакого
   прилипания и scroll-timeline — активный раздел переключает класс (tour.js),
   поэтому работает везде одинаково, включая Safari. */
.tour {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), #0c0e11 45%, var(--bg));
}

.tour-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px clamp(28px, 5vw, 90px);
}

/* Подсказка объясняет правило игры секции: сценой можно управлять. */
.tour-hint {
  max-width: 30ch;
  margin: 0 0 64px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-3);
}

.tour-in {
  display: grid;
  grid-template-columns: minmax(230px, 320px) 1fr;
  gap: clamp(28px, 4.5vw, 80px);
  align-items: center;
}

/* --- индекс --------------------------------------------------------------- */

.tt-index {
  display: flex;
  flex-direction: column;
}

.tt-tab {
  appearance: none;
  background: none;
  border: 0;
  border-top: 1px solid var(--line-soft);
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-areas: 'num name' '. sub';
  column-gap: 12px;
  row-gap: 3px;
  padding: 14px 8px 15px 2px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.tt-tab:last-child { border-bottom: 1px solid var(--line-soft); }

.tt-num {
  grid-area: num;
  padding-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-3);
  transition: color var(--t-base) var(--ease);
}

.tt-name {
  grid-area: name;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 1.3vw, 18px);
  letter-spacing: -0.02em;
  color: var(--text-3);
  transition: color var(--t-base) var(--ease), translate var(--t-base) var(--ease);
}

.tt-sub {
  grid-area: sub;
  font-size: 11.5px;
  color: var(--text-3);
  opacity: 0.55;
  transition: opacity var(--t-base) var(--ease);
}

.tt-tab:hover .tt-name { color: var(--text-2); }

.tt-tab.is-on .tt-num { color: var(--brass); }
.tt-tab.is-on .tt-name { color: var(--text-1); translate: 3px 0; }
.tt-tab.is-on .tt-sub { opacity: 1; }

.tt-tab:focus-visible {
  outline: 1px solid var(--brass-deep);
  outline-offset: -1px;
  border-radius: var(--r-xs);
}

/* Стори-таймер автопоказа: полоска живёт только пока показ идёт сам.
   Длительность задаёт tour.js той же константой, что и таймер. */
.tt-prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--brass), var(--bonus));
  transform: scaleX(0);
  transform-origin: left;
}

.tt-tab.is-play .tt-prog {
  animation: tt-prog var(--tt-dur, 6000ms) linear forwards;
}

@keyframes tt-prog {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* --- сцена ---------------------------------------------------------------- */

.tt-stage {
  position: relative;
  perspective: 1800px;
}

/* Латунно-стальное свечение позади сцены: карточка не висит в пустоте. */
.tt-glow {
  position: absolute;
  inset: -10% -14%;
  pointer-events: none;
  background:
    radial-gradient(55% 50% at 62% 34%, var(--brass-glow), transparent 70%),
    radial-gradient(48% 55% at 22% 82%, rgba(57, 112, 143, 0.15), transparent 70%);
}

/* Наклон за курсором — тот же приём, что у чековой ленты героя (tour.js). */
.tt-tilt {
  display: grid;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 300ms var(--ease);
}

/* Экраны лежат в одной ячейке грида: сцена сама держит высоту самого
   высокого, absolute-математики и фиксированных высот нет. */
.tt-scr {
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 360ms var(--ease),
    transform 360ms var(--ease),
    visibility 0s linear 360ms;
}

.tt-scr.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 90ms, 90ms, 0s;
}

.tt-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.1vw, 29px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 9px;
}

.tt-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 66ch;
}

/* --- виньетка: тёмное стекло вместо серого скриншота ---------------------- */

.vig {
  position: relative;
  background: linear-gradient(172deg, var(--surface-2), var(--surface) 58%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--e-3);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-height: 0;
}

/* Латунный блик по верхней кромке — «свет зала» на стекле. */
.vig::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent 8%, rgba(217, 186, 133, 0.4), transparent 92%);
}

.vig-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--line-soft);
}

.vig-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }

.vig-bar span {
  margin-left: 11px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.vig-bar .live {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--bonus);
}

.vig-body {
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

/* Общий вход содержимого: панели виньетки поднимаются друг за другом при
   каждой активации экрана (класс is-on пересобирает анимации). */
.tt-scr.is-on .vig-body > * { animation: vg-in 520ms var(--ease) backwards; }
.tt-scr.is-on .vig-body > :nth-child(1) { animation-delay: 140ms; }
.tt-scr.is-on .vig-body > :nth-child(2) { animation-delay: 240ms; }
.tt-scr.is-on .vig-body > :nth-child(3) { animation-delay: 340ms; }

@keyframes vg-in {
  from { opacity: 0; transform: translateY(12px); }
}

.panel {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  min-height: 0;
}

.panel-t {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.mint { color: var(--bonus); }
.brass { color: var(--brass); }
.dim2 { color: var(--text-3); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.kpi {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 12px;
  display: grid;
  gap: 3px;
}

.kpi span { font-size: 10px; color: var(--text-3); }
.kpi b { font-size: 18px; color: var(--text-1); font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi i { font-size: 10px; font-style: normal; color: var(--text-3); }
.kpi i.up { color: var(--bonus); }
.kpi i.dn { color: var(--danger); }

/* Столбики: вырастают при активации, сталь данных. */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 92px; }

.bars i {
  flex: 1;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  border-radius: 3px 3px 0 0;
  opacity: 0.88;
  transform-origin: bottom;
}

.tt-scr.is-on .bars i { animation: bar-in 640ms var(--ease) backwards; }

@keyframes bar-in {
  from { transform: scaleY(0); }
}

.bars i:nth-child(1) { height: 38%; animation-delay: 300ms; }
.bars i:nth-child(2) { height: 52%; animation-delay: 335ms; }
.bars i:nth-child(3) { height: 44%; animation-delay: 370ms; }
.bars i:nth-child(4) { height: 67%; animation-delay: 405ms; }
.bars i:nth-child(5) { height: 58%; animation-delay: 440ms; }
.bars i:nth-child(6) { height: 79%; animation-delay: 475ms; }
.bars i:nth-child(7) { height: 71%; animation-delay: 510ms; }
.bars i:nth-child(8) { height: 88%; animation-delay: 545ms; }
.bars i:nth-child(9) { height: 64%; animation-delay: 580ms; }
.bars i:nth-child(10) { height: 92%; animation-delay: 615ms; }
.bars i:nth-child(11) { height: 81%; animation-delay: 650ms; }
.bars i:nth-child(12) { height: 100%; animation-delay: 685ms; }

/* Когорты */
.cohort { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }

.c { height: 22px; border-radius: 3px; background: var(--accent-deep); }

.tt-scr.is-on .c { animation: c-in 500ms var(--ease) backwards; }

@keyframes c-in {
  from { opacity: 0; }
}

.c:nth-child(1) { animation-delay: 380ms; } .c:nth-child(2) { animation-delay: 420ms; }
.c:nth-child(3) { animation-delay: 460ms; } .c:nth-child(4) { animation-delay: 500ms; }
.c:nth-child(5) { animation-delay: 540ms; } .c:nth-child(6) { animation-delay: 460ms; }
.c:nth-child(7) { animation-delay: 500ms; } .c:nth-child(8) { animation-delay: 540ms; }
.c:nth-child(9) { animation-delay: 580ms; } .c:nth-child(10) { animation-delay: 620ms; }
.c:nth-child(11) { animation-delay: 540ms; } .c:nth-child(12) { animation-delay: 580ms; }
.c:nth-child(13) { animation-delay: 620ms; } .c:nth-child(14) { animation-delay: 660ms; }
.c:nth-child(15) { animation-delay: 700ms; }

.c9 { opacity: 0.95; } .c8 { opacity: 0.82; } .c7 { opacity: 0.7; }
.c6 { opacity: 0.58; } .c5 { opacity: 0.46; } .c4 { opacity: 0.36; }
.c3 { opacity: 0.26; } .c2 { opacity: 0.18; } .c1 { opacity: 0.1; }

/* Гость 360 */
.g360 { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }

.g360-l {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 14px;
  display: grid;
  justify-items: start;
  gap: 8px;
  align-content: start;
}

.av-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-deep));
}

.g360-l b { font-size: 16px; color: var(--text-1); }

.chip {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  color: var(--text-2);
}

.chip-gold { border-color: var(--brass-deep); color: var(--brass); }

.g360-r { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }

.stat {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 12px;
  display: grid;
  gap: 3px;
}

.stat span { font-size: 10px; color: var(--text-3); }
.stat b { font-size: 17px; color: var(--text-1); font-variant-numeric: tabular-nums; }

/* Леджер: строки входят друг за другом. */
.ledger { display: grid; }

.lg {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 12.5px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line-soft);
}

.lg:last-child { border-bottom: 0; }
.lg b { font-weight: 700; }

.tt-scr.is-on .lg { animation: lg-in 460ms var(--ease) backwards; }

@keyframes lg-in {
  from { opacity: 0; transform: translateX(-10px); }
}

.lg:nth-child(1) { animation-delay: 420ms; }
.lg:nth-child(2) { animation-delay: 520ms; }
.lg:nth-child(3) { animation-delay: 620ms; }
.lg:nth-child(4) { animation-delay: 720ms; }

/* Конструктор сегмента */
.seg-rule { display: grid; gap: 8px; justify-items: start; }

.rule-row { display: flex; gap: 6px; }

.tok {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--text-1);
}

.tok-op {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #eaf2f7;
  letter-spacing: 0.06em;
}

.tok-cmp { background: transparent; color: var(--text-3); }
.tok-val { background: transparent; font-weight: 700; }

/* Условия «набираются» одно за другим. */
.tt-scr.is-on .seg-rule > * { animation: vg-in 420ms var(--ease) backwards; }
.tt-scr.is-on .seg-rule > :nth-child(1) { animation-delay: 320ms; }
.tt-scr.is-on .seg-rule > :nth-child(2) { animation-delay: 440ms; }
.tt-scr.is-on .seg-rule > :nth-child(3) { animation-delay: 560ms; }
.tt-scr.is-on .seg-rule > :nth-child(4) { animation-delay: 680ms; }
.tt-scr.is-on .seg-rule > :nth-child(5) { animation-delay: 820ms; }

.rule-out { margin-top: 4px; font-size: 12px; color: var(--text-2); }
.rule-out b { font-size: 16px; color: var(--text-1); font-variant-numeric: tabular-nums; }
.rule-out span { color: var(--accent); border-bottom: 1px solid rgba(169, 195, 214, 0.35); }

/* RFM */
.rfm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.r {
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  color: #f2f5f7;
  display: grid;
  gap: 2px;
}

.r b { font-size: 16px; }
.r1 { background: #1e7d67; }
.r2 { background: #39708f; }
.r3 { background: #9a6f1c; }
.r4 { background: #4d565f; }
.r5 { background: #56748a; }
.r6 { background: #a04338; }

.tt-scr.is-on .r { animation: vg-in 420ms var(--ease) backwards; }
.r:nth-child(1) { animation-delay: 480ms; } .r:nth-child(2) { animation-delay: 540ms; }
.r:nth-child(3) { animation-delay: 600ms; } .r:nth-child(4) { animation-delay: 660ms; }
.r:nth-child(5) { animation-delay: 720ms; } .r:nth-child(6) { animation-delay: 780ms; }

/* Цепочка: узлы подсвечиваются по ходу сценария. */
.chain { display: flex; align-items: center; gap: 8px; }

.ch-node {
  flex: 1;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.ch-node span {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.ch-node b { font-size: 13px; color: var(--text-1); }
.ch-entry { border-color: rgba(169, 195, 214, 0.4); }
.ch-exit { border-color: rgba(139, 216, 196, 0.4); }
.ch-exit b { color: var(--bonus); }

.tt-scr.is-on .ch-node { animation: node-live 4.8s var(--ease) 900ms infinite; }
.tt-scr.is-on .ch-node:nth-child(3) { animation-delay: 2100ms; }
.tt-scr.is-on .ch-node:nth-child(5) { animation-delay: 3300ms; }
.tt-scr.is-on .ch-node:nth-child(7) { animation-delay: 4500ms; }

@keyframes node-live {
  0%, 18%, 100% { box-shadow: 0 0 0 0 transparent; border-color: var(--line-soft); }
  6% { box-shadow: 0 0 24px -6px var(--brass-glow); border-color: var(--brass-deep); }
}

.ch-arrow {
  width: 18px;
  height: 1px;
  background: var(--line);
  position: relative;
  flex: none;
}

.ch-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  border-left: 5px solid var(--line);
  border-block: 2.5px solid transparent;
}

/* Тайм-лайн броней */
.timeline {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 12px;
}

.tl-h {
  display: grid;
  grid-template-columns: 70px repeat(5, 1fr);
  font-size: 9.5px;
  color: var(--text-3);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.tl-h span:first-child { grid-column: 2; }

.tl-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tl-n { font-size: 11px; color: var(--text-2); }

.ev {
  font-style: normal;
  font-size: 10.5px;
  color: #eef1f4;
  border-radius: 5px;
  padding: 5px 8px;
  white-space: nowrap;
  overflow: hidden;
  transform-origin: left;
}

.tt-scr.is-on .ev { animation: ev-in 560ms var(--ease) backwards; }

@keyframes ev-in {
  from { transform: scaleX(0); opacity: 0; }
}

.e1 { background: #39708f; margin-inline: 4% 62%; animation-delay: 320ms; }
.e2 { background: #2c7d68; margin-inline: 26% 34%; animation-delay: 420ms; }
.e3 { background: #9a6f1c; margin-inline: 48% 8%; animation-delay: 520ms; }
.e4 { background: #56748a; margin-inline: 12% 56%; animation-delay: 620ms; }

/* Screen-pop входящего звонка: всплывает после тайм-лайна. */
.callpop {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--brass-deep);
  border-radius: var(--r-sm);
  padding: 11px 14px;
}

.tt-scr.is-on .callpop { animation: pop-in 560ms var(--ease) 800ms backwards; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
}

.cp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bonus);
  animation: pulse 2s var(--ease) infinite;
}

.callpop b { display: block; font-size: 13px; color: var(--text-1); }
.callpop span { font-size: 10.5px; color: var(--text-3); }

.callpop em {
  margin-left: auto;
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}

/* Конструктор зала */
.vig-floor { grid-template-columns: 54px 1fr 150px; display: grid; gap: 12px; align-content: stretch; }

.palette {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: center;
}

.pal { width: 26px; height: 26px; border: 1.5px solid var(--text-3); }
.pal-r { border-radius: 4px; }
.pal-c { border-radius: 50%; }
.pal-s { border-radius: 4px; width: 32px; height: 18px; }

.pal-t {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.floor {
  position: relative;
  min-height: 210px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 22px);
}

.tbl {
  position: absolute;
  display: grid;
  place-content: center;
  font-size: 11px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1.5px solid #3a4048;
  border-radius: 6px;
  width: 42px;
  height: 42px;
}

.t1 { top: 14%; left: 10%; border-radius: 50%; }
.t2 { top: 12%; left: 34%; width: 34px; height: 34px; }
.t3 { top: 44%; left: 44%; width: 54px; }
.t4 { top: 16%; right: 12%; width: 34px; height: 34px; border-radius: 50%; }
.t5 { bottom: 12%; left: 14%; width: 66px; }
.t6 { bottom: 16%; right: 16%; border-radius: 50%; }

/* Выделенный стол живёт: курсор перетаскивает его — и он возвращается. */
.tbl.sel {
  border-color: var(--brass);
  background: rgba(217, 186, 133, 0.12);
  color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-glow);
}

.tt-scr.is-on .tbl.sel { animation: drag 5.2s var(--ease) 900ms infinite; }

.drag-cur {
  position: absolute;
  top: 44%;
  left: 44%;
  width: 10px;
  height: 10px;
  margin: 34px 0 0 44px;
  border-radius: 50%;
  border: 1.5px solid var(--text-1);
  background: rgba(238, 241, 244, 0.25);
  pointer-events: none;
  opacity: 0;
}

.tt-scr.is-on .drag-cur { animation: drag 5.2s var(--ease) 900ms infinite, cur-show 5.2s linear 900ms infinite; }

@keyframes drag {
  0%, 12% { translate: 0 0; }
  30%, 58% { translate: 26px 18px; }
  76%, 100% { translate: 0 0; }
}

@keyframes cur-show {
  0%, 8% { opacity: 0; }
  12%, 72% { opacity: 1; }
  80%, 100% { opacity: 0; }
}

.zone {
  position: absolute;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.z1 { top: 6px; left: 8px; }
.z2 { bottom: 6px; right: 8px; }

.props {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.pr { display: grid; gap: 2px; }

.pr span {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.pr b { font-size: 13px; color: var(--text-1); }

/* Аукцион */
.auc {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 14px;
}

.auc-l b {
  display: block;
  font-size: 16px;
  color: var(--text-1);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auc-l span { font-size: 11px; color: var(--danger); font-variant-numeric: tabular-nums; }

.auc-bids { display: grid; gap: 6px; }

.bid {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 10px;
}

.bid b { font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }

.tt-scr.is-on .bid { animation: lg-in 460ms var(--ease) backwards; }
.bid:nth-child(1) { animation-delay: 380ms; }
.bid:nth-child(2) { animation-delay: 480ms; }
.bid:nth-child(3) { animation-delay: 580ms; }

/* Лидирующая ставка дышит: аукцион идёт прямо сейчас. */
.bid-win {
  background: rgba(217, 186, 133, 0.1);
  border-color: var(--brass-deep);
  color: var(--brass);
}

.bid-win b { color: var(--brass); }

.tt-scr.is-on .bid-win {
  animation: lg-in 460ms var(--ease) 380ms backwards, win-pulse 2.6s var(--ease) 1200ms infinite;
}

@keyframes win-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 186, 133, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(217, 186, 133, 0); }
}

.mis { margin: 0 0 10px; font-size: 12.5px; color: var(--text-1); }

.prog { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }

.prog i { display: block; height: 100%; width: 66%; background: var(--bonus); border-radius: 3px; }
.prog i.p2 { width: 82%; background: var(--brass); }

/* Прогресс миссий доезжает до значения при активации. */
.tt-scr.is-on .prog i { animation: grow-w 900ms var(--ease) 500ms backwards; }

@keyframes grow-w {
  from { width: 0; }
}

.prog-l { font-size: 10px; color: var(--text-3); margin-top: 5px; display: block; }

/* Развилка отзывов */
.fork { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.fk {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 14px;
  display: grid;
  gap: 6px;
}

.stars { font-size: 15px; letter-spacing: 2px; color: var(--bonus); }
.stars i { font-style: normal; }
.stars-b { color: var(--danger); }

/* Звёзды зажигаются по одной. */
.tt-scr.is-on .stars i { animation: vg-in 300ms var(--ease) backwards; }
.stars i:nth-child(1) { animation-delay: 360ms; }
.stars i:nth-child(2) { animation-delay: 440ms; }
.stars i:nth-child(3) { animation-delay: 520ms; }
.stars i:nth-child(4) { animation-delay: 600ms; }
.stars i:nth-child(5) { animation-delay: 680ms; }

.fk b { font-size: 14px; color: var(--text-1); }
.fk p { margin: 0; font-size: 11.5px; color: var(--text-3); }
.fk-good { border-color: rgba(139, 216, 196, 0.35); }
.fk-bad { border-color: rgba(220, 128, 116, 0.35); }

/* Wi-Fi-портал */
.vig-portal { grid-template-columns: 190px 1fr; display: grid; gap: 16px; align-items: center; align-content: center; }

.pt-phone {
  background: #08090b;
  border-radius: 22px;
  padding: 8px;
  border: 1px solid var(--line);
}

.pt-scr {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px 16px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.pt-h { font-family: var(--font-display); font-size: 15px; color: var(--text-1); }
.pt-p { margin: 0; font-size: 11px; color: var(--text-2); }

.pt-code { display: flex; gap: 6px; margin-top: 6px; }

.pt-code i {
  width: 26px;
  height: 34px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-content: center;
  font-style: normal;
  font-size: 15px;
  color: var(--text-1);
}

/* Код «допечатывается»: три цифры входят по очереди, курсор ждёт четвёртую. */
.tt-scr.is-on .pt-code i { animation: vg-in 300ms var(--ease) backwards; }
.pt-code i:nth-child(1) { animation-delay: 500ms; }
.pt-code i:nth-child(2) { animation-delay: 700ms; }
.pt-code i:nth-child(3) { animation-delay: 900ms; }
.pt-code i:nth-child(4) { animation-delay: 1100ms; }

.pt-cur { border-color: var(--brass) !important; }

.tt-scr.is-on .pt-cur { animation: vg-in 300ms var(--ease) 1100ms backwards, caret 1.2s steps(1) 1400ms infinite; }

@keyframes caret {
  50% { border-color: var(--line); }
}

.pt-hint { font-size: 9.5px; color: var(--text-3); letter-spacing: 0.08em; }

.pt-side { display: grid; gap: 10px; }

/* ======================= ЧТО ЕЩЁ ======================= */

.more-sec { border-top: 1px solid var(--line); }

/* Не сетка коробок, а поток: перечисление должно читаться одним взглядом. */
.more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.more span {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 11px 18px;
  font-size: 14px;
  color: var(--text-2);
  transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}

.more span:hover {
  border-color: var(--brass-deep);
  color: var(--text-1);
  transform: translateY(-2px);
}

/* ======================= SIMPLE MANAGE ======================= */

.loop-sec {
  border-top: 1px solid var(--line);
  background: radial-gradient(70% 80% at 80% 30%, rgba(217, 186, 133, 0.06), transparent 65%), var(--bg);
}

.sm-lead { margin-bottom: 48px; }

.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.case {
  background: var(--surface);
  padding: 26px 24px 28px;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: background var(--t-base) var(--ease);
}

.case:hover { background: var(--surface-2); }

/* Честная разметка: что работает сегодня, а что план (ADR-046, фазы). */
.case-when {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  justify-self: start;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  border: 1px solid;
}

.case-when.now { color: var(--bonus); border-color: rgba(139, 216, 196, 0.4); }
.case-when.next { color: var(--text-3); border-color: var(--line); }

.case h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
}

.case p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }

.sm-note { margin-top: 32px; font-size: 13px; max-width: 72ch; }

/* ======================= ПОЧЕМУ ТАКОГО НЕТ ======================= */

.versus {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }

.vs-them,
.vs-us { background: var(--bg); padding: 34px clamp(20px, 3vw, 40px); }

/* Чужое приглушено и отодвинуто, наше — в фокусе. */
.vs-them { color: var(--text-3); }
.vs-us { background: var(--surface); }

.vs-tag {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--text-3);
}

.vs-us .vs-tag { color: var(--brass); }

.vs p { margin: 0; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.5; }
.vs-us p { color: var(--text-1); }

/* ======================= ЗАЯВКА ======================= */

.lead-sec {
  border-top: 1px solid var(--line);
  background: radial-gradient(90% 120% at 12% 0%, rgba(57, 112, 143, 0.14), transparent 60%), var(--bg);
}

.lead-in {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}

.lead-note { font-size: 12.5px; letter-spacing: 0.04em; margin-top: 24px; }

.lead-form {
  display: grid;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--e-2);
}

.field { display: grid; gap: 8px; }
.field label { font-size: 12px; color: var(--text-3); letter-spacing: 0.06em; }

.field input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 2px;
  font-size: 16px;
  transition: border-color var(--t-base) var(--ease);
}

.field input::placeholder { color: var(--text-3); }
.field input:focus { outline: none; border-bottom-color: var(--brass); }
.field input[aria-invalid='true'] { border-bottom-color: var(--danger); }

/* Ловушка для ботов: снимаем с потока, но НЕ display:none — часть ботов
   такие поля пропускает. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  cursor: pointer;
  margin-top: 6px;
}

.consent input { margin-top: 3px; accent-color: var(--brass); flex: none; }
.consent a { color: var(--brass); text-decoration: underline; text-underline-offset: 2px; }

.lead-submit { justify-self: start; margin-top: 6px; }
.lead-submit[disabled] { opacity: 0.6; cursor: default; }

.form-msg { font-size: 14px; min-height: 1.2em; margin: 0; }
.form-msg.ok { color: var(--bonus); }
.form-msg.err { color: var(--danger); }

/* ======================= АДАПТИВ ======================= */

@media (max-width: 1100px) {
  .tour-in { grid-template-columns: minmax(200px, 250px) 1fr; }
  .cases { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1000px) {
  .hero-in, .lead-in { grid-template-columns: 1fr; }
  .flip-shell { justify-self: start; max-width: 340px; height: 440px; }
  .vs { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }

  /* Узкий экран: контент героя ВЫШЕ экрана (≈1000px против 812) — прибивать
     его нельзя, низ оказался бы недоступен, а height:100svh + align-items:
     center заворачивал верх под шапку и overflow срезал заголовок с эйбровом.
     Поэтому герой здесь течёт по контенту, а шапка стоит НАД ним, а не на нём.
     overflow: clip, а не hidden — hidden сделал бы герой контейнером прокрутки
     и погасил бы таймлайн переворота (та же грабля, что с body). */
  .hero-wrap { height: auto; }

  .hero {
    position: static;
    height: auto;
    min-height: 100svh;
    margin-top: 0;
    padding: 26px 0 76px;
    overflow: clip;
  }

  .hero-in { padding-top: 0; }

  /* Без прибивания таймлайн от корня прокрутил бы переворот вхолостую — ещё до
     того, как чек попал в кадр. Вешаем его на проход самой карточки: переворот
     идёт ровно тогда, когда на неё смотрят. Диапазон монотонный (entry → exit):
     старт, когда карточка вошла на 80%, финиш — пока она ещё в кадре.
     Если таймлайна нет, fill-mode оставит лицо чека — смысл кадра не теряется. */
  @supports (animation-timeline: view()) {
    .flip-shell {
      view-timeline-name: --tape;
      view-timeline-axis: block;
    }

    .flip {
      animation-timeline: --tape;
      animation-range: entry 80% exit 20%;
    }
  }

  .tour-head { grid-template-columns: 1fr; align-items: start; }
  .tour-hint { margin-bottom: 40px; }

  /* Узкий экран: индекс превращается в ленту пилюль над сценой. Механика
     та же (табы + автопоказ), меняется только форма. */
  .tour-in { grid-template-columns: 1fr; gap: 24px; }

  .tt-index {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .tt-index::-webkit-scrollbar { display: none; }

  .tt-tab {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 10px 16px;
    transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
  }

  .tt-tab:last-child { border-bottom: 1px solid var(--line); }
  .tt-sub { display: none; }
  .tt-num { padding-top: 0; }
  .tt-name { font-size: 13px; }
  .tt-tab.is-on { border-color: var(--brass-deep); background: rgba(217, 186, 133, 0.07); }
  .tt-tab.is-on .tt-name { translate: none; }
  .tt-prog { height: 2px; }

  /* Наклон за курсором на таче не живёт. */
  .tt-tilt { transform: none; }

  /* На узком экране виньетки сильно разной высоты: стек в одной ячейке
     оставил бы пустоту под короткими. Кроссфейд меняем на display —
     высота сцены следует за активным экраном. */
  .tt-scr { display: none; }

  .tt-scr.is-on {
    display: grid;
    animation: vg-in 420ms var(--ease);
  }

  .vig-floor, .vig-portal { grid-template-columns: 1fr; }
  .palette { grid-auto-flow: column; justify-content: start; align-items: center; }
  .pt-phone { max-width: 210px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g360 { grid-template-columns: 1fr; }
  .chain { flex-direction: column; align-items: stretch; }
  .ch-arrow { width: 1px; height: 14px; margin-inline: auto; }
  .ch-arrow::after { display: none; }
}

@media (max-width: 620px) {
  .hero-cta { display: grid; }
  .flip-shell { max-width: 100%; }
  .rfm, .grid2, .fork { grid-template-columns: 1fr 1fr; }
  .g360-r { grid-template-columns: 1fr 1fr; }
  .more span { font-size: 13px; padding: 9px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wrap { height: auto; }
  .hero { position: static; height: auto; padding-block: 120px 90px; }
  .flip-shell { opacity: 1; animation: none; height: auto; }
  .tape-sheen { display: none; }

  /* Без переворота обе стороны не показать — оставляем гостя: он и есть
     заявление о силе, а чек без него теряет смысл. */
  .flip { animation: none; transform: rotateY(180deg); }
  .face-tape { display: none; }
  .face-guest { position: static; transform: none; }

  /* Карта платформы: переключение мгновенное, вся жизнь в виньетках замирает.
     Автопоказ не стартует уже в tour.js. */
  .tour *, .tour *::before, .tour *::after {
    animation: none !important;
    transition: none !important;
  }

  .tt-tilt { transform: none; }

  .cp-dot, .g-dot { animation: none; }
}
