:root {
  --navy: #0B1F3A;
  --blue: #1E4B8F;
  --blue-hover: #163A70;
  --bg: #FFFFFF;
  --bg-alt: #F3F1EC;
  --text: #22262C;
  --muted: #5E6672;
  --border: #DFDCD5;
  --rule: #C9C5BC;

  --t-micro: 12px;
  --t-label: 13px;
  --t-small: 15px;
  --t-sub: 16px;
  --t-body: 17px;
  --t-lead: clamp(17px, 1.4vw, 19px);
  --t-ui: 16.9px;
  --t-h4: 19px;
  --t-h3: clamp(22px, 2.1vw, 26px);
  --t-h2: clamp(27px, 2.9vw, 38px);
  --t-display: clamp(21px, 2.6vw, 31px);
  --t-hero: clamp(33px, 4.6vw, 52px);

  --lh-display: 1.08;
  --lh-head: 1.17;
  --lh-sub: 1.3;
  --lh-body: 1.6;

  --header-h: 64px;
  --container: 1180px;
  --radius: 3px;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

h1, h2, h3 { margin: 0; line-height: var(--lh-sub); color: var(--navy); font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
address { font-style: normal; }

a { color: var(--blue); }
a:hover { color: var(--blue-hover); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 40px; } }

/* Надзаголовок */
.eyebrow {
  margin-bottom: 24px;
  font-size: var(--t-ui);
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #BCC9DC;
}

/* Логотип */
.logo {
  display: inline-flex;
  align-items: center;
  height: 36px;
  text-decoration: none;
  flex: none;
}
.logo img { height: 36px; width: auto; }
.logo-stub {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1.5px dashed currentColor;
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--navy);
  white-space: nowrap;
}
.logo--footer .logo-stub { color: #fff; }

/* Шапка */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}
.header.is-stuck { box-shadow: 0 1px 0 var(--rule), 0 8px 24px rgba(11, 31, 58, .07); }

@media (min-width: 768px) {
  :root { --header-h: 76px; }
  .header .logo,
  .header .logo img,
  .header .logo-stub { height: 44px; }
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 32px; }
@media (min-width: 768px) and (max-width: 919px) {
  .header__inner { gap: 16px; }
  .nav__list { gap: 20px; }
}
.nav__list a {
  color: var(--navy);
  font-weight: 500;
  font-size: var(--t-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav__list a:hover { color: var(--blue); }

@media (min-width: 768px) {
  .nav__list a {
    position: relative;
    padding-bottom: 3px;
  }
  .nav__list a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1.5px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
  }
  .nav__list a:hover::after,
  .nav__list a:focus-visible::after,
  .nav__list a[aria-current="true"]::after { transform: scaleX(1); }
  .nav__list a[aria-current="true"] { color: var(--blue); }
}

.header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang { display: flex; gap: 2px; }
.lang button {
  min-width: 34px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #6E7682;
  font-family: inherit;
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease;
}
.lang button:hover { color: var(--navy); }
.lang button[aria-pressed="true"] {
  color: var(--navy);
  box-shadow: inset 0 -1.5px 0 var(--navy);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 21px;
  height: 1.5px;
  background: var(--navy);
  transition: transform .25s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 767px) {
  .header__inner { gap: 12px; }
  .header__right { margin-left: auto; }
  .burger { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .js .nav {
    display: block;
    overflow: hidden;
    max-height: 0;
    visibility: hidden;
    border-bottom-color: transparent;
    transition: max-height .3s ease, visibility .3s;
  }
  .js .nav.is-open {
    max-height: 70vh;
    visibility: visible;
    border-bottom-color: var(--border);
  }
  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: 6px 20px 18px;
  }
  .nav__list a {
    display: block;
    padding: 13px 0;
    font-size: var(--t-ui);
    border-bottom: 1px solid var(--border);
  }
  .nav__list li:last-child a { border-bottom: 0; }
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-weight: 400;
  font-size: var(--t-ui);
  line-height: 1.2;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #E9EDF4; color: var(--navy); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  font-weight: 400;
  font-size: var(--t-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.link-arrow::after {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: width .25s ease;
}
.link-arrow:hover { color: #fff; }
.link-arrow:hover::after { width: 36px; }

/* Первый экран */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  padding: 68px 0 72px;
}
.hero :focus-visible { outline-color: #fff; }

.hero__grid { display: grid; }
.hero__body { margin-top: 26px; }
.hero__index { margin-top: 56px; }

@media (min-width: 1024px) {
  .hero { padding: 116px 0 112px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, .8fr);
    grid-template-rows: auto auto auto;
    column-gap: 72px;
    row-gap: 0;
    align-items: start;
  }
  .eyebrow     { grid-column: 1; grid-row: 1; }
  .hero__title { grid-column: 1; grid-row: 2; }
  /* перечень начинается на одном уровне с заголовком */
  .hero__index { grid-column: 2; grid-row: 2 / span 2; margin-top: 0; }
  .hero__body  { grid-column: 1; grid-row: 3; margin-top: 30px; }
}

.hero__title {
  max-width: 15ch;
  color: #fff;
  font-size: var(--t-hero);
  line-height: var(--lh-display);
  letter-spacing: -0.03em;
}
.hero__text {
  max-width: 46ch;
  font-size: var(--t-lead);
  line-height: 1.55;
  color: #AFBDD2;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 38px;
}

/* Перечень направлений */
.hero__index { border-top: 1px solid rgba(255, 255, 255, .17); }
.hero__index li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .17);
  font-size: var(--t-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #CBD6E6;
}
.hero__index i {
  font-style: normal;
  font-size: var(--t-ui);
  font-weight: 500;
  letter-spacing: .04em;
  color: #7790B2;
}

/* Заголовки секций */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
@media (min-width: 768px) { .section { padding: 108px 0; } }

.head { max-width: 760px; margin-bottom: 56px; }
.head__title {
  font-size: var(--t-h2);
  line-height: var(--lh-head);
  letter-spacing: -0.02em;
}
.head__lead {
  margin-top: 18px;
  max-width: 58ch;
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--muted);
}

/* Услуги */
.svc { border-top: 1px solid var(--rule); }
.svc__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.svc__num {
  grid-row: span 2;
  font-style: normal;
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--blue);
  padding-top: 7px;
}
.svc__title {
  font-size: var(--t-h3);
  line-height: 1.22;
  letter-spacing: -0.012em;
}
.svc__text { max-width: 62ch; font-size: var(--t-sub); color: var(--muted); }

@media (min-width: 900px) {
  .svc__row {
    grid-template-columns: 64px minmax(0, 5fr) minmax(0, 7fr);
    gap: 32px;
    align-items: start;
    padding: 38px 0;
    transition: background-color .25s ease;
  }
  .svc__num {
    grid-row: auto;
    align-self: baseline;
    padding-top: 0;
  }
  .svc__title { align-self: baseline; }
  .svc__text { padding-top: 5px; }
  .svc__row:hover { background: #F7F5F1; }
}

/* О компании */
.about { margin-top: 44px; }
.about__lead {
  max-width: 24ch;
  font-size: var(--t-display);
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--navy);
}
.about__body {
  max-width: 60ch;
  margin-top: 26px;
  color: var(--text);
}
@media (min-width: 1024px) {
  .about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
  .about__lead { max-width: none; }
  .about__body { margin-top: 7px; }
}

.pts {
  display: grid;
  gap: 0;
  margin-top: 60px;
  border-top: 1px solid var(--rule);
}
.pt { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.pt__title { font-size: var(--t-h4); }
.pt__text { margin-top: 7px; max-width: 50ch; font-size: var(--t-sub); color: var(--muted); }
@media (min-width: 768px) {
  .pts { grid-template-columns: repeat(3, 1fr); gap: 0 44px; }
  .pt { border-bottom: 0; padding: 26px 0 0; }
}

/* Как мы работаем */
.steps { display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.step__num {
  grid-row: span 2;
  font-style: normal;
  font-size: var(--t-label);
  font-weight: 500;
  color: var(--blue);
  padding-top: 5px;
}
.step__title { font-size: var(--t-h4); }
.step__text { font-size: var(--t-sub); color: var(--muted); }
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
  .step {
    display: block;
    padding: 20px 0 0;
    border-top: 2px solid var(--navy);
  }
  .step__num { display: block; padding: 0 0 10px; }
  .step__text { margin-top: 8px; }
}

/* Контакты */
.contacts { background: var(--navy); color: #fff; }
.contacts :focus-visible { outline-color: #fff; }
.contacts .head__title { color: #fff; }
.contacts .head__lead { color: #AFBDD2; max-width: 44ch; }

.ct { display: grid; gap: 48px; }
@media (min-width: 1024px) {
  .ct {
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr);
    gap: 72px;
    align-items: end;
  }
}

.ct__lines {
  display: grid;
  gap: 26px;
  margin-top: 44px;
}
.ct__big {
  display: block;
  margin-top: 6px;
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: #fff;
  text-decoration: none;
  transition: color .2s ease;
}
.ct__big:hover { color: #8FB4F0; }

.ct__label {
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7790B2;
}
.ct__address {
  margin-top: 12px;
  max-width: 30ch;
  font-size: var(--t-lead);
  line-height: 1.55;
  color: #AFBDD2;
}

/* Подвал */
.footer {
  background: var(--navy);
  color: #fff;
  padding: 0 0 40px;
  font-size: var(--t-small);
}
.footer :focus-visible { outline-color: #fff; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}
.footer__copy { color: #8FA3C0; }
.footer__contacts { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer a { color: #CBD6E6; text-decoration: none; transition: color .2s ease; }
.footer a:hover { color: #fff; }
@media (max-width: 1023px) {
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* Появление при прокрутке */
.js :where(.head__title, .head__lead, .about__lead, .about__body,
           .svc__row, .pt, .step, .ct__lines li, .ct__aside) {
  opacity: 0;
  translate: 0 12px;
  transition: opacity .55s ease, translate .55s ease;
}
.js .is-visible {
  opacity: 1;
  translate: none;
}

/* Анимация первого экрана */
.js .eyebrow,
.js .hero__title,
.js .hero__text,
.js .hero__actions,
.js .hero__index {
  opacity: 0;
  animation: rise .68s ease forwards;
}
.js .eyebrow { animation-delay: .04s; }
.js .hero__title { animation-delay: .1s; }
.js .hero__text { animation-delay: .22s; }
.js .hero__actions { animation-delay: .32s; }
.js .hero__index { animation-delay: .42s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Кнопка «Наверх» */
.totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 20px rgba(11, 31, 58, .28);
  transition: opacity .3s ease, visibility .3s, transform .25s ease, background-color .2s ease;
}
.totop svg { width: 20px; height: 20px; }
.skip:focus-visible { outline-color: #fff; }
.totop:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -5px;
  box-shadow: 0 0 0 3px var(--navy), 0 6px 20px rgba(11, 31, 58, .28);
}
.totop:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.totop.is-at-footer { opacity: 0; visibility: hidden; pointer-events: none; }
.totop.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
}
@media (min-width: 768px) { .totop { right: 32px; bottom: 32px; } }

/* Узкие экраны */
@media (max-width: 359px) {
  .container { padding: 0 14px; }
  .lang button { min-width: 30px; padding: 0 4px; }
  .burger { width: 40px; }
}

/* Без JavaScript */
@media (max-width: 767px) {
  html:not(.js) body { padding-top: 0; }
  html:not(.js) .header { position: static; height: auto; }
  html:not(.js) .header__inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  html:not(.js) .nav { position: static; order: 3; width: 100%; }
  html:not(.js) .burger { display: none; }
}

/* Ссылка «К содержимому» */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 13px 22px;
  background: var(--navy);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.skip:focus { left: 0; color: #fff; }

/* Уменьшенное движение */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js :where(.head__title, .head__lead, .eyebrow, .about__lead, .about__body,
             .svc__row, .pt, .step, .ct__lines li, .ct__aside,
             .hero__title, .hero__text, .hero__actions, .hero__index) {
    opacity: 1;
    translate: none;
    transform: none;
    animation: none;
  }
}
