/* ======================================================================
   style.css — базовые стили, компоненты и mobile‑first основа
   ====================================================================== */

/* ========== ШРИФТЫ (начало) ========== */
@font-face {
  font-family: "Literaturnaya-bold";
  src: url("/manager/templates/app/fonts/LiteraturnayaC Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Literaturnaya";
  src: url("/manager/templates/app/fonts/Literaturnaya-med.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MontserratAlternates-Regular";
  src: url("/manager/templates/app/fonts/MontserratAlternates-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MontserratAlternates-Bold";
  src: url("/manager/templates/app/fonts/MontserratAlternates-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
/* ========== ШРИФТЫ (конец) ========== */

/* ========== ПЕРЕМЕННЫЕ/БАЗА (начало) ========== */
:root {
  --bg: #eff2fe;
  --card: #ffffff;
  --text: #1f2633;
  --muted: #5d677a;
  --line: #e7ebf3;
  --accent: #ff7a00;

  --footer-bg: #0f1115;
  --footer-text: #9aa4b2;
  --footer-muted: #6b7280;
  --footer-link: #e5e7eb;
  --footer-link-hover: #ffffff;

  --container: 1140px;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0,0,0,.06);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Literaturnaya", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
}

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

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* Заголовки — отдельный шрифт */
h1, h2, h3, h4, h5, h6 {
  color: #283043;
  font-family: "Literaturnaya-bold", "Literaturnaya", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.2;
}
/* ========== ПЕРЕМЕННЫЕ/БАЗА (конец) ========== */

/* ========== HERO (начало) ========== */
.hero {
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  padding: 24px 0 16px;
}
.hero__inner { text-align: center; }
.hero__logo img { width: clamp(160px, 32vw, 240px); height: auto; margin: 0 auto 10px; }
.hero__title {
  margin: 8px auto 10px;
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 700;
  max-width: 980px;
}
.hero__desc {
  margin: 0 auto 16px;
  color: var(--muted);
  max-width: 900px;
  font-size: clamp(14px, 3.4vw, 18px);
}
.hero__phones { margin: 12px auto 12px; }
.store-badges {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: center;
  margin: 4px auto 0;
}
.store-badges img {
  width: clamp(160px, 36vw, 220px);
  height: auto;
border: 2px solid #eaeef6;
    border-color: #fff;
    border-radius: 10px;
    box-shadow: 0px 3px 11px rgb(0 0 0 / 72%);
    transition: transform .15s ease, box-shadow .2s ease;
}
.store-badges img:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.1); }
/* ========== HERO (конец) ========== */

/* ========== ОБЩИЕ СЕКЦИИ (начало) ========== */
.section { 
padding: 28px 0;
background-color: white; 
}
.section__title {
  margin: 0 0 14px;
  text-align: center;
  font-size: clamp(22px, 4.6vw, 32px);
  font-weight: 800;
}
.section__lead {
  margin: 0 auto;
  max-width: 900px;
  text-align: center;
  color: var(--muted);
  font-size: clamp(14px, 3.6vw, 18px);
}
/* ========== ОБЩИЕ СЕКЦИИ (конец) ========== */

/* ========== HOWWORKS (начало) ========== */
.howworks { padding: 36px 0; background: #eff1fe; }
.howworks__title {
  margin: 0 0 18px; text-align: center;
  font-size: clamp(20px, 4.2vw, 32px); font-weight: 800;
}
.howworks__list { list-style: none; margin: 0; padding: 0; }
.howworks__item {
  background: var(--card);
  border: 1px solid #eaeef6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 12px;
  scroll-snap-align: start;
}
.howworks__media {
  height: 240px;
  display: grid; place-items: center;
  background: #f1f4fb; border: 1px solid #eaeef6; border-radius: 12px; overflow: hidden;
}
@media (min-width: 480px) { .howworks__media { height: 260px; } }
@media (min-width: 768px) { .howworks__media { height: 300px; } }
@media (min-width: 1024px){ .howworks__media { height: 340px; } }
.howworks__media img { max-height: 70%; max-width: 70%; object-fit: contain; }
.howworks__heading { margin: 2px 0 6px; font-size: 18px; font-weight: 750; }
.howworks__text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Мобильная карусель */
.howworks--carousel .howworks__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 16px;
  overflow-x: auto;
  padding: 4px;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 4px;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 420px) {
  .howworks--carousel .howworks__list { grid-auto-columns: 78%; }
}
.howworks--carousel .howworks__list { scrollbar-width: none; }
.howworks--carousel .howworks__list::-webkit-scrollbar { display: none; }

/* ========== Общие точки пагинации для обеих каруселей ========== */
.howworks__dots,
.howto__dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}
.howworks__dots button,
.howto__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #cfd6e5;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.howworks__dots button[aria-current="true"],
.howto__dots button[aria-current="true"] {
  background: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 6px 14px rgba(255,122,0,.28);
}

/* Десктоп: обычная сетка без карусели */
@media (min-width: 900px) {
  .howworks--carousel .howworks__list {
    display: grid;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    overflow: visible;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .howworks__item {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 22px;
  }
  .howworks__item--alt .howworks__media { order: 2; }
}
/* ========== HOWWORKS (конец) ========== */

/* ========== ВИДЕО (начало) ========== */
.video {
background-color: white;
 padding: 18px 0;
 }
.vk-inline {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0; border-radius: 16px;
  overflow: hidden; box-shadow: 0 12px 36px rgba(0,0,0,.12);
}
/* ========== ВИДЕО (конец) ========== */

/* ========== ИНСТРУКЦИЯ (начало) ========== */
.howto { padding: 28px 0; background: #eff1fe; }
.howto__title {
  margin: 0 0 18px; text-align: center;
  font-size: clamp(20px, 4.2vw, 32px); font-weight: 800;
}
.howto__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.howto__item {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  background: var(--card); border: 1px solid #eaeef6; border-radius: 16px; box-shadow: var(--shadow);
  padding: 22px; align-items: center;
}
.howto__item--alt .howto__media { order: -1; }

.howto__media {
  height: 260px; display: grid; place-items: center;
  background: #f1f4fb; border: 1px solid #eaeef6; border-radius: 12px; overflow: hidden;
}
.howto__media img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }

.howto__heading {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 0 10px; font-size: 20px; font-weight: 750;
}
.howto__num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ffad42);
  color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 6px 14px rgba(255,122,0,.28);
}
.howto__bullets { margin: 0; padding-left: 18px; color: var(--muted); font-size: 16px; }
.howto__bullets li { margin: 6px 0; }

/* На десктопе — две колонки и чередование */
@media (min-width: 900px) {
  .howto__item { grid-template-columns: 1.1fr 0.9fr; gap: 24px; padding: 28px; }
  .howto__item--alt .howto__media { order: 2; }
}
/* ========== ИНСТРУКЦИЯ (конец) ========== */

/* ========== FAQ (начало) ========== */
.faq {
background-color: white;
 padding: 28px 0; 
}
.faq__item {
  border-top: 1px solid #e0e0e0;
  margin: 0 auto 10px; padding: 16px 0;
  max-width: 900px;
}
.faq__q {
  font-weight: 700; cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "⌄"; font-weight: 400; margin-left: 8px; transition: transform .2s ease; opacity: .75;
}
details[open] .faq__q::after { transform: rotate(180deg); }
.faq__a { margin-top: 8px; color: #555; line-height: 1.6; font-size: 16px; }
/* ========== FAQ (конец) ========== */

/* ========== CTA (начало) ========== */
.cta { padding: 28px 0 36px; background: var(--bg); }
.cta__title {
  margin: 0 0 12px; text-align: center;
  font-size: clamp(20px, 4.4vw, 28px); font-weight: 800;
}
/* ========== CTA (конец) ========== */

/* ========== FOOTER (начало) ========== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 20px 0;
}
.footer-top { display: grid; gap: 8px; margin-bottom: 8px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.footer-links a { color: var(--footer-link); text-decoration: none; }
.footer-links a:hover { color: var(--footer-link-hover); text-decoration: underline; }
.footer-links a + a::before { content: "•"; color: var(--footer-muted); margin: 0 10px 0 0; }
.footer-notes { color: var(--footer-muted); font-size: 12px; }
/* ========== FOOTER (конец) ========== */

/* ========== МОДАЛ + ЗУМ (начало) ========== */
:root { --modal-bg: #ffffff; --modal-fg: #0f172a; --modal-border: #e5e7eb; --backdrop: rgba(15,18,24,.6); }
@media (prefers-color-scheme: dark) {
  :root { --modal-bg: #0b0f14; --modal-fg: #e5e7eb; --modal-border: #1f2937; --backdrop: rgba(0,0,0,.7); }
}
html.howto-lock, body.howto-lock { overflow: hidden; }

.modal {
  width: min(820px, 96vw); padding: 0; margin: 0 auto;
  border: 0; border-radius: 12px; overflow: hidden;
  background: var(--modal-bg); color: var(--modal-fg);
}
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--modal-border); position: sticky; top: 0; background: var(--modal-bg);
}
.modal__head h3 { font: 600 16px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; }
.modal__close {
  appearance: none; border: 0; background: transparent; color: inherit;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.modal__close:hover { background: rgba(127,127,127,.12); }

.howto-zoom {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 4vmin;
  background: rgba(15,20,30,.76); backdrop-filter: blur(2px);
  z-index: 9999; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.howto-zoom.is-open { opacity: 1; visibility: visible; }
.howto-zoom__img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.35);
  transform: scale(.98); transition: transform .2s ease; cursor: zoom-out;
}
.howto-zoom.is-open .howto-zoom__img { transform: scale(1); }
.howto-zoom__close {
  position: fixed; top: 14px; right: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(20,24,32,.45); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(6px);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.howto-zoom__close:hover { transform: scale(1.05); background: rgba(20,24,32,.6); border-color: rgba(255,255,255,.6); }
/* ========== МОДАЛ + ЗУМ (конец) ========== */

/* ========== ПРЕДПОЧТЕНИЕ ПОЛЬЗОВАТЕЛЯ (уменьшение анимаций) ========== */
@media (prefers-reduced-motion: reduce) {
  .howworks__dots button,
  .howto__dots button { transition: none; }
  .howworks--carousel .howworks__list { scroll-behavior: auto; }
}



/* ===== Новый футер ===== */
.site-footer.sf {
  position: relative;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 28px 0 26px;
  overflow: hidden;
  font: 14px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Декоративная линия и мягкое свечение акцентом */
.site-footer.sf::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%,
    rgba(255,255,255,.12) 18%, rgba(255,122,0,.45) 50%, rgba(255,255,255,.12) 82%,
    rgba(255,255,255,0) 100%);
  top: 0;
  pointer-events: none;
}
.site-footer.sf::after {
  content: "";
  position: absolute;
  top: -120px; left: 50%;
  width: 720px; height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(60% 60% at 50% 50%, rgba(255,122,0,.16) 0%, rgba(255,122,0,0) 70%);
  pointer-events: none;
}

/* Верхняя зона */
.sf__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 14px;
}

.sf__brand .sf__logo img {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.35));
}
.sf__tag {
  margin: 10px 0 14px;
  color: var(--footer-text);
  opacity: .9;
  max-width: 520px;
}

/* Бейджи в футере — компактнее и без «тяжёлой» тени */
.sf__stores { justify-content: flex-start; margin: 4px 0 0; gap: 10px; }
.sf__stores img {
  width: 176px !important;
  border-radius: 10px;
  border-color: rgba(255,255,255,.18) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.22) !important;
  background: rgba(255,255,255,.02);
}

/* Колонки навигации и контактов */
.sf__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.sf__col {}
.sf__title {
  margin: 0 0 8px;
  color: var(--footer-link-hover);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: none;
}
.sf__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sf__links a {
  color: var(--footer-link);
  text-decoration: none;
}
.sf__links a:hover,
.sf__links a:focus-visible {
  color: var(--footer-link-hover);
  text-decoration: underline;
}

/* Контакты */
.sf__contacts { }
.sf__addr { font-style: normal; color: var(--footer-link); }
.sf__addr a { color: var(--footer-link); text-decoration: none; }
.sf__addr a:hover { color: var(--footer-link-hover); text-decoration: underline; }
.sf__badges-note {
  margin-top: 10px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  color: var(--footer-link);
  background: rgba(255,255,255,.04);
  font-size: 12px;
}

/* Нижняя плашка */
.sf__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sf__copy { color: var(--footer-text); opacity: .95; }
.sf__inline { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px 14px; }
.sf__inline li + li { position: relative; }
.sf__inline li + li::before {
  content: "•"; color: var(--footer-muted);
  margin-right: 10px;
}
.sf__inline a { color: var(--footer-link); text-decoration: none; }
.sf__inline a:hover,
.sf__inline a:focus-visible { color: var(--footer-link-hover); text-decoration: underline; }

/* Примечания */
.sf__notes {
  color: var(--footer-muted);
  font-size: 12px;
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

/* Десктопная раскладка */
@media (min-width: 900px) {
  .sf__top {
    grid-template-columns: 1.2fr .9fr 1fr;
  }
}

/* Видимая фокусировка для доступности */
.site-footer.sf a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 6px;
}



/* ===== VIDEO SECTION (лендинг) ===== */
.video {
  position: relative;
  padding: 36px 0 40px;
 
  border-top: 1px solid rgba(255,255,255,.06);
}

.video::before {
  /* мягкое акцентное свечение за плеером */
  content: "";
  position: absolute;
  left: 50%;
  top: -80px;
  width: 820px;
  height: 280px;
  transform: translateX(-50%);
  background: radial-gradient(60% 60% at 50% 50%, rgba(255,122,0,.12) 0%, rgba(255,122,0,0) 70%);
  pointer-events: none;
}

.video .container {
  display: grid;
  justify-items: center;
  gap: 16px;
}

/* Заголовок секции */
.video .howto__title {
  margin: 0 0 8px;
  text-align: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: .01em;
  position: relative;
}

.video .howto__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: var(--accent, #ff7a00);
  box-shadow: 0 0 0 6px rgba(255,122,0,.08);
}

/* Сам плеер: iframe VK или тег <video> */
.video .vk-inline,
.video video {
  display: block;
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  height: auto;               /* рассчитывается из aspect-ratio */
  border-radius: 16px;
  background: #0b0d11;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 18px 42px rgba(0,0,0,.45),
    0 0 0 6px rgba(255,122,0,.08); /* акцентная «рамка» */
}

/* Для <video> — убрать лишние просветы и задать цвет фона */
.video video {
  outline: none;
  background-color: #0b0d11;
}

/* Фокус и ховер для доступности и интерактива */
.video .vk-inline:focus-visible,
.video video:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 16px;
}

.video .vk-inline:hover,
.video video:hover {
  border-color: rgba(255,255,255,.18);
  box-shadow:
    0 22px 48px rgba(0,0,0,.5),
    0 0 0 8px rgba(255,122,0,.10);
  transition: box-shadow .2s ease, border-color .2s ease;
}

/* Подпись/примечание к видео (если добавите элемент .video__note) */
.video .video__note {
  color: var(--footer-muted, #6b7280);
  font-size: 13px;
  text-align: center;
  max-width: 960px;
}

/* Адаптив: чуть больше отступы и радиус на десктопах */
@media (min-width: 768px) {
  .video { padding: 44px 0 48px; }
  .video .vk-inline,
  .video video { border-radius: 18px; }
}

@media (min-width: 1200px) {
  .video::before {
    width: 980px;
    height: 320px;
  }
}



