:root {
  --navy: #102e52;
  --navy-2: #133564;
  --navy-3: #071A33;
  --steel: #1D4E89;
  --blue: #2563C9;
  --teal: #0E7C86;
  --amber: #F5A800;
  --burnt: #C77700;
  --black: #0F1114;
  --muted: #4B5563;
  --pale: #EEF3F9;
  --line: #D3DBE6;
  --light: #C8D6EA;
  --light-2: #9FB6D3;
  --rule-dark: rgba(255, 255, 255, .16);
  --r-btn: 12px;
  --r-card: 12px;
  --head: "Montserrat", serif;
  --body: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html:not(.js) { scroll-behavior: smooth; }
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--black);
  background: #fff;
}

img, svg { max-width: 100%; }

h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--amber); }
[tabindex="-1"]:focus { outline: none; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--r-btn);
}
.skip:focus { top: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  font: 600 1.0625rem/1 var(--body);
  text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: var(--r-btn);
  background: transparent; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn--amber { background: var(--amber); border-color: var(--amber); color: var(--black); }
.btn--amber:hover { background: #FFBA2E; border-color: #FFBA2E; }
.btn--navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--steel); border-color: var(--steel); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .65); color: #fff; }
.btn--ghost-light:hover { background: #fff; border-color: #fff; color: var(--navy); }
.btn--ghost { border-color: var(--black); color: var(--black); }
.btn--ghost:hover { background: var(--black); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

.text-btn {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy); color: #fff;
  border-bottom: 1px solid var(--rule-dark);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.brand {
  display: flex; align-items: center; gap: 12px;
  font: 600 1.25rem/1 var(--head); text-decoration: none; color: #fff;
}
.brand svg { width: 34px; height: 34px; flex: none; }

.burger {
  width: 48px; height: 48px; padding: 0; display: grid; place-items: center;
  background: transparent; color: #fff;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: var(--r-btn); cursor: pointer;
}
.burger svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.burger .ico-close { display: none; }
.burger[aria-expanded="true"] .ico-open { display: none; }
.burger[aria-expanded="true"] .ico-close { display: block; }

.nav {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--navy-2); border-bottom: 1px solid var(--rule-dark);
  padding: 4px 16px 16px;
  visibility: hidden; opacity: 0; transform: translateY(-10px);
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}
.site-header.is-open .nav {
  visibility: visible; opacity: 1; transform: none;
  transition-delay: 0s;
}
html:not(.js) .nav { position: static; visibility: visible; opacity: 1; transform: none; }
.nav a {
  display: flex; align-items: center; min-height: 54px;
  border-bottom: 1px solid var(--rule-dark);
  font-weight: 500; text-decoration: none; color: #fff;
  transition: color .25s ease;
}
.nav a[aria-current="true"] { color: #FFC857; }

.header-cta { display: none; }

.hero {
  color: #fff;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    radial-gradient(900px 480px at 100% 0%, rgba(37, 99, 201, .35), transparent 70%);
  background-size: 40px 40px, 40px 40px, auto;
}
.hero-grid { display: grid; gap: 40px; padding: 44px 0 52px; }

h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 6.6vw, 3.5rem);
  line-height: 1.1; font-weight: 700;
}
.lead { margin: 0 0 24px; max-width: 34em; font-size: 1.25rem; line-height: 1.5; color: #D5E2F4; }

.hero-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 10px; }
.hero-list li { position: relative; padding-left: 26px; font-weight: 500; color: #fff; }
.hero-list li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 10px; height: 10px; background: var(--amber); border-radius: 2px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions .btn { width: 100%; }

/* Иллюстрации-чертежи. Чтобы поставить фото, замените <svg> на <img src="foto.jpg" alt="..."> */
.drawing { margin: 0; width: 100%; border-radius: 12px; overflow: hidden; }
.drawing svg, .drawing img { display: block; width: 100%; height: auto; }
.illu text { font: 600 13px var(--body); }
.titleblock { display: grid; grid-template-columns: 1.5fr 1fr; font-size: .875rem; }
.titleblock span { padding: 9px 14px; }
.titleblock span + span { border-left: 1px solid; }
.drawing--dark { background: #0E2B50; border: 1px solid rgba(255, 255, 255, .3); }
.drawing--dark .titleblock { color: var(--light); border-top: 1px solid rgba(255, 255, 255, .3); }
.drawing--dark .titleblock span + span { border-color: rgba(255, 255, 255, .3); }
.drawing--light { background: #fff; border: 1px solid var(--navy); }
.drawing--light .titleblock { color: var(--black); border-top: 1px solid var(--navy); background: var(--pale); }
.drawing--light .titleblock span + span { border-color: var(--navy); }

/* Полоса со сведениями */
.facts { background: var(--navy-3); border-top: 1px solid var(--rule-dark); }
.facts-grid { display: grid; margin: 0; }
.fact { padding: 18px 0; }
.fact + .fact { border-top: 1px solid var(--rule-dark); }
.fact dt { margin: 0 0 4px; font-size: .9375rem; color: var(--light-2); }
.fact dd { margin: 0; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.fact a { color: #FFC857; text-underline-offset: 3px; }
.fact small { display: block; margin-top: 2px; font-size: .9375rem; font-weight: 400; color: var(--light); }

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section--pale { background: var(--pale); }
.section--dark { background: var(--navy); color: #fff; }
.section h2 {
  margin: 0 0 28px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.75rem, 4.6vw, 2.5rem); font-weight: 700;
}
.section--dark h2 { border-color: rgba(255, 255, 255, .25); }
.section-lead { margin: -4px 0 32px; max-width: 38em; font-size: 1.1875rem; color: #1F2937; }

/* Услуги */
.services { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; }
.service {
  background: #fff; padding: 26px 24px 28px;
  border: 1px solid var(--line); border-top: 6px solid var(--c);
  border-radius: var(--r-card);
}
.service--steel { --c: var(--steel); }
.service--teal { --c: var(--teal); }
.service--burnt { --c: var(--burnt); }
.service--navy { --c: var(--navy); }
.service > svg {
  width: 44px; height: 44px; display: block;
  fill: none; stroke: var(--c); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.service h3 { margin: 16px 0 10px; font-size: 1.5rem; }
.service > p { margin: 0 0 16px; font-size: 1.125rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 9px; height: 9px; border-radius: 2px; background: var(--c);
}
.services-note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); max-width: 40em; font-size: 1.125rem; }
.services-note a { color: var(--blue); font-weight: 600; text-underline-offset: 4px; }

/* Обо мне */
.about { display: grid; gap: 36px; }
.about .drawing { max-width: 440px; }
.about p { margin: 0 0 16px; max-width: 36em; }

.stamp { margin-top: 28px; background: #fff; border: 1px solid var(--navy); border-radius: 10px; overflow: hidden; }
.stamp-title { margin: 0; padding: 12px 16px; background: var(--navy); color: #fff; font: 600 1.0625rem/1.3 var(--head); }
.stamp-grid { display: grid; grid-template-columns: minmax(120px, 36%) 1fr; margin: 0; }
.stamp-grid dt, .stamp-grid dd { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); }
.stamp-grid dt { background: var(--pale); color: #374151; font-size: 1rem; border-right: 1px solid var(--line); }
.stamp-grid dd { font-weight: 600; overflow-wrap: anywhere; }
.stamp-grid dt:first-of-type, .stamp-grid dt:first-of-type + dd { border-top: 0; }
.stamp-grid a { color: var(--blue); text-underline-offset: 3px; }
.stamp-note { display: block; margin-top: 2px; font-size: 1rem; font-weight: 400; color: var(--muted); }

/* Как работаем */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.steps li { position: relative; padding-left: 64px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; display: grid; place-items: center;
  font: 600 1.25rem/1 var(--head); color: #fff;
  background: var(--navy); border-radius: 8px;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 52px; bottom: -20px;
  width: 2px; background: #9FB1C9;
}
.steps h3 { margin: 8px 0 6px; font-size: 1.3125rem; }
.steps p { margin: 0; max-width: 26em; }

/* Блог */
.posts { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; }
.post {
  display: flex; flex-direction: column;
  padding: 26px 24px 24px;
  background: var(--pale); border: 1px solid var(--line); border-top: 6px solid var(--c);
  border-radius: var(--r-card);
}
.post--steel { --c: var(--steel); }
.post--teal { --c: var(--teal); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 1rem; color: var(--muted); }
.tag {
  display: inline-block; padding: 3px 10px;
  font-size: .9375rem; font-weight: 600; color: #fff;
  background: var(--c); border-radius: 6px;
}
.post h3 { margin: 16px 0 10px; font-size: 1.5rem; }
.post > p { margin: 0 0 24px; font-size: 1.125rem; }
.post .btn { margin-top: auto; width: 100%; }

/* Контакты */
.contact {
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.contact-grid { display: grid; gap: 48px; }

.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; }
.opt { color: var(--light); font-weight: 400; }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; min-height: 52px; padding: 10px 14px;
  font: inherit; color: var(--black); background: #fff;
  border: 2px solid transparent; border-radius: 10px;
  transition: border-color .25s ease;
}
textarea { min-height: 124px; resize: vertical; }
[aria-invalid="true"] { border-color: #FF8A7A !important; }
.err {
  margin: 0; width: fit-content; justify-self: start;
  padding: 6px 10px; border-radius: 8px;
  font-size: 1rem; color: #fff; background: #C42B1C;
  animation: fade-in .3s ease;
}
.err:empty { display: none; }
.consent + .err { margin-bottom: 8px; }
.pair { display: grid; gap: 0 16px; }
.hint { margin: -6px 0 18px; font-size: 1rem; color: var(--light); }
.hp { position: absolute; left: -9999px; }

.consent { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; font-size: 1rem; }
.consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--amber); }
.consent label { padding-top: 2px; }
.contact .text-btn { color: #FFC857; }

.contact .btn--amber { width: 100%; margin-top: 16px; }
.form-status {
  margin: 16px 0 0; padding: 12px 14px;
  border-left: 4px solid var(--amber); border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  animation: fade-in .4s ease;
}
.form-status:empty { display: none; }

.form-status .mail-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
.form-status .mail-links a, .form-status .mail-links button {
  display: inline-block; padding: 8px 14px; border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; cursor: pointer;
  color: var(--black); background: #FFC857; text-decoration: none;
}
.form-status .mail-links button { background: rgba(255, 255, 255, .85); }









.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { border-top: 1px solid rgba(255, 255, 255, .25); }
.contact-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .25); }
.contact-list a, .contact-list .static {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 74px; padding: 12px 0; text-decoration: none; color: #fff;
}
.contact-list .label { font-size: .9375rem; color: var(--light-2); }
.contact-list .value { font: 600 1.375rem/1.3 var(--head); }
.contact-list a:hover .value { text-decoration: underline; text-underline-offset: 4px; }

/* Подвал */
.site-footer {
  padding: 28px 0 calc(100px + env(safe-area-inset-bottom));
  font-size: 1rem; color: var(--light-2);
  background: var(--navy-3);
}
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer .name { color: #fff; font: 600 1.125rem/1.4 var(--head); }
.site-footer .text-btn { min-height: 44px; color: #FFC857; }

/* Нижняя кнопка связи на телефоне */
.contact-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--navy); border-top: 1px solid var(--rule-dark);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.contact-bar.is-hidden { transform: translateY(100%); }
.contact-bar .btn { width: 100%; }
.contact-menu {
  position: absolute; left: 16px; right: 16px; bottom: 100%;
  margin-bottom: 10px; background: #fff; color: var(--black);
  border: 1px solid var(--navy); border-radius: 14px; overflow: hidden;
  transform-origin: 50% 100%;
  visibility: hidden; opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.contact-menu.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.contact-menu a {
  display: flex; align-items: center; min-height: 54px; padding: 0 18px;
  font-weight: 600; text-decoration: none;
}
.contact-menu a + a { border-top: 1px solid var(--line); }

/* ---------- Окна (политика и статьи) ---------- */
dialog {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  overflow: auto; overscroll-behavior: contain;
  padding: 0; color: var(--black); background: #fff;
  border: 1px solid var(--navy); border-radius: 16px;
}
dialog::backdrop { background: rgba(7, 26, 51, .75); }
dialog[open] { animation: dlg-in .35s cubic-bezier(.2, .8, .2, 1); }
dialog[open]::backdrop { animation: fade-in .35s ease; }
dialog.is-closing { animation: dlg-out .25s ease-in forwards; }
dialog.is-closing::backdrop { animation: fade-out .25s ease-in forwards; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.dlg-bar {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 22px;
  background: var(--navy); color: #fff;
}
.dlg-title { margin: 0; font: 600 1.1875rem/1.2 var(--head); }
.dlg-close {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0;
  color: #fff; background: transparent;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: var(--r-btn); cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.dlg-close:hover { background: #fff; color: var(--navy); }
.dlg-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.dlg-body { padding: 24px 22px 28px; }
.dlg-body p { margin: 0 0 12px; }
.dlg-body > .btn { margin-top: 8px; }

.article-dialog { width: min(780px, calc(100% - 24px)); }
.article h2 { margin: 0 0 8px; font-size: clamp(1.75rem, 5.6vw, 2.375rem); line-height: 1.15; font-weight: 700; }
.byline { margin: 0 0 24px !important; color: var(--muted); font-size: 1rem; }
.article-lead { font-size: 1.3125rem; line-height: 1.5; }
.article h3 { margin: 32px 0 10px; font-size: 1.4375rem; }
.article p, .article li { font-size: 1.125rem; line-height: 1.7; }
.article p { max-width: 64ch; }
.article ul { margin: 0 0 16px; padding-left: 22px; max-width: 64ch; }
.article li { margin-bottom: 6px; }
.callout {
  margin: 24px 0; padding: 18px 20px;
  background: var(--pale); border-left: 5px solid var(--steel); border-radius: 8px;
}
.callout p { margin: 0; font-weight: 600; }
.article-cta {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  margin-top: 36px; padding: 22px; color: #fff; background: var(--navy); border-radius: 12px;
}
.article-cta p { margin: 0; max-width: 28em; font-size: 1.1875rem; line-height: 1.45; }

/* ---------- Планшет ---------- */
@media (min-width: 520px) {
  .actions .btn { width: auto; }
  .hero-list { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .pair { grid-template-columns: 1fr 1fr; }
  .contact .btn--amber { width: auto; min-width: 260px; }
  .post .btn { width: auto; min-width: 190px; align-self: flex-start; }
  .dlg-body { padding: 28px 32px 36px; }
  .dlg-bar { padding-left: 32px; }
}

@media (min-width: 720px) {
  .services, .posts { grid-template-columns: 1fr 1fr; gap: 24px; }
  .service, .post { padding: 30px 30px 32px; }
  .section { padding: 88px 0; }
  .article-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }

  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact { padding: 20px 24px 20px 0; }
  .fact:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--rule-dark); }
  .fact:nth-child(2) { border-top: 0; }
}

/* ---------- Компьютер ---------- */
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; padding: 64px 0 72px; }

  .about { grid-template-columns: .8fr 1.2fr; gap: 72px; align-items: start; }

  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .steps li { padding: 68px 0 0; }
  .steps li:not(:last-child)::after {
    left: 56px; top: 21px; bottom: auto; width: calc(100% - 40px); height: 2px;
  }

  .contact-grid { grid-template-columns: 1.1fr .9fr; gap: 80px; }
}

@media (min-width: 1024px) {
  .burger { display: none; }
  .site-header .nav, .site-header.is-open .nav {
    display: flex; position: static; gap: 28px; padding: 0;
    background: none; border: 0;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  .nav a { min-height: 44px; border: 0; }
  .header-cta { display: inline-flex; min-height: 46px; padding: 0 22px; }
  .contact-bar { display: none; }
  .site-footer { padding-bottom: 32px; }

  .facts-grid { grid-template-columns: 1fr 1.8fr 1.2fr 1fr; }
  .fact + .fact { border-top: 0; }
  .fact, .fact:nth-child(even) { padding: 24px; border-top: 0; border-left: 1px solid var(--rule-dark); }
  .fact:first-child { padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}