/* ══════════════════════════════════════════════════════════════
   «Твой репетитор» — единый стиль сайта (production)
   Собран из дизайн-системы (tokens + base + components) + слой сайта.
   Один файл, чтобы минимизировать запросы и ускорить загрузку.
   ══════════════════════════════════════════════════════════════ */

/* ─────────────── ТОКЕНЫ: цвета ─────────────── */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-sheet: #fafaf8;
  --surface-raised: #ffffff;
  --overlay: rgba(10, 10, 18, 0.45);

  --border: rgba(0, 0, 0, 0.07);
  --border-input: rgba(0, 0, 0, 0.08);
  --border-active: rgba(0, 0, 0, 0.14);
  --border-divider: rgba(0, 0, 0, 0.05);

  --text-primary: #1a1a1f;
  --text-secondary: #6b6d7b;
  --text-muted: #a0a2b1;

  --accent: #e8734a;
  --accent-hover: #d4663f;
  --accent-glow: rgba(232, 115, 74, 0.22);
  --accent-soft: rgba(232, 115, 74, 0.1);

  --indigo: #6366f1;
  --indigo-text: #4f46e5;
  --orange-text: #c2603a;
  --green-text: #0d9668;
  --success: #10b981;
  --success-text: #059669;
  --success-soft: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --warning-text: #d97706;
  --warning-soft: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.2);
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --error: #ef4444;
  --error-soft: rgba(239, 68, 68, 0.12);
  --dark: #3a3a44;
  --dark-hover: #2a2a32;
  --telegram: #2AABEE;

  /* ─────────────── ТОКЕНЫ: типографика ─────────────── */
  --font-sans: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-page-title: 26px;
  --text-section: 18px;
  --text-button: 15.5px;
  --text-body: 15px;
  --text-label: 13px;
  --text-caption: 12px;

  /* ─────────────── ТОКЕНЫ: радиусы / тени / анимации ─────────────── */
  --radius-seg: 8px;
  --radius-chip: 10px;
  --radius-box: 12px;
  --radius-btn: 14px;
  --radius-fab: 18px;
  --radius-pill: 20px;
  --radius-sheet: 24px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-active: 0 2px 8px rgba(26, 26, 31, 0.2);
  --shadow-sheet: 0 -4px 60px rgba(0, 0, 0, 0.15), 0 -1px 3px rgba(0, 0, 0, 0.06);
  --shadow-accent: 0 4px 14px rgba(232, 115, 74, 0.22);
  --shadow-accent-lg: 0 4px 16px rgba(232, 115, 74, 0.3);
  --shadow-accent-hover: 0 6px 24px rgba(232, 115, 74, 0.35);
  --shadow-nav: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);

  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;

  --maxw: 1200px;
}

/* ─────────────── БАЗА / RESET ─────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.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; }

/* Цветовые варианты сущностей (аватары/сигналы) */
.variant-indigo { --v-color: var(--indigo); --v-text: var(--indigo-text); --v-grad-from: #6366f1; --v-grad-to: #818cf8; --v-shadow: rgba(99,102,241,0.25); }
.variant-orange { --v-color: var(--accent); --v-text: var(--orange-text); --v-grad-from: #e8734a; --v-grad-to: #f59e6c; --v-shadow: rgba(232,115,74,0.25); }
.variant-green  { --v-color: var(--success); --v-text: var(--green-text); --v-grad-from: #10b981; --v-grad-to: #34d399; --v-shadow: rgba(16,185,129,0.25); }
.avatar-variant { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, var(--v-grad-from), var(--v-grad-to)); box-shadow: 0 4px 12px var(--v-shadow); position: relative; overflow: hidden; }
.avatar-variant::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%); border-radius: inherit; }

/* ─────────────── КНОПКИ ─────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border: none; border-radius: 14px;
  font-family: var(--font-sans); font-size: 15.5px; font-weight: 700; letter-spacing: -0.2px;
  cursor: pointer; transition: all 0.2s ease; text-decoration: none; box-sizing: border-box;
}
.btn svg { width: 18px; height: 18px; }
.btn--full { width: 100%; }
.btn:disabled, .btn.is-disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent-lg); }
.btn--primary:hover { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-accent-hover); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary.btn--success { background: var(--success); box-shadow: 0 4px 16px rgba(16,185,129,0.3); }
.btn--primary.btn--indigo  { background: var(--indigo);  box-shadow: 0 4px 16px rgba(99,102,241,0.3); }
.btn--secondary { background: var(--surface); color: var(--text-primary); border: 1.5px solid var(--border-active); font-weight: 600; font-size: 15px; }
.btn--secondary:hover { border-color: var(--text-primary); color: var(--text-primary); }
.btn--ghost { background: rgba(0,0,0,0.04); color: var(--text-secondary); font-weight: 600; font-size: 15px; }
.btn--ghost:hover { background: rgba(0,0,0,0.07); }
.btn--danger { background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 15px; }
.btn--danger:hover { background: var(--danger); color: #fff; }

/* ─────────────── ЧИПЫ / СЕГМЕНТЫ / БЕЙДЖИ ─────────────── */
.chip { min-width: 42px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; box-shadow: var(--shadow-xs); white-space: nowrap; text-align: center; }
.chip.is-active { background: var(--text-primary); border-color: var(--text-primary); color: #fff; box-shadow: var(--shadow-active); }
.segmented { display: inline-flex; gap: 4px; background: rgba(0,0,0,0.04); padding: 4px; border-radius: 12px; }
.segmented--fill { display: flex; width: 100%; }
.segmented--fill .segmented__btn { flex: 1; }
.segmented__btn { padding: 6px 16px; border: none; border-radius: 8px; font-family: var(--font-sans); font-size: 13px; font-weight: 500; cursor: pointer; background: transparent; color: var(--text-muted); transition: all 0.25s ease; }
.segmented__btn.is-active { background: var(--surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; line-height: 1; border: 1px solid transparent; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge--paid { background: var(--success-soft); color: var(--success-text); border-color: var(--success-border); }
.badge--pending { background: var(--warning-soft); color: var(--warning-text); border-color: var(--warning-border); }
.badge--overdue { background: var(--danger-soft); color: var(--danger); border-color: rgba(220,38,38,0.2); }
.badge--package { background: rgba(99,102,241,0.1); color: var(--indigo-text); border-color: rgba(99,102,241,0.2); }
.badge--dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ─────────────── КАРТОЧКИ / МЕТРИКИ / АВАТАРЫ ─────────────── */
.card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-xs); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.lesson-card { position: relative; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 14px 14px 17px; box-shadow: var(--shadow-xs); overflow: hidden; }
.lesson-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-xs); }
.metric-card__label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.metric-card__value { font-family: var(--font-mono); font-size: 19px; font-weight: 600; }
.metric-card--success .metric-card__value { color: var(--success-text); }
.avatar-variant.avatar--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.avatar-variant.avatar--md { width: 44px; height: 44px; border-radius: 13px; font-size: 16px; }
.avatar-variant.avatar--lg { width: 56px; height: 56px; border-radius: 16px; font-size: 21px; }

/* ══════════════════════════════════════════════════════════════
   СЛОЙ САЙТА
   ══════════════════════════════════════════════════════════════ */

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: clamp(18px, 4vw, 40px); }

/* Скрытие неактивных панелей табов (перебивает inline display) */
.tab-hidden { display: none !important; }

/* Юридические страницы (длинный текст) */
.legal { max-width: 800px; margin: 0 auto; padding: clamp(36px,5vw,60px) clamp(18px,4vw,40px) clamp(56px,6vw,88px); }
.legal h1 { font-size: clamp(28px,4vw,40px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.legal h2 { font-size: 20px; font-weight: 700; margin-top: 34px; letter-spacing: -0.01em; }
.legal p, .legal li { font-size: 15px; line-height: 1.65; color: var(--text-secondary); }
.legal p { margin-top: 12px; }
.legal ul { margin-top: 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal a { text-decoration: underline; }
.legal .legal-note { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--warning-soft); color: var(--warning-text); font-size: 13.5px; line-height: 1.5; }
.legal .legal-updated { margin-top: 30px; font-size: 13px; color: var(--text-muted); }
.legal h3 { font-size: 16.5px; font-weight: 700; margin-top: 22px; letter-spacing: -0.01em; }
.legal ol { margin-top: 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal ol li, .legal ul li { padding-left: 3px; }
.legal strong { color: var(--text-primary); font-weight: 700; }
.legal em { font-style: italic; }
.legal hr { margin: 28px 0; border: 0; border-top: 1px solid var(--border); }
.legal blockquote { margin: 18px 0 0; padding: 12px 16px; border-left: 3px solid var(--border-active); background: rgba(0,0,0,0.025); border-radius: 0 12px 12px 0; }
.legal blockquote p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.legal blockquote p:first-child { margin-top: 0; }
.legal mark.ph { background: var(--accent-soft); color: var(--orange-text); padding: 0 3px; border-radius: 4px; font-style: normal; font-weight: 600; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13.5px; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; color: var(--text-secondary); }
.legal th { background: var(--surface); font-weight: 700; color: var(--text-primary); }

/* Cookie-баннер */
.cookie-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 700; width: min(720px, calc(100vw - 24px)); display: none; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-nav); }
.cookie-banner.is-visible { display: flex; }
.cookie-banner__text { flex: 1 1 340px; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 560px) { .cookie-banner__actions { width: 100%; } .cookie-banner__actions .btn { flex: 1; } }

/* Ссылка «пропустить к содержимому» */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 999; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; transition: top .2s ease; }
.skip-link:focus { top: 12px; color: #fff; }

/* Универсальные ховеры */
.hovcard { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.hovcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-active) !important; }
.hovbtn { transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.hovbtn:hover { transform: translateY(-1px); }
.srcbtn { transition: all .2s ease; }
.srcbtn:hover { border-color: var(--border-active) !important; transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }
.contact { transition: all .2s ease; }
.contact:hover { border-color: var(--border-active) !important; transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }

/* Анимации */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes beamFlow { 0% { background-position: 0 -20px; } 100% { background-position: 0 20px; } }
@keyframes auraPulse { 0% { box-shadow: 0 0 0 0 rgba(232,115,74,0.5), var(--shadow-accent); } 70% { box-shadow: 0 0 0 16px rgba(232,115,74,0), var(--shadow-accent); } 100% { box-shadow: 0 0 0 0 rgba(232,115,74,0), var(--shadow-accent); } }
@keyframes sheen { 0%, 55% { transform: translateX(-180%); } 100% { transform: translateX(320%); } }
@keyframes navReveal { 0% { opacity: 0; transform: translateY(-9px) scale(0.82); } 100% { opacity: 1; transform: none; } }

/* Пунктиры-соединители */
.dash-v { background-image: linear-gradient(var(--accent) 45%, transparent 45%); background-size: 2px 9px; background-repeat: repeat-y; }
.dash-h { background-image: linear-gradient(to right, var(--accent) 45%, transparent 45%); background-size: 9px 2px; background-repeat: repeat-x; }
.beam { background-image: linear-gradient(var(--accent) 45%, transparent 45%); background-size: 2px 12px; animation: beamFlow 0.7s linear infinite; }

/* ─────────────── ШАПКА / НАВИГАЦИЯ ─────────────── */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: rgba(246,245,241,0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px,4vw,40px); height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.nav__brand img { width: 36px; height: 36px; border-radius: 10px; display: block; }
.nav__brand span { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.nav__links { display: flex; align-items: center; gap: 24px; font-size: 14.5px; }
.nav__link { color: var(--text-secondary); font-weight: 500; transition: color .18s ease; }
.nav__link:hover { color: var(--text-primary); }
.nav__link.is-active { color: var(--text-primary); font-weight: 700; }
.nav__cta { display: flex; align-items: center; }
.nav__burger { display: none; }
.header-spacer { height: 66px; }

/* Мобильное меню (нативный details) */
.nav__mobile { display: none; position: relative; }
.nav__mobile summary { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-primary); list-style: none; }
.nav__mobile summary::-webkit-details-marker { display: none; }
.nav__mobile summary .ic-close { display: none; }
.nav__mobile details[open] > summary .ic-burger { display: none; }
.nav__mobile details[open] > summary .ic-close { display: block; }
.nav__mobile-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-nav); padding: 8px; display: flex; flex-direction: column; }
.nav__mobile-menu a { padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.nav__mobile-menu a.is-active { color: var(--text-primary); font-weight: 700; }
.nav__mobile-menu a:hover { background: var(--bg); }

/* ─────────────── КНОПКА «Где начать» (dropdown) ─────────────── */
.sb-wrap { position: relative; display: inline-flex; font-family: var(--font-sans); }
.sb-trigger { display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 14px; font-family: var(--font-sans); font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.sb-trigger:hover { transform: translateY(-1px); }
.sb-trigger--accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.sb-trigger--accent:hover { color:#fff; }
.sb-trigger--white { background: #fff; color: #14141a; box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.sb-trigger--default { height: 52px; padding: 0 22px; font-size: 15px; }
.sb-trigger--compact { height: 42px; padding: 0 16px; font-size: 14px; }
.sb-chev { transition: transform .2s ease; opacity: .85; }
.sb-menu { position: absolute; z-index: 400; min-width: 300px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.sb-menu--down { top: 100%; padding-top: 8px; }
.sb-menu--up { bottom: 100%; padding-bottom: 8px; }
.sb-menu--right { right: 0; left: auto; }
.sb-menu--left { left: 0; }
.sb-wrap:hover .sb-menu, .sb-wrap:focus-within .sb-menu, .sb-wrap.is-open .sb-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sb-wrap:hover .sb-chev, .sb-wrap.is-open .sb-chev { transform: rotate(180deg); }
.sb-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-nav); padding: 8px; }
.sb-caption { padding: 6px 10px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.sb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sb-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--text-primary); transition: background .14s ease; }
.sb-item:hover { background: var(--bg); color: var(--text-primary); }
.sb-item__ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.sb-item span.lbl { font-weight: 600; font-size: 14.5px; }

/* Пульс-кнопка (акцентный CTA) */
.pulse-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 32px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-family: var(--font-sans); font-weight: 700; font-size: 16.5px; cursor: pointer; box-shadow: var(--shadow-accent); transition: transform .15s ease; text-decoration:none; }
.pulse-btn:hover { transform: translateY(-2px) scale(1.02); color:#fff; }

/* ─────────────── ТЕЛЕФОН-МОКАП ─────────────── */
.phone { position: relative; width: 280px; max-width: 100%; background: #14141a; border-radius: 40px; padding: 8px; box-shadow: 0 30px 70px rgba(26,26,31,0.26), 0 8px 24px rgba(26,26,31,0.14); flex-shrink: 0; }
.phone--sm { width: 268px; }
.phone--lg { width: 292px; }
.phone__screen { position: relative; width: 100%; aspect-ratio: 390 / 788; overflow: hidden; border-radius: 32px; background: var(--bg); }
.phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.phone-float { animation: heroBob 6.5s ease-in-out infinite; }

/* Плавающие чипы у героя */
.hero-stage { position: relative; perspective: 1600px; }
.hero-bob { animation: heroBob 7s ease-in-out infinite; }
.hero-phone { transform: rotateY(-11deg) rotateX(6deg) rotate(0.6deg); transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.hero-stage:hover .hero-phone { transform: none; }
.hero-chip { position: absolute; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); animation: chipFloat 5.5s ease-in-out infinite; }

/* FAQ */
.faq { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 4px; font-size: 16.5px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .faq-plus { flex-shrink: 0; color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary .faq-plus { transform: rotate(45deg); }
.faq p { margin: 0 4px; padding: 0 0 20px; font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* Тариф-карточка */
.lp-plan { transition: transform .2s ease, box-shadow .2s ease; }
.lp-plan:hover { transform: translateY(-3px); }

/* Подвал */
.site-footer { background: #101015; color: rgba(255,255,255,0.62); padding: clamp(44px,5vw,60px) clamp(18px,4vw,40px) 56px; }
.site-footer a { color: rgba(255,255,255,0.62); }
.ft-link { color: rgba(255,255,255,0.62); transition: color .16s ease; }
.ft-link:hover { color: #fff; }
.ft-soc { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.07); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .16s ease; }
.ft-soc:hover { background: rgba(255,255,255,0.14); color:#fff; }

/* ─────────────── ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ ─────────────── */
.reveal-ready main > section:not(:first-child) { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); will-change: opacity, transform; }
.reveal-ready main > section.is-in { opacity: 1 !important; transform: none !important; }
/* Стаггер: дети контейнера выезжают по очереди (задержки задаёт JS) */
.reveal-ready [data-stagger] > * { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .55s cubic-bezier(.34,1.56,.64,1); }
.reveal-ready [data-stagger].is-in > * { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready main > section, .reveal-ready [data-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* ─────────────── КАРУСЕЛЬ ЭКРАНОВ В ТЕЛЕФОНЕ ─────────────── */
.phone__screen[data-carousel] img { opacity: 0; transition: opacity .8s ease; }
.phone__screen[data-carousel] img.is-active { opacity: 1; }
.phone__dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; z-index: 5; pointer-events: none; }
.phone__dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); box-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: background .3s ease; }
.phone__dots span.is-active { background: #fff; }

/* ─────────────── ВИДЕО-ПУЗЫРЁК ОСНОВАТЕЛЯ ─────────────── */
.vbubble { position: fixed; right: clamp(14px,3vw,26px); bottom: clamp(14px,3vw,26px); z-index: 600; font-family: var(--font-sans); }
.vbubble[hidden] { display: none; }
.vbubble__card { position: relative; display: flex; align-items: center; gap: 14px; max-width: 360px; padding: 12px 16px 12px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-nav); animation: fadeUp .35s ease; }
.vbubble__ava { position: relative; width: 80px; height: 80px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: linear-gradient(150deg,#e8734a,#f2935f); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(232,115,74,0.34); }
.vbubble__ava img, .vbubble__ava video { width: 100%; height: 100%; object-fit: cover; }
.vbubble__ava span { color: #fff; font-size: 30px; font-weight: 700; }
.vbubble__ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); animation: vbRing 2.4s ease-out infinite; }
@keyframes vbRing { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.5); opacity: 0; } }
.vbubble__body { min-width: 0; flex: 1 1 auto; }
.vbubble__head { display: flex; align-items: center; gap: 7px; }
.vbubble__cc { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 5px; padding: 1px 4px; }
.vbubble__name { font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.vbubble__muted { font-size: 11px; color: var(--text-muted); }
.vbubble__cap { min-height: 42px; margin-top: 6px; font-size: 13.5px; line-height: 1.35; color: var(--text-secondary); transition: opacity .25s ease; }
.vbubble__close { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-xs); }
.vbubble__open { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: linear-gradient(150deg,#e8734a,#f2935f); box-shadow: 0 8px 22px rgba(232,115,74,0.42); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; font-weight: 700; }
.vbubble__open[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .vbubble__ring { animation: none; } }
.vbubble { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.vbubble__mute { position: absolute; bottom: -4px; right: -4px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); background: var(--text-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.vbubble__mute.is-on { background: var(--accent); }
.vbubble__confirm-text { font-size: 13.5px; line-height: 1.35; color: var(--text-primary); font-weight: 600; }
.vbubble__confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vbubble__stay { height: 32px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vbubble__leave { height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-muted); font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* ─── Клик-раскрытие «Как решаем проблему» (data-solve) ─── */
.solve-teaser { display: none; }
.solve-gate:not(.is-revealed) .solve-teaser { display: flex; justify-content: center; margin: 14px 0 4px; }
.solve-gate .solve-table { max-height: 0; opacity: 0; overflow: hidden; border-color: transparent !important; box-shadow: none !important; transition: max-height .8s cubic-bezier(.2,.8,.2,1), opacity .5s ease; }
.solve-gate.is-revealed .solve-table { max-height: 1400px; opacity: 1; border-color: var(--border) !important; box-shadow: var(--shadow-sm) !important; }
.solve-gate .solve-row { opacity: 0; transform: scale(.94); transition: opacity .5s ease, transform .6s cubic-bezier(.34,1.56,.64,1); }
.solve-gate.is-revealed .solve-row { opacity: 1; transform: none; }

/* ─── Гейтинг навигации (класс вешает JS только на главной) ─── */
.nav-gated .nav__cta { opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.nav-gated.cta-on .nav__cta { opacity: 1; transform: none; pointer-events: auto; }
.nav-gated .nav__link--pricing { display: none; }
.nav-gated.pricing-on .nav__link--pricing { display: inline-block; animation: navReveal .6s cubic-bezier(.2,.8,.2,1) both; }

/* ─────────────── АДАПТИВ ─────────────── */
.chan-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
@media (max-width: 1040px) { .chan-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }

@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none !important; }
  .nav__mobile { display: flex; align-items: center; }
}

@media (max-width: 720px) {
  .sb-menu { min-width: min(300px, calc(100vw - 40px)); }
  .hero-phone { transform: none; }
  h1 { line-height: 1.08; }
}

@media (max-width: 480px) {
  .sb-grid { grid-template-columns: 1fr; }
  .phone, .phone--sm, .phone--lg { width: 260px; }
}

/* Уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
