/* ============================================================
   КАРКАС · Premium — mobile.css
   Мобильная адаптация (<= 768px). Не упрощение — переработка
   под поведение пользователя на телефоне.
   Подключается с media="(max-width: 768px)".
   ============================================================ */

/* ============================================================
   C1 — Общие параметры
   ============================================================ */
.container { padding: 0 20px; }
.container--narrow { max-width: 100%; padding: 0 20px; }
.section { padding: 64px 0; }

/* тапзоны: кнопки и ключевые ссылки минимум 44px */
.btn,
.nav__cta,
.service__cta,
.footer__link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   C2 — Типографика
   ============================================================ */
.hero__title { font-size: clamp(32px, 8vw, 44px); line-height: 1.05; }
.section__title { font-size: clamp(24px, 6vw, 32px); line-height: 1.15; }
.founder__title { font-size: 24px; line-height: 1.2; }
.card__title { font-size: 18px; line-height: 1.3; }
.card__text,
.founder__text p { font-size: 15px; line-height: 1.7; }
.label { font-size: 11px; letter-spacing: 0.1em; }
.tag { font-size: 11px; }

/* ============================================================
   C3 — Навигация: хедер + бургер-меню
   ============================================================ */
.nav { height: 56px; }
.nav__inner { padding: 0 20px; }
.nav__logo-mark { width: 28px; height: 28px; }
.nav__logo-text { font-size: 16px; }

/* кнопка-бургер */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}
.burger__line {
  width: 100%;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
  transform-origin: center;
}
body.menu-open .burger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger__line:nth-child(2) { opacity: 0; }
body.menu-open .burger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* overlay-меню */
.nav__menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  background: rgba(26, 30, 42, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
body.menu-open .nav__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav__menu .nav__link {
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
}
.nav__menu .nav__cta {
  width: 80%;
  max-width: 320px;
  height: 52px;
  font-size: 16px;
  margin-top: 8px;
}
/* блокировка скролла под открытым меню */
body.menu-open { overflow: hidden; }

/* ============================================================
   C4 — Hero
   ============================================================ */
.hero {
  min-height: 100svh;
  padding: 80px 0 56px;
}
.hero__logo { width: 80px; height: 80px; margin-bottom: 28px; }
.hero__sub { font-size: 15px; max-width: 100%; margin-bottom: 32px; }
.hero__buttons {
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}
.hero__buttons .btn { width: 100%; height: 52px; }
.hero__stats {
  flex-direction: column;
  gap: 0;
  padding-top: 24px;
}
.hero__stats .stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.hero__stats .stat:last-child { border-bottom: none; }
.stat__num { font-size: 28px; margin-bottom: 0; }
.stat__label { text-align: right; max-width: 55%; font-size: 13px; }
.scroll-hint { display: none; }

/* ============================================================
   C5 — Боль
   ============================================================ */
.grid-3 { display: flex; flex-direction: column; gap: 16px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); }
.card__num { font-size: 32px; }
.pain__conclusion { font-size: 16px; text-align: center; padding: 0 12px; }

/* ============================================================
   C6 + C14.2 — Воронка (pin отключён в JS)
   ============================================================ */
.funnel-pin { min-height: auto; display: block; }
.funnel { width: 100%; padding: 0; }
.funnel__particles { display: none; }      /* частицы — тяжело, не видно */
.funnel__progress { display: none; }
.funnel__frac { display: none; }

.funnel__step {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.funnel__bar { height: 36px; padding: 0 14px; min-width: 96px; }
.funnel__num { font-size: 16px; min-width: 0; }
.funnel__stage {
  font-size: 13px;
  min-width: 0;
  white-space: normal;
}
/* подсказка — всегда видна под подписью приглушённым цветом (на тач нет hover) */
.funnel__hint {
  position: static;
  transform: none;
  opacity: 0;
  background: none;
  border: none;
  padding: 0;
  white-space: normal;
  color: var(--text-muted-2);
  font-size: 12px;
  transition: opacity 0.4s ease 0.3s;
}
.funnel__step.is-active .funnel__hint { opacity: 0.7; transform: none; }

/* пройденные этапы — притухают и слегка сжимаются (глубина пути) */
.funnel__step.is-active:not(.is-current) { opacity: 0.5; transform: scaleY(0.97); }

/* блок сравнения */
.compare { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.compare__col { padding: 20px 16px; }
.compare__col--good { transform: none; }     /* не приподнимаем на узком экране */
.compare__head { font-size: 11px; margin-bottom: 16px; }
.compare__row { font-size: 13px; padding: 12px 0; }

/* ============================================================
   C7 — Услуги
   ============================================================ */
.services { display: flex; flex-direction: column; gap: 16px; }
.card.service { padding: 24px; }
.service__schema { width: 36px; opacity: 0.15; }
.card.service .card__title { font-size: 20px; }
.tag { padding: 6px 12px; }
.service__cta { font-size: 15px; padding: 12px 0; }

/* ============================================================
   C8 + C14.3 — Кейсы: свайп-слайдер
   ============================================================ */
.cases {
  flex-direction: row;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 16px;
  padding-bottom: 16px;
}
.cases::-webkit-scrollbar { display: none; }
.cases { scrollbar-width: none; }
.case {
  min-width: calc(100vw - 48px);
  max-width: calc(100vw - 48px);
  width: calc(100vw - 48px);
  padding: 24px 20px;
  overflow: hidden;
  box-sizing: border-box;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.case:last-child { margin-right: 20px; }
.case.is-inactive { transform: scale(0.95); opacity: 0.6; }
.case.is-active { transform: scale(1); opacity: 1; }
.case__tag { font-size: 11px; }
.case__title { font-size: 18px; }
.case__text {
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case__result { font-size: 15px; border-left: 3px solid var(--green); padding-left: 12px; }

/* точки-индикаторы */
.cases__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.cases__dot {
  width: 6px; height: 6px;
  padding: 0;
  border: none;
  background: var(--text-muted-2);
  border-radius: 50%;
  cursor: pointer;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}
.cases__dot.is-active {
  width: 20px;
  background: var(--green);
  border-radius: 3px;
}

/* ============================================================
   C9 — Об основателе
   ============================================================ */
.founder { display: flex; flex-direction: column-reverse; gap: 0; }
.founder__photo {
  width: 100%;
  max-height: 360px;
  border-radius: var(--r-card);
}
.founder__photo img { max-height: 360px; }
.founder__corner { width: 20px; height: 20px; }
.founder__text { margin-top: 32px; }
.founder__text p { font-size: 15px; line-height: 1.7; }

/* ============================================================
   C10 + C14.4 — Формы
   ============================================================ */
#leadmagnet .section__title,
#contact .section__title { font-size: clamp(22px, 5.5vw, 28px); }

.form__row { margin-bottom: 12px; }
.form__input {
  width: 100%;
  height: 48px;
  font-size: 16px;            /* ОБЯЗАТЕЛЬНО: иначе iOS зумит поле */
}
.form__textarea {
  min-height: 120px;
  max-height: 240px;
  resize: vertical;
  font-size: 16px;
  height: auto;
}
.form__submit { width: 100%; height: 52px; font-size: 16px; }
.form__consent { gap: 10px; }
.form__consent-check { min-width: 20px; min-height: 20px; width: 20px; height: 20px; }
.form__consent-text { font-size: 13px; }
.form__note { font-size: 13px; }

/* ============================================================
   C11 — Футер
   ============================================================ */
.footer__inner {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.footer__logo { justify-content: center; }
.footer__logo-mark { width: 28px; height: 28px; }
.footer__col--center {
  flex-direction: row;
  gap: 24px;
  justify-content: center;
}
.footer__legal {
  flex-direction: column;
  text-align: center;
  gap: 12px;
  align-items: center;
}
.footer__legal-text { font-size: 11px; text-align: center; }
.footer__legal-links { flex-direction: column; gap: 8px; align-items: center; }
.footer__bottom { font-size: 13px; text-align: center; }

/* ============================================================
   C12 — Motion-адаптация (визуальный слой)
   ============================================================ */
/* кастомный курсор отключён (matchMedia в cursor.js), на всякий — спрятать */
.cursor { display: none !important; }
/* несущая ось: оставить только левую, тоньше и приглушённее */
.axis__line--right { display: none; }
.axis__line--left { opacity: 0.3; width: 0.5px; }

/* C14.5: усиленное свечение CTA на мобиле */
.btn--primary {
  box-shadow: 0 6px 24px rgba(62, 200, 122, 0.3), 0 0 0 0 var(--green-glow);
}
@keyframes ctaPulseMobile {
  0%, 100% { box-shadow: 0 6px 24px rgba(62, 200, 122, 0.3); }
  50%      { box-shadow: 0 6px 28px rgba(62, 200, 122, 0.5), 0 0 12px 4px var(--green-glow); }
}
.hero__buttons .btn--primary { animation: ctaPulseMobile 2.8s ease-in-out infinite; }

/* ============================================================
   C14.1 — Тактильный отклик вместо hover/tilt
   ============================================================ */
.card:active,
.service:active { transform: scale(0.97); transition: transform 0.15s var(--ease); }
.btn:active { transform: scale(0.95); box-shadow: 0 6px 30px rgba(62, 200, 122, 0.55); }

/* обводка рамки зелёным при тапе (класс ставит mobile.js на 400ms) */
.card.is-touched,
.service.is-touched {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(62, 200, 122, 0.4);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* ============================================================
   C14.4 — Поля формы: прочерчивание рамки при фокусе
   ============================================================ */
.form__input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
  outline: none;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* ============================================================
   Прочее: отключить tilt-перспективу-артефакты на тач
   ============================================================ */
[data-tilt] { transform: none !important; }
