/* ============================================================
   СВЕТЛАНА — landing page
   Figma zyyU6VWhg9nKQw0lFlFmfw, node 368:1249 «🌐 Website»
   ============================================================ */

/* Vilnius (проект Ponomar, SIL OFL 1.1) — заменил Yauza TYGRA, как в приложении */
@font-face {
  font-family: "Vilnius";
  src: url("assets/fonts/Vilnius-Regular.woff") format("woff");
  font-weight: normal;
  font-display: swap;
}

:root {
  --display: "Vilnius", "Times New Roman", serif;
  --body: "Manrope", system-ui, -apple-system, sans-serif;
  --white: #ffffff;
  --white-50: rgba(255, 255, 255, 0.5);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --maxw: 1440px;
  --gutter: 120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--white);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  /* Сплошной фолбэк-цвет; сам градиент рисует фиксированный слой .bg ниже.
     Раньше градиент висел на body c background-attachment: fixed + отдельный
     fixed-слой с mix-blend-mode — браузер перерисовывал весь экран на каждый
     кадр скролла (главный источник «лагов»). */
  background-color: #90435b;
}

/* Весь фон (градиент из макета + иконопись hard-light 23%) — один фиксированный
   слой. isolation замыкает blend внутри слоя: браузер компонует его единожды
   и при скролле просто двигает контент поверх, без перерисовок. */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  isolation: isolate;
  pointer-events: none;
  transform: translateZ(0);
  /* Радиальный тёплый градиент из макета (Main @ Desktop):
     пурпур по краям → янтарь в центре → бордовый снизу. */
  background:
    radial-gradient(125% 85% at 50% 40%,
      #f47f39 0%,
      #ce7146 24%,
      #a86252 40%,
      #90435b 58%,
      #6a4c68 78%,
      #5b456b 100%);
}
.bg__image {
  position: absolute;
  inset: 0;
  background: url("assets/img/bg-overlay.webp") center top / cover no-repeat;
  mix-blend-mode: hard-light;
  opacity: 0.23;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
}

img { display: block; max-width: 100%; }

/* ---------------------------- Logo ---------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10.56px;
  text-decoration: none;
  color: var(--white);
}
.logo__mark { width: 44px; height: 44px; }
.logo__word {
  font-family: var(--display);
  font-size: 28.16px;
  line-height: 1.4;
  white-space: nowrap;
}

/* ---------------------------- Hero ---------------------------- */
.hero {
  min-height: 900px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 24px var(--gutter);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 24px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav__item:hover { opacity: 0.75; }
.nav__chevron { width: 20px; height: 20px; }

.stores {
  display: flex;
  align-items: center;
  gap: 7px;
}
.stores__badge img { height: 44px; width: auto; }
.stores__badge { transition: transform 0.2s, opacity 0.2s; }
.stores__badge:hover { transform: translateY(-1px); opacity: 0.9; }

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 48px 0;
  text-align: center;
}
.hero__title { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero__eyebrow {
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  mix-blend-mode: overlay;
}
.hero__headline {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 1.4;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
}

/* ----------------------- Glass CTA button --------------------- */
.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 80px;
  min-width: 256px;
  padding: 0 86px;
  border: 2.02px solid var(--white);
  border-radius: 26px;
  background: var(--glass);
  color: var(--white);
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 84.9px 216px rgba(255, 89, 0, 0.34),
    0 50px 65px rgba(255, 89, 0, 0.19),
    0 20.75px 27px rgba(255, 89, 0, 0.22),
    0 7.5px 9.8px rgba(255, 89, 0, 0.15),
    inset 0 2px 36px #ffeddb,
    inset 0 2px 8px #ffeddb;
  transition: transform 0.2s;
}
.btn-glow:hover { transform: translateY(-2px); }
.btn-glow__icon { width: 24px; height: 24px; }

/* -------------------------- Features -------------------------- */
.features {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 48px var(--gutter);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
}
.section-title__text {
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}
.section-title__orn {
  flex: 1;
  height: 75px;
  object-fit: contain;
  mix-blend-mode: soft-light;
}
.section-title__orn--left { transform: scaleX(-1); }

/* Карусель «как на Praymory»: лента из полноширинных слайдов-блоков на
   нативном горизонтальном скролле со scroll-snap — свайп на тач-экранах
   работает без JS, слайды физически едут за пальцем. */
.carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}
.carousel__track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; /* свайп у края не дёргает страницу/историю */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }

.feature {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always; /* один жест — один слайд, без пролистывания пачкой */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 120px;
  padding: 24px 0;
}
.feature__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 500px;
  max-width: 100%;
  text-align: center;
}
.feature__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.4;
  text-transform: uppercase;
}
.feature__desc {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--glass-strong);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.25);
  color: var(--white);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
.pill:hover { background: rgba(255, 255, 255, 0.3); }

/* Телефон: фиксируем бокс через aspect-ratio (600×1244), чтобы при смене src
   ничего не прыгало, пока новый кадр не декодирован. */
.feature__phone { position: relative; }
.feature__phone img {
  position: relative;
  height: 622px;
  width: auto;
  aspect-ratio: 600 / 1244;
  transition: opacity 0.45s ease;
}
/* Blur-up: пока WebP качается, под картинкой — размытое крошечное превью. */
.feature__phone-ph {
  position: absolute;
  inset: 0;
  background: center / contain no-repeat;
  filter: blur(16px) saturate(1.05);
  transform: scale(0.99);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.feature__phone.is-loading img { opacity: 0; }
.feature__phone.is-loading .feature__phone-ph { opacity: 1; }

.carousel-nav {
  display: flex;
  align-items: center;
  gap: 48px;
}
.carousel-nav__arrow {
  width: 48px;
  height: 48px;
  border: none;
  background: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.carousel-nav__arrow:hover:not(:disabled) { transform: scale(1.08); }
.carousel-nav__arrow:disabled { opacity: 0.35; cursor: default; }
.carousel-nav__counter { font-weight: 700; font-size: 16px; }

/* --------------------------- Footer --------------------------- */
.footer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 48px var(--gutter);
  overflow: hidden;
}
.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 400px;
  max-width: 100%;
}
.footer__about {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--white-50);
}
.footer__links { display: flex; gap: 48px; }
.footer__col { display: flex; flex-direction: column; gap: 24px; }
.footer__col-title { font-weight: 700; font-size: 16px; }
.footer__col a {
  font-weight: 400;
  font-size: 16px;
  color: var(--white-50);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.footer__col a:hover { color: var(--white); }

.footer__rule {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  mix-blend-mode: soft-light;
}
.footer__rule-line { flex: 1; height: 4px; background: currentColor; opacity: 0.6; }

.footer__copy { font-size: 16px; color: var(--white-50); position: relative; z-index: 1; }

/* Гигантская «СВЕТЛАНА» — отдельная полоса ВНИЗУ футера, как в макете
   (node 391:1801): идёт ПОСЛЕ копирайта с зазором, а буквы обрезаны по
   высоте полосы (0.83em ≈ 195px при 234px). Раньше знак был absolute и
   поднимался под колонки — разделительная линия проходила по буквам,
   читалось как «зачёркнутая СВЕТЛАНА». */
.footer__watermark {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.83em;
  overflow: hidden;
  /* 48px flex-gap футера + 16px = 64px до копирайта, как в макете;
     нижний паддинг футера съедаем — полоса прижата к краю страницы. */
  margin-top: 16px;
  margin-bottom: -48px;
  font-family: var(--display);
  font-size: 234px;
  line-height: 1.4;
  color: var(--white);
  opacity: 0.1;
  mix-blend-mode: overlay;
  white-space: nowrap;
  pointer-events: none;
}

/* ------------------------ Doc pages --------------------------- */
.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px var(--gutter) 96px;
}
.doc__header { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 48px; }
.doc__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}
.doc__back:hover { opacity: 0.75; }
.doc__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}
.doc__updated { color: var(--white-50); font-size: 14px; margin-bottom: 40px; }
.doc__note {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--glass);
  border-radius: 16px;
  padding: 20px 24px;
  color: var(--white-50);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 40px;
}
.doc h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  text-transform: uppercase;
  margin: 32px 0 12px;
}
.doc p { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); margin-bottom: 12px; }
.doc ul { margin: 0 0 12px; padding-left: 22px; }
.doc li { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); margin-bottom: 6px; }
.doc__meta { color: var(--white-50); font-size: 15px; line-height: 1.5; margin-bottom: 32px; }
.doc__meta a { color: rgba(255, 255, 255, 0.8); }

/* ---------------------- Scroll reveal ------------------------- */
/* Плавное проявление секций при попадании во вьюпорт (JS ставит .is-in). */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Появление hero-блока сразу при загрузке (без ожидания скролла). */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.hero__content > * {
  animation: hero-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero__content > *:nth-child(2) { animation-delay: 0.12s; }

/* Мягкое «дыхание» свечения CTA-кнопки. */
@keyframes glow-breathe {
  0%, 100% { box-shadow:
    0 84.9px 216px rgba(255, 89, 0, 0.34),
    0 50px 65px rgba(255, 89, 0, 0.19),
    0 20.75px 27px rgba(255, 89, 0, 0.22),
    0 7.5px 9.8px rgba(255, 89, 0, 0.15),
    inset 0 2px 36px #ffeddb, inset 0 2px 8px #ffeddb; }
  50% { box-shadow:
    0 90px 230px rgba(255, 89, 0, 0.42),
    0 54px 70px rgba(255, 89, 0, 0.24),
    0 22px 30px rgba(255, 89, 0, 0.26),
    0 8px 11px rgba(255, 89, 0, 0.18),
    inset 0 2px 40px #fff3e6, inset 0 2px 10px #fff3e6; }
}
.btn-glow { animation: glow-breathe 4.5s ease-in-out infinite; }
.btn-glow:hover { transform: translateY(-2px); animation-play-state: paused; }

/* Уважаем системную настройку «уменьшить движение»: жёстко гасим анимации. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel__track { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__content > *,
  .btn-glow { animation: none; }
}

/* ------------------------- Responsive ------------------------- */
@media (max-width: 1024px) {
  :root { --gutter: 40px; }
  .feature { gap: 48px; }
  .feature__phone img { height: 520px; }
  .footer__watermark { font-size: 160px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .header { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .nav { order: 3; width: 100%; justify-content: center; }
  .hero { min-height: auto; padding-top: 24px; padding-bottom: 64px; }
  .hero__content { padding: 40px 0; }
  .hero__eyebrow { font-size: 22px; }
  .btn-glow { padding: 0 48px; width: 100%; }
  /* Компактная карусель: заголовок секции, телефон, текст и стрелки
     должны помещаться на ОДИН экран телефона — листать можно не только
     свайпом, но и стрелками, не скролля туда-сюда. */
  .features { gap: 20px; padding-top: 32px; padding-bottom: 32px; }
  .carousel { gap: 16px; }
  .feature { flex-direction: column-reverse; gap: 18px; padding: 4px 0; }
  .feature__phone img { height: 340px; }
  .feature__info { gap: 12px; }
  .feature__name { font-size: 26px; }
  .feature__desc { font-size: 15px; line-height: 1.45; }
  .carousel-nav { gap: 32px; }
  .section-title__orn { display: none; }
  .footer__top { flex-direction: column; }
  .footer__links { flex-wrap: wrap; }
  .footer__watermark { font-size: 84px; }
}
