.topnav {
  background: #000;
  border-bottom: 1px solid rgba(105, 184, 229, 0.28);
}

.topnav .wrap {
  position: relative;
  flex-wrap: nowrap;
  min-height: 104px;
}

.topnav .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  line-height: 1;
  text-decoration: none;
}

.topnav .brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
}

.brand-name {
  display: grid;
  gap: 5px;
  text-transform: uppercase;
}

.brand-name-main {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.brand-name-sub {
  color: var(--ice);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.32em;
}

.topnav .brand:focus-visible {
  border-radius: 8px;
  outline: 3px solid #f1bd52;
  outline-offset: 4px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}

.footer-brand img {
  display: block;
  width: 64px;
  height: 64px;
}

.footer-brand strong {
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: inherit;
}

.mobile-menu {
  display: none;
}

@media (max-width: 820px) {
  .topnav .wrap {
    min-height: 88px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .topnav .brand {
    gap: 10px;
    margin-right: 12px;
    white-space: nowrap;
  }

  .topnav .brand-mark {
    width: 64px;
    height: 64px;
  }

  .brand-name-main {
    font-size: 15px;
  }

  .brand-name-sub {
    font-size: 12px;
    letter-spacing: 0.27em;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu {
    position: relative;
    display: block;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-menu summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid rgba(105, 184, 229, 0.52);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary::marker {
    content: "";
  }

  .mobile-menu[open] summary {
    border-color: var(--ice);
    background: rgba(105, 184, 229, 0.12);
  }

  .mobile-menu summary:focus-visible {
    outline: 3px solid #f1bd52;
    outline-offset: 2px;
  }

  .menu-bars,
  .menu-bars::before,
  .menu-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .menu-bars {
    position: relative;
  }

  .menu-bars::before,
  .menu-bars::after {
    position: absolute;
    left: 0;
    content: "";
    transition: transform 150ms ease, top 150ms ease;
  }

  .menu-bars::before {
    top: -6px;
  }

  .menu-bars::after {
    top: 6px;
  }

  .mobile-menu[open] .menu-bars {
    background: transparent;
  }

  .mobile-menu[open] .menu-bars::before {
    top: 0;
    transform: rotate(45deg);
  }

  .mobile-menu[open] .menu-bars::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .mobile-menu-panel {
    position: absolute;
    z-index: 100;
    top: calc(100% + 8px);
    right: 0;
    width: min(250px, calc(100vw - 36px));
    padding: 8px;
    border: 1px solid #dfe7ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(8, 26, 56, 0.24);
  }

  .topnav .mobile-menu-panel a {
    display: block;
    padding: 11px 12px;
    border-radius: 8px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.25;
    text-decoration: none;
  }

  .topnav .mobile-menu-panel a:hover,
  .topnav .mobile-menu-panel a:focus-visible {
    background: #eef6fa;
  }

  .topnav .mobile-menu-panel a[aria-current="page"] {
    background: var(--navy);
    color: #fff;
  }
}

@media (max-width: 340px) {
  .brand-name {
    display: none;
  }
}
