.links {
  padding-top: 7rem;
  background-color: var(--color-white);
}

.links__link {
  position: relative;
  width: 100%;
}

.links__careers {
  position: relative;
  z-index: var(--z-index-reception);
  height: 22.2rem;
  padding: 3rem;
  color: var(--color-white);
  background-color: rgb(0 0 0 / 50%);
}

.links__overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-index-reception);
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 50%);
  transition: opacity 0.6s;
}

.links__careers::before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  content: '';
  background-image: -webkit-image-set(
    url('/public/images/carrers.jpg') type('image/jpeg'),
    url('/public/images/carrers.avif') type('image/avif')
  );
  background-image: image-set(
    url('/public/images/carrers.jpg') type('image/jpeg'),
    url('/public/images/carrers.avif') type('image/avif')
  );
  background-position: top center;
  background-size: cover;
  opacity: 1;
}

.links__group {
  position: relative;
  z-index: var(--z-index-reception-content);
}

.links__title {
  font-size: 4rem;
  font-weight: 700;
}

.links__japanese {
  margin-top: 2rem;
  font-size: 1.8rem;
  font-weight: 500;
}

.links__button {
  position: absolute;
  right: 2.5rem;
  bottom: 2.5rem;
  z-index: var(--z-index-reception-content);
  width: 6rem;
  height: 6rem;
  border: 0.07rem solid var(--color-white);
  border-radius: 50%;
}

.links__button__arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.84rem;
  height: 1.68rem;
  transform: translate(-50%, -50%) rotate(90deg);
}

.links__contact {
  position: relative;
  z-index: var(--z-index-reception);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 22.2rem;
  padding: 3rem;
  color: var(--color-white);
  background-color: rgb(0 0 0 / 50%);
}

.links__contact::before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  content: '';
  background-image: -webkit-image-set(
    url('/public/images/contact.jpg') type('image/jpeg'),
    url('/public/images/contact.avif') type('image/avif')
  );
  background-image: image-set(
    url('/public/images/contact.jpg') type('image/jpeg'),
    url('/public/images/contact.avif') type('image/avif')
  );
  background-position: top center;
  background-size: cover;
  opacity: 1;
  transition: opacity 0.6s;
}

.links__contact:hover::before {
  opacity: 1;
}

.links__lists {
  position: relative;
  z-index: var(--z-index-reception-content);
  width: fit-content;
  margin-left: auto;
  color: var(--color-white);
}

.links__listitem {
  display: grid;
  grid-template-columns: 11% 1fr;
  column-gap: 2.37rem;
  justify-content: space-between;
}

.links__listitem:not(:first-child) {
  margin-top: 1rem;
}

.links__address {
  font-weight: bold;
  text-align: right;
}

.links__mail {
  width: 24.5rem;
}

@media screen and (min-width: 768px) {
  .links {
    padding-top: 6rem;
  }

  .links__inner {
    position: relative;
    display: flex;
  }

  .links__overlay {
    opacity: 0;
  }

  .links__link:hover .links__overlay {
    opacity: 1;
  }

  .line-anime-vertical::before,
  .line-anime-vertical::after {
    position: absolute;
    width: 0;
    height: 1px;
    content: '';
    background-color: var(--color-gray-light);
  }

  .line-anime-vertical::before {
    top: 0;
    left: 0;
    animation: line-anime-vertical 1s ease-out 0s forwards;
  }

  .line-anime-vertical::after {
    bottom: 0;
    left: 0;
    animation: line-anime-vertical 1.3s ease-out 0s forwards;
  }

  @keyframes line-anime-vertical {
    0% {
      width: 0%;
    }

    100% {
      width: 100%;
    }
  }

  .links__link {
    width: 50%;
  }

  .links__careers {
    height: 23.4rem;
    padding: 5.18rem 1.72rem 0 4.39rem;
    color: var(--color-deepblue-light);
    background-color: transparent;
  }

  .links__careers::before {
    background-position: top -2rem center;
    opacity: 0;
    transition: opacity 0.6s;
  }

  .line-anime-beside::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 0;
    content: '';
    background-color: var(--color-gray-light);
    animation: line-anime-beside 1s linear 0s forwards;
  }

  @keyframes line-anime-beside {
    0% {
      height: 0%;
    }

    100% {
      height: 100%;
    }
  }

  .links__link:hover {
    color: var(--color-white);
    background-color: rgb(0 0 0 / 50%);
    opacity: 1;
    transition: 0.6s;
  }

  .links__group {
    opacity: 0;
    transition: 0.6s;
  }

  .links__link:hover .links__group {
    color: var(--color-white);
  }

  .links__careers:hover::before {
    opacity: 1;
  }

  .links__button {
    right: 2.53rem;
    bottom: 2.2rem;
    width: 8.1rem;
    height: 8.1rem;
  }

  .links__listitem {
    column-gap: 3rem;
  }

  .links__listitem:not(:first-child) {
    margin-top: 1.2rem;
  }

  .links__button__arrow {
    width: 1.38rem;
    height: 1.38rem;
  }

  .links__contact {
    height: 23.4rem;
    padding: 5.18rem 2rem 2rem 4.39rem;
    margin-top: 0;
    color: var(--color-deepblue-light);
    background-color: transparent;
  }

  .links__contact::before {
    opacity: 0;
    transition: opacity 0.6s;
  }

  .links__title {
    font-size: 3.94rem;
  }

  .links__japanese {
    margin-top: 3.07rem;
    font-size: 1.26rem;
  }

  .links__mail {
    width: 24.5rem;
  }
}

@media screen and (min-width: 1440px) {
  .links {
    padding-top: 8rem;
  }

  .links__careers {
    height: 33.75rem;
    padding: 6.91rem 0 0 5.85rem;
  }

  .links__button {
    bottom: 3.18rem;
    width: 10.8rem;
    height: 10.8rem;
  }

  .links__listitem {
    column-gap: 4rem;
  }

  .links__listitem:not(:first-child) {
    margin-top: 1.87rem;
  }

  .links__button__arrow {
    width: 1.84rem;
    height: 1.68rem;
  }

  .links__contact {
    height: 33.75rem;
    padding: 6.91rem 5.89rem 2.3rem 5.85rem;
  }

  .links__title {
    font-size: 5.25rem;
  }

  .links__japanese {
    font-size: 1.68rem;
  }

  .links__lists {
    font-size: 2.62rem;
  }

  .links__mail {
    width: 40rem;
  }
}
