/* ======================================================
//  リセット
// ====================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  background-repeat: no-repeat;
}

:where(:root) {
  --color-blue: #003888;
  --color-ink: #000;
  --site-header-height: 80px;
  --site-gutter: 40px;

  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-ink);
  background-color: #fff;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;

  scroll-behavior: smooth;
  scroll-padding-top: var(--site-header-height);

  @media (width < 800px) {
    --site-header-height: 60px;
    --site-gutter: 5vw;
  }
}

:where(body) {
  margin: 0;
}

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd) {
  margin: 0;
  padding: 0;
}

:where(ul, ol) {
  list-style: none;
}

:where(img, svg, picture, video) {
  block-size: auto;
  max-inline-size: 100%;
  vertical-align: bottom;
}

:where(a) {
  text-decoration: none;
}

/* ======================================================
//  ヘッダー
// ====================================================== */

@keyframes HeaderBg {
  from {
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0);
  }
  to {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
  }
}

.Header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--site-header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;

  transition:
    backdrop-filter 0.3s ease,
    background-color 0.3s ease;

  &.Header--scrolled {
    backdrop-filter: blur(5px);
    background-color: rgba(255, 255, 255, 0.6);
  }

  & .Header__left {
    margin-left: var(--site-gutter);
  }
  & .Header__right {
    margin-right: var(--site-gutter);
  }
}

.HeaderLogo {
  & .HeaderLogo__image {
    display: block;

    @media (width < 800px) {
      width: 320px;
    }
  }
}

.HeaderNav {
  font-size: 18px;
  font-weight: bold;

  @media (width < 800px) {
    font-size: 14px;
  }

  @media (width < 620px) {
    display: none;
  }

  & .HeaderNav__list {
    display: flex;
    gap: 2em;
  }

  & .HeaderNav__link {
    color: var(--color-blue);
  }
}

/* ======================================================
//  ヒーロー
// ====================================================== */

.Hero {
  position: relative;
  aspect-ratio: 16 / 9;

  /* スマホ（縦長） */
  @media (orientation: portrait) and (width < 800px) {
    aspect-ratio: 1;
  }

  /* 16:9より横長の場合は高さを収めるようにする */
  @media (min-aspect-ratio: 16/9) {
    aspect-ratio: auto;
    width: 100%;
    height: 100svh;
  }

  /* 1920px以上の場合は高さを制限する */
  @media (width > 1920px) {
    aspect-ratio: auto;
    width: 100%;
    height: min(100svh, 1080px);
  }

  & .Hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }

  & .Hero__bg {
    filter: brightness(0.7);
  }

  & .Hero__text {
    position: absolute;
    inset: 0;
    margin: auto;
    width: auto;

    @media (width >= 800px) {
      height: 25%;
      translate: 0% -15%;
    }

    @media (width < 800px) {
      height: 20%;
    }
  }
}

/* ======================================================
//  リード Number one & Only one
// ====================================================== */

.Lead {
  overflow: hidden;
  padding-block: 90px 260px;
  max-width: 1920px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;

  @media (width < 800px) {
    padding-block: calc(var(--site-gutter) * 3) calc(var(--site-gutter) * 5);
  }

  & .Lead__english {
    @media (width >= 800px) {
      zoom: min(1, 100vw / 1572px);

      &.Lead__english--numberone {
        align-self: flex-start;
      }
      &.Lead__english--onlyone {
        margin-top: 160px;
        align-self: flex-end;
      }
    }

    @media (width < 800px) {
      --numberone-width: calc(100vw - var(--site-gutter) * 2);
      --onlyone-width: calc(var(--numberone-width) * 0.71);

      &.Lead__english--numberone {
        margin-left: var(--site-gutter);
        width: var(--numberone-width);
      }

      &.Lead__english--onlyone {
        margin-top: calc(var(--site-gutter) * 3);
        margin-left: var(--site-gutter);
        width: var(--onlyone-width);
      }
    }
  }

  & .Lead__container {
    align-self: center;
    padding-inline: var(--site-gutter);
    display: flex;

    @media (width >= 800px) {
      margin-top: 50px;
      width: 1600px;
      max-width: 100%;

      gap: 28px;
      align-items: center;
      zoom: min(1, 100vw / 1320px);

      &.Lead__container--numberone {
        flex-direction: row;
      }
      &.Lead__container--onlyone {
        flex-direction: row-reverse;
      }
    }

    @media (width < 800px) {
      margin-top: var(--site-gutter);
      flex-direction: column;
      gap: calc(var(--site-gutter) * 0.8);
    }
  }

  & .Lead__image {
    flex-shrink: 0;
    aspect-ratio: 692 / 400;
    width: 692px;
    height: auto;
    border-radius: min(35px, var(--site-gutter));

    @media (width < 800px) {
      width: 100%;
    }
  }

  & .Lead__content {
    font-size: 37px;
    line-height: 1.7;
    font-weight: 500;

    @media (width < 800px) {
      font-size: 6vw;
    }

    & .Lead__title {
      font-size: 73%;
      color: #c4cee5;
    }

    & .Lead__text {
      font-size: 100%;
    }
  }
}

/* ======================================================
//  事業内容
// ====================================================== */

.Business {
  padding-block: 90px 130px;
  padding-inline: var(--site-gutter);
  background-color: #f1f1f1;

  @media (width < 800px) {
    padding-block: calc(var(--site-gutter) * 3) calc(var(--site-gutter) * 4);
  }
}

.BusinessHeader {
  margin-inline: auto;
  max-width: 940px;

  & .BusinessHeader__english {
    width: min(100vw * 800 / 1020, 800px);
  }

  & .BusinessHeader__title {
    margin-top: 1em;
    font-size: 25px;
    font-weight: 500;
  }
}

.BusinessCards {
  margin-top: 50px;
  margin-inline: auto;
  max-width: 940px;
  display: grid;
  grid-template-columns: repeat(3, calc(100% * 287 / 940));
  justify-content: space-between;

  @media (width < 800px) {
    max-width: 360px;
    grid-template-columns: 1fr;
    gap: calc(var(--site-gutter) * 1.5);
  }

  & .BusinessCards__item {
    container-type: inline-size;
  }
}

.BusinessCard {
  position: relative;

  &:has(.BusinessCard__link) {
    --icon-display: block;
    --bg-transition: transform 0.3s ease, filter 0.3s ease;

    @media (hover: hover) {
      &:hover {
        --bg-scale: 1.1;
        --bg-filter: blur(4px) brightness(0.7);
      }
    }
  }

  & .BusinessCard__image {
    display: grid;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 20px;
    overflow: hidden;

    & .BusinessCard__bg {
      grid-area: 1 / 1;
      width: 100%;
      transform: scale(var(--bg-scale, 1));
      filter: var(--bg-filter, none);
      transition: var(--bg-transition);
    }

    & .BusinessCard__logo {
      position: relative;
      z-index: 1;
      grid-area: 1 / 1;
      width: 100%;
    }
  }

  & .BusinessCard__title {
    margin-top: 1em;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    &::after {
      content: '';
      display: var(--icon-display, none);
      flex-shrink: 0;
      width: calc(1em * 16.16 / 18);
      height: calc(1em * 14.4 / 18);
      background-image: url('../images/icon-external.svg');
      background-size: 100% 100%;
    }
  }

  & .BusinessCard__description {
    margin-top: 0.5em;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
  }

  & .BusinessCard__link {
    display: block;
    position: absolute;
    z-index: 2;
    inset: 0;
    font-size: 0;
    color: transparent;
  }
}

/* ======================================================
//  企業情報
// ====================================================== */

.Aboutus {
  padding-inline: var(--site-gutter);
  padding-block: 160px 150px;

  @media (width < 800px) {
    padding-block: calc(var(--site-gutter) * 3) calc(var(--site-gutter) * 5);
  }

  & .Aboutus__inner {
    margin-inline: auto;
    max-width: 940px;
  }
}

.AboutusHeading {
  font-size: 25px;
  font-weight: 500;
  margin-bottom: 100px;

  @media (width < 800px) {
    margin-bottom: calc(var(--site-gutter) * 1.5);
  }
}

.AboutusList {
  display: grid;
  font-size: 16px;
  line-height: 1.7;

  @media (width >= 800px) {
    --gap: 30px;
    grid-template-columns: 200px 1fr;
    row-gap: var(--gap);
  }

  @media (width < 800px) {
    --gap: calc(var(--site-gutter) * 0.8);
  }

  & > :where(dt, dd) {
    padding-inline: 10px;

    @media (width >= 800px) {
      border-bottom: 1px solid var(--color-blue);
      padding-bottom: var(--gap);
    }

    &:where(dt) {
      color: #534741;

      @media (width < 800px) {
        &:not(:first-child) {
          padding-top: var(--gap);
        }
      }
    }

    &:where(dd) {
      color: #666;

      @media (width < 800px) {
        padding-top: 0.3em;
        padding-left: calc(10px + 1em);
        border-bottom: 1px solid var(--color-blue);
        padding-bottom: var(--gap);
      }
    }
  }

  & :where(a) {
    color: #809bc3;
    display: inline-block;
  }
}

/* ======================================================
//  Nurturing the Future
// ====================================================== */

.Future {
  position: relative;

  @media (width >= 800px) {
    height: 490px;
  }

  @media (width < 800px) {
    aspect-ratio: 3 / 2;
  }

  & .Future__bg {
    position: absolute;
    z-index: -1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  & .Future__text {
    margin-inline: auto;
    padding-inline: var(--site-gutter);
    max-width: calc(940px + var(--site-gutter) * 2);
    height: 100%;
    display: flex;
    align-items: center;

    & > img {
      @media (width < 800px) {
        width: 30vw;
      }
    }
  }
}

/* ======================================================
//  フッター
// ====================================================== */

.Footer {
  padding-inline: var(--site-gutter);
  padding-block: 45px 20px;
  background-color: #c4cee5;

  & .Footer__inner {
    max-width: 940px;
    margin-inline: auto;
    display: flex;

    @media (width >= 800px) {
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
    }

    @media (width < 800px) {
      flex-direction: column;
      align-items: center;
    }
  }

  & .Footer__logo {
    display: block;
    width: 368px;
    height: auto;

    @media (width < 800px) {
      width: 290px;
    }
  }

  & .Footer__nav {
    display: flex;
    font-size: 18px;
    gap: 2em;
    font-size: 18px;
    font-weight: bold;

    @media (width < 800px) {
      margin-top: 30px;
      font-size: 16px;
    }

    & a {
      color: var(--color-blue);
    }
  }

  & .Footer__copyright {
    font-size: min(12px, 2.7vw);
    color: var(--color-blue);

    @media (width >= 800px) {
      margin-top: 130px;
      width: 100%;
    }

    @media (width < 800px) {
      margin-top: 80px;
    }
  }
}
