/* Страница темы и страница товара. Телефон — первым; сетка для компьютера включается с 900px
   (style.json → spacing.wide_from_px). Все числа стиля приходят переменными из style.json.
   Цвета: лист, графит и голубой; фиолетовый — только в репликах людей (.voice).
   Правило движения: всё, что прячет содержимое, стоит только под .js-motion —
   этот класс ставит скрипт и только если не включено «меньше движения».
   Список стран у кнопки покупки и нижнюю панель прячет сам скрипт (атрибут hidden),
   поэтому у .buy__menu и .sticky нельзя задавать display. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; --second: var(--accent); --second-soft: var(--sand); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page { overflow-x: clip; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 {
  font-weight: var(--fw-head);
  letter-spacing: var(--track-head);
  line-height: 1.02;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); line-height: 1; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.08; letter-spacing: -.02em; }
.h-line { display: block; text-wrap: balance; }
/* первый экран не шире окна: длинное слово переносится, а не раздвигает сетку и не режется */
.hero__text, .phero__grid, .phero__text { grid-template-columns: minmax(0, 1fr); }
.hero__text > *, .phero__grid > *, .phero__text > * { min-width: 0; max-width: 100%; }
.hero h1, .hero .lead, .phero h1, .phero .lead, .top__title { overflow-wrap: anywhere; }
.btn { max-width: 100%; overflow-wrap: anywhere; }
.h-line + .h-line { margin-top: .16em; }

p { text-wrap: pretty; overflow-wrap: break-word; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.28;
  font-weight: 500;
  letter-spacing: -.012em;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

.count { font-variant-numeric: tabular-nums; }

/* --- мелкие подписи ------------------------------------------------------- */

.eyebrow, .label, .buy__title {
  font-family: var(--mono);
  font-size: var(--fs-min);
  line-height: 1.2;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 500;
}
.eyebrow { display: flex; align-items: center; gap: .7em; }
.eyebrow::before {
  content: "";
  flex: none;
  width: .72em; height: .72em;
  border-radius: 50%;
  background: var(--accent);
}
.eyebrow__num { color: var(--accent-ink); font-weight: 700; }
.label { display: block; color: var(--ink-muted); }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 3px 14px;
  border: 1.5px solid currentColor;
  border-radius: var(--r-pill);
  font-size: var(--fs-min);
  line-height: 1.25;
  font-weight: 500;
  text-decoration: none;
}
.chip--link { min-height: var(--tap-min); padding-inline: 18px; font-weight: 600; }
.chip--link::after { content: "↑"; margin-left: .5em; }

.link {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  min-height: var(--tap-min);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

/* --- кнопки --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-height: var(--tap-min);
  padding: 10px 1.7em;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--dark { background: var(--dark); color: var(--on-dark); }
/* главная кнопка первого экрана: тёмный овал с тонкой тёмной рамкой; заливку меняет движение (ниже) */
.btn--pulse { border-color: var(--dark); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -12px var(--ink); }
.btn:active { transform: translateY(0) scale(.98); }
.btn__arrow { display: inline-block; margin-left: .3em; }
.btn-note { display: block; margin-top: 6px; padding-left: 18px; font-size: var(--fs-min); color: var(--ink-muted); }

/* кнопка покупки: одна кнопка, под ней раскрывается «Выберите страну» */
.buy { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 440px; }
.buy__btn { width: 100%; justify-content: space-between; text-align: left; }
.buy--big .buy__btn { min-height: 68px; font-size: 1.25rem; }
.buy__chev {
  flex: none;
  width: .62em; height: .62em;
  margin-right: .1em;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  rotate: 45deg;
  translate: 0 -.16em;
  transition: rotate .3s var(--ease), translate .3s var(--ease);
}
.buy__btn[aria-expanded="true"] .buy__chev { rotate: -135deg; translate: 0 .16em; }
.buy__menu {
  padding: 16px;
  border: 2px solid var(--dark);
  border-radius: var(--r-card);
  background: var(--paper);
  color: var(--ink);
}
.buy__title { color: var(--ink-muted); }
.buy__list { display: grid; gap: 8px; margin-top: 12px; }
.buy__name { display: inline-flex; align-items: center; gap: 12px; }
.flag {
  flex: none;
  display: inline-flex;
  width: 20px; height: 14px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--line);
}
.flag svg { display: block; width: 100%; height: 100%; }
.buy__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap-min);
  padding: 8px 18px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--accent-soft);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s var(--ease);
}
a.buy__item:hover, a.buy__item:focus-visible { background: var(--accent); color: var(--on-accent); }
.buy__item.is-disabled {
  border: 2px dashed var(--ink-muted);
  background: transparent;
  color: var(--ink-muted);
  cursor: not-allowed;
}
.buy--bar { flex-direction: column-reverse; max-width: 520px; margin-inline: auto; }

/* --- верх страницы -------------------------------------------------------- */

.progress {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(var(--scroll, 0));
  transform-origin: 0 50%;
}

.top__row { display: flex; align-items: flex-start; gap: 12px; padding-block: 16px 14px; }
.top__dot { flex: none; width: 14px; height: 14px; margin-top: .22em; border-radius: 50%; background: var(--accent); }
.top__title {
  max-width: 24em;
  font-size: var(--fs-min);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}
.top__back {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  min-height: 48px;
  font-size: var(--fs-min);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.page--product .top__row { padding-block: 6px 4px; }

/* --- первый экран --------------------------------------------------------- */

.hero { padding-top: clamp(12px, 3vh, 64px); }
.hero__text {
  display: grid;
  gap: clamp(16px, 2.6vh, 36px);
  padding-bottom: clamp(28px, 5vh, 72px);
}
.hero__action .btn { width: 100%; min-height: 64px; font-size: 1.125rem; }
.hero__media {
  margin-inline: 10px;
  aspect-ratio: 4 / 5;
  max-height: 86vh;
  width: auto;
  transform: scale(calc(.9 + .1 * var(--g, 1)));
  transform-origin: 50% 0;
  will-change: transform;
}

/* --- картинка, клип, градиент --------------------------------------------- */

.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-panel);
}
/* цвет под картинкой не кладём: на скруглённых углах он просвечивает цветной каймой */
.media--gradient { background: var(--accent); }
.media__gradient {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(52% 46% at calc(18% + 46% * var(--p, .35)) 28%, var(--accent-soft) 0, transparent 62%),
    radial-gradient(58% 60% at 84% calc(88% - 44% * var(--p, .35)), var(--accent-deep) 0, transparent 66%),
    linear-gradient(140deg, var(--accent-mid), var(--accent) 58%);
}
.media__img, .media__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.block__banner {
  aspect-ratio: 4 / 3;
  margin-block: clamp(28px, 5vh, 56px);
  transform: scale(calc(.94 + .06 * var(--g, 1)));
}

/* --- блоки ---------------------------------------------------------------- */

.block { padding-block: var(--section); }
.block__head { display: grid; gap: clamp(16px, 3vh, 28px); margin-bottom: clamp(28px, 6vh, 72px); }

.prose { display: grid; gap: 1.1em; max-width: 34em; }

/* проблема: реплики людей — переписка; единственное место, где остаётся фиолетовый */
.block--problem .label { margin-top: clamp(40px, 7vh, 80px); }
.voices { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 40em; margin-top: 18px; }
.voice {
  max-width: min(88%, 26em);
  padding: .7em 1.05em;
  border-radius: 1.3em 1.3em 1.3em .3em;
  background: var(--voice-soft);
  font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -.01em;
}
.voice:nth-child(even) {
  align-self: flex-end;
  border-radius: 1.3em 1.3em .3em 1.3em;
  background: var(--voice);
  color: var(--on-voice);
}
.voice:nth-child(4n+3) { background: var(--dark); color: var(--on-dark); }

/* разбор со сценой: без движения — картинка и абзацы друг под другом */
.stage { display: grid; gap: 28px; padding-inline: var(--gutter); }
.stage .block__head { margin-bottom: 0; }
.stage__media { aspect-ratio: 1 / 1; }
.stage__steps { display: grid; gap: 1.1em; max-width: 34em; }
/* несколько картинок в сцене: без движения — сеткой, все видны */
.stage__deck {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  aspect-ratio: auto;
}
.stage__slide { aspect-ratio: 1 / 1; }
.stage__step:first-of-type { font-size: var(--fs-lead); line-height: 1.28; font-weight: 500; }

/* вставка-мостик к товару */
.block--cta { padding-block: 0; }
.cta {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 2px solid var(--accent);
  border-radius: var(--r-panel);
  background: var(--accent-soft);
}
.cta--photo { grid-template-columns: 80px minmax(0, 1fr); align-items: center; }
.cta--photo .cta__btn { grid-column: 1 / -1; }
.cta__photo {
  width: 80px; height: 80px;
  padding: 6px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--paper);
}
.cta__photo img { display: block; width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.cta__text { max-width: 28em; font-size: clamp(1.1rem, 4.4vw, 1.35rem); font-weight: 600; line-height: 1.3; }
.cta__btn { width: 100%; }

/* источники */
.sources { border-top: 3px solid var(--ink); }
.source {
  display: grid;
  gap: 14px;
  padding-block: clamp(26px, 4.5vh, 44px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.source__num {
  font-size: clamp(3rem, 13vw, 5.5rem);
  font-weight: var(--fw-head);
  line-height: .82;
  letter-spacing: -.05em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.source__claim {
  font-size: clamp(1.15rem, 4.6vw, 1.7rem);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: -.012em;
}
.source__claim .count { color: var(--accent-ink); }
.source__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.source__cite { flex: 1 0 100%; font-style: normal; color: var(--ink-muted); }
.source:target .source__claim { background: linear-gradient(transparent 62%, var(--accent-soft) 0); }

/* мифы */
.myths { display: grid; gap: 16px; }
.myth { display: grid; overflow: hidden; border-radius: var(--r-panel); }
.myth__side { display: grid; align-content: start; justify-items: start; gap: 14px; padding: 28px 24px 30px; }
.myth__side--myth { background: var(--dark); color: var(--on-dark); }
.myth__side--myth .label { color: var(--accent); }
.myth__side--myth p {
  font-size: clamp(1.4rem, 5.8vw, 2.2rem);
  font-weight: var(--fw-head);
  line-height: 1.1;
  letter-spacing: -.025em;
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: .09em;
}
.myth__side--fact { background: var(--accent-soft); }
.myth__side--fact .label { color: var(--accent-ink); font-weight: 700; }

/* что делать: оговорки и шаги */
.caveats {
  margin-bottom: clamp(28px, 5vh, 56px);
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--r-panel);
}
.caveats ul, .ticks { display: grid; gap: 12px; margin-top: 14px; }
.caveats li, .ticks li { position: relative; padding-left: 1.5em; font-weight: 500; }
.caveats li::before, .ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: .6em; height: .6em;
  border-radius: 50%;
  background: var(--accent);
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding-block: clamp(24px, 4vh, 40px);
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.5rem;
  font-weight: var(--fw-head);
  font-variant-numeric: tabular-nums;
}
.step h3 { margin: .28em 0 .5em; }

/* шаг с картинкой: картинка и слова стоят рядом и меняются сторонами от шага к шагу */
.step--pic {
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  align-items: center;
  gap: 16px;
  padding-block: 12px;
  border: 0;
  overflow: hidden;
}
.step--pic:last-child { border: 0; }
.step--pic[data-side="right"] { grid-template-columns: minmax(0, 54fr) minmax(0, 46fr); }
.step--pic[data-side="right"] .step__media { order: 2; }
.step--pic .step__media { aspect-ratio: 1 / 1; }
.page--product .step--pic .media__img { object-fit: cover; }
.step__body { display: grid; gap: 10px; justify-items: start; }
.step--pic .step__num { width: 40px; height: 40px; font-size: 1.1rem; }
.step--pic h3 { margin: 0; }
.step--pic p { font-size: clamp(.95rem, 4vw, 1.25rem); line-height: 1.4; }

/* товары */
.block--products { background: var(--accent-soft); }
.products { display: grid; gap: 16px; }
.product { overflow: hidden; border-radius: var(--r-panel); background: var(--paper); }
.product__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
}
/* фото товара занимает верх карточки целиком: без полей и линии оно не выглядит вставленным квадратом */
.product__photo img { width: 100%; height: 100%; object-fit: cover; }
.product__nophoto {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  padding: 16px;
  border: 2px dashed var(--line);
  border-radius: var(--r-card);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: var(--fs-min);
  text-align: center;
}
.product__body { display: grid; justify-items: start; gap: 14px; padding: 24px; }
.product__more { width: 100%; }
.product__more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap-min);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.product__more summary::-webkit-details-marker { display: none; }
.product__more summary::after { content: "+"; font-size: 1.6em; font-weight: 400; color: var(--accent-ink); }
.product__more[open] summary::after { content: "−"; }
.product__more p { padding-top: 14px; font-size: var(--fs-min); }
.product__origin { color: var(--ink-muted); font-size: var(--fs-min); }
.product__link { width: 100%; }

/* регистрация */
.block--register { background: var(--accent); color: var(--on-accent); }
.block--register .eyebrow::before { background: currentColor; }
.block--register .eyebrow__num { color: inherit; }
.block--register :focus-visible { outline-color: currentColor; }
.block--register .buy__menu { border-color: var(--dark); }
.register__note { max-width: 30em; margin-top: clamp(28px, 5vh, 48px); font-weight: 500; }

/* что нового */
.news {
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 40em;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--r-panel);
}

/* подвал */
.foot { padding-block: clamp(48px, 9vh, 96px); background: var(--dark); color: var(--on-dark); }
.foot .wrap { display: grid; gap: 14px; }
.foot p { max-width: 38em; }
.foot__main { font-weight: 700; }
.foot__strong { font-size: var(--fs-lead); font-weight: var(--fw-head); letter-spacing: -.02em; line-height: 1.15; }
.foot__date { font-family: var(--mono); font-size: var(--fs-min); }
.has-sticky .foot { padding-bottom: calc(clamp(48px, 9vh, 96px) + 96px); }

/* --- страница товара ------------------------------------------------------ */

/* официальные картинки показываются целиком, без обрезки */
.page--product .media__img, .page--product .media__video { object-fit: contain; }

.phero { padding-block: 6px clamp(36px, 6vh, 80px); }
.phero__grid { display: grid; gap: clamp(18px, 3vh, 32px); }
.phero__media { aspect-ratio: var(--ar, 1); width: 100%; }
.phero__text { display: grid; gap: clamp(14px, 2.4vh, 28px); }
.phero__text h1 { font-size: clamp(2rem, 8.4vw, 4.75rem); }
.phero__note { font-size: var(--fs-min); color: var(--ink-muted); }

.psec { padding-block: clamp(44px, 8vh, 110px); }
.psec h2 { margin-bottom: clamp(18px, 3vh, 32px); font-size: clamp(1.75rem, 7vw, 3.5rem); }
.psec__grid { display: grid; gap: 24px; }
/* рамка берёт пропорции самой картинки (--ar ставит сборщик): пустых полос по бокам нет */
.psec__media { aspect-ratio: var(--ar, 1.3333); }

/* товар на чисто белом фоне медленно вращается по часовой стрелке */
.media--spin { border-radius: 50%; }
.js-motion .media--spin .media__img { animation: spin 28s linear infinite; will-change: transform; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* картинка, которая открывается по нажатию */
[data-zoom] { cursor: zoom-in; }
.zoom {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgb(20 22 26 / 0);
  transition: background-color .35s var(--ease);
  cursor: zoom-out;
  touch-action: none;
}
.zoom.is-open { background: rgb(20 22 26 / .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.zoom__img {
  position: fixed;
  box-sizing: border-box;
  padding: clamp(10px, 3vw, 22px);
  border-radius: clamp(22px, 6vw, 34px);
  background: var(--paper);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .6);
  object-fit: contain;
  transform-origin: 0 0;
  will-change: transform, clip-path;
}
.zoom__close {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / .5);
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.js-motion .zoom__close { opacity: 0; transition: opacity .3s var(--ease); }
.js-motion .zoom.is-open .zoom__close { opacity: 1; }
.psec__buy { margin-top: clamp(28px, 5vh, 48px); }

/* вторая картинка раздела — схема или фото под текстом, открывается по нажатию */
.psec__after { aspect-ratio: var(--ar, 2); margin-top: 22px; }
.psec__note { margin-top: 18px; font-size: var(--fs-min); color: var(--ink-muted); }

/* пункты с картинками: картинка и слова стоят рядом и меняются сторонами */
.picks { display: grid; gap: 18px; margin-top: 24px; }
.pick {
  display: grid;
  grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
  align-items: center;
  gap: 16px;
  overflow: hidden;
}
.pick[data-side="right"] { grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); }
.pick[data-side="right"] .pick__media { order: 2; }
.pick__media { aspect-ratio: var(--ar, 1.4); }
.pick__body { display: grid; gap: 8px; }
.pick h3 { margin: 0; font-size: clamp(1.15rem, 4.8vw, 1.6rem); line-height: 1.15; }
.pick p { font-size: clamp(.95rem, 4vw, 1.2rem); line-height: 1.4; }

/* мозаика: пункты со значками — карточками в два столбца, первая во всю ширину при нечётном числе */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.tile {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--paper);
  box-shadow: 0 22px 44px -32px color-mix(in srgb, var(--ink) 60%, transparent);
}
.bento > .tile:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.tile__media { width: 68px; aspect-ratio: 1 / 1; border-radius: 50%; }
.tile h3 { margin: 4px 0 0; font-size: clamp(1.05rem, 4.4vw, 1.35rem); line-height: 1.15; }
.tile p { font-size: clamp(.9rem, 3.8vw, 1.1rem); line-height: 1.35; color: var(--ink-muted); }
.psec .steps { margin-top: 20px; }
.psec .psec__media + .prose { margin-top: 24px; }

.facts { display: grid; margin-top: 8px; border-top: 3px solid var(--ink); }
.fact { display: grid; gap: 4px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.fact dt { font-family: var(--mono); font-size: var(--fs-min); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); }
.fact dd { font-size: clamp(1.15rem, 4.6vw, 1.5rem); font-weight: 700; line-height: 1.25; }

.inci {
  display: grid;
  gap: 1em;
  max-width: 46em;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--paper);
  font-size: var(--fs-min);
  line-height: 1.6;
}

.quote {
  display: grid;
  gap: 16px;
  max-width: 30em;
  padding-left: 22px;
  border-left: 6px solid var(--accent);
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.012em;
}
.quote cite { font-size: var(--fs-min); font-style: normal; font-weight: 500; color: var(--ink-muted); }

.shots { display: grid; gap: 16px; margin-top: 24px; }
.shot__media { aspect-ratio: var(--ar, 1); }
.shot__caption { margin-top: 10px; font-size: var(--fs-min); color: var(--ink-muted); }

.pback { padding-block: 8px clamp(36px, 6vh, 72px); }

/* нижняя панель с кнопкой: без скрипта — обычная строка перед подвалом */
.sticky { padding-block: 8px 40px; }
.sticky.is-fixed {
  position: fixed;
  z-index: 25;
  inset: auto 0 0 0;
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 -14px 34px -22px var(--ink);
}

/* --- связки блоков -------------------------------------------------------
   Блоки не разделены линией. Каждый блок — лист (data-surface) со срезанным верхом (data-seam),
   который наезжает на предыдущий; предыдущий оставляет под ним запас снизу. Срез, лист,
   второй цвет и приёмы ниже задаёт облик страницы (data-look, style.json → looks). */
.page { --seam: clamp(30px, 9vw, 64px); --lap: var(--seam); --bridge: 150px; }
[data-surface] {
  position: relative;
  isolation: isolate;
  background: var(--surf, var(--paper));
  padding-bottom: calc(var(--section) + var(--lap) * 1.6);
}
[data-surface="paper"] { --surf: var(--paper); }
[data-surface="sand"] { --surf: var(--sand); }
[data-surface="soft"] { --surf: var(--accent-soft); }
[data-surface="warm"] { --surf: var(--second-soft); }
[data-surface="accent"] { --surf: var(--accent); }
[data-seam] {
  margin-top: calc(var(--lap) * -1);
  box-shadow: 0 -26px 46px -34px color-mix(in srgb, var(--ink) 42%, transparent);
}
/* лист: оба верхних угла скруглены */
[data-seam="sheet"] { border-radius: var(--seam) var(--seam) 0 0; }
/* «заправленная рубашка»: верх уходит дугой от одного края вниз к другому */
[data-seam="tuck-left"], [data-seam="tuck-right"] { --lap: calc(var(--seam) * 1.6); }
[data-seam="tuck-left"] { border-top-left-radius: 100% var(--lap); }
[data-seam="tuck-right"] { border-top-right-radius: 100% var(--lap); }
/* арка: верх выгнут дугой по всей ширине */
[data-seam="arc"] { border-radius: 50% 50% 0 0 / var(--lap) var(--lap) 0 0; }
.foot { position: relative; margin-top: calc(var(--seam) * -1); border-radius: var(--seam) var(--seam) 0 0; }
/* строка «назад» — тоже лист: без него между последним блоком и подвалом остаётся прямая полоса */
.pback {
  position: relative;
  margin-top: calc(var(--seam) * -1);
  padding-top: calc(var(--seam) * .8);
  padding-bottom: calc(clamp(36px, 6vh, 72px) + var(--seam));
  border-radius: var(--seam) var(--seam) 0 0;
  background: var(--paper);
  box-shadow: 0 -26px 46px -34px color-mix(in srgb, var(--ink) 42%, transparent);
}

/* вставка к товару лежит поперёк стыка: половина на одном листе, половина на следующем */
.block--cta { position: relative; z-index: 3; height: 0; padding: 0; }
.block--cta > .wrap { transform: translateY(-50%); }
.block--before-cta { padding-bottom: calc(var(--section) * .5 + var(--bridge) + var(--lap) * 1.6); }
.block--after-cta { padding-top: calc(var(--section) * .5 + var(--bridge)); }
.block--cta + .foot { padding-top: calc(clamp(48px, 9vh, 96px) + var(--bridge)); }
.cta {
  border: 0;
  background: var(--paper);
  box-shadow: 0 28px 60px -30px color-mix(in srgb, var(--ink) 55%, transparent), 0 0 0 1px var(--line);
}

/* стежок: тонкая линия вдоль края проходит через все листы, у начала каждого — цветная метка */
[data-rail] [data-surface]::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc(var(--gutter) / 2 - 1px);
  top: calc(var(--lap) + 6px);
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--second) 0 34px, color-mix(in srgb, var(--ink) 11%, transparent) 34px);
  pointer-events: none;
}
/* крупная цифра блока за текстом, срезанная краем */
[data-ghost] [data-num]::after {
  content: attr(data-num);
  position: absolute;
  z-index: -1;
  top: calc(var(--lap) * .7);
  right: -.05em;
  font-family: var(--font);
  font-size: clamp(8.5rem, 46vw, 21rem);
  font-weight: var(--fw-head);
  line-height: .78;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--second) 20%, transparent);
  pointer-events: none;
}
/* подложка: под картинкой сдвинутая плашка второго цвета, стороны чередуются */
[data-plate] .block__banner, [data-plate] .psec__media, [data-plate] .phero__media {
  box-shadow: 12px 12px 0 var(--second);
}
[data-plate] .psec:nth-of-type(even) .psec__media { box-shadow: -12px 12px 0 var(--second); }
[data-plate] .psec__media, [data-plate] .phero__media { margin-bottom: 12px; }
/* у круглой вращающейся картинки подложки нет: сдвинутый круг читается как ошибка */
.page[data-plate] .psec .psec__media.media--spin { box-shadow: none; }
/* заголовки с засечками — журнальный облик */
[data-head="serif"] h1, [data-head="serif"] h2 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.06;
}
/* второй цвет в мелочах */
[data-look] .eyebrow__num { color: inherit; }
[data-look] .eyebrow::before { background: var(--second); }
[data-look] .block--register .eyebrow::before { background: currentColor; }

/* --- движение (включает скрипт) ------------------------------------------- */

/* лист подъезжает снизу и догоняет своё место, пока его верх идёт по нижней половине экрана */
.js-motion [data-seam] { translate: 0 var(--rise, 0px); }

/* способы появления: up — подъём, left / right — выезд сбоку, zoom — масштаб,
   wipe — шторка, words — заголовок по словам; соседним блокам сборщик даёт разные */
.js-motion [data-reveal] {
  opacity: 0;
  transition:
    opacity var(--dur) var(--ease),
    translate var(--dur) var(--ease),
    scale var(--dur) var(--ease),
    clip-path calc(var(--dur) * 1.3) var(--ease);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.js-motion [data-reveal="up"], .js-motion [data-reveal=""] { translate: 0 var(--shift); }
.js-motion [data-reveal="left"] { translate: calc(var(--shift) * -2) 0; }
.js-motion [data-reveal="right"] { translate: calc(var(--shift) * 2) 0; }
.js-motion [data-reveal="zoom"] { scale: .86; }
/* не до нуля: полностью обрезанный блок браузер не считает видимым, и он не появится */
.js-motion [data-reveal="wipe"] { clip-path: inset(0 94% 0 0); }
.js-motion [data-reveal="words"] { opacity: 1; }
/* обрезку держит только wipe; на месте она шире блока — тень и подложка не срезаются прямым углом */
.js-motion [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }
.js-motion [data-reveal="wipe"].is-in { clip-path: inset(-60px -60px -60px -60px); }

/* у слова есть поля: без них браузер срезает хвост «у» и край буквы при сжатых буквах */
.js-motion [data-reveal="words"] .w {
  display: inline-block;
  max-width: 100%;
  margin: -.14em -.07em;
  padding: .14em .07em;
  opacity: 0;
  translate: 0 .55em;
  transition: opacity .6s var(--ease), translate .6s var(--ease);
  transition-delay: calc(var(--w, 0) * 55ms);
}
.js-motion [data-reveal="words"].is-in .w { opacity: 1; translate: 0 0; }

/* реплики приходят по одной, как сообщения */
.js-motion .voices [data-reveal] {
  scale: .9;
  transition-duration: .5s;
  transition-delay: calc(var(--i, 0) * 280ms);
}
.js-motion .voices [data-reveal="left"] { transform-origin: 0 100%; }
.js-motion .voices [data-reveal="right"] { transform-origin: 100% 100%; }
.js-motion .voices [data-reveal].is-in { scale: 1; }

.js-motion .media__gradient { animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(8deg) scale(1.12); }
}

/* первый экран: картинка раскрывается и наезжает, дальше плывёт вслед за прокруткой */
.js-motion .hero__media, .js-motion .phero__media { animation: open 1.1s var(--ease) both; }
.js-motion .hero__media .media__img {
  scale: 1.12;
  translate: 0 calc((var(--p, .3) - .3) * -9%);
  animation: approach 1.8s var(--ease) both;
}
@keyframes open {
  from { clip-path: inset(9% 9% 9% 9% round var(--r-panel)); }
  to { clip-path: inset(0 0 0 0 round var(--r-panel)); }
}
@keyframes approach {
  from { scale: 1.32; }
  to { scale: 1.12; }
}
/* картинка товара стоит на месте; по ней раз в несколько секунд проходит мягкий блик.
   Саму картинку не двигаем: при сдвиге видны края рамки */
.js-motion .phero__media::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: -20% auto -20% 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .55) 50%, transparent);
  transform: translate3d(-140%, 0, 0) skewX(-12deg);
  animation: sheen 6.5s ease-in-out 1.4s infinite;
  pointer-events: none;
  will-change: transform;
}
@keyframes sheen {
  0% { transform: translate3d(-140%, 0, 0) skewX(-12deg); }
  38%, 100% { transform: translate3d(360%, 0, 0) skewX(-12deg); }
}

/* главная кнопка первого экрана: заливка плавно уходит из графита в белый и обратно,
   надпись — наоборот; рамка всё время тёмная. Вокруг кнопки ничего не светится */
.js-motion .btn--pulse { animation: invert 3.6s ease-in-out 1.4s infinite; }
.js-motion .btn--pulse[aria-expanded="true"] { animation: none; }
.js-motion .btn__arrow--down { animation: nudge-down 1.3s ease-in-out infinite; }
.js-motion .hero__action .btn__arrow--side, .js-motion .cta .btn__arrow { animation: nudge-side 1.3s ease-in-out infinite; }
@keyframes invert {
  0%, 16% { background-color: var(--dark); color: var(--on-dark); }
  44%, 60% { background-color: var(--paper); color: var(--dark); }
  88%, 100% { background-color: var(--dark); color: var(--on-dark); }
}
@keyframes nudge-down {
  50% { translate: 0 5px; }
}
@keyframes nudge-side {
  50% { translate: 5px 0; }
}

.js-motion .buy__menu { animation: drop .32s var(--ease) both; }
.js-motion .buy--bar .buy__menu { animation-name: rise; }
.js-motion .sticky.is-fixed { animation: rise .45s var(--ease) both; }
@keyframes drop {
  from { translate: 0 -10px; scale: .97; }
}
@keyframes rise {
  from { translate: 0 100%; }
}

/* сцена: раздел прилипает к экрану, клип идёт ходом прокрутки, мысли сменяются */
@media (min-height: 520px) {
  .js-motion .has-stage {
    /* сверху и снизу сцены — запас листа: под срез верха и под следующий лист (скрипт его вычитает) */
    --head: calc(var(--lap) * .7);
    --tail: calc(var(--lap) * 1.6);
    height: calc(100vh * (1 + var(--stage-k) * var(--n)) + var(--head) + var(--tail));
    height: calc(100svh * (1 + var(--stage-k) * var(--n)) + var(--head) + var(--tail));
    padding-block: var(--head) var(--tail);
  }
  .js-motion .has-stage.block--before-cta { --tail: calc(var(--lap) * 1.6 + var(--bridge) + 24px); }
  .js-motion .has-stage.block--after-cta { --head: calc(var(--bridge) + 24px); }
  .js-motion .has-stage:not([data-surface]) { --head: 0px; --tail: 0px; }
  .js-motion .stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
    padding: 22px 10px 12px;
  }
  .js-motion .stage__head { padding-inline: calc(var(--gutter) - 10px); }
  .js-motion .stage__head h2 { font-size: clamp(1.8rem, 7.2vw, 4.25rem); }
  .js-motion .stage__media { aspect-ratio: auto; height: 100%; min-height: 0; }
  /* плашка шага сдвинута влево: справа от неё узкая полоса с чёрточками шагов */
  .js-motion .stage__steps {
    position: absolute;
    inset: auto 10px 24px 18px;
    display: block;
    max-width: none;
    padding-right: 24px;
  }

  /* несколько картинок: лежат друг на друге, видна картинка текущего шага */
  .js-motion .stage__deck { display: block; position: relative; }
  .js-motion .stage__slide {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    opacity: 0;
    transition: opacity .7s var(--ease);
  }
  .js-motion .stage__slide.is-on { opacity: 1; }

  /* указатель шага: столбик коротких вертикальных чёрточек, текущая закрашена светлым */
  .js-motion .stage__ticks {
    position: absolute;
    top: 50%;
    right: 0;
    width: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    translate: 0 -50%;
    pointer-events: none;
  }
  .js-motion .stage__ticks i {
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: var(--paper);
    box-shadow: 0 0 0 1px rgb(0 0 0 / .16);   /* тонкий контур: на светлой картинке белое не теряется */
    opacity: .55;
    transition: opacity .35s var(--ease), background-color .35s var(--ease);
  }
  .js-motion .stage__ticks i.is-on { background: var(--accent-soft); opacity: 1; }

  /* подсказка на первом шаге: листать вниз — маленькая и полупрозрачная */
  .js-motion .stage__hint {
    position: absolute;
    left: 6px;
    bottom: 100%;
    display: inline-flex;
    align-items: center;
    gap: .45em;
    margin-bottom: 8px;
    color: var(--paper);
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .02em;
    text-shadow: 0 0 6px rgb(0 0 0 / .45);
    opacity: .72;
    pointer-events: none;
    transition: opacity .35s var(--ease);
  }
  .js-motion .stage__hint b { font-weight: 600; animation: nudge-down 1.2s ease-in-out infinite; }
  .js-motion .stage__hint.is-off { opacity: 0; }

  .js-motion .stage__step {
    position: absolute;
    inset: auto 24px 0 0;
    padding: 20px 22px 22px;
    border-radius: var(--r-card);
    background: var(--paper);
    box-shadow: 0 18px 50px -18px var(--ink);
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);
    font-weight: 500;
    line-height: 1.3;
    opacity: 0;
    translate: 0 26px;
    transition: opacity .45s var(--ease), translate .45s var(--ease);
  }
  .js-motion .stage__step:nth-of-type(even) { translate: 26px 0; }
  .js-motion .stage__step.is-active { position: relative; inset: auto; opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__media, .block__banner { transform: none; }
}

/* --- компьютер ------------------------------------------------------------ */

@media (min-width: 900px) {
  .page { --seam: 72px; --bridge: 110px; }
  [data-plate] .block__banner, [data-plate] .psec__media, [data-plate] .phero__media { box-shadow: 20px 20px 0 var(--second); }
  [data-plate] .psec:nth-of-type(even) .psec__media { box-shadow: -20px 20px 0 var(--second); }
  body { font-size: var(--fs-body-wide); }
  .wrap { max-width: calc(var(--maxw) + 2 * var(--gutter-wide)); padding-inline: var(--gutter-wide); }
  .top__row { padding-block: 26px; }
  .page--product .top__row { padding-block: 14px; }

  .hero__text { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
  .phero__text { grid-template-columns: minmax(0, 1fr); }
  .hero__text > * { grid-column: 1 / -1; }
  .hero__text h1 { grid-column: 1 / span 11; }
  .hero__text .lead { grid-column: 1 / span 7; }
  .hero__text .hero__action { grid-column: 9 / -1; justify-self: end; }
  .hero__action .btn { width: auto; }
  .hero__media { margin-inline: 24px; aspect-ratio: 16 / 8; }

  .block__head { max-width: 62rem; }
  .block__banner { aspect-ratio: 16 / 7; }
  .prose { margin-left: calc(100% / 12 * 4); }

  .voices { margin-left: calc(100% / 12 * 4); gap: 16px; }

  .cta { grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: 28px 36px; }
  .cta--photo { grid-template-columns: 88px minmax(0, 1fr) auto; gap: 28px; }
  .cta--photo .cta__btn { grid-column: auto; }
  .cta__photo { width: 88px; height: 88px; }
  .cta__btn { width: auto; }

  .source { grid-template-columns: 2fr 6fr 4fr; column-gap: 32px; align-items: start; }
  .source__meta { flex-direction: column; align-items: flex-start; }
  .source__cite { flex: none; }

  .myth { grid-template-columns: 1fr 1fr; }
  .myth__side { padding: 44px 40px 46px; }

  .caveats { margin-left: calc(100% / 12 * 4); padding: 32px 36px; }
  .steps { margin-left: calc(100% / 12 * 4); }
  .step { grid-template-columns: 88px 1fr; gap: 24px; }
  .step__num { width: 72px; height: 72px; font-size: 1.9rem; }

  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .product__body { padding: 32px; }
  .product__link { width: auto; }

  .stage { grid-template-columns: 5fr 6fr; align-items: start; gap: 48px; padding-inline: var(--gutter-wide); }
  .stage__head { grid-column: 1; }
  .stage__media { grid-column: 2; grid-row: 1 / span 2; }
  .stage__deck { gap: 16px; }
  .stage__steps { grid-column: 1; }

  /* страница товара: картинка сбоку от текста, в разделах — сверху, справа, слева по очереди */
  .phero__grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
  .phero__media { order: 2; width: min(100%, calc(72vh * var(--ar, 1))); justify-self: center; }
  .psec .prose, .psec .steps { margin-left: 0; }
  .psec[data-place="right"] .psec__grid, .psec[data-place="left"] .psec__grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 56px;
  }
  .psec[data-place="right"] .psec__media { order: 2; }
  .psec[data-place="top"] .psec__media { width: min(100%, calc(70vh * var(--ar, 1.3333))); margin-inline: auto; }
  .psec__media { width: min(100%, calc(76vh * var(--ar, 1.3333))); }
  .psec[data-place="top"] .psec__body { margin-left: calc(100% / 12 * 4); }
  .facts { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .inci { padding: 32px 36px; }
}

@media (min-width: 900px) and (min-height: 520px) {
  .js-motion .stage {
    grid-template-columns: 5fr 6fr;
    grid-template-rows: minmax(0, .8fr) minmax(0, 1fr);
    gap: 28px 56px;
    padding: 28px 24px 28px var(--gutter-wide);
    max-width: calc(var(--maxw) + 2 * var(--gutter-wide) + 200px);
    margin-inline: auto;
  }
  .js-motion .stage__head { padding-inline: 0; align-self: end; }
  .js-motion .stage__steps {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    padding-right: 36px;
  }
  /* здесь шаги стоят на белом листе: чёрточки и подсказка — графитом, так же полупрозрачно */
  .js-motion .stage__ticks { top: 0; translate: 0 6px; }
  .js-motion .stage__ticks i { background: var(--ink); box-shadow: none; opacity: .16; }
  .js-motion .stage__ticks i.is-on { background: var(--accent); opacity: 1; }
  .js-motion .stage__hint { left: 0; margin-bottom: 10px; color: var(--ink); text-shadow: none; opacity: .5; }
  .js-motion .stage__step {
    inset: auto 36px auto 0;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: clamp(1.4rem, 2.1vw, 2rem);
    line-height: 1.24;
    letter-spacing: -.012em;
  }
}
