/* header */

.site-header {
  --header-text: #111827;

  position: sticky;
  top: 0;
  left: 0;

  z-index: 1000;

  width: 100%;

  background-color: #ffffff;
  color: var(--header-text);

  box-shadow: 0 5px 24px rgb(0 0 0 / 9%);

  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.hero-header {
  --header-text: #ffffff;

  position: fixed;

  background-color: transparent;

  box-shadow: none;
}

.site-header.hero-header.scrolled {
  --header-text: #111827;

  background-color: #ffffff;

  box-shadow: 0 5px 24px rgb(0 0 0 / 9%);
}

/* top header */

.top-header {
  display: flex;

  min-height: 42px;

  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid rgb(0 0 0 / 10%);

  color: #667085;

  font-size: 13px;
}

.hero-header:not(.scrolled) .top-header {
  color: #ffffff;

  border-bottom-color: rgb(255 255 255 / 30%);
}

.top-header-left,
.top-header-right {
  display: flex;

  align-items: center;

  gap: 22px;
}

.top-header-left a,
.top-header-right a {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  color: inherit;

  text-decoration: none;

  transition: color 0.2s ease;
}

.top-header-left a:hover,
.top-header-right a:hover {
  color: var(--color-accent);
}

.top-header-right a {
  font-size: 16px;
}

/* main header */

.main-header {
  display: flex;

  min-height: 78px;

  align-items: center;
  justify-content: space-between;

  color: var(--header-text);
}

/* brand */

.brand {
  display: flex;

  min-width: 0;

  align-items: center;

  gap: 12px;

  color: inherit;

  text-decoration: none;
}

/* brand logo */

.brand-logo,
.brand-logo-placeholder {
  display: flex;

  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  border-radius: 9px;
}

.brand-logo {
  background-color: #ffffff;
}

.brand-logo img {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

.brand-logo-placeholder {
  background-color: var(--color-primary);
  color: #ffffff;

  font-size: 13px;
  font-weight: 700;

  line-height: 1;
}

/* brand name */

.brand-name {
  display: block;

  max-width: 320px;

  overflow: hidden;

  color: inherit;

  font-size: 18px;
  font-weight: 700;

  line-height: 1.2;

  letter-spacing: -0.02em;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* mobile */

@media (max-width: 600px) {
  .brand {
    gap: 10px;
  }

  .brand-logo,
  .brand-logo-placeholder {
    width: 34px;
    height: 34px;

    flex-basis: 34px;
  }

  .brand-name {
    max-width: 210px;

    font-size: 17px;
  }
}

/* desktop navigation */

.nav-bar {
  display: flex;

  align-items: center;

  gap: 34px;
}

.nav-bar-heading {
  display: flex;

  min-height: 78px;

  align-items: center;

  color: inherit;

  font-size: 14px;
  font-weight: 500;

  text-decoration: none;

  transition:
    color 0.2s ease,
}

.nav-bar-heading:hover {
  color: var(--color-accent);
}

.nav-bar-heading.active {
  color: var(--color-accent);

  font-weight: 700;
}

/* mobile navigation */

.mobile-menu-button {
  display: none;

  padding: 5px;

  border: 0;

  background-color: transparent;
  color: inherit;

  font-size: 29px;

  cursor: pointer;
}

.mobile-nav {
  display: none;
}

/* tablet */

@media (max-width: 900px) {
  .nav-bar {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .mobile-nav {
    position: absolute;

    top: 100%;
    right: 0;
    left: 0;

    display: flex;

    flex-direction: column;

    padding:
      12px
      24px
      24px;

    background-color: #ffffff;
    color: var(--color-text);

    box-shadow: 0 12px 22px rgb(0 0 0 / 10%);

    opacity: 0;

    pointer-events: none;

    transform: translateY(-10px);

    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }

  .mobile-nav.open {
    opacity: 1;

    pointer-events: auto;

    transform: translateY(0);
  }

  .mobile-nav-link {
    padding-block: 14px;

    border-bottom: 1px solid rgb(0 0 0 / 8%);

    color: var(--color-text);

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;
  }

  .mobile-nav-link:last-child {
    border-bottom: 0;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    color: var(--color-accent);
  }
}

/* mobile */

@media (max-width: 600px) {
  .top-header {
    display: none;
  }

  .main-header {
    min-height: 70px;
  }

  .brand-name {
    max-width: 230px;

    font-size: 20px;
  }

  .mobile-nav {
    padding:
      8px
      18px
      18px;
  }
}

.top-header-left a,
.top-header-right a,
.top-header-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
