/* ===== Главная: блоки на весь экран, фон сцены меняет цвет при переходе ===== */

/* Цвета сцены. Inter стоит вместо TT Commons из макета — заменить можно в --ui */
:root {
  --stage: #fef9f2;
  --text: #38362e;
  --est: #787458;
  --muted: #89898d;
  --burger-1: #787458;
  --burger-2: #adadad;
  --olive: #8f8a6d;
  --button: #414141;
  --serif: "Playfair Display", Georgia, serif;
  --ui: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --mono-hero: "Overpass Mono", ui-monospace, Menlo, monospace;
  --swap: 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Шапка: логотип 61px по центру, бургер справа */
.home { --bar: 96px; }

html[data-theme="olive"] {
  --stage: var(--olive);
  --est: var(--cream);
  --burger-1: var(--cream);
  --burger-2: var(--cream);
}

/* Фон самой страницы тоже следует за сценой: иначе под панелями Safari видна белая полоса */
html {
  background: var(--stage);
  transition: background-color var(--swap);
}

.home { background: transparent; }

.stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--stage);
  transition: background-color var(--swap);
}

/* Шапка: логотип по центру кадра, бургер справа */
.home .bar:not(.bar--over) {
  justify-content: center;
  align-items: center;
  background: var(--cream);
  transition: transform 0.55s cubic-bezier(0.45, 0, 0.2, 1);
}

.home .bar__logo a { display: block; }

/* ---------- Блоки ---------- */

.scene {
  position: relative;
  min-height: 100svh;
  color: var(--text);
}

.quote {
  width: min(293px, calc(100% - 48px));
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: 0.16px;
  text-align: justify;
  text-indent: 100px;
  color: var(--text);
}

.quote--light { color: var(--cream); }

.quote--plain { width: 100%; text-indent: 0; }

.quote--gap { margin-top: 1.15em; }

/* 1. Первый экран: колонка на весь кадр, как в макете 393×852 */
.scene--hero {
  display: flex;
  align-items: center;
  min-height: 100svh;
  margin-top: calc(-1 * (var(--bar) + env(safe-area-inset-top)));
}

.hero2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  width: 220px;
  margin-left: calc(50% - 46.5px);
}

.hero2__lead,
.hero2__text {
  margin: 0;
  font-family: var(--mono-hero);
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: -0.28px;
  text-align: left;
  text-indent: 0;
  text-transform: uppercase;
  color: var(--muted);
}

.hero2__lead { width: 187px; }

.hero2__text { width: 220px; }

.hero2__photo {
  width: 92px;
  height: 100px;
  max-width: none;
  object-fit: cover;
  background: #d9d9d9;
}

.hero2__menu {
  position: absolute;
  left: 50%;
  bottom: calc(27px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(calc(-50% + var(--menu-move-x, 0px)), var(--menu-move-y, 0px));
  font-family: var(--mono-hero);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  color: var(--red);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
  z-index: 4;
}

.hero2__menu-label { display: block; }

.hero2__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  opacity: var(--menu-arrow-opacity, 1);
  transform: translateY(calc(var(--menu-progress, 0) * -4px));
  transition: opacity 0.12s linear;
}

.hero2__arrow img {
  width: 25px;
  height: 7.36396px;
  max-width: none;
  transform: rotate(90deg);
}

/* 2. Меню: кремовый экран с фильтрами и двумя карточками */
.scene--products { padding: 108px 5px 96px; }

/* В макете текст стоит от центральной линии вправо, а не по центру */
.menu-head {
  margin-top: 24px;
  margin-left: 50%;
  text-align: left;
}

.menu-head__label {
  font-family: var(--mono-hero);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  color: var(--red);
  visibility: hidden;
}

.menu-head__note {
  margin-top: 10px;
  font-family: var(--mono-hero);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  color: var(--muted);
}

.filters {
  display: flex;
  justify-content: flex-start;
  gap: 3px;
  margin-top: 24px;
}

.filter {
  padding: 8px 35px;
  border: 1px solid var(--red);
  border-radius: 90px;
  background: transparent;
  font-family: var(--mono-hero);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.24px;
  text-transform: uppercase;
  color: var(--red);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.filter.is-active { background: var(--red); color: var(--cream); }

.goods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 11px;
}

.good {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease-out;
}

.good:focus,
.good:focus-visible { outline: none; }

.good.is-pressed { transform: translateY(3px) scale(0.985); }

.good[hidden] { display: none; }

.good__photo {
  position: relative;
  height: 255px;
  overflow: hidden;
  border-radius: 12px;
  background: #d9d9d9;
  touch-action: pan-x pan-y;
}

/* Паштет в макете затемнён чёрным слоем 20% */
.card__track img.is-dark { filter: brightness(0.9); }

.good__cta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 7px 12px 9px;
  border-radius: 90px;
  background: #fff;
  font-family: var(--mono-hero);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.26px;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  pointer-events: none;
  z-index: 2;
}

.good__title,
.good__price {
  font-family: var(--mono-hero);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.28px;
  text-align: center;
  text-transform: uppercase;
}

.good__title { margin-top: 12px; font-weight: 500; color: var(--text); }
.good__price { margin-top: 4px; color: var(--red); }

.pill-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px 10px;
  border-radius: 90px;
  background: var(--button);
  color: var(--cream);
  font-family: var(--ui);
  font-size: 16px;
  font-style: normal;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 4px 5px rgb(94 94 94 / 0.2);
}

/* 3. Как заказать */
.scene--howto { padding: 146px 0 96px; }

.script-title {
  display: flex;
  justify-content: center;
}

.script-title img {
  width: min(374px, calc(100% - 16px));
  height: auto;
}

.howto2 {
  width: 204px;
  margin: 31px 50px 0 auto;
}

.howto2__buttons {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.howto2__buttons .pill-button {
  padding-inline: 10px;
  white-space: nowrap;
}

.howto2__photo {
  display: block;
  width: min(293px, calc(100% - 100px));
  height: 163px;
  margin: 56px auto 0;
  object-fit: cover;
}

/* 4. Доставка */
.scene--delivery {
  min-height: 100svh;
  padding: 132px 5px 128px;
}

.delivery-page .scene--delivery {
  margin-top: calc(-1 * (var(--bar) + env(safe-area-inset-top)));
}

.delivery2__copy {
  width: calc(50% - 2.5px);
  margin-left: calc(50% + 2.5px);
  font-family: var(--mono-hero);
  text-transform: uppercase;
}

.delivery2__title {
  margin: 0;
  font: 500 12px/1.2 var(--mono-hero);
  letter-spacing: -0.24px;
  color: var(--red);
}

.delivery2__text {
  margin: 13px 0 0;
  font: 400 12px/1.2 var(--mono-hero);
  letter-spacing: -0.24px;
  color: var(--muted);
}

.delivery2__photo {
  overflow: hidden;
}

.delivery2__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.delivery2__photo--wide {
  width: 100%;
  height: 163px;
  margin-top: 105px;
}

.delivery2__photo--wide img {
  /* Кадр сохраняет прежнюю композицию: угол коробки слева, сердце справа. */
  object-position: 50% 66%;
}

.delivery2__photo--small {
  width: 151px;
  height: 165px;
  margin: 48px 0 0 calc(50% + 2.5px);
}

.delivery2__photo--small img {
  object-position: 50% 52%;
}

.sign {
  margin-top: auto;
  padding-top: max(220px, 30svh);
  text-align: center;
}

.sign img { width: 195px; margin: 0 auto; }


/* ---------- Появление ---------- */

/* Блоки 2–3: содержимое выезжает снизу и проявляется, когда блок заходит на экран */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.12s);
}

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

/* Блок 4: слова проявляются по мере скролла */
[data-words] .word { opacity: 0.08; transition: opacity 0.25s linear; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  [data-words] .word { opacity: 1; }
}

/* Раскрытое меню на главной использует ту же сетку, что и на остальных страницах. */
.home .menu { color: var(--red); }
