/* AMON — стили лендинга.
   Smoky Taupe — только декор, линии и границы; для обычного текста не используется.

   Композиция: у каждой секции своя сетка (12 колонок на широком экране),
   фото перекрываются, выходят к краю экрана и различаются масштабом. */

/* ---------- Токены ---------- */

:root {
  --obsidian: #171513;
  --espresso: #30241E;
  --ivory: #E9DFCF;
  --gold: #B88B55;
  --taupe: #79685A;

  /* Приглушённый текст на тёмном: Ivory 78% (≈ 8,8:1 на Obsidian, ≈ 7,5:1 на Espresso) */
  --ivory-muted: rgba(233, 223, 207, 0.78);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-brand: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --max: 1280px;
  --gutter: clamp(16px, 5vw, 72px);
  /* Боковой отступ секций; на него же фото «выходят» к краю экрана */
  --pad: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --col-gap: clamp(16px, 2.2vw, 36px);
  --section-y: clamp(56px, 7vw, 104px);
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Основа ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Фото, выходящие к краю экрана, не создают горизонтальную прокрутку */
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--obsidian);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 4.7vw, 4.7rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.85rem);
  margin-bottom: 0.55em;
}

h3 {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  margin-bottom: 0.5em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Латинские элементы бренда — Bodoni Moda */
[lang="fr"] {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

/* Акценты: названия нот и значимые слова */
strong {
  font-weight: 600;
  color: var(--gold);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

section,
footer {
  scroll-margin-top: var(--header-h);
}

/* Общий кадр фото: заполняет свою рамку */
.frame,
.intro__media,
.story__media,
.story__detail,
.audience__media,
.production__media,
.markets__media,
.markets__detail,
.cooperation__media,
.product__photo,
.product__video,
.pyramid__level figure {
  position: relative;
  overflow: hidden;
}

.intro__media img,
.story__media img,
.story__detail img,
.audience__media img,
.production__media img,
.markets__media img,
.markets__detail img,
.cooperation__media img,
.product__photo img,
.pyramid__level img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Светлые секции (Ivory) ---------- */

.product,
.production,
.cooperation {
  background: var(--ivory);
  color: var(--obsidian);
}

/* Muted Gold на Ivory — 2,3:1, для текста не годится: акценты — Espresso */
.product strong,
.production strong,
.cooperation strong {
  color: var(--espresso);
}

.product :focus-visible,
.production :focus-visible,
.cooperation :focus-visible {
  outline-color: var(--espresso);
}

/* Метка-номер раздела перед заголовком */
.intro h2::before,
.story h2::before,
.product h2::before,
.pyramid h2::before,
.audience h2::before,
.production h2::before,
.markets h2::before,
.cooperation h2::before {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.28em;
  line-height: 1;
  color: var(--gold);
}

.product h2::before,
.production h2::before,
.cooperation h2::before {
  color: var(--espresso);
}

.intro h2::before { content: "02"; }
.story h2::before { content: "03"; }
.product h2::before { content: "04"; }
.pyramid h2::before { content: "05"; }
.audience h2::before { content: "06 · Рынок и аудитория"; text-transform: uppercase; }
.production h2::before { content: "07"; }
.markets h2::before { content: "08"; }
.cooperation h2::before { content: "09"; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  padding: 12px var(--pad);
  background: rgba(23, 21, 19, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(121, 104, 90, 0.35);
}

.logo {
  font-family: var(--font-brand);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ivory);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 30px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* Obsidian на Muted Gold — 5,9:1 */
.button--primary {
  background: var(--gold);
  color: var(--obsidian);
}

.button--primary:hover {
  background: var(--ivory);
}

.button--secondary {
  background: transparent;
  border-color: rgba(233, 223, 207, 0.6);
  color: var(--ivory);
}

.button--secondary:hover {
  border-color: var(--ivory);
  background: rgba(233, 223, 207, 0.08);
}

.cooperation .button--primary:hover {
  background: var(--obsidian);
  color: var(--ivory);
}

.cooperation .button--secondary {
  border-color: var(--obsidian);
  color: var(--obsidian);
}

.cooperation .button--secondary:hover {
  background: rgba(23, 21, 19, 0.06);
}

/* Кнопки управления видео */
.video-toggle,
.video-sound {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(233, 223, 207, 0.55);
  border-radius: 999px;
  background: rgba(23, 21, 19, 0.7);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.video-toggle:hover,
.video-sound:hover {
  border-color: var(--gold);
  background: rgba(23, 21, 19, 0.85);
}

/* ---------- Общая сетка секций ---------- */

.intro,
.story,
.product,
.pyramid,
.audience,
.production,
.markets,
.cooperation,
.contact {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding: var(--section-y) var(--pad);
}

/* Приглушённый текст на тёмных фонах */
.intro p,
.story p,
.audience p,
.markets p,
.pyramid p,
.contact > p {
  color: var(--ivory-muted);
}

/* ==========================================================
   1. Первый экран — рекламная кампания:
   видео во всю высоту у правого края, заголовок заходит на кадр,
   малый кадр мяты лежит на стыке текста и видео
   ========================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  padding: clamp(32px, 4.5vw, 64px) var(--pad);
  background: var(--obsidian);
  z-index: 2;
}

.hero__media {
  overflow: hidden;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(54vw, 880px);
}

/* Переход от тёмного фона к видео: на этой зоне лежит часть заголовка */
.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, var(--obsidian) 0%, rgba(23, 21, 19, 0.7) 10%, rgba(23, 21, 19, 0.15) 24%, transparent 34%),
    linear-gradient(to top, rgba(23, 21, 19, 0.5) 0%, transparent 22%);
  pointer-events: none;
}

/* Деликатное плёночное зерно поверх видео: скрывает мягкость исходника,
   не трогая флакон и надписи (прозрачность 7 %). Шум генерируется SVG, без внешних файлов */
.hero__media::after,
.product__video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.product__video .video-controls {
  z-index: 2;
}

/* Флакон в исходнике выше середины кадра: кадр прижат к верху,
   поэтому флакон целиком в кадре и стоит по центру экрана */
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
}

.hero__media .video-toggle {
  position: absolute;
  top: 24px;
  right: var(--gutter);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  width: min(100%, 640px);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(18px, 2.2vw, 28px);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero__eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
}

/* Мелкие подписи — Manrope, а не Bodoni Moda */
.hero__eyebrow [lang="fr"],
.hero__caption [lang="fr"] {
  font-family: inherit;
  font-style: normal;
  letter-spacing: inherit;
}

/* Заголовок шире колонки текста и заходит на видео */
.hero h1 {
  width: min(14.5ch, 52vw);
  margin-bottom: clamp(16px, 2vw, 24px);
  line-height: 1.04;
}

/* Первое слово заголовка — Muted Gold (на Obsidian контраст ≈ 5,9:1), остальное Ivory.
   Шрифт и начертание как у всего заголовка: общее правило [lang="fr"] здесь не действует */
.hero__title-accent {
  font-family: inherit;
  font-style: normal;
  letter-spacing: inherit;
  color: var(--gold);
}

.hero__subtitle {
  max-width: 34ch;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--ivory);
}

.hero__text {
  max-width: 42ch;
  font-size: 1rem;
  color: var(--ivory-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: clamp(24px, 2.6vw, 32px) 0 clamp(18px, 2vw, 24px);
}

.hero__caption {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

/* ==========================================================
   2. Визуальное вступление — разворот: вертикальный кадр
   выходит к левому краю экрана и растворяется в фоне,
   заголовок заходит на этот переход и связывает кадр с текстом
   ========================================================== */

/* Кадр занимает всю высоту секции: без пустых полос сверху и снизу */
.intro {
  padding-top: 0;
  padding-bottom: 0;
  background: var(--espresso);
  align-items: center;
}

.intro__media {
  grid-column: 1 / 6;
  grid-row: 1;
  margin-left: calc(-1 * var(--pad));
  aspect-ratio: 4 / 5;
  max-height: 86vh;
}

.intro__media img {
  object-position: 55% 40%;
}

/* Правый край кадра переходит в фон — на этом переходе лежит начало заголовка */
.intro__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 55%, rgba(48, 36, 30, 0.75) 85%, var(--espresso) 100%);
}

.intro__content {
  grid-column: 5 / 12;
  grid-row: 1;
  position: relative;
  z-index: 1;
}

.intro h2 {
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  margin-bottom: clamp(24px, 2.6vw, 36px);
}

.intro__content p {
  max-width: 50ch;
  margin-left: calc(100% / 7 + var(--col-gap) / 2);
}

.intro__content p:first-of-type {
  padding-top: clamp(20px, 2vw, 28px);
  border-top: 1px solid var(--gold);
}

/* ==========================================================
   3. История бренда — коллаж: крупный кадр и увеличенный фрагмент
   этикетки из того же снимка, последний абзац — цитата
   ========================================================== */

.story {
  background: var(--obsidian);
  align-items: center;
}

/* Текст слева, кадр справа; фрагмент лежит у левого нижнего угла кадра */
.story__media {
  grid-column: 8 / 13;
  grid-row: 1 / 3;
  aspect-ratio: 4 / 5;
}

/* Малый фрагмент у нижнего правого угла кадра. Размер и увеличение подобраны так,
   чтобы на Retina на пиксель экрана приходилось не меньше пикселя исходника */
.story__detail {
  grid-column: 7 / 9;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  z-index: 1;
  width: min(100%, 220px);
  aspect-ratio: 1 / 1;
  margin-bottom: calc(-1 * clamp(24px, 3vw, 44px));
  border: 8px solid var(--obsidian);
  box-shadow: 0 0 0 1px rgba(184, 139, 85, 0.55);
}

/* Фрагмент: крышка и горловина флакона */
.story__detail img {
  transform: scale(2.2);
  transform-origin: 50% 12%;
}

.story__content {
  grid-column: 1 / 7;
  max-width: 600px;
  grid-row: 1 / 3;
}

/* Цитата Бодлера: типографика прежнего заключительного абзаца.
   Иерархия: цитата — подпись — мелкая сноска с переводом, как в книге */
.story__quote {
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--gold);
}

/* Playfair, а не Bodoni: Bodoni Moda только для латиницы бренда */
.story__quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  font-style: italic;
  letter-spacing: normal;
  line-height: 1.45;
}

.story__quote blockquote p {
  margin: 0;
  color: var(--ivory);
}

.story__mark {
  margin-left: 0.1em;
  font-style: normal;
  color: var(--gold);
}

.story__quote figcaption {
  margin-top: 14px;
}

.story__cite {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.story__cite [lang="fr"] {
  font-family: inherit;
  font-style: normal;
  letter-spacing: inherit;
}

/* Сноска: короткая линия сверху, мелкий шрифт, Smoky Taupe */
.story__footnote {
  display: block;
  margin-top: 28px;
  padding-top: 10px;
  max-width: 40ch;
  border-top: 1px solid var(--taupe);
  width: fit-content;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--taupe);
}

/* ==========================================================
   4. Описание продукта — фото флакона крупно,
   видео-квадрат в светлом паспарту перекрывает его угол
   ========================================================== */

.product {
  align-items: center;
}

.product__media {
  grid-column: 1 / 7;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.product__photo {
  grid-column: 1 / 6;
  grid-row: 1;
  aspect-ratio: 4 / 5;
}

.product__video {
  grid-column: 4 / 7;
  grid-row: 1;
  align-self: end;
  z-index: 1;
  margin-right: calc(-1 * clamp(0px, 3vw, 48px));
  margin-bottom: calc(-1 * clamp(24px, 3vw, 48px));
  border: clamp(8px, 1vw, 14px) solid var(--ivory);
  box-shadow: 0 30px 60px rgba(23, 21, 19, 0.25);
}

.product__video video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.video-controls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product__content {
  grid-column: 8 / 13;
}

.product__content > p {
  max-width: 54ch;
}

.product [lang="fr"] {
  font-size: 1.08em;
}

.product__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin: 28px 0;
}

.product__features > div {
  padding: 14px 0;
  border-top: 1px solid var(--taupe);
}

.product__features dt {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product__features dd {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  color: var(--espresso);
}

.product__price {
  padding: 22px 0 0;
  border-top: 1px solid var(--gold);
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 10px;
  font-size: 1.0625rem;
}

.price__name {
  font-weight: 600;
}

.price__value {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
}

.price__note {
  max-width: 46ch;
  font-size: 0.9375rem;
  color: var(--espresso);
}

/* ==========================================================
   5. Парфюмерная пирамида — три кадра растут и спускаются
   ступенями: от свежести к глубине
   ========================================================== */

.pyramid {
  background: var(--obsidian);
}

/* Шапка секции: заголовок слева, вступление справа.
   Верхний отступ меньше обычного: при переходе из меню секция целиком помещается в экран */
.pyramid {
  align-items: end;
  padding-top: clamp(32px, 4vw, 56px);
}

.pyramid h2 {
  grid-column: 1 / 7;
  grid-row: 1;
  margin-bottom: 0;
}

.pyramid__intro {
  grid-column: 8 / 13;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  font-style: italic;
  line-height: 1.55;
}

.notes-carousel {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: clamp(24px, 3vw, 40px);
}

/* --- Без JavaScript: ноты списком (кадр слева, текст справа) --- */
.pyramid__levels {
  counter-reset: level;
  border-top: 1px solid var(--gold);
}

.pyramid__level {
  counter-increment: level;
  display: grid;
  grid-template-columns: clamp(96px, 9vw, 132px) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto 1fr;
  column-gap: clamp(18px, 2vw, 28px);
  padding: clamp(18px, 2vw, 26px) 0;
  border-bottom: 1px solid rgba(121, 104, 90, 0.45);
}

.pyramid__level img {
  grid-row: 1 / span 5;
  height: auto;
  aspect-ratio: 4 / 5;
  margin: 0;
}

.pyramid__level:nth-child(3) img {
  object-position: 50% 40%;
}

.pyramid__level h3 {
  margin-bottom: 4px;
  font-size: clamp(1.15rem, 1.4vw, 1.3rem);
}

.pyramid__level h3::before {
  content: "0" counter(level);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1;
  color: var(--gold);
}

.pyramid__notes {
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.pyramid__level p:last-child {
  max-width: 46ch;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --- Слайдшоу (включается скриптом): активная нота в центре,
       соседние — меньше, в тени и частично за краями --- */
/* Размер карточки зависит и от ширины, и от высоты окна:
   слайд, подпись и стрелки должны помещаться в один экран */
.notes-carousel.is-ready {
  --card: clamp(130px, min(21vw, (100svh - 575px) * 0.8), 300px);
  position: relative;
}

.notes-carousel.is-ready .pyramid__levels {
  display: grid;
  justify-items: center;
  border-top: 0;
  overflow: hidden;
  padding: 8px 0;
  touch-action: pan-y;
}

.notes-carousel.is-ready .pyramid__level {
  grid-area: 1 / 1;
  display: block;
  width: var(--card);
  padding: 0;
  border: 0;
  cursor: pointer;
  transition:
    transform 0.8s var(--ease),
    opacity 0.8s var(--ease),
    filter 0.8s var(--ease);
  will-change: transform;
}

.notes-carousel.is-ready .pyramid__level img {
  width: 100%;
  margin-bottom: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.notes-carousel.is-ready .pyramid__level > :not(img) {
  text-align: center;
  margin-inline: auto;
  transition: opacity 0.5s var(--ease);
}

.notes-carousel.is-ready .pyramid__level h3 {
  font-size: clamp(1.2rem, 1.5vw, 1.4rem);
}

.notes-carousel.is-ready .pyramid__level h3::before {
  font-size: 1.35rem;
}

/* Ноты и описание под активной нотой шире карточки — меньше строк */
.notes-carousel.is-ready .pyramid__level .pyramid__notes,
.notes-carousel.is-ready .pyramid__level p:last-child {
  width: min(440px, 86vw);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Активная нота */
.notes-carousel.is-ready .pyramid__level.is-active {
  z-index: 3;
  transform: none;
  cursor: default;
}

/* Соседние ноты: меньше, в тени, без подписей */
.notes-carousel.is-ready .pyramid__level.is-prev,
.notes-carousel.is-ready .pyramid__level.is-next {
  z-index: 1;
  filter: brightness(0.38) saturate(0.7);
}

.notes-carousel.is-ready .pyramid__level.is-prev {
  transform: translateX(-88%) scale(0.72);
}

.notes-carousel.is-ready .pyramid__level.is-next {
  transform: translateX(88%) scale(0.72);
}

.notes-carousel.is-ready .pyramid__level.is-prev > :not(img),
.notes-carousel.is-ready .pyramid__level.is-next > :not(img) {
  opacity: 0;
}

.notes-carousel.is-ready .pyramid__level.is-prev:hover,
.notes-carousel.is-ready .pyramid__level.is-next:hover {
  filter: brightness(0.55) saturate(0.85);
}

/* Управление: стрелки по краям, подписанные вкладки нот между ними */
.notes-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  margin-top: clamp(16px, 2vw, 28px);
}

.notes-carousel__controls[hidden] {
  display: none;
}

.notes-carousel__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(233, 223, 207, 0.45);
  border-radius: 50%;
  background: transparent;
  color: var(--ivory);
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.notes-carousel__arrow:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.notes-carousel__tabs {
  display: flex;
  gap: clamp(4px, 1vw, 12px);
}

.notes-carousel__tabs button {
  position: relative;
  padding: 10px 14px 12px;
  border: 0;
  background: none;
  color: var(--ivory-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.notes-carousel__tabs button span {
  margin-right: 6px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

.notes-carousel__tabs button::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease);
}

.notes-carousel__tabs button:hover,
.notes-carousel__tabs button[aria-current="true"] {
  color: var(--ivory);
}

.notes-carousel__tabs button[aria-current="true"]::after {
  transform: scaleX(1);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================
   6. Для кого создан аромат — как первый экран:
   видео во всю высоту секции у правого края, текст слева
   ========================================================== */

.audience {
  background: var(--espresso);
  align-items: center;
  min-height: calc(100svh - var(--header-h));
}

.audience__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(54vw, 880px);
}

/* Переход от фона секции к видео — как на первом экране */
.audience__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, var(--espresso) 0%, rgba(48, 36, 30, 0.7) 10%, rgba(48, 36, 30, 0.15) 24%, transparent 34%);
  pointer-events: none;
}

.audience__media img,
.audience__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.audience__media .video-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  z-index: 2;
}

.audience__content {
  position: relative;
  z-index: 2;
  grid-column: 1 / 6;
  grid-row: 1;
}

/* Редакционный блок в шоколадно-золотой гамме: цвета заданы только для этой секции */
.audience {
  --aud-text: #E9DFCF;
  --aud-muted: #CDBFB2;
  --aud-line: #665046;
}

.audience__content p {
  color: var(--aud-muted);
}

.audience__content h2,
.audience__content h3,
.audience__subhead {
  color: var(--aud-text);
}

.audience__lead {
  max-width: 56ch;
  margin-bottom: 0;
}

/* Подразделы отделены тонкими линиями */
.audience__block {
  margin-top: clamp(28px, 3vw, 40px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--aud-line);
}

.audience__block h3 {
  margin-bottom: 20px;
  font-size: clamp(1.35rem, 1.9vw, 1.6rem);
}

.audience__block > p {
  max-width: 56ch;
}

/* Портрет покупателя: две равные колонки */
.audience__portrait {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(24px, 3vw, 48px);
  margin: 0 0 24px;
}

.audience__portrait > div {
  padding-top: 16px;
  border-top: 1px solid var(--aud-line);
}

.audience__portrait dt,
.audience__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.audience__portrait dd {
  margin: 0;
}

.audience__value {
  margin-top: 10px !important;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.5vw, 1.35rem);
  line-height: 1.25;
  color: var(--aud-text);
}

.audience__hint {
  margin-top: 6px !important;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--aud-muted);
}

.audience__subhead {
  margin: 28px 0 8px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
  font-weight: 400;
}

/* Форматы размещения: строка = значок, название, описание */
.audience__formats li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--aud-line);
}

.audience__formats li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.audience__icon {
  margin-top: 2px;
  color: var(--gold);
}

.audience__formats p {
  margin: 0;
  font-size: 0.9375rem;
}

.audience__content .audience__format-title {
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--aud-text);
}

/* B2B — спокойное завершение секции */
.audience__eyebrow {
  margin-bottom: 14px;
}

.audience__content .audience__eyebrow {
  color: var(--gold);
}

/* ==========================================================
   7. Производство — вертикальный кадр слева без растяжения,
   текст и этапы справа
   ========================================================== */

.production {
  align-items: center;
}

/* Коллаж из трёх кадров внахлёст (кадры на 15 % крупнее прежней сетки):
   видео — крупный вертикальный кадр слева, за ним смещённая золотая рамка;
   крышка в воде заходит на его правый верхний угол, флакон в мяте — на нижний.
   Наложенные кадры — в светлом паспарту, у нижнего ещё тонкая золотая рамка внутри */
.production__media {
  grid-column: 1 / 6;
  grid-row: 1;
  align-self: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: visible;
}

/* декоративная рамка за главным кадром */
.production__media::before {
  content: "";
  position: absolute;
  left: 3.5%;
  top: 13%;
  width: 60.5%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--gold);
  pointer-events: none;
}

.production__tile {
  position: absolute;
  display: block;
  overflow: hidden;
}

.production__tile--main {
  left: 0;
  top: 9.5%;
  z-index: 1;
  width: 60.5%;
  aspect-ratio: 3 / 4;
}

.production__tile--leaf {
  left: 52%;
  top: 0;
  z-index: 2;
  width: 39.5%;
  aspect-ratio: 1 / 1;
  box-shadow: 0 0 0 6px var(--ivory), 0 28px 56px rgba(23, 21, 19, 0.28);
  transform: rotate(-1.5deg);
}

.production__tile--stone {
  left: 55%;
  bottom: 0;
  z-index: 3;
  width: 41.5%;
  aspect-ratio: 4 / 5;
  overflow: visible;
  background: var(--ivory);
  box-shadow: 0 0 0 14px var(--ivory), 0 28px 56px rgba(23, 21, 19, 0.28);
}

.production__tile--stone img {
  outline: 1px solid var(--gold);
  outline-offset: 7px;
  object-position: 50% 40%;
}

.production__tile--leaf img {
  object-position: 50% 38%;
}

.production__tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

/* Компактная круглая кнопка паузы для видео в коллаже */
.production__tile .video-toggle--icon {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  font-size: 0.625rem;
  letter-spacing: 0;
}

.production__content {
  grid-column: 7 / 13;
  grid-row: 1;
}

.production__content > p {
  max-width: 56ch;
}

/* Подводка к этапам — короткая строка-связка, как подзаголовок */
.production__lead {
  margin: clamp(28px, 3vw, 40px) 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--espresso);
}

.production__lead + .production__steps {
  margin-top: 16px;
}

.production__steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px var(--col-gap);
  margin-top: clamp(32px, 4vw, 56px);
  counter-reset: step;
}

.production__steps li {
  counter-increment: step;
  padding-top: 18px;
  border-top: 1px solid var(--obsidian);
}

.production__steps h3 {
  font-size: 1.25rem;
}

/* Номер этапа — Espresso: Muted Gold на Ivory не проходит контраст */
.production__steps h3::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--espresso);
}

.production__steps p {
  font-size: 0.9375rem;
}

.production__address {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: clamp(28px, 3vw, 40px);
  padding-top: 16px;
  border-top: 1px solid var(--gold);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
}

.production__address-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--espresso);
}

/* ==========================================================
   8. Производство и международные рынки — фото уходит в левый край экрана,
   рядом увеличенный фрагмент мрамора с прожилками
   ========================================================== */

.markets {
  background: var(--obsidian);
  align-items: center;
}

.markets__media {
  grid-column: 1 / 6;
  grid-row: 1 / 3;
  margin-left: calc(-1 * var(--pad));
  aspect-ratio: 4 / 5;
}

.markets__media img {
  object-position: 55% 50%;
}

.markets__detail {
  grid-column: 5 / 7;
  grid-row: 1;
  align-self: start;
  z-index: 1;
  aspect-ratio: 3 / 4;
  margin-top: clamp(32px, 5vw, 80px);
  border: 10px solid var(--obsidian);
}

/* Фрагмент: золотые прожилки мрамора */
.markets__detail img {
  object-position: 100% 0%;
  transform: scale(2.6);
  transform-origin: 100% 0%;
}

.markets__content {
  grid-column: 8 / 13;
  grid-row: 1 / 3;
}

/* Адрес производства: мелкая второстепенная строка под первым абзацем,
   подпись — как остальные мелкие подписи сайта */
.markets__address {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: -4px;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.markets__address-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.markets h3 {
  margin-top: 28px;
}

.markets__route li {
  position: relative;
  padding: 16px 0 16px 32px;
  color: var(--ivory-muted);
  border-left: 1px solid var(--taupe);
}

.markets__route li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 26px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}

/* ==========================================================
   9. Сотрудничество — фото поднимается через границу секций,
   крупный заголовок, список в две колонки
   ========================================================== */

.cooperation {
  align-items: start;
}

.cooperation__media {
  grid-column: 9 / 13;
  grid-row: 1;
  z-index: 2;
  aspect-ratio: 3 / 4;
  /* Поднимается только в нижний отступ предыдущей секции, не задевая её текст */
  margin-top: calc(-1.5 * var(--section-y));
  box-shadow: 0 40px 80px rgba(23, 21, 19, 0.35);
}

.cooperation__content {
  grid-column: 1 / 8;
  grid-row: 1;
}

.cooperation h2 {
  font-size: clamp(2rem, 3.7vw, 3.3rem);
}

.cooperation__content > p {
  max-width: 56ch;
}

.cooperation h3 {
  margin-top: 28px;
}

.cooperation__list {
  columns: 2;
  column-gap: var(--col-gap);
}

.cooperation__list li {
  position: relative;
  break-inside: avoid;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid rgba(121, 104, 90, 0.45);
}

.cooperation__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35em;
  width: 14px;
  height: 1px;
  background: var(--gold);
}

.cooperation__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* ==========================================================
   10. Форма обратной связи — заголовок слева, форма справа
   ========================================================== */

.contact {
  background: var(--espresso);
  align-items: start;
}

.contact > h2 {
  grid-column: 1 / 6;
  grid-row: 1;
}

/* Вторая строка заголовка: мельче и в цвете Muted Gold (на Espresso контраст 4,9:1) */
.contact__title-sub {
  display: block;
  margin-top: 0.3em;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  letter-spacing: 0.02em;
  color: var(--gold);
}

.contact > p {
  grid-column: 1 / 5;
  grid-row: 2;
}

.contact-form {
  grid-column: 7 / 13;
  grid-row: 1 / span 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.contact-form__hint,
.field:has(select),
.field:has(textarea),
.field--checkbox,
.contact-form .button,
.contact-form__status {
  grid-column: 1 / -1;
}

.contact-form__hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ivory-muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Граница поля: Smoky Taupe на Obsidian — 3,4:1 (для элементов интерфейса нужно ≥ 3:1) */
.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--taupe);
  border-radius: 0;
  background: var(--obsidian);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.3s var(--ease);
}

.field select {
  appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ivory-muted);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: var(--gold);
}

/* Ошибка — только после взаимодействия с полем */
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--gold);
  border-width: 2px;
}

.field--checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 6px 14px;
}

.field--checkbox input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--gold);
}

.field--checkbox label {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.field--checkbox .legal-link {
  grid-column: 2;
}

.contact-form .button {
  justify-self: start;
  margin-top: 8px;
}

/* Состояние после заполнения формы: стоит на месте формы */
.contact-form[hidden],
.contact-done[hidden] {
  display: none;
}

.contact-done {
  grid-column: 7 / 13;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  animation: contact-done-in 0.6s var(--ease);
}

/* «Спасибо» в стиле кнопки, но не нажимается */
.contact-done__thanks {
  margin: 0;
  cursor: default;
}

.contact-done__thanks:hover {
  background: var(--gold);
}

.contact-done__thanks:focus {
  outline: none;
}

.contact-done__again {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--ivory-muted);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.contact-done__again:hover {
  color: var(--ivory);
}

@keyframes contact-done-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ---------- Юридические ссылки (документы ещё не готовы) ---------- */

.legal-link[aria-disabled="true"] {
  cursor: default;
  font-size: 0.875rem;
  color: var(--ivory-muted);
  text-decoration: underline dotted rgba(233, 223, 207, 0.5);
  text-underline-offset: 4px;
}

/* ==========================================================
   11. Контакты и футер — огромный знак amon сверху
   ========================================================== */

.site-footer {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "brand brand brand brand brand brand brand brand brand brand brand brand"
    "contacts contacts contacts contacts contacts . . . legal legal legal legal"
    "copy copy copy copy copy copy copy copy copy copy copy copy";
  column-gap: var(--col-gap);
  row-gap: 40px;
  padding: clamp(56px, 7vw, 96px) var(--pad) 36px;
  background: var(--obsidian);
  border-top: 1px solid rgba(121, 104, 90, 0.35);
}

.footer-brand {
  grid-area: brand;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(121, 104, 90, 0.35);
}

.logo--footer {
  margin: 0;
  font-size: clamp(4.2rem, 11vw, 9.2rem);
  line-height: 0.8;
  letter-spacing: -0.02em;
}

.slogan {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  color: var(--gold);
}

.contacts {
  grid-area: contacts;
}

.contacts h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.contacts address {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--ivory-muted);
}

.contacts address p {
  margin-bottom: 8px;
}

.contacts__company {
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ivory);
}

.contacts a {
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.legal-nav {
  grid-area: legal;
  align-self: end;
}

.legal-nav li + li {
  margin-top: 10px;
}

.copyright {
  grid-area: copy;
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid rgba(121, 104, 90, 0.35);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--ivory-muted);
}

/* ---------- Анимации (только при включённом JS и без reduce motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .js-motion [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  }

  .js-motion [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  /* Футер в самом низу страницы может не подняться в зону срабатывания — показываем сразу */
  .js-motion .site-footer > [data-reveal] {
    opacity: 1;
    transform: none;
  }

  /* Фото «проявляются»: лёгкое уменьшение масштаба внутри рамки */
  .js-motion figure[data-reveal] > img {
    scale: 1.08;
    transition: scale 1.8s var(--ease);
  }

  .js-motion figure[data-reveal].is-visible > img {
    scale: 1;
  }

  .js-motion .hero__content > * {
    animation: hero-in 1.1s var(--ease) both;
  }

  .js-motion .hero__content > :nth-child(2) { animation-delay: 0.1s; }
  .js-motion .hero__content > :nth-child(3) { animation-delay: 0.2s; }
  .js-motion .hero__content > :nth-child(4) { animation-delay: 0.3s; }
  .js-motion .hero__content > :nth-child(5) { animation-delay: 0.4s; }
  .js-motion .hero__content > :nth-child(6) { animation-delay: 0.5s; }

  .js-motion .hero__media {
    animation: hero-fade 1.8s var(--ease) both;
  }

  @keyframes hero-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes hero-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================
   Адаптивность
   ========================================================== */

/* Планшет */
@media (max-width: 1080px) {
  .site-nav ul {
    gap: 6px 22px;
  }

  .hero__media,
  .audience__media {
    width: 50vw;
  }

  .audience__content {
    grid-column: 1 / 7;
  }

  /* Кнопки заходят на видео: затемнение стыка шире, чтобы текст кнопок читался */
  .hero__media::before {
    background:
      linear-gradient(to right, var(--obsidian) 0%, rgba(23, 21, 19, 0.82) 20%, rgba(23, 21, 19, 0.2) 40%, transparent 52%),
      linear-gradient(to top, rgba(23, 21, 19, 0.5) 0%, transparent 22%);
  }

  .story__media {
    grid-column: 7 / 13;
  }

  .story__content {
    grid-column: 1 / 7;
  }

  /* Продукт: колонки шире, видео крупнее — кнопки управления в одну строку */
  .product__media {
    grid-column: 1 / 7;
  }

  .product__content {
    grid-column: 7 / 13;
  }

  .product__video {
    grid-column: 3 / 7;
    margin-right: 0;
  }

  .production__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  .markets__media {
    grid-column: 1 / 7;
  }

  .markets__detail {
    display: none;
  }

  .cooperation__list {
    columns: 1;
  }

  .contact > h2,
  .contact > p {
    grid-column: 1 / 7;
  }
}

/* Телефон и узкий планшет: одна колонка, перекрытия смягчены */
@media (max-width: 820px) {
  :root {
    --header-h: 104px;
    --section-y: 64px;
  }

  body {
    font-size: 1rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .logo {
    font-size: 1.75rem;
  }

  .site-nav ul {
    gap: 2px 18px;
  }

  .site-nav a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 6px 0;
  }

  /* Все секции — в одну колонку, порядок как в разметке: фото, затем текст */
  .intro,
  .story,
  .product,
  .pyramid,
  .audience,
  .production,
  .markets,
  .cooperation,
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .intro > *,
  .story > *,
  .product > *,
  .pyramid > *,
  .audience > *,
  .production > *,
  .markets > *,
  .cooperation > *,
  .contact > * {
    /* !important: перебивает более специфичные правила раскладки (.pyramid h2, .contact > h2 и т. п.) */
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  /* 1. Первый экран: видео сверху блоком — флакон целиком в кадре, текст под ним */
  .hero {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 48px;
  }

  .hero__media {
    position: relative;
    inset: auto;
    width: auto;
    height: min(62svh, 125vw);
    margin: 0 calc(-1 * var(--pad)) 28px;
  }

  .hero__video {
    object-position: 52% 32%;
  }

  .hero__media::before {
    background: linear-gradient(to bottom, transparent 70%, var(--obsidian) 100%);
  }

  .hero__media .video-toggle {
    top: 16px;
    bottom: auto;
    right: var(--gutter);
  }

  .hero h1 {
    width: auto;
    margin-bottom: 16px;
    font-size: clamp(2.15rem, 9vw, 3.3rem);
  }

  .hero__actions {
    margin: 28px 0 24px;
  }

  /* 2. Вступление: кадр на всю ширину экрана, текст под ним */
  .intro__media {
    margin-inline: calc(-1 * var(--pad));
    margin-bottom: 32px;
    aspect-ratio: 4 / 5;
    max-height: 72vh;
  }

  .intro__media::after {
    background: linear-gradient(to bottom, transparent 60%, var(--espresso) 100%);
  }

  .intro__content p {
    margin-left: 0;
  }

  .intro {
    padding-bottom: var(--section-y);
  }

  /* 3. История: фрагмент перекрывает угол основного кадра справа */
  .story__detail {
    justify-self: end;
    width: 32%;
    margin-top: -22%;
    margin-right: -6px;
    margin-bottom: 40px;
    border-width: 6px;
  }

  /* 4. Продукт: видео перекрывает нижний угол фото */
  .product {
    padding-bottom: var(--section-y);
  }

  .product__media {
    margin-bottom: 72px;
  }

  .product__video {
    grid-column: 3 / 7;
    margin-right: 0;
    margin-bottom: -48px;
  }

  .product__photo {
    grid-column: 1 / 6;
  }

  /* 5. Пирамида: три одинаковые строки «кадр слева — текст справа» */
  .pyramid h2 {
    margin-bottom: 20px;
  }

  .pyramid__levels {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
    margin-top: 28px;
    padding-top: 0;
  }

  .pyramid__level {
    display: grid;
    grid-template-columns: clamp(110px, 22vw, 150px) minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
    padding: 20px 0;
    border-bottom: 1px solid rgba(121, 104, 90, 0.45);
  }

  .pyramid__level img {
    grid-row: 1 / span 5;
    margin-bottom: 0;
  }

  .pyramid__level h3::before {
    font-size: 1.6rem;
  }

  .pyramid__notes {
    font-size: 0.9375rem;
  }

  .pyramid__intro {
    margin-top: 16px;
  }

  /* Слайдшоу на телефоне: карточка шире, соседние выглядывают по краям */
  .notes-carousel.is-ready {
    --card: min(64vw, 340px);
    margin-top: 28px;
  }

  .notes-carousel.is-ready .pyramid__level.is-prev {
    transform: translateX(-84%) scale(0.78);
  }

  .notes-carousel.is-ready .pyramid__level.is-next {
    transform: translateX(84%) scale(0.78);
  }

  .notes-carousel.is-ready .pyramid__levels {
    margin-top: 0;
    margin-inline: calc(-1 * var(--pad));
  }

  .notes-carousel__arrow {
    width: 44px;
    height: 44px;
  }

  .notes-carousel__tabs button {
    padding: 10px 6px 12px;
    letter-spacing: 0.08em;
  }

  .notes-carousel__tabs button::after {
    left: 6px;
    right: 6px;
  }

  /* 6. Для кого: видео сверху блоком на всю ширину экрана, затем текст */
  /* видео начинается сразу у верхней границы секции, без пустого отступа */
  .audience {
    min-height: 0;
    padding-top: 0;
  }

  /* 6 и 8: кадр начинается сразу у верхней границы секции, без отступа */
  .markets {
    padding-top: 0;
  }

  /* кадры 6 и 8 видны сразу, без анимации появления: иначе, пока кадр прозрачный
     или сдвинут вниз, над ним видна пустая полоса фона */
  .js-motion .audience__media[data-reveal],
  .js-motion .markets__media[data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .audience__media::before {
    background: linear-gradient(to bottom, transparent 70%, var(--espresso) 100%);
  }

  .audience__media {
    position: relative;
    inset: auto;
    width: auto;
    order: -1;
    margin-inline: calc(-1 * var(--pad));
    margin-bottom: 40px;
    aspect-ratio: 4 / 5;
  }

  /* 7. Производство: та же композиция внахлёст, развёрнутая в ширину.
     Все размеры — доли высоты коллажа --h; общая ширина 1,68 × --h */
  .production__media {
    --h: min(46svh, calc((100vw - 2 * var(--pad)) / 1.72));
    justify-self: center;
    width: calc(var(--h) * 1.68);
    height: var(--h);
    aspect-ratio: auto;
    margin-bottom: calc(36px + var(--h) * 0.05);
  }

  .production__media::before {
    left: calc(var(--h) * 0.05);
    top: calc(var(--h) * 0.05);
    width: calc(var(--h) * 0.75);
    height: var(--h);
    aspect-ratio: auto;
  }

  .production__tile--main {
    top: 0;
    width: calc(var(--h) * 0.75);
    height: var(--h);
    aspect-ratio: auto;
  }

  .production__tile--leaf {
    left: calc(var(--h) * 0.64);
    width: calc(var(--h) * 0.56);
    box-shadow: 0 0 0 4px var(--ivory), 0 16px 32px rgba(23, 21, 19, 0.25);
  }

  .production__tile--stone {
    left: calc(var(--h) * 1.14);
    width: calc(var(--h) * 0.52);
    box-shadow: 0 0 0 8px var(--ivory), 0 16px 32px rgba(23, 21, 19, 0.25);
  }

  .production__tile--stone img {
    outline-offset: 4px;
  }

  /* 8. Производство и международные рынки */
  .markets__media {
    margin-inline: calc(-1 * var(--pad));
    margin-bottom: 40px;
    aspect-ratio: 4 / 5;
  }

  /* 9. Сотрудничество: без подъёма через границу секций.
     Заголовок стоит слева от фото и заполняет пустое место рядом с ним */
  .cooperation {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 20px;
  }

  .cooperation__content {
    display: contents;
  }

  .cooperation__content > * {
    grid-column: 1 / -1;
  }

  .cooperation > .cooperation__media {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end;
    width: 42vw;
    margin-top: 0;
    margin-bottom: 40px;
  }

  .cooperation__content > h2 {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin-bottom: 40px;
    font-size: clamp(1.6rem, 6.4vw, 2.6rem);
  }

  /* 10. Форма */
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 32px;
  }

  .contact-done {
    margin-top: 32px;
  }

  .contact > p {
    margin-bottom: 0;
  }

  /* 11. Футер */
  .site-footer .logo--footer {
    font-size: clamp(4.5rem, 26vw, 8rem);
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "contacts"
      "legal"
      "copy";
    row-gap: 36px;
  }
}

/* Портретный планшет: одна колонка, но кадры не растягиваются на всю ширину */
@media (min-width: 481px) and (max-width: 820px) {
  .story__media {
    width: 74%;
  }

  .story__detail {
    width: 28%;
    margin-top: -20%;
  }

  .product__media {
    width: 86%;
  }

  .intro__media {
    aspect-ratio: 4 / 3;
  }

  .audience__media,
  .markets__media {
    aspect-ratio: 4 / 3;
  }

  .audience__media img {
    object-position: 50% 22%;
  }

}

/* Маленький телефон */
@media (max-width: 480px) {
  /* 6: портрет покупателя — одна колонка */
  .audience__portrait {
    grid-template-columns: minmax(0, 1fr);
  }

  /* --- Изображения компактнее: ни один кадр не выше 22 % высоты экрана --- */
  .hero__media {
    height: 22svh;
  }

  /* флакон в кадре целиком: окно кадра сдвинуто к верхней части ролика */
  .hero__video {
    object-position: 52% 27%;
  }

  .intro__media,
  .audience__media,
  .markets__media {
    aspect-ratio: auto;
    height: 22svh;
    max-height: none;
  }

  .intro__media img {
    object-position: 50% 45%;
  }

  .markets__media img {
    object-position: 50% 45%;
  }

  .story__media {
    width: 22svh;
    height: 22svh;
    aspect-ratio: auto;
    margin-inline: auto;
  }

  /* 7: коллаж на 15 % крупнее прежних 22 % — около 25 % высоты экрана */
  .production__media {
    --h: min(25svh, calc((100vw - 2 * var(--pad)) / 1.72));
  }

  .production__tile .video-toggle--icon {
    left: 6px;
    bottom: 6px;
    width: 28px;
    min-height: 28px;
    height: 28px;
  }

  .story__media img {
    object-position: 50% 55%;
  }


  .story__detail {
    width: 8svh;
    margin-top: -6svh;
    margin-right: calc(50% - 11svh - 3svh);
  }

  /* Продукт: фото и видео рядом, высота не больше 22 % экрана */
  .product__media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px;
    width: min(100%, 35svh);
    margin-inline: auto;
    margin-bottom: 32px;
  }

  .product__photo,
  .product__video {
    grid-column: auto !important;
    grid-row: 1 !important;
    align-self: stretch;
    height: 22svh;
    margin: 0 !important;
    border-width: 0;
    box-shadow: none;
  }

  .product__photo img,
  .product__video video {
    height: 100%;
    aspect-ratio: auto;
  }

  /* карточка 4:5 — её высота = 1,25 × ширина ≤ 22 % экрана */
  .notes-carousel.is-ready {
    --card: min(40vw, 17.6svh);
  }

  .cooperation > .cooperation__media {
    width: auto;
    height: 22svh;
    aspect-ratio: 3 / 4;
  }

  .button {
    padding-inline: 18px;
    letter-spacing: 0.08em;
  }

  .hero__actions .button,
  .cooperation__actions .button,
  .contact-form .button,
  .contact-done__thanks {
    width: 100%;
  }

  .contact-done {
    align-items: stretch;
  }

  .product__features,
  .production__steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .product__video {
    grid-column: 2 / 7;
  }

  .video-toggle,
  .video-sound {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.6875rem;
  }
}
