/* section8.css */
.section8 {
  position: relative;
  background: var(--color-white);
  border-radius: clamp(80px, 11.2vw, 215px) clamp(80px, 11.2vw, 215px) 0 clamp(80px, 11.2vw, 215px);
  margin-top: clamp(-60px, -3vw, -20px);
  padding-top: clamp(48px, 5vw, 96px);
  padding-bottom: clamp(48px, 5vw, 96px);
  overflow: hidden;
}

.section8__title {
  font-weight: 700;
  font-size: clamp(26px, 3.18vw, 61px);
  line-height: 1.16;
  max-width: 1504px;
  margin-bottom: clamp(40px, 5vw, 90px);
}

.section8__steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2vw, 40px);
  padding: clamp(24px, 3vw, 56px) 0;
}

/* rounded backdrop pill */
.section8__pill {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: min(960px, 62%);
  background: var(--color-white);
  border-radius: clamp(80px, 11.2vw, 215px);
  box-shadow: 0 10px 25px rgba(11, 23, 37, 0.12);
  z-index: 0;
}

/* central dotted spine */
.section8__spine {
  position: absolute;
  left: 50%;
  top: clamp(24px, 3vw, 56px);
  bottom: clamp(24px, 3vw, 56px);
  transform: translateX(-50%);
  border-left: 2px dashed #9aa6b0;
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

/* center connector dot */
.step::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(14px, 1.5vw, 20px);
  height: clamp(14px, 1.5vw, 20px);
  border-radius: 50%;
  background: var(--color-green);
  border: 3px solid var(--color-white);
  z-index: 3;
}

.step__card {
  position: relative;
  background: var(--color-white);
  border-radius: 25px;
  box-shadow: 0 5px 12px rgba(11, 23, 37, 0.15);
  padding: clamp(16px, 1.6vw, 26px) clamp(20px, 3.13vw, 60px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.25vw, 24px);
}

/* green rule extending toward the outer edge */
.step__card::after {
  content: "";
  position: absolute;
  top: clamp(24px, 2.4vw, 40px);
  height: 2px;
  background: var(--color-green-light);
  width: 100vw;
  z-index: -1;
}

.step--right .step__card {
  grid-column: 2;
  margin-left: clamp(24px, 3vw, 56px);
  text-align: left;
}

.step--right .step__card::after {
  left: 0;
  transform: translateX(0);
}

.step--left .step__card {
  grid-column: 1;
  margin-right: clamp(24px, 3vw, 56px);
  text-align: right;
}

.step--left .step__card::after {
  right: 0;
}

.step__title {
  font-weight: 700;
  font-size: clamp(17px, 1.67vw, 32px);
  line-height: 1.3;
  color: var(--color-ink);
}

.step__text {
  font-weight: 500;
  font-size: clamp(13px, 1.15vw, 22px);
  line-height: 1.45;
  color: var(--color-ink);
}

.section8__note {
  font-style: italic;
  font-weight: 500;
  color: #8a8c8e;
  font-size: clamp(14px, 1.15vw, 22px);
  line-height: 1.45;
  max-width: 1298px;
  margin: clamp(32px, 4vw, 72px) auto 0;
  text-align: center;
}

@media (max-width: 640px) {
  .section8 {
    border-radius: 60px 60px 0 60px;
  }

  .section8__pill {
    width: 78%;
    border-radius: 60px;
  }

  .step__card {
    padding: 14px 16px;
  }

  .step--right .step__card {
    margin-left: 14px;
  }

  .step--left .step__card {
    margin-right: 14px;
  }
}
