@import url(lower.css);

.common-title {
  text-align: center;
  margin-bottom: 0;
  color: var(--deep-c);
  line-height: 1;
  font-weight: 500;
  .en {
    font-weight: 600;
    font-size: max(6.6vw, 4em);
    text-transform: capitalize;
    margin-top: 0.3em;
  }
}

.bg {
  height: calc(100vh - var(--header-h));
  opacity: 0.5;
  position: sticky;
  top: var(--header-h);
  z-index: -1;
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  &::before {
    inset: 0;
    position: absolute;
    content: "";
    background: linear-gradient(#fff, transparent 30%);
  }
}

.vision {
  height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  place-content: center;
  gap: 2em;
  margin-top: calc(-100vh + var(--header-h));
  h3 {
    font-size: max(1.8vw, 1.2em);
    font-weight: 500;
    text-align: center;
  }
  p {
    width: min(90%, 500px);
    line-height: 1.8;
    font-weight: 500;
  }
}

.service {
  padding-block: 0 max(8vw, 80px);
  h2 {
    display: grid;
    place-items: center;
    place-content: center;
    text-align: center;
    height: calc(100vh - var(--header-h));
    position: sticky;
    top: var(--header-h);
    @supports not (animation-timeline: scroll()) {
      .en {
        transition: opacity .5s;
      }
      &.show .en {
        transition: opacity 2s 1s;
        opacity: 0.2;
      }
    }
    @supports (animation-timeline: scroll()) {
      .en {
        animation: scroll-light both;
        animation-timeline: view(block);
        animation-range: contain 0% contain 100%;
      }
    }
    + div {
      display: flex;
      flex-direction: column;
      gap: max(5vw, 80px);
      position: relative;
      width: min(100%, 1500px);
      margin-inline: auto;
    }
  }
  .contents {
    align-self: end;
    width: 47%;
    background-color: rgb(255 255 255/0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: max(3vw, 1em);
    border-radius: 1em;
    display: flex;
    flex-direction: column;
    gap: 1.6em;
    box-shadow: 0 20px 40px rgb(0 0 0/0.2);
    ~ .contents {
      align-self: start;
    }
  }

  h3 {
    aspect-ratio: 16/9;
    display: grid;
    place-items: end;
    place-content: end;
    font-size: clamp(1.8em, 2.8vw, 42px);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6em 0.8em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-c), #222);
  }
  .body {
    p {
      line-height: 1.8;
      font-weight: 500;
      ~ p {
        margin-top: 1em;
      }
    }
  }
}

@keyframes scroll-light {
  to {
    opacity: 0.2;
  }
}

@media (width < 768px) {
  .service {

    .contents {
      width: min(100%, 400px);
    }
  }
}