/* ===== Термос — главная (потребляет design-system.css) ===== */

/* Lenis (плавный скролл) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

* { box-sizing: border-box; margin: 0; padding: 0; }
body { overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
.section { padding: var(--section-y) 0; position: relative; z-index: var(--z-base); }
.section--alt { background: var(--bg-2); }
/* амбиентные свечения — фон, который «ловит» матовое стекло карточек.
   Заметные, чтобы стекло читалось на белом. */
.section::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 55% at 14% 12%, rgba(255,107,0,0.16), transparent 62%),
    radial-gradient(40% 55% at 90% 85%, rgba(77,159,255,0.12), transparent 64%);
}
.section--alt::before {
  background:
    radial-gradient(46% 60% at 88% 10%, rgba(255,107,0,0.18), transparent 62%),
    radial-gradient(48% 62% at 6% 92%, rgba(77,159,255,0.14), transparent 64%);
}
.section__head { max-width: 760px; margin: 0 auto var(--space-7); text-align: center; }
.section__head .eyebrow { margin-bottom: 14px; }
.section__title { font-family: var(--font-display); font-weight: 800; letter-spacing: var(--tracking-tight);
  font-size: var(--fs-h2); line-height: var(--lh-snug); }
.section__sub { color: var(--text-dim); font-size: var(--fs-lg); margin-top: 14px; }

/* ===== background layers (частицы остаются) =====
   Частицы лежат ВЫШЕ видео-героя (видео z:1), но ниже контента секций (они
   рисуются позже по DOM при равном z) → точки летают поверх видео в любом
   браузере, даже если прозрачность webm не композится. */
#bg-particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.bg-glow {
  position: fixed; top: -22%; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 1100px; max-width: 100vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(40px); opacity: 0.22; z-index: var(--z-bg); pointer-events: none;
}
main, .site-header { position: relative; z-index: var(--z-base); }

/* ===== header ===== */
/* шапка — плавающий матовый «остров» в стиле футера (iPhone-glass) */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--maxw); margin: 14px auto 0; padding: 14px 22px;
  position: sticky; top: 14px; z-index: var(--z-header);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--radius-lg);
  /* clip-path обрезает backdrop-filter по скруглению (иначе квадратный ореол) */
  clip-path: inset(0 round var(--radius-lg));
  box-shadow: 0 18px 50px -26px rgba(15,20,30,0.22),
              inset 0 1px 0 rgba(255,255,255,0.95);
  overflow: hidden;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 180% at 85% 0%, rgba(255,107,0,0.16), transparent 60%),
    radial-gradient(50% 160% at 10% 100%, rgba(77,159,255,0.12), transparent 62%);
}
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand-dot { color: var(--accent); }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--text-dim); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; transition: color var(--dur-fast); }
.nav a:hover { color: var(--text); }
.nav-cta { padding: 11px 20px; font-size: 0.9rem; }
.nav__cta-mobile { display: none; }

/* бургер */
.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px; background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 12px; cursor: pointer; z-index: calc(var(--z-overlay) + 1); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast); }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== hero (видео во весь экран; текст-оверлей слева; без скролла) ===== */
.hero { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; overflow: hidden; }
/* видео-вырез (RGB на белом + альфа) — в самом низу (z:0).
   Где альфа работает — сквозь вырез видно белый фон+свечения; где нет — белый.
   Чёрного нет никогда. */
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; object-position: center right; }
/* лёгкая белая подложка слева под текст — НИЖЕ частиц (z:1), чтобы точки были видны поверх */
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.22) 30%, rgba(255,255,255,0) 50%); }
.hero__inner { position: relative; z-index: 4; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: 40px var(--gutter); }
.hero__content { position: relative; z-index: 4; max-width: 600px; }
.hero__eyebrow { display: inline-block; padding: 6px 14px; margin-bottom: 18px;
  border: 1px solid var(--surface-border); border-radius: var(--radius-pill); background: var(--surface);
  color: var(--text-dim); font-size: var(--fs-eyebrow); font-weight: 500; }
.hero__title { font-family: var(--font-display); font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  line-height: 1.06; font-weight: 800; letter-spacing: var(--tracking-tight); margin-bottom: 20px; }
.accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__lead { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 700; color: var(--accent); line-height: 1.2; margin: 0 0 14px; max-width: 540px; }
.hero__subtitle { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--text-dim); max-width: 480px; margin: 0 0 28px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 800;
  color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: var(--fs-sm); color: var(--text-dim); max-width: 150px; }

/* ===== метафора «Термос» ===== */
.meta { text-align: center; }
.meta__title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h2); letter-spacing: var(--tracking-tight); margin-bottom: 18px; }
.meta__text { max-width: 720px; margin: 0 auto 16px; color: var(--text-dim); font-size: var(--fs-lg); }
.meta__text b { color: var(--text); }
.meta__points { max-width: 760px; margin: 24px auto 0; list-style: none; display: grid; gap: 12px; text-align: left; }
.meta__points li { position: relative; padding: 16px 18px 16px 46px; border-radius: var(--radius);
  background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 24px -16px rgba(15,20,30,0.18); color: var(--text-dim); font-size: var(--fs-base); }
.meta__points li::before { content: ''; position: absolute; left: 18px; top: 22px;
  width: 12px; height: 12px; border-radius: 4px; background: var(--accent-grad); }
.meta__points b { color: var(--text); }

/* ===== сетки карточек ===== */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-grad);
  display: grid; place-items: center; color: var(--on-accent); font-weight: 800; margin-bottom: 16px; }
.card__title { font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.card__text { color: var(--text-dim); font-size: var(--fs-base); }
.card__price { margin-top: 14px; font-weight: 700; color: var(--accent); }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--text);
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.card__link:hover { color: var(--accent); }

/* ===== метод (фичи) ===== */
.feature { text-align: left; }
.feature__num { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 1.6rem; margin-bottom: 10px; }

/* ===== кейсы ===== */
.case__metric { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 2rem; letter-spacing: -0.02em; }
.case__name { font-weight: 700; margin: 6px 0 6px; }
.case__text { color: var(--text-dim); font-size: var(--fs-sm); }

/* ===== CTA-полоса ===== */
.cta-band { text-align: center; background: var(--accent-grad); border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px); color: var(--on-accent); }
.cta-band h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h2); margin-bottom: 12px; color: #1a0d00; }
.cta-band p { color: #3a1f00; margin-bottom: 24px; font-size: var(--fs-lg); }
.btn--onaccent { background: #14161c; color: #fff; }
.btn--onaccent:hover { transform: translateY(-2px); }

/* ===== процесс (таймлайн) ===== */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.timeline__item { position: relative; padding-top: 18px; border-top: 2px solid var(--accent); }
.timeline__day { font-family: var(--font-display); font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.timeline__title { font-weight: 700; margin-bottom: 6px; }
.timeline__text { color: var(--text-dim); font-size: var(--fs-sm); }

/* ===== отзывы ===== */
.review__stars { color: var(--accent); margin-bottom: 10px; letter-spacing: 2px; }
.review__text { font-size: var(--fs-base); margin-bottom: 14px; }
.review__author { color: var(--text-dim); font-size: var(--fs-sm); font-weight: 600; }

/* ===== об агентстве (E-E-A-T) ===== */
.about__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.about__media { position: relative; }
.about__img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.75);
  background: linear-gradient(135deg, rgba(255,107,0,0.14), rgba(77,159,255,0.12));
  box-shadow: 0 30px 70px -34px rgba(15,20,30,0.4), inset 0 1px 0 rgba(255,255,255,0.8); }
.about__head { max-width: none; margin: 0 0 18px; text-align: left; }
.about__head .eyebrow { margin-bottom: 12px; }
.about__text { color: var(--text-dim); font-size: var(--fs-lg); margin-bottom: 22px; }
.about__text b { color: var(--text); }
.about__points { list-style: none; display: grid; gap: 12px; }
.about__points li { position: relative; padding-left: 30px; color: var(--text-dim); font-size: var(--fs-base); }
.about__points li::before { content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 800; }
.about__points b { color: var(--text); }

/* ===== FAQ ===== */
.faq { max-width: 800px; margin: 0 auto; }
.faq__item { border: 1px solid rgba(255,255,255,0.65); border-radius: var(--radius);
  background: rgba(255,255,255,0.55); backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 8px 28px -14px rgba(15,20,30,0.16), inset 0 1px 0 rgba(255,255,255,0.85);
  margin-bottom: 12px; overflow: hidden; }
.faq__item summary { cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 16px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; color: var(--accent); font-size: 1.4rem; transition: transform var(--dur-fast); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item .faq__a { padding: 0 22px 20px; color: var(--text-dim); }

/* ===== финальный CTA + форма ===== */
.lead { max-width: 560px; margin: 0 auto; text-align: center; }
.lead__form { display: flex; gap: 10px; margin-top: 22px; }
.lead__form .input { flex: 1; }
.lead__note { margin-top: 12px; color: var(--text-muted); font-size: var(--fs-sm); }

/* ===== footer (iPhone-glass) ===== */
.site-footer {
  position: relative; z-index: var(--z-base);
  margin-top: var(--space-6);
  padding: var(--space-8) 0 var(--space-6);
  background: rgba(245,246,249,0.6);
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  border-top: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  /* clip-path обрезает и backdrop-filter по скруглению (иначе размытие даёт
     квадратный ореол поверх углов) */
  clip-path: inset(0 round var(--radius-lg) var(--radius-lg) 0 0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95),
              0 -18px 50px -24px rgba(15,20,30,0.18);
  overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 150% at 82% 0%, rgba(255,107,0,0.2), transparent 58%),
    radial-gradient(54% 130% at 8% 100%, rgba(77,159,255,0.14), transparent 60%);
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.footer__brand { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.footer__brand span { color: var(--accent); }
.footer__desc { color: var(--text-dim); font-size: var(--fs-sm); margin-top: 10px; max-width: 320px; }
.footer h4 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 12px; }
.footer a { display: block; color: var(--text-dim); text-decoration: none; font-size: var(--fs-base); margin-bottom: 8px; }
.footer a:hover { color: var(--accent); }
.footer__bottom { max-width: var(--maxw); margin: var(--space-6) auto 0; padding: 18px var(--gutter) 0; border-top: 1px solid var(--surface-border); color: var(--text-muted); font-size: var(--fs-sm); }

/* ===== адаптив ===== */
@media (max-width: 900px) {
  /* hero: на мобиле видео — контейнером сверху (full-bleed только на ПК) */
  .hero { min-height: auto; display: block; padding: 88px 0 32px; overflow: visible; }
  .hero::after { display: none; }
  .hero__media { position: relative; inset: auto; max-width: 480px; margin: 0 auto 12px; }
  .hero__video { height: auto; aspect-ratio: 16/9; object-fit: contain; }
  .hero__inner { padding: 0 var(--gutter); }
  .hero__content { max-width: none; }
  .grid--3, .timeline { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .about__grid { grid-template-columns: 1fr; gap: 28px; }
  .about__media { max-width: 440px; margin: 0 auto; }
  .about__head, .about__text { text-align: left; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  /* при открытом меню снимаем clip-path/overflow с шапки: иначе они
     обрезают position:fixed-панель меню по маленькому «острову» (~100px),
     и пункты уходят за пределы видимого фона */
  body.menu-open .site-header { overflow: visible; clip-path: none; }
  /* полноэкранная панель меню: фикс. позиционирование, фон на всю высоту,
     вертикальный список всех пунктов со скроллом при нехватке высоты */
  .nav { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
    z-index: var(--z-overlay); display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; padding: 88px 20px 40px; overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none;
    transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out); }
  .nav a { font-size: 1.4rem; padding: 12px 16px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
  .nav__cta-mobile { display: inline-flex; margin-top: 8px; }
  body.menu-open #nav-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; min-height: 50px; }
  .grid--3, .grid--2, .timeline, .footer__grid { grid-template-columns: 1fr; }
  .lead__form { flex-direction: column; }
}
