/* Момент — витрина. Ночь над степью и солнце с флага: одна земля, одни чернила, один акцент. */

:root {
  /* Цвет */
  --night: #0d1726;      /* земля страницы */
  --night-2: #14223a;    /* шаг светлее: панели, правая половина первого экрана */
  --night-3: #1c2e4a;    /* ещё шаг: пузыри бота, полосы */
  --night-4: #25395a;    /* наведение, активная полоса */
  --ink: #edf0f4;        /* основной текст — лунный свет */
  --muted: #a8b8cf;      /* второстепенный текст (AA на всех ночных тонах) */
  --sun: #f3b93c;        /* акцент: солнце с флагов Казахстана и Кыргызстана */
  --sun-ink: #1a1405;    /* текст на солнце */
  --sun-soft: #f7cf73;   /* наведение на солнце */
  --paper: #eef1f5;      /* талон записи */
  --paper-ink: #0d1726;
  --paper-muted: #4d5a6c;
  --out: #24426a;        /* исходящий пузырь клиента */
  --live: #7fdca4;       /* «онлайн» */

  /* Шрифт */
  --font: "Geologica", "Segoe UI", system-ui, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.5rem, 1rem + 6.6vw, 7rem);
  --step-say: clamp(1.375rem, 1.05rem + 1vw, 2rem);   /* крупное высказывание, не заголовок */

  /* Сетка */
  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(104px, 14vw, 200px);
  --radius: 4px;

  /* Движение */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --t-press: 140ms;
  --t-ui: 220ms;

  color-scheme: dark;

  /* направление: физические стороны начала/конца строки и знак сдвигов по X */
  --start: left;
  --end: right;
  --dir: 1;
}
[dir="rtl"] {
  --start: right;
  --end: left;
  --dir: -1;
}

/* ---------- арабский: свой шрифт, без отрицательной разрядки, больше интерлиньяжа ---------- */
html[lang="ar"] body { font-family: "Readex Pro", var(--font); line-height: 1.7; }
html[lang="ar"] body * { letter-spacing: 0 !important; }
html[lang="ar"] .hero__title,
html[lang="ar"] .h2,
html[lang="ar"] .pt-name,
html[lang="ar"] .biz__name,
html[lang="ar"] .foot__word { line-height: 1.25; }
html[lang="ar"] .h3,
html[lang="ar"] .how__say,
html[lang="ar"] .statement,
html[lang="ar"] .cta__text,
html[lang="ar"] .tile__big,
html[lang="ar"] .race__verdict,
html[lang="ar"] .card__title { line-height: 1.45; }
html[lang="ar"] .biz__name { line-height: 1.4; }
html[lang="ar"] .biz__btn { gap: 2px; }
html[lang="ar"] .lines .line { padding-bottom: 0.28em; margin-bottom: -0.28em; }
html[lang="ar"] [data-ui] { line-height: 1.55; }

/* ---------- смена языка ---------- */
html.i18n-pending body { opacity: 0; }
body { transition: opacity 200ms ease; }
body > * { transition: opacity 220ms var(--ease-out); }
html.is-relang body > * { opacity: 0; transition-duration: 140ms; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 240ms; animation-timing-function: var(--ease-out); }
.vt-lang .langs { view-transition-name: langs; }
.vt-lang .langs__pill { view-transition-name: langs-pill; transition: none; }
::view-transition-group(langs),
::view-transition-group(langs-pill) { animation-duration: 340ms; animation-timing-function: var(--ease-in-out); }

/* ---------- основа ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--night-4) var(--night); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
input { caret-color: var(--sun); }
button { cursor: pointer; }
svg { display: block; }
::selection { background: var(--sun); color: var(--sun-ink); }

:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; /* taste-skill-ignore: visually-hidden text, not a rule */
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 50;
  background: var(--sun); color: var(--sun-ink); padding: 10px 16px; text-decoration: none; font-weight: 500;
  border-radius: var(--radius);
  transition: transform var(--t-ui) var(--ease-out);
}
.skip:focus { transform: translateY(76px); }

/* ---------- типографика ---------- */
.h2 {
  font-size: var(--step-head);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h3 {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.soft { color: var(--muted); }

/* ссылки: подчёркивание растёт слева */
.link {
  position: relative;
  text-decoration: none;
  padding-block: 2px;
}
.link::after {
  content: "";
  position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: var(--start);
  opacity: 0.9;
  transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) ease;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover::after { transform: scaleX(1); opacity: 1; }
}
.link:focus-visible::after { transform: scaleX(1); opacity: 1; }
.link--big { font-size: var(--step-body); font-weight: 500; }
.tile__small .link, .pt-actions .link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tile__small .link::after, .pt-actions .link::after { display: none; }

/* кнопки: плоские, квадратные углы 4px, нажатие 0.97 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  font-size: var(--step-body);
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) ease, color var(--t-ui) ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--sun { background: var(--sun); color: var(--sun-ink); }
.btn--ghost { background: var(--night-3); color: var(--ink); }
.btn--quiet { background: transparent; color: var(--ink); padding: 0 4px; min-height: 44px; }
.btn--ink { background: var(--paper-ink); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn--sun:hover { background: var(--sun-soft); }
  .btn--ghost:hover { background: var(--night-4); }
  .btn--quiet:hover svg { transform: rotate(-40deg); }
  .btn--ink:hover { background: var(--night-3); }
}
.btn--quiet svg { transition: transform 400ms var(--ease-out); }

/* ---------- раскрытие при прокрутке (видно и без JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] > *,
  .js [data-reveal]:not(:has(> *)) {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: calc(var(--k, 0) * 80ms);
  }
  .js [data-reveal].is-in > *,
  .js [data-reveal].is-in:not(:has(> *)) { opacity: 1; transform: none; }
  /* таблицы и ряды — построчно */
  .js [data-reveal] > .ledger__row { transform: translateY(32px); }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] > * { opacity: 0; transition: opacity 400ms ease; }
  .js [data-reveal].is-in > * { opacity: 1; }
}

/* ---------- маскированный заголовок ---------- */
.lines .line { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] {
    transform: translateY(108%);
    animation: line-up 950ms var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 110ms + 120ms);
  }
  .js .rise {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 700ms var(--ease-out) forwards;
    animation-delay: var(--d, 0ms);
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr;
}
.hero__left {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(48px, 9vw, 72px);
  padding: 16px var(--gutter) 56px;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: var(--step-lead); letter-spacing: -0.02em;
  min-height: 44px;
}
.wordmark__mark { width: 30px; height: 30px; fill: var(--sun); transition: transform 500ms var(--ease-out); }
.wordmark__tick { fill: none; stroke: var(--night); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .wordmark:hover .wordmark__mark { transform: rotate(-8deg) scale(1.06); }
}
.topbar__end { display: flex; align-items: center; gap: 20px; }
.topbar__links { display: flex; gap: 20px; font-size: var(--step-small); }
@media (max-width: 399px) { .topbar__links { display: none; } }

.langs {
  position: relative;
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px;
  background: var(--night-3);
  border-radius: 999px;
  isolation: isolate;
}
.langs__btn {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  min-width: 42px; min-height: 40px; padding: 0 10px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  transition: color var(--t-ui) ease, transform var(--t-press) var(--ease-out);
}
.langs__btn--ar { font-family: "Segoe UI", "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif; font-size: 17px; line-height: 1; }
html[lang="ar"] .langs__btn--ar { font-family: "Readex Pro", system-ui, sans-serif; }
.langs__btn:active { transform: scale(0.94); }
.langs__btn[aria-current="true"] {
  color: var(--sun-ink);
  background-color: var(--sun);
  transition: color var(--t-ui) ease 80ms, background-color 0s linear 300ms, transform var(--t-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .langs__btn:not([aria-current="true"]):hover { color: var(--ink); }
}
.langs__pill {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0;
  width: var(--pill-w, 33%);
  border-radius: 999px;
  background: var(--sun);
  transform: translateX(var(--pill-x, 3px));
  transition: transform 300ms var(--ease-in-out);
}
.topbar__links li:not(:last-child) { display: none; }
.topbar__links a { display: inline-block; padding: 12px 0; font-size: 0.9375rem; }

.hero__title {
  /* самая длинная строка ≈ 10em: размер считается от ширины колонки, чтобы строк было ровно две */
  font-size: clamp(1.625rem, calc((100vw - 2 * var(--gutter)) / var(--h1-em, 10.3)), 5.25rem);
  font-weight: 600;
  line-height: 0.95;
  white-space: nowrap;
  letter-spacing: -0.04em;
}
.hero__lead {
  margin-top: 32px;
  max-width: 44ch;
  font-size: var(--step-body);
  color: var(--ink);
}
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }

.hero__right {
  background: var(--night-2);
  display: grid; place-items: center;
  padding: 40px var(--gutter) 48px;
}
.hero__stage { width: min(100%, 460px); }
.hero__caption {
  margin-top: 16px;
  font-size: var(--step-small);
  color: var(--muted);
  min-height: 1.5em;
}

@media (min-width: 960px) {
  .hero { grid-template-columns: 1.08fr 0.92fr; min-height: 100svh; }
  .hero__title { font-size: min(calc((54vw - 2 * var(--gutter)) / var(--h1-em, 10.3)), 5.5rem); }
  .hero__left { padding: 28px var(--gutter) 64px; }
  .topbar__links { gap: 28px; }
  .topbar__links li:not(:last-child) { display: list-item; }
  .hero__right { padding: 96px var(--gutter); }
}

/* ---------- фрагмент мессенджера (общий для героя и демо) ---------- */
[data-ui] { font-size: 15px; line-height: 1.4; }

.phone, .chat {
  background: var(--night);
  border-radius: 20px;
  overflow: clip;
  display: flex; flex-direction: column;
}
.chathead {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--night-3);
}
.avatar {
  flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sun); color: var(--sun-ink);
  font-weight: 600; font-size: 17px;
}
.chathead__who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chathead__who strong { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chathead__status { position: relative; height: 19px; font-size: 13px; }
.status { position: absolute; inset-inline-start: 0; top: 0; white-space: nowrap; transition: opacity 180ms ease, transform 220ms var(--ease-out); }
.status--on { color: var(--live); }
.status--typing { color: var(--sun); opacity: 0; transform: translateY(6px); }
.is-typing .status--on { opacity: 0; transform: translateY(-6px); }
.is-typing .status--typing { opacity: 1; transform: none; }

.iconbtn {
  flex: none;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  display: grid; place-items: center;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) ease, color var(--t-ui) ease;
}
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) {
  .iconbtn:hover { background: var(--night-4); color: var(--ink); }
  .iconbtn:hover svg { transform: rotate(-30deg); }
}
.iconbtn svg { transition: transform 400ms var(--ease-out); }
[data-hero="pause"] .i-play { display: none; fill: currentColor; stroke: none; }
[data-hero="pause"][aria-pressed="true"] .i-play { display: block; }
[data-hero="pause"][aria-pressed="true"] .i-pause { display: none; }
@media (hover: hover) and (pointer: fine) { [data-hero="pause"]:hover svg { transform: none; } }

.phone__log {
  height: clamp(220px, 34svh, 300px);
  padding: 18px 16px 8px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  overflow: clip;
}
.phone__readout {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px;
  margin-top: 24px;
}
.readout__big { font-size: var(--step-display); font-weight: 600; letter-spacing: -0.04em; color: var(--sun); font-variant-numeric: tabular-nums; line-height: 0.9; }
.readout__note { font-size: var(--step-body); color: var(--ink); max-width: 16ch; line-height: 1.3; }

/* пузыри */
.msg {
  position: relative;
  max-width: 82%;
  padding: 9px 13px 7px;
  border-radius: 18px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.msg p { margin: 0; }
.msg--user { align-self: flex-end; background: var(--out); border-end-end-radius: 6px; transform-origin: var(--end) 100%; }
.msg--bot { align-self: flex-start; background: var(--night-3); border-end-start-radius: 6px; transform-origin: var(--start) 100%; }
.msg p, .hs__t { text-align: start; }
.msg__meta {
  display: flex; justify-content: flex-end; align-items: center; gap: 6px;
  margin-top: 2px;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.msg--user .msg__meta { color: #b9c8de; }
.msg__meta .took { color: var(--sun); }
.ticks { width: 16px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ticks path:last-child { stroke-dasharray: 14; stroke-dashoffset: 14; transition: stroke-dashoffset 300ms var(--ease-out) 450ms; }
.msg.is-read .ticks { color: #7cc4ff; }
.msg.is-read .ticks path:last-child { stroke-dashoffset: 0; }

/* появление пузыря */
@media (prefers-reduced-motion: no-preference) {
  .msg.is-new { animation: bubble-in 320ms var(--ease-out) both; }
  .typing.is-new { animation: bubble-in 240ms var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
  .msg.is-new, .typing.is-new { animation: fade-in 200ms ease both; }
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(0.94); } }
@keyframes fade-in { from { opacity: 0; } }

/* печатает… */
.typing {
  align-self: flex-start;
  display: inline-flex; gap: 5px; align-items: center;
  padding: 14px 16px;
  background: var(--night-3);
  border-radius: 18px; border-end-start-radius: 6px;
  transform-origin: var(--start) 100%;
}
.typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: dot 1s var(--ease-in-out) infinite;
}
.typing i:nth-child(2) { animation-delay: 140ms; }
.typing i:nth-child(3) { animation-delay: 280ms; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: dot-fade 1.2s ease infinite; } }
@keyframes dot-fade { 50% { opacity: 1; } 0%, 100% { opacity: 0.4; } }

/* героический чат: смена сцены */
.phone__log.is-leaving > * { transition: opacity 260ms ease, transform 320ms var(--ease-out); opacity: 0; transform: translateY(-14px); }
.readout__big, .readout__note { transition: opacity 200ms ease; }
.phone__readout.is-dim .readout__big, .phone__readout.is-dim .readout__note { opacity: 0.25; }
@media (prefers-reduced-motion: no-preference) {
  .phone__readout.is-stamp .readout__big { animation: stamp 420ms var(--ease-out); }
}
@keyframes stamp { from { transform: scale(1.18); } }
.readout__big { display: inline-block; transform-origin: 0 80%; }

/* =========================================================
   PROBLEM
   ========================================================= */
.problem { padding: var(--section) var(--gutter) 0; }
.problem__grid {
  display: grid; gap: 56px;
}
.problem__title { max-width: 18ch; }
.problem__text .statement {
  font-size: var(--step-say);
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 30ch;
}
.footnote {
  margin-top: 28px;
  max-width: 46ch;
  font-size: var(--step-small);
  color: var(--muted);
  line-height: 1.5;
}

.ledger { display: grid; gap: 28px; }
.ledger__row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: baseline;
}
.ledger__fig {
  display: grid; grid-template-columns: 1.2em 0.9em; justify-content: start;
  font-size: var(--step-display);
  font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.ledger__fig { direction: ltr; unicode-bidi: isolate; }
.ledger__int { text-align: right; }
.ledger__dec { text-align: left; }
.ledger__cap { grid-column: 1 / -1; margin-top: 8px; font-size: 0.9375rem; color: var(--ink); max-width: 34ch; }
.ledger__row--sun .ledger__fig { color: var(--sun); }

@media (min-width: 720px) {
  .ledger__row { grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; }
  .ledger__cap { grid-column: auto; margin-top: 0; font-size: 1rem; }
}
@media (min-width: 1100px) {
  .problem__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
  .problem__title { grid-column: 1 / -1; max-width: none; margin-bottom: 8px; }
  .problem__text { grid-column: 1 / span 5; align-self: start; padding-top: 12px; }
  .ledger { grid-column: 7 / span 6; gap: 20px; }
  .ledger__row { grid-template-columns: auto minmax(0, 1fr); }
}

/* гонка за клиента */
.race {
  margin-top: clamp(72px, 9vw, 140px);
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(40px, 6vw, 88px) var(--gutter);
  background: var(--night-2);
  display: grid; gap: 40px;
}
.race__list {
  background: var(--night);
  border-radius: 20px;
  padding: 8px 0 12px;
  max-width: 560px;
  width: 100%;
}
.race__bar {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 20px 10px;
  font-weight: 600; font-size: 20px;
}
.race__phoneclock { font-size: 14px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.race__rows { position: relative; }
.crow {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 20px;
  background: var(--night);
  position: relative;
  transition: opacity 400ms ease;
}
.crow__ava {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--night-3); color: var(--ink); font-weight: 600; font-size: 18px;
}
.crow__ava--you { background: var(--sun); color: var(--sun-ink); }
.crow__body { display: flex; flex-direction: column; min-width: 0; }
.crow__top { display: flex; justify-content: space-between; gap: 8px; }
.crow__top b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow__top time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.crow__msg { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 300ms ease; }
.crow__tag {
  font-size: 12px; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  background: var(--night-3); color: var(--muted);
  transition: background-color 300ms ease, color 300ms ease, transform 300ms var(--ease-out);
}
.crow__tag:empty { display: none; }
.crow__tag--hot { background: var(--sun); color: var(--sun-ink); }
.crow__tag--lost { background: transparent; color: #ff9a8a; }
.crow.is-fresh .crow__msg { color: var(--ink); }
.crow.is-lost { opacity: 0.55; }

@media (max-width: 959px) { .race { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 399px) {
  .seg button { padding: 0 14px; font-size: 15px; }
  .seg--tariff button { padding: 0 20px; font-size: 16px; }
}
.race__panel { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.race__meter { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 100%; max-width: 560px; }
.race__clock { display: flex; flex-direction: column; gap: 8px; }
.race__label { font-size: var(--step-small); color: var(--muted); }
.race__val {
  font-size: var(--step-head); font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.race__val--sun { color: var(--sun); }
.race__verdict { font-size: var(--step-lead); line-height: 1.25; min-height: 2.5em; max-width: 26ch; }

@media (min-width: 960px) {
  .race { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
  .race__list { grid-column: 1 / span 6; }
  .race__panel { grid-column: 8 / span 5; }
}

/* сегментный переключатель с бегущей подложкой */
.seg {
  position: relative;
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px;
  background: var(--night-3);
  border-radius: 999px;
  isolation: isolate;
}
.seg button {
  position: relative; z-index: 1;
  border: 0; background: transparent;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 500; white-space: nowrap;
  color: var(--muted);
  transition: color var(--t-ui) ease, transform var(--t-press) var(--ease-out);
}
.seg button:active { transform: scale(0.96); }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] {
  color: var(--sun-ink);
  background-color: var(--sun);
  transition: color var(--t-ui) ease 80ms, background-color 0s linear 300ms, transform var(--t-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .seg button:not([aria-checked="true"]):not([aria-selected="true"]):hover { color: var(--ink); }
}
.seg__pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0;
  width: var(--pill-w, 50%);
  border-radius: 999px;
  background: var(--sun);
  transform: translateX(var(--pill-x, 4px));
  /* сегменты равной ширины (1fr), поэтому едет только transform */
  transition: transform 300ms var(--ease-in-out);
}

/* =========================================================
   HOW
   ========================================================= */
.how {
  padding: var(--section) var(--gutter) 0;
  display: grid; gap: 40px;
}
.how__steps { display: contents; }
.how > .how__steps > .h2 { order: 0; }
.how__aside { order: 1; }
.how__list { order: 2; display: grid; gap: 4px; }
.how__btn {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  width: 100%;
  text-align: start;
  border: 0; background: transparent;
  padding: 20px 0;
  position: relative;
}
@media (prefers-reduced-motion: no-preference) {
  .how__say { transition: color 300ms ease, transform 500ms var(--ease-out); }
  .how__step.is-active .how__say { transform: translateX(calc(6px * var(--dir))); }
}
.how__say {
  font-size: var(--step-say);
  line-height: 1.15; letter-spacing: -0.02em; font-weight: 500;
  color: var(--muted);
  max-width: 22ch;
  transition: color 300ms ease;
}
.how__more { color: var(--muted); max-width: 40ch; font-size: 1rem; }
.how__step.is-active .how__say { color: var(--ink); }
.how__step.is-active .how__more { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .how__btn:hover .how__say { color: var(--ink); }
}

.how__aside { position: relative; }
.how__stage {
  position: relative;
  background: var(--night-2);
  border-radius: 20px;
  padding: 20px;
  min-height: 420px;
  overflow: clip;
  display: grid; align-content: start; gap: 14px;
}
.hs__head { margin: -20px -20px 0; }
.hs__status { font-size: 13px; color: var(--live); }
.hs__body { display: flex; flex-direction: column; gap: 10px; }
.hs__ch { display: block; font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.hs__ch--wa { color: #8fe3b0; }
.hs__ch--tg { color: #9fd0ff; }
.hs__msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 18px;
  transition: opacity 360ms ease, transform 420ms var(--ease-out);
}
.hs__msg--in { align-self: flex-end; background: var(--out); border-end-end-radius: 6px; transform-origin: var(--end) 100%; }
.hs__msg--out { align-self: flex-start; background: var(--night-3); border-end-start-radius: 6px; transform-origin: var(--start) 100%; }
.hs__t { display: block; }
.how__stage .is-enter { animation: bubble-in 440ms var(--ease-out) both; animation-delay: calc(var(--k, 0) * 110ms); }
@media (prefers-reduced-motion: reduce) { .how__stage .is-enter { animation: fade-in 240ms ease both; } }

.hs__price {
  background: var(--night);
  border-radius: 12px;
  padding: 14px 16px;
  transition: opacity 360ms ease, transform 420ms var(--ease-out);
}
.hs__price-title { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.hs__price li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 8px; margin-inline: -8px; border-radius: 6px;
  position: relative;
}
.hs__price li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hs__price li::before {
  content: ""; position: absolute; inset: 0; border-radius: 6px; z-index: -1;
  background: var(--sun); opacity: 0; transform: scaleX(0.4); transform-origin: var(--start);
  transition: opacity 300ms ease, transform 500ms var(--ease-out);
}
.hs__price ul { position: relative; z-index: 0; }
.hs__price li.is-hit { color: var(--sun-ink); }
.hs__price li.is-hit::before { opacity: 1; transform: none; }
.hs__price.is-enter li.is-hit::before { animation: hit 700ms var(--ease-out) 260ms both; }
.hs__price.is-enter li.is-hit { animation: hit-ink 700ms ease 260ms both; }
@keyframes hit { from { opacity: 0; transform: scaleX(0.3); } }
@keyframes hit-ink { from { color: var(--ink); } }

.hs__handoff {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--paper); color: var(--paper-ink);
  border-radius: 12px;
  padding: 14px 16px;
  transition: opacity 360ms ease, transform 480ms var(--ease-out);
}
.hs__handoff-title { font-weight: 600; }


@media (min-width: 1100px) {
  .how { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
  .how__steps { display: block; grid-column: 1 / span 5; }
  .how__aside { grid-column: 7 / span 6; height: 100%; }
  .how__stage { position: sticky; top: 14vh; min-height: 520px; padding: 28px; }
  .hs__head { margin: -28px -28px 4px; }
  .how__list { margin-top: 24px; gap: 0; }
  .how { row-gap: 0; }
  .how__step { min-height: 62vh; display: flex; align-items: center; }
  .how__step:first-child { min-height: 52vh; align-items: flex-start; }
  .how__step:last-child { min-height: 52vh; }
}

/* =========================================================
   TARIFFS
   ========================================================= */
.tariffs { padding: var(--section) var(--gutter) 0; }
.tariffs__lead { margin-top: 20px; max-width: 46ch; color: var(--ink); }
.tariffs__table { margin-top: 56px; }

.ptable { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.ptable th, .ptable td { text-align: start; vertical-align: top; padding: 20px 24px; font-weight: 400; }
.ptable thead th { padding-top: 28px; padding-bottom: 28px; vertical-align: bottom; }
.ptable .pt-corner { font-size: var(--step-lead); color: var(--muted); }
.pt-name { display: block; font-size: var(--step-head); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.pt-pitch { display: block; margin-top: 14px; font-size: 1rem; line-height: 1.45; max-width: 36ch; }
.ptable tbody th { font-size: var(--step-body); line-height: 1.3; letter-spacing: -0.01em; }
.ptable tbody td { font-size: var(--step-body); line-height: 1.3; }
.ptable tbody tr:nth-child(odd) > * { background: var(--night-2); }
.ptable .is-rec { background: var(--sun) !important; color: var(--sun-ink); }
.ptable tbody .is-rec { background: #eeb12f !important; }
.ptable tbody tr:nth-child(even) .is-rec { background: var(--sun) !important; }
.ptable .pt-no { color: var(--muted); }
.ptable .is-rec .pt-no { color: #4a3a12; }
.ptable tfoot td { padding-top: 28px; padding-bottom: 32px; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.ptable thead .is-rec { border-radius: 8px 8px 0 0; }
.ptable tfoot .is-rec { border-radius: 0 0 8px 8px; }
.is-rec .link { color: var(--sun-ink); }
.pt-row-cell { transition: background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .ptable tbody tr:hover > *:not(.is-rec) { background: var(--night-3); }
}

/* телефон: тарифы блоками */
.pblocks { display: grid; gap: 40px; }
.pblock { background: var(--night-2); border-radius: 8px; padding: 24px 20px; }
.pblock.is-rec { background: var(--sun); color: var(--sun-ink); }
.pblock .pt-name { font-size: 2.5rem; }
.pblock dl { margin-top: 24px; display: grid; gap: 16px; }
.pblock dt { font-size: 1rem; color: var(--muted); }
.pblock.is-rec dt { color: #4a3a12; }
.pblock dd { font-size: 1.0625rem; font-weight: 500; }
.pblock .pt-actions { margin-top: 28px; flex-direction: column; align-items: stretch; }
.pblock .pt-actions .btn { width: 100%; }
.pblock .pt-actions .link { align-self: flex-start; padding: 10px 0; }
.tariffs__table .ptable { display: none; }
@media (min-width: 900px) {
  .tariffs__table .ptable { display: table; }
  .tariffs__table .pblocks { display: none; }
}

/* =========================================================
   DEMO
   ========================================================= */
.demo { padding: var(--section) var(--gutter) 0; }
.demo__head { display: grid; gap: 20px; justify-items: start; }
.demo__lead { max-width: 46ch; }
.seg--tariff { margin-top: 8px; }
.seg--tariff button { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }

.demo__grid { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.demo__chat, .demo__side, .card, .biz { min-width: 0; }
.demo__side { display: contents; }
.biz { order: 0; }
.demo__chat { order: 1; }
.card { order: 2; }

/* список бизнесов — крупные имена */
.biz { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.biz__btn {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: start;
  padding: 14px 14px 14px 16px;
  border: 0; border-radius: 8px;
  background: var(--night-2);
  color: var(--muted);
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease, transform var(--t-press) var(--ease-out);
}
.biz__btn:active { transform: scale(0.97); }
.biz__name { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.biz__kind { font-size: 0.875rem; }
.biz__btn[aria-selected="true"] { background: var(--night-3); color: var(--ink); }
.biz__btn[aria-selected="true"] .biz__kind { color: var(--muted); }
.biz__marker {
  position: absolute; inset-inline-start: 0; top: 0; width: 4px; border-radius: 2px;
  background: var(--sun);
  transition: transform 340ms var(--ease-in-out);
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .biz__btn:not([aria-selected="true"]):hover { color: var(--ink); background: var(--night-3); }
}

.card {
  margin-top: 4px;
  background: var(--night-2);
  border-radius: 8px;
  padding: 22px 20px;
}
.card__inner { display: grid; gap: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .card__inner.is-new > * { animation: rise 520ms var(--ease-out) both; }
  .card__inner.is-new > *:nth-child(2) { animation-delay: 60ms; }
  .card__inner.is-new > *:nth-child(3) { animation-delay: 120ms; }
  .card__inner.is-new > *:nth-child(4) { animation-delay: 180ms; }
}
.card__title { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.card__meta { font-size: 0.9375rem; color: var(--muted); display: grid; gap: 2px; }
.card__prices { display: grid; gap: 2px; }
.card__prices li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; font-size: 1rem; }
.card__prices span:first-child { min-width: 0; }
.card__prices span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; }
.card__note { font-size: 0.9375rem; color: var(--muted); }

/* окно чата */
.chat {
  height: min(72svh, 620px);
  min-height: 500px;
  background: var(--night-2);
}
.chathead--big { padding: 14px 10px 14px 16px; flex-wrap: wrap; row-gap: 8px; }
.modebadge {
  order: 3; flex-basis: 100%;
  font-size: 12.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.modebadge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .modebadge.is-new { animation: rise 400ms var(--ease-out) both; }
}
.chat__log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 16px 12px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--night-4) transparent;
}
.chat__log:focus-visible { outline-offset: -3px; }
.chat__log > :first-child { margin-top: auto; }
.chat__log.is-swapping { opacity: 0; transform: translateY(8px); }
.chat__log { transition: opacity 180ms ease, transform 260ms var(--ease-out); }

.chat__chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 14px 4px;
}
@media (max-width: 599px) {
  /* на телефоне подсказки — одна строка с прокруткой, чтобы переписке хватало места */
  .chat__chips {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; scroll-snap-type: x proximity;
    padding-bottom: 6px;
  }
  .chat__chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; white-space: nowrap; scroll-snap-align: start; }
}
.chip {
  border: 0;
  background: var(--night-3);
  color: var(--ink);
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px; line-height: 1.25;
  text-align: start;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease, transform var(--t-press) var(--ease-out), opacity var(--t-ui) ease;
}
.chip:active { transform: scale(0.95); }
.chip:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .chip:not(:disabled):hover { background: var(--sun); color: var(--sun-ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .chip.is-new { animation: rise 380ms var(--ease-out) both; animation-delay: calc(var(--k, 0) * 50ms); }
  .chip.is-sent { animation: chip-sent 360ms var(--ease-out); }
}
@keyframes chip-sent { 40% { transform: scale(0.92); background: var(--sun); color: var(--sun-ink); } }

.chat__form {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px 12px 14px;
}
.chat__input {
  flex: 1; min-width: 0;
  min-height: 48px;
  padding: 0 18px;
  border: 0; border-radius: 999px;
  background: var(--night-3);
  font-size: 16px;
  transition: background-color var(--t-ui) ease, outline-color var(--t-ui) ease;
  outline: 2px solid transparent; outline-offset: 0;
}
.chat__input::placeholder { color: var(--muted); opacity: 1; }
.chat__input:focus { background: var(--night-4); outline-color: var(--sun); }
.chat__send {
  flex: none;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: var(--sun); color: var(--sun-ink);
  display: grid; place-items: center;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) ease, opacity var(--t-ui) ease;
}
.chat__send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chat__send:active { transform: scale(0.9); }
.chat__send:disabled { opacity: 0.5; cursor: default; }
@media (hover: hover) and (pointer: fine) { .chat__send:not(:disabled):hover { background: var(--sun-soft); } }
@media (prefers-reduced-motion: no-preference) {
  .chat__send.is-fly svg { animation: fly 420ms var(--ease-out); }
}
[dir="rtl"] .chat__send svg,
[dir="rtl"] .tile__arrow,
[dir="rtl"] [data-chat="reset"] svg,
[dir="rtl"] [data-race="replay"] svg { scale: -1 1; }
@keyframes fly { 45% { transform: translateX(14px); opacity: 0; } 46% { transform: translateX(-14px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ошибка сети */
.msg--error { align-self: flex-start; background: transparent; padding: 4px 0; max-width: 100%; color: var(--ink); }
.msg--error p { color: #ffb4a6; }
.msg--error .btn { margin-top: 8px; min-height: 40px; padding: 0 16px; font-size: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .msg--error.is-new { animation: nudge 380ms var(--ease-out) both; }
}
@keyframes nudge { 0% { opacity: 0; transform: translateX(calc(-10px * var(--dir))); } 60% { opacity: 1; transform: translateX(calc(3px * var(--dir))); } 100% { transform: none; } }

/* талон записи — момент «вау» */
.ticket {
  align-self: flex-start;
  position: relative;
  width: min(100%, 340px);
  margin: 6px 0 4px;
  background: var(--paper); color: var(--paper-ink);
  border-radius: 14px;
  padding: 18px 18px 16px;
  overflow: clip;
  transform-origin: var(--start) 100%;
}
.ticket__head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.ticket__check {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper-ink); color: var(--sun);
  display: grid; place-items: center;
}
.ticket__check svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ticket__check path { stroke-dasharray: 24; stroke-dashoffset: 0; }
.ticket dl { margin-top: 14px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.ticket dt { color: var(--paper-muted); font-size: 13px; padding-top: 2px; }
.ticket dd { font-weight: 500; overflow-wrap: anywhere; }
.ticket__foot {
  margin-top: 14px; padding-top: 12px;
  border-top: 2px dashed #c3cad4;
  font-size: 13px; color: var(--paper-muted);
}
.ticket__stamp {
  position: absolute; inset-inline-end: 12px; top: 12px;
  padding: 4px 10px;
  border: 2.5px solid #c98a0a; border-radius: 6px;
  color: #a86f00; font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
  transform: rotate(calc(-9deg * var(--dir)));
}
@media (prefers-reduced-motion: no-preference) {
  .ticket.is-new { animation: ticket-in 620ms var(--ease-drawer) both; }
  .ticket.is-new .ticket__check path { animation: draw 420ms var(--ease-out) 380ms both; }
  .ticket.is-new dl > * { animation: rise 420ms var(--ease-out) both; }
  .ticket.is-new dl > :nth-child(1), .ticket.is-new dl > :nth-child(2) { animation-delay: 260ms; }
  .ticket.is-new dl > :nth-child(3), .ticket.is-new dl > :nth-child(4) { animation-delay: 330ms; }
  .ticket.is-new dl > :nth-child(5), .ticket.is-new dl > :nth-child(6) { animation-delay: 400ms; }
  .ticket.is-new .ticket__foot { animation: rise 420ms var(--ease-out) 480ms both; }
  .ticket.is-new .ticket__stamp { animation: stamp-in 380ms var(--ease-out) 640ms both; }
}
@media (prefers-reduced-motion: reduce) {
  .ticket.is-new { animation: fade-in 300ms ease both; }
}
@keyframes ticket-in { from { opacity: 0; transform: translateY(28px) scale(0.92) rotate(calc(-1.5deg * var(--dir))); } }
@keyframes draw { from { stroke-dashoffset: 24; } }
@keyframes stamp-in { 0% { opacity: 0; transform: rotate(calc(-9deg * var(--dir))) scale(1.6); } 70% { opacity: 1; transform: rotate(calc(-9deg * var(--dir))) scale(0.94); } 100% { transform: rotate(calc(-9deg * var(--dir))) scale(1); } }

@media (min-width: 1000px) {
  .demo__head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
  .demo__head .h2 { grid-column: 1 / span 6; }
  .demo__lead { grid-column: 1 / span 5; }
  .seg--tariff { grid-column: 8 / span 5; grid-row: 1 / span 2; justify-self: end; align-self: end; }
  .demo__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; margin-top: 56px; }
  .demo__side { display: block; grid-column: 1 / span 5; grid-row: 1; }
  .demo__chat { grid-column: 6 / span 7; grid-row: 1; }
  .biz { grid-template-columns: 1fr; gap: 0; padding-inline-start: 0; }
  .biz__marker { display: block; }
  .biz__btn { background: transparent; padding-block: 10px; padding-inline: 28px 0; border-radius: 0; }
  .biz__btn[aria-selected="true"] { background: transparent; }
  .biz__name { font-size: var(--step-head); line-height: 1.02; }
  .biz__kind { font-size: 0.9375rem; }
  @media (hover: hover) and (pointer: fine) {
    .biz__btn:not([aria-selected="true"]):hover { background: transparent; }
  }
  .card { margin-top: 32px; margin-inline-start: 28px; }
  .chat { height: 700px; }
}

/* =========================================================
   NICHES
   ========================================================= */
.niches { padding: var(--section) var(--gutter) 0; }
.niches__head { display: grid; gap: 20px; }
.niches__head .h2 { max-width: 22ch; }
.niches__note { max-width: 40ch; }
.niches__list { margin-top: 48px; display: grid; gap: 4px; }
.band {
  display: grid; gap: 8px;
  padding: 18px 16px;
  border-radius: 8px;
  background: var(--night-2);
  transition: background-color var(--t-ui) ease;
}
.band:nth-child(even) { background: var(--night-3); }
.band__name { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.band__q {
  justify-self: start;
  max-width: 100%;
  background: var(--out);
  padding: 8px 14px;
  border-radius: 16px; border-end-end-radius: 5px;
  font-size: 15px;
  transition: transform 300ms var(--ease-out), background-color var(--t-ui) ease, color var(--t-ui) ease;
}
@media (hover: hover) and (pointer: fine) {
  .band:hover { background: var(--night-4); }
  .band:hover .band__q { transform: translateX(calc(-6px * var(--dir))); background: var(--sun); color: var(--sun-ink); }
}
@media (min-width: 900px) {
  .niches__head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
  .niches__head .h2 { grid-column: 1 / span 7; }
  .niches__note { grid-column: 9 / span 4; }
  .band { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; min-height: 84px; padding: 14px 24px; }
  .band__name { font-size: 1.625rem; }
  .band__q { justify-self: end; }
}

/* =========================================================
   CTA
   ========================================================= */
.cta {
  padding: var(--section) var(--gutter) calc(var(--section) + 48px);
  display: grid; gap: 48px;
}
.cta__sub { margin-top: 16px; max-width: 40ch; color: var(--muted); }
.cta__photo figcaption { margin-top: 12px; font-size: var(--step-small); color: var(--muted); }
.cta__frame { overflow: clip; border-radius: 8px; aspect-ratio: 4 / 3; background: var(--night-2); }
.cta__frame img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.08); transition: transform 1600ms var(--ease-out); }
.cta__photo.is-in .cta__frame img, .cta__photo:not([data-reveal]) .cta__frame img { transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .cta__frame img { transform: none; transition: none; } }
@media (min-width: 960px) {
  .cta { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
  .cta__copy { grid-column: 1 / span 5; }
  .cta__photo { grid-column: 7 / span 6; }
}
.cta__text {
  font-size: var(--step-say);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 30ch;
}
.cta__actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* =========================================================
   FOOTER
   ========================================================= */
.foot {
  display: grid; gap: 6px;
  grid-template-columns: 1fr 1fr;
  padding: 0 var(--gutter) var(--gutter);
}
.tile {
  background: var(--night-2);
  border-radius: 8px;
  padding: 20px;
  min-height: 150px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  text-decoration: none;
}
.tile__lead { font-size: 1.125rem; line-height: 1.35; }
.tile__small { font-size: var(--step-small); color: var(--muted); }
.tile--word { grid-column: 1 / -1; background: var(--ink); color: var(--night); min-height: 160px; align-items: center; justify-content: center; }
.foot__word { font-size: clamp(4.5rem, 1rem + 15vw, 13rem); font-weight: 600; letter-spacing: -0.04em; line-height: 0.9; }
.tile--sun {
  grid-column: 1 / -1;
  background: var(--sun); color: var(--sun-ink);
  min-height: 180px;
  transition: background-color var(--t-ui) ease, transform var(--t-press) var(--ease-out);
}
.tile--sun:active { transform: scale(0.985); }
.tile__big { font-size: var(--step-say); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
.tile__arrow { align-self: flex-end; width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .tile--sun:hover { background: var(--sun-soft); }
  .tile--sun:hover .tile__arrow { transform: translate(6px, -6px); }
}
.tile--nav ul { display: grid; gap: 4px; }
.tile--nav a { display: inline-block; padding: 6px 0; }
.tile--time { position: relative; overflow: clip; isolation: isolate; background: #0a1120; }
.tile--time b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tile--time span { color: #c9d2de; }
.tile--time .tile__small { color: #c9d2de; }
.tile__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; z-index: -2; opacity: 0.55; }
.tile--time::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(8, 13, 24, 0.45); }
.tile--say .tile__small { line-height: 1.5; }
.tile--mail { justify-content: flex-end; align-items: flex-start; }
.tile--mail .link { display: inline-block; padding: 6px 0; font-size: 1.25rem; }
.tile--say { grid-column: 1 / -1; }
.tile--time { grid-column: 1 / -1; min-height: 180px; }

@media (min-width: 900px) {
  .foot { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; padding: 0 var(--gutter) var(--gutter); }
  .tile { min-height: 220px; padding: 24px; }
  .tile--say { grid-column: 1 / span 4; grid-row: 1; }
  .tile--nav { grid-column: 5 / span 2; grid-row: 1; }
  .tile--time { grid-column: 7 / span 3; grid-row: 1; }
  .tile--mail { grid-column: 10 / span 3; grid-row: 1; }
  .tile--word { grid-column: 1 / span 8; grid-row: 2; min-height: 320px; }
  .tile--sun { grid-column: 9 / span 4; grid-row: 2; min-height: 320px; }
  .tile__big { font-size: var(--step-say); }
  .tile__lead { font-size: 1.25rem; }
  .foot__word { font-size: clamp(5rem, 1rem + 9vw, 11rem); }
}


/* =========================================================
   PROMO VIDEO — ролик в рамке телефона: постер, автозапуск без звука в зоне видимости
   ========================================================= */
.promo {
  padding: var(--section) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 1fr);
  row-gap: 20px;
}
.promo__lead { max-width: 42ch; }
.promo__stage { justify-self: center; width: min(100%, 340px); margin: 20px 0 8px; }
.promo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.promo__frame {
  position: relative;
  isolation: isolate;
  padding: 10px 10px 0;
  border-radius: 34px;
  background: #070c16;
}
.promo__video {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 24px;
  background: var(--night-2);
  cursor: pointer;
}

/* солнечное кольцо вокруг рамки, пока ролик играет */
.promo__frame::after {
  content: ""; position: absolute; inset: -8px; z-index: -1;
  border-radius: 42px;
  border: 2px solid var(--sun);
  opacity: 0; transform: scale(0.985);
  transition: opacity 500ms ease, transform 700ms var(--ease-out);
  pointer-events: none;
}
.promo__frame[data-state="playing"]::after { opacity: 0.6; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .promo__frame[data-state="playing"]::after { animation: halo 3.2s ease-in-out 700ms infinite; }
}
@keyframes halo { 50% { opacity: 0.25; transform: scale(1.012); } }

/* большая кнопка «смотреть» поверх постера */
.promo__big {
  position: absolute; left: 50%; top: calc(50% - 32px);
  translate: -50% -50%;
  width: 84px; height: 84px;
  border: 0; border-radius: 50%;
  background: var(--sun); color: var(--sun-ink);
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 220ms ease, transform 260ms var(--ease-out), background-color var(--t-ui) ease;
}
.promo__big svg { width: 34px; height: 34px; fill: currentColor; translate: 2px 0; }
.promo__big:active { transform: scale(0.94); }
.promo__frame[data-state="playing"] .promo__big { opacity: 0; transform: scale(0.8); pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .promo__big:hover { transform: scale(1.06); background: var(--sun-soft); }
  .promo__frame[data-state="playing"] .promo__big:hover { transform: scale(0.8); }
}

/* панель под роликом: пауза, прогресс, звук */
.promo__bar { display: flex; align-items: center; gap: 12px; padding: 10px 4px 12px; }
.promo__toggle {
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: var(--night-3); color: var(--ink);
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) ease;
}
.promo__toggle svg { width: 22px; height: 22px; }
.promo__toggle .i-play { fill: currentColor; }
.promo__toggle .i-pause { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.promo__toggle .i-play,
.promo__toggle .i-pause {
  transform-box: fill-box; transform-origin: center;
  transition: opacity 180ms ease, transform 260ms var(--ease-out);
}
.promo__frame[data-state="playing"] .promo__toggle .i-play { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.promo__frame:not([data-state="playing"]) .promo__toggle .i-pause { opacity: 0; transform: rotate(90deg) scale(0.6); }
.promo__toggle:active { transform: scale(0.92); }
/* ролик подгружается — вокруг кнопки бежит кольцо */
.promo__toggle::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--sun); border-top-color: transparent; border-right-color: transparent;
  opacity: 0;
  transition: opacity 200ms ease;
}
.promo__frame[data-loading] .promo__toggle::after { opacity: 1; animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.promo__track {
  flex: 1; min-width: 40px;
  height: 4px; border-radius: 2px;
  background: var(--night-4);
  overflow: hidden;
}
.promo__fill {
  display: block; height: 100%;
  background: var(--sun);
  transform: scaleX(0); transform-origin: var(--start);
}

.promo__sound {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px 0 10px;
  border: 0; border-radius: 999px;
  background: var(--night-3); color: var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) ease, color var(--t-ui) ease;
}
.promo__sound svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.promo__sound .spk { fill: currentColor; stroke: none; }
.promo__sound .wave,
.promo__sound .slash {
  transform-box: fill-box; transform-origin: 0% 50%;
  transition: opacity 180ms ease, transform 260ms var(--ease-out);
}
.promo__frame[data-muted="true"] .promo__sound .wave { opacity: 0; transform: scale(0.5); }
.promo__frame[data-muted="false"] .promo__sound .slash { opacity: 0; transform: scale(0.5); }
.promo__frame[data-muted="true"] .promo__sound { background: var(--sun); color: var(--sun-ink); }
.promo__sound:active { transform: scale(0.95); }
[dir="rtl"] .promo__sound svg { scale: -1 1; }
@media (hover: hover) and (pointer: fine) {
  .promo__toggle:hover { background: var(--night-4); }
  .promo__frame[data-muted="false"] .promo__sound:hover { background: var(--night-4); }
  .promo__frame[data-muted="true"] .promo__sound:hover { background: var(--sun-soft); }
}

/* вход рамки: поднимается, выпрямляется и чуть вырастает */
@media (prefers-reduced-motion: no-preference) {
  .js .promo__stage[data-reveal] > .promo__frame {
    opacity: 0;
    transform: translateY(48px) rotate(calc(-2.5deg * var(--dir))) scale(0.94);
    transition: opacity 700ms var(--ease-out), transform 1100ms var(--ease-out);
  }
  .js .promo__stage[data-reveal].is-in > .promo__frame { opacity: 1; transform: none; }
}

@media (min-width: 960px) {
  .promo {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: var(--gap); row-gap: 24px;
  }
  .promo__stage { grid-column: 1 / span 5; grid-row: 1 / -1; width: clamp(300px, 25vw, 372px); margin: 0; }
  .promo__title { grid-column: 7 / span 6; grid-row: 2; }
  .promo__lead { grid-column: 7 / span 5; grid-row: 3; }
  .promo__actions { grid-column: 7 / span 6; grid-row: 4; margin-top: 12px; }
}
/* узкий телефон: у звука остаётся значок, подпись — только для чтения с экрана */
.promo__frame { container-type: inline-size; }
@container (max-width: 300px) {
  .promo__sound { padding: 0 11px; }
  .promo__sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
