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

.fv {
  display: flex;
  align-items: center;
  padding-block: var(--header-h) 0;
  height: 100vh;
  hgroup {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: max(3vw, 1em);
  }
  h1 {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    letter-spacing: 0.2em;
    font-weight: 300;
    text-align: center;
    span {
      font-size: max(3vw, 1.8em);
      letter-spacing: 0.1em;
      font-weight: normal;
      &::first-letter {
        color: var(--primary-c);
      }
    }
  }
  h2 {
    display: flex;
    flex-direction: column;
    font-size: max(2.8vw, 1.8em);
    gap: 0.3em;
    font-weight: 300;
    color: var(--primary-c);
    span {
      color: #333;
      font-size: var(--fz);
      font-weight: normal;
      font-weight: 500;
    }
  }
  .bg {
    width: 50%;
    display: grid;
    place-items: center;
    img {
      width: 90%;
    }
  }
}

.service {
  padding-top: max(5vw, 50px);
  padding-inline: 15vw;
  display: flex;
  gap: 8vw;
  align-items: center;
  @media (width < 1024px) {
    padding-inline: 5vw;
  }
  > img {
    width: 25%;
  }
  .body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2em;
    p {
      line-height: 1.8;
    }
  }
}

.company {
  padding: 0 0 0 10vw;
  @media (width < 1024px) {
    padding-left: 5vw;
  }
  .inner {
    padding: max(8vw, 60px) 10vw;
    display: flex;
    gap: 8vw;
    align-items: center;
    background-color: var(--bg-c);
    border-radius: 8vw 0 0 8vw;
    @media (width < 1024px) {
      padding-inline: 5vw;
    }
    > img {
      width: 25%;
    }
  }
  .body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2em;
    p {
      line-height: 1.8;
    }
  }
}

.news {
  display: grid;
  > * {
    grid-area: 1/-1/1/-1;
  }
  h2 {
    place-self: start end;
  }
  .news-list {
    --w: min(90vw, 1200px);
    --m: calc(var(--w) / 10);
    place-self: center;
    width: var(--w);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: max(5vw, 30px) max(3vw, 1em);
    justify-content: center;
  }
  li {
    &:where(:nth-child(2)) {
      margin-top: var(--m);
    }
    &:where(:nth-child(3)) {
      margin-top: calc(var(--m) * 2);
    }
  }
  .button {
    place-self: end start;
  }
}

.case {
  padding-block: 0 max(5vw, 50px);
  background: linear-gradient(to bottom, #fff, var(--bg-c));
}

.case,
.partner {
  overflow-x: clip;
  position: relative;
  --border: 2px solid;
  --r: calc(var(--fz-title) * 0.6);
  .common-title {
    margin-bottom: max(5vw, 50px);
  }
  .swiper {
    overflow: visible;
  }
  .swiper-slide {
    width: fit-content;
    transition: translate 0.5s;
    display: flex;
    flex-direction: column;
    cursor: grab;
    align-items: center;
    gap: 1em;
  }
  .thumbnail {
    height: 160px;
    overflow: hidden;
    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }
  .swiper-controller {
    --sz: 34px;
    margin-top: max(5vw, 50px);
    display: flex;
    align-items: center;
    justify-content: end;
    font-size: var(--sz);
    gap: 1em;
  }
  .swiper-button {
    aspect-ratio: 1;
    width: 2em;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--primary-c);
    background: #fff;
    transition-property: opacity, box-shadow, transparent;
    transition-duration: 0.2s;
    span {
      font-size: var(--sz);
      color: var(--primary-c);
    }
    &:not([disabled]):hover {
      box-shadow: 5px 5px 10px rgb(0 0 0/0.3);
    }
    &[disabled] {
      opacity: 0.5;
      background-color: transparent;
    }
  }
}

.partner {
  padding-block: max(3vw, 30px);
  background: linear-gradient(to top, #fff, var(--bg-c));
  .bg {
    position: absolute;
    width: 60%;
    inset: min(-5vw, -50px) 0 auto auto;
  }
}

@media (orientation: portrait) {
  .fv {
    flex-direction: column;
    place-content: center;
    place-items: center;
    gap: 50px;
    hgroup {
      display: contents;
    }
    h1 {
      order: -1;
    }
    h2 {
      text-align: center;
    }
    .bg {
      width: min(100%, 400px);
      img {
        width: 70%;
      }
    }
  }
}

@media (width < 768px) {
  .service {
    flex-direction: column;
    > img {
      order: -1;
    }
  }
  .company {
    .inner {
      flex-direction: column;
    }
  }
  .news {
    display: flex;
    flex-direction: column;
    padding-block: 50px;
    gap: 50px;
    .news-list {
      margin-top: 0;
      display: flex;
      flex-direction: column;
      width: min(100%, 400px);
    }
    li {
      margin-top: 0;
    }
  }
  .case {
    .bg {
      width: 100%;
      top: 0;
    }
  }
  .case,
  .partner {
    .thumbnail {
      height: 100px;
    }
    .swiper-controller {
      --sz: 28px;
    }
  }
  
  .partner {
  .bg {
    width: min(100%, 400px);
  }
}

}
