/* ТД РТИ — стили сайта. Цвета и шрифты заданы переменными в :root, правьте их здесь. */
:root {
  --blue: #0056A3;
  --blue-dark: #00457f;
  --ink: #1F2937;
  --deep: #0F1722;
  --mist: #EAF1F8;
  --line: #C9D4E0;
  --grey: #5b6675;
  --white: #ffffff;
  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Roboto", "Segoe UI", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 64px; }
.section--mist { background: var(--mist); }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.eyebrow {
  font-family: var(--font-head); font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px;
}
.section--dark .eyebrow, .hero .eyebrow { color: #8fb8e3; }
.lead { font-size: 1.1rem; color: var(--grey); max-width: 64ch; }
.section--dark .lead { color: #c3cfdd; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 14px 26px; border: 2px solid var(--blue); background: var(--blue); color: var(--white);
  text-decoration: none; border-radius: 3px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--ghost { background: transparent; border-color: var(--white); color: var(--white); }
.btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--small { padding: 10px 18px; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- шапка ---------- */
.topbar { background: var(--deep); color: #c3cfdd; font-size: .85rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 28px; justify-content: flex-end; padding-block: 8px; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

.header { background: var(--white); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.header::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--blue) 72%, var(--ink) 72%); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 10px; }
.logo img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.nav .btn { color: var(--white); border-bottom: 2px solid var(--blue); padding: 10px 18px; }
.nav .btn:hover { color: var(--white); border-color: var(--ink); }
.menu-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 3px; padding: 8px 12px; font: 600 .9rem var(--font-head); color: var(--ink); cursor: pointer; }

/* ---------- первый экран ---------- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(31,41,55,.97) 38%, rgba(31,41,55,.55) 100%),
    linear-gradient(180deg, #1F2937, #0F1722);
}
.hero__road { position: absolute; right: -4%; bottom: -6%; width: 62%; max-width: 780px; opacity: .9; pointer-events: none; }
.hero .wrap { position: relative; padding-block: 88px 96px; }
.hero h1 { color: var(--white); max-width: 15ch; }
.hero .lead { color: #d3deeb; margin-top: 18px; }
.hero--small .wrap { padding-block: 56px 60px; }
.hero--small h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); max-width: 24ch; }
.crumbs { font-size: .85rem; margin-bottom: 14px; color: #b5c4d6; }
.crumbs a { color: #d3deeb; }

/* ---------- сетки и карточки ---------- */
.grid { display: grid; gap: 22px; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.feature { background: var(--white); padding: 24px 22px; border-top: 3px solid var(--blue); }
.section--mist .feature { background: var(--white); }
.feature h3 { color: var(--blue); }
.feature p { margin: 0; color: var(--grey); font-size: .95rem; }

.tile {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--blue); transform: translateY(-2px); color: var(--ink); }
.tile__art { background: var(--mist); height: 120px; display: flex; align-items: center; justify-content: center; border-bottom: 3px solid var(--blue); }
.tile__art svg { width: 84px; height: 84px; }
.tile__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile__body h3 { margin: 0; }
.tile__body p { margin: 0; color: var(--grey); font-size: .93rem; }
.tile__more { margin-top: auto; padding-top: 12px; font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li { border: 1px solid #44546a; padding: 10px 16px; font-family: var(--font-head); font-size: .9rem; font-weight: 500; }

/* ---------- таблицы ---------- */
.table-scroll { overflow-x: auto; margin: 18px 0 8px; }
table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: .95rem; }
th { background: var(--ink); color: var(--white); font-family: var(--font-head); font-size: .82rem; letter-spacing: .04em; text-align: left; padding: 12px 16px; border-bottom: 3px solid var(--blue); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) td { background: var(--mist); }
.note { color: var(--grey); font-size: .85rem; }

.two-col { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.aside { background: var(--mist); border-top: 3px solid var(--blue); padding: 22px; }
.aside h3 { margin-bottom: .5em; }
.aside ul { margin: 0; padding-left: 1.1em; }
.aside li { margin-bottom: .4em; }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.facts b { min-width: 150px; font-family: var(--font-head); font-size: .85rem; }

/* ---------- форма ---------- */
.form-wrap { background: var(--deep); color: var(--white); }
.form-wrap h2 { color: var(--white); }
.form-wrap .lead { color: #c3cfdd; }
.form { display: grid; gap: 16px; max-width: 640px; margin-top: 26px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-family: var(--font-head); font-weight: 500; color: #d3deeb; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--white); border: 2px solid transparent; border-radius: 3px; padding: 12px 14px; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: #8fb8e3; }
.field textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: #c3cfdd; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.consent a { color: #fff; }
.form-status { min-height: 1.4em; font-size: .95rem; color: #bfe0ff; }
.form-status.err { color: #ffb4b4; }
.hp { position: absolute; left: -9999px; }

/* ---------- подвал ---------- */
.footer { background: var(--deep); color: #c3cfdd; font-size: .92rem; }
.footer::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--blue) 75%, #fff 75%, #fff 83%, var(--blue) 83%); }
.footer .wrap { display: grid; gap: 36px; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); padding-block: 48px 28px; }
.footer img { height: 54px; width: auto; margin-bottom: 14px; }
.footer h3 { color: var(--white); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer__slogan { font-family: var(--font-head); font-size: .78rem; letter-spacing: .12em; color: #8fb8e3; }
.footer__bottom { grid-column: 1 / -1; border-top: 1px solid #263243; padding-top: 18px; font-size: .82rem; color: #8b9bb0; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- seo-блоки ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; color: var(--dark); list-style: none; padding-right: 28px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 1.4rem; color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; }
.diagram { margin: 22px 0; padding: 14px; background: var(--mist); border: 1px solid var(--line); border-radius: 8px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: .82rem; color: #6b7280; margin-top: 8px; }
.svg-l { font: 500 13px Roboto, Arial, sans-serif; fill: #1F2937; }
.svg-b { font-weight: 700; fill: #0056A3; }
.cases { display: grid; gap: 22px; margin: 24px 0 36px; }
.case { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; padding: 20px 22px; background: #fff; }
.case h3 { margin: 0 0 8px; }
.case p { margin: 8px 0; }
.case .diagram { margin: 12px 0; max-width: 640px; }
.btn--ghost-dark { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn--ghost-dark:hover { background: var(--blue); color: #fff; }

/* ---------- адаптив ---------- */
@media (max-width: 880px) {
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero__road { width: 110%; right: -30%; opacity: .45; }
}
@media (max-width: 760px) {
  .section { padding-block: 44px; }
  .hero .wrap { padding-block: 56px 64px; }
  .topbar .wrap { justify-content: flex-start; }
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 18px; border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; text-align: center; }
  .logo img { height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .btn { transition: none; }
}
@media print {
  .topbar, .header, .form-wrap, .footer::before { display: none; }
  .hero { background: none; color: #000; }
}
