/* ============================================================
   BATENERGY — общий стиль сайта
   Тёмная индустриальная тема, оранжевый неон. Перенос из макета "Заряд".
   ============================================================ */

:root {
  --bg: #0a0d12;
  --bg2: #101620;
  --surface: #161c28;
  --ink: #f6f5f1;
  --ink-dim: rgba(246, 245, 241, 0.55);
  --ink-muted: rgba(246, 245, 241, 0.35);
  --line: rgba(246, 245, 241, 0.10);
  --orange: #F26A1F;
  --orange-hot: #ff8a3d;
  --green: #3fd365;

  --display: "Unbounded", "Space Grotesk", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --pad-x: clamp(20px, 4vw, 56px);
  --maxw: 1440px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overflow-wrap: break-word;       /* длинные слова/ссылки не ломают вёрстку */
}

a { color: inherit; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; }

.clip-btn {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--body); font-weight: 700; font-size: 15px;
  border: 0; cursor: pointer; text-decoration: none;
  padding: 16px 24px; transition: filter .18s ease, transform .18s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #0a0d12; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--orange); filter: none; }
.btn--block { width: 100%; justify-content: center; }
.btn .mono { font-family: var(--mono); }

/* ---------- Навигация ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 13, 18, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; gap: clamp(16px, 2vw, 40px);
  padding: 16px var(--pad-x);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__name { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: .5px; color: var(--ink); line-height: 1; }
.brand__sub  { font-family: var(--mono); font-size: 10px; color: var(--orange); letter-spacing: 2px; margin-top: 4px; }
.nav__links { display: flex; gap: 2px; margin-left: 12px; }
.nav__link {
  background: transparent; border: 0; cursor: pointer; text-decoration: none;
  color: var(--ink-dim); padding: 10px 14px;
  font-family: var(--body); font-size: 14px; font-weight: 500; letter-spacing: .2px;
  position: relative; white-space: nowrap;
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--orange);
}
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.nav__status { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.6s ease-in-out infinite; }
.nav__phone { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav__burger { display: none; background: transparent; border: 1.5px solid var(--line); color: var(--ink); width: 44px; height: 40px; cursor: pointer; font-size: 18px; flex: none; }
.nav__cta-mobile { display: none; }   /* CTA-пункт показывается только в мобильном меню */

/* ---------- Переключатель языка ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); background: var(--surface); flex: none; }
.lang-switch__btn {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .04em;
  padding: 6px 9px; background: transparent; border: none; color: var(--ink-dim);
  cursor: pointer; text-transform: uppercase; transition: color .15s, background .15s; line-height: 1;
}
.lang-switch__btn + .lang-switch__btn { border-left: 1px solid var(--line); }
.lang-switch__btn:hover { color: var(--ink); }
.lang-switch__btn.is-active { background: var(--orange); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 6vw, 80px) var(--pad-x) 64px; overflow: hidden; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 30%, transparent 80%);
}
.hero__volt { position: absolute; top: 60px; right: -60px; width: 700px; height: 500px; opacity: .5; pointer-events: none; }
.hero__volt path { animation: voltLineMove 18s linear infinite; }
.hero__inner { position: relative; max-width: var(--maxw); margin: 0 auto; }
.eyebrow-row { display: flex; align-items: center; gap: 24px; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 40px; flex-wrap: wrap; }
.eyebrow-row .rule { flex: 1; min-width: 30px; height: 1px; background: var(--line); }
.eyebrow-row .on { color: var(--orange); }
.hero__title { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 11vw, 168px); line-height: .85; letter-spacing: -4px; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.hero__title .accent { color: var(--orange); }
.hero__title .row { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); flex-wrap: wrap; }
.battery { position: relative; display: inline-flex; align-items: center; gap: 4px; width: clamp(160px, 26vw, 380px); height: clamp(56px, 9vw, 130px); }
.battery__body { position: relative; flex: 1; height: 100%; border: 2px solid rgba(255,255,255,.3); border-radius: 8px; padding: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.battery__fill { display: block; position: relative; z-index: 1; height: 100%; border-radius: 3px; background-color: #e23b2e; box-shadow: 0 0 18px rgba(0,0,0,.3) inset; animation: batteryFill 4s linear infinite; }
.battery__icons { position: absolute; z-index: 2; inset: 4px; display: flex; align-items: center; justify-content: space-between; gap: 2%; padding: 0 4%; pointer-events: none; }
.battery__ico { flex: 0 0 auto; width: 15.5%; height: auto; max-height: 78%; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.battery__cap { width: 8px; height: 40%; background: rgba(255,255,255,.3); border-radius: 0 3px 3px 0; }
.hero__sub { display: flex; gap: clamp(24px, 5vw, 64px); margin-top: clamp(32px, 5vw, 64px); align-items: flex-end; flex-wrap: wrap; }
.hero__lead { font-size: clamp(16px, 2vw, 20px); line-height: 1.5; color: var(--ink-dim); max-width: 520px; }
.hero__lead b { color: var(--ink); font-weight: 600; }
.hero__lead .accent { color: var(--orange); }
.hero__cta { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; }

/* ---------- Полоса статистики ---------- */
.stats { margin-top: clamp(48px, 7vw, 88px); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 32px 24px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -2px; }
.stat__num .u { color: var(--orange); }
.stat__label { font-size: 13px; color: var(--ink-dim); margin-top: 12px; max-width: 220px; }

/* ---------- Бегущая строка ---------- */
.marquee { background: var(--orange); color: #0a0d12; padding: 18px 0; overflow: hidden; border-top: 1px solid #0a0d12; border-bottom: 1px solid #0a0d12; }
.marquee__track { display: flex; width: max-content; animation: scrollX 40s linear infinite; }
.marquee__group { display: flex; align-items: center; gap: 48px; padding-right: 48px; font-family: var(--display); font-weight: 800; font-size: clamp(20px, 3vw, 36px); letter-spacing: -.5px; }
.marquee__sep { width: 16px; height: 16px; background: #0a0d12; clip-path: polygon(60% 0, 100% 0, 40% 100%, 0 100%); flex-shrink: 0; }

/* ---------- Заголовки секций ---------- */
.section { padding: clamp(64px, 10vw, 120px) var(--pad-x); }
.section--bg2 { background: var(--bg2); }
/* якорные блоки не прячутся под липкой шапкой при переходе по #ссылкам */
section[id], .group-head[id] { scroll-margin-top: 86px; }
.section__head { display: flex; align-items: flex-end; gap: 32px; margin-bottom: clamp(40px, 6vw, 64px); flex-wrap: wrap; }
.kicker { font-family: var(--mono); font-size: 11px; color: var(--orange); letter-spacing: 2px; text-transform: uppercase; }
.h-display { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 7vw, 96px); letter-spacing: -2px; line-height: .9; }
.h-display .accent { color: var(--orange); }
.head-aside { margin-left: auto; text-align: right; }
.head-aside .l { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.head-aside .n { font-family: var(--display); font-size: clamp(36px, 4vw, 56px); font-weight: 700; line-height: 1; }

/* ---------- Группы каталога ---------- */
.group-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.group-head .mk { font-family: var(--mono); font-size: 11px; color: var(--orange); letter-spacing: 2px; }
.group-head h3 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.5px; }
.group-head .rule { flex: 1; min-width: 20px; height: 1px; background: var(--line); }
.group-head .cnt { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 1px; }

.grid { display: grid; gap: 1px; background: var(--line); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Защита от переполнения: элементы сеток/флексов могут сжиматься уже своего контента */
.grid > *, .services-grid > *, .adv-grid > *, .stats > * { min-width: 0; }
.service, .service__head, .service__title, .card, .card__name { min-width: 0; }

/* ---------- Карточка товара ---------- */
.card { background: var(--bg2); padding: 28px; min-height: 360px; display: flex; flex-direction: column; cursor: pointer; border: 1px solid transparent; transition: border-color .18s ease, transform .18s ease, background .18s ease; text-align: left; }
.card:hover { border-color: var(--orange); transform: translateY(-3px); background: #131a26; }
.card__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; padding: 4px 8px; }
.tag--out { color: var(--orange); border: 1px solid var(--orange); }
.tag--hot { color: #0a0d12; background: var(--orange); letter-spacing: 1px; }
.tag--note { color: var(--ink); background: rgba(246,245,241,.08); border: 1px solid var(--line); letter-spacing: 1px; }
.card__code { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.thumb { position: relative; height: 170px; margin: 22px 0; overflow: hidden; background: repeating-linear-gradient(45deg, #11161f 0 14px, rgba(255,255,255,.04) 14px 15px), #11161f; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; }
.thumb .dot2 { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.thumb .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .5px; color: rgba(255,255,255,.45); text-transform: uppercase; text-align: center; padding: 0 12px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb img.img-cover, .modal__media img.img-cover { object-fit: cover; background: none; }
.card__name { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.5px; margin-bottom: 8px; color: var(--ink); }
.card__spec { font-size: 14px; color: var(--ink-dim); margin-bottom: 20px; }
.card__foot { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.card__foot .arr { color: var(--orange); }
.card__price { font-family: var(--mono); font-size: 13px; color: var(--orange); margin-bottom: 8px; }

/* ---------- Услуги ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.services-grid .service { min-height: 0; border-radius: 10px; }
.service { border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); position: relative; background: var(--surface); display: flex; flex-direction: column; gap: 20px; min-height: 300px; }
.service.is-hl { border-color: var(--orange); }
.service__flag { position: absolute; top: 20px; right: 20px; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--ink-dim); padding: 6px 10px; border: 1px solid var(--line); }
.service__flag.tr { color: var(--orange); border-color: var(--orange); }
.flag-box { width: 16px; height: 10px; }
.flag-ru { background: linear-gradient(to bottom, #fff 0 33%, #0F2C5C 33% 66%, #DA291C 66%); }
.flag-tr { background: #E30A17; }
.service__head { display: flex; align-items: flex-start; gap: 20px; padding-right: 110px; }
.service__num { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5vw, 64px); color: var(--orange); line-height: .9; }
.service__title { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.5px; line-height: 1.05; }
.service__desc { font-size: 16px; line-height: 1.55; color: var(--ink-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--ink); border: 1px solid var(--line); padding: 6px 10px; }
.chip.is-warranty { color: #0a0d12; background: var(--orange); border-color: var(--orange); }

/* ---------- Преимущества ---------- */
.adv-wrap { position: relative; overflow: hidden; }
.adv-bigE { position: absolute; right: -80px; top: -40px; font-family: var(--display); font-weight: 900; font-size: clamp(280px, 40vw, 720px); line-height: .8; color: var(--orange); opacity: .08; pointer-events: none; user-select: none; }
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.adv { padding: 0 32px; }
.adv + .adv { border-left: 1px solid var(--line); }
.adv__big { font-family: var(--display); font-weight: 800; font-size: clamp(80px, 10vw, 144px); line-height: .85; letter-spacing: -6px; display: flex; align-items: baseline; gap: 8px; }
.adv__big .u { font-size: clamp(20px, 2vw, 28px); color: var(--orange); font-weight: 600; letter-spacing: 0; }
.adv__title { font-size: 18px; font-weight: 600; margin-top: 20px; }
.adv__desc { font-size: 14px; color: var(--ink-dim); margin-top: 8px; line-height: 1.5; }

/* ---------- Контакты / форма заявки ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.contact-lead { font-size: clamp(16px, 2vw, 18px); line-height: 1.55; color: var(--ink-dim); max-width: 480px; margin-top: 24px; }
.contact-list { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.contact-item { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.contact-item .ic { width: 44px; height: 44px; min-width: 44px; border: 1.5px solid var(--orange); display: flex; align-items: center; justify-content: center; color: var(--orange); font-family: var(--mono); font-size: 16px; }
.contact-item .l { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 1px; }
.contact-item .v { font-family: var(--display); font-size: clamp(16px, 2vw, 22px); color: var(--ink); font-weight: 600; margin-top: 4px; }
.contact-item .v.sm { font-weight: 500; font-size: clamp(14px, 1.6vw, 18px); }

/* ---------- Форма ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); }
.field { margin-bottom: 22px; }
.field label { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1.5px solid var(--line);
  color: var(--ink); font-family: var(--body); font-size: 17px; padding: 0 0 12px;
  resize: vertical;
}
.field textarea { min-height: 72px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.form-consent { font-size: 12px; color: var(--ink-muted); margin-top: 14px; line-height: 1.5; }
.form-consent a { color: var(--orange); }
.form-consent--check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin: 14px 0; }
.form-consent--check input { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; accent-color: var(--orange); cursor: pointer; }

/* ---- Плашка про cookie ---- */
.cookiebar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; max-width: 760px; margin: 0 auto; background: var(--bg2); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.45); padding: 14px 18px; display: flex; align-items: center; gap: 16px; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.cookiebar a { color: var(--orange); }
.cookiebar button { flex: 0 0 auto; font-size: 13px; padding: 10px 20px; }
@media (max-width: 560px) { .cookiebar { flex-direction: column; align-items: stretch; text-align: left; gap: 10px; } }
.form-ok { display: none; padding: 32px; text-align: center; }
.form-ok.show { display: block; }
.form-ok .btn { margin-top: 24px; }
/* после успешной отправки прячем заголовок модалки («ЗАЯВКА / Оставить заявку…») */
.is-sent .modal__cat, .is-sent .modal__title, .is-sent .modal__desc { display: none; }
.form-ok .big { font-family: var(--display); font-size: 28px; font-weight: 700; margin-bottom: 12px; }

/* ---------- Футер ---------- */
.footer { background: var(--bg2); padding: 48px var(--pad-x) 32px; border-top: 1px solid var(--line); }
.footer__top { display: flex; align-items: flex-start; gap: clamp(24px, 4vw, 64px); flex-wrap: wrap; }
.footer__legal { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 1px; line-height: 1.6; }
.footer__links { margin-left: auto; display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { font-size: 14px; text-decoration: none; color: var(--ink); }
.footer__links a:hover { color: var(--orange); }
.footer__bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }

/* ---------- Модальное окно товара ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 7, 10, .8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop.show { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--line); max-width: 1040px; width: 100%; max-height: 90vh; overflow: auto; position: relative; }
.modal__close { position: absolute; top: 16px; right: 16px; z-index: 2; background: rgba(0,0,0,.4); border: 1px solid var(--line); color: var(--ink); width: 40px; height: 40px; cursor: pointer; font-size: 20px; line-height: 1; }
.modal__close:hover { border-color: var(--orange); color: var(--orange); }
.modal__body { display: grid; grid-template-columns: 1fr 1fr; }
.modal__media { background: repeating-linear-gradient(45deg, #11161f 0 14px, rgba(255,255,255,.04) 14px 15px), #11161f; min-height: 320px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; }
.modal__media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.modal__info { padding: clamp(24px, 3vw, 40px); }
.modal__cat { font-family: var(--mono); font-size: 11px; color: var(--orange); letter-spacing: 2px; }
.modal__title { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3vw, 36px); letter-spacing: -1px; margin: 12px 0; line-height: 1; }
.modal__price { font-family: var(--display); font-size: 22px; color: var(--orange); margin-bottom: 16px; }
.modal__desc { font-size: 15px; line-height: 1.6; color: var(--ink-dim); margin-bottom: 24px; }
.specs { list-style: none; border-top: 1px solid var(--line); margin-bottom: 28px; }
.specs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs li .k { color: var(--ink-muted); font-family: var(--mono); font-size: 12px; }
.specs li .val { color: var(--ink); text-align: right; }

/* ---------- Каталог: переключатель категорий ---------- */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.cat-tab { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; padding: 10px 16px; border: 1px solid var(--line); background: transparent; color: var(--ink-dim); cursor: pointer; }
.cat-tab:hover { color: var(--ink); border-color: var(--orange); }
.cat-tab.is-active { background: var(--orange); color: #0a0d12; border-color: var(--orange); font-weight: 700; }

/* ---------- Текстовые страницы (политика) ---------- */
.doc { max-width: 880px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--pad-x); }
.doc h1 { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5vw, 56px); letter-spacing: -2px; margin-bottom: 12px; }
.doc .upd { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); margin-bottom: 40px; }
.doc h2 { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.4vw, 26px); margin: 36px 0 12px; }
.doc p, .doc li { font-size: 15px; line-height: 1.7; color: var(--ink-dim); }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc a { color: var(--orange); }

/* ---- Вакансии ---- */
.vac { border: 1px solid var(--line); background: var(--bg2); padding: clamp(22px, 3vw, 40px); margin-bottom: 26px; }
.vac__top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.vac__title { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.5px; line-height: 1.05; color: var(--ink); }
.vac__sub { color: var(--ink-dim); font-size: 15px; line-height: 1.6; margin: 10px 0 0; }
.vac__salary { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--orange); margin-top: 14px; }
.vac h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--orange); margin: 24px 0 10px; }
.vac ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.vac li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.6; color: var(--ink-dim); }
.vac li::before { content: "—"; position: absolute; left: 0; color: var(--orange); }
.vac li b { color: var(--ink); font-weight: 600; }
.vac__apply { margin-top: 28px; }

/* ============================================================
   БЛОГ
   ============================================================ */
/* Лента статей */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); text-align: left; cursor: pointer; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; overflow: hidden; }
.post-card:hover { border-color: var(--orange); transform: translateY(-3px); }
.post-card__cover { position: relative; aspect-ratio: 16/10; background: #fff; overflow: hidden; }
.post-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__cover .tag { position: absolute; top: 12px; left: 12px; }
.post-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-family: var(--mono); font-size: 11px; letter-spacing: .5px; color: var(--ink-muted); margin-bottom: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.post-card__title { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -.4px; margin-bottom: 10px; }
.post-card__excerpt { font-size: 14px; line-height: 1.6; color: var(--ink-dim); margin-bottom: 16px; }
.post-card__more { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.post-card__more .arr { color: var(--orange); }

/* Страница статьи */
.post { max-width: 820px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--pad-x) 64px; }
.post__back { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); text-decoration: none; }
.post__back:hover { color: var(--orange); }
.post__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--ink-muted); margin: 22px 0 14px; }
.post__title { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 5vw, 52px); line-height: 1.04; letter-spacing: -1.5px; }
.post__lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; color: var(--ink); margin-top: 18px; }
.post__cover { margin: 30px 0; background: #fff; border: 1px solid var(--line); }
.post__cover img { width: 100%; display: block; }
.post__cover figcaption { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); padding: 8px 12px; background: var(--bg2); }
.post__body { font-size: 16px; line-height: 1.75; color: var(--ink-dim); }
.post__body h2 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.5px; color: var(--ink); margin: 40px 0 14px; }
.post__body h3 { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--ink); margin: 28px 0 10px; }
.post__body p { margin-bottom: 16px; }
.post__body ul, .post__body ol { padding-left: 22px; margin: 0 0 16px; display: grid; gap: 8px; }
.post__body a { color: var(--orange); }
.post__body b, .post__body strong { color: var(--ink); }
.post__body blockquote { margin: 24px 0; padding: 16px 22px; border-left: 3px solid var(--orange); background: var(--bg2); color: var(--ink); font-size: 17px; }
.post__body figure { margin: 26px 0; }
.post__body figure img { width: 100%; display: block; border: 1px solid var(--line); background: #fff; }
.post__body figcaption { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); margin-top: 8px; }
.post__table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.post__table th, .post__table td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.post__table th { background: var(--bg2); color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; }
.post__table td { color: var(--ink-dim); }
.post__cta { margin: 36px 0; padding: 24px; border: 1px solid var(--line); background: var(--bg2); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.post__cta p { margin: 0; color: var(--ink); font-size: 16px; }

/* Звёзды-оценка */
.rating-box { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 40px 0 8px; padding-top: 28px; border-top: 1px solid var(--line); }
.rating-box__label { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); }
.stars { display: inline-flex; gap: 4px; }
.stars button { background: none; border: none; padding: 0; cursor: pointer; font-size: 26px; line-height: 1; color: var(--line); transition: color .12s; }
.stars button.on, .stars button:hover { color: var(--orange); }
.stars.is-readonly button { cursor: default; }
.rating-box__stat { font-family: var(--mono); font-size: 13px; color: var(--ink-muted); }
.rating-box__thanks { font-size: 13px; color: var(--green); }

/* Комментарии */
.comments { margin-top: 44px; }
.comments__h { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 28px); letter-spacing: -.5px; margin-bottom: 20px; }
.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comment__head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.comment__name { font-weight: 700; color: var(--ink); }
.comment__date { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.comment__text { color: var(--ink-dim); line-height: 1.6; white-space: pre-wrap; }
.comments__empty { color: var(--ink-muted); font-size: 14px; padding: 8px 0 16px; }
.comment-form { margin-top: 24px; display: grid; gap: 12px; max-width: 560px; }
.comment-form textarea { min-height: 96px; resize: vertical; }
.comment-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px){ .comment-form .row2 { grid-template-columns: 1fr; } }

/* Заголовки переносим целыми словами, а не по буквам (чтобы хвост слова
   не «сползал» вниз). Тело текста сохраняет break-word как защиту от
   длинных ссылок/email. */
.h-display, .section__head h2, .group-head h3, .card__name, .post-card__title,
.post__title, .post__body h2, .post__body h3, .vac__title, .modal__title, .service__title,
.adv__title, .doc h1, .doc h2 { overflow-wrap: normal; word-break: normal; }

/* На телефонах уменьшаем кегль заголовков с очень длинными одиночными
   словами, чтобы они помещались целиком и не разрывались. */
@media (max-width: 600px) {
  .post__title { font-size: clamp(20px, 6.2vw, 34px); }
  .doc h1 { font-size: clamp(19px, 5.6vw, 40px); }
  .post__body h2 { font-size: clamp(20px, 5.4vw, 28px); }
  .group-head h3 { font-size: 18px; }
  .service__head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Блог — адаптив */
@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .post-card__cover { aspect-ratio: 16/9; }
  .post { padding-top: 28px; }
  .post__title { letter-spacing: -.8px; }
  .post__table { font-size: 13.5px; }
  .post__table th, .post__table td { padding: 9px 10px; }
  .post__cta { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .post__cta .btn { width: 100%; justify-content: center; }
  .rating-box { gap: 10px; }
  .rating-box__label { width: 100%; }
}

/* ============================================================
   ЧАТ-ПОМОЩНИК «МЕНЕДЖЕР МАКСИМ»
   ============================================================ */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--orange); color: #0a0d12;
  box-shadow: 0 12px 30px rgba(242, 106, 31, .45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease, filter .18s ease;
}
.fab:hover { filter: brightness(1.06); transform: translateY(-2px); }
.fab svg { width: 30px; height: 30px; position: relative; z-index: 1; }
.fab__badge { position: absolute; top: -1px; right: -1px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); }
.fab__ring { position: absolute; inset: 0; border-radius: 50%; animation: fabPulse 2.6s ease-out infinite; pointer-events: none; }
@keyframes fabPulse {
  0%   { box-shadow: 0 0 0 0 rgba(242, 106, 31, .5); }
  70%  { box-shadow: 0 0 0 18px rgba(242, 106, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 106, 31, 0); }
}

.fab-teaser {
  position: fixed; right: 96px; bottom: 34px; z-index: 150; max-width: 232px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  padding: 12px 30px 12px 14px; font-size: 14px; line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.fab-teaser::after { content: ""; position: absolute; right: -7px; bottom: 16px; width: 12px; height: 12px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(-45deg); }
.fab-teaser__x { position: absolute; top: 4px; right: 6px; background: none; border: none; color: var(--ink-muted); cursor: pointer; font-size: 15px; line-height: 1; }

.chat {
  position: fixed; right: 22px; bottom: 96px; z-index: 150;
  width: 384px; max-width: calc(100vw - 32px);
  height: 564px; max-height: calc(100vh - 130px);
  background: var(--bg2); border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 28px 64px rgba(0, 0, 0, .55);
}
.chat[hidden] { display: none; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat__ava { width: 42px; height: 42px; border-radius: 50%; background: var(--orange); color: #0a0d12; font-family: var(--display); font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.chat__name { font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.1; }
.chat__status { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.chat__close { margin-left: auto; background: none; border: none; color: var(--ink-dim); cursor: pointer; font-size: 26px; line-height: 1; }
.chat__close:hover { color: var(--ink); }
.chat__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; }
.msg--bot { align-self: flex-start; }
.msg--user { align-self: flex-end; }
.msg__bubble { padding: 10px 13px; font-size: 14px; line-height: 1.5; }
.msg--bot .msg__bubble { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 4px 14px 14px 14px; }
.msg--user .msg__bubble { background: var(--orange); color: #0a0d12; border-radius: 14px 4px 14px 14px; font-weight: 500; }
.msg__bubble b { color: inherit; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-muted); animation: typing 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat__quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.chat__chip { font-family: var(--mono); font-size: 11px; letter-spacing: .3px; padding: 7px 10px; border: 1px solid var(--line); background: transparent; color: var(--ink-dim); cursor: pointer; transition: border-color .15s, color .15s; }
.chat__chip:hover { border-color: var(--orange); color: var(--ink); }
.chat__cta { padding: 0 16px 10px; }
.chat__cta button { width: 100%; padding: 11px; background: var(--orange); color: #0a0d12; border: none; font-family: var(--body); font-weight: 700; font-size: 14px; cursor: pointer; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.chat__cta button:hover { filter: brightness(1.06); }
.chat__input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.chat__input input { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); color: var(--ink); padding: 10px 12px; font-family: var(--body); font-size: 14px; }
.chat__input input:focus { outline: none; border-color: var(--orange); }
.chat__input button { width: 44px; flex: none; background: var(--orange); color: #0a0d12; border: none; cursor: pointer; font-size: 17px; }
.chat__input button:hover { filter: brightness(1.06); }
@media (max-width: 480px) {
  .chat { right: 8px; left: 8px; width: auto; bottom: 80px; top: 64px; height: auto; max-height: none; }
  .fab { right: 16px; bottom: 16px; }
  .fab-teaser { display: none; }
}

/* ---------- Анимации ---------- */
@keyframes scrollX { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes batteryFill {
  0%   { width: 4%;   background-color: #e23b2e; }
  33%  { width: 36%;  background-color: #F26A1F; }
  66%  { width: 67%;  background-color: #efb43a; }
  100% { width: 100%; background-color: #3fd365; }
}
@keyframes voltLineMove { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -2000; } }

/* ============================================================
   АДАПТИВ — плавная подстройка под любой экран
   Брейкпоинты: 1280 / 1024 / 760 / 600 / 400
   ============================================================ */

/* Очень широкие экраны — не даём контенту «разъезжаться» */
@media (min-width: 1700px) {
  :root { --maxw: 1600px; }
}

/* Узкий десктоп / ноутбук — убираем из шапки статус и телефон, чтобы не теснило */
@media (max-width: 1380px) {
  .nav__status, .nav__phone { display: none; }
}

/* Планшеты и небольшие ноутбуки */
@media (max-width: 1024px) {
  /* Навигация → бургер. Основной CTA уезжает в выпадающее меню. */
  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px var(--pad-x) 20px; margin: 0;
    box-shadow: 0 24px 32px rgba(0, 0, 0, .45);
  }
  .nav__links.is-open .nav__link { padding: 13px 6px; font-size: 16px; }
  .nav__links.is-open .nav__link.is-active::after { left: 6px; right: auto; width: 18px; bottom: 8px; }
  .nav__burger { display: inline-flex; align-items: center; justify-content: center; }
  .nav__right > .btn--primary { display: none; }
  .nav__cta-mobile {
    display: block; margin-top: 10px; padding: 14px 16px;
    background: var(--orange); color: #0a0d12; font-weight: 700; text-align: center;
  }
  .nav__cta-mobile.is-active::after { display: none; }

  /* Сетки */
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .adv-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 0; }
  .adv:nth-child(3) { border-left: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .modal__body { grid-template-columns: 1fr; }
  .modal__media { min-height: 220px; }
}

/* Большие телефоны / маленькие планшеты — одна колонка */
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 24px 18px; }
  .stat:nth-child(3) { border-left: none; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; max-width: 540px; margin-left: auto; margin-right: auto; }
  .service { min-height: 0; }
  .adv-grid { grid-template-columns: 1fr; gap: 36px; }
  .adv { border-left: none !important; padding: 0; }
  .section__head { gap: 16px; }
  .head-aside { margin-left: 0; text-align: left; }
  .hero__sub { align-items: stretch; }
  .hero__cta { width: 100%; margin-left: 0; }
  .hero__cta .btn { flex: 1 1 220px; justify-content: center; }
}

/* Телефоны */
@media (max-width: 600px) {
  .hero__title { letter-spacing: -2px; line-height: .95; }
  /* На узких экранах слова «ВАШ СКЛАД» держим вместе на одной строке,
     а анимированную батарею выносим отдельной «заряжающейся» полосой
     под ними (flex order) — текст не наезжает, батарея остаётся. */
  .hero__title .row { gap: 8px 14px; align-items: center; }
  .battery { order: 1; flex-basis: 100%; width: 100%; max-width: 300px; height: clamp(46px, 13vw, 62px); margin-top: 4px; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; flex: none; }
  /* Услуги: флажок страны уходит в обычный поток (наверх карточки),
     заголовок больше не упирается в зарезервированное справа место */
  .service { gap: 16px; }
  .service__flag { position: static; align-self: flex-start; padding: 5px 8px; font-size: 10px; letter-spacing: 1px; }
  .service__head { padding-right: 0; gap: 14px; }
  .service__num { font-size: 44px; }
  .specs li { flex-direction: column; gap: 4px; }
  .specs li .val { text-align: left; }
  .footer__top { gap: 20px; }
  .footer__links { margin-left: 0; gap: 16px 20px; }
  .footer__bottom { flex-direction: column; gap: 8px; }
  .modal-backdrop { padding: 12px; }
  .modal__close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 18px; }
  .form-ok { padding: 24px 8px; }
}

/* Узкие телефоны */
@media (max-width: 400px) {
  .brand__sub { display: none; }
  .hero__title { letter-spacing: -1px; }
  .stat__num { font-size: 34px; }
  .stat__label { font-size: 12px; }
  .lang-switch__btn { padding: 6px 7px; font-size: 11px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
}
