/* ============ Лендинг Modbus Monitor — в стиле панели программы ============ */
:root {
  --bg: #0b0f17;
  --bg-soft: #0e1420;
  --panel: #141c2c;
  --panel-2: #0f1626;
  --border: #1f2a3d;
  --border-2: #2a3a55;
  --text: #e6edf7;
  --muted: #8ba0bd;
  --accent: #10b981;
  --accent-2: #0ea5e9;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --warn: #f59e0b;
  --danger: #ef4444;
  --mono: "Cascadia Mono", Consolas, "JetBrains Mono", "Courier New", monospace;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(1100px 560px at 85% -8%, rgba(16, 185, 129, 0.10), transparent 60%),
    radial-gradient(900px 460px at -10% 2%, rgba(56, 189, 248, 0.07), transparent 55%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.wrap--narrow { width: min(860px, calc(100% - 32px)); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border-2);
  font: 600 14px/1.2 var(--sans); color: var(--text); background: var(--panel);
  cursor: pointer; transition: background .15s, border-color .15s, transform .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #04140e; }
.btn--accent:hover { background: #12c98c; }
.btn--ghost { background: transparent; }
.btn--light { background: #fff; color: #0b0f17; border-color: #fff; }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--lg { padding: 13px 22px; font-size: 15px; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Акция ---------- */
.promo { background: linear-gradient(90deg, #b45309, #d97706 45%, #10b981); color: #fff; font-size: 14px; }
.promo__inner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 8px 0; }
.promo__label { background: rgba(0, 0, 0, .22); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.promo__timer { font-family: var(--mono); font-weight: 700; background: rgba(0, 0, 0, .22); border-radius: 8px; padding: 2px 8px; }

/* ---------- Шапка ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(11, 15, 23, .86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar__inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand__logo { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #10b981, #0ea5e9); display: grid; place-items: center; box-shadow: 0 4px 18px rgba(16, 185, 129, .35); flex: none; }
.brand__logo svg { width: 24px; height: 24px; }
.brand__title { display: block; font-weight: 700; font-size: 16px; }
.brand__sub { display: block; font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.topbar__phone { color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; }

/* Режим «общая шапка сайта» (LANDING_SITE_CHROME=1): разделы — второй строкой под шапкой основного сайта.
   Не закреплена (sticky): чтобы не наложиться на шапку основного сайта. */
.subnav { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.subnav__inner { display: flex; align-items: center; gap: 16px; min-height: 46px; }
.subnav .nav { display: flex; gap: 18px; margin-left: 0; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.subnav .nav::-webkit-scrollbar { display: none; }
.subnav .topbar__phone { margin-left: auto; }
@media (max-width: 600px) { .subnav .btn--accent { display: none; } }

/* ---------- Первый экран ---------- */
.hero { padding: 64px 0 40px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; border: 1px solid rgba(16, 185, 129, .25); }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); margin: 18px 0 16px; }
.lead { font-size: 18px; color: var(--muted); max-width: 600px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 7px; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.dot--live { box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

.hero__visual { position: relative; padding: 18px 0 36px; }
.frame { border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .02); }
.frame__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.frame__bar span { margin-left: 8px; }
.float { position: absolute; background: rgba(20, 28, 44, .94); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); backdrop-filter: blur(6px); }
.float--card { left: -28px; bottom: 0; width: 210px; padding: 12px 14px; }
.float__head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.float__value { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.float__value b { font: 700 26px/1.1 var(--mono); color: var(--text); }
.spark { width: 100%; height: 32px; display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.float--alarm { right: -16px; top: 0; display: flex; gap: 10px; align-items: center; padding: 10px 14px; font-size: 13px; }
.float--alarm b { display: block; }
.float--alarm span { color: var(--muted); font-size: 12px; }
.float__icon { width: 28px; height: 28px; border-radius: 8px; background: rgba(239, 68, 68, .16); color: var(--danger); display: grid; place-items: center; font-weight: 800; flex: none; }

/* ---------- Цифры ---------- */
.numbers { padding: 8px 0 24px; }
.numbers__grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); }
.numbers__grid > div { padding: 18px 22px; border-left: 1px solid var(--border); }
.numbers__grid > div:first-child { border-left: 0; }
.numbers b { display: block; font-size: 22px; color: var(--accent); }
.numbers span { color: var(--muted); font-size: 13.5px; }

/* ---------- Разделы ---------- */
.section { padding: 72px 0; }
.section--soft { background: linear-gradient(180deg, rgba(20, 28, 44, .35), rgba(20, 28, 44, .1)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { text-align: center; margin-bottom: 36px; }
.section__head h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.section__head p { color: var(--muted); max-width: 680px; margin: 0 auto; }

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.card h3 { font-size: 17px; margin: 14px 0 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card__icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; }
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Экраны ---------- */
.tabs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { background: var(--panel); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 8px 16px; font: 600 14px var(--sans); cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--accent-soft); border-color: rgba(16, 185, 129, .45); color: var(--accent); }
.shot { max-width: 1040px; margin: 0 auto; }
.shot img { transition: opacity .25s; }
.shot img.is-loading { opacity: .3; }
.shot figcaption { text-align: center; color: var(--muted); margin-top: 14px; font-size: 14.5px; }

/* ---------- Объекты ---------- */
.ind { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; padding: 16px 18px; background: var(--panel-2); }
.ind b { display: block; margin-bottom: 4px; }
.ind span { color: var(--muted); font-size: 14px; }

/* ---------- Шаги ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: none; }
.steps li { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.steps__n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #04140e; font-weight: 800; margin-bottom: 12px; }
.steps b { display: block; margin-bottom: 6px; }
.steps li > span:last-child { color: var(--muted); font-size: 14px; }

/* ---------- Цены ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; }
.plan--hl { border-color: rgba(16, 185, 129, .6); box-shadow: 0 0 0 1px rgba(16, 185, 129, .25), 0 20px 50px rgba(16, 185, 129, .08); }
.plan__tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: #04140e; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan__sale { position: absolute; top: -12px; right: 24px; background: var(--warn); color: #1c1003; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; }
.plan__dev { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.plan__price { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.plan__price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.plan__old { color: var(--muted); text-decoration: line-through; font-size: 16px; min-height: 22px; }
.plan__note { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.plan ul { list-style: none; display: grid; gap: 8px; margin-bottom: 24px; font-size: 14.5px; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: auto; }

.pricing-more { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; align-items: start; }
.calc, .extras { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.calc h3, .extras h3 { font-size: 17px; margin-bottom: 14px; }
.calc__row { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.calc__devices { display: flex; gap: 12px; align-items: center; }
.calc__devices input[type=range] { flex: 1; accent-color: var(--accent); }
.calc__devices input[type=number] { width: 90px; }
.calc__extras { display: grid; gap: 8px; margin: 16px 0; font-size: 14px; }
.calc__extras label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.calc__extras input { accent-color: var(--accent); width: 16px; height: 16px; }
.calc__extras em { margin-left: auto; font-style: normal; color: var(--muted); white-space: nowrap; }
.calc__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--border-2); padding-top: 14px; margin-bottom: 16px; }
.calc__sum b { font-size: 26px; }
.calc__sum s { color: var(--muted); }
.extras ul { list-style: none; display: grid; gap: 10px; }
.extras li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.extras li span { color: var(--muted); font-size: 13px; display: block; }
.extras li b { white-space: nowrap; }
.extras__h { margin-top: 22px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cmp th, .cmp td { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.cmp th { color: var(--muted); font-weight: 600; }
.cmp td:nth-child(n+2) { color: var(--muted); }
.cmp td:last-child { color: var(--accent); }

/* ---------- Вопросы ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; font-size: 15px; white-space: pre-line; }

/* ---------- Связь: почта и телефон (формы заявки нет) ---------- */
.order { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.order__text, .order__contacts { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.order__text h2 { font-size: 28px; margin-bottom: 6px; }
.order__text > p { margin-bottom: 18px; }
.order__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 16px; }
.order__note { font-size: 13px; }
.order__note a { color: var(--accent); }
.field { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.field--wide { grid-column: 1 / -1; }
input, textarea, select {
  font: 15px var(--sans); color: var(--text); background: var(--panel-2); border: 1px solid var(--border-2);
  border-radius: 9px; padding: 10px 12px; width: 100%; outline: none; transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input.is-bad { border-color: var(--danger); }
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-bottom: 16px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.form-msg { margin-top: 14px; padding: 10px 14px; border-radius: 9px; font-size: 14px; }
.form-msg--ok { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(16, 185, 129, .35); }
.form-msg--err { background: rgba(239, 68, 68, .12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .35); }

.contacts { list-style: none; display: grid; gap: 14px; }
.contacts li span { display: block; font-size: 12.5px; color: var(--muted); }
.contacts a, .contacts b { color: var(--text); font-weight: 600; font-size: 16px; }
.contacts--big a { font-size: 20px; }
.messengers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--border); padding: 24px 0 28px; color: var(--muted); font-size: 13.5px; }
.footer__inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* Нижняя панель на телефоне */
.mbar { display: none; }

/* ---------- Появление при прокрутке (сдержанно) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .dot--live { animation: none; }
  .card:hover { transform: none; }
}

/* ---------- Адаптация ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .topbar__phone { margin-left: auto; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 760px; }
  .float--card { left: 8px; }
  .float--alarm { right: 8px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .pricing-more, .order { grid-template-columns: 1fr; }
  .numbers__grid { grid-template-columns: 1fr 1fr; }
  .numbers__grid > div:nth-child(3) { border-left: 0; }
  .numbers__grid > div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .topbar__inner { gap: 10px; min-height: 56px; }
  .topbar .btn--accent, .topbar__phone, .brand__sub { display: none; }
  .hero { padding: 36px 0 24px; }
  .lead { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .float--card { width: 170px; bottom: -6px; }
  .float--alarm { top: -6px; font-size: 12px; }
  .grid--3, .steps { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .order__text, .order__contacts { padding: 20px; }
  .order__actions .btn { flex: 1 1 100%; }
  .promo__inner { gap: 8px; font-size: 13px; }
  body { padding-bottom: 68px; }
  .mbar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(11, 15, 23, .94); border-top: 1px solid var(--border); backdrop-filter: blur(8px); }
  .mbar .btn { flex: 1; }
}

/* Уведомление о cookies (только если подключена Яндекс Метрика) */
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: 420px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--muted); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
@media (max-width: 600px) { .cookie { left: 8px; right: 8px; bottom: 76px; } }

/* ---------- Политика конфиденциальности ---------- */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: 30px; margin-bottom: 8px; }
.doc h2 { font-size: 19px; margin: 28px 0 10px; }
.doc p, .doc li { color: #c3cfe0; margin-bottom: 8px; }
.doc ul { padding-left: 22px; }
.doc .muted { color: var(--muted); }

/* ---------- Документация ---------- */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.doc { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s, transform .15s; }
.doc:hover { border-color: rgba(16, 185, 129, .5); transform: translateY(-2px); }
.doc__main { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; color: var(--text); flex: 1; }
.doc__main:hover { text-decoration: none; }
.doc__alt { border-top: 1px dashed var(--border-2); padding: 9px 18px 10px 76px; font-size: 13px; font-weight: 600; color: var(--info, #38bdf8); }
.doc__icon { flex: none; width: 44px; height: 52px; border-radius: 6px; background: rgba(239, 68, 68, .14); border: 1px solid rgba(239, 68, 68, .35); color: #fca5a5; display: grid; place-items: center; font: 700 11px var(--sans); letter-spacing: .04em; }
.doc__body { display: grid; gap: 3px; }
.doc__body b { font-size: 15px; }
.doc__desc { color: var(--muted); font-size: 13.5px; }
.doc__meta { color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 2px; }
.docs__all { text-align: center; margin-top: 22px; }
.footer__links a { color: var(--muted); }
@media (max-width: 600px) { .docs { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .doc:hover { transform: none; } }

/* ---------- Логотип АСД-ТЕХ ---------- */
.vendor { display: inline-block; margin-bottom: 4px; }
.vendor img { height: 40px; width: auto; display: block; }
.vendor__note { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.footer__vendor { display: inline-flex; align-items: center; opacity: .9; }
.footer__vendor:hover { opacity: 1; }
.footer__vendor img { height: 24px; width: auto; display: block; }
.footer__inner { align-items: center; }
.brand__sub { display: flex; align-items: center; gap: 6px; }
@media (max-width: 600px) { .topbar .brand__sub { display: none; } }
.brand__mark { height: 12px; width: auto; }
