@import "./variables.css";

/**
 * UNITS hero components
 *
 * ==================================
 * @base:   [.uc-hero]
 * ==================================
 * @parts:  [.uc-***]
 *          [.uc-***]
 * ==================================
 * @option: [._***]
 *          [._***]
 * ==================================
 */

.uc-hero {
  padding: 160px 80px;
  background-color: var(--color-dark);
  position: relative;
  text-align: center;

  @media (--medium-viewport) {
    padding: 144px 64px;
  }

  @media (--small-viewport) {
    padding: 64px 20px 72px;
  }

  > * {
    position: relative;
    z-index: var(--z-index-lv1);
  }

  ._ghost + &,
  ._fixed + &,
  ._ghost + .uc-menu._slide + &,
  ._fixed + .uc-menu._slide + & {
    margin-top: 0;
    padding-top: calc(var(--header-height) + 160px);

    @media (--small-viewport) {
      padding-top: calc(var(--header-small-height) + 64px);
    }
  }

  &._left {
    text-align: left;

    .uc-btn-unit {
      justify-content: left;
    }
  }

  &._full {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 64px;
    height: calc(100vh - var(--header-height));

    @media (--small-viewport) {
      padding: 0 24px;
      height: calc(100vh - (var(--header-small-height)));
    }

    .uc-header ~ .uc-menu._bar + & {
      height: calc(100vh - calc(var(--header-height) + var(--menu-height)));

      @media (--small-viewport) {
        height: calc(100vh - calc((var(--header-small-height)) + var(--menu-small-height)));
      }
    }

    ._ghost + &,
    ._fixed + &,
    ._ghost ~ .uc-menu._slide + &,
    ._fixed ~ .uc-menu._slide + & {
      height: 100vh;
      padding-top: var(--header-height);

      @media (--small-viewport) {
        padding-top: var(--header-small-height);
      }
    }

    ._ghost ~ .uc-menu._bar + &,
    ._fixed ~ .uc-menu._bar + & {
      height: calc(100vh - (var(--header-height) + var(--menu-height)));

      @media (--small-viewport) {
        height: calc(100vh - ((var(--header-small-height)) + var(--menu-small-height)));
      }
    }
  }

  > p {
    color: white;
    font-size: 1.125rem;
    margin: 24px 0 0;

    @media (--small-viewport) {
      margin: 16px 0 0;
      font-size: 1rem;
    }
  }

  .uc-btn-unit {
    justify-content: center;
  }
}

.uc-hero-title {
  color: white;
  font-size: 4rem;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;

  [lang~=ja] & {
    font-size: 3.5rem;
  }

  @media (--small-viewport) {
    font-size: 3rem;
    line-height: 1.1;

    [lang~=ja] & {
      font-size: 2.5rem;
      line-height: 1.3;
    }
  }
}

.uc-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;

  &:before {
    content: " ";
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: color(black a(.5));
  }
}
