/* ── Фирменный стиль Ночлежки ───────────────────────────────────────────────
   Палитра из брендбука, ровно четыре цвета:
   солнечный жёлтый #F8EB20 · зелёный #629F42 · белый #FFFFFF · тёмно-серый #141414
   Зелёный по брендбуку — цвет ховера на сайте, так он здесь и используется.
   Синего и оранжевого в палитре нет, поэтому их нет и на странице.
   Иней белый: это и физически верно, и не выводит нас за палитру. */

@font-face {
  font-family: 'Nochlezhka';
  src: url('fonts/Nochlezhka.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Альтернативные заглавные — брендбук предлагает их «для передачи настроения». */
@font-face {
  font-family: 'Nochlezhka Alt';
  src: url('fonts/Nochlezhka_set.01.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}

:root {
  --yellow: #F8EB20;
  --green: #629F42;
  --white: #FFFFFF;
  --black: #141414;

  --bg: var(--black);
  --ink: var(--white);
  --ink-dim: rgba(255, 255, 255, .62);
  --line: rgba(255, 255, 255, .16);

  --wrap: 1140px;
  --gut: clamp(20px, 4vw, 48px);
  --page-cold: .2;
}

* { box-sizing: border-box; }

/* Атрибут hidden задаётся в UA-стилях как display:none, и любое авторское
   display:flex его перебивает. У нас так спрятаны заглушка рендера и строка
   распознанных цифр — обе оставались видимыми. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.62 'Nunito Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.frozen { overflow: hidden; height: 100vh; }

/* ── типографика ───────────────────────────────────────────────────────────
   Заголовки — Nochlezhka, всегда капсом. Наборный текст — Nunito Sans.
   Иерархия из брендбука: основной текст ≈ 1/4 кегля заголовка. */

h1, h2, h3, .raised-num, .num b, .tier b {
  font-family: 'Nochlezhka', system-ui, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: .96;
  letter-spacing: 0;
  margin: 0;
  overflow-wrap: break-word;
}

/* Приём брендбука: заголовок в две строки, вторая со смещением вправо.
   Смещение всегда меньше длины первой строки — строки обязаны пересекаться
   минимум на одну букву. */
.tt { display: flex; flex-direction: column; align-items: flex-start; }
.tt > span:nth-child(2) { margin-left: var(--shift, 3.2ch); }

/* Приём брендбука со сдвигом второй строки рассчитан на выключку по левому
   краю. В центрированном блоке он не читается как приём — просто выталкивает
   строку за поле, — поэтому там сдвиг нулевой, если не задан явно. */
.tt.center { align-items: center; }
.tt.center > span:nth-child(2) { margin-left: var(--shift, 0); }

.h1 { font-size: clamp(34px, 7.4vw, 92px); }
.h2 { font-size: clamp(28px, 5vw, 62px); }
.h3 { font-size: clamp(20px, 2.4vw, 30px); }

/* Сброс margin стоит на всех заголовках, поэтому отступ снизу задаём явно —
   иначе вторая строка со смещением ложится прямо на следующий абзац. */
.h1, .h2 { margin-bottom: clamp(28px, 4vh, 44px); }
.faq .h2 { margin-bottom: clamp(36px, 5vh, 56px); }

.wrap { width: min(var(--wrap), 100% - var(--gut) * 2); margin-inline: auto; }
.section { position: relative; z-index: 3; padding: clamp(72px, 12vh, 140px) 0; }

/* Наборный текст всегда по левой выключке (правила вёрстки, стр. 29). */
.lead, .sub, .fact p, .fineprint, .muted { text-align: left; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 20px;
}

.lead { font-size: clamp(16px, 1.5vw, 20px); color: var(--ink-dim); max-width: 60ch; margin: 0 0 30px; }
.sub { color: var(--ink-dim); margin: 0 0 26px; max-width: 60ch; }
.muted { color: var(--ink-dim); }
.small { font-size: 14px; }
.yellow { color: var(--yellow); }

/* Плейсхолдеры: то, что нельзя выкатывать не заполненным. */
.ph {
  color: var(--yellow);
  border-bottom: 2px dotted currentColor;
  font-variant-numeric: tabular-nums;
  cursor: help;
}

/* ── логотип ───────────────────────────────────────────────────────────────
   Один SVG на три места, цвет — через currentColor, и только три фирменных
   значения: белый на тёмном, тёмно-серый на белом, жёлтый как акцент.
   Охранное поле по брендбуку равно горизонтальному штриху буквы «Н» —
   он измерен по контуру и равен 9.5% высоты знака. */
.logo {
  --logo-h: 26px;
  display: inline-block;
  padding: calc(var(--logo-h) * .095);
  color: var(--white);
  line-height: 0;
}

.logo-mark {
  display: block;
  height: var(--logo-h);
  width: calc(var(--logo-h) * 425 / 58);
}

.gate-ui .logo {
  --logo-h: 26px;
  display: block;
  width: max-content;
  margin: 0;
  color: var(--black);
  border-color: var(--black);
}

/* Лок-ап партнёров на воротах: Ночлежка × Т-Банк, оба чёрным на белой
   карточке, одной высоты. Знак умножения — тонкий, серый, чтобы не спорить. */
.lockup { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 20px; }
.lockup__x { font-size: 15px; color: currentColor; opacity: .45; line-height: 1; }
.gate-ui .lockup { color: var(--black); }

/* тот же лок-ап в шапке первого экрана: те же размеры и отступы от ×, что на воротах */
.topbar .lockup,
.topbar .lockup .logo { --logo-h: 18px; }
.topbar .lockup { justify-content: flex-start; gap: 18px; margin: 0; color: var(--ink); }
.topbar .lockup .logo-tb { color: var(--ink); }

/* Правило кобренда: знак Ночлежки по высоте равен слову «БАНК».
   Из контуров: «БАНК» — 86.96 из 200 единиц бокса Т-Банка, знак Ночлежки —
   50.2 из 58. Значит, бокс банка в 1.99 раза выше бокса Ночлежки.
   Центр «БАНК» сидит на 2.86% бокса выше его середины — опускаем, чтобы
   при выравнивании по центру буквы встали на одну линию со знаком.
   По просьбе дизайнера банк на 10% меньше этого равенства: 1.99 × 0.9 = 1.79. */
.logo-tb {
  --tb-h: calc(var(--logo-h, 26px) * 1.79);
  display: block;
  height: var(--tb-h);
  width: calc(var(--tb-h) * 679.767 / 200);
  transform: translateY(calc(var(--tb-h) * 0.0286));
  color: currentColor;
}
.gate-ui .logo-tb { color: var(--black); }
.footer .logo { --logo-h: 30px; margin-left: calc(var(--logo-h) * -.095); }
.topbar .logo { margin-left: calc(var(--logo-h) * -.095); }

/* ── фоновые слои ──────────────────────────────────────────────────────────*/
#edgeFrost, #snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#edgeFrost {
  opacity: 0;
  transition: opacity .5s linear;
  -webkit-mask-image: radial-gradient(ellipse 76% 68% at 50% 50%, rgba(0, 0, 0, 0) 42%, #000 100%);
  mask-image: radial-gradient(ellipse 76% 68% at 50% 50%, rgba(0, 0, 0, 0) 42%, #000 100%);
}

#snow { opacity: .7; }

/* ── кнопки ────────────────────────────────────────────────────────────────*/
/* Дизайнер: кнопки круглые с подсветкой по краям — в тему инея, и так
   кнопка отделяется от тега с температурой, который остаётся прямоугольным. */
.btn {
  --pad: 15px 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--pad);
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 700 15px/1 'Nunito Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.btn--sm { --pad: 10px 18px; font-size: 13px; }
.btn--lg { --pad: 19px 34px; font-size: 17px; }

/* Ховер — фирменный зелёный: так предписано брендбуком. */
.btn--yellow {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 0 0 1px rgba(248, 235, 32, .35), 0 0 22px rgba(248, 235, 32, .38);
}

.btn--yellow:hover {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 0 0 1px rgba(98, 159, 66, .4), 0 0 22px rgba(98, 159, 66, .45);
}

.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { background: var(--green); border-color: var(--green); color: var(--white); }

.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: var(--green); }

.btn--ghost-dark { background: transparent; color: var(--black); border-color: rgba(20, 20, 20, .35); }
.btn--ghost-dark:hover { background: var(--green); border-color: var(--green); color: var(--white); }

.btn[aria-disabled="true"], .btn:disabled { opacity: .4; pointer-events: none; }
.btn.is-placeholder { outline: 2px dashed var(--yellow); outline-offset: 3px; }

/* ── шаг перед оплатой ──────────────────────────────────────────────────── */
.donation-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1.5px solid var(--black);
  background: var(--white);
  color: var(--black);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .42);
}

.donation-dialog::backdrop {
  background: rgba(20, 20, 20, .78);
  backdrop-filter: blur(8px);
}

.donation-dialog__inner { position: relative; padding: clamp(28px, 6vw, 54px); }
.donation-dialog .eyebrow { color: var(--green); }

.donation-dialog__close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--black);
  font: 400 34px/1 'Nunito Sans', system-ui, sans-serif;
  cursor: pointer;
}

.donation-dialog__close:hover { color: var(--green); }
.donation-dialog__close:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.donation-dialog__title {
  max-width: 100%;
  margin: 0 0 18px;
  font-family: 'Nochlezhka', system-ui, sans-serif;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 400;
  line-height: .96;
  text-transform: uppercase;
  overflow-wrap: normal;
}

.donation-dialog__amount { margin: 0 0 30px; font-size: 18px; }
.donation-dialog__amount b { font-size: 22px; }
.donation-form { display: grid; gap: 24px; }

.donation-kind { min-width: 0; margin: 0; padding: 0; border: 0; }
.donation-kind legend { padding: 0; }   /* у legend свой отступ — сдвигал подпись правее «Email» */
.donation-kind legend, .donation-email > span {
  display: block;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.donation-kind__options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.donation-kind__option { position: relative; cursor: pointer; }

.donation-kind__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.donation-kind__option span {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1.5px solid rgba(20, 20, 20, .28);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  transition: background .18s, border-color .18s, color .18s;
}

.donation-kind__option:hover span { border-color: var(--green); }
.donation-kind__option input:checked + span { border-color: var(--yellow); background: var(--yellow); }
.donation-kind__option input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }

.donation-email input {
  width: 100%;
  min-height: 56px;
  padding: 13px 16px;
  border: 1.5px solid rgba(20, 20, 20, .45);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.donation-email input:focus { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.donation-email input:user-invalid { border-color: var(--black); box-shadow: 0 0 0 2px var(--yellow); }
.donation-form__submit { width: 100%; }
.donation-form__note, .donation-form__status { margin: -10px 0 0; font-size: 13px; line-height: 1.45; }
.donation-form__note { color: rgba(20, 20, 20, .62); }
.donation-form__consent { margin-top: -16px; font-size: 12px; }
.donation-form__consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.donation-form__consent a:hover { color: var(--green); }
.donation-form__status { padding: 12px 14px; border-left: 4px solid var(--green); background: rgba(98, 159, 66, .1); }

.donation-launch {
  display: grid;
  gap: 18px;
}

.donation-launch[hidden] { display: none; }

.donation-launch__heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.donation-launch__spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 4px solid rgba(20, 20, 20, .16);
  border-top-color: var(--green);
  border-right-color: var(--yellow);
  border-radius: 50%;
  animation: donation-spin .9s linear infinite;
}

.donation-launch__lead {
  max-width: 480px;
  margin: 0;
  font-size: clamp(21px, 4vw, 28px);
  font-weight: 700;
  line-height: 1.15;
}

.donation-launch__summary {
  margin: 0;
  padding: 10px 14px;
  border-left: 5px solid var(--green);
  background: rgba(98, 159, 66, .1);
  font-weight: 700;
}

.donation-launch__text {
  max-width: 500px;
  margin: 0;
  color: rgba(20, 20, 20, .68);
  font-size: 15px;
  line-height: 1.5;
}

.donation-launch__progress {
  position: relative;
  height: 6px;
  overflow: hidden;
  background: rgba(20, 20, 20, .12);
}

.donation-launch__progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: var(--green);
  animation: donation-progress 1.6s ease-in-out infinite;
}

.donation-launch__back { justify-self: start; margin-top: 2px; }

@keyframes donation-spin { to { transform: rotate(360deg); } }

@keyframes donation-progress {
  0% { transform: translateX(-105%); }
  55% { transform: translateX(135%); }
  100% { transform: translateX(245%); }
}

@media (prefers-reduced-motion: reduce) {
  .donation-launch__spinner,
  .donation-launch__progress span { animation: none; }
  .donation-launch__spinner { border-color: rgba(20, 20, 20, .16); border-top-color: var(--green); }
  .donation-launch__progress span { width: 100%; opacity: .7; }
}

@media (max-width: 520px) {
  .donation-kind__options { grid-template-columns: 1fr; }
  .donation-kind__option span { min-height: 52px; }
}

/* ── ворота ────────────────────────────────────────────────────────────────*/
#gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: var(--black);
  transition: opacity .9s ease, filter .9s ease;
}

/* За оттаявшим стеклом — не пустота. Фон убирается, только когда иней уже
   нарисован (классы ставит gate.js), иначе до загрузки скрипта мелькнул бы
   сайт без инея. */
#gate.gate--see-through { background: transparent; }
#gateCity { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
#gate.gate--city #gateCity { display: block; }

#gateCanvas {
  position: absolute;
  inset: 0;
  /* canvas — replaced-элемент: inset:0 его не растягивает, размер обязателен явно */
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

/* Дыхание протапливает иней, и в проталине видно фирменный жёлтый — тепло. */
#breathGlow {
  position: absolute;
  left: 0;
  top: 0;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(248, 235, 32, .75) 0%, rgba(248, 235, 32, 0) 68%);
  mix-blend-mode: screen;
  transition: opacity .25s ease;
}

.gate-ui {
  position: relative;
  z-index: 2;
  width: min(640px, calc(100% - 32px));
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  padding: clamp(30px, 5vw, 56px);
  /* Выключка по левому краю: так работает фирменный приём со сдвигом второй
     строки, а абзац про сбор перестаёт нарушать правило вёрстки (стр. 29 —
     наборный текст всегда по левой выключке). */
  text-align: left;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--black);
  pointer-events: none;
}

.gate-ui > * { pointer-events: auto; }

/* Иерархия ворот: погода → заголовок → один абзац → действия → подпись.
   Один размер и одно начертание наборного текста; единственный акцент в
   абзаце — удвоение, выделенное фирменным жёлтым маркером. */
.gate-weather {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  font-size: 14px;
  color: rgba(20, 20, 20, .62);
}

.gate-weather svg { width: 16px; height: 16px; fill: currentColor; }
.gate-weather b { color: var(--black); font-weight: 700; }

.gate-title { font-size: clamp(28px, 6.6vw, 60px); margin-bottom: 22px; }

.gate-text {
  margin: 0 0 28px;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
}

.gate-text mark {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  color: inherit;
  padding: 0 .1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* до выбора способа подсказка не нужна — она появляется в рабочем режиме */
.gate-hint { display: none; margin: 0 0 20px; font-weight: 700; font-size: 16px; min-height: 1.6em; color: var(--black); }
.gate--acting .gate-hint { display: block; }

/* кобренд — подписью внизу, отделён тонкой линией */
.gate-sign {
  justify-content: center;
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 20, 20, .12);
  color: var(--black);
}

.gate-sign .logo, .gate-ui .gate-sign { --logo-h: 18px; }

.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; }

#micLevel {
  width: 200px;
  height: 5px;
  margin: 20px 0 0;
  background: rgba(20, 20, 20, .14);
  overflow: hidden;
}

#micLevel i {
  display: block;
  height: 100%;
  background: var(--green);
  transform-origin: left;
  transform: scaleX(0);
}

.gate-progress { width: 100%; height: 3px; margin: 22px 0 14px; background: rgba(20, 20, 20, .12); overflow: hidden; }

#gateBar {
  display: block;
  height: 100%;
  background: var(--yellow);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .3s ease;
}

/* Пропуск ворот — полноценная третья кнопка, а не серая сноска: ворота
   красивые, но это лишний шаг между человеком и пожертвованием. */
.skip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--black);
  font: 700 16px 'Nunito Sans', sans-serif;
  cursor: pointer;
  transition: color .18s;
}

.skip u { text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.skip span { transition: transform .18s; }
.skip:hover { color: var(--green); }
.skip:hover span { transform: translateX(3px); }

#gate[data-mode="hand"] #gateCanvas { cursor: grab; }
#gate[data-mode="hand"] #gateCanvas:active { cursor: grabbing; }
.gate--melting { opacity: 0; filter: blur(6px); pointer-events: none; }
.gate--gone { display: none; }

/* ── топбар и герой ────────────────────────────────────────────────────────*/
.topbar {
  position: relative;
  z-index: 4;
  width: min(var(--wrap), 100% - var(--gut) * 2);
  margin: 0 auto 9vh;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.topbar .nav { justify-self: center; }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-dim);
  white-space: nowrap;
}

.pill svg { width: 16px; height: 16px; fill: currentColor; opacity: .8; }

.pill b { color: var(--yellow); font-weight: 700; }

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 28px;
}

/* Дизайнер: «центральная выключка более самостоятельная, подсаппортит блок
   ниже». Подписи «сбор» и «даты» уходят по бокам от заголовка. */
.hero-body {
  position: relative;
  width: min(var(--wrap), 100% - var(--gut) * 2);
  margin-inline: auto;
  text-align: center;
}

.hero-body .lead { margin-inline: auto; text-align: center; max-width: 64ch; }
/* лид из четырёх фраз: строки выравниваем по длине, чтобы не оставалось
   одного слова на строке */
.lead--hero { max-width: 60ch; margin: 0 auto 44px; text-wrap: balance; }
br.d { display: none; }
@media (min-width: 861px) { br.d { display: inline; } }
.hero-title { margin-bottom: 30px; }

.hero-side {
  position: absolute;
  top: 12%;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--yellow);
}

.hero-side--l { left: 0; text-align: left; }
.hero-side--r { right: 0; text-align: right; }

.scroll-cue { margin-top: 46px; font-size: 13px; color: var(--yellow); }
.scroll-cue i { display: block; font-style: normal; margin-top: 4px; font-size: 16px; }

/* ── стекло ────────────────────────────────────────────────────────────────*/
.glass-section { border-top: 1px solid var(--line); }



.glass-wrap {
  position: relative;
  height: clamp(300px, 48vh, 460px);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  background: var(--black);
  user-select: none;
}

/* Рама рисуется кодом поверх инея и не перехватывает касания —
   писать и тереть можно прямо сквозь переплёт. */
.frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.glass-temp, .tb-chip { z-index: 4; }
}

/* Под инеем — фирменный жёлтый. Стираешь холод, под ним тепло. */
/* Дизайнер: «цвет нарисованных цифр сделать тёмным, как эффект таяния
   на первом экране». Под инеем — та же тёмная страница, что и за воротами.
   Заодно освобождается жёлтый: теперь им пишет Т-Банк, а зелёный
   возвращается туда, где его место по брендбуку, — на ховеры. */
.glass-under { position: absolute; inset: 0; background: var(--black); }

/* След Т-Банка живёт отдельным слоем под инеем: если красить его поверх,
   он затирает и проталину, и сумму. */
#ghostLayer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* под окном: итог слева, «заморозить заново» справа — чтобы начать
   заново, не уходя от стекла */
.glass-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.glass-bar .chip { flex: none; }

.amount-split {
  font-size: clamp(15px, 1.7vw, 19px);
  font-weight: 600;
  color: var(--ink-dim);
}

.amount-split .plus, .amount-split .eq { color: var(--yellow); font-weight: 800; padding: 0 3px; }
.amount-split b { color: var(--yellow); font-weight: 800; }

#glassCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.tb-chip {
  position: absolute;
  left: 0;
  top: 0;
  margin: -16px 0 0 22px;
  padding: 6px 11px;
  background: var(--black);
  color: var(--white);
  font: 700 12px 'Nunito Sans', sans-serif;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

.tb-chip.is-on { opacity: 1; }
.tb-chip b { color: var(--yellow); }

.glass-temp {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  font: 700 12px/1 'Nunito Sans', sans-serif;
  color: var(--white);
  background: var(--black);
  pointer-events: none;
}

.digits-row { display: flex; gap: 8px; margin-top: 16px; }

.digit {
  width: 46px;
  height: 56px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 400 24px 'Nochlezhka', sans-serif;
  cursor: pointer;
  transition: all .15s;
}

.digit:hover { background: var(--green); border-color: var(--green); color: var(--white); }

.glass-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chip {
  padding: 11px 16px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 14px 'Nunito Sans', sans-serif;
  cursor: pointer;
  transition: all .18s;
}

.chip:hover { background: var(--green); border-color: var(--green); color: var(--white); }
.chip--ghost { color: var(--ink-dim); }

.fineprint { margin-top: 22px; font-size: 13px; color: var(--ink-dim); max-width: 72ch; }
.hint--warn { color: var(--yellow) !important; }

/* ── факты ─────────────────────────────────────────────────────────────────*/


/* ── цель ──────────────────────────────────────────────────────────────────*/






/* ── финал и футер ─────────────────────────────────────────────────────────*/
.final { text-align: center; }
.final .lead { margin-inline: auto; text-align: center; }
.page-temp-line { margin-top: 38px; font-size: 13px; color: var(--ink-dim); }
.page-temp-line b { color: var(--yellow); font-variant-numeric: tabular-nums; }

.footer { position: relative; z-index: 3; border-top: 1px solid var(--line); padding: 44px 0 70px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }

/* ── ветер ─────────────────────────────────────────────────────────────────*/
.wind {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  background: var(--black);
  color: var(--ink-dim);
  font: 600 12px 'Nunito Sans', sans-serif;
  cursor: pointer;
}

.wind svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.wind span { display: none; }
.wind:hover { color: var(--white); border-color: var(--green); background: var(--green); }
.wind:hover span, .wind:focus-visible span { display: inline; }
.wind[aria-pressed="true"] { color: var(--yellow); border-color: var(--yellow); }
body.frozen .wind { display: none; }

/* ── переключатель вариантов (есть только на страницах сравнения) ───────*/
.variants {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: flex;
  border: 1px solid var(--line);
  background: var(--bg);
  font: 600 12px 'Nunito Sans', sans-serif;
}

.variants a { padding: 9px 12px; color: var(--ink-dim); text-decoration: none; }
.variants a:hover { color: var(--ink); }
.variants a[aria-current="page"] { background: var(--yellow); color: #141414; }
body.frozen .variants { display: none; }

@media (max-width: 860px) { .variants { right: 10px; bottom: 10px; } }

/* ── появление блоков ──────────────────────────────────────────────────────*/
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-live { opacity: 1; transform: none; }

/* ── адаптив ───────────────────────────────────────────────────────────────*/
@media (max-width: 860px) {
  /* на телефоне сумма ограничена шириной, поэтому высокая панель — пустое место */
  .glass-wrap { height: clamp(240px, 34vh, 340px); }
  .glass-controls { flex-direction: column; align-items: stretch; }
  .topbar { margin-bottom: 6vh; }
  .pill { display: none; }
  .wind { display: none; }
  .tt > span:nth-child(2) { margin-left: var(--shift-m, 1.6ch); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #snow { display: none; }
  * { animation-duration: .01ms !important; }
}


/* ── меню разделов ─────────────────────────────────────────────────────────*/
.nav { display: flex; gap: 22px; flex-wrap: wrap; }

.nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .18s, border-color .18s;
}

.nav a:hover { color: var(--green); border-color: var(--green); }

/* ── ворота: показ жеста на самой поверхности ─────────────────────────────
   Правка: «есть ощущение, что кнопка не срабатывает — непонятно, что надо
   перевести курсор и потереть что-либо». Причина в том, что карточка занимает
   центр экрана и не трётся: тереть надо мимо неё. Поэтому после выбора
   карточка сворачивается в полосу внизу, а по освободившемуся инею ездит
   призрачный курсор и на самом деле протапливает след. */
#gateGhost {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: none;
  pointer-events: none;
  will-change: transform;
}

.gate--acting #gateGhost { display: block; }
.gate--got-it #gateGhost { display: none; }

#gateGhost i {
  position: absolute;
  left: -34px;
  top: -34px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 235, 32, .5), rgba(248, 235, 32, 0) 70%);
  box-shadow: inset 0 0 0 2px rgba(20, 20, 20, .28);
}

#gateGhost span {
  position: absolute;
  left: 50%;
  top: 42px;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--black);
  color: var(--white);
  font: 700 12px 'Nunito Sans', sans-serif;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* Карточка после выбора: узкая полоса внизу, экран свободен для жеста */
.gate--acting .gate-ui {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 4vh;
  width: min(440px, calc(100% - 24px));
  margin: 0;
  transform: translateX(-50%);
  padding: 18px 22px;
  text-align: center;
}

.gate--acting .gate-weather,
.gate--acting .gate-sign,
.gate--acting .gate-title { display: none; }

.gate--acting .gate-hint { margin-bottom: 12px; font-size: 15px; }
.gate--acting .gate-pct { font-size: 34px; }
.gate--acting #micLevel { margin: 12px auto 0; }
.gate--acting .gate-progress { margin: 12px 0 8px; }

/* ── ворота: шаг с процентом и таймером ────────────────────────────────────*/
.gate-step { display: none; }
.gate--acting .gate-step { display: block; }
.gate--acting .gate-actions,
.gate--acting .gate-text { display: none; }

.gate-pct {
  font-family: 'Nochlezhka', sans-serif;
  font-size: clamp(40px, 9vw, 68px);
  line-height: 1;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}


/* ── подложки ──────────────────────────────────────────────────────────────
   Дизайнер: «добавить подложки для пары блоков, чтобы разнообразить ритм
   тёмного фона». Светлее фона на полтона, скруглённые. */
.panel > .wrap {
  background: rgba(255, 255, 255, .14);
  border-radius: 28px;
  padding: clamp(30px, 5vw, 64px);
  width: min(var(--wrap), 100% - var(--gut) * 2);
}

.panel .num { background: transparent; }

/* ── об организации ────────────────────────────────────────────────────────*/
.nums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-top: 46px;
}

.num { padding: 28px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.num b {
  display: block;
  font-family: 'Nochlezhka', sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  color: var(--yellow);
  margin-bottom: 10px;
}

.num span { font-size: 15px; color: var(--ink-dim); }

/* ── два рублика ───────────────────────────────────────────────────────────
   Идея дизайнера: из-под белого рубля выезжает жёлтый — удвоение одним знаком.
   Стартует, когда блок попадает в экран (класс is-live от IntersectionObserver). */
.wrap--rel { position: relative; }

.rub-x2 {
  position: absolute;
  right: 0;
  top: 0;
  width: 128px;
  height: 64px;
}

.rub {
  position: absolute;
  top: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  display: grid;
  place-items: center;
  font: 400 30px/1 'Nochlezhka', sans-serif;
  font-style: normal;
  background: var(--bg);
  transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
}

.rub--w { left: 0; color: var(--white); z-index: 2; }
.rub--y { left: 0; color: var(--yellow); z-index: 1; }
.is-live .rub--y { transform: translateX(58px); }

/* ── суммы «Курса добра» ───────────────────────────────────────────────────*/
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
  scroll-margin-top: 32px;
}

.tier {
  /* содержимое прижато к верху: иначе в ряду суммы стоят на разной высоте */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  padding: 18px 20px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}

.tier b {
  display: block;
  font-family: 'Nochlezhka', sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 8px;
}

.tier span { font-size: 14px; line-height: 1.45; }
/* Описание на кнопке — про сумму уже с удвоением. Чтобы это читалось сразу,
   между «жертвую 500» и «ночь в тепле» стоит шаг «×2 = 1 000 ₽ с Т-Банком»
   в цвете следа банка на стекле. */
.tier-x2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 8px;
  font: 700 14px/1.2 'Nunito Sans', sans-serif;
  font-style: normal;
  color: var(--yellow);
}
.tier-x2 i {
  font-style: normal;
  padding: 3px 6px 2px;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  line-height: 1;
}
.tier[aria-pressed="true"] .tier-x2 { color: var(--black); }
.tier[aria-pressed="true"] .tier-x2 i { background: var(--black); color: var(--yellow); }
.tier:hover { border-color: var(--green); color: var(--ink); }
.tier[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--black); }
.tier[aria-pressed="true"] b { color: var(--black); }

.tier-note {
  margin: 16px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--yellow);
  font-size: 15px;
  color: var(--ink-dim);
  max-width: 78ch;
  min-height: 1.4em;
}

/* Плитка ручного ввода живёт в той же сетке, что и готовые суммы, и выглядит
   так же — меняется только то, что цифру человек вводит сам. */
.tier--custom { cursor: text; display: flex; flex-direction: column; }
.tier--custom label { cursor: text; }

.custom-field {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 2px 0 10px;
  border-bottom: 2px solid var(--line);
  transition: border-color .18s;
  font-family: 'Nochlezhka', sans-serif;
  font-size: 22px;
  color: var(--ink);
}

.custom-field:focus-within { border-color: var(--yellow); }

.custom-field input {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--yellow);
  font: inherit;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.custom-field input::placeholder { color: var(--ink-dim); opacity: .5; }

/* Пока сумма не выбрана, пояснения нет — и от блока остаётся одна жёлтая
   полоска слева. Высоту держим, чтобы вёрстка не прыгала, а линию гасим. */
.tier-note:empty { border-left-color: transparent; }

/* ── приют ─────────────────────────────────────────────────────────────────*/
.priyut-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: 44px; align-items: start; }
.spend { margin: 26px 0 0; padding: 0; list-style: none; }

.spend li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: var(--ink-dim);
}

.spend li::before { content: '→'; position: absolute; left: 0; color: var(--yellow); }
.render-slot { margin: 0; }

.slot-box {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border: 2px dashed rgba(248, 235, 32, .5);
  background: rgba(255, 255, 255, .02);
}

.render-slot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.render-slot figcaption { margin-top: 12px; font-size: 13px; color: var(--ink-dim); }

/* ── сколько собрано ───────────────────────────────────────────────────────*/
.center-block { text-align: center; }
.center-block .eyebrow { color: var(--ink-dim); }

.raised-num {
  font-family: 'Nochlezhka', sans-serif;
  font-size: clamp(44px, 9vw, 108px);
  line-height: 1;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.raised-num--empty { font-size: clamp(38px, 6vw, 72px); text-transform: uppercase; }
.raised-sub { margin: 14px 0 6px; color: var(--ink-dim); }
.raised-upd { margin: 0 0 26px; font-size: 13px; color: var(--ink-dim); opacity: .75; }

/* Отдельной строкой над кнопкой: в один ряд с ней рамка читается
   как вторая, неактивная кнопка. */
.raised-x2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 34px;
  padding: 10px 16px;
  border: 1px solid var(--line);
}

.raised-x2 b { font-family: 'Nochlezhka', sans-serif; font-weight: 400; font-size: 20px; color: var(--yellow); }
.raised-x2 span { font-size: 14px; color: var(--ink-dim); }

/* ── дыхание плашки «Собрано» (эксперимент) ────────────────────────────────
   Два размытых пятна за содержимым. Размытие статичное — filter на большом
   элементе анимировать дорого; дышит уже размытая форма, только transform и
   opacity, это считает видеокарта. --pulse 0..1 ставит js: 0 — пятна лежат
   у нижнего края и еле дышат, 1 — поднимаются к центру и заливают плашку. */
.raised .wrap { position: relative; overflow: hidden; }
.raised .wrap > :not(.breath) { position: relative; z-index: 1; }

.breath { position: absolute; inset: 0; z-index: 0; pointer-events: none; --pulse: 0; }
.breath__frost { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .32; }

.breath__glow {
  position: absolute;
  bottom: 0;
  width: 72%;
  aspect-ratio: 1;
  opacity: calc(.4 + var(--pulse) * .6);
  transform: translateY(calc(64% - var(--pulse) * 52%));
  transition: transform 1.4s cubic-bezier(.2, .8, .2, 1), opacity 1.4s ease;
  will-change: transform, opacity;
}

.breath__glow b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: blur(54px);
  transform-origin: 50% 100%;
  animation: breathe 4.6s ease-in-out infinite;
}

.breath__glow--white { left: -8%; }
.breath__glow--white b { background: radial-gradient(circle, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 68%); }
.breath__glow--yellow { right: -6%; }
.breath__glow--yellow b { background: radial-gradient(circle, rgba(248, 235, 32, .95) 0%, rgba(248, 235, 32, 0) 68%); animation-delay: -1.4s; }

@keyframes breathe {
  0%, 100% { transform: scale(.94); opacity: .75; }
  50% { transform: scale(1.06); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .breath__glow b { animation: none; }
}

/* ── ответы на вопросы ─────────────────────────────────────────────────────
   Две независимые колонки (6 + 5): раскрытие ответа двигает только свою. */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; align-items: start; }

.faq details { border-top: 1px solid var(--line); }
.faq-col details:last-of-type { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  position: relative;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 600;
  transition: color .18s;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--yellow); }

.faq summary::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  color: var(--yellow);
  line-height: 1;
}

.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 26px; color: var(--ink-dim); max-width: 76ch; }
.faq a, .footer a:not(.logo) { color: var(--yellow); }
.faq a:hover, .footer a:not(.logo):hover { color: var(--green); }

/* ── партнёры ──────────────────────────────────────────────────────────────*/
/* белые монохромные знаки на тёмном, без плашек — одна высота, воздушно */
.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 40px;
  margin-top: 28px;
}

.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  opacity: .88;
  transition: opacity .18s;
}

.partner:hover { opacity: 1; }

.partner .logo-tb {
  --logo-h: 22px;
  height: var(--tb-h);
  width: calc(var(--tb-h) * 679.767 / 200);
  transform: none;
}

.partner__img {
  display: block;
  max-width: min(180px, 38vw);
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* «У Ларисы» — вертикальный знак, чуть выше остальных по высоте */
.partner:has(img[src*="u-larisy"]) .partner__img {
  max-height: 64px;
  max-width: 56px;
}

@media (max-width: 980px) {
  .nums, .tiers { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .faq-col:first-child details:last-of-type { border-bottom: 0; }
  /* на телефоне подписи не по краям, а над заголовком, каждая одной строкой */
  .hero-side { position: static; display: block; width: auto; margin-bottom: 6px; text-align: center; }
  .hero-side br { display: none; }
  .hero-side--r { margin-bottom: 26px; }
  /* лок-ап «Ночлежка × Т-Банк» и кнопка рядом не помещаются — кнопка под него */
  .topbar { grid-template-columns: 1fr; gap: 14px; }

  .topbar-right { justify-content: center; }
  .topbar .lockup { justify-content: center; }
  .rub-x2 { position: static; margin: 0 auto 22px; }
  .priyut-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}

@media (max-width: 620px) {
  .nums, .tiers { grid-template-columns: 1fr; }
}

/* На узкой карточке кнопки не помещаются рядом: «Подышать на экран» шире
   половины поля. Ставим друг под друга и тянем на всю ширину — так они
   одинаковые, а не разной длины по своему тексту. */
@media (max-width: 520px) {
  /* лок-ап с крупным щитом шире карточки — уменьшаем оба знака вместе */
  /* тот же селектор, что у десктопного правила: иначе оно перебивает
     уменьшение, и щит банка остаётся крупным при маленьком знаке */
  .gate-ui .gate-sign, .gate-sign .logo { --logo-h: 15px; }
  .topbar .lockup, .topbar .lockup .logo { --logo-h: 15px; }
  .gate-actions { flex-direction: column; align-items: stretch; }
  .gate-actions .btn { width: 100%; }
}
