@import '../../styles/breakpoints/index';

.nav {
  padding-left: var(--pageMargin);
  padding-right: var(--pageMargin);
  width: 100%;
  display: grid;
  align-items: center;
  background-color: var(--color-background);
  z-index: var(--z-navbar);
  position: sticky;
  top: 0;
}

.inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-column-gap: var(--gutter);
  align-items: baseline;
}

.logoWrapper {
  display: grid;
  justify-content: flex-start;
  grid-row: 1 / span 1;

  @media (orientation: portrait) {
    grid-column: 1 / span 12;
  }

  @media (orientation: portrait) and ($sm) {
    grid-column: 1 / span 4;
  }

  @media (orientation: landscape) {
    grid-column: 1 / span 4;
  }
}

.logo {
  font-family: var(--font-logo);
  font-weight: 500;
  font-size: var(--size-5);
  letter-spacing: var(--letter-space-tight-4);
  outline: none;
  color: var(--color-text);
  height: 100%;
  padding-top: 20px;
  padding-bottom: 12px;
  display: inline-grid;
  background-color: var(--color-background);
  transition: opacity 0.25s var(--animation-bezier);
  transition-delay: 0.125s;

  @media (orientation: portrait) {
    font-size: var(--size-5);
  }

  @media (orientation: portrait) and ($sm) {
    font-size: var(--size-6);
  }

  @media (orientation: landscape) {
    font-size: var(--size-4);
  }

  @media ($md) {
    font-size: var(--size-6);
  }

  @media ($lg) {
    font-size: var(--size-7);
  }

  @media ($xl) {
    font-size: var(--size-9);
  }
}

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

.logo.hasScrolled {

  @media (orientation: portrait) {
    opacity: 0;
    transition-delay: 0s;
  }

  @media (orientation: portrait) and ($sm) {
    opacity: 1;
  }
}

.primary {
  text-align: right;
  display: none;
  background-color: va(--color-background);
  height: 100%;

  @media (orientation: portrait) and ($sm) {
    display: grid;
    grid-column: span 2;
  }

  @media (orientation: landscape) {
    grid-column: span 2;
    display: grid;
  }
}

.searchBar {

  @media ($md) {
    grid-column: 5 / span 4;
  }
}

.link {
  color: var(--color-text);
  font-weight: 500;

  &.active,
  &:hover {
    color: var(--color-primary);
  }
}
