.works-section {
  position: relative;
  background: linear-gradient(to right, #64a1d4, #95cbf4, #64a1d4);
  padding: 3rem 3rem 6rem;
  margin-top: -3rem;
  z-index: 2;
}

.works-section::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 100vw;
  height: 8vw;
  background: linear-gradient(to right, #64a1d4, #95cbf4, #64a1d4);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
  transform: translateY(-100%);
}

/*
.works-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 4vw;
  background: linear-gradient(to right, #64a1d4, #95cbf4, #64a1d4);
  clip-path: polygon(0 0, 0 100%, 100% 0);
  transform: translateY(100%);
}
*/

.works-section__inner {
  position: relative;
  z-index: 2;
}

.works-section__inner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30vw;
  height: 72.5vw;
  transform: translateY(-50%);
  background: url("../img/bg3.png") no-repeat 100% 100%;
  background-size: 100% 100%;
}

.works-section__header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  margin-bottom: 5rem;
}

.works-section__title {
  font-family: "Poiret One", sans-serif;
  font-size: 145px;
  font-weight: 300;
  color: rgb(255 255 255 / 70%);
  letter-spacing: 0.1em;
  white-space: nowrap;
  margin: 0;
  text-align: left;
  opacity: 0.8;
}

.works-section__subtitle {
  font-family: "M PLUS 1p", sans-serif;
  font-size: 27px;
  font-weight: 100;
  color: #fff;
  white-space: nowrap;
  margin: 0 0 0 1rem;
  text-align: left;
}

.works-section__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin: 0 auto;
}

.works-section__card {
  background-color: rgb(255 255 255 / 80%);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgb(0 0 0 / 10%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 calc((100% - 2 * 3rem) / 3);
  min-width: 16rem;
}

.works-section__media {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1rem 1rem 0;
  background: #fff;
}

.works-section__media-desktop {
  display: block;
  width: 70%;
  height: auto;
  object-fit: cover;
}

.works-section__media-mobile {
  display: block;
  width: 30%;
  height: auto;
  object-fit: cover;
  border: 0.125rem solid #fff;
  border-radius: 0.25rem;
  box-shadow: 0 0.125rem 0.25rem rgb(0 0 0 / 10%);
}

.works-section__badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.375rem 0;
  background: url("../img/arrow_label.png") no-repeat left center;
  background-size: contain;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.125rem;
  font-weight: 100;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  width: 113px;
}

.works-section__card-info {
  padding: 1rem 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.works-section__card-title {
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.25rem;
  font-weight: 100;
  color: #0a2560;
  margin: 0 0 0.5rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.works-section__card-url {
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.125rem;
  color: #5599b5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.works-section__caption-button {
  display: block;
  width: fit-content;
  margin: 4rem auto 0;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-decoration: none;
  background: #d6ff14;
  color: #07297f;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  padding: 1.125rem 4.375rem;
  border-radius: 2.5rem;
  transition: background 0.2s;
}

.works-section__caption-button .works-section__button-icon {
  width: 0.5rem;
  height: auto;
  display: inline-block;
}

.works-section__caption-button:hover {
  background: #a4cc00;
}

@media (width > 430) and(width <= 950px) {
  .works-section {
    padding: 2rem;
    padding-top: 10rem;
    margin-top: -14.7rem;
  }

  .works-section__grid {
    gap: 2rem;
  }

  .works-section__card {
    flex: 1 1 calc((100% - 1 * 2rem) / 2);
  }

  .works-section__badge {
    font-size: 0.9rem;
  }

  .works-section__card-title {
    font-size: 1.125rem;
  }

  .works-section__caption-button {
    font-size: 0.9rem;
    padding: 1rem 4rem;
  }
}

@media (width <= 950px) {
  .works-section__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (width > 430) and(width <= 600px) {
  .works-section__subtitle {
    white-space: wrap;
    margin: 0.25rem 0 0;
    position: relative;
    left: 0.5rem;
  }

  .works-section {
    padding: 1.5rem;
    padding-top: 12rem;
  }

  .works-section__grid {
    gap: 1.5rem;
  }

  .works-section__card {
    flex: 1 1 100%;
  }

  .works-section__caption-button {
    padding: 1rem 3rem;
  }
}

@media (max-width: 430px) {
  .works-section {
    position: relative;
    background: linear-gradient(to right, #64a1d4, #95cbf4, #64a1d4);
    padding: 2rem 3vw 6rem;
    z-index: 2;
  }

  .works-section__title {
    font-size: 55px;
  }

  .works-section__subtitle {
    font-size: 20px;
  }

  .works-section__header {
    margin-bottom: 1rem;
    flex-direction: column;
  }

  .works-section__grid {
    gap: 1rem;
  }

  .works-section__caption-button {
    white-space: nowrap;
    display: flex;
    padding: 1.125rem 15%;
    margin-top: 1.5rem;
  }
}
