@import url(common.css);
@import url("https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css");

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

/* ========== hero ========== */

.hero {
  background: linear-gradient(var(--bg-c) 80%, #fff);
  position: relative;
  height: 120vmin;
}
.infinite-swiper {
  position: absolute;
  inset: auto 0 20vmin;
  width: 100vw;
  z-index: 2;
  .swiper-wrapper {
    transition-timing-function: linear;
  }
  .swiper-slide {
    font-family: var(--serif);
    color: #fff;
    font-size: max(10vw, 3.6em);
    text-transform: capitalize;
    white-space: nowrap;
    width: fit-content;
    padding-left: 0.4em;
  }
}
.hero-swiper {
  position: absolute;
  inset: var(--header-h) 5vw 30vmin;
  .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.top {
  padding-top: 0;
  display: flex;
  background-color: #fff;
  align-items: center;
  video {
    width: max(40%, 340px);
    object-fit: cover;
  }
  h1 {
    flex: 1;
    font-size: max(3.4vw, 1.6em);
    line-height: 1.6;
    font-weight: 500;
    padding-left: 5vw;
  }
}

.service {
  padding-block: max(8vw, 50px) max(8vw, 80px);
  border-radius: 1em;
  background-color: var(--bg-c);
  margin-inline: 1em;
  .inner {
    display: flex;
  }
  .title-common {
    width: 40%;
  }
  .body {
    flex: 1;
    p {
      line-height: 1.8;
    }
    h3 {
      font-size: max(2.4vw, 1.5em);
      margin-bottom: 1em;
      font-weight: 500;
    }
  }
  .links {
    li {
      border-radius: 1em;
      transition-property: box-shadow, background-color;
      transition-duration: 0.6s;
      &:hover {
        background-color: #fff;
        box-shadow: 0 20px 40px -2px rgb(0 0 0/0.1);
        transition-duration: 0.3s;
      }
    }
    a {
      padding-block: 1em;
      display: flex;
      align-items: center;
      margin-inline: 5vw;
      gap: 1em;
      border-top: 1px solid #fff;
      overflow: hidden;
      &:where(:is(li:last-child *)) {
        border-bottom: 1px solid #fff;
      }
      &:is(li:hover *),
      &:is(li:hover + li *) {
        border-top-color: transparent;
      }
      &:is(li:last-child:hover *) {
        border-bottom-color: transparent;
      }
    }
  }
}

.link-area {
  padding-top: 5vw;
  h3 {
    margin: 0 0 1em 5vw;
    color: var(--dark-c);
    text-transform: capitalize;
    font-size: max(2vw, 1.4em);
  }
}
.link-head {
  --img-sz: max(8vw, 100px);
  --head-gap: max(2vw, 1em);
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--head-gap);
  @media (any-hover: hover) {
    translate: calc((var(--img-sz) + var(--head-gap)) * -1);
    transition: translate 0.6s;
    &:is(li:hover *) {
      translate: 0;
      transition: translate 0.3s;
    }
  }
  h4 {
    font-size: max(2vw, 1.1em);
    font-weight: 500;
  }
  img {
    width: var(--img-sz);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
  }
}
.link-body {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 1em;
  p {
    font-size: max(1.1vw, 14px);
    font-weight: 500;
    color: #666;
  }
  span {
    width: 2em;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid;
    font-size: 20px;
    font-variation-settings: "wght" 300;
  }
}

.company {
  padding-block: max(8vw, 60px);
  position: relative;
  &::before {
    position: absolute;
    content: "";
    height: 1px;
    width: max(30%, 240px);
    background-color: var(--bg-c);
    inset: 0 auto auto 0;
  }
  .title-common {
    width: auto;
    margin-bottom: 5vw;
  }
  .contents {
    display: flex;
    column-gap: 9%;
  }
  video {
    width: max(40%, 340px);
    align-self: center;
  }
  h3 {
    font-size: max(2.4vw, 1.6em);
    font-weight: 500;
    margin-bottom: 1em;
  }
  p {
    line-height: 1.8;
  }
  .links {
    display: flex;
    margin-inline: 5vw;
    gap: max(3vw, 1em);
    counter-reset: num 0;
    li {
      --p: max(2.4vw, 1.2em);
      flex: 1;
      border-radius: 1em;
      transition-property: box-shadow, background-color;
      transition-duration: 0.5s;
      position: relative;
      background: linear-gradient(#fff, var(--bg-c));
      overflow: hidden;
      counter-increment: num 1;
      &::before {
        position: absolute;
        inset: 0;
        content: "";
        background-color: var(--bg-c);
        opacity: 0;
        transition: opacity 0.5s;
      }
      &:hover {
        box-shadow: 0 20px 40px -2px rgb(0 0 0/0.2);
        &::before {
          opacity: 1;
        }
      }
    }
    a {
      isolation: isolate;
      display: flex;
      flex-direction: column;
      gap: 1em;
      padding: var(--p);
    }
    h4 {
      font-size: max(1.6vw, 1.1em);
      font-weight: 500;
      &::after {
        content: attr(data-en);
        font-size: 1.1rem;
        color: var(--secondary-c);
        display: block;
      }
    }
    .symbols {
      display: flex;
      justify-content: space-between;
      align-items: end;
      &::before {
        content: "0" counter(num) ".";
        line-height: 1;
        font-size: 1.6em;
        font-family: var(--serif);
        opacity: 0.4;
      }
    }
    span {
      width: 2em;
      aspect-ratio: 1;
      border-radius: 50%;
      display: grid;
      place-items: center;
      border: 1px solid;
      font-size: 20px;
      font-variation-settings: "wght" 300;
    }
  }
}

.recruit {
  padding-block: 0 max(8vw, 60px);
  display: flex;
  gap: max(5vw, 50px);
  align-items: center;
  > img {
    width: 50%;
    margin-left: -5vw;
    border-radius: 0 30px 30px 0;
  }
  .body {
    flex: 1;
    p {
      line-height: 1.8;
    }
  }
  .title-common {
    margin-bottom: 2em;
  }
  h3 {
    font-size: max(2vw, 1.3em);
    font-weight: 500;
    margin-bottom: 1em;
  }
  .more {
    span {
      border: 1px solid;
      border-radius: 50%;
      display: grid;
      place-items: center;
      width: 1.3em;
      aspect-ratio: 1;
    }
  }
}

@media (width < 1024px) {
  .top h1 {
    padding-left: 0;
  }
  .link-head,
  .link-body {
    display: contents;
  }
  .service {
    .links {
      a {
        display: grid;
        grid-template-columns: 100px 1fr 40px;
        margin-inline: 0;
        gap: 0.6em 5vw;
      }
      img {
        grid-area: 1/1/3/2;
      }
      h4 {
        grid-area: 1/2/2/3;
        align-self: end;
      }
      p {
        grid-area: 2/2/3/3;
        align-self: start;
      }
      span {
        grid-area: 1/3/3/4;
      }
    }
  }
  .company .links {
    margin-inline: 0;
  }
}
@media (width < 768px) {
  .top {
    flex-direction: column;
    gap: 40px;
    h1 {
      text-align: center;
    }
  }
  .title-common {
    .en {
      margin-bottom: 0.4em;
    }
  }
  .service {
    .title-common {
      width: 100%;
    }
    .inner {
      flex-direction: column;
    }
    .body {
      h3 {
        margin-top: 1em;
      }
    }
    .links {
      a {
        grid-template-columns: 100px 1fr;
      }
      h4 {
        grid-area: 1/2/2/3;
      }
      p {
        grid-area: 2/2/3/3;
      }
      span {
        display: none;
      }
    }
  }
  .link-area {
    h3 {
      margin-left: 0;
    }
  }
  .company {
    .contents {
      gap: 5vw;
      flex-direction: column;
    }
    .links {
      flex-direction: column;
      width: min(100%, 360px);
      margin-inline: auto;
      a {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;

      }
      h4 {
        font-size: 1.2em;
      }
      .symbols::before {
        display: none;
      }
    }
  }
  .recruit {
    flex-direction: column;
    > img {
      width: 95vw;
      margin-left: -5vw;
      order: 1;
    }
  }
}

@media (width < 440px) {
  .service {
    margin-inline: 0;
    border-radius: 1em 1em 0 0;
    background: linear-gradient(var(--bg-c) 92%, transparent);
  }
}
