:root {
  --chrome-height: 82px;
  --chrome-navy: #151931;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9;
  transform: translateY(var(--header-offset, 0px));
  color: #fff;
  background: var(--chrome-navy);
  border-bottom: 1px solid #ffffff17;
}

.site-header.is-scrolled {
  color: var(--chrome-navy);
  background: #fff;
  border-bottom-color: #15193114;
  box-shadow: 0 3px 12px #15193109;
}

.site-header-inner {
  width: min(1500px, 100% - 2 * var(--edge));
  min-height: var(--chrome-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(29px, 4.1vw, 57px);
}

.site-brand {
  display: block;
  width: clamp(121px, 11.2vw, 148px);
  flex: none;
}

.site-brand img {
  width: 100%;
  height: auto;
}

.site-brand .logo-dark, .site-header.is-scrolled .logo-light { display: none; }
.site-header.is-scrolled .logo-dark { display: block; }

.site-header :focus-visible { outline-color: var(--coral); }
.site-header.is-scrolled :focus-visible { outline-color: var(--dark-coral); }

.site-menu, .nav-dropdown {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.33vw, 19px);
  font-size: 11px;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.site-menu a { text-decoration: none; }

.site-menu > li > a,
.nav-root-group > summary {
  display: flex;
  min-height: var(--chrome-height);
  align-items: center;
  white-space: nowrap;
}

.site-menu a:hover, .site-menu summary:hover, .nav-dropdown [aria-current] {
  color: #ffac94;
}

.site-header.is-scrolled .site-menu a:hover,
.site-header.is-scrolled .site-menu summary:hover,
.site-header.is-scrolled .nav-dropdown [aria-current] {
  color: var(--dark-coral);
}

.site-menu summary {
  cursor: pointer;
  list-style: none;
}

.site-menu summary::-webkit-details-marker { display: none; }
.nav-root-group { position: relative; }

.flag-ru {
  width: 15px;
  height: 10px;
  margin-right: 5px;
  background: linear-gradient(to bottom, #fff 33.33%, #3464c3 33.33% 66.66%, #d44d53 66.66%);
  border: 1px solid #15193110;
}

.nav-dropdown { font-size: .875rem; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.nav-dropdown a, .nav-dropdown summary { display: block; padding: 8px 14px; }
.nav-dropdown a:hover, .nav-dropdown summary:hover { background: #ffffff0b; }
.is-scrolled .nav-dropdown a:hover, .is-scrolled .nav-dropdown summary:hover { background: #15193108; }
.nav-nested-group > .nav-dropdown { padding-left: 11px; margin-left: 13px; border-left: 1px solid currentColor; }

.nav-nested-group > summary::after {
  content: "+";
  float: right;
  padding-left: 8px;
}

.nav-nested-group[open] > summary::after { content: "−"; }

.site-menu-button {
  display: none;
  width: 46px;
  height: 46px;
  padding: 11px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.site-menu-button span {
  width: 22px;
  height: 1.5px;
  display: block;
  background: currentColor;
}

.site-menu-button[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
.site-menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-menu-button[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }

.site-footer {
  padding-block: clamp(57px, 7.4vw, 100px) 30px;
  color: #f5f5f5;
  background: var(--chrome-navy);
  font-size: 1.1875rem;
  line-height: 1.6;
}

.site-footer :focus-visible { outline-color: var(--coral); }

.site-footer-inner {
  width: min(1170px, 100% - 2 * var(--edge));
  margin-inline: auto;
}

.footer-directory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
  align-items: start;
}

.site-footer address { font-style: normal; }
.footer-offices, .footer-contact { display: grid; gap: 29px; }
.footer-contact { grid-column: 4; }
.site-footer strong, .footer-social { font-family: var(--body); font-weight: 400; }
.site-footer a { text-underline-offset: 3px; }
.footer-contact a[href^="tel:"], .footer-contact a[href^="mailto:"] { white-space: nowrap; }
.site-footer a:hover { color: var(--coral); }
.site-footer-lower {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(40px, 6vw, 80px);
  padding-top: 20px;
  border-top: 1px solid #ffffff30;
  font-size: .9rem;
}
.footer-icons { display: flex; gap: 12px; }
.footer-icons a { display: grid; place-items: center; width: 44px; min-height: 44px; }
.footer-icons img { width: 21px; height: 21px; object-fit: contain; border-radius: 4px; }

@media (min-width: 1211px) {
  .nav-root-group > .nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 184px;
    width: max-content;
    max-width: min(390px, 100vw - 2 * var(--edge));
    max-height: calc(100svh - var(--chrome-height) - 8px);
    overflow: auto;
    padding-block: 8px;
    border: 1px solid #ffffff29;
    background: var(--chrome-navy);
    box-shadow: 0 12px 25px #090b1830;
  }
  .site-menu > li:last-child .nav-root-group > .nav-dropdown { right: 0; left: auto; }
  .is-scrolled .nav-root-group > .nav-dropdown { background: #fff; border-color: #15193116; }
}

@media (max-width: 1210px) {
  :root { --chrome-height: 68px; }

  .site-header-inner { justify-content: space-between; }
  .site-brand { width: 121px; }
  .site-menu-button { display: grid; gap: 4.5px; align-content: center; place-items: center; }
  .site-navigation {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: calc(100svh - var(--chrome-height));
    color: inherit;
    background: var(--chrome-navy);
    border-top: 1px solid #ffffff26;
    box-shadow: 0 14px 28px #0b0b133a;
  }

  .is-scrolled .site-navigation { background: #fff; border-color: #15193117; }
  .site-header[data-menu-open] .site-navigation { display: block; }
  .site-menu { display: block; padding: 6px var(--edge) 25px; font-size: .92rem; letter-spacing: .045em; }
  .site-menu > li { border-bottom: 1px solid #a0a3be33; }
  .site-menu > li > a, .nav-root-group > summary { min-height: 46px; }
  .nav-root-group > summary { justify-content: space-between; }
  .nav-root-group > summary::after { content: "+"; padding-left: 8px; }
  .nav-root-group[open] > summary::after { content: "−"; }
  .nav-root-group > .nav-dropdown { padding: 0 0 9px 7px; }
  .nav-dropdown a, .nav-dropdown summary { min-height: 42px; padding: 10px 8px 10px 0; }
  .nav-nested-group > .nav-dropdown { padding-left: 10px; margin-left: 7px; }
  .flag-ru { margin-right: 7px; }
}

@media (max-width: 940px) {
  .footer-directory { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  :root { --chrome-height: 58px; }
  .site-brand { width: 105px; }
  .footer-directory { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-contact { grid-column: auto; }
  .site-footer { text-align: center; font-size: 1.0625rem; }
  .site-footer-lower { justify-content: center; }
}
