/*
 * LandingPage.css — глобальные стили для нового glassmorphism-лендинга бьютибука.
 * Все классы префиксованы .landing-root, чтобы не протекать в остальное приложение.
 */

.landing-root {
  /* oklch с rgb-fallback для iOS<16.4 / Chrome<111 (~5-10% RU аудитории) */
  --lp-accent: rgb(140, 100, 255);
  --lp-accent: oklch(0.65 0.22 268);
  --lp-cyan: rgb(70, 200, 220);
  --lp-cyan: oklch(0.7 0.22 196);
  --lp-magenta: rgb(220, 100, 200);
  --lp-magenta: oklch(0.78 0.2 322);
  --lp-green: rgb(110, 200, 150);
  --lp-green: oklch(0.78 0.2 145);
  --lp-amber: rgb(220, 180, 100);
  --lp-amber: oklch(0.82 0.16 50);

  /* 14px вместо 22px: ~50 экземпляров Glass со sticky-стекломорфизмом
     создают ровно столько же composite layer'ов с backdrop-filter. GPU-cost
     blur'а растет квадратично от радиуса — 14px дает почти ту же визуальную
     «глубину» при ~2.5× меньшей нагрузке на каждый scroll/animate frame. */
  --lp-blur: 14px;
  --lp-glass-bg: rgba(255, 255, 255, 0.08);
  --lp-glass-bg-intense: rgba(255, 255, 255, 0.128);
  --lp-glass-border: rgba(255, 255, 255, 0.18);

  --lp-font-h: 'Manrope', system-ui, -apple-system, sans-serif;
  --lp-font-b: 'Inter', system-ui, -apple-system, sans-serif;

  font-family: var(--lp-font-b);
  background: #0a0a14;
  color: white;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

.landing-root a {
  color: inherit;
  text-decoration: none;
}

.landing-root section {
  scroll-margin-top: 96px;
}

/* ----------- Buttons ----------- */
.landing-root .btn-primary,
.landing-root .btn-ghost {
  font-family: var(--lp-font-b);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
}

.landing-root .btn-primary {
  background: linear-gradient(135deg, var(--lp-accent), oklch(0.6 0.22 290));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px oklch(0.6 0.22 280 / 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.landing-root .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px oklch(0.6 0.22 280 / 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.landing-root .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.landing-root .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.landing-root .btn-primary:focus-visible,
.landing-root .btn-ghost:focus-visible,
.landing-root a:focus-visible,
.landing-root button:focus-visible {
  outline: 2px solid var(--lp-cyan);
  outline-offset: 2px;
}

/* ----------- Animations ----------- */
@keyframes lp-orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(120px, 60px) scale(1.1); }
  66% { transform: translate(60px, 120px) scale(0.95); }
}
@keyframes lp-orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, 80px) scale(1.15); }
}
@keyframes lp-orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(80px, -60px) scale(1.08); }
  80% { transform: translate(-40px, 40px) scale(0.92); }
}
@keyframes lp-shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ----------- Zoya-в-Telegram: эффект «стриминга» реплики -----------
   Слова проявляются по очереди (animation-delay задаётся инлайн на каждом
   .lp-tg-word), создавая ощущение «Зоя печатает вживую». Каретка мигает,
   пока текст «допечатывается». Без layout shift: слова с самого начала
   занимают своё место (display:inline), меняется только opacity/transform. */
@keyframes lp-tg-word-in {
  from { opacity: 0; filter: blur(2px); transform: translateY(1px); }
  to   { opacity: 1; filter: blur(0);   transform: translateY(0); }
}
@keyframes lp-tg-caret-blink {
  0%, 45%  { opacity: 1; }
  55%, 100% { opacity: 0; }
}
.landing-root .lp-tg-word {
  opacity: 0;
  animation: lp-tg-word-in 0.32s ease-out forwards;
}
.landing-root .lp-tg-caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: text-bottom;
  border-radius: 1px;
  background: oklch(0.82 0.14 245);
  animation: lp-tg-caret-blink 1s step-end infinite;
}

/* ----------- Scrollbar ----------- */
.landing-root ::-webkit-scrollbar { width: 10px; height: 10px; }
.landing-root ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.landing-root ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
.landing-root ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* ----------- Responsive ----------- */
@media (max-width: 1100px) {
  .landing-root .lp-int-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .landing-root .lp-screens-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .landing-root .lp-feat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .landing-root .lp-book-inner-grid {
    grid-template-columns: 184px 1fr !important;
    gap: 16px !important;
  }
}

@media (max-width: 900px) {
  .landing-root {
    --lp-blur: 12px;
  }
  .landing-root .hide-mobile { display: none !important; }
}

/* sr-only: текст остается в DOM (для SEO/a11y), но не виден визуально.
   Используется compact-режимом фичевых секций, чтобы при объединении
   в WhatItDoes-табы сохранить eyebrow + h2 + subtitle для индексации. */
.landing-root .lp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .landing-root .lp-zoya-grid,
  .landing-root .lp-book-grid,
  .landing-root .lp-team-grid,
  .landing-root .lp-cal-grid,
  .landing-root .lp-rem-grid,
  .landing-root .lp-vision-grid,
  .landing-root .lp-hero-grid,
  .landing-root .lp-story-grid,
  .landing-root .lp-cal-features {
    grid-template-columns: 1fr !important;
  }
  .landing-root .lp-hero-grid .lp-hero-visual {
    order: -1;
    max-width: 240px !important;
    margin-bottom: 24px !important;
  }
  .landing-root .lp-book-inner-grid {
    grid-template-columns: 1fr !important;
    justify-items: center;
  }
  .landing-root .lp-book-inner-grid > .lp-book-phone {
    width: 220px;
    max-width: 100%;
  }
  .landing-root .lp-book-inner-grid > .lp-min-zero {
    width: 100%;
  }
  .landing-root .lp-ret-grid,
  .landing-root .lp-forwho-grid,
  .landing-root .lp-demo-grid,
  .landing-root .lp-pricing-grid {
    grid-template-columns: 1fr !important;
  }
  .landing-root .lp-screens-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .landing-root .lp-screens-grid > * {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
  .landing-root .lp-int-grid {
    grid-template-columns: 1fr !important;
  }
  .landing-root .lp-feat-grid {
    grid-template-columns: 1fr !important;
  }
  .landing-root .lp-footer-cta {
    grid-template-columns: 1fr !important;
  }
  .landing-root .lp-footer-cols {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
  /* На мобиле — сплошной фон без тяжелого blur'а */
  .landing-root .lp-glass-mobile-solid {
    background: rgba(20, 18, 30, 0.72) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Отключаем orbs на всех мобилках (а не только до 600px) —
     filter:blur(40px) + infinite animation на position:fixed контейнере
     заставляет браузер перекрашивать полноэкранный composite layer
     каждый кадр; на Android-чипах среднего класса = постоянная нагрузка
     CPU/GPU, устройство греется. До правки порог стоял 600px, что
     покрывало только узкие экраны — большинство Android (720+ px CSS)
     получали orbs и нагрев. См. инцидент 2026-05-20. */
  .landing-root .lp-orb { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-root .lp-orb,
  .landing-root .lp-typing-dot {
    animation: none !important;
  }
  /* Стриминг-реплика Зои: без анимации показываем текст сразу,
     каретку — статичную (не мигает). Никакого скрытого контента. */
  .landing-root .lp-tg-word {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
  }
  .landing-root .lp-tg-caret {
    animation: none !important;
  }
}

/* ----------- Vertical-flow safety ----------- */
.landing-root .lp-min-zero { min-width: 0; }

/* ----------- FAQ hover affordance ----------- */
@media (hover: hover) {
  .landing-root .lp-faq-closed:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
  }
}

/* ----------- SeoLongtail collapse ----------- */
.landing-root .lp-seo-longtail summary {
  cursor: pointer;
  list-style: none;
  outline: none;
}
.landing-root .lp-seo-longtail summary::-webkit-details-marker {
  display: none;
}
.landing-root .lp-seo-longtail summary:focus-visible {
  outline: 2px solid var(--lp-cyan);
  outline-offset: 4px;
  border-radius: 12px;
}

/* Динамический текст и chevron для <details> SEO-блока */
.landing-root .lp-seo-toggle {
  color: rgba(255, 255, 255, 0.7) !important;
}
.landing-root .lp-seo-details:not([open]) .lp-seo-toggle-label::before {
  content: 'развернуть';
  color: inherit;
}
.landing-root .lp-seo-details[open] .lp-seo-toggle-label::before {
  content: 'свернуть';
  color: inherit;
}
.landing-root .lp-seo-toggle-chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 11px;
  line-height: 1;
  color: inherit;
}
.landing-root .lp-seo-details[open] .lp-seo-toggle-chevron {
  transform: rotate(180deg);
}

/*
 * Раскрытый body аккордеона: плотный непрозрачный слой поверх стекла,
 * чтобы текст всегда читался независимо от подсветки orb-ов и tenant-окраски.
 * Внешний <Glass> с overflow:hidden подрежет нижние углы.
 */
.landing-root .lp-seo-details[open] .lp-seo-body {
  background: rgb(14, 12, 22);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.landing-root .lp-seo-body,
.landing-root .lp-seo-body p,
.landing-root .lp-seo-body h2,
.landing-root .lp-seo-body h3 {
  color: rgba(255, 255, 255, 0.94);
}
.landing-root .lp-seo-body h2,
.landing-root .lp-seo-body h3 {
  color: #fff;
}
.landing-root .lp-seo-body p {
  margin: 0 0 14px;
}
.landing-root .lp-seo-body p:last-child {
  margin-bottom: 0;
}
.landing-root .lp-seo-body a:hover {
  color: oklch(0.92 0.14 196);
}

@media (max-width: 600px) {
  .landing-root .lp-seo-body {
    font-size: 15px;
  }
}

/* ----------- Legal page (документы) ----------- */
.landing-root .lp-legal-scope h1,
.landing-root .lp-legal-scope h2,
.landing-root .lp-legal-scope h3,
.landing-root .lp-legal-scope h4,
.landing-root .lp-legal-scope h5 {
  font-family: var(--lp-font-h);
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.25;
}
.landing-root .lp-legal-scope .ant-typography {
  color: rgba(255, 255, 255, 0.86);
}
.landing-root .lp-legal-scope .ant-typography h1.ant-typography,
.landing-root .lp-legal-scope .ant-typography h2.ant-typography,
.landing-root .lp-legal-scope .ant-typography h3.ant-typography,
.landing-root .lp-legal-scope .ant-typography h4.ant-typography,
.landing-root .lp-legal-scope .ant-typography h5.ant-typography,
.landing-root .lp-legal-scope h1.ant-typography,
.landing-root .lp-legal-scope h2.ant-typography,
.landing-root .lp-legal-scope h3.ant-typography,
.landing-root .lp-legal-scope h4.ant-typography,
.landing-root .lp-legal-scope h5.ant-typography {
  color: #fff;
  font-family: var(--lp-font-h);
}
.landing-root .lp-legal-scope h4.ant-typography {
  font-size: 19px;
  margin: 28px 0 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-root .lp-legal-scope h4.ant-typography:first-child,
.landing-root .lp-legal-scope > h4.ant-typography:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.landing-root .lp-legal-scope .ant-typography-paragraph,
.landing-root .lp-legal-scope .ant-typography p,
.landing-root .lp-legal-scope p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.landing-root .lp-legal-scope ul {
  margin: 0 0 16px;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.7;
}
.landing-root .lp-legal-scope li {
  margin-bottom: 6px;
}
.landing-root .lp-legal-scope ul li::marker {
  color: oklch(0.82 0.16 196);
}
.landing-root .lp-legal-scope strong,
.landing-root .lp-legal-scope b {
  color: #fff;
  font-weight: 600;
}
.landing-root .lp-legal-scope a {
  color: oklch(0.85 0.16 196);
  text-decoration: underline;
  text-decoration-color: oklch(0.85 0.16 196 / 0.4);
  text-underline-offset: 3px;
}
.landing-root .lp-legal-scope a:hover {
  color: oklch(0.92 0.14 196);
  text-decoration-color: currentColor;
}
.landing-root .lp-legal-scope .ant-divider {
  border-top-color: rgba(255, 255, 255, 0.1);
  margin: 24px 0;
}

@media (max-width: 600px) {
  .landing-root .lp-legal-scope h4.ant-typography {
    font-size: 17px;
    margin: 22px 0 10px;
  }
  .landing-root .lp-legal-scope .ant-typography-paragraph,
  .landing-root .lp-legal-scope p,
  .landing-root .lp-legal-scope ul {
    font-size: 14.5px;
  }
}

/* ── Sticky mobile CTA (UI-аудит 2026-06-13) ──────────────────────────
   Лендинг длинный; на мобиле постоянная нижняя кнопка «Начать бесплатно»
   держит точку входа под пальцем. Десктопу не нужна — там TopNav. */
.lp-sticky-cta {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  /* Кап + центрирование: на узких телефонах (≤500px вьюпорта) пилюля почти
     во всю ширину минус 10px-гаттеры; на широких телефонах/планшетах (до
     900px, где десктоп ещё не включился) не растягивается, а держит
     осознанный размер по центру полосы между left/right. */
  max-width: 480px;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lp-sticky-cta-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
@media (min-width: 901px) {
  .lp-sticky-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-sticky-cta { transition: none; }
}

/* ── Тёплый шампань-вариант главного CTA ──────────────────────────────
   Исследование тёмного дизайна (2026-06-13): тёплая нить должна доходить
   до места решения, а не жить только в бейджах. Тёмный текст на золоте —
   контраст 6.7–9.6:1 (проверен UI-аудитом на ribbon «Популярный»). */
.landing-root .btn-primary--warm {
  background: linear-gradient(135deg, oklch(0.88 0.1 90), oklch(0.78 0.13 72));
  color: oklch(0.28 0.05 75);
  border: 1px solid oklch(0.9 0.08 90 / 0.5);
  box-shadow: 0 8px 24px oklch(0.75 0.12 80 / 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.landing-root .btn-primary--warm:hover {
  box-shadow: 0 12px 32px oklch(0.75 0.12 80 / 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
