.page-services {
  background: var(--color-bg-soft);
}

.services-detail-main {
  width: min(100%, 393px);
  margin: 0 auto;
  padding: 62px 24px 100px;
  box-sizing: border-box;
}

.services-detail-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 46px;
  text-align: center;
}

.services-detail-title .section-title {
  font-size: 44px;
  color: var(--color-text-main);
}

.services-detail-title .section-heading-line {
  width: 230px;
  max-width: 100%;
  margin-top: 6px;
}

.services-detail-title .section-subtitle {
  margin-top: 1px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.48px;
  white-space: nowrap;
}

.services-side-title {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 345px;
  min-height: 45px;
  margin: 0 auto 46px;
  padding-left: 22px;
  box-sizing: border-box;
}

.services-side-title-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 45px;
  background: var(--color-accent);
}

.services-side-title h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 400;
  line-height: 24px;
  color: var(--color-text-main);
  text-shadow: 0 2px 4px rgba(123, 138, 138, 0.6);
}

/* process new cards — Figma 1921:172 */
.process-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 345px;
  display: flex;
  flex-direction: column;
  gap: 62px;
}

.process-card {
  position: relative;
  width: 100%;
  height: 150px;
  background: var(--color-input);
  border: 1px solid var(--color-bg-hero-top);
  border-radius: 0 30px 0 30px;
  box-shadow: 0 4px 12px rgba(123, 138, 138, 0.4);
  box-sizing: border-box;
  overflow: visible;
}

.process-card-heading {
  position: absolute;
  top: -1px;
  left: -1px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  width: 200px;
  height: 30px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: var(--color-bg-footer);
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.32px;
  text-align: center;
  white-space: nowrap;
}

.process-card-index {
  font-variant-numeric: tabular-nums;
}

.process-card-body {
  display: grid;
  grid-template-columns: 90px minmax(0, 206px);
  column-gap: 19px;
  align-items: start;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 41px 17px 19px;
  border: 0;
  box-sizing: border-box;
}

.process-card-icon {
  display: block;
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.process-card-body p {
  margin: 0;
  font-family: var(--font-zen);
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: 0.48px;
  color: var(--color-text-main);
}

/* mobile: equal-gap down arrows between cards (Figma 1924:236–240) */
.process-card:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 40px;
  height: 20px;
  margin-top: 21px;
  transform: translateX(-50%);
  transform-origin: center center;
  background: url("./assets/images/process-flow-arrow-down.svg") center / contain no-repeat;
  pointer-events: none;
  z-index: 2;
}

/* tools: after process (Figma — 制作環境 + tools + languages) */
.tools-line {
  width: 100%;
  max-width: 360px;
  margin: 22px auto 0;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.48px;
  color: var(--color-text-main);
}

.tools-line p {
  margin: 0;
}

.tools-line-label {
  font-size: 16px;
  line-height: 35px;
}

.tools-line-en {
  font-family: var(--font-heading);
  font-size: 16px;
  line-height: 30px;
}

.tools-line-lang {
  font-size: 16px;
  line-height: 30px;
  white-space: nowrap;
}

/* pricing after tools — Figma gap ~85px after taller tools block */
.tools-line + .services-detail-block--pricing {
  margin-top: 85px;
}

.services-detail-block--pricing > .services-side-title {
  margin-bottom: 55px;
}

.pricing-estimate {
  width: 100%;
  max-width: 345px;
  height: 140px;
  margin: 0 auto;
  padding: 20px 22px 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: rgba(169, 202, 248, 0.6);
  font-family: var(--font-body);
  color: var(--color-text-main);
}

.pricing-estimate-lead {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0.48px;
}

.pricing-estimate-sub {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 35px;
  letter-spacing: 0.48px;
}

.pricing-copy {
  width: 100%;
  max-width: 313px;
  margin: 36px auto 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0.48px;
  color: var(--color-text-main);
}

.pricing-right {
  width: 100%;
}

.pricing-copy p {
  margin: 0 0 30px;
}

.pricing-copy p:last-child {
  margin-bottom: 0;
}

.pricing-label {
  font-weight: 500;
}

.pricing-note {
  width: 100%;
  max-width: 313px;
  margin: 36px auto 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 35px;
  letter-spacing: 0.48px;
  color: var(--color-text-main);
}

.services-detail-cta {
  display: flex;
  justify-content: center;
  margin-top: 100px;
}

.services-detail-cta .services-contact-cta {
  width: 300px;
  height: 80px;
}

.services-detail-cta .services-contact-cta .cta-pill-label {
  font-family: var(--font-zen);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

@media (min-width: 901px) {
  .services-detail-main {
    width: min(100% - 120px, 1280px);
    max-width: 1280px;
    padding: 112px 60px 120px;
  }

  .services-detail-title {
    margin-bottom: 80px;
  }

  .services-detail-title .section-title {
    font-size: 72px;
  }

  .services-detail-title .section-heading-line {
    width: 400px;
    margin-top: 14px;
  }

  .services-detail-title .section-subtitle {
    margin-top: 6px;
    font-size: 24px;
    letter-spacing: 0.72px;
  }

  .services-side-title {
    max-width: none;
    margin: 0 0 81px;
  }

  .services-side-title h2 {
    font-size: 36px;
  }

  .process-list {
    max-width: 1159px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 345px);
    justify-content: center;
    column-gap: 47px;
    row-gap: 62px;
    position: relative;
    margin: 0 auto;
    overflow: visible;
  }

  .process-card {
    width: 345px;
    overflow: visible;
  }

  /* row 2 (cards 4–6 + arrows) shifted ~30px right — Figma left 29/420/814 vs 0/392/785 */
  .process-card:nth-child(n + 4) {
    transform: translateX(29px);
  }

  .process-card-body {
    grid-template-columns: 90px minmax(0, 206px);
  }

  /* desktop: horizontal arrows in gutters (1→2, 2→3, 3 wrap, 4→5, 5→6) */
  .process-card:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: auto;
    right: -33.5px;
    width: 20px;
    height: 40px;
    margin-top: 0;
    transform: translateY(-50%);
    transform-origin: center center;
    background: url("./assets/images/process-flow-arrow.svg") center / contain no-repeat;
    pointer-events: none;
    z-index: 2;
  }

  .process-card:nth-child(6)::after {
    display: none;
  }

  .tools-line {
    max-width: none;
    width: auto;
    margin: 44px 0 0;
    letter-spacing: 0.6px;
  }

  .tools-line-label {
    font-size: 20px;
    line-height: 35px;
  }

  .tools-line-en {
    font-size: 20px;
    line-height: 30px;
  }

  .tools-line-lang {
    font-size: 16px;
    line-height: 30px;
  }

  .tools-line + .services-detail-block--pricing {
    margin-top: 85px;
  }

  .services-detail-block--pricing {
    display: grid;
    grid-template-columns: 430px 1fr;
    grid-template-areas:
      "title title"
      "estimate prices";
    column-gap: 49px;
    row-gap: 0;
    align-items: start;
  }

  .services-detail-block--pricing > .services-side-title {
    grid-area: title;
    margin-bottom: 63px;
  }

  .pricing-estimate {
    grid-area: estimate;
    max-width: 430px;
    width: 430px;
    height: 302px;
    margin: 0;
    padding: 35px 39px 40px;
    text-shadow: 0 2px 4px rgba(123, 138, 138, 0.6);
  }

  .pricing-estimate-lead {
    font-size: 36px;
    font-weight: 350;
    line-height: 48px;
    letter-spacing: 1.08px;
  }

  .pricing-estimate-sub {
    font-size: 20px;
    font-weight: 350;
    line-height: 60px;
    letter-spacing: 1.08px;
  }

  .pricing-right {
    grid-area: prices;
    max-width: 680px;
    margin: 0;
  }

  .pricing-copy {
    max-width: 680px;
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.6px;
  }

  .pricing-note {
    max-width: 680px;
    margin: 30px 0 0;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0.6px;
  }

  .services-detail-cta {
    margin-top: 120px;
  }
}
