/* ==========================================================================
   viberbot.ru — статическая версия
   Без фреймворков и внешних зависимостей. Один файл.
   ========================================================================== */

/* --------------------------------------------------------- 1. Переменные */
:root {
  --bg:        #0b1020;
  --bg-alt:    #0f162c;
  --surface:   #141d38;
  --surface-2: #1a2445;
  --line:      #243055;

  --text:      #e8ecf7;
  --muted:     #98a3c4;

  --viber:     #7360f2;
  --tg:        #2aabee;
  --accent:    #4fc3f7;
  --ok:        #34d399;
  --warn:      #f59e0b;

  --radius:    16px;
  --radius-sm: 10px;
  --wrap:      1140px;
  --shadow:    0 18px 45px rgba(2, 8, 25, .45);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  color-scheme: dark;
}

/* Светлая тема — по системной настройке пользователя */
@media (prefers-color-scheme: light) {
  :root {
    --bg:        #f6f8fd;
    --bg-alt:    #ffffff;
    --surface:   #ffffff;
    --surface-2: #f1f4fb;
    --line:      #e2e8f5;

    --text:      #10162b;
    --muted:     #5b678a;

    --shadow:    0 14px 36px rgba(16, 22, 43, .10);
    color-scheme: light;
  }
}

/* ------------------------------------------------------------- 2. Reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #05121f;
  padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ 3. Layout */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(56px, 8vw, 96px); }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.section-head-sub { margin-top: clamp(48px, 6vw, 72px); }

.section-head h2 { font-size: clamp(28px, 4.2vw, 40px); margin-bottom: .35em; }
.section-sub { color: var(--muted); margin: 0; }

.eyebrow {
  margin: 0 0 .6em;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.grad {
  background: linear-gradient(100deg, var(--tg), var(--viber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------ 4. Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--tg), var(--viber));
  box-shadow: 0 6px 18px rgba(115, 96, 242, .35);
}
.brand-text { font-size: 17px; }
.brand-text b { color: var(--accent); font-weight: 700; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: color .2s ease, background .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--text); background: var(--surface-2); text-decoration: none; }

.site-nav .nav-cta {
  margin-left: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--tg), var(--viber));
  font-weight: 600;
}
.site-nav .nav-cta:hover { color: #fff; filter: brightness(1.08); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------- 5. Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(64px, 11vw, 132px); }

.hero-bg {
  position: absolute; inset: -20% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(48% 42% at 18% 20%, rgba(42, 171, 238, .30), transparent 62%),
    radial-gradient(45% 45% at 82% 12%, rgba(115, 96, 242, .28), transparent 64%),
    radial-gradient(40% 40% at 55% 95%, rgba(79, 195, 247, .16), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

.hero-inner { position: relative; text-align: center; }
.hero h1 { font-size: clamp(32px, 6.2vw, 62px); margin-bottom: .35em; }
.lead { font-size: clamp(16px, 1.9vw, 19px); color: var(--muted); max-width: 640px; margin-inline: auto; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--tg), var(--viber));
  box-shadow: 0 10px 26px rgba(115, 96, 242, .38);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 32px rgba(115, 96, 242, .48); }

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 4vw, 52px);
  margin-top: clamp(36px, 5vw, 56px);
}
.hero-stats li { text-align: center; }
.hero-stats b {
  display: block;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--tg), var(--viber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------- 6. Карточки */
.cards { display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.card h3, .card h4 { font-size: 19px; margin: 0; }
.card p { color: var(--muted); margin: 10px 0 0; }

.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.card-top time {
  font-size: 13px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

.num {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}
.card-can  .num { background: linear-gradient(135deg, var(--ok), #10b981); }
.card-cant .num { background: linear-gradient(135deg, var(--warn), #ef4444); }

.card-can::before,
.card-cant::before {
  content: "";
  position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 3px; border-radius: 0 3px 3px 0;
}
.card-can::before  { background: var(--ok); }
.card-cant::before { background: var(--warn); }

/* ------------------------------------------------------------ 7. Таймлайн */
.timeline { position: relative; padding-left: 34px; display: grid; gap: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--tg), var(--viber));
  opacity: .5;
  border-radius: 2px;
}

.tl-item { position: relative; }
.tl-dot {
  position: absolute;
  left: -29px; top: 26px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--muted);
}
.tl-item.is-accent .tl-dot {
  border-color: transparent;
  background: linear-gradient(135deg, var(--tg), var(--viber));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--viber) 20%, transparent);
}

.tl-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.tl-body h3, .tl-body h4 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-body p { color: var(--muted); margin: 10px 0 0; }

/* ----------------------------------------------------------------- 8. CTA */
.cta { background: var(--bg-alt); }
.cta-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.cta-text .hero-actions { justify-content: flex-start; }
.cta-text .lead { margin-inline: 0; }
.cta h2 { font-size: clamp(26px, 3.6vw, 36px); }

.contact-line { margin-top: 20px; color: var(--muted); }

.cta-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* -------------------------------------------------------------- 9. Футер */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-block: 26px;
  padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-inner nav a { color: var(--muted); }
.footer-inner nav a:hover { color: var(--text); }

/* ----------------------------------------------------------- 10. Наверх */
.to-top {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--tg), var(--viber));
  box-shadow: 0 10px 24px rgba(115, 96, 242, .40);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { text-decoration: none; filter: brightness(1.08); }

/* --------------------------------------------------------- 11. Анимации */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------- 12. Адаптив */
@media (max-width: 860px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-media { order: -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: grid; }

  .site-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 16px; }
  .site-nav .nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }

  .header-inner { position: relative; }
  .hero-stats { gap: 22px; }
  .card, .tl-body { padding: 20px 18px; }
}

@media (max-width: 420px) {
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .cta-text .hero-actions { align-items: stretch; }
}

/* ---------------------------------------------------------- 13. Печать */
@media print {
  .site-header, .to-top, .hero-bg, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .tl-body { box-shadow: none; border: 1px solid #ccc; }
}

/* ==========================================================================
   14. Бейджи платформ (Telegram / Viber / MAX)
   ========================================================================== */
:root {
  --max: #14b8a6;
}

.pf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.pf::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.pf-tg  { color: var(--tg);    border-color: color-mix(in srgb, var(--tg) 40%, transparent);    background: color-mix(in srgb, var(--tg) 12%, transparent); }
.pf-vb  { color: var(--viber); border-color: color-mix(in srgb, var(--viber) 40%, transparent); background: color-mix(in srgb, var(--viber) 12%, transparent); }
.pf-max { color: var(--max);   border-color: color-mix(in srgb, var(--max) 42%, transparent);   background: color-mix(in srgb, var(--max) 13%, transparent); }

/* Ряд платформ в hero */
.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 0;
}
.platforms .pf { font-size: 14px; padding: 9px 16px 9px 13px; }

.badge-new {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--max), var(--tg));
}

/* ==========================================================================
   15. Галерея ботов
   ========================================================================== */
.bots {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.bot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.bot:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.bot-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--tg), var(--viber));
  box-shadow: 0 8px 20px rgba(115, 96, 242, .30);
}
.bot-icon svg { width: 26px; height: 26px; }

.bot h3 { font-size: 19px; margin: 0; }
.bot p  { color: var(--muted); margin: 0; flex: 1 1 auto; font-size: 15px; }

.bot-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  min-height: 40px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
}
.bot-link::after {
  content: "→";
  transition: transform .2s ease;
}
.bot-link:hover { text-decoration: none; }
.bot-link:hover::after { transform: translateX(4px); }

/* Карточка «Ваш бот» — пунктирная, без заливки */
.bot-empty {
  background: transparent;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: none;
}
.bot-empty .bot-icon {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: none;
}

/* ==========================================================================
   16. Две колонки «могут / не могут»
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
.split-col { display: grid; gap: 16px; }

.split-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  margin: 0 0 2px;
}
.split-title::before {
  content: "";
  width: 24px; height: 24px;
  border-radius: 8px;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}
.split-title-can::before {
  background-color: color-mix(in srgb, var(--ok) 20%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.split-title-cant::before {
  background-color: color-mix(in srgb, var(--warn) 20%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.split .card { padding: 22px 22px 22px 24px; }
.split .num { width: 36px; height: 36px; margin-bottom: 10px; font-size: 14px; }

/* ==========================================================================
   17. Дополнения к таймлайну
   ========================================================================== */
.tl-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 18px;
}
.tl-title + .timeline { margin-bottom: clamp(36px, 5vw, 52px); }

.tl-body .pf { font-size: 11.5px; padding: 4px 10px 4px 8px; }
.tl-body .pf::before { width: 6px; height: 6px; }

.tl-item.is-new .tl-dot {
  background: linear-gradient(135deg, var(--max), var(--tg));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--max) 22%, transparent);
}
.tl-item.is-new .tl-body {
  border-color: color-mix(in srgb, var(--max) 45%, var(--line));
}

.note {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-left: 3px solid var(--max);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--max) 9%, transparent);
  color: var(--text);
  font-size: 14.5px;
}

/* ==========================================================================
   18. Адаптив для новых блоков
   ========================================================================== */
@media (max-width: 760px) {
  .bots { grid-template-columns: 1fr; }
  .bot { padding: 22px 18px 20px; }
  .platforms .pf { font-size: 13px; }
  .hero-stats { gap: 18px 26px; }
  .hero-stats li { min-width: 42%; }
}
