/* ============================================================
   АРХИТЕКТОР БАР — апгрейд v2 (поверх исходной вёрстки)
   прелоадер, переходы страниц, появление блоков, шапка, кнопки,
   курсор, зерно, прогресс прокрутки. Геометрию зеро-блоков
   не трогаем: анимируем только opacity / translate / scale.
   ============================================================ */

:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

/* ============================================================
   1. ПРЕЛОАДЕР
   ============================================================ */

#preloader { display: none; }
html.pl-on #preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: var(--bg);
  opacity: 1; transition: none;
  clip-path: ellipse(160% 140% at 50% 0%);
}
html.pl-on body { overflow: hidden; }

.pl-stage { position: relative; width: 210px; height: 210px; display: grid; place-items: center; }
.pl-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pl-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1.5; }
.pl-prog {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transform: rotate(-90deg); transform-origin: 100px 100px;
  filter: drop-shadow(0 0 6px rgba(208, 89, 0, .7));
  transition: stroke-dashoffset .25s linear;
}
.pl-orbit { transform-origin: 100px 100px; animation: plSpin 16s linear infinite; }
.pl-orbit text {
  fill: rgba(255, 255, 255, .55);
  font: 600 8.6px var(--t-text-font); letter-spacing: .26em; text-transform: uppercase;
}
@keyframes plSpin { to { transform: rotate(360deg); } }

#preloader .preloader-icon, #pt .preloader-icon { background-color: rgba(255, 255, 255, .14); }
#preloader .preloader-icon {
  position: relative;
  width: 96px; height: 96px;
  animation: preloaderRun 2.4s linear infinite, plPop .9s var(--ease-out) both;
}
@keyframes plPop { from { opacity: 0; transform: scale(.7) rotate(-8deg); } }

.pl-word {
  width: 168px; height: 66px;
  background: url("../assets/img/Group_1-2.svg") center / contain no-repeat;
  clip-path: inset(0 100% 0 0);
  animation: plWord 1.1s .35s var(--ease-io) forwards;
}
@keyframes plWord { to { clip-path: inset(0 0 0 0); } }

.pl-sub {
  font-size: 10.5px; font-weight: 600; letter-spacing: .42em; text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  opacity: 0; animation: plFade .8s .9s ease forwards;
}
@keyframes plFade { to { opacity: 1; } }

.pl-count {
  position: absolute; right: 28px; bottom: 22px;
  font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .18);
  font-variant-numeric: tabular-nums;
}
.pl-count small { font-size: 22px; vertical-align: top; margin-left: 4px; }

/* уход: содержимое сжимается, шторка уезжает вверх с изогнутым краем */
#preloader.pl-out .pl-stage,
#preloader.pl-out .pl-word,
#preloader.pl-out .pl-sub,
#preloader.pl-out .pl-count { transition: opacity .45s ease, transform .6s var(--ease-io); opacity: 0; transform: translateY(-30px) scale(.94); }
#preloader.pl-out { animation: plLift 1.05s .25s var(--ease-io) forwards; }
@keyframes plLift { to { clip-path: ellipse(160% 0% at 50% 0%); } }

#pl-wipe { display: none; }
html.pl-on #pl-wipe {
  display: block; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background: var(--accent);
  clip-path: ellipse(160% 140% at 50% 0%);
}
html.pl-on #pl-wipe.pl-out { animation: plLift 1.05s .38s var(--ease-io) forwards; }

@media (max-width: 639px) {
  .pl-stage { width: 176px; height: 176px; }
  #preloader .preloader-icon { width: 80px; height: 80px; }
  .pl-word { width: 140px; height: 55px; }
  .pl-sub { font-size: 9.5px; letter-spacing: .26em; }
  .pl-count { font-size: 44px; right: 18px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* ============================================================
   2. ПЕРЕХОД МЕЖДУ СТРАНИЦАМИ
   ============================================================ */

#pt {
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  display: grid; place-items: center;
  background: var(--bg);
  border-top: 3px solid var(--accent);
  transform: translateY(101%);
}
#pt .preloader-icon { width: 64px; height: 64px; opacity: 0; transition: opacity .3s .15s; }
#pt.pt-in { transform: none; transition: transform .55s var(--ease-io); pointer-events: auto; }
#pt.pt-in .preloader-icon { opacity: 1; }
html.pt-on #pt { transform: none; transition: none; }
html.pt-on #pt .preloader-icon { opacity: 1; transition: none; }
html.pt-on #pt.pt-out { transform: translateY(-101%); transition: transform .7s var(--ease-io); border-top-color: transparent; }
html.pt-on #pt.pt-out .preloader-icon { opacity: 0; }

/* ============================================================
   3. ПРОГРЕСС ПРОКРУТКИ И ЗЕРНО
   ============================================================ */

.scroll-prog {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 995;
  background: linear-gradient(90deg, var(--accent), #ff9a4a);
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

@media (min-width: 960px) and (hover: hover) {
  body::after {
    content: ''; position: fixed; inset: -50%; z-index: 980; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .045;
    animation: grain 1.2s steps(6) infinite;
  }
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ============================================================
   4. ПОЯВЛЕНИЕ БЛОКОВ ПРИ ПРОКРУТКЕ
   translate/scale — отдельные свойства, не конфликтуют с transform
   исходных анимаций (вращение, маркиза, нажатие кнопок)
   ============================================================ */

.rv {
  --rv-y: 0px; --py: 0px;
  translate: 0 calc(var(--rv-y) + var(--py));
  transition: opacity .9s var(--ease-out), translate 1s var(--ease-out), scale 1.2s var(--ease-out), filter .9s ease;
}
.rv-up { opacity: 0; --rv-y: 34px; }
.rv-img { opacity: 0; scale: .965; }
.rv-fade { opacity: 0; }
.rv-blur { opacity: 0; --rv-y: 24px; filter: blur(8px); }
.rv.rv-in { opacity: 1; --rv-y: 0px; scale: 1; filter: none; }
.rv.rv-done { transition: opacity .3s, scale .3s; }   /* дальше — только параллакс, без запаздывания */

/* заголовки по словам */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.wi { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); }
.rv-in .wi { transform: none; }

/* ============================================================
   5. ШАПКА
   ============================================================ */

/* десктоп: стеклянная плашка после прокрутки */
#z957171471 .tn-elem[data-elem-id="1741307952922"] .tn-atom {
  transition: background-color .4s ease, box-shadow .4s ease;
}
body.scrolled #z957171471 .tn-elem[data-elem-id="1741307952922"] .tn-atom {
  background-color: rgba(30, 30, 30, .72) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
}
/* мобильная плашка тоже стеклянная */
#z957171471 .tn-elem[data-elem-id="1744327014186"] { transition: opacity .35s ease !important; }
#z957171471 .tn-elem[data-elem-id="1744327014186"] .tn-atom {
  background-color: rgba(30, 30, 30, .78) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

/* ссылки десктоп-меню: линия из центра, текущая страница — оранжевым */
#z957171471 a.nav-link {
  position: relative; display: inline-block;
  transition: color .25s ease;
}
#z957171471 a.nav-link::after {
  content: ''; position: absolute; left: 50%; right: 50%; bottom: -5px; height: 2px;
  background: var(--accent); border-radius: 2px;
  transition: left .35s var(--ease-out), right .35s var(--ease-out);
}
#z957171471 a.nav-link:hover::after, #z957171471 a.nav-link.is-current::after { left: 0; right: 0; }
#z957171471 a.is-current { color: var(--accent) !important; }
#z957171471 .tn-elem[data-elem-id^="17413089206"] .tn-atom:hover { opacity: 1 !important; }

/* иконки шапки: лёгкий отклик */
#z957171471 .tn-elem[data-elem-type="image"] .tn-atom,
#z957171471 .tn-elem[data-elem-type="vector"] .tn-atom { transition: transform .3s var(--ease-out); }
@media (hover: hover) {
  #z957171471 .tn-elem[data-elem-type="image"]:hover .tn-atom,
  #z957171471 .tn-elem[data-elem-type="vector"]:hover .tn-atom { transform: scale(1.1); }
}

/* мобильное меню: мягче выезд и ссылки «лесенкой» */
#z957171471 .tn-elem[data-elem-id="1737288612828"], #z957171471 .tn-elem[data-elem-id="1737287940938"],
#z957171471 .tn-elem[data-elem-id="1737286362856"], #z957171471 .tn-elem[data-elem-id="1737292611526"],
#z957171471 .tn-elem[data-elem-id="1737289813720"], #z957171471 .tn-elem[data-elem-id="1737287458620"],
#z957171471 .tn-elem[data-elem-id="1737287520284"], #z957171471 .tn-elem[data-elem-id="1737287539332"],
#z957171471 .tn-elem[data-elem-id="1745224160471"], #z957171471 .tn-elem[data-elem-id="1737287550105"],
#z957171471 .tn-elem[data-elem-id="1741308419371"], #z957171471 .tn-elem[data-elem-id="1741308434545"] {
  transition: transform .55s var(--ease-io) !important;
}
#z957171471.menu-open .tn-elem[data-elem-id="1737287458620"] { transition-delay: .10s !important; }
#z957171471.menu-open .tn-elem[data-elem-id="1737287520284"] { transition-delay: .15s !important; }
#z957171471.menu-open .tn-elem[data-elem-id="1745224160471"] { transition-delay: .20s !important; }
#z957171471.menu-open .tn-elem[data-elem-id="1737287539332"] { transition-delay: .25s !important; }
#z957171471.menu-open .tn-elem[data-elem-id="1737287550105"] { transition-delay: .30s !important; }
#z957171471.menu-open .tn-elem[data-elem-id="1737289813720"] { transition-delay: .36s !important; }
#z957171471 .tn-elem[data-elem-id="1737286932075"], #z957171471 .tn-elem[data-elem-id="1737286971066"] {
  transition: transform .45s var(--ease-out) !important;
}

/* ============================================================
   6. КНОПКИ С ЖЁСТКОЙ ТЕНЬЮ И ДРУГИЕ КНОПКИ
   ============================================================ */

.tn-elem[data-elem-type="button"] .tn-atom { position: relative; overflow: hidden; isolation: isolate; }
.tn-elem[data-elem-type="button"] .tn-atom::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -75%; width: 50%; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
}
@media (hover: hover) {
  .tn-elem[data-elem-type="button"]:hover .tn-atom::after { left: 130%; transition: left .8s var(--ease-out); }
  .press-btn:not(.pressed):hover { translate: -2px -2px; }
  .press-shadow { transition: transform .2s ease-out, translate .25s var(--ease-out); }
}
.press-btn { transition: transform .2s ease-out, translate .25s var(--ease-out), opacity .9s var(--ease-out); }

/* ============================================================
   7. ФОТО: события, фотоотчёты, коллаж
   ============================================================ */

.marquee-card .tn-atom { transition: filter .5s ease, transform .7s var(--ease-out); }
@media (hover: hover) {
  .zb:has(.marquee-card:hover) .marquee-card { animation-play-state: paused; }
  .marquee-card:hover .tn-atom { transform: scale(1.04); filter: brightness(1.1) saturate(1.15); }
  .zoomable .tn-atom { transition: filter .5s ease, transform .7s var(--ease-out); }
  .zoomable:hover .tn-atom { filter: brightness(1.08) saturate(1.1); transform: scale(1.025); }
}

/* подвал: подчёркивание ссылок */
#z852892544 .tn-atom a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease-out), color .25s;
  padding-bottom: 2px;
}
#z852892544 .tn-atom a:hover { background-size: 100% 1px; color: var(--accent) !important; }

/* выделение текста в фирменном цвете */
::selection { background: var(--accent); color: #fff; }

/* ============================================================
   8. КУРСОР (только мышь)
   ============================================================ */

.cur-ring, .cur-dot { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .3s, scale .2s var(--ease-out); }
.cur-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid rgba(255, 255, 255, .7);
  mix-blend-mode: difference;
}
.cur-ring i { position: absolute; inset: -1.5px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .35s var(--ease-out); }
.cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
html.cur-on .cur-ring, html.cur-on .cur-dot { opacity: 1; }
html.cur-link .cur-ring i { transform: scale(1); }
html.cur-link .cur-dot { opacity: 0; }
html.cur-down .cur-ring { scale: .8; }
html.cur-native .cur-ring, html.cur-native .cur-dot { opacity: 0 !important; }
html.has-cur:not(.cur-native), html.has-cur:not(.cur-native) * { cursor: none !important; }

/* ============================================================
   9. ВХОД СТРАНИЦЫ «ДОСТАВКА»
   ============================================================ */

html.js .menu-title span,
html.js .menu-status,
html.js .menu-search,
html.js .menu-cats { transition: opacity .8s var(--ease-out), translate 1s var(--ease-out); }
html.js:not(.is-ready) .menu-title span { opacity: 0; translate: 0 .6em; }
html.js:not(.is-ready) .menu-status,
html.js:not(.is-ready) .menu-search,
html.js:not(.is-ready) .menu-cats { opacity: 0; translate: 0 20px; }
html.js .menu-title span + span { transition-delay: .08s; }
html.js .menu-status { transition-delay: .18s; }
html.js .menu-search { transition-delay: .24s; }
html.js .menu-cats { transition-delay: .3s; }
html.is-ready .menu-cats { transition: none; }

/* текст политики */
html.js .text-wrap { transition: opacity .9s var(--ease-out), translate 1s var(--ease-out); }
html.js:not(.is-ready) .text-wrap { opacity: 0; translate: 0 24px; }

/* ============================================================
   10. МЕНЬШЕ ДВИЖЕНИЯ
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .rv, .rv-up, .rv-img, .rv-fade, .rv-blur { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; }
  .wi { transform: none !important; }
  body::after { display: none; }
  #preloader .preloader-icon, .pl-orbit { animation: none; }
  html.js:not(.is-ready) .menu-title span, html.js:not(.is-ready) .menu-status,
  html.js:not(.is-ready) .menu-search, html.js:not(.is-ready) .menu-cats,
  html.js:not(.is-ready) .text-wrap { opacity: 1; translate: none; }
}

/* иконки шапки (с 02.12): сумка, дисковый телефон, силуэт в арке — assets/img/icon-*.svg.
   Счётчик корзины опущен внутрь сумки (у прежней тележки он стоял сверху) */
#z957171471 .tn-elem[data-elem-id="1750753899183"] .tn-atom { translate: 0 64%; font-weight: 600; }
/* на телефоне блок кабинета в макете крупнее соседних (32 против 26) — выравниваем видимый размер */
@media (max-width: 479px) { #z957171471 .tn-elem[data-elem-id="1779927230246000001"] svg { transform: scale(.82); } }
