/* Стили шапки лендинга.
   Назначение: логотип, якорное меню и кнопка перехода к демо.
   Подключается рядом с blocks/header/header.html. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 26, 51, 0.92);
  color: #fff;
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  min-height: 108px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: inherit;
  text-decoration: none;
}

.site-header__brand {
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.site-header__tag {
  color: var(--accent-mint);
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  position: relative;
  top: 2px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 44px;
}

.site-header__nav a {
  color: var(--nav-link);
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header__nav a:hover,
.site-header__nav a.active {
  color: #fff;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.site-header__cta {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--accent-color);
  color: #fff;
  cursor: pointer;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  padding: 16px 28px;
  transition: background-color 0.2s ease;
}

.site-header__cta:hover {
  background: color-mix(in srgb, var(--accent-color) 82%, #030c23);
}

.site-header__cta:focus-visible,
.site-header__nav a:focus-visible,
.site-header__logo:focus-visible,
.site-header__toggle:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

.site-header__toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.site-header__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

@media (max-width: 980px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
    width: min(var(--content), calc(100% - 32px));
  }

  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 20px 18px;
    background: #030c23;
    border-top: 1px solid rgba(197, 210, 228, 0.14);
  }

  .site-header__nav.open {
    display: flex;
  }

  .site-header__nav a {
    width: 100%;
    padding: 10px 0;
  }
}

@media (max-width: 640px) {
  .site-header__tag {
    display: none;
  }
}
