/* ============================================================
   Презентация проекта «Олег на поребрике».
   Отдельная страница (/showcase/) — не часть приложения: своя палитра
   и своя типографика, намеренно одна тёмная вселенная («ночная навигация»).
   Графит с синим подтоном + латунный акцент, как таблички и фонари в городе.
   ============================================================ */

:root {
  /* грунт и поверхности */
  --ink: #07090c;
  --surface: #0e1318;
  --surface-2: #141b21;

  /* текст */
  --text: #eceff2;
  --text-2: #93a4b0;   /* холодный нейтрал с уклоном к воде */
  --text-3: #5f707c;

  /* линии и акценты */
  --hair: rgba(160, 190, 205, .13);
  --hair-2: rgba(160, 190, 205, .22);
  --brass: #c99248;    /* единственный акцент */
  --brass-hi: #e9c07b;
  --neva: #58818f;     /* служебный цвет графики, не акцент */

  /* геометрия и ритм */
  --col: 1120px;
  --pad: clamp(20px, 5vw, 64px);
  --r: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* типографика */
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Golos Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Фоновая «картографическая сетка»: едва заметная, чтобы страница читалась
   как лист карты, а не как обычный лендинг. */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    linear-gradient(to right, rgba(160, 190, 205, .05) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(to bottom, rgba(160, 190, 205, .05) 1px, transparent 1px) 0 0 / 96px 96px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}

/* height: auto обязателен — у кадров заданы width/height атрибутами (чтобы
   браузер держал место под них), без сброса они рендерятся в натуральные 1704px. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

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

/* ── Прогресс маршрута ─────────────────────────────────────── */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--hair); z-index: 90;
}
.progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--neva), var(--brass));
  transform-origin: left;
}

/* ── Левая шкала маршрута ──────────────────────────────────── */
.route {
  position: fixed; left: 22px; top: 50%; translate: 0 -50%;
  z-index: 80; display: none;
}
.route ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.route a {
  display: grid; grid-template-columns: 34px auto; align-items: center;
  gap: 10px; padding: 5px 8px 5px 0; text-decoration: none;
  color: var(--text-3); font-family: var(--mono); font-size: 11px;
  letter-spacing: .04em; border-radius: 999px;
  transition: color .3s var(--ease);
}
.route b { font-weight: 400; position: relative; padding-left: 14px; }
/* точка-остановка на линии маршрута */
.route b::before {
  content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--hair-2); transition: all .3s var(--ease);
}
.route span { opacity: 0; translate: -6px 0; transition: all .3s var(--ease); }
.route a:hover { color: var(--text-2); }
.route a:hover span, .route a.on span { opacity: 1; translate: 0 0; }
.route a.on { color: var(--text); }
.route a.on b::before {
  background: var(--brass); box-shadow: 0 0 0 4px rgba(201, 146, 72, .16);
}
/* вертикальная линия, соединяющая остановки */
.route::before {
  content: ""; position: absolute; left: 2px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(var(--hair), var(--hair-2), var(--hair));
}
@media (min-width: 1280px) { .route { display: block; } }

/* ── Общая типографика секций ──────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
h1 {
  font-size: clamp(38px, 7.4vw, 92px); line-height: .98;
  letter-spacing: -.035em; font-weight: 700;
}
h2 {
  font-size: clamp(28px, 3.9vw, 52px); line-height: 1.04;
  letter-spacing: -.03em;
}
h3 { font-size: 18px; letter-spacing: -.02em; }

.eyebrow {
  margin: 0 0 22px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brass);
}
.lead {
  margin: 22px 0 0; max-width: 56ch;
  font-size: clamp(17px, 1.5vw, 21px); color: var(--text-2);
}
.sub { margin: 18px 0 0; max-width: 62ch; color: var(--text-2); }

.sec {
  position: relative; z-index: 1;
  max-width: var(--col); margin: 0 auto;
  padding: clamp(88px, 13vh, 172px) var(--pad);
}
.sec.wide { max-width: 1440px; }
/* Широкие секции занимают всю ширину — на больших экранах отодвигаем их от
   шкалы маршрута, иначе её подписи ложатся на контент. */
@media (min-width: 1280px) {
  .sec.wide { padding-left: clamp(96px, 10vw, 168px); }
}
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* Номер остановки: последовательность здесь настоящая — это порядок,
   в котором продукт собирается из канала. */
.stop {
  margin: 0 0 18px; display: flex; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-3);
}
.stop b { color: var(--brass); font-weight: 500; }
.stop em { margin-left: auto; font-style: normal; color: var(--text-3); letter-spacing: .06em; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 var(--pad) clamp(56px, 9vh, 104px);
  overflow: hidden;
}
.hero-still {
  position: absolute; inset: 0;
  background: url("shots/hero-map.webp") center 22% / cover no-repeat;
  transition: opacity 1.6s var(--ease);
}
/* Живая карта поднялась — кадр уводим (порядок в разметке: still, потом карта). */
#heroMap.ready ~ .hero-still,
.hero:has(#heroMap.ready) .hero-still { opacity: 0; }

/* Селектор по id намеренно: maplibre-gl.css подключается динамически (позже
   этого файла) и своим .maplibregl-map { position: relative } перебил бы
   absolute — контейнер схлопнулся бы в нулевую высоту. */
#heroMap { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease); }
#heroMap.ready { opacity: 1; }
#heroMap canvas { outline: none; }
/* Вуаль поверх карты: держит контраст текста и уводит карту в грунт. */
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(201, 146, 72, .12), transparent 62%),
    linear-gradient(to top, var(--ink) 2%, rgba(7, 9, 12, .78) 38%, rgba(7, 9, 12, .18) 82%);
}
/* На узком экране текст занимает почти всю высоту, а карта под ним — статичный
   кадр во всю ширину: без более плотной вуали заголовок ложится прямо на пины. */
@media (max-width: 720px) {
  .hero-veil {
    background:
      radial-gradient(140% 70% at 70% 12%, rgba(201, 146, 72, .10), transparent 58%),
      linear-gradient(to top, var(--ink) 6%, rgba(7, 9, 12, .9) 46%, rgba(7, 9, 12, .58) 88%);
  }
}

.hero-in { position: relative; z-index: 2; max-width: var(--col); margin: 0 auto; width: 100%; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--hair-2); background: rgba(255, 255, 255, .04);
  color: var(--text); font-weight: 500; font-size: 15px;
  backdrop-filter: blur(8px);
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .08); border-color: var(--hair-2); }
.btn.primary {
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  border-color: transparent; color: #21160a; font-weight: 600;
  box-shadow: 0 10px 30px rgba(201, 146, 72, .22);
}
.btn.primary:hover { box-shadow: 0 16px 40px rgba(201, 146, 72, .32); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.lg { padding: 16px 28px; font-size: 16px; }

.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 20px 34px; margin: 46px 0 0; padding: 24px 0 0;
  border-top: 1px solid var(--hair); max-width: 720px;
}
.metrics dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3);
}
.metrics dd {
  margin: 6px 0 0; font-family: var(--display); font-weight: 600;
  font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.hero-hint {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-3);
}
.hero-hint i { width: 1px; height: 34px; background: linear-gradient(var(--hair-2), transparent); }
/* На телефоне подсказка упирается в метрики — и там она лишняя. */
@media (max-width: 720px) { .hero-hint { display: none; } }

/* ── Колонки и списки фактов ───────────────────────────────── */
.cols {
  display: grid; gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .cols { grid-template-columns: 1.35fr 1fr; } }
.prose p { margin: 0 0 18px; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }
.prose b { color: var(--text); font-weight: 600; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; align-content: start; }
.facts li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--hair);
}
.facts li:first-child { border-top: 1px solid var(--hair); }
.facts .k { font-size: 14px; color: var(--text-3); }
.facts .v { font-family: var(--mono); font-size: 14px; color: var(--text); text-align: right; }

/* ── Мокап устройства ──────────────────────────────────────── */
.stage { perspective: 1500px; display: flex; justify-content: center; }
.stage.narrow { perspective: 1300px; }

.device {
  width: min(340px, 76vw); position: relative;
  transform-style: preserve-3d;
  transition: transform .9s var(--ease);
}
.device.sm { width: min(100%, 246px); }
/* Кадр — 786×1704, то есть высота ≈ 2.17 ширины. Ограничиваем ширину ещё и
   долей высоты экрана, иначе корпус в sticky-сцене режется сверху и снизу. */
.device.tall { width: min(392px, 74vw, 37svh); }

.device-frame {
  position: relative; border-radius: 44px; overflow: hidden;
  background: #05070a;
  padding: 9px;
  border: 1px solid rgba(190, 210, 225, .16);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .9),
    0 2px 4px rgba(0, 0, 0, .6),
    0 30px 60px -18px rgba(0, 0, 0, .85),
    0 60px 120px -40px rgba(0, 0, 0, .9);
}
.device-frame img { border-radius: 36px; -webkit-user-drag: none; }
/* блик стекла */
.device-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: 44px;
  background: linear-gradient(128deg, rgba(255, 255, 255, .10) 0%, transparent 26%, transparent 72%, rgba(255, 255, 255, .05) 100%);
}

/* ── 02: sticky-секвенция зума ─────────────────────────────── */
.seq { position: relative; height: 300vh; }
/* sticky здесь ещё и система координат для аннотаций и шагов приближения
   внутри сцены — они позиционируются absolute относительно неё. */
.seq-stage {
  position: sticky; top: 0; height: 100svh;
  display: flex; align-items: center; justify-content: center;
}
.seq-stage .stage { width: 100%; }
.seq-stage .device { transform: rotateY(-16deg) rotateX(7deg) rotateZ(1.5deg); }

.seq-frames { position: relative; }
.seq-frames img {
  border-radius: 36px;
  transition: opacity .5s var(--ease), transform .8s var(--ease);
}
.seq-frames img + img { position: absolute; inset: 0; opacity: 0; }
.seq-frames img.on { opacity: 1; }

.seq-scale {
  position: absolute; left: 0; right: 0; bottom: clamp(14px, 3vh, 30px);
  margin: 0; display: flex; gap: 20px; justify-content: center;
  font-size: 11px; letter-spacing: .14em; color: var(--text-3);
  text-transform: uppercase; pointer-events: none;
}
.seq-scale span { position: relative; padding-left: 14px; transition: color .4s var(--ease); }
.seq-scale span::before {
  content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: 5px; height: 5px; border-radius: 50%; background: var(--hair-2);
  transition: background .4s var(--ease);
}
.seq-scale span.on { color: var(--brass); }
.seq-scale span.on::before { background: var(--brass); }

/* Аннотации в сцене */
.note {
  position: absolute; margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-2);
  opacity: 0; translate: 0 8px;
  transition: opacity .7s var(--ease), translate .7s var(--ease);
}
.note b {
  display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 999px; border: 1px solid var(--hair-2);
  background: var(--surface); font-family: var(--mono); font-size: 12px; color: var(--text);
}
.note span { max-width: 22ch; }
.note.in { opacity: 1; translate: 0 0; }
.note.n1 { left: 4%; top: 24%; transition-delay: .1s; }
.note.n2 { right: 4%; top: 46%; flex-direction: row-reverse; text-align: right; transition-delay: .25s; }
.note.n3 { left: 8%; bottom: 16%; transition-delay: .4s; }
@media (max-width: 860px) { .note { display: none; } }

/* ── 03: место ─────────────────────────────────────────────── */
.split { display: grid; gap: clamp(36px, 6vw, 80px); align-items: center; }
@media (min-width: 940px) { .split { grid-template-columns: .9fr 1.1fr; } }
.split .device { transform: rotateY(13deg) rotateX(5deg) rotateZ(-1deg); }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 26px; }
.steps li { counter-increment: s; padding-left: 52px; position: relative; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--mono); font-size: 12px; color: var(--brass);
  padding-right: 14px; border-right: 1px solid var(--hair);
}
.steps p { margin: 6px 0 0; color: var(--text-2); font-size: 15.5px; max-width: 52ch; }

/* ── 04: галерея сцен ──────────────────────────────────────── */
.gallery {
  display: grid; gap: clamp(28px, 4vw, 52px);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  perspective: 1800px;
}
.shot { margin: 0; display: grid; gap: 18px; justify-items: center; align-content: start; }
/* Лёгкий сдвиг через один — ряд телефонов читается как витрина, а не как таблица. */
@media (min-width: 760px) { .shot:nth-child(even) { margin-top: 54px; } }
.shot .device { transform: rotateY(-11deg) rotateX(5deg); }
.shot:nth-child(even) .device { transform: rotateY(11deg) rotateX(5deg); }
.shot figcaption {
  font-size: 13.5px; color: var(--text-2); text-align: center; max-width: 26ch;
  display: grid; gap: 4px;
}
.shot figcaption b {
  font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brass);
}

/* ── 05: сравнение тем ─────────────────────────────────────── */
.compare { display: grid; gap: 16px; justify-items: center; }
.compare-box {
  position: relative; width: min(360px, 82vw); border-radius: 40px; overflow: hidden;
  border: 1px solid rgba(190, 210, 225, .16);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
  touch-action: pan-y;
  cursor: ew-resize;
  /* при протягивании ручки браузер иначе выделяет кадры и подписи синим */
  user-select: none; -webkit-user-select: none;
}
.compare-box img { border-radius: 0; -webkit-user-drag: none; pointer-events: none; }
.compare-box img.top { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 44px; translate: -50% 0;
  display: grid; place-items: center; cursor: ew-resize;
}
.compare-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px;
  background: rgba(255, 255, 255, .8); box-shadow: 0 0 18px rgba(0, 0, 0, .6);
}
.compare-handle i {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(12, 16, 20, .82); border: 1px solid rgba(255, 255, 255, .5);
  backdrop-filter: blur(6px); position: relative;
}
.compare-handle i::before,
.compare-handle i::after {
  content: ""; position: absolute; top: 50%; translate: 0 -50%;
  border: 5px solid transparent;
}
.compare-handle i::before { left: 6px; border-right-color: rgba(255, 255, 255, .85); }
.compare-handle i::after { right: 6px; border-left-color: rgba(255, 255, 255, .85); }

.compare-tag {
  position: absolute; bottom: 16px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px;
  border-radius: 999px; backdrop-filter: blur(6px);
}
.compare-tag.l { left: 14px; background: rgba(255, 255, 255, .76); color: #14181c; }
.compare-tag.d { right: 14px; background: rgba(12, 16, 20, .76); color: var(--text); border: 1px solid var(--hair); }
.hint { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }

/* ── 06: чипы категорий ────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 12px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--surface);
  font-size: 15px; opacity: 0; translate: 0 12px;
  transition: opacity .6s var(--ease), translate .6s var(--ease),
              transform .3s var(--ease), border-color .3s var(--ease);
}
.chip.in { opacity: 1; translate: 0 0; }
.chip:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--cc) 60%, transparent); }
.chip .ic {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: color-mix(in srgb, var(--cc) 26%, transparent); font-size: 14px;
}
.chip .ct {
  font-family: var(--mono); font-size: 13px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── 01: сценарии «зачем она мне» ──────────────────────────── */
.cases {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--hair);
  border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.cases li {
  background: var(--surface); padding: 26px 24px 28px;
  display: grid; gap: 8px; align-content: start;
}
.cases .k {
  margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass);
}
.cases h3 { font-size: 20px; letter-spacing: -.025em; }
.cases p:last-child { margin: 0; color: var(--text-2); font-size: 15.5px; }

/* ── 07: как карта живёт ───────────────────────────────────── */
.facts-big { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.facts-big li { padding-top: 22px; border-top: 1px solid var(--hair); }
.facts-big h3 { font-size: 21px; letter-spacing: -.025em; }
.facts-big p { margin: 8px 0 0; color: var(--text-2); font-size: 15.5px; max-width: 46ch; }

/* ── 08: вопросы ───────────────────────────────────────────── */
.faq { border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 0; cursor: pointer; list-style: none;
  transition: color .25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-family: var(--body); font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
/* плюс, который превращается в минус */
.faq summary::after {
  content: ""; flex: none; margin-left: auto;
  width: 13px; height: 13px; position: relative;
  background:
    linear-gradient(var(--brass), var(--brass)) center / 13px 1.5px no-repeat,
    linear-gradient(var(--brass), var(--brass)) center / 1.5px 13px no-repeat;
  transition: rotate .3s var(--ease), background-size .3s var(--ease);
}
/* открыто — остаётся только горизонтальная черта («минус»), с доворотом для плавности */
.faq details[open] summary::after { rotate: 180deg; background-size: 13px 1.5px, 0 13px; }
.faq summary:hover { color: var(--brass-hi); }
.faq p {
  margin: 0 0 22px; max-width: 62ch; color: var(--text-2); font-size: 15.5px;
}

/* ── Кнопка «под большим пальцем» (телефон) ────────────────── */
.cta-dock {
  position: fixed; left: 50%; translate: -50% 0; z-index: 85;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: none; align-items: center; justify-content: center;
  padding: 15px 26px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  color: #21160a; font-weight: 600; font-size: 15.5px; white-space: nowrap;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 4px 14px rgba(201, 146, 72, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), translate .4s var(--ease);
}
.cta-dock.on { opacity: 1; pointer-events: auto; }
/* Показываем только там, где до кнопки в шапке уже не дотянуться. */
@media (max-width: 900px) {
  .cta-dock { display: inline-flex; }
  /* Кнопка висит поверх страницы — подписи в sticky-сцене поднимаем над ней,
     иначе она накрывает шаги приближения. */
  .seq-scale { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ── Финал и подвал ────────────────────────────────────────── */
.sec.end { text-align: center; padding-bottom: clamp(64px, 10vh, 120px); }
.sec.end .stop { justify-content: center; }
.sec.end .stop em { display: none; }
.sec.end .lead { margin-inline: auto; }
.sec.end .cta { justify-content: center; }

.foot {
  position: relative; z-index: 1;
  max-width: var(--col); margin: 0 auto; padding: 40px var(--pad) 64px;
  border-top: 1px solid var(--hair); color: var(--text-3); font-size: 13px;
}
.foot p { margin: 0 0 8px; }
.foot .mono { font-size: 11px; line-height: 1.7; }
.foot a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--hair-2); }
.foot a:hover { color: var(--brass); }

/* ── Появление при скролле ─────────────────────────────────── */
.reveal { opacity: 0; translate: 0 18px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.reveal.in { opacity: 1; translate: 0 0; }

/* Заголовок героя набирается словами — сценография первого кадра. */
.word { display: inline-block; overflow: hidden; vertical-align: top; }
.word i {
  display: inline-block; font-style: normal;
  translate: 0 110%; rotate: 3deg;
  transition: translate .9s var(--ease), rotate .9s var(--ease);
}
h1.in .word i { translate: 0 0; rotate: 0deg; }

/* ── Телефон ────────────────────────────────────────────────
   Основной сценарий: страницу открывают с телефона по ссылке из Telegram.
   Поэтому здесь — сжатый ритм, увеличенные тач-зоны и запас под системные
   панели (safe-area) снизу. */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .sec { padding-top: clamp(64px, 9vh, 96px); padding-bottom: clamp(64px, 9vh, 96px); }
  .sec-head { margin-bottom: 32px; }
  .hero { padding-bottom: calc(clamp(40px, 7vh, 72px) + env(safe-area-inset-bottom)); }
  /* кнопки-таблетки во всю ширину: попасть пальцем с первого раза */
  .cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; padding: 15px 22px; }
  .metrics { gap: 18px 24px; margin-top: 34px; }
  .cases li { padding: 22px 20px 24px; }
  .cases h3, .facts-big h3 { font-size: 19px; }
  .steps li { padding-left: 44px; }
  /* меньше экранов прокрутки на приближение — на телефоне это утомляет */
  .seq { height: 240vh; }
  .faq summary { padding: 18px 0; }
  /* больше воздуха между кадрами: подписи не должны липнуть к следующему экрану */
  .gallery { gap: 48px; }
  .shot { gap: 14px; }
  /* место под кнопку «под большим пальцем», чтобы она не закрывала подвал */
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Крупный шрифт системы / очень узкие экраны */
@media (max-width: 380px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .shot figcaption { max-width: 22ch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition-duration: .01ms !important; }
  .reveal, .note, .chip { opacity: 1; translate: none; }
  .word i { translate: 0 0; rotate: 0; }
  .device { transform: none !important; }
}
