:root {
  --site-dark: #474747;
  --site-accent: #fbae17;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.loading-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  transition: opacity .7s ease, visibility .7s ease;
}

.loading-screen--hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.loading-screen__content {
  width: clamp(136px, 12vw, 176px);
}

.loading-screen__glass {
  display: block;
  width: 100%;
  height: auto;
}

.loading-screen__progress {
  min-width: 82px;
  margin-top: 12px;
  color: #555555;
  font: 700 38px/50px Roboto, Arial, sans-serif;
  text-align: center;
}

.loading-screen__percent {
  display: inline-block;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  height: 90px;
  padding: 0 4.17%;
  background: var(--site-dark);
}

.site-header__brand {
  display: block;
  flex: 0 0 auto;
}

.site-header__logo {
  display: block;
  width: 199px;
  height: auto;
}

.site-header__menu-toggle {
  display: none;
  margin-left: auto;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.site-header__menu-line {
  display: block;
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform .25s ease, opacity .2s ease;
}

.site-header__menu-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header__navigation {
  display: flex;
  align-items: center;
  gap: 86px;
  margin-left: auto;
}

.site-header__navigation-link {
  color: #fff;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  transition: color .2s ease;

}

.site-header__navigation-link--about {
  width: 40px;
}

.site-header__navigation-link--mobile-only {
  display: none;
}

.site-header__navigation-link--desktop-managed {
  white-space: nowrap;
}

.site-header__mobile-filters {
  display: none;
}

.site-header__navigation-link:hover,
.site-header__navigation-link:focus-visible,
.site-header__navigation-link[aria-current="page"] {
  color: var(--site-accent);
}

.site-header__navigation-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 26px;
  margin: 0 -48px;
  background: #aaa;
}

.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 156px;
  color: #fff;
  background: #555554;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 156px;
  padding: 0 4px 0 40px;
}

.site-footer__brand {
  display: flex;
  flex: 0 0 27.092%;
  align-items: center;
  align-self: stretch;
  padding-left: 50px;
}

.site-footer__brand-link {
  display: block;
  width: 100%;
}

.site-footer__logo {
  display: block;
  width: 60%;
  height: auto;
}

.site-footer__legal {
  display: flex;
  flex: 0 0 18.545%;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  justify-content: center;
  padding: 28px 0;
  gap: 10px;
}

.site-footer__legal-link {
  color: #fff;
  font-family: Roboto, Arial, sans-serif;
  font-size: 10px;
  font-weight: 300;
  line-height: 13px;
  text-decoration: none;
  transition: color .2s ease;
}

.site-footer__legal-link:hover,
.site-footer__legal-link:focus-visible {
  color: var(--site-accent);
}

.site-footer__info {
  display: flex;
  flex: 1 1 54.363%;
  align-items: center;
  align-self: stretch;
  justify-content: flex-end;
  padding: 28px 0;
}

.site-footer__address {
  flex: 0 0 27.91%;
  margin: 0 0 8px;
  padding-right: 45px;
  color: #fff;
  font-family: Roboto, Arial, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  text-align: right;
}

.site-footer__contacts {
  display: flex;
  flex: 0 0 35%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 100px;
  padding: 21px 0 0 45px;
  gap: 6px;
  border-left: 1px solid #fff;
}

/* Доля в 27.91% не вмещала строку «Пресненская набережная 12,», и номер дома
   срывался на следующую строку. Ширина по содержимому + запрет переноса
   оставляют ровно те строки, которые заданы в админке. Только для широких
   экранов: ниже 1181px у адреса свои правила и места там меньше. */
@media (min-width: 1181px) {
  .site-footer__address {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

.site-footer__phone,
.site-footer__email {
  display: inline-block;
  font-family: Roboto, Arial, sans-serif;
  font-weight: 300;
  text-decoration: none;
}

.site-footer__phone {
  color: #fff;
  font-size: 27px;
  line-height: 27px;
}

.site-footer__email {
  color: var(--site-accent);
  font-size: 20px;
  line-height: 20px;
}

.site-footer__to-top {
  position: fixed;
  z-index: 99;
  right: 30px;
  bottom: 30px;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 100px;
  background: #bababa;
  opacity: 0;
  transform: translateY(8px);
  transition: background-color .2s ease, opacity .2s ease, transform .2s ease, visibility .2s;
}

.site-footer__to-top--visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.site-footer__to-top:hover,
.site-footer__to-top:focus-visible {
  background: var(--site-accent);
  outline: none;
}

.site-footer__to-top-icon {
  display: block;
  width: 24px;
  height: 9px;
  transform: translateY(-1px) rotate(180deg);
}

@media (min-width: 701px) and (max-width: 1180px) {
  .site-footer__inner {
    flex-wrap: wrap;
    align-items: center;
    min-height: 0;
    padding: 32px 5%;
    row-gap: 28px;
  }

  .site-footer__brand {
    flex: 0 0 36%;
    align-self: auto;
    padding-left: 0;
  }

  .site-footer__logo {
    width: min(240px, 78%);
  }

  .site-footer__legal {
    flex: 1 1 64%;
    align-self: auto;
    padding: 0;
    gap: 8px;
  }

  .site-footer__info {
    flex: 0 0 100%;
    align-self: auto;
    justify-content: center;
    width: 100%;
    padding: 0;
  }

  .site-footer__address {
    flex: 0 0 315px;
    margin-bottom: 0;
    padding-right: 34px;
  }

  .site-footer__contacts {
    flex: 0 0 340px;
    min-height: 92px;
    padding: 17px 0 0 34px;
  }
}

@media (min-width: 701px) and (max-width: 820px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .site-footer__brand,
  .site-footer__legal,
  .site-footer__info {
    flex: 0 0 auto;
    width: 100%;
  }

  .site-footer__logo {
    width: 230px;
  }

  .site-footer__info {
    justify-content: flex-start;
  }

  .site-footer__address {
    flex: 0 0 48%;
    max-width: 315px;
    text-align: left;
  }

  .site-footer__contacts {
    flex: 0 0 auto;
    min-width: 300px;
  }
}

@media (max-width: 1120px) and (min-width: 701px) {
  .site-header__navigation {
    gap: 38px;
  }

  .site-header__navigation-divider {
    margin: 0 -22px;
  }
}

@media (max-width: 700px) {
  body[data-site-navigation-open="true"] {
    overflow: hidden;
  }

  .loading-screen__content {
    width: min(162px, 52vw);
  }

  .loading-screen__progress {
    min-width: 0;
    margin-top: 8px;
    font-size: clamp(28px, 9vw, 36px);
    line-height: 1.1;
  }

  .site-header {
    height: 70px;
    padding: 0 20px;
  }

  .site-header__logo {
    width: 160px;
  }

  .site-header__menu-toggle {
    position: relative;
    z-index: 102;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    gap: 6px;
  }

  .site-header__menu-toggle[aria-expanded="true"] .site-header__menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .site-header__menu-toggle[aria-expanded="true"] .site-header__menu-line:nth-child(2) {
    opacity: 0;
  }

  .site-header__menu-toggle[aria-expanded="true"] .site-header__menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .site-header__navigation {
    position: fixed;
    z-index: 101;
    inset: 0;
    right: 0;
    left: 0;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    /* 100vh — запасной вариант для Safari до 15.4 и старых Android-браузеров,
       где динамические единицы ещё не поддерживались. */
    min-height: 100vh;
    min-height: 100dvh;
    /* Отступ сверху чуть больше высоты шапки (70px), чтобы первый пункт
       не наезжал на логотип и кнопку меню. */
    padding: 92px 10px 0;
    background: var(--site-dark);
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: opacity .35s ease, transform 1.2s ease, visibility .35s;
  }

  .site-header__navigation--open {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .site-header__navigation-link,
  .site-header__mobile-filter {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 60px;
    padding: 20px 0;
    color: #D3D3D3;
    font-family: Roboto, Arial, sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 20px;
    text-decoration: none;
    text-transform: uppercase;
  }

  .site-header__navigation-link[aria-current="page"] {
    color: #fff;
  }

  .site-header__navigation-link--mobile-only {
    display: flex;
  }

  .site-header__navigation-link--desktop-managed {
    display: none;
  }

  .site-header__navigation-link--portfolio,
  .site-header__navigation-link--about {
    display: none;
  }

  .site-header__mobile-filters {
    display: contents;
  }

  .site-header__mobile-filter:hover,
  .site-header__mobile-filter:focus-visible,
  .site-header__navigation-link:hover,
  .site-header__navigation-link:focus-visible {
    color: var(--site-accent);
    outline: none;
  }

  .site-header__navigation-divider {
    display: none;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 38px 20px 42px;
    gap: 28px;
  }

  .site-footer__brand,
  .site-footer__legal,
  .site-footer__info {
    flex: 0 0 auto;
    align-self: auto;
    width: 100%;
    margin: 0;
  }

  .site-footer__brand {
    padding-left: 0;
  }

  .site-footer__logo {
    width: 220px;
  }

  .site-footer__legal {
    padding: 0;
    gap: 9px;
  }

  .site-footer__legal-link {
    font-size: 11px;
    line-height: 15px;
  }

  .site-footer__info {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    gap: 20px;
  }

  .site-footer__address {
    flex: 0 0 auto;
    margin: 0;
    padding-right: 0;
    font-size: 14px;
    line-height: 21px;
    text-align: left;
  }

  .site-footer__contacts {
    flex: 0 0 auto;
    width: auto;
    min-height: 0;
    padding: 0;
    gap: 5px;
    border-left: 0;
  }

  .site-footer__phone {
    font-size: 24px;
    line-height: 27px;
  }

  .site-footer__email {
    font-size: 18px;
    line-height: 21px;
  }

  .site-footer__to-top {
    right: 16px;
    bottom: 16px;
    width: 38px;
    height: 38px;
  }
}
