.hero-image-box {
  position: relative;
  margin-bottom: 75px;
  overflow: hidden;

  @include sm {
    margin-bottom: 60px;
  }

  &__wrap {
    max-width: $max-width;
    margin: auto;
    padding: 0 $gutter;
    display: flex;
    flex-direction: column;

    @include sm {
      padding: 0;
    }

    .hero-image-box--invert & {
      align-items: flex-end;
    }
  }

  &__image {
    @include image-aspect-ratio(calc(100% / 12 * 10 - #{$half-gutter}), 61%);
    max-height: 600px;
    z-index: 1;

    @include sm {
      @include image-aspect-ratio(100%, 85%);
      max-height: 100%;
    }

    img {
      display: block;
      width: 100%;
    }
  }

  &__title-box-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: -430px;

    @include mdx {
      margin-top: -340px;
    }

    @include md {
      margin-top: -167px;
    }

    @include sm {
      margin-top: 0;
    }

    .hero-image-box--invert & {
      align-self: flex-start;
    }
  }

  &__title-box-content {
    position: relative;
    width: calc(100% - 180px);
    z-index: 2;

    @include sm {
      width: 100%;;
    }
  }

  &__title-box {
    position: relative;
    width: 800px;
    min-height: 480px;
    padding: 40px 0 40px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;

    @include mdx {
      width: 700px;
      min-height: 455px;
    }

    @include md {
      min-height: 384px;
    }

    @include sm {
      width: 100%;
      min-height: auto;
      padding: 40px 24px;
    }

    h1 {
      color: inherit;
      margin: 0;
      font-weight: 600;
      font-size: 5.8rem;
      line-height: 6.2rem;

      @include mdx {
        font-size: 5rem;
        line-height: 6rem;
      }

      @include sm {
        font-size: 3.8rem;
        line-height: 4.5rem;
      }
    }

    p {
      font-size: 2.6rem;
      line-height: 3.2rem;
      margin-bottom: 0;
      margin-top: 16px;

      @include mdx {
        font-size: 2.3rem;
        line-height: 3rem;
      }

      @include sm {
        font-size: 2.1rem;
        line-height: 2.9rem;
      }
    }

    a {
      margin-top: 30px;

      @include sm {
        margin-top: 20px;
      }
    }

    .std-button {
      padding: 0 24px;

      @include sm {
        width: 100%;
        max-width: 400px;
      }
    }
  }

  &__title-box-bg1,
  &__title-box-bg2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: $topic-orange;

      .hero-image-box--secondary & {
        background-color: $secondary-color;
      }

      .hero-image-box--primary & {
        background-color: $primary-color;
      }

      .hero-image-box--orange & {
        background-color: $topic-orange;
      }

      .hero-image-box--yellow & {
        background-color: $topic-yellow;
      }

      .hero-image-box--green & {
        background-color: $topic-green;
      }
    }
  }

  &__title-box-bg2 {
    z-index: 1;

    &::before {
      opacity: 0.8;
    }
  }

  &__overlay-logo {
    width: 200px;
    position: absolute;
    bottom: 24px;
    left: 24px;
    height: 200px;
    pointer-events: none;

    img {
      object-fit: contain;
      object-position: bottom;
    }

    @include sm {
      width: 150px;
      height: 150px;
      bottom: 15px;
      left: 15px;
    }

    .hero-image-box--invert & {
      left: auto;
      right: 24px;

      @include sm {
        right: 15px;
      }
    }
  }

  &__content-wrap {
    margin-top: 48px;
  }

  &__content {
    width: 100%;
    max-width: calc(100% / 12 * 5);
    margin-left: calc(100% / 6);
    padding: 0 12px;
    font-size: 1.8rem;

    @include md {
      margin-left: 0;
      max-width: 100%;
      padding: 0;
    }

    @include sm {
      padding: 0 $gutter-mobile;
    }
  }
}
