/* ============================================================
   Лендинг — тёмная строгая тема в брендовой палитре
   ============================================================ */
.landing {
  --p: #813563;
  --p-dark: #4A1F3E;
  --teal: #1E9D8A;
  --amber: #F6BC59;
  --coral: #F37950;
  --red: #FA425A;
  --bg: #17101b;
  --bg2: #20142a;
  --text: #f4f1f6;
  --muted: #a99cb3;
  --glass: rgba(255,255,255,.05);
  --glass-border: rgba(255,255,255,.12);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter Variable", Inter, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* Страховка от выхода за экран: грид-элементы не должны толкать ширину */
.l-hero-grid > *,
.l-features > *,
.l-cards-4 > *,
.l-steps > *,
.l-audience > *,
.l-header-inner > * {
  min-width: 0;
}
.l-hero h1,
.l-hero-sub,
.l-section-head h2,
.l-insight p,
.l-final-inner p {
  overflow-wrap: break-word;
}

/* ---------- Шапка ---------- */
.l-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(23,16,27,.72); border-bottom: 1px solid transparent; transition: border-color .3s; }
.l-header.scrolled { border-bottom-color: var(--glass-border); }
.l-header-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 22px; }
.l-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15.5px; color: #fff; letter-spacing: -.01em; }
.l-brand img { width: 28px; height: 28px; border-radius: 6px; }
.l-nav { display: flex; gap: 22px; margin-left: auto; }
.l-nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: color .2s; }
.l-nav a:hover { color: #fff; }
.l-header-actions { display: flex; gap: 10px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-block; height: 40px; line-height: 38px; padding: 0 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s; }
.l-btn-primary { background: var(--teal); color: #fff; }
.l-btn-primary:hover { background: #17806f; }
.l-btn-ghost { background: transparent; border-color: var(--glass-border); color: #fff; }
.l-btn-ghost:hover { background: var(--glass); }
.l-btn-lg { height: 50px; line-height: 48px; padding: 0 28px; font-size: 15px; }

/* ---------- Hero ---------- */
.l-hero { position: relative; overflow: hidden; background: radial-gradient(1000px 600px at 80% -10%, rgba(129,53,99,.5), transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(30,157,138,.24), transparent 60%), linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); }
.l-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 26px 26px; pointer-events: none; }
.l-hero-grid { max-width: 1180px; margin: 0 auto; padding: 88px 24px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.l-badge { display: inline-block; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--amber); margin-bottom: 18px; }
.l-hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.12; margin: 0 0 18px; font-weight: 800; letter-spacing: -.02em; }
.l-accent { color: var(--amber); }
.l-hero-sub { font-size: 16px; color: var(--muted); line-height: 1.6; max-width: 520px; margin: 0 0 28px; }
.l-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.l-hero-trust { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 28px; }
.l-hero-trust span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.l-hero-trust svg { width: 16px; height: 16px; color: var(--teal); }

/* ---------- 3D ---------- */
.l-hero-3d { position: relative; min-width: 0; max-width: 100%; }
#hero3d { width: 100%; height: clamp(320px, 34vw, 480px); cursor: grab; overflow: hidden; }
#hero3d canvas { display: block; width: 100% !important; height: 100% !important; }
.hero3d-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

/* ---------- Секции ---------- */
.l-section { max-width: 1180px; margin: 0 auto; padding: 88px 24px; }
.l-section-alt { max-width: none; background: var(--bg2); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.l-section-head { max-width: 640px; margin: 0 0 46px; }
.l-kicker { color: var(--amber); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 10px; }
.l-section-head h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.015em; }

/* Заливка на всю ширину, но контент — в той же колонке 1132px (1180 − 2×24px), что и в обычных секциях.
   Селектор идёт ПОСЛЕ .l-section-head: при равной специфичности побеждает позже объявленный, поэтому
   заголовок внутри залитой секции тоже попадает в общую колонку и не уезжает влево. */
.l-section-alt > * { max-width: 1132px; margin-left: auto; margin-right: auto; }

/* ---------- Карточки проблемы ---------- */
.l-cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.l-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px; padding: 26px 24px; }
.l-card-ico { width: 44px; height: 44px; border-radius: 10px; background: rgba(30,157,138,.12); border: 1px solid rgba(30,157,138,.3); display: flex; align-items: center; justify-content: center; color: var(--teal); margin-bottom: 16px; }
.l-card-ico svg { width: 22px; height: 22px; }
.l-card h3 { font-size: 15.5px; margin: 0 0 8px; font-weight: 700; letter-spacing: -.01em; }
.l-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ---------- Решение ---------- */
.l-features { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.l-feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.l-feature-list li { padding-left: 18px; border-left: 2px solid var(--glass-border); }
.l-feature-list li b { font-size: 15.5px; display: block; margin-bottom: 4px; font-weight: 700; }
.l-feature-list li span { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Мини-превью дашборда */
.pv { background: linear-gradient(160deg, #24162e, #1a1220); border: 1px solid var(--glass-border); border-radius: 12px; padding: 20px; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.pv-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.pv-kpi { background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); border-radius: 8px; padding: 12px 14px; }
.pv-kpi span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: block; }
.pv-kpi b { font-size: 19px; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; font-weight: 700; }
.pv-kpi b.neg { color: var(--red); }
.pv-kpi-main { background: linear-gradient(135deg, var(--teal), #147a6b); border-color: transparent; }
.pv-kpi-main b { font-size: 22px; }
.pv-kpi-main small { color: rgba(255,255,255,.8); font-size: 11px; display: block; margin-top: 2px; }
.pv-bars { display: flex; flex-direction: column; gap: 8px; }
.pv-row { display: grid; grid-template-columns: 74px 1fr 34px; gap: 10px; align-items: center; font-size: 12.5px; }
.pv-row span { color: var(--muted); }
.pv-row b { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pv-track { height: 12px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.pv-track i { display: block; height: 100%; border-radius: 3px; }

/* ---------- Инсайт ---------- */
.l-insight-inner { max-width: 760px; margin: 0; }
.l-insight h2 { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.2; margin: 0 0 18px; font-weight: 700; letter-spacing: -.015em; color: var(--amber); }
.l-insight p { font-size: 16px; color: var(--muted); line-height: 1.65; margin: 0; }

/* ---------- Шаги ---------- */
.l-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.l-step { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px; padding: 26px 24px; }
.l-step-num { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 30px; padding: 0 10px; margin-bottom: 16px; border-radius: 6px; background: rgba(129,53,99,.35); border: 1px solid rgba(129,53,99,.55); font-size: 13px; font-weight: 700; letter-spacing: .06em; color: #fff; }
.l-step h3 { font-size: 15.5px; margin: 0 0 8px; font-weight: 700; }
.l-step p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ---------- Для кого ---------- */
.l-audience { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.l-role { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; padding: 26px 24px; }
.l-role-main { border-color: rgba(30,157,138,.4); background: linear-gradient(170deg, rgba(30,157,138,.12), var(--glass)); }
.l-role-ico { width: 44px; height: 44px; border-radius: 10px; background: rgba(30,157,138,.12); border: 1px solid rgba(30,157,138,.3); display: flex; align-items: center; justify-content: center; color: var(--teal); margin-bottom: 16px; }
.l-role-ico svg { width: 22px; height: 22px; }
.l-role h3 { font-size: 19px; margin: 0 0 10px; font-weight: 700; letter-spacing: -.01em; }
.l-role p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 20px; }

/* ---------- Финальный CTA ---------- */
.l-final-inner { max-width: 720px; margin: 0; padding: 0; }
.l-final-inner h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 0 0 14px; font-weight: 700; letter-spacing: -.015em; }
.l-final-inner p { font-size: 16px; color: var(--muted); margin: 0 0 28px; }

/* ---------- Футер ---------- */
.l-footer { border-top: 1px solid var(--glass-border); background: var(--bg); }
.l-footer-inner { max-width: 1180px; margin: 0 auto; padding: 26px 24px; display: flex; align-items: center; gap: 20px; }
.l-footer-links { margin-left: auto; display: flex; gap: 16px; }
.l-footer-links a { color: var(--muted); text-decoration: none; font-size: 13.5px; }
.l-footer-links a:hover { color: #fff; }

/* ---------- Анимации появления ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .l-hero-grid, .l-features { grid-template-columns: 1fr; }
  .l-hero-3d { order: -1; }
  #hero3d { height: 300px; }
  .l-cards-4, .l-steps, .l-audience { grid-template-columns: 1fr; }
  .l-nav { display: none; }
}

/* ---------- Мобильные ---------- */
@media (max-width: 640px) {
  .l-header-inner { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .l-header-actions { margin-left: auto; }
  .l-header-actions .btn { height: 36px; line-height: 34px; padding: 0 13px; font-size: 13px; }
  .l-header-actions .l-btn-ghost { display: none; } /* на телефоне показываем «Начать бесплатно», а не «Войти» */

  .l-hero-grid { padding: 54px 16px; gap: 22px; }
  #hero3d { height: 250px; }
  .l-hero h1 { font-size: 28px; }
  .l-hero-sub { font-size: 15px; }
  .l-hero-actions { gap: 10px; }
  .l-hero-actions .btn-lg { height: 46px; line-height: 44px; padding: 0 22px; font-size: 14px; }
  .l-hero-trust { flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 22px; }

  .l-section { padding: 54px 16px; }
  .l-section-head { margin-bottom: 30px; }
  .l-section-head h2 { font-size: 24px; }

  .l-card, .l-step, .l-role { padding: 18px 16px; }
  .l-features { gap: 26px; }

  .pv { padding: 14px; }
  .pv-kpis { gap: 8px; }
  .pv-kpi { padding: 10px 12px; }
  .pv-kpi b { font-size: 17px; }
  .pv-kpi-main b { font-size: 19px; }
  .pv-row { grid-template-columns: 58px 1fr 28px; gap: 8px; font-size: 11.5px; }

  .l-final-inner h2 { font-size: 26px; }

  .l-footer-inner { flex-direction: column; gap: 10px; padding: 20px 16px; }
  .l-footer-links { margin-left: 0; }
}
