/* AI Mira для iPhone — главная /ios/.
   Ритм «одна мысль — один экран»: первый экран, три раздела «телефон + три галочки + кнопка», три шага,
   сообщения Миры с финальным призывом. Общая шапка, подвал, кнопки, телефон и токены — в ios.css.
   Глубина (тени) — только у телефонов и кнопок; подложки под телефонами плоские. Всё остальное,
   что было на странице раньше, живёт на /ios/features/ со своими стилями (ios-features.css). */

/* ---------- 1. Первый экран ---------- */
.h-hero {
  padding-block: clamp(24px, 3.4vw, 64px) clamp(56px, 6vw, 112px);
  background: radial-gradient(56% 72% at 76% 44%, rgba(124, 92, 255, 0.16), transparent 72%);
}

.h-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
}

/* Заголовок владельца (27.09.2026): «Просто сфотографируй еду. Мира сделает остальное.», вторая
   фраза — курсивом-акцентом. На 390 — не больше трёх строк, поэтому кегль на шаг ниже прежнего. */
.h-hero .ios-h1 {
  font-size: clamp(1.85rem, 1rem + 2.7vw, 3.6rem);
  line-height: 1.04;
}

.h-hero .ios-h1 em {
  display: block;
}

.h-hero .ios-lead {
  max-width: 31rem;
}

/* Третья строка первого экрана — мельче подзаголовка, перед кнопками. */
.h-sub2 {
  max-width: 31rem;
  margin: 12px 0 0;
  color: var(--ios-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.h-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.h-cta--center {
  justify-content: center;
}





/* «День в одном кадре»: большой телефон проживает день, уведомления приходят по времени, внизу —
   шкала дня. Колонка картинки — контейнер: шире 540 px уведомления стоят по обе стороны телефона
   и копятся за день; уже — одно уведомление поверх нижней части экрана (без JS и при «уменьшении
   движения» — все списком под телефоном). Время — главное на шкале. */
.h-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Пока словарь языка не применён (не английский), первый экран и шапка скрыты: иначе английский
   текст сменится переводом уже на экране и всё под ним сдвинется. Класс ставит ios-preload.js,
   снимает ios.js после применения словаря (запасной выход — 1,2 с). */
html.lang-wait .h-hero,
html.lang-wait .mira-global-header {
  visibility: hidden;
}

/* Фон светлеет утром и густеет к вечеру вместе с днём (прозрачность двух слоёв, data-beat). */
.h-sky {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  transition: opacity 1600ms ease;
}

.h-sky--am {
  background: radial-gradient(42% 56% at 74% 30%, rgba(255, 176, 102, 0.28), transparent 70%);
  opacity: 0.75;
}

.h-sky--pm {
  background: radial-gradient(54% 68% at 74% 56%, rgba(70, 44, 200, 0.2), transparent 72%), linear-gradient(180deg, rgba(234, 226, 255, 0) 0%, rgba(222, 211, 255, 0.9) 100%);
  opacity: 0.35;
}

.h-hero[data-beat="0"] .h-sky--am, .h-hero[data-beat="1"] .h-sky--am, .h-hero[data-beat="2"] .h-sky--am { opacity: 1; }
.h-hero[data-beat="3"] .h-sky--am { opacity: 0.85; }
.h-hero[data-beat="4"] .h-sky--am { opacity: 0.6; }
.h-hero[data-beat="5"] .h-sky--am { opacity: 0.25; }
.h-hero[data-beat="6"] .h-sky--am { opacity: 0.1; }
.h-hero[data-beat="0"] .h-sky--pm, .h-hero[data-beat="1"] .h-sky--pm, .h-hero[data-beat="2"] .h-sky--pm { opacity: 0; }
.h-hero[data-beat="3"] .h-sky--pm { opacity: 0.15; }
.h-hero[data-beat="4"] .h-sky--pm { opacity: 0.4; }
.h-hero[data-beat="5"] .h-sky--pm { opacity: 0.8; }
.h-hero[data-beat="6"] .h-sky--pm { opacity: 1; }

.h-dh {
  --nw: min(64cqi, 250px);
  position: relative;
  container-type: inline-size;
  display: grid;
  justify-items: center;
  gap: 26px;
}

.h-dh-stage {
  position: relative;
  width: 100%;
}

.h-dh-phone {
  --w: var(--nw);
  margin-inline: auto;
}

.h-dh-screen > .h-dh-scr {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 300ms ease;
}

.h-dh-screen > .h-dh-scr.is-on {
  opacity: 1;
}

/* Луч сканирования проходит по фото обеда. */
.h-dh-beam {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 0;
  height: 28%;
  opacity: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(124, 92, 255, 0.24) 76%, rgba(255, 255, 255, 0.95) 97%, transparent 100%);
  pointer-events: none;
}

.h-dh.is-scan .h-dh-beam {
  animation: h-dh-beam 1100ms ease both;
}

@keyframes h-dh-beam {
  0% { opacity: 0; transform: translateY(-100%); }
  12%, 88% { opacity: 1; }
  100% { opacity: 0; transform: translateY(360%); }
}

/* Уведомление в стиле iOS: иконка, приложение и время, заголовок, текст. */
.h-dh-list {
  list-style: none;
  margin: 18px auto 0;
  padding: 0;
  width: min(100%, 380px);
  display: grid;
  gap: 10px;
}

.h-dh-n {
  position: relative;
  z-index: 6;
  padding: 11px 13px 12px 11px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px rgba(20, 10, 60, 0.08), 0 16px 36px -14px rgba(60, 40, 140, 0.34);
  color: var(--ios-ink);
  text-align: left;
}

.h-dh-n p {
  margin: 0;
}

.h-dh-ic {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
}

.h-dh-ic > img:first-child {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.h-dh-ic .h-dh-app {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  box-shadow: 0 0 0 2px #fff;
}

.h-dh-ic--app > img:first-child {
  border-radius: 10px;
}

.h-dh-ic--hk {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ios-line);
}

.ios-page .h-dh-ic--hk svg {
  width: 20px;
  height: 20px;
  fill: #ff375f;
  stroke: none;
}

.h-dh-b {
  min-width: 0;
  flex: 1;
}

.h-dh-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: #6b6380;
  font-size: 0.75rem;
  font-weight: 700;
}

.h-dh-top time {
  flex: none;
  color: var(--ios-ink);
  font-size: 0.82rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.h-dh-t {
  margin-top: 2px !important;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

.h-dh-x {
  margin-top: 2px !important;
  color: #4a4358;
  font-size: 0.84rem;
  line-height: 1.36;
}

.h-dh-th {
  flex: none;
  align-self: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.t-dp {
  margin-left: 0.2em;
  font-size: 0.74em;
}

/* Шкала дня: шесть кнопок-моментов (нажатие — переход к этому моменту, home-motion.js). Время —
   главное; цвет — утро оранжевое, полдень синий, вечер сине-фиолетовый. По ширине экрана:
   ≥ 1024 — полоса, время под каждой точкой; 600–1023 — время по очереди над и под полосой;
   < 600 — ряд «таблеток» со временем (две строки по три). */
.h-dh-bar {
  position: relative;
  z-index: 7;
  width: min(100%, 520px);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ios-page .h-dh-sun,
.ios-page .h-dh-moon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: -4.5px;
  fill: none;
  stroke: #f29a2e;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.ios-page .h-dh-sun circle {
  fill: #ffb547;
  stroke: #ffb547;
}

.ios-page .h-dh-moon {
  fill: #4527b8;
  stroke: none;
}

.h-dh-rail {
  position: relative;
  flex: 1;
  height: 50px;
}

.h-dh-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9d42 0%, #ffc857 18%, #86c5ff 36%, #3b82f6 55%, #6a4ee6 77%, #3f24a8 100%);
}

/* Непройденная часть дня — светлой шторкой поверх градиента (сдвиг transform). */
.h-dh-cover {
  position: absolute;
  inset: 0;
  background: rgba(236, 231, 250, 0.86);
  transform: translateX(calc(var(--p, 1) * 100%));
  transition: transform 700ms ease;
}

.h-dh-stops {
  list-style: none;
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
}

.h-dh-stops li {
  position: absolute;
  top: 3.5px;
  left: calc((var(--i) + 0.5) / 6 * 100%);
}

/* --c — точка на полосе, --pc/--tc — заливка и текст активной «таблетки» (контраст ≥ 4.5). */
.h-dh-stops li:nth-child(1) { --i: 0; --c: #ffa646; --pc: #ffa646; --tc: #3a2200; --tx: -22%; }
.h-dh-stops li:nth-child(2) { --i: 1; --c: #f5bd4f; --pc: #f5bd4f; --tc: #3a2a00; --tx: -50%; }
.h-dh-stops li:nth-child(3) { --i: 2; --c: #5fa8ff; --pc: #5fa8ff; --tc: #0b2447; --tx: -50%; }
.h-dh-stops li:nth-child(4) { --i: 3; --c: #3b7cf0; --pc: #2f6ee0; --tc: #fff; --tx: -50%; }
.h-dh-stops li:nth-child(5) { --i: 4; --c: #5a45dc; --pc: #5a45dc; --tc: #fff; --tx: -50%; }
.h-dh-stops li:nth-child(6) { --i: 5; --c: #4328b0; --pc: #4328b0; --tc: #fff; --tx: -78%; }

/* Кнопка: точка по центру полосы, время под ней; зона нажатия ≥ 44 × 44. */
.h-dh-stop {
  position: absolute;
  left: 0;
  top: -22px;
  min-width: 44px;
  min-height: 44px;
  padding: 14px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: #5f5775;
  font: inherit;
  cursor: pointer;
  transform: translateX(-50%);
  -webkit-tap-highlight-color: transparent;
}

.h-dh-stop:focus-visible {
  outline: 2px solid var(--ios-violet);
  outline-offset: 2px;
}

.h-dh-dot {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(20, 10, 60, 0.28);
  transition: transform 400ms var(--ios-spring), background 300ms ease;
}

.h-dh-dot::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  opacity: 0;
  transition: opacity 400ms ease;
}

.h-dh-stop time {
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transform-origin: 50% 0;
  transition: color 300ms ease, transform 400ms var(--ios-spring);
}

.h-dh-stops .cur .h-dh-dot {
  transform: scale(1.35);
}

.h-dh-stops .cur .h-dh-dot::after {
  opacity: 0.6;
}

.h-dh-stops .cur time {
  color: var(--ios-ink);
  transform: scale(1.2);
}

/* Подсказка с событием — над точкой, при наведении мышью и при фокусе с клавиатуры. */
.h-dh-tip {
  position: absolute;
  z-index: 8;
  bottom: calc(100% - 8px);
  left: 50%;
  width: max-content;
  max-width: 210px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #221a38;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  opacity: 0;
  transform: translate(var(--tx, -50%), 4px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.h-dh-stop:focus-visible .h-dh-tip {
  opacity: 1;
  transform: translate(var(--tx, -50%), 0);
}

@media (hover: hover) {
  .h-dh-stop:hover .h-dh-tip {
    opacity: 1;
    transform: translate(var(--tx, -50%), 0);
  }
}

/* ≥ 1024, узкая колонка: AM/PM под цифрами, чтобы шесть моментов не сталкивались. */
@container (max-width: 539.98px) {
  .h-dh-stop .t-dp {
    display: block;
    margin: 1px 0 0;
    font-size: 0.72rem;
  }
}

/* 600–1023: время по очереди под и над полосой. */
@media (min-width: 600px) and (max-width: 1023.98px) {
  .h-dh-rail {
    height: 82px;
  }

  .h-dh-track {
    top: 33px;
  }

  .h-dh-stops li {
    top: 36.5px;
  }

  .ios-page .h-dh-sun,
  .ios-page .h-dh-moon {
    margin-top: 28.5px;
  }

  .h-dh-stop .t-dp {
    display: inline;
    margin: 0 0 0 0.2em;
    font-size: 0.74em;
  }

  .h-dh-stops li:nth-child(even) .h-dh-stop {
    top: auto;
    bottom: -22px;
    flex-direction: column-reverse;
    padding: 4px 4px 14px;
  }

  .h-dh-stops li:nth-child(even) time {
    transform-origin: 50% 100%;
  }

  .h-dh-stops li:nth-child(even) .h-dh-tip {
    bottom: auto;
    top: calc(100% - 8px);
  }
}

/* < 600 (телефоны): «дуга дня» — вариант «капля времени» (выбор владельца 28.09.2026). Вершина дуги
   касается низа телефона (вершина — 40/104 высоты рисунка, отсюда 0.1176 ширины), шесть моментов —
   точки 8 px, над выбранной — «капля» с крупным временем, событие прямо под центром дуги
   (60/104 высоты рисунка; ширина — сколько места внутри дуги на этой высоте, 190/340). Уведомление поднято так, чтобы капля его не
   задевала. */
.h-dh-arc {
  display: none;
}

@media (max-width: 599.98px) {
  .h-dh-bar {
    display: none;
  }

  .h-dh-arc {
    position: relative;
    z-index: 7;
    display: block;
    width: min(340px, 100%);
    margin-top: calc(-26px - min(340px, 100cqi) * 0.1176);
  }

  /* Без движения уведомления стоят списком под телефоном — дуга идёт после них, без захода вверх. */
  html:not(.hm) .h-dh-arc {
    margin-top: 6px;
  }

  .h-dh-arc-map {
    position: relative;
  }

  .h-dh-arc-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .ios-page .h-dh-arc-base {
    fill: none;
    stroke: rgba(107, 67, 227, 0.2);
    stroke-width: 5;
    stroke-linecap: round;
  }

  .ios-page .h-dh-arc-prog {
    fill: none;
    stroke: url(#h-dh-dayg);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--ap, 1));
    transition: stroke-dashoffset 600ms ease;
  }

  .ios-page .h-dh-arc-dot {
    stroke: #fff;
    stroke-width: 2.5;
  }

  .ios-page .h-dh-arc-sun {
    fill: none;
    stroke: #f29a2e;
    stroke-width: 1.6;
    stroke-linecap: round;
  }

  .ios-page .h-dh-arc-sun circle {
    fill: #ffb547;
    stroke: #ffb547;
  }

  .ios-page .h-dh-arc-moon {
    fill: #4527b8;
    stroke: none;
  }

  .h-dh-arc-hit {
    position: absolute;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .h-dh-arc-hit:focus-visible {
    outline: 2px solid var(--ios-violet);
    outline-offset: -4px;
  }

  /* «Капля»: цвет своего часа, время внутри, хвостик вниз к точке; едет по дуге (transform). */
  .h-dh-arc-drop {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    min-width: 64px;
    padding: 5px 11px 6px;
    border-radius: 13px;
    background: var(--dc, #ffa646);
    color: var(--dt, #3a2200);
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 10px 20px -8px rgba(40, 20, 110, 0.45);
    pointer-events: none;
    /* Без скрипта — над первой точкой (48, 73 из 340 × 104); скрипт ставит свой сдвиг. */
    transform: translate(calc(min(340px, 100cqi) * 0.1412), calc(min(340px, 100cqi) * 0.2147)) translate(-50%, calc(-100% - 12px));
    transition: background 300ms ease, color 300ms ease;
  }

  .h-dh-arc-drop::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 11px;
    height: 11px;
    margin-left: -5.5px;
    border-radius: 2px;
    background: inherit;
    transform: rotate(45deg);
  }

  .h-dh-arc-drop time {
    position: relative;
    z-index: 1;
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }

  .h-dh-arc-drop .t-dp {
    font-size: 0.62em;
    margin-left: 0.2em;
  }

  /* Событие — между крайними точками дуги; когда капля стоит на крайней точке (утро или вечер),
     подпись сужается, чтобы не зайти под каплю, и длинная (немецкая, французская) переносится. */
  .h-dh-arc-read {
    margin: calc(min(340px, 100cqi) * -0.1294) auto 0;
    max-width: calc(min(340px, 100cqi) * 0.53 - 10px);
    display: grid;
    justify-items: center;
    gap: 2px;
    text-align: center;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  .h-dh-arc-read.is-swap {
    opacity: 0;
  }


  .h-dh-arc.is-edge .h-dh-arc-read {
    max-width: min(calc(min(340px, 100cqi) * 0.53 - 10px), calc(min(340px, 100cqi) * 0.7176 - 92px));
  }

  .h-dh-arc-read .h-dh-arc-title {
    color: #5f5775;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
  }

  /* Уведомление стоит над каплей: низ — в 58 px от низа телефона (капля над вершиной дуги — ~48 px). */
  html.hm .h-dh .h-dh-list {
    top: auto;
    bottom: 58px;
  }

  html.hm .h-dh .h-dh-n {
    top: auto;
    bottom: 0;
  }

  /* Свайп по телефону листает моменты; вертикальная прокрутка страницы остаётся за браузером. */
  .h-dh-stage {
    touch-action: pan-y;
  }
}

/* Компьютер: телефон стоит от верха первого экрана — если колонка с текстом выше картинки, телефон
   не съезжает вниз (иначе шкала уходит под край экрана на невысоких мониторах). */
@media (min-width: 901px) {
  .h-hero-media {
    align-self: start;
  }

  /* Невысокий экран (MacBook 1440×800, 1512×860, 1366×768): весь первый экран — заголовок, кнопки,
     телефон и шкала — помещается без прокрутки; телефон считается от высоты окна. */
  .h-dh {
    --nw: min(64cqi, 250px, max(190px, calc((100vh - 300px) * 0.4919)));
  }
}

@media (min-width: 901px) and (max-height: 900px) {
  .h-hero {
    padding-block: 12px 40px;
  }

  .h-dh {
    gap: 18px;
  }
}

/* Совсем невысокий экран (1280×720): уведомления плотнее, чтобы длинные немецкие и французские тексты
   не наезжали друг на друга. */
@media (min-width: 901px) and (max-height: 760px) {
  .h-dh-n {
    padding: 9px 11px 10px 10px;
  }

  .h-dh-t {
    font-size: 0.88rem;
  }

  .h-dh-x {
    font-size: 0.78rem;
    line-height: 1.32;
  }
}

/* Широкая колонка: уведомления по обе стороны телефона. */
@container (min-width: 540px) {
  .h-dh-stage {
    --pw: min(46cqi, 290px);
    height: calc(var(--pw) * 738 / 363 + 90px);
  }

  @media (min-width: 901px) {
    .h-dh-stage {
      --pw: min(46cqi, 290px, max(200px, calc((100vh - 300px) * 0.4919)));
    }
  }

  .h-dh-phone {
    --w: var(--pw);
  }

  .h-dh-list {
    position: absolute;
    inset: 0;
    width: auto;
    margin: 0;
    display: block;
  }

  .h-dh-n {
    position: absolute;
    width: 45.5cqi;
  }

  .h-dh-n:nth-child(odd) { left: 0; }
  .h-dh-n:nth-child(even) { right: 0; }
  /* Верхние четыре — от верха, два вечерних — от низа сцены: длинный текст растёт вверх и не
     заходит на шкалу дня. */
  .h-dh-n:nth-child(1) { top: 0; }
  .h-dh-n:nth-child(2) { top: 10%; }
  .h-dh-n:nth-child(3) { top: 28%; }
  .h-dh-n:nth-child(4) { top: 36%; }
  .h-dh-n:nth-child(5) { bottom: 8%; }
  .h-dh-n:nth-child(6) { bottom: 0; }

  .h-dh-th {
    display: none;
  }
}

/* Движение (html.hm ставится до первой отрисовки): уведомления приходят по одному. Широко — копятся
   за день, текущее подсвечено; узко — одно поверх нижней части экрана. */
html.hm .h-dh-n {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 300ms ease, transform 500ms var(--ios-spring), box-shadow 300ms ease;
}

html.hm .h-dh-n.on {
  opacity: 1;
  transform: none;
}

.h-dh-n.cur {
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.4), 0 24px 48px -14px rgba(60, 40, 140, 0.45);
}

/* Без движения: смены мгновенные, выбор момента всё равно работает. */
@media (prefers-reduced-motion: reduce) {
  .h-dh *,
  .h-dh *::before,
  .h-dh *::after,
  .h-sky {
    transition: none !important;
    animation: none !important;
  }
}

html.hm .h-dh-stops li:not(.on) .h-dh-dot {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(107, 67, 227, 0.32), 0 2px 6px rgba(20, 10, 60, 0.16);
}

@container (max-width: 539.98px) {
  html.hm .h-dh-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--nw) * 738 / 363 * 0.6);
    margin: 0 auto;
    display: block;
  }

  html.hm .h-dh-n {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
  }

  html.hm .h-dh-n.on:not(.cur) {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

/* ---------- 2–4. Телефон + три галочки + кнопка ---------- */
.h-feat {
  padding-block: clamp(48px, 5vw, 88px);
  border-top: 1px solid var(--ios-line);
}

.h-feat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 96px);
}

.h-feat--flip .h-media {
  order: 2;
}

/* Плоская подложка, телефон в ней целиком: экран не обрезается. */
.h-media {
  padding: clamp(24px, 2.6vw, 40px) clamp(16px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--ios-r-lg);
  background: linear-gradient(160deg, #f3eeff 0%, #e6dcff 100%);
}

.h-media .h-phone {
  --w: clamp(220px, 17.4vw, 250px);
}

/* ---------- 2. Фото-петля: камера → скан → результат ----------
   Кадры лежат друг на друге во весь экран. Без анимации (reduced motion) виден результат. */
.h-snap-screen .h-snap-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h-snap-frame:not(:last-child),
.h-snap-cap:not(:last-child) {
  opacity: 0;
}

.h-snap-caps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  place-items: center;
  counter-reset: snap;
}

.h-snap-cap {
  grid-area: 1 / 1;
  padding: 8px 16px 8px 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ios-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ios-ink);
  font-size: 0.95rem;
  font-weight: 750;
  white-space: nowrap;
  counter-increment: snap;
}

.h-snap-cap::before {
  content: counter(snap);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ios-brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 850;
}

@media (prefers-reduced-motion: no-preference) {
  .h-snap-frame {
    animation: h-snap 6.6s linear infinite both paused;
  }

  .h-snap-cap {
    animation: h-snap-cap 6.6s linear infinite both paused;
  }

  .h-snap.is-playing .h-snap-frame,
  .h-snap.is-playing .h-snap-cap {
    animation-play-state: running;
  }

  /* Отрицательные задержки: у всех один круг, каждый кадр видим свою треть. */
  .h-snap-frame:nth-child(1), .h-snap-cap:nth-child(1) { animation-delay: -1.1s; }
  .h-snap-frame:nth-child(2), .h-snap-cap:nth-child(2) { animation-delay: -5.5s; }
  .h-snap-frame:nth-child(3), .h-snap-cap:nth-child(3) { animation-delay: -3.3s; }
}

/* Две сцены (голос → дневник): по половине круга; без анимации виден первый кадр — запись голосом. */
.h-snap--2 .h-snap-frame:not(:last-child),
.h-snap--2 .h-snap-cap:not(:last-child) {
  opacity: 1;
}

.h-snap--2 .h-snap-frame:last-child,
.h-snap--2 .h-snap-cap:last-child {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  /* Первый кадр стоит, второй проявляется поверх и уходит — без просвета фона в середине смены. */
  .h-snap--2 .h-snap-frame:first-child {
    animation: none;
  }

  .h-snap--2 .h-snap-frame {
    animation-name: h-snap2;
    animation-duration: 6s;
  }

  .h-snap--2 .h-snap-cap {
    animation-name: h-snap2-cap;
    animation-duration: 6s;
  }

  .h-snap--2 .h-snap-frame:nth-child(1), .h-snap--2 .h-snap-cap:nth-child(1) { animation-delay: 0s; }
  .h-snap--2 .h-snap-frame:nth-child(2), .h-snap--2 .h-snap-cap:nth-child(2) { animation-delay: -3s; }
}

@keyframes h-snap2 {
  0%, 46% { opacity: 1; }
  50%, 96% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes h-snap2-cap {
  0%, 46% { opacity: 1; transform: none; }
  50%, 96% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: none; }
}

/* Голосовое в чате: кадр RU_14, полоски записи на нём живые (как VoiceBars в чате — тонкие белые
   полоски, высота дышит). Только transform; играют, пока раздел виден (data-play). */
.h-cv img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h-cv-bars {
  position: absolute;
  left: 42.8%;
  top: 81.25%;
  width: 30.3%;
  height: 2.45%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h-cv-bars i {
  display: block;
  width: 2%;
  height: 100%;
  border-radius: 2px;
  background: #fff;
  transform: scaleY(0.45);
  animation: h-cv 820ms ease-in-out infinite alternate paused;
}

.h-snap.is-playing .h-cv-bars i {
  animation-play-state: running;
}

.h-cv-bars i:nth-child(3n) { animation-duration: 640ms; }
.h-cv-bars i:nth-child(3n + 1) { animation-duration: 910ms; }
.h-cv-bars i:nth-child(4n) { animation-delay: -300ms; }
.h-cv-bars i:nth-child(5n + 2) { animation-delay: -520ms; }
.h-cv-bars i:nth-child(7n + 3) { animation-delay: -150ms; }
.h-cv-bars i:nth-child(n + 9):nth-child(-n + 15) { animation-name: h-cv-hi; }

@keyframes h-cv {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(0.85); }
}

@keyframes h-cv-hi {
  from { transform: scaleY(0.45); }
  to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .h-cv-bars i {
    animation: none;
    transform: scaleY(0.6);
  }
}

@keyframes h-snap {
  0% { opacity: 1; transform: scale(1.012); }
  31% { opacity: 1; transform: scale(1); }
  36% { opacity: 0; transform: scale(1); }
  95% { opacity: 0; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1.012); }
}

@keyframes h-snap-cap {
  0%, 31% { opacity: 1; transform: none; }
  35%, 96% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: none; }
}

.h-copy {
  min-width: 0;
}

.h-copy .ios-h2 {
  max-width: 14ch;
}

.h-ticks {
  list-style: none;
  margin: clamp(22px, 2.4vw, 30px) 0 clamp(26px, 3vw, 36px);
  padding: 0;
  display: grid;
  gap: 14px;
}

.h-ticks li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  color: var(--ios-ink);
  font-size: clamp(1.02rem, 0.97rem + 0.22vw, 1.15rem);
  font-weight: 600;
  line-height: 1.45;
}

.ios-page .h-tick {
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 50%;
  background: var(--ios-lilac);
  fill: none;
  stroke: var(--ios-violet);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Раздел 3: три узнаваемые ситуации вместо галочек — ситуация жирным, ниже что делает Мира.
   Плоские карточки: без тени и стекла. */
.h-cases {
  list-style: none;
  margin: clamp(22px, 2.4vw, 30px) 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.h-case {
  padding: 14px 18px 15px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--ios-line);
  border-left: 3px solid var(--ios-brand);
  border-radius: 16px;
  background: #fff;
}

.h-case b {
  color: var(--ios-ink);
  font-size: clamp(1.02rem, 0.97rem + 0.22vw, 1.12rem);
  font-weight: 800;
  line-height: 1.3;
}

.h-case span {
  color: var(--ios-copy);
  font-size: 0.98rem;
  line-height: 1.5;
}

.h-note {
  margin: 12px 0 clamp(22px, 2.6vw, 30px);
  color: var(--ios-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Фото + вопрос в чате: три настоящих кадра цепочкой (прикрепил → спросил → ответ Миры). */
.h-ask {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid;
  justify-items: center;
  gap: 16px;
}

.h-ask-t {
  margin: 0;
  color: var(--ios-ink);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 800;
  text-align: center;
}

.h-ask-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 34px;
  max-width: 960px;
  width: 100%;
}

.h-ask-flow li {
  position: relative;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 22px;
  background: #f6f4fb;
  box-shadow: 0 1px 2px rgba(20, 10, 60, 0.06), 0 14px 26px -16px rgba(60, 40, 140, 0.35);
}

.h-ask-flow img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* Стрелка к следующему кадру. */
.h-ask-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -24px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-top: 2.5px solid #b9a6ff;
  border-right: 2.5px solid #b9a6ff;
  transform: translateY(-50%) rotate(45deg);
}

@media (max-width: 760px) {
  .h-ask-flow {
    grid-template-columns: minmax(0, 1fr);
    max-width: 360px;
    gap: 30px;
  }

  .h-ask-flow li:not(:last-child)::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -21px;
    transform: translateX(-50%) rotate(135deg);
  }
}

/* ---------- 5. Три шага: линия от 1 к 3 и шаги по очереди ---------- */
.h-steps,
.h-voice {
  padding-block: clamp(56px, 5.8vw, 100px);
  border-top: 1px solid var(--ios-line);
}

.h-center {
  text-align: center;
}

.h-steps .ios-h2,
.h-voice .ios-h2 {
  margin-inline: auto;
}

.h-step-list {
  --gap: clamp(20px, 3vw, 48px);
  list-style: none;
  max-width: 1040px;
  margin: clamp(32px, 4vw, 56px) auto clamp(32px, 4vw, 48px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

.h-step {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 16px;
  text-align: center;
}

.h-num {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #7a5af0 0%, #5a36d6 100%);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 850;
}

/* Отрезок от кружка этого шага до следующего. Горизонтальный на широком экране, вертикальный — в
   столбик. Ширина линии задаётся viewBox высотой 4, поэтому толщина одна при любой длине. */
.h-link {
  position: absolute;
  overflow: visible;
}

.h-link-h {
  top: 22px;
  left: calc(50% + 30px);
  width: calc(100% + var(--gap) - 60px);
  height: 4px;
}

.h-link path {
  fill: none;
  stroke: #b9a6ff;
  stroke-width: 4;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.h-link-v {
  display: none;
}

/* Кадры шагов — настоящие экраны приложения (27.09.2026): анкета и режим питания, готовый план,
   сканер с разобранными частями блюда. */
.h-step-vis {
  position: relative;
  width: 100%;
  max-width: 250px;
  height: 264px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(160deg, #f3eeff 0%, #e6dcff 100%);
  box-shadow: 0 1px 2px rgba(20, 10, 60, 0.06), 0 14px 26px -16px rgba(60, 40, 140, 0.35);
}

.h-step-vis img {
  display: block;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20, 10, 60, 0.08), 0 10px 22px -10px rgba(60, 40, 140, 0.4);
}

/* 1: цель в анкете и режим «Худеть, сохраняя мышцы» — две карточки внахлёст. */
.h-step-vis--duo .h-duo-a {
  position: absolute;
  left: 10px;
  top: 12px;
  width: 64%;
  height: auto;
}

.h-step-vis--duo .h-duo-b {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 72%;
  height: auto;
}

/* 2: экран «план готов» целиком. */
.h-step-vis--screen {
  height: auto;
  min-height: 264px;
  padding: 12px 10px;
  display: grid;
  align-content: center;
}

.h-step-vis--screen img {
  width: 100%;
  height: auto;
}

/* 3: кадр сканера, поверх — части блюда с калориями (в сумме — итог блюда на экране результата). */
.h-step-vis--scan img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  border-radius: 0;
  box-shadow: none;
}

.h-scan-chips {
  list-style: none;
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
}

.h-scan-chips li {
  position: absolute;
  padding: 5px 10px 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 14px -6px rgba(20, 10, 60, 0.45);
  color: var(--ios-ink);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.h-scan-chips li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.h-scan-chips li:nth-child(1) { left: 10px; top: 20%; --c: #ff9f43; }
.h-scan-chips li:nth-child(2) { right: 10px; top: 43%; --c: #e0b24a; }
.h-scan-chips li:nth-child(3) { left: 14px; top: 66%; --c: #1f9d68; }

html.hm .h-step-list:not(.is-in) .h-scan-chips li {
  opacity: 0;
  transform: translateY(8px) scale(0.94);
}

html.hm .h-step-list .h-scan-chips li {
  transition: opacity 400ms ease, transform 500ms var(--ios-spring);
}

html.hm .h-step-list .h-scan-chips li:nth-child(1) { transition-delay: 2500ms; }
html.hm .h-step-list .h-scan-chips li:nth-child(2) { transition-delay: 2750ms; }
html.hm .h-step-list .h-scan-chips li:nth-child(3) { transition-delay: 3000ms; }

.h-step p {
  max-width: 17rem;
  margin: 0;
  color: var(--ios-ink);
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.45;
}

/* Появление: линия рисуется, кружки и кадры загораются по очереди. Без движения — сразу итог. */
html.hm .h-step-list:not(.is-in) .h-link path {
  stroke-dashoffset: 1;
}

html.hm .h-step-list:not(.is-in) .h-num {
  background: var(--ios-lilac);
  color: var(--ios-violet);
  transform: scale(0.9);
}

html.hm .h-step-list:not(.is-in) .h-step-vis {
  opacity: 0;
  transform: translateY(-12px) scale(1.05);
}

html.hm .h-step-list .h-link path {
  transition: stroke-dashoffset 700ms ease-in-out;
}

html.hm .h-step-list .h-num {
  transition: background 300ms ease, color 300ms ease, transform 400ms var(--ios-spring);
}

html.hm .h-step-list .h-step-vis {
  transition: opacity 450ms ease, transform 650ms var(--ios-spring);
}

/* Порядок: шаг 1 → линия → шаг 2 → линия → шаг 3. */
.h-step:nth-child(1) .h-num, .h-step:nth-child(1) .h-step-vis { transition-delay: 200ms; }
.h-step:nth-child(1) .h-link path { transition-delay: 500ms; }
.h-step:nth-child(2) .h-num, .h-step:nth-child(2) .h-step-vis { transition-delay: 1100ms; }
.h-step:nth-child(2) .h-link path { transition-delay: 1400ms; }
.h-step:nth-child(3) .h-num, .h-step:nth-child(3) .h-step-vis { transition-delay: 2000ms; }

/* ---------- 6. Что говорит Мира + финальный призыв ---------- */
/* Карусель из трёх телефонов в полный размер: обычная горизонтальная прокрутка со «щелчком»
   (scroll-snap). Лента не двигается трансформами — её прокручивает браузер; соседние слайды видны за
   счёт отступов по краям и притушены классом. Полоса прокрутки скрыта. */
.h-car {
  --pw: clamp(270px, 21vw, 300px);
  --gap: clamp(16px, 2.4vw, 32px);
  position: relative;
  max-width: calc(var(--pw) * 2.3);
  margin: clamp(28px, 3.6vw, 48px) auto 0;
}

/* Лента с прокруткой обрезает всё, что выходит за её коробку, — и по вертикали тоже. Поэтому внутри
   запас под тень телефона (0 36px 64px -24px уходит на ~76 px вниз), а отрицательные поля
   возвращают раскладку на место: точки и подпись стоят там же, где стояли. */
.h-car-track {
  position: relative;
  display: flex;
  gap: var(--gap);
  /* Низ: -56 px запаса и -12 px точек — соседние отрицательные поля не складываются, берётся
     большее, поэтому здесь сразу сумма. */
  margin-block: -24px -68px;
  padding: 40px calc(50% - var(--pw) / 2) 92px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc(50% - var(--pw) / 2);
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.h-car-track::-webkit-scrollbar {
  display: none;
}

/* На широком экране соседние телефоны у краёв ленты уходят в прозрачность, а не обрываются. */
@media (min-width: 901px) {
  .h-car-track {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  }
}

/* Один свайп — один слайд: быстрый взмах пальцем не проскакивает соседний чат. */
.h-car-slide {
  flex: 0 0 var(--pw);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.h-car-slide .h-phone {
  --w: var(--pw);
  transition: opacity 400ms ease, scale 400ms var(--ios-ease);
}

.h-car-slide:not(.is-active) .h-phone {
  opacity: 0.45;
  scale: 0.92;
}

.h-car-arrow {
  position: absolute;
  z-index: 3;
  top: calc(50% - 40px);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ios-line);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--ios-e1);
  color: var(--ios-ink);
  cursor: pointer;
  transition: translate 200ms var(--ios-ease), box-shadow 200ms ease;
}

.h-car-arrow:hover {
  translate: 0 -2px;
  box-shadow: var(--ios-e2);
}

.h-car-arrow:focus-visible,
.h-car-dots button:focus-visible {
  outline: 3px solid rgba(107, 67, 227, 0.45);
  outline-offset: 3px;
}

.ios-page .h-car-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-car-prev {
  left: -64px;
}

.h-car-next {
  right: -64px;
}

/* Точки — над нижним запасом ленты (он заходит под них), иначе лента перехватывает нажатия. */
.h-car-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: -12px;
}

/* Кнопка 44×44 (палец попадёт), видимая точка — маленькая. */
.h-car-dots button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
}

.h-car-dots button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(107, 67, 227, 0.25);
  transition: width 300ms var(--ios-ease), background 300ms ease;
}

.h-car-dots button[aria-current="true"]::before {
  width: 26px;
  background: var(--ios-brand);
}

@media (prefers-reduced-motion: reduce) {
  .h-car-track {
    scroll-behavior: auto;
  }

  .h-car-slide .h-phone {
    transition: none;
  }
}

/* Чат приложения: цвета и размеры сняты с настоящего экрана (фон #f6f4fb, свой пузырь #7c5cff).
   Всё в долях ширины экрана (cqi), поэтому на любом размере телефона выглядит одинаково. */
.h-chat-screen {
  background: #f6f4fb;
}

.h-app {
  container-type: inline-size;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #1d1728;
  font-size: 4.1cqi;
  line-height: 1.38;
}

.h-app-status {
  padding: 4.6cqi 8cqi 1.6cqi;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 4.4cqi;
  font-weight: 700;
}

.h-app-sig {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.8cqi;
}

.h-app-sig i {
  width: 1.2cqi;
  height: 2.4cqi;
  border-radius: 1px;
  background: #1d1728;
}

.h-app-sig i:nth-child(2) { height: 3.2cqi; }
.h-app-sig i:nth-child(3) { width: 5.4cqi; height: 2.6cqi; border-radius: 1cqi; }

.h-app-head {
  padding: 2.4cqi 4.4cqi 3cqi;
  display: grid;
  grid-template-columns: 11cqi minmax(0, 1fr) 10cqi 10cqi;
  align-items: center;
  gap: 2.4cqi;
  border-bottom: 1px solid rgba(68, 42, 111, 0.07);
}

.h-app-head img {
  width: 11cqi;
  height: 11cqi;
  border-radius: 50%;
  object-fit: cover;
}

.h-app-who {
  display: grid;
  line-height: 1.15;
}

.h-app-who b {
  font-size: 5cqi;
  font-weight: 800;
}

.h-app-who small {
  display: inline-flex;
  align-items: center;
  gap: 1.2cqi;
  color: #6b6478;
  font-size: 3.4cqi;
}

.h-app-who small i {
  width: 2cqi;
  height: 2cqi;
  border-radius: 50%;
  background: #34c759;
}

.h-app-btn {
  width: 10cqi;
  height: 10cqi;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(40, 20, 90, 0.1);
  font-size: 4.4cqi;
  font-weight: 800;
}

.ios-page .h-app-btn svg,
.ios-page .h-app-round svg {
  width: 5cqi;
  height: 5cqi;
  fill: none;
  stroke: #2e2740;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-app-body {
  flex: 1;
  min-height: 0;
  padding: 3cqi 4.4cqi;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2.6cqi;
  overflow: hidden;
}

.h-app-day {
  align-self: center;
  margin: 0 0 1cqi;
  padding: 1cqi 3.6cqi;
  border-radius: 999px;
  background: #ece6fd;
  color: #6b43e3;
  font-size: 3.2cqi;
  font-weight: 700;
}

.h-app-row {
  display: grid;
  grid-template-columns: 8cqi minmax(0, 1fr);
  align-items: end;
  gap: 2cqi;
}

.h-app-row img {
  width: 8cqi;
  height: 8cqi;
  border-radius: 50%;
  object-fit: cover;
}

.h-b {
  position: relative;
  margin: 0;
  padding: 2.6cqi 3.4cqi 1.8cqi;
  border-radius: 5cqi;
  font-size: 3.9cqi;
  overflow-wrap: break-word;
}

.h-b time {
  display: block;
  margin-top: 0.6cqi;
  font-size: 2.9cqi;
  text-align: right;
  opacity: 0.6;
}

.h-b--mira {
  border-bottom-left-radius: 1.6cqi;
  background: #fff;
}

.h-b--me {
  align-self: flex-end;
  max-width: 78%;
  border-bottom-right-radius: 1.6cqi;
  background: #7c5cff;
  color: #fff;
}

.h-app-compose {
  margin: 2cqi 4cqi 6cqi;
  padding: 1.6cqi;
  display: grid;
  grid-template-columns: 10cqi minmax(0, 1fr) 10cqi;
  align-items: center;
  gap: 2cqi;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(40, 20, 90, 0.08);
}

.h-app-round {
  width: 10cqi;
  height: 10cqi;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #efeafd;
}

.h-app-ph {
  color: #a09aac;
  font-size: 4cqi;
}

.h-voice .ios-fine {
  margin-top: 22px;
}

.h-final {
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(32px, 4vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: var(--ios-r-lg);
  background: linear-gradient(160deg, #f3eeff 0%, #e6dcff 100%);
  text-align: center;
}

.h-final-t {
  max-width: 24ch;
  margin: 0 auto;
  color: var(--ios-ink);
  font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}

.h-final-t em {
  font-family: var(--ios-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ios-violet);
}

.h-final .ios-note {
  margin-top: 16px;
}

/* Тихая ссылка на все возможности — над подвалом. */
.h-more {
  margin: 0;
  padding: 8px var(--ios-gutter) 36px;
  text-align: center;
}

.h-more a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ios-violet);
  font-weight: 750;
  text-decoration: none;
}

.h-more a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Подписи под телефоном могут переноситься на узком экране. */
.h-snap-cap {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

/* ---------- Материал: тени телефонов, блик стекла, свечение за телефоном ---------- */
/* Две тени: контактная (близко, плотная) и окружающая (далеко, мягкая). */
.ios-home .h-phone {
  box-shadow:
    0 2px 5px rgba(20, 10, 50, 0.18),
    0 36px 64px -24px rgba(50, 30, 120, 0.45);
}

.ios-home .h-phone .ios-phone-screen::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 34%);
  pointer-events: none;
}

.h-media {
  position: relative;
  isolation: isolate;
  perspective: 1200px;
}

/* Мягкое свечение за телефоном: медленно плывёт, пока раздел на экране. */
.h-media::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 44%;
  width: 78%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.34), rgba(124, 92, 255, 0));
  pointer-events: none;
}

/* Кнопки: подъём и мягкое свечение при наведении, нажатие — чуть меньше. */
.ios-home .ios-btn {
  position: relative;
  isolation: isolate;
}

.ios-home .ios-btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10px;
  border-radius: 24px;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.5), rgba(124, 92, 255, 0));
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
}

.ios-home .ios-btn:hover::before {
  opacity: 1;
}

.ios-home .ios-btn:active {
  scale: 0.98;
}

/* Финал: свечение за карточкой. */
.h-final {
  position: relative;
  isolation: isolate;
}

.h-final::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -24px;
  border-radius: 48px;
  background: radial-gradient(60% 70% at 50% 50%, rgba(124, 92, 255, 0.32), rgba(124, 92, 255, 0) 72%);
  pointer-events: none;
}

/* ---------- Движение: только при html.hm (ставит home-motion.js) ----------
   Без JS, без IntersectionObserver и при «уменьшении движения» этих правил нет — всё видно сразу. */
:root {
  --hm-e: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Раздел въезжает на 24 px, внутри — такты по очереди: заголовок → текст → галочки → кнопка. */
html.hm .h-feat > .ios-wrap,
html.hm .h-steps > .ios-wrap,
html.hm .h-voice > .ios-wrap {
  translate: 0 24px;
}

html.hm .is-hm-in > .ios-wrap {
  translate: 0 0;
  transition: translate 700ms var(--hm-e);
}

html.hm .hm-beat {
  opacity: 0;
  translate: 0 18px;
}

html.hm .is-hm-in .hm-beat {
  opacity: 1;
  translate: 0 0;
  transition: opacity 600ms var(--hm-e) var(--hm-d, 0ms), translate 650ms var(--hm-e) var(--hm-d, 0ms);
}

html.hm .h-ticks .h-tick {
  scale: 0.6;
}

html.hm .is-hm-in .h-ticks .h-tick {
  scale: 1;
  transition: scale 450ms var(--ios-spring) calc(var(--hm-d, 0ms) + 140ms);
}

/* Телефоны: поднимаются, чуть растут и выравниваются из наклона (слева — вокруг одной оси,
   справа — вокруг зеркальной, по центру — только наклон вперёд). */
html.hm .hm-phone {
  opacity: 0;
  translate: 0 30px;
  scale: 0.96;
  rotate: 0.5 1 0 9deg;
}

html.hm .hm-phone[data-hm-side="right"] {
  rotate: 0.5 -1 0 9deg;
}

html.hm .hm-phone[data-hm-side="center"] {
  rotate: 1 0 0 4deg;
}

html.hm .is-hm-in .hm-phone {
  opacity: 1;
  translate: 0 0;
  scale: 1;
  rotate: none;
  transition:
    opacity 700ms var(--hm-e) var(--hm-d, 0ms),
    translate 900ms var(--hm-e) var(--hm-d, 0ms),
    scale 900ms var(--hm-e) var(--hm-d, 0ms),
    rotate 1100ms var(--hm-e) var(--hm-d, 0ms);
}

html.hm .hm-final {
  opacity: 0;
  scale: 0.97;
}

html.hm .hm-final::before {
  opacity: 0;
}

html.hm .hm-final.is-hm-in {
  opacity: 1;
  scale: 1;
  transition: opacity 700ms var(--hm-e), scale 900ms var(--hm-e);
}

html.hm .hm-final.is-hm-in::before {
  opacity: 1;
  transition: opacity 1200ms ease 300ms;
}

/* will-change — только пока идёт появление (класс снимает скрипт). */
.hm-wc .hm-beat,
.hm-wc .hm-phone,
.hm-wc.hm-final {
  will-change: opacity, translate;
}

/* Фоновые слои «дышат» только пока раздел виден. */
html.hm .h-media::before {
  animation: hm-glow 12s ease-in-out infinite alternate paused;
}

html.hm .is-hm-vis .h-media::before {
  animation-play-state: running;
}

@keyframes hm-glow {
  from { transform: translate(-6%, 3%) scale(0.94); opacity: 0.65; }
  to { transform: translate(6%, -4%) scale(1.08); opacity: 1; }
}


/* Чат: Мира «печатает», сообщения появляются по очереди. */
.h-app-row {
  position: relative;
}

.hm-typing {
  display: none;
}

html.hm .hm-msg {
  opacity: 0;
  translate: 0 8px;
  transition: opacity 300ms ease, translate 420ms var(--hm-e);
}

html.hm .hm-msg.is-typing,
html.hm .hm-msg.is-shown {
  opacity: 1;
  translate: 0 0;
}

html.hm .hm-msg.is-typing .h-b {
  opacity: 0;
}

html.hm .hm-msg.is-typing .hm-typing {
  position: absolute;
  left: 10cqi;
  bottom: 0;
  padding: 3cqi 3.6cqi;
  display: flex;
  gap: 1.2cqi;
  border-radius: 5cqi 5cqi 5cqi 1.6cqi;
  background: #fff;
}

.hm-typing i {
  width: 1.8cqi;
  height: 1.8cqi;
  border-radius: 50%;
  background: #b9b0cc;
  animation: hm-dot 900ms ease-in-out infinite;
}

.hm-typing i:nth-child(2) { animation-delay: 150ms; }
.hm-typing i:nth-child(3) { animation-delay: 300ms; }

@keyframes hm-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-40%); opacity: 1; }
}

/* Телефоны: кнопка и значок App Store — одной парой в ряд, одинаковой высоты 52 px, по половине.
   Не влезает подпись кнопки (решает fitCtaPairs в ios.js) — друг под другом, значок во всю ширину,
   по центру. Чёрную «таблетку» значка рисует сама ссылка, прямоугольник внутри рисунка скрыт —
   иначе на широком значке была бы рамка в рамке. */
@media (max-width: 600px) {
  .h-hero .h-cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
  }

  .h-hero .h-cta.is-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .h-hero .h-cta .ios-btn {
    width: 100%;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    padding: 0 12px;
    justify-content: center;
    white-space: nowrap;
  }

  .h-hero .h-cta:not(.is-stack) .ios-btn::after {
    display: none;
  }

  .h-hero .h-cta .ios-badge {
    height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid #a6a6a6;
    background: #000;
    overflow: hidden;
  }

  .ios-page .h-hero .h-cta .ios-badge svg {
    width: min(100%, 150px);
    height: auto;
  }

  .h-hero .h-cta .ios-badge svg rect {
    display: none;
  }
}

/* ---------- Узкие экраны ---------- */
@media (max-width: 900px) {
  .h-hero-grid,
  .h-feat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Порядок на телефоне (координатор, 27.09.2026): главная кнопка — на первом экране. Надпись,
     заголовок, подзаголовок, кнопки, день в одном кадре со шкалой, третья строка. */
  .h-hero-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .h-hero-copy {
    display: contents;
    text-align: left;
  }

  .h-hero-copy .ios-eyebrow { order: 1; }
  .h-hero-copy .ios-h1 { order: 2; }
  .h-hero-copy .ios-lead { order: 3; }
  .h-hero-copy .h-cta { order: 4; }
  .h-hero-media { order: 5; margin-top: 28px; }
  .h-hero-copy .h-sub2 { order: 6; margin-top: 22px; }

  .h-feat--flip .h-media {
    order: 0;
  }

  .h-media .h-phone {
    --w: min(62vw, 260px);
  }

  .h-copy .ios-h2 {
    max-width: none;
  }

  /* Шаги в столбик: кружок слева, линия вниз к следующему кружку. */
  .h-step-list {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
  }

  .h-step {
    grid-template-columns: 48px minmax(0, 1fr);
    justify-items: start;
    column-gap: 16px;
    row-gap: 12px;
    text-align: left;
  }

  .h-num {
    grid-row: 1 / span 2;
    align-self: start;
  }

  .h-step-vis {
    max-width: 320px;
  }

  .h-link-h {
    display: none;
  }

  .h-link-v {
    display: block;
  }

  .h-link-v {
    top: 56px;
    left: 22px;
    width: 4px;
    height: calc(100% - 56px + var(--gap) - 8px);
  }

  .h-car {
    --pw: min(68vw, 300px);
    max-width: none;
  }

  /* Стрелки — на широком экране; на телефоне листают пальцем и точками. */
  .h-car-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .h-cta .ios-btn {
    flex: 1 1 100%;
  }
}

/* Описание под «Мира сама пишет первой» и в финале (русская страница, тексты владельца 30.09.2026):
   те же классы, что у первого экрана, только по центру — как заголовок над ними. */
.h-voice > .ios-wrap > .ios-lead,
.h-voice > .ios-wrap > .h-sub2,
.h-final .ios-lead {
  margin-inline: auto;
}

.h-final .ios-lead {
  margin-top: 14px;
}
