:root {
  --night: #020710;
  --night-2: #0a1726;
  --bright: #3675ec;
  --blue: #1458df;
  --paper: #f5f6fa;
  --white: #ffffff;
  --ink: #080e19;
  --muted: #4b5668;
  --line: #dde0e6;
  --font: "Segoe UI", Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #6097ff; outline-offset: 3px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }

/* Шапка */
.header-bar { position: sticky; top: 0; z-index: 20; background: rgba(2, 7, 16, 0.95); backdrop-filter: blur(8px); color: #f4f6fb; border-bottom: 1px solid #121a28; }
.header { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 36px; height: 42px; color: var(--bright); stroke-width: 2.4; }
.brand span { font-size: 19px; font-weight: 750; letter-spacing: 0.5px; line-height: 1.1; }
.brand small { display: block; font-size: 10px; letter-spacing: 5px; color: var(--bright); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav a { font-size: 14px; color: #e6e9f0; padding: 26px 0 22px; border-bottom: 2px solid transparent; }
.nav a:hover { color: #7fa9ff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--bright); }
.lang { display: flex; border: 1px solid #2a3750; border-radius: 4px; overflow: hidden; }
.lang button { background: transparent; border: 0; padding: 5px 11px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: #aab6cb; }
.lang button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; background: none; border: 1px solid #33415b; border-radius: 4px; }
.menu-toggle span { display: block; width: 20px; height: 1.5px; background: #eef3ff; }

/* Тёмные верхние блоки */
.hero-wrap { position: relative; overflow: hidden; background: var(--night); color: #f9fafc; }
.hero-wrap::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, rgba(54, 117, 236, 0.28), transparent 70%),
    repeating-linear-gradient(0deg, rgba(54, 117, 236, 0.07) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(54, 117, 236, 0.07) 0 1px, transparent 1px 44px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
}
.hero { position: relative; padding-block: 80px 56px; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bright); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.5rem); font-weight: 750; letter-spacing: -0.02em; max-width: 16ch; margin-bottom: 20px; }
.hero .lead { max-width: 62ch; font-size: 1.05rem; color: #cfd5e0; margin-bottom: 30px; }
.page-hero { position: relative; padding-block: 40px 44px; }
.crumbs { font-size: 13px; color: #9aa6bb; margin-bottom: 14px; }
.crumbs a:hover { color: #7fa9ff; }
.crumbs span { margin-inline: 8px; }
.page-hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-weight: 750; letter-spacing: -0.02em; margin-bottom: 12px; }
.page-hero .lead { max-width: 68ch; color: #cfd5e0; font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 26px; background: var(--blue); border: 1px solid #2c69e3; border-radius: 4px; color: #fff; font-size: 14px; font-weight: 600; transition: background 0.18s, transform 0.18s; }
.button:hover { background: #2670f0; transform: translateY(-1px); }
.button.outline { background: transparent; border-color: #b4bac7; }
.button.outline:hover { background: #10223e; }
.benefits { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; padding-block: 8px 44px; }
.benefit { display: flex; align-items: center; gap: 14px; font-size: 14px; line-height: 1.5; }
.benefit svg { width: 36px; height: 42px; color: var(--bright); }

/* Цифры */
.stats-wrap { padding-top: 24px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); background: var(--night-2); color: #f4f6fc; border-radius: 6px; }
.stat { display: flex; align-items: center; gap: 20px; padding: 24px 28px; }
.stat + .stat { border-left: 1px solid #253141; }
.stat svg { width: 40px; height: 44px; color: var(--bright); }
.stat strong { display: block; font-size: 30px; line-height: 1.1; color: var(--bright); letter-spacing: -1px; }
.stat span { display: block; font-size: 13px; line-height: 1.45; margin-top: 4px; }

/* Секции */
.block { padding-block: 64px; }
.block.white { background: var(--white); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.lead-dark { max-width: 68ch; color: var(--muted); font-size: 1.05rem; }
.lead-dark + .lead-dark { margin-top: 14px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px; margin-top: 36px; }
.cols > div { border-top: 2px solid var(--ink); padding-top: 14px; min-width: 0; }
.cols h3 { font-size: 1.1rem; margin-bottom: 6px; }
.cols p { color: var(--muted); font-size: 0.97rem; }

/* Карточки-переходы на главной */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 32px; }
.linkcard { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 24px 22px; transition: border-color 0.2s, transform 0.2s; min-width: 0; }
.linkcard:hover { border-color: #99b6e8; transform: translateY(-3px); }
.linkcard svg { width: 42px; height: 42px; color: #183b77; margin-bottom: 8px; }
.linkcard h3 { font-size: 1.15rem; }
.linkcard p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.linkcard .more { color: var(--blue); font-weight: 600; font-size: 0.9rem; margin-top: 8px; }

.cta { background: var(--night-2); color: #f4f6fc; border-radius: 6px; padding: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta h2 { font-size: 1.6rem; margin-bottom: 6px; }
.cta p { color: #b9c3d4; max-width: 56ch; }

/* Услуги */
.svc-list { display: grid; gap: 14px; }
details.svc { background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
details.svc[open] { border-color: #99b6e8; }
details.svc > summary { list-style: none; display: flex; align-items: center; gap: 18px; padding: 20px; cursor: pointer; }
details.svc > summary::-webkit-details-marker { display: none; }
.svc-ico { width: 46px; height: 46px; color: #183b77; }
.svc-head { flex: 1; min-width: 0; }
.svc-head h3 { font-size: 1.15rem; margin-bottom: 4px; }
.svc-head p { font-size: 0.95rem; color: var(--muted); }
.code { flex-shrink: 0; font-size: 0.8rem; font-weight: 600; color: var(--blue); border: 1px solid #b8cdf3; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.chev { width: 22px; height: 22px; color: var(--blue); transition: transform 0.2s; }
details.svc[open] .chev { transform: rotate(180deg); }
.svc-body { padding: 4px 24px 26px; border-top: 1px solid var(--line); }
.svc-body h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin: 26px 0 10px; }
.svc-body p { max-width: 82ch; color: var(--muted); font-size: 0.97rem; }
.svc-body ul { margin: 0; padding-left: 20px; max-width: 82ch; color: var(--muted); font-size: 0.97rem; }
.svc-body li { margin-bottom: 7px; }
.svc-body li b { color: var(--ink); font-weight: 600; }
.svc-cta { margin-top: 28px; }
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 32px; }
.groups > div { min-width: 0; }
.groups h5 { margin: 20px 0 8px; font-size: 1rem; }
.groups ul { max-width: none; }

/* Эксперты */
.experts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.expert { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 22px; min-width: 0; }
.expert h3 { font-size: 1.15rem; margin-bottom: 14px; }
.expert dl { margin: 0; display: grid; gap: 10px; }
.expert dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.expert dd { margin: 2px 0 0; font-size: 0.95rem; color: var(--muted); }
.expert dd.lic { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* НПА */
.docs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.docs li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.docs .t { flex: 1 1 340px; min-width: 0; font-weight: 600; }
.docs .m { color: var(--muted); font-size: 0.95rem; }
.note { margin-top: 16px; font-size: 0.88rem; color: var(--muted); }

/* Контакты */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ccard { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 22px; min-width: 0; }
.ccard svg { width: 30px; height: 30px; color: #183b77; margin-bottom: 12px; }
.ccard h3 { font-size: 1rem; margin-bottom: 4px; }
.ccard p { color: var(--muted); font-size: 0.95rem; }
.form-wrap { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.form { display: grid; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 26px; }
.form label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; }
.form input, .form select, .form textarea { width: 100%; padding: 11px; border: 1px solid #cbd1dc; border-radius: 4px; background: #f8f9fc; font-size: 0.97rem; }
.form textarea { min-height: 110px; resize: vertical; }
.form .button { justify-self: start; }
.status { padding: 12px 14px; border: 1px solid #b8cdf3; background: #eaf1fe; color: #17458d; border-radius: 4px; font-size: 0.95rem; }

footer { background: var(--night); color: #9aa6bb; padding-block: 28px; font-size: 14px; }

@media (max-width: 900px) {
  .form-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 860px) {
  .header { gap: 12px; }
  .lang { order: 2; margin-left: auto; }
  .menu-toggle { display: flex; order: 3; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px 20px 14px; background: #0b1729; border-bottom: 1px solid #25354f; }
  .nav.open { display: flex; }
  .nav a { font-size: 16px; padding: 13px 0; border-bottom: 1px solid #172235; }
  .nav a[aria-current="page"] { border-bottom-color: #172235; color: #7fa9ff; }
  .stat + .stat { border-left: 0; border-top: 1px solid #253141; }
}
@media (max-width: 560px) {
  .hero { padding-block: 52px 36px; }
  .block { padding-block: 48px; }
  .brand span { font-size: 16px; }
  .actions .button { flex: 1 1 100%; }
  .cta { padding: 24px 20px; }
  .form { padding: 20px 16px; }
  details.svc > summary { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .svc-ico { width: 38px; height: 38px; }
  .svc-body { padding-inline: 16px; }
  .code { order: 3; }
}

/* Ссылки на НПА */
.docs a.t { color: var(--ink); }
.docs a.t::after { content: " \2197"; color: var(--blue); font-weight: 600; }
.docs a.t:hover { color: var(--blue); text-decoration: underline; }

/* Почта в контактах и подвале */
.ccard a { color: var(--blue); font-weight: 600; overflow-wrap: anywhere; }
.ccard a:hover { text-decoration: underline; }
footer a { color: #c4d4f2; }
footer a:hover { color: #fff; text-decoration: underline; }

/* Меняющиеся фоны в тёмных шапках страниц */
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-bg .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-bg .slide.active { opacity: 1; }
.hero-bg .slide svg { display: block; width: 100%; height: 100%; }
.hero-bg .slide.photo { background-size: cover; background-position: center; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--night) 0%, rgba(2, 7, 16, 0.88) 32%, rgba(2, 7, 16, 0.2) 78%, rgba(2, 7, 16, 0.1) 100%),
    linear-gradient(0deg, var(--night) 0%, transparent 28%);
}
.scan { animation: scan 4.5s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(410px); } }
.hero-dots { position: absolute; right: 12px; bottom: 6px; z-index: 2; display: flex; }
.hero-dots button { position: relative; width: 28px; height: 28px; padding: 0; border: 0; background: none; }
.hero-dots button::before { content: ""; position: absolute; left: 9px; top: 9px; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #6d8fd6; }
.hero-dots button[aria-pressed="true"]::before { background: var(--bright); border-color: var(--bright); }
@media (max-width: 860px) {
  .hero-bg::after { background: linear-gradient(180deg, rgba(2, 7, 16, 0.78), rgba(2, 7, 16, 0.9)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg .slide { transition: none; }
  .scan { animation: none; }
}
