.as-service2 {
  position: relative;
  overflow: hidden;
  padding: 40px 0 50px;
  background: #fff;
  color: #0b1220;
  font-family:
    "Noto Sans JP",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

.as-service2__inner {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.as-service2__rail {
  position: absolute;
  left: 200px;
  top: -10px;
  width: 150px;
  height: calc(100% + 120px);
  background: rgba(11, 18, 32, 0.04);
  overflow: hidden;
  z-index: 0;
}

.as-service2__railFill {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.05);
  transform: scaleY(0);
  transform-origin: top;
}

.as-service2__railWord {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  font-family: "Noto Serif JP", Georgia, serif;
  font-size: 102px;
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
  color: rgba(11, 18, 32, 0.08);
  user-select: none;
  pointer-events: none;
  transform: translateY(-91px);
}

.as-service2__head {
  position: relative;
  z-index: 3;
  margin: 0 0 80px;
  padding-left: 20px;
}

.as-service2__title {
  margin: 0 0 14px;
  font-size: 102px;
  line-height: 1;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-family: "Noto Serif JP", Georgia, serif;
}

.as-service2__title span {
  color: #d80074;
}

.as-service2__grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  grid-template-rows: auto auto;
  gap: 60px 68px;
  align-items: start;
  margin-left: 220px;
  margin-top: 65px;
  position: relative;
  z-index: 2;
}

.as2-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-22px);
}

.as2-card__img {
  position: relative;
  overflow: hidden;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100%;
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
}

.as2-card__img::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.as2-card:hover .as2-card__img::before {
  transform: scale(1.06);
}

.as2-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 34px 30px 18px;
  background: #fff;
}

.as2-card__meta {
  margin: 0;
}

.as2-card__tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: #e5007e;
  font-weight: 700;
}

.as2-card__title {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-weight: 800;
  color: #0b1220;
}

.as2-card__more {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: fit-content;
  margin-left: auto;
  color: #e5007e;
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.as2-card__more::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: #e5007e;
  opacity: 0.85;
}

.as2-card__moreText {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.as2-card__arrow {
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  transform: translateY(-1px);
  display: inline-block;
  transition: transform 0.3s ease;
}

.as2-card:hover .as2-card__arrow {
  transform: translate(6px, -1px);
}

.as2-card--big {
  grid-column: 1 / 2;
  grid-row: 1 / span 2;
  min-height: 355px;
  width: 580px;
  margin-top: 120px;
}

.as2-card--big .as2-card__body {
  justify-content: flex-start;
  padding: 72px 40px 42px 14px;
}

.as2-card--big .as2-card__title {
  font-size: 34px;
}

.as2-card--big .as2-card__more {
  margin-top: 112px;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.as2-card--big .as2-card__more i {
  width: 20px;
  flex-basis: 20px;
}

.as2-card--big .as2-card__moreText {
  font-size: 16px;
  letter-spacing: 0.14em;
}

.as2-card--big .as2-card__arrow {
  font-size: 26px;
}

.as2-card--sm {
  grid-column: 2 / 3;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 280px;
  width: 450px;
  justify-self: start;
}

.as-service2__grid > .as2-card--sm:first-of-type {
  margin-top: -28px;
}

.as-service2__grid > .as2-card--sm:last-of-type {
  margin-top: -6px;
}

.as2-card--sm .as2-card__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 48px 26px 24px 10px;
}

.as2-card--sm .as2-card__title {
  font-size: 24px;
  line-height: 1.35;
}

.as2-card--sm .as2-card__more {
  margin-top: 80px;
  font-size: 12px;
}

.as-service2.is-in .as-service2__title {
  animation: titleUp 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 120ms;
}

@keyframes titleUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.as2-card {
  transform: translateY(24px);
}

.as-service2.is-in .as2-card {
  animation: cardFlow 620ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.as-service2.is-in .as2-card:nth-of-type(1) {
  animation-delay: 300ms;
}

.as-service2.is-in .as2-card:nth-of-type(2) {
  animation-delay: 420ms;
}

.as-service2.is-in .as2-card:nth-of-type(3) {
  animation-delay: 540ms;
}

@keyframes cardFlow {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.as-service2__head,
.as-service2__grid {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.as-service2.is-in .as-service2__head,
.as-service2.is-in .as-service2__grid {
  opacity: 1;
  transform: translateY(0);
}

.as-service2__grid {
  transition-delay: 0.2s;
}

.as-service2__arrows {
  display: none;
}

@media (max-width: 767px) {
  .as-service2 {
    padding: 0 0 40px;
    background: #fff;
  }

  .as-service2__inner {
    width: calc(100% - 28px);
    margin: 40px auto 0;
  }

  .as-service2__rail {
    left: 14px;
    top: 0;
    width: 62px;
    height: 370px;
    background: rgba(11, 18, 32, 0.05);
  }

  .as-service2__railFill {
    background: rgba(11, 18, 32, 0.04);
    transform: none;
  }

  .as-service2__railWord {
    inset: auto;
    top: 39px;
    left: 0;
    width: 100%;
    height: auto;
    display: block;
    text-align: center;
    font-size: 44px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: rgba(11, 18, 32, 0.1);
    transform: none;
  }

  .as-service2__head {
    margin: 0 0 18px;
    padding-left: 18px;
  }

  .as-service2__title {
    margin: 0;
    font-size: 44px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.12em;
  }

  .as-service2__grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-left: 88px;
    margin-top: 0;
  }

  .as2-card,
  .as2-card--big,
  .as2-card--sm {
    width: 100%;
    min-height: auto;
    margin-top: 0 !important;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 48% 52%;
    box-shadow: 0 4px 14px rgba(11, 18, 32, 0.08);
  }

  .as2-card__img {
    min-height: 168px;
    clip-path: polygon(0 0, 100% 0, 76% 100%, 0 100%);
  }

  .as2-card__body,
  .as2-card--big .as2-card__body,
  .as2-card--sm .as2-card__body {
    padding: 24px 16px 16px 6px;
    justify-content: flex-start;
  }

  .as2-card__tag {
    font-size: 10px;
    line-height: 1.2;
  }

  .as2-card__title,
  .as2-card--big .as2-card__title,
  .as2-card--sm .as2-card__title {
    margin-top: 6px;
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: 0;
  }

  .as2-card__more,
  .as2-card--big .as2-card__more,
  .as2-card--sm .as2-card__more {
    margin-top: 46px;
    margin-left: 0;
    gap: 8px;
    padding-bottom: 4px;
  }

  .as2-card__moreText,
  .as2-card--big .as2-card__moreText,
  .as2-card--sm .as2-card__moreText {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .as2-card__arrow,
  .as2-card--big .as2-card__arrow,
  .as2-card--sm .as2-card__arrow {
    font-size: 16px;
  }

  .as2-card__body {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .as2-card__more {
    align-self: flex-end;
    margin-top: auto;
    margin-bottom: 4px;
  }

  .as-service2__arrows {
    position: absolute;
    left: 11%;
    bottom: 40px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    z-index: 10;
  }

  .as-service2__arrows span {
    display: block;
    width: 18px;
    height: 18px;
    border-right: 2px solid;
    border-bottom: 2px solid;
    opacity: 0.18;
    transform: rotate(45deg);
    transition: opacity 0.3s;
  }

  .as-service2__arrows span:nth-child(1) {
    border-color: #e5007e;
    opacity: 0.55;
    animation: arrowGlow 1.8s infinite ease-in-out;
  }

  .as-service2__arrows span:nth-child(2) {
    border-color: #d96b4a;
    opacity: 0.7;
    animation: arrowGlow 1.8s infinite ease-in-out;
    animation-delay: 0.25s;
  }

  .as-service2__arrows span:nth-child(3) {
    border-color: #f6ab00;
    opacity: 1;
    animation: arrowGlow 1.8s infinite ease-in-out;
    animation-delay: 0.5s;
  }
}
