/* ==========================================================================
   Стики: светлая «сцена» с одной пачкой + полка всего ассортимента.
   Переход сцена → полка: при прокрутке «гаснет свет» (--dim 0→1,
   выставляет js/sticks.js), и на полке включается подсветка.
   ========================================================================== */

/* Цвет вкуса зарегистрирован как цвет: тогда фон сцены и стык с полкой перетекают плавно */
@property --st-flavor { syntax: '<color>'; inherits: true; initial-value: #c8202f; }
html { transition: --st-flavor 1.2s cubic-bezier(.16, 1, .3, 1); }

:root {
  --st-stage: #f3f3f1;
  --st-ink: #141414;
  --st-ink-2: #5d5d5a;
  --st-line: #dcdcd8;
  --st-bay: #17181a;
  --st-bay-ink: #f2f0ea;
  --st-bay-ink-2: #a3a19a;
  --st-light: #fff6e2;
  --st-flavor: #c8202f;
  /* сцена — мягкий пастельный оттенок текущего вкуса */
  --st-tint: color-mix(in srgb, var(--st-flavor) 14%, #f6f5f2);
  --st-ease: cubic-bezier(.16, 1, .3, 1);
}

.st-page { font-family: 'Geologica', 'Manrope', system-ui, sans-serif; }
.st-page ::selection { background: var(--st-flavor); color: #fff; }

/* ---------- Шапка на светлой сцене ---------- */
.st-header {
  /* шапка едет вместе со страницей; фон появляется только после начала прокрутки */
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s, padding .25s;
  display: flex; align-items: center; gap: 40px;
  /* поля шапки совпадают с колонкой контента (1440px по центру), как у остальных секций */
  padding: 26px max(56px, calc((100vw - 1440px) / 2 + 56px));
  font-size: 14px; color: var(--st-ink-2);
}
.st-header.is-scrolled {
  padding-top: 16px; padding-bottom: 16px;
  background: color-mix(in srgb, var(--st-tint) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: rgba(20, 20, 20, .08);
}
/* над тёмным залом шапка тоже тёмная */
.st-header.is-dark {
  background: rgba(23, 24, 26, .78); border-bottom-color: rgba(242, 240, 234, .08); color: var(--st-bay-ink-2);
}
.st-header.is-dark .st-brand { color: var(--st-bay-ink); }
.st-header.is-dark .st-brand img { filter: invert(1) brightness(1.6); } /* исходный логотип тёмный */
.st-header.is-dark .st-nav a:hover, .st-header.is-dark .st-dirs a:hover { color: var(--st-bay-ink); }
.st-header.is-dark .st-dirs { border-right-color: rgba(242, 240, 234, .14); }
.st-header.is-dark .lang-select { color: var(--st-bay-ink); border-color: rgba(242, 240, 234, .2); }
.st-header.is-dark .burger-line { background: var(--st-bay-ink); }
/* якоря не прячутся под шапкой */
.st-page section[id] { scroll-margin-top: 84px; }
.st-page .st-range { scroll-margin-top: 0; }
.st-brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--st-ink); font-weight: 500; letter-spacing: .14em; text-decoration: none;
}
/* логотип белый — на светлом фоне затемняем */
.st-brand img { height: 22px; filter: invert(1) brightness(.2); }
.st-nav { display: flex; gap: 32px; margin: 0 auto; }
.st-nav a, .st-dirs a { color: inherit; text-decoration: none; transition: color .2s; }
.st-nav a:hover, .st-dirs a:hover { color: var(--st-ink); }
.st-dirs { display: flex; gap: 18px; padding-right: 22px; border-right: 1px solid rgba(20, 20, 20, .18); }
.st-header .lang-switcher { color: var(--st-ink-2); }
.st-header .lang-select { color: var(--st-ink); background-color: transparent; border-color: rgba(20, 20, 20, .18); }
.st-header .lang-select option { color: #141414; }
.st-header .burger-line { background: var(--st-ink); }

/* ---------- Сцена ---------- */
.st-stage {
  position: sticky; top: 0; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  background: var(--st-tint); color: var(--st-ink);
  display: grid; grid-template-rows: 1fr;
  padding-top: 86px; /* место под фиксированную шапку */
}
/* Отсвет вкуса за передней пачкой */
.st-stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  /* светлый ореол за передней пачкой: пачка «светится» на цветном фоне */
  background: radial-gradient(34% 40% at 68% 52%, color-mix(in srgb, var(--st-flavor) 22%, #fff), transparent 70%);
}
/* Текст слева, барабан справа и выходит за правый край */
.st-stage-body {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); align-items: center;
  /* первый экран держится в той же колонке, что и секции ниже; слева — её поле, справа барабан доходит до края колонки */
  max-width: 1440px; width: 100%; margin: 0 auto;
  padding: 0 24px 4vh 56px;
}
.st-copy { position: relative; z-index: 3; max-width: 640px; }
.st-title {
  /* размер ограничен и шириной колонки (62px), и высотой окна: на низком широком экране первый экран должен помещаться целиком */
  font-weight: 300; font-size: clamp(34px, min(4.3vw, 7.6vh), 62px);
  line-height: 1; letter-spacing: -.035em; text-wrap: balance;
  color: var(--st-ink); margin: 0;
}
.st-title b { font-weight: 500; }
.st-lede { margin: clamp(12px, 2.4vh, 22px) 0 0; color: var(--st-ink-2); font-size: 17px; line-height: 1.5; max-width: 42ch; }

.st-drum {
  position: relative; height: 100%; min-height: 560px;
  perspective: 1400px; cursor: grab; touch-action: pan-y; outline: none;
}
.st-drum.is-dragging { cursor: grabbing; }
.st-drum:focus-visible::after { content: ''; position: absolute; inset: 12% 18%; border: 2px solid var(--st-ink); border-radius: 24px; pointer-events: none; }
.st-pack {
  position: absolute; left: 46%; top: 50%; width: min(62%, 640px); height: auto;
  transform-origin: 50% 60%; will-change: transform, filter, opacity;
  user-select: none; -webkit-user-drag: none;
  /* в рендере под пачкой запечён белый «пол»; гасим нижнюю полосу, пока нет чистых исходников */
  -webkit-mask-image: linear-gradient(to bottom, #000 76%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 76%, transparent 94%);
}

.st-now { margin: clamp(18px, 5vh, 48px) 0 0; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; color: var(--st-ink-2); font-size: 15px; }
.st-now strong { color: var(--st-ink); font-weight: 500; font-size: 28px; letter-spacing: -.01em; }
.st-now em { font-style: normal; }
.st-rail { margin-top: 18px; display: flex; gap: 8px; }
.st-rail button {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  border: 1px solid var(--st-line); background: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .3s var(--st-ease), border-color .3s;
}
.st-rail i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); transition: transform .3s var(--st-ease); }
.st-rail button:hover { transform: translateY(-2px); }
.st-rail button[aria-pressed="true"] { border-color: var(--st-ink); }
.st-rail button[aria-pressed="true"] i { transform: scale(1.3); }
.st-rail button:focus-visible, .st-btn:focus-visible, .st-item:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.st-actions { margin-top: clamp(18px, 4.5vh, 40px); display: flex; gap: 12px; flex-wrap: wrap; }
.st-btn {
  display: inline-block; font: inherit; font-size: 15px; font-weight: 500;
  padding: 14px 22px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.st-btn-dark { background: var(--st-ink); color: #fff; }
.st-btn-dark:hover { background: #000; }
.st-btn-line { border: 1px solid var(--st-line); color: var(--st-ink); background: #fff; }
.st-btn-line:hover { border-color: var(--st-ink); }
.st-btn-light { background: var(--st-bay-ink); color: #141414; }
.st-btn-light:hover { background: #fff; }

/* ---------- Полка ---------- */
.st-range {
  position: relative; z-index: 3;
  /* тёмный зал выезжает занавесом: чёткая округлая кромка с тонкой линией тёплого света, без серого градиента */
  margin-top: -100vh; margin-top: -100svh;
  background: var(--st-bay); color: var(--st-bay-ink);
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -1px 0 rgba(255, 246, 226, .45), 0 -50px 90px -30px rgba(0, 0, 0, .4);
  padding: 12vh 0 10vh;
}
.st-range-inner { max-width: 1440px; margin: 0 auto; padding: 0 56px; }
.st-range-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; }
.st-range-title {
  margin: 0; font-weight: 400; font-size: clamp(36px, 4.2vw, 66px);
  line-height: 1; letter-spacing: -.03em; max-width: 15ch; color: inherit;
}
.st-range-title span { opacity: .6; }
.st-range-side { display: grid; gap: 18px; justify-items: end; text-align: right; max-width: 36ch; font-size: 15px; }
.st-range-side p { margin: 0; opacity: .72; }

.st-bay { display: grid; gap: 5vh; margin-top: 8vh; }
.st-row { display: flex; align-items: flex-end; justify-content: space-between; height: 27vh; min-height: 170px; padding: 0 1.5vw; }
.st-ledge {
  position: relative; display: flex; height: 26px; margin-top: -6px; padding: 0 1.5vw;
  background: linear-gradient(to bottom, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border-top: 1px solid rgba(255, 246, 226, 0);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: border-color 1s var(--st-ease), box-shadow 1.4s var(--st-ease);
}
/* Подсветка включается, когда в зале стемнело */
.st-range.is-lit .st-ledge {
  border-top-color: rgba(255, 246, 226, .55);
  box-shadow: 0 -18px 40px -22px var(--st-light), 0 10px 30px rgba(0,0,0,.5);
}
.st-range.is-lit .st-shelf + .st-shelf .st-ledge { transition-delay: .25s; }
.st-tag {
  flex: 1; text-align: center; line-height: 26px;
  font-size: 11px; letter-spacing: .08em; color: var(--st-bay-ink-2); font-variant-numeric: tabular-nums;
}
.st-item {
  position: relative; flex: 1; display: grid; justify-items: center;
  background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer;
  transition: opacity .35s var(--st-ease), filter .35s;
}
.st-item img {
  max-height: 26vh; max-width: 100%; object-fit: contain; transform-origin: 50% 100%;
  transition: transform .5s var(--st-ease);
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.45));
}
.st-item.is-device img { max-height: 25vh; }
/* пачки Sentic чуть меньше */
.st-row:not(.st-row-coo) .st-item:not(.is-device) img { max-width: 84%; }
/* у рендеров COO много пустого поля вокруг пачки */
/* пачка в файле нарисована правее центра (~61% ширины): сдвигаем на s·11%, чтобы она стояла ровно над подписью */
.st-row-coo .st-item img { transform: translateX(-14.85%) scale(1.35); }
.st-bay:has(.st-item:hover, .st-item:focus-visible) .st-item:not(:hover):not(:focus-visible) { opacity: .28; filter: saturate(.4); }
.st-item:hover img, .st-item:focus-visible img { transform: translateY(-14px) scale(1.12); }
.st-row-coo .st-item:hover img, .st-row-coo .st-item:focus-visible img { transform: translateY(-14px) translateX(-16.5%) scale(1.5); }

.st-card {
  position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 2;
  width: 210px; padding: 12px 14px; border-radius: 12px;
  background: rgba(242, 240, 234, .97); color: #151515; text-align: left;
  font-size: 13px; line-height: 1.4; box-shadow: 0 18px 40px rgba(0,0,0,.45);
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity .25s, transform .35s var(--st-ease);
}
.st-row-coo .st-card { bottom: calc(100% + 34px); }
.st-card b { display: block; font-weight: 600; font-size: 15px; }
.st-card em { font-style: normal; color: #6b6964; }
.st-item:hover .st-card, .st-item:focus-visible .st-card { opacity: 1; transform: translate(-50%, 0); }

.st-legend { display: flex; justify-content: space-between; gap: 24px; margin-top: 4vh; font-size: 14px; opacity: .72; }
.st-legend strong { font-weight: 500; }


/* Закреп: высота = экран + путь занавеса. Пока зал выезжает, первый экран стоит и затемняется */
.st-pin { position: relative; height: 200vh; height: 200svh; }
.st-stage::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: var(--st-bay); opacity: calc(var(--cover, 0) * .72);
}
.st-stage-body { transform: translateY(calc(var(--cover, 0) * -5vh)) scale(calc(1 - var(--cover, 0) * .04)); transform-origin: 50% 40%; }

/* Вход первого экрана: текст слева по очереди, барабан собирается в JS */
@keyframes st-rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: no-preference) {
  .st-title, .st-lede, .st-now, .st-rail, .st-actions { animation: st-rise .9s var(--st-ease) backwards; }
  .st-title { animation-delay: .05s; }
  .st-lede { animation-delay: .16s; }
  .st-now { animation-delay: .27s; }
  .st-rail { animation-delay: .36s; }
  .st-actions { animation-delay: .45s; }
}

/* Главная полка: столешница перед кромкой, предметы стоят на ней и не пересекают линию света */
.st-range .st-shelf .st-ledge { margin-top: 0; }
.st-range .st-row { padding-bottom: 6px; }
.st-range .st-shelf .st-ledge::before {
  content: ''; position: absolute; left: 1.5vw; right: 1.5vw; top: -26px; height: 26px; pointer-events: none;
  background:
  var(--cast, none),
    linear-gradient(to top, rgba(255, 246, 226, .18), rgba(255, 246, 226, 0));
  clip-path: polygon(2.2% 0, 97.8% 0, 100% 100%, 0 100%);
  opacity: 0; transition: opacity 1.2s var(--st-ease) .2s;
}
.st-range.is-lit .st-shelf .st-ledge::before { opacity: 1; }
.st-range .st-item { z-index: 1; }
.st-range .st-shelf:has(.st-row-coo) .st-ledge { --n: 8; }
.st-range .st-shelf:has(.st-row-coo) .st-ledge { --cast:
  radial-gradient(ellipse 6.9% 24% at 6.25% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 6.9% 24% at 18.75% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 6.9% 24% at 31.25% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 6.9% 24% at 43.75% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 6.9% 24% at 56.25% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 6.9% 24% at 68.75% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 6.9% 24% at 81.25% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 6.9% 24% at 93.75% 82%, rgba(0, 0, 0, .55), transparent); }
.st-range .st-shelf:not(:has(.st-row-coo)) .st-ledge { --cast:
  radial-gradient(ellipse 9.2% 24% at 8.33% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 9.2% 24% at 25.00% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 9.2% 24% at 41.67% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 9.2% 24% at 58.33% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 9.2% 24% at 75.00% 82%, rgba(0, 0, 0, .55), transparent),
  radial-gradient(ellipse 9.2% 24% at 91.67% 82%, rgba(0, 0, 0, .55), transparent); }

@media (prefers-reduced-motion: reduce) {
  .st-stage::before, .st-ledge, .st-item, .st-item img, .st-card { transition: none; }
}

@media (max-width: 1100px) {
  .st-dirs { display: none; }
}
@media (max-width: 860px) {
  .st-header { padding: 16px 20px; }
  .st-header.is-scrolled { padding-top: 12px; padding-bottom: 12px; }
  .st-stage { padding-top: 68px; }
  .st-nav, .st-header .lang-switcher { display: none; }
  .st-header .burger-btn { margin-left: auto; }
  .st-stage-body { grid-template-columns: 1fr; padding: 0 20px 24px; }
  /* на телефоне барабан сверху, текст под ним */
  .st-drum { order: -1; min-height: 0; height: 38vh; }
  .st-stage::before { background: radial-gradient(60% 24% at 50% 26%, color-mix(in srgb, var(--st-flavor) 22%, #fff), transparent 70%); }
  .st-pack { width: 66vw; left: 50%; }
  .st-title { font-size: clamp(30px, 9vw, 40px); }
  .st-lede { font-size: 15px; margin-top: 12px; }
  .st-now { margin-top: 20px; }
  .st-now strong { font-size: 20px; }
  .st-now em { display: none; }
  /* зона касания 44px: восемь кнопок делят ширину строки, видимая точка остаётся маленькой */
  .st-rail { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; margin-top: 8px; }
  .st-rail button { width: auto; height: 44px; border: 0; background: transparent; }
  .st-rail button i { width: 14px; height: 14px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--st-line); }
  .st-rail button[aria-pressed="true"] i { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--st-ink); }
  .st-actions { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  /* на сцене плавающие WhatsApp/Telegram закрывали бы кнопки и точки вкусов */
  body.st-on-stage .floating-buttons { opacity: 0; pointer-events: none; }
  .floating-buttons { transition: opacity .3s; }
  .st-header .burger-btn { flex: 0 0 auto; margin-left: auto; margin-right: 0; position: relative; right: auto; }
  .st-btn { padding: 13px 10px; font-size: 14px; text-align: center; }
  .st-range-inner { padding: 0 20px; }
  .st-range-head { grid-template-columns: 1fr; }
  .st-range-side { justify-items: start; text-align: left; }
  /* только полка ассортимента; кромки в секциях ниже остаются во всю ширину */
  .st-shelf { overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
  .st-shelf::-webkit-scrollbar { display: none; }
  .st-shelf .st-row, .st-shelf .st-ledge { width: max-content; justify-content: flex-start; gap: 8px; }
  .st-row { height: 150px; }
  .st-bay { gap: 28px; margin-top: 40px; }
  .st-item, .st-tag { flex: 0 0 34vw; }
  .st-card { display: none; }
  .st-legend { flex-direction: column; gap: 6px; }
}
