/* =========================================================
   Luxinity — лендинг-гид. Mobile-first, статика.
   Эстетика: «лабораторная чистота» — off-white, минимализм.
   ========================================================= */

/* ---------- Дизайн-токены (из Figma) ---------- */
:root {
  --bg:        #fbfaf8;   /* off-white фон */
  --ink:       #261710;   /* самый тёмный: заголовки, фон меню */
  --ink-soft:  #41261b;   /* тёплый коричневый: бургер, акценты */
  --muted:     #bfb2a8;   /* приглушённый: номера меню, подписи */
  --line:      rgba(38, 23, 16, 0.10);          /* разделители на светлом */
  --line-dark: rgba(255, 255, 255, 0.12);       /* разделители в меню */

  --font-head: 'Montserrat Alternates', sans-serif;
  --font-body: 'Inter', sans-serif;

  --maxw: 440px;          /* mobile-column: на десктопе центрируем */
  --pad: 24px;            /* боковые поля как в Figma */
  --header-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #efe9e3;    /* surround за пределами колонки на десктопе */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1 { margin: 0; }

/* ---------- Mobile-column ---------- */
.phone {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: clip;
  box-shadow: 0 0 60px rgba(38, 23, 16, 0.08);   /* «карточка» на промежуточных ширинах */
}

/* =========================================================
   ШАПКА
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;                 /* 64px при 402 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;               /* 22px поля, как в Figma */
  background: transparent;
  transition: background-color .25s ease, box-shadow .25s ease;
}
/* при скролле шапка становится плотной off-white */
.header.is-scrolled {
  background: rgba(251, 250, 248, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.header__brand {
  display: flex;
  align-items: center;
  gap: 15px;                     /* 15px между ∞ и вордмарком (Figma) */
}
.header__mark     { height: 19px; width: auto; }   /* 19px → ширина ~56 (Figma) */
.header__wordmark { height: 16px; width: auto; }   /* 16px → ширина ~173 (Figma, новый вектор) */

/* бургер */
.burger {
  width: 28px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.burger span {
  display: block;
  height: 2.4px;
  width: 22px;
  margin-left: auto;
  border-radius: 1.2px;
  background: var(--ink-soft);
  transition: transform .3s ease, opacity .2s ease;
}

/* =========================================================
   МЕНЮ-ОВЕРЛЕЙ
   ========================================================= */
.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--ink);
  color: var(--bg);
  padding: 32px var(--pad) max(32px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .3s ease, visibility .4s;
}
.menu.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
body.menu-open { overflow: hidden; }

.menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 70px;
}
.menu__wordmark {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--bg);
}
.menu__close {
  position: relative;
  width: 24px;
  height: 24px;
}
.menu__close::before,
.menu__close::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 22px;
  height: 2.2px;
  border-radius: 1.1px;
  background: var(--bg);
}
.menu__close::before { transform: translate(-50%,-50%) rotate(45deg); }
.menu__close::after  { transform: translate(-50%,-50%) rotate(-45deg); }

.menu__list li { border-top: 1px solid var(--line-dark); }
.menu__list li:first-child { border-top: 0; }
.menu__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 13px 0;
}
.menu__label {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 26.5px;          /* ~26.5px@402; влезает в одну строку */
  line-height: 1.2;
  white-space: nowrap;        /* без переноса даже на широких экранах */
}
.menu__num {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* Кнопка идёт сразу за пунктами меню, а не прижата к низу экрана:
   так она попадает в зону большого пальца и видна без поиска глазами.
   Домен остаётся внизу — его выталкивает margin-top: auto. */
.menu__footer {
  margin-top: 40px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.menu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
}
.menu__site {
  display: block;
  margin-top: auto;          /* прижат к нижнему краю меню */
  padding-top: 20px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* =========================================================
   БЛОК 1 — HERO
   ========================================================= */
/* Hero = первый экран. Геометрия строго по Figma (кадр 402×874):
   фото  y113 h462  ·  слово y600  ·  шапка 64px сверху.
   Размеры фиксированные в px — как нарисовано при ширине 402. */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  /* высота как во фрейме Figma (402×678): фрейм − шапка = 614px при 402.
     не тянем на весь вьюпорт — сразу видно начало блока 2 при скролле. */
  padding-top: 49px;        /* (113 − 64)/402 = 49px при 402 */
  padding-bottom: 22px;      /* 22px под словом, как до низа фрейма (678) */
}

.hero__photo {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 402 / 465;      /* как в Figma */
  background: #efe7df;          /* фон-плейсхолдер до загрузки */
  overflow: hidden;
}
/* три кадра лежат стопкой и растворяются друг в друга */
.hero__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;     /* держим лицо в кадре (выровнено на всех 3) */
  opacity: 0;
  transition: opacity .8s ease-in-out;   /* fade ~0.8s */
  will-change: opacity;          /* плавно на мобилке, без дёрганья */
}
.hero__frame.is-active { opacity: 1; }

.hero__headline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 54px;          /* 54px при ширине 402 */
  line-height: 1;
  text-align: center;
  color: var(--ink);
  margin: 22px 0 0;          /* 22px при 402 — зазор фото → слово (Figma: 600−578) */
  opacity: 1;
  transition: opacity .4s ease; /* слово гаснет/появляется в такт фейду фото */
  will-change: opacity;
}

/* =========================================================
   БЛОК 2 — ТРИ ПРОДУКТА
   Геометрия по фрейму 02-products (402×760). Тот же светлый фон.
   Флакон слева + текст справа, три блока вертикально.
   ========================================================= */
.products {
  /* верхний отступ = title top 44px (≈44px); боковые поля — общие --pad */
  padding: 44px var(--pad) 0;
}
.products__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;           /* 30px при 402 */
  line-height: 1.16;
  text-align: center;
  color: #15161a;               /* Figma: title */
  /* до первого ряда: title заканчивается ~79, флакон/название на 150 → ~71px */
  margin: 0 0 71px;
}

.product {
  display: flex;
  align-items: flex-start;
}
/* шаг между продуктами: пич рядов 210 − высота флакона 150 = 60px (Figma) */
.product + .product { margin-top: 60px; }

.product__media {
  flex: 0 0 126px;              /* левая зона до текста: x150 − поле 24 (Figma) */
  display: flex;
  align-items: flex-start;
}
.product__media img {
  height: 180px;               /* бокс флакона 150px + 20% (по просьбе); ширина — по пропорции */
  width: auto;                 /* тень и подпись-пилюля уже встроены в PNG из Figma */
}

.product__name {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  color: #15161a;               /* Figma: name */
}
.product__verb {
  margin: 2px 0 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink-soft);       /* #41261b — коричневый глагол */
}
.product__desc {
  margin: 7px 0 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: #736b66;               /* Figma: description (серый) */
}
.product__link {
  display: inline-block;
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: #82d5ff;               /* Figma: link «Как применять» (голубой) */
}

/* =========================================================
   БЛОК 3 — КАК ПРИМЕНЯТЬ (сценарии)
   Геометрия по фрейму 03-scenarios (402×846) и компонентам
   scenario-card (354×480) / scenario-sheet (402×618).
   Палитра блока отличается от блоков 1–2: нейтральный тёмный
   + синий акцент. Держим её в отдельных токенах.
   ========================================================= */
/* Токены блока живут в :root, а не на секции: шторка в разметке лежит
   снаружи .scenarios, и от секции переменные до неё не доходят. */
:root {
  --s-accent: #2966eb;   /* акцент: лейблы, активный чип, кнопки */
  --s-ink:    #161921;   /* заголовки и текст на бейдже */
  --s-body:   #4d525c;   /* основной текст карточки */
  --s-muted:  #80858f;   /* подзаголовок, мета */
  --s-line:   #e5e5eb;   /* разделители внутри карточки */
  --s-line2:  #e0e3e8;   /* разделитель под фильтрами */
  --s-ph:     #d9dbe0;   /* фон под фото до загрузки */
  --s-note:   #f6f6f7;   /* плашка «ВАЖНО» */
  --s-dot:    #c7c9cf;   /* неактивная точка пагинации */
  --s-badge:  #f2f3f5;   /* бейдж в шторке (в карточке — белый) */
}

.scenarios {
  background: #fff;
  padding: 28px 0 40px;      /* снизу воздух перед следующим блоком */
}

.scenarios__title {
  margin: 0;
  padding: 0 var(--pad);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.05;
  color: var(--s-ink);
}
.scenarios__title span { color: var(--s-accent); }
.scenarios__sub {
  margin: 10px 0 0;
  padding: 0 var(--pad);
  font-size: 14px;
  line-height: 1.4;
  color: var(--s-muted);
  max-width: 324px;              /* 300px + поле, как в Figma */
}

/* ---------- Чипы фильтра по продукту ---------- */
/* Четыре чипа влезают в строку, но прокрутку оставляем — на узких
   экранах и при длинных названиях она страхует от переполнения. */
.chips {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 0 var(--pad);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 18px;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  font-size: 14px;
  font-weight: 500;
  color: var(--s-ink);
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.chip[aria-pressed="true"] { background: var(--s-ink); color: #fff; }

.scenarios__line {
  height: 1px;
  margin: 20px var(--pad) 0;
  background: var(--s-line2);
}

/* ---------- Лента карточек ---------- */
/* Свайп по горизонтали с примагничиванием — как в макете (точки снизу). */
/* Вертикальные поля обязательны: контейнер с overflow-x обрезает и по
   вертикали, а тень карточки уходит вниз на 12px с размытием 32 — без
   запаса её просто срезает, и низ карточки сливается с фоном. */
.sc-track {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 12px var(--pad) 44px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--pad);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sc-track::-webkit-scrollbar { display: none; }

.sc-card {
  flex: 0 0 calc(100% - (var(--pad) * 2));
  max-width: 354px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10), 0 2px 8px rgba(0, 0, 0, .04);
  text-align: left;
  padding: 0;
}

.sc-card__media {
  position: relative;
  aspect-ratio: 354 / 210;        /* слот фото из макета */
  background: var(--s-ph);
}
.sc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-card__badge {
  position: absolute;
  top: 20px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 12px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--s-ink);
  white-space: nowrap;
}
.sc-card__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s-accent);
}

.sc-card__body { padding: 20px 20px 22px; }
.sc-card__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
  color: var(--s-ink);
}
.sc-row {
  display: flex;
  align-items: flex-start;
  padding: 18px 0 12px;
}
/* второй ряд идёт после разделителя, поэтому селектор через него */
.sc-card__divider + .sc-row { padding: 12px 0 22px; }
.sc-row__label {
  flex: 0 0 84px;
  font-size: 11px;
  font-weight: 600;
  line-height: 19px;
  letter-spacing: .04em;
  color: var(--s-accent);
}
.sc-row__value {
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.35;
  color: var(--s-body);
}
.sc-card__divider { height: 1px; background: var(--s-line); }

.sc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
}
.sc-card__meta {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: #3c404b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-card__more {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 21px;
  background: var(--s-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Точки пагинации ---------- */
/* Карточек до 22, точек показываем максимум 6 — окно едет за активной. */
.sc-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 6px;
  margin-top: 0;              /* зазор до точек уже дал padding-bottom ленты */
}
.sc-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--s-dot);
  transition: width .25s ease, background-color .25s ease;
}
.sc-dot.is-active { width: 18px; background: var(--s-accent); }
.sc-dot.is-hidden { display: none; }

.sc-empty {
  margin: 24px var(--pad) 0;
  font-size: 14px;
  color: var(--s-muted);
}

/* =========================================================
   ШТОРКА СЦЕНАРИЯ
   Шапка и кнопки зафиксированы, скроллится только середина.
   ========================================================= */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet[hidden] { display: none; }

.sheet__dim {
  position: absolute;
  inset: 0;
  background: rgba(22, 25, 33, .45);
  opacity: 0;
  transition: opacity .3s ease;
}
.sheet.is-open .sheet__dim { opacity: 1; }

.sheet__panel {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  max-height: 90vh;
  max-height: 90dvh;               /* dvh учитывает адресную строку браузера */
  display: flex;
  flex-direction: column;
  padding: 12px var(--pad) max(24px, env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #fff;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.sheet.is-open .sheet__panel { transform: translateY(0); }
body.sheet-open { overflow: hidden; }

/* Полоса захвата во всю ширину: сама «палочка» 36×4 слишком мелкая,
   чтобы попасть пальцем. Видимый штрих рисуем псевдоэлементом. */
.sheet__handle {
  display: block;
  width: 100%;
  height: 26px;
  padding: 0;
  background: none;
  cursor: grab;
}
.sheet__handle::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: var(--s-ph);
}
.sheet.is-dragging .sheet__handle { cursor: grabbing; }

/* Зона, за которую шторку можно тянуть. touch-action отключает
   собственную прокрутку браузера, иначе жест перехватывается им. */
.sheet__handle,
.sheet__nav,
.sheet__header,
.sheet__title { touch-action: none; }
/* Явный выход из шторки: свайп и тап по фону не всем очевидны. */
.sheet__nav {
  display: flex;
  margin-top: 12px;
}
.sheet__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px 0 12px;
  border-radius: 17px;
  background: var(--s-badge);
  color: var(--s-ink);
  font-size: 13px;
  font-weight: 600;
}
.sheet__back::before {
  content: "←";
  font-size: 15px;
  line-height: 1;
}

.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.sheet__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--s-badge);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--s-ink);
  white-space: nowrap;
}
.sheet__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s-accent);
}
.sheet__meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--s-muted);
  white-space: nowrap;
}
.sheet__title {
  margin: 16px 0 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  color: var(--s-ink);
}

.sheet__scroll {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sheet__photo {
  aspect-ratio: 354 / 180;        /* тот же файл, что в карточке, обрезан по высоте */
  border-radius: 20px;
  background: var(--s-ph);
  overflow: hidden;
}
.sheet__photo img { width: 100%; height: 100%; object-fit: cover; }

.sheet__block { margin-top: 16px; }
.sheet__block h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--s-accent);
}
.sheet__block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--s-body);
  white-space: pre-line;          /* нумерованные шаги приходят с \n */
}
.sheet__block--note {
  padding: 16px;
  border-radius: 20px;
  background: var(--s-note);
}

/* Ряда кнопок покупки в шторке нет — см. комментарий в index.html.
   Низ шторки закрывает padding самой панели. */

/* =========================================================
   БЛОК 5 — ПРИДУМАЙ СВОЙ СЦЕНАРИЙ
   Геометрия по фрейму 05-principle-choose (402×674) и трём
   фреймам результата. Фон блока — тот же серый, что у блока 7.
   ========================================================= */
.principle {
  background: #f6f6f7;
  padding: 44px var(--pad);
}
.principle__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 25px;
  line-height: 1.18;
  text-align: center;
  color: var(--s-ink);
}
/* 43px — расстояние из макета; в нём стоял подзаголовок, которого
   в файле уже нет (см. комментарий к блоку в index.html). */
.principle__label {
  margin: 43px 0 0;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--s-accent);
}
.principle__list { margin-top: 21px; }

/* ---------- Карточка-кнопка состояния ---------- */
.pr-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 92px;
  padding: 14px 14px 14px 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
  text-align: left;
}
.pr-card + .pr-card { margin-top: 16px; }
.pr-card__body { flex: 1 1 auto; min-width: 0; }
.pr-card__name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--s-ink);
}
.pr-card__hint {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--s-muted);
}
.pr-card__arrow {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 600;
  color: var(--s-accent);
}

/* ---------- Микшер ---------- */
/* Токены объявлены на самом блоке, а не в :root: у прототипа имена
   --bg / --ink / --line совпадают с сайтовыми, и в :root они бы
   перекрасили всю страницу. */
.mixer {
  --mx-field:  #f4f7fd;      /* поле треугольника */
  --mx-grid:   #e3eaf7;      /* сетка 7×7 */
  --mx-edge:   #d3ddec;      /* две внутренние стороны */

  margin-top: 20px;
  padding: 24px 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
}
.mixer__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.18;
  color: var(--s-ink);
}
.mixer__sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--s-muted);
}

/* touch-action здесь намеренно НЕ трогаем: прямоугольник SVG сильно больше
   треугольника, и глушить прокрутку во всей его площади нельзя — по углам
   и полосам с подписями страница должна листаться. Прокрутку отменяет JS,
   и только когда палец лёг внутрь поля. */
.mixer__stage {
  margin-top: 14px;
  user-select: none;
  -webkit-user-select: none;
}
.mixer__svg { display: block; width: 100%; height: auto; }
.mixer__svg:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 4px; }

.mx-field  { fill: var(--mx-field); }
.mx-grid   { stroke: var(--mx-grid); stroke-width: 1; }
.mx-edge   { stroke: var(--mx-edge); stroke-width: 1.5; }
.mx-scale  { stroke: var(--s-accent); stroke-width: 2.5; }
.mx-tick   { stroke: var(--s-accent); stroke-width: 2; }
.mx-vertex { fill: #fff; stroke: var(--s-accent); stroke-width: 2; }
.mx-drop   { stroke: #fff; stroke-width: 2.5; }   /* заливка считается в JS */

.mx-label {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  fill: var(--s-ink);
}
.mx-sub { font-size: 9.5px; fill: var(--s-muted); }

.mixer__panel {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--s-note);
  min-height: 108px;
}
.mixer__ptitle {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  color: var(--s-ink);
}
.mixer__pnote {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--s-body);
}
.mixer__comp {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--s-line);
  font-size: 12px;
  color: var(--s-muted);
  font-variant-numeric: tabular-nums;   /* цифры не пляшут при перетаскивании */
}
.mixer__comp b { color: var(--s-ink); font-weight: 600; }

.mixer__foot {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--s-muted);
}

/* ---------- Шторка результата ---------- */
.pr-state {
  display: flex;
  align-items: center;
  min-height: 64px;
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 20px;
  background: #ebf0fc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
  font-size: 16px;
  font-weight: 600;
  color: var(--s-ink);
}

.pr-result__card {
  padding: 26px 20px 40px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
}
/* В макете 13px — мелко для имени продукта, подняли до 25px. */
.pr-result__product {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--s-accent);
}
.pr-result__principle {
  margin: 8px 0 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.18;
  color: var(--s-ink);
  white-space: pre-line;    /* перенос строки задан в данных, как в макете */
}
.pr-result__divider {
  height: 1px;
  margin-top: 18px;
  background: var(--s-line);
}
.pr-result__block { margin-top: 28px; }
.pr-result__block:first-of-type { margin-top: 20px; }
.pr-result__block h4 {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--s-accent);
}
.pr-result__block p {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--s-body);
}

.pr-more {
  display: block;
  margin-top: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--s-accent);
}

/* =========================================================
   БЛОК 7 — СОВМЕСТИМОСТЬ
   Геометрия по фрейму 07-compat-A-short (402×778).
   Фон блока свой, светло-серый — не общий off-white страницы.
   ========================================================= */
.compat {
  background: #f6f6f7;
  padding: 40px var(--pad);
}

.compat__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  text-align: center;
  color: var(--s-ink);
}

/* Белые карточки — те же скругление и тень, что у карточек сценариев */
.compat__card {
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
  padding: 22px 20px 40px;
}
.compat__card + .compat__card { margin-top: 24px; }
/* обёртка-сетка разрывает цепочку соседей — отступ задаём ей самой */
.compat__grid { margin-top: 24px; }

/* карточка с цифрой стоит чуть свободнее прочих (28px в макете) */
.compat__stat {
  margin-top: 17px;
  margin-bottom: 4px;
  padding: 18px 20px 28px;
  text-align: center;
}
.compat__num {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  color: var(--s-accent);
}
.compat__num-sub {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--s-muted);
}

.compat__card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--s-ink);
}
.compat__card-text {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--s-body);
}

/* Тёмная плашка: в макете заметный воздух снизу — держим min-height,
   но текст при переносе на узком экране её просто раздвинет. */
.compat__note {
  min-height: 100px;
  margin-top: 24px;
  padding: 20px 20px 24px;
  border-radius: 20px;
  background: #25170f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
}
.compat__note-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.compat__note-text {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #d9ccc2;
}

/* =========================================================
   БЛОК 8 — ГДЕ КУПИТЬ
   Геометрия по фрейму 08-buy-C-sets (402×1050).
   Фон блока — общий off-white, как у страницы.
   ========================================================= */
.buy {
  --mp-wb:   #8c268c;      /* фирменный фиолетовый Wildberries */
  --mp-ozon: #0059f2;      /* фирменный синий Ozon */

  background: var(--bg);
  padding: 50px 0;
}

.buy__title {
  margin: 0;
  padding: 0 var(--pad);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  text-align: center;
  color: var(--s-ink);
}
.buy__sub {
  margin: 13px 0 0;
  padding: 0 var(--pad);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  color: var(--s-muted);
}

/* ---------- Кнопки маркетплейсов ---------- */
.mp {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.mp--wb   { background: var(--mp-wb); }
.mp--ozon { background: var(--mp-ozon); }

/* ---------- Три карточки продуктов ---------- */
.buy__list {
  margin: 30px 0 0;
  padding: 0 var(--pad);
}
.buy-card {
  display: flex;
  height: 160px;
  padding: 28px 20px 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
}
.buy-card + .buy-card { margin-top: 20px; }

/* колонка флакона: от края карточки до текста 126px, минус поле 20 */
.buy-card__media { flex: 0 0 106px; }
.buy-card__media img { height: 105px; width: auto; }

.buy-card__body { flex: 1 1 auto; min-width: 0; }
.buy-card__name {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--s-ink);
}
.buy-card__links {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}
/* 0 1 90px: на узких экранах кнопки ужимаются, а не вылезают за карточку */
.buy-card__links .mp { flex: 0 1 90px; height: 40px; }

/* ---------- Тёмная плашка набора ---------- */
.buy-set {
  margin: 20px var(--pad) 0;
  padding: 26px 20px 38px;
  border-radius: 24px;
  background: #25170f;
}
.buy-set__bottles {
  display: flex;
  gap: 54px;                /* шаг 90px между флаконами шириной ~36 */
  padding-left: 24px;
}
.buy-set__bottles img { height: 95px; width: auto; }

.buy-set__title {
  margin: 19px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}
.buy-set__sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #d9ccc2;
}
.buy-set__links {
  display: flex;
  gap: 16px;
  margin-top: 14px;
}
.buy-set__links .mp { flex: 1 1 0; max-width: 150px; height: 44px; }

/* =========================================================
   БЛОК 9 — СОТРУДНИЧЕСТВО
   Геометрия по фрейму 09-collab (402×700): фото во всю ширину,
   белая карточка заходит на него снизу внахлёст на 40px.
   ========================================================= */
.collab {
  background: #f6f6f7;
  padding-bottom: 40px;
}

.collab__photo {
  aspect-ratio: 402 / 420;
  background: #dbd6cf;          /* подложка из макета: видна, пока нет фото */
  overflow: hidden;
}
.collab__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collab__card {
  position: relative;           /* чтобы лечь поверх фото */
  margin: -40px var(--pad) 0;
  padding: 30px 20px 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.collab__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--s-ink);
}
.collab__text {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--s-body);
}
.collab__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-top: 24px;
  border-radius: 26px;
  background: var(--s-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

/* плавный скролл к якорям с учётом sticky-шапки */
:where(section[id]) { scroll-margin-top: var(--header-h); }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* =========================================================
   ДЕСКТОП
   Первый проход адаптива. Мобильная вёрстка выше не тронута —
   всё, что ниже, включается только на широких экранах.
   Брейкпоинты: 768 — планшет (две колонки), 1024 — десктоп.
   ========================================================= */

/* горизонтальная навигация скрыта на мобильном */
.topnav { display: none; }

@media (min-width: 768px) {
  .phone { max-width: 720px; }

  /* три продукта и карточки покупки — в два столбца */
  .products__list,
  .buy__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  /* отступы-соседи из стопки в сетке сдвигают колонки по вертикали — гасим */
  .buy-card + .buy-card,
  .product + .product { margin-top: 0; }

  /* в стопке низ блока закрывал отступ следующей секции, в сетке ссылки
     «Как применять» упираются в границу — даём блоку собственный низ */
  .products { padding-bottom: 48px; }

  /* сценарии: лента превращается в сетку, свайп больше не нужен */
  .sc-track {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .sc-card { max-width: none; scroll-snap-align: none; }
  .sc-dots { display: none; }

  .compat__card + .compat__card { margin-top: 0; }
  .compat__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (min-width: 1024px) {
  /* убираем «телефон на подложке»: обычная страница во всю ширину */
  body { background: var(--bg); }
  .phone {
    max-width: 1120px;
    box-shadow: none;
    overflow-x: visible;
  }

  /* ---- шапка: бургер уходит, появляется горизонтальное меню ---- */
  .burger { display: none; }
  .topnav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
  }
  .topnav a { color: var(--ink); transition: opacity .2s ease; }
  .topnav a:hover { opacity: .6; }
  .topnav__cta {
    padding: 10px 20px;
    border-radius: 22px;
    background: var(--s-accent);
    color: #fff !important;
    font-weight: 600;
  }
  .topnav__cta:hover { opacity: .85; }

  .header { height: 80px; padding: 0 40px; }
  :root { --header-h: 80px; }

  /* ---- hero: колонка шире, но кадры пока вертикальные ----
     Полноценный широкий первый экран требует горизонтальных фото —
     их нет. Поэтому ограничиваем фото по ширине и центрируем. */
  .hero { padding-top: 64px; }
  .hero__photo { max-width: 720px; margin: 0 auto; border-radius: 24px; }
  .hero__headline { font-size: 84px; }

  /* ---- сетки в три колонки ---- */
  .products__list,
  .buy__list,
  .sc-track { grid-template-columns: repeat(3, 1fr); }

  .products, .scenarios, .compat, .buy, .principle { padding-left: 40px; padding-right: 40px; }
  .products__title, .scenarios__title, .scenarios__sub,
  .buy__title, .buy__sub, .compat__title { padding-left: 0; padding-right: 0; }
  .chips, .scenarios__line, .sc-track, .sc-empty { padding-left: 0; padding-right: 0; }
  .scenarios__line { margin-left: 0; margin-right: 0; }
  .buy-set, .collab__card, .compat__note { margin-left: 0; margin-right: 0; }

  /* блок 5: карточки состояний в ряд, микшер по центру */
  .principle__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .pr-card + .pr-card { margin-top: 0; }
  .mixer { max-width: 560px; margin-left: auto; margin-right: auto; }

  /* блок 9: фото и текст рядом, без нахлёста */
  .collab { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 0 40px 40px; }
  .collab__photo { aspect-ratio: 4 / 5; border-radius: 24px; }
  .collab__card { margin: 0; }

  /* ---- шторки становятся модалками по центру ---- */
  .sheet { justify-content: center; }
  .sheet__panel {
    max-width: 560px;
    max-height: 82vh;
    border-radius: 28px;
    transform: translateY(24px) scale(.98);
    opacity: 0;
    transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .2s ease;
  }
  .sheet.is-open .sheet__panel { transform: none; opacity: 1; }
  .sheet__handle { display: none; }   /* тянуть мышью незачем */
}
