// Components

.#{$boldr-ns}hero__video {
  @include overlay();

  // Responsiveness
  @include mobile() {
    display: none;
  }
  overflow: hidden;

  video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate3d(-50%, -50%, 0);
  }

  // Modifiers
  &.is-transparent {
    opacity: 0.3;
  }
}

.#{$boldr-ns}hero__buttons {
  // Responsiveness
  @include mobile() {
    .button {
      display: flex;

      &:not(:last-child) {
        margin-bottom: 0.75rem;
      }
    }
  }

  @include tablet() {
    display: flex;
    justify-content: center;

    .button:not(:last-child) {
      margin-right: 1.5rem;
    }
  }
  margin-top: 1.5rem;
}

// Containers

.#{$boldr-ns}hero__head,
.#{$boldr-ns}hero__foot {
  flex-grow: 0;
  flex-shrink: 0;
}

.#{$boldr-ns}hero__body {
  flex-grow: 1;
  flex-shrink: 0;
  padding: 3rem 1.5rem;
}

// Main container

.#{$boldr-ns}hero {
  // Colors
  @each $name, $pair in $colors {
    $color: nth($pair, 1);
    $color-invert: nth($pair, 2);

    &.is-#{$name} {
      // Responsiveness
      @include mobile() {
        .nav-toggle {
          span {
            background-color: $color-invert;
          }

          &:hover {
            background-color: rgba($black, 0.1);
          }

          &.is-active {
            span {
              background-color: $color-invert;
            }
          }
        }

        .nav-menu {
          .nav-item {
            border-top-color: rgba($color-invert, 0.2);
          }
        }
      }
      color: $color-invert;
      background-color: $color;

      .title {
        color: $color-invert;
      }

      .subtitle {
        color: rgba($color-invert, 0.9);

        a:not(.button),
        strong {
          color: $color-invert;
        }
      }

      .nav {
        box-shadow: 0 1px 0 rgba($color-invert, 0.2);
      }

      .nav-menu {
        @include mobile() {
          background-color: $color;
        }
      }

      a.nav-item,
      .nav-item a:not(.button) {
        color: rgba($color-invert, 0.7);

        &:hover,
        &.is-active {
          color: $color-invert;
        }
      }

      .tabs {
        a {
          opacity: 0.9;
          color: $color-invert;

          &:hover {
            opacity: 1;
          }
        }

        li {
          &.is-active a {
            opacity: 1;
          }
        }

        &.is-boxed,
        &.is-toggle {
          a {
            color: $color-invert;

            &:hover {
              background-color: rgba($black, 0.1);
            }
          }

          li.is-active a {
            &,
            &:hover {
              color: $color;
              background-color: $color-invert;
              border-color: $color-invert;
            }
          }
        }
      }

      // Modifiers
      &.is-bold {
        $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%);
        $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%);
        @include mobile() {
          .nav-menu {
            background-image: linear-gradient(
              141deg,
              $gradient-top-left 0%,
              $color 71%,
              $gradient-bottom-right 100%
            );
          }
        }

        background-image: linear-gradient(
          141deg,
          $gradient-top-left 0%,
          $color 71%,
          $gradient-bottom-right 100%
        );
      }
    }
  }
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  background-color: $white;

  .nav {
    background: none;
    box-shadow: 0 1px 0 rgba($border, 0.3);
  }

  .tabs {
    ul {
      border-bottom: none;
    }
  }

  // Sizes
  &.is-medium {
    @include tablet() {
      .#{$boldr-ns}hero__body {
        padding-top: 9rem;
        padding-bottom: 9rem;
      }
    }
  }

  &.is-large {
    @include tablet() {
      .#{$boldr-ns}hero__body {
        padding-top: 18rem;
        padding-bottom: 18rem;
      }
    }
  }

  &.is-halfheight,
  &.is-fullheight {
    .#{$boldr-ns}hero__body {
      display: flex;
      align-items: center;

      & > .#{$boldr-ns}container {
        flex-grow: 1;
        flex-shrink: 1;
      }
    }
  }

  &.is-halfheight {
    min-height: 50vh;
  }

  &.is-fullheight {
    min-height: 100vh;
  }
}
