/* Layout: корпоративный лендинг в китайском стиле — плотная верхняя панель, широкий тёмный баннер,
   сетки карточек, таблица характеристик, крупная форма заявки. Один светлый вид (осознанно). */
:root {
  --red: #c8102e;
  --red-dark: #9e0b22;
  --gold: #c9a35b;
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #e3e6ec;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --font-body: "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --font-num: "Barlow", "Noto Sans", Arial, sans-serif;
  --wrap: 1200px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; line-height: 1.25; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Верхняя служебная полоса ---------- */
.topbar { background: var(--navy); color: #a9b4c7; font-size: 12px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 6px; flex-wrap: wrap; }
.topbar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar a:hover { color: #fff; }
.lang { display: flex; gap: 6px; align-items: center; opacity: .7; font-size: 11px; }
.lang a { padding: 0 2px; }
.lang a[aria-current="true"] { color: #fff; }
.lang span { opacity: .5; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: #fff; border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 6px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-family: "Noto Sans SC", var(--font-body); font-size: 19px; font-weight: 900;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 18px; color: var(--navy); }
.logo-text small { font-size: 10px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; font-weight: 500; }
.nav a { padding-block: 6px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--red); border-color: var(--red); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 4px; font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.menu-btn { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--navy); margin-left: auto; }

/* ---------- Баннер ---------- */
.hero { position: relative; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 60%, #3a0d1a 100%); color: #fff; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero .wrap { position: relative; padding-block: 72px 56px; display: grid; gap: 28px; }
.hero-tag {
  display: inline-flex; align-self: start; justify-self: start; gap: 8px; align-items: center;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(201,163,91,.5); padding: 4px 12px; border-radius: 2px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; max-width: 17em; }
.hero h1 em { font-style: normal; color: var(--gold); white-space: nowrap; }
.hero .lead { font-size: 17px; color: #c9d3e3; max-width: 40em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.12); margin-top: 20px; border: 1px solid rgba(255,255,255,.12); }
.stat { background: rgba(11,31,58,.75); padding: 18px 20px; }
.stat b { display: block; font-family: var(--font-num); font-size: 32px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: #a9b4c7; }

/* ---------- Секции ---------- */
.section { padding-block: 72px; }
.section.soft { background: var(--bg-soft); }
.sec-head { display: grid; gap: 10px; margin-bottom: 40px; text-align: center; justify-items: center; }
.sec-head .eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.sec-head h2 { font-size: clamp(24px, 3vw, 34px); color: var(--navy); }
.sec-head h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--red); margin: 14px auto 0; }
.sec-head p { color: var(--muted); max-width: 46em; }

/* Возможности */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat { background: #fff; border: 1px solid var(--line); padding: 26px; display: grid; gap: 10px; align-content: start; transition: border-color .15s, transform .15s; }
.feat:hover { border-color: var(--red); transform: translateY(-2px); }
.feat .ico { width: 44px; height: 44px; color: var(--red); }
.feat h3 { font-size: 18px; color: var(--navy); }
.feat p { color: var(--muted); font-size: 14px; }

/* Характеристики */
.spec-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.spec-wrap > * { min-width: 0; }
.spec-intro { display: grid; gap: 16px; }
.spec-intro h3 { font-size: 22px; color: var(--navy); }
.spec-intro p { color: var(--muted); }
.spec-intro ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink); }
.table-scroll { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.spec th, table.spec td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.spec th { width: 42%; color: var(--muted); font-weight: 500; background: var(--bg-soft); }
table.spec td { font-variant-numeric: tabular-nums; font-weight: 500; }
table.spec caption { text-align: left; font-weight: 700; padding: 12px 16px; background: var(--navy); color: #fff; }

/* Отрасли */
.ind { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); background: #fff; }
.ind-item { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.ind-item:nth-child(3n) { border-right: 0; }
.ind-item:nth-last-child(-n+3) { border-bottom: 0; }
.ind-item h3 { font-size: 17px; color: var(--navy); display: flex; gap: 10px; align-items: center; }
.ind-item h3::before { content: ""; width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); flex: none; }
.ind-item p { color: var(--muted); font-size: 14px; }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan-price.text { font-size: 28px; }
.plan { min-width: 0; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.plan-top { padding: 26px 26px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.plan-name { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.plan-price { font-family: var(--font-num); font-size: 40px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
.plan-price small { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); }
.plan-note { font-size: 13px; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 20px 26px; display: grid; gap: 10px; font-size: 14px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "✓"; color: var(--red); font-weight: 700; flex: none; }
.plan .btn { margin: 0 26px 26px; }
.plan .btn-outline { border-color: var(--navy); color: var(--navy); }
.plan .btn-outline:hover { background: var(--navy); color: #fff; }
.plan.featured { border: 2px solid var(--red); position: relative; }
.plan.featured .plan-badge { position: absolute; top: -1px; right: 20px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; }
.plan.featured .plan-price { color: var(--red); }
.pricing-extra { margin-top: 28px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.pricing-extra > * { min-width: 0; }
.disc { background: #fff; border: 1px solid var(--line); }
.disc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.disc th, .disc td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.disc th { background: var(--bg-soft); color: var(--muted); font-weight: 500; }
.disc td:last-child { font-family: var(--font-num); font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.disc caption { text-align: left; font-weight: 700; padding: 12px 16px; color: var(--navy); }
.trial { background: var(--navy); color: #fff; padding: 26px; display: grid; gap: 12px; align-content: start; }
.trial b { font-family: var(--font-num); font-size: 44px; line-height: 1; color: var(--gold); }
.trial p { color: #c9d3e3; font-size: 14px; }
.fine { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }

/* Порядок сотрудничества */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; }
.step { position: relative; padding: 0 16px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--red); color: var(--red);
  font-family: var(--font-num); font-weight: 700; font-size: 20px; position: relative; z-index: 1;
}
.step:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: calc(50% + 28px); right: calc(-50% + 28px); height: 2px; background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 12px); }
.step h3 { font-size: 16px; color: var(--navy); }
.step p { font-size: 13px; color: var(--muted); }

/* Безопасность */
.sec-band { background: var(--navy); color: #fff; }
.sec-band .sec-head h2 { color: #fff; }
.sec-band .sec-head p { color: #a9b4c7; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.badge-card { border: 1px solid rgba(255,255,255,.15); padding: 24px; display: grid; gap: 10px; align-content: start; }
.badge-card h3 { font-size: 16px; color: var(--gold); }
.badge-card p { font-size: 14px; color: #c9d3e3; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); }
.faq summary { padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* Форма заявки */
.contact { background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); }
.contact-box { display: grid; grid-template-columns: 1fr 1.6fr; border: 1px solid var(--line); background: #fff; box-shadow: 0 20px 50px -30px rgba(11,31,58,.35); }
.contact-box > * { min-width: 0; }
.contact-info { background: var(--red); color: #fff; padding: 40px 32px; display: grid; gap: 22px; align-content: start; }
.contact-info h2 { font-size: 28px; }
.contact-info p { color: #ffe3e7; }
.contact-info dl { margin: 0; display: grid; gap: 14px; }
.contact-info dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.contact-info dd { margin: 0; font-weight: 600; word-break: break-word; }
.form { padding: 40px 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--navy); }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid #cfd5df; border-radius: 3px;
  background: #fff; color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.12); }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.consent { grid-column: 1 / -1; display: flex; gap: 10px; font-size: 13px; color: var(--muted); align-items: flex-start; }
.consent input { margin-top: 4px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.form-actions .btn { padding: 13px 34px; font-size: 15px; }
.form-msg { font-size: 14px; }
.form-msg.ok { color: #1a7f45; font-weight: 600; }
.form-msg.err { color: var(--red); }
.hp { position: absolute; left: -9999px; }

/* API */
.eyebrow-l { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.api-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.api-wrap > * { min-width: 0; }
.api-text { display: grid; gap: 16px; }
.api-text h2 { font-size: clamp(24px, 3vw, 32px); color: var(--navy); }
.api-text p { color: var(--muted); }
.api-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.api-list li { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.api-list b { color: var(--navy); }
.api-list span { color: var(--muted); }
.code { background: #0a1628; border-radius: 6px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(11,31,58,.6); }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #101f38; color: #7f8ba3; font: 12px/1 ui-monospace, Menlo, Consolas, monospace; }
.code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3a58; }
.code-bar span { margin-left: 10px; }
.code pre { margin: 0; padding: 20px; overflow-x: auto; color: #d6deeb; font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace; }
.code .c { color: #6b7a96; }
.code .s { color: #e6c07b; }
.code .k { color: #ff8a9a; }
.plan-min { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* О компании */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.about-grid > * { min-width: 0; }
.about-facts { background: #fff; border: 1px solid var(--line); padding: 8px 28px; }
.about-facts dl { margin: 0; }
.about-facts dl > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.about-facts dl > div:last-child { border-bottom: 0; }
.about-facts dt { color: var(--muted); font-size: 13px; }
.about-facts dd { margin: 0; font-weight: 600; color: var(--navy); }
.ph { color: var(--muted) !important; font-weight: 500 !important; font-style: italic; }
.map-ph { min-height: 240px; border: 1px dashed #b9c1cf; background: repeating-linear-gradient(45deg, #eef1f5 0 12px, #f7f8fa 12px 24px); display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.map-ph svg { color: var(--red); }
.sub-h { font-size: 20px; color: var(--navy); margin: 48px 0 20px; text-align: center; }
.lic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lic { background: #fff; border: 1px solid var(--line); padding: 16px; display: grid; gap: 6px; text-align: center; }
.lic-doc { margin-bottom: 8px; box-shadow: 0 10px 24px -14px rgba(11,31,58,.45); transition: transform .2s; }
.lic:hover .lic-doc { transform: translateY(-3px); }
.lic-doc svg { display: block; width: 100%; height: auto; }
.map { position: relative; min-height: 260px; border: 1px solid var(--line); overflow: hidden; background: #eef1f4; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-card { position: absolute; left: 16px; right: 16px; bottom: 16px; background: #fff; padding: 12px 16px; box-shadow: 0 8px 20px -10px rgba(11,31,58,.4); display: grid; gap: 2px; font-size: 13px; }
.map-card b { color: var(--navy); }
.map-card span { color: var(--muted); }
.lic b { font-size: 14px; color: var(--navy); }
.lic small { font-size: 12px; color: var(--muted); }

/* Подвал */
.footer { background: #071426; color: #8d98ad; font-size: 13px; }
.footer .wrap { padding-block: 48px 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a:hover { color: #fff; }
.foot-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; }

/* Плавающая кнопка */
.float-cta {
  position: fixed; right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); z-index: 30;
  background: var(--red); color: #fff; padding: 12px 16px; border-radius: 4px; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 20px -6px rgba(200,16,46,.6);
}
.float-cta:hover { background: var(--red-dark); }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; padding: 8px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding-block: 12px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: block; }
  .header .btn-red { display: none; }
  .grid-3, .ind { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ind-item:nth-child(3n) { border-right: 1px solid var(--line); }
  .ind-item:nth-child(2n) { border-right: 0; }
  .ind-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .ind-item:nth-last-child(-n+2) { border-bottom: 0; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .spec-wrap, .pricing-extra, .contact-box, .api-wrap, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .lic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .step { grid-template-columns: 56px 1fr; text-align: left; justify-items: start; column-gap: 16px; padding: 0; }
  .step::before { grid-row: span 2; }
  .step:not(:last-child)::after { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding-block: 52px; }
  .grid-3, .plans, .ind, .grid-4, .form, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .ind-item { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .ind-item:last-child { border-bottom: 0 !important; }
  .form { padding: 28px 20px; }
  .api-list li, .about-facts dl > div { grid-template-columns: 1fr; gap: 2px; }
  .about-facts { padding: 4px 18px; }
  .contact-info { padding: 28px 20px; }
  .hero .wrap { padding-block: 48px 36px; }
  .stat b { font-size: 26px; }
  .float-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.form-msg.ok { flex-basis: 100%; background: #e8f6ee; border: 1px solid #b7e2c8; padding: 12px 16px; border-radius: 4px; }
