/* Каркас: шапка, меню, подвал, страница. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  box-shadow: 0 10px 30px -24px rgba(0, 0, 0, .35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: var(--header-h);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
}

.site-brand:hover {
  color: var(--ink);
}

.site-brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--primary);
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
}

.site-brand__name small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: .52rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header__nav {
  margin-left: auto;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.site-header__phone {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.site-header__phone:hover {
  color: var(--primary);
}

.site-header__cta {
  padding: 11px 18px;
  font-size: .8rem;
}

/* Главное меню */
.menu--main {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu--main .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu--main > .menu-item > a {
  display: block;
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.menu--main > .menu-item > a:hover,
.menu--main > .menu-item > a.is-active,
.menu--main > .menu-item > a:focus-visible {
  background: var(--surface-alt);
  color: var(--ink);
}

.menu--main .menu-item--expanded {
  position: relative;
}

.menu--main .menu-item--expanded > .menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  min-width: 280px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.menu--main .menu-item--expanded:hover > .menu,
.menu--main .menu-item--expanded:focus-within > .menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu--main .menu-item--expanded > .menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--ink);
  font-size: .82rem;
  line-height: 1.3;
}

.menu--main .menu-item--expanded > .menu a:hover,
.menu--main .menu-item--expanded > .menu a:focus-visible {
  background: var(--surface-alt);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 17px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle span {
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-open .nav-toggle span {
  background: transparent;
}

.nav-open .nav-toggle span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Основная область */
.page-main {
  min-height: 60vh;
}

.page-content {
  padding-top: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.page-content > .block-page-title-block {
  max-width: 1000px;
  margin-bottom: 1.8rem;
}

.block-page-title-block h1 {
  margin: 0;
}

.page--case .block-page-title-block,
.page--article .block-page-title-block,
.page--front .block-page-title-block {
  display: none;
}

.region-highlighted {
  padding-top: 1rem;
}

/* Хлебные крошки */
.breadcrumb {
  padding: 1.1rem 0 0;
}

.breadcrumb ol,
.breadcrumb .breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Подвал */
.site-footer {
  background: var(--dark);
  color: var(--dark-foreground);
  padding: clamp(3rem, 6vw, 5rem) 0 1.4rem;
}

.site-footer a {
  color: var(--dark-foreground);
  opacity: .78;
}

.site-footer a:hover {
  color: var(--highlight);
  opacity: 1;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.4fr .9fr .9fr 1.1fr;
  gap: 32px;
  padding-bottom: 2.6rem;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.site-footer__brand .site-brand__mark {
  color: var(--highlight);
  width: 38px;
  height: 38px;
}

.site-footer__brand .site-brand__name {
  color: var(--dark-foreground);
}

.site-footer__brand .site-brand__name small {
  color: var(--dark-muted);
}

.site-footer__brand p {
  max-width: 300px;
  margin: 0;
  color: var(--dark-muted);
  font-size: .84rem;
  line-height: 1.55;
}

.site-footer__col h3 {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.site-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__col li {
  margin-bottom: .55rem;
}

.site-footer__col a,
.site-footer__col p {
  font-size: .86rem;
  line-height: 1.45;
}

.site-footer__col p {
  margin: 0 0 .55rem;
  color: var(--dark-muted);
}

.site-footer__col strong {
  display: block;
  color: var(--dark-foreground);
  font-weight: 600;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 1.2rem;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.site-footer__bottom a {
  color: var(--dark-muted);
}

.site-footer__bottom a:hover {
  color: var(--highlight);
}

/* Мобильная навигация */
@media (max-width: 1080px) {
  .site-header__phone {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-header__nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    z-index: 90;
    width: min(360px, 100%);
    padding: 18px 18px 40px;
    background: var(--paper);
    border-left: 1px solid var(--line);
    overflow: auto;
    transform: translateX(100%);
    transition: transform .25s ease;
  }

  .nav-open .site-header__nav {
    transform: translateX(0);
  }

  .menu--main {
    display: block;
  }

  .menu--main > .menu-item > a {
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--ink);
  }

  .menu--main .menu-item--expanded > .menu {
    position: static;
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0 0 0 14px;
    margin: 2px 0 8px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .menu--main .menu-item--expanded > .menu a {
    padding: 8px 10px;
    color: var(--muted);
    font-size: .9rem;
  }

  .site-header__cta {
    display: none;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .site-header__inner {
    gap: 12px;
  }

  .site-brand__name {
    font-size: 1.1rem;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    display: block;
    line-height: 1.8;
  }
}

/* ���� ������ �����: ����������� UL ����� ������ .site-header__nav. */
.site-header__nav .menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__nav .menu .menu {
  display: block;
}

.site-header__nav .menu > .menu-item > a {
  display: block;
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.2;
  white-space: nowrap;
}

.site-header__nav .menu > .menu-item > a:hover,
.site-header__nav .menu > .menu-item > a.is-active,
.site-header__nav .menu > .menu-item > a:focus-visible {
  background: var(--surface-alt);
  color: var(--ink);
}

.site-header__nav .menu .menu-item--expanded {
  position: relative;
}

@media (max-width: 900px) {
  .site-header__nav .menu {
    display: block;
  }
  .site-header__nav .menu > .menu-item > a {
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--ink);
  }
}

/* ������� ����� ������� � ������� ����; ������� ����������� �� hover/focus. */
.site-header__nav .menu a::before,
.site-header__nav .menu a::after,
.site-header__nav .menu li::before,
.site-header__nav .menu li::after {
  content: none !important;
}

.site-header__nav .menu .menu-item {
  list-style: none;
  list-style-image: none;
}

/* �� ��� ������� ��������� ������ ��������� �������������� ������. */
html,
body {
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .site-header__nav {
    visibility: hidden;
    pointer-events: none;
  }

  .nav-open .site-header__nav {
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 1080px) {
  .site-header__phone,
  .site-header__cta {
    display: none;
  }
}
