@charset "UTF-8";

/* サービス一覧（jems-demo bpo-services 移植・#service 内専用） */
.service {
  --color-bk: #222222;
  --color-white: #ffffff;
  --color-orange: #f55430;
  --color-red: #f53330;
  --color-bg1: #ebe7e2;
  --color-line: #ccbead99;
  --font-serif: "Noto Serif JP", serif;
  --fs-h4: 27px;
  --fs-body: 17px;
  --lh-body: 1.8;
  --header-h: 100px; /* anchor.css で固定しているヘッダーの高さ */
  --view-h: calc(100vh - var(--header-h));
}

@supports (height: 100svh) {
  .service {
    --view-h: calc(100svh - var(--header-h));
  }
}

.service .container {
  position: relative;
}

/* 装飾の雲が画面外へはみ出してページ全体が横にずれるのを防ぐ。
   overflow: hidden だと左の円の sticky が効かなくなるため clip を使う */
.service {
  overflow-x: clip;
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.service .bpo-services__decor {
  position: absolute;
  inset: 80px 0 auto;
  z-index: 0;
  height: 486px;
  pointer-events: none;
}

.service .bpo-services__cloud {
  position: absolute;
  top: 0;
  width: 540px;
  height: 486px;
  max-width: 50vw;
}

.service .bpo-services__cloud--left {
  left: 50%;
  transform: translateX(calc(-100% - 480px));
}

.service .bpo-services__cloud--right {
  right: 50%;
  transform: translateX(calc(100% + 480px));
}

/* 2カラム：左に円、右にサービス枠 */
.service .bpo-services__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  align-items: start;
  gap: 50px;
  max-width: 1140px;
  margin: 0 auto;
}

/* 左の円：画面に入ったらヘッダーの下（最大 40px 空けた位置）で固定し、右の枠をスクロールし終えたら一緒に流れる。
   以前は画面の上下中央で固定していたが、縦に長い画面ほどタイトルとの間が空きすぎるため上寄せにした。
   --art-h（円の実寸）は service-link.js で設定 */
.service .bpo-services__layout {
  --stage-top: max(0px, min(40px, calc((var(--view-h) - var(--art-h, 600px)) / 2)));
  /* 固定時の上の余白（--stage-top）の分だけ上に詰め、タイトルとの間を他のセクションと同じにする */
  margin-top: calc(var(--stage-top) * -1);
}

.service .bpo-services__stage {
  position: sticky;
  top: var(--header-h);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: calc(var(--art-h, 600px) + var(--stage-top));
  padding-top: var(--stage-top);
  box-sizing: border-box;
}

.service .bpo-services__art {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(600px, calc(var(--view-h) - 60px));
  margin: 0 auto;
}

.service .bpo-services__art-image {
  width: 100%;
  height: auto;
}

.service .bpo-services__art-logo {
  position: absolute;
  top: 37.5%;
  left: 38.75%;
  width: 22.5%;
  height: auto;
}

.service .bpo-services__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  /* 最初の枠の上端を円の上端に揃える。最後の枠の下端はレイアウトの下端＝円の下端で揃う */
  padding-top: var(--stage-top);
  position: relative;
  z-index: 1;
}

.service .bpo-services__card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 0 26px;
  background: var(--color-white);
  border: 1px solid #f2f2f2;
  border-radius: 5px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.16));
  transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, translate 0.35s ease;
}

/* 円の項目に触れているとき：該当枠を強調し、それ以外を控えめに */
.service .bpo-services__list.has-active .bpo-services__card {
  opacity: 0.45;
}

.service .bpo-services__list.has-active .bpo-services__card.is-active {
  opacity: 1;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(245, 84, 48, 0.12);
  translate: -6px 0;
}

.service .bpo-services__num {
  position: absolute;
  top: 12px;
  right: 24px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--color-bg1);
  pointer-events: none;
}

.service .bpo-services__title {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding-bottom: 20px;
  margin: 0 0 0 -24px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0.03em;
}

.service .bpo-services__title span {
  padding: 9px 0;
  background: var(--color-bg1);
}

.service .bpo-services__title span:first-child {
  padding-left: 15px;
}

.service .bpo-services__title span:last-child {
  padding-right: 15px;
}

.service .bpo-services__text {
  flex: 1;
  padding: 0 32px;
  font-size: 15px;
  line-height: var(--lh-body);
  letter-spacing: 0.025em;
  text-align: justify;
  font-feature-settings: "palt" 1;
}

.service .bpo-services__more {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 20px 32px -2px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--fs-body);
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--color-orange);
}

.service .bpo-services__more::before {
  content: "";
  flex: 1;
  height: 1px;
  margin-right: 10px;
  background: url("../img/top/services-link-line.svg") center / 100% 1px no-repeat;
}

.service .bpo-services__more::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: -1px;
  background: url("../img/common/icon/icon-arrow-small.svg") center / contain no-repeat;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

@media (hover: hover) {
  .service .bpo-services__more:hover::after {
    transform: translateX(3px) rotate(45deg);
  }

  .service .bpo-services__more:hover {
    opacity: 0.8;
  }


}

.service .bpo-services__hotspots {
  position: absolute;
  inset: 0;
}

.service .bpo-services__hotspot {
  position: absolute;
  top: var(--cy);
  left: var(--cx);
  translate: -50% -50%;
  width: 23.333%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: scale 0.3s ease;
}

.service .bpo-services__hotspot::after {
  content: "";
  position: absolute;
  inset: 0; /* 絵の円の半径＝ホットスポットの半分（SVG を実測） */
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 選択中は円そのものをオレンジ＋麻の葉模様にし、項目名を白で表示する（円の絵と文字は SVG 内の図形なので上から重ねる） */
.service .bpo-services__hotspot {
  container-type: inline-size;
}

.service .bpo-services__hotspot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='52'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.18' stroke-width='.6'%3E%3Cpath d='M0 0H30M0 26H30M0 0L15 26L30 0M0 52L15 26L30 52M15 8.7L0 0M15 8.7L30 0M15 8.7L15 26M15 43.3L15 26M15 43.3L0 52M15 43.3L30 52M0 17.3V0M0 17.3L15 26M30 17.3V0M30 17.3L15 26M0 34.7V52M0 34.7L15 26M30 34.7V52M30 34.7L15 26'/%3E%3C/g%3E%3C/svg%3E") center / 18px auto,
    var(--color-orange);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service .bpo-services__hotspot-label {
  position: absolute;
  inset: 4%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 11.5cqw;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--color-white);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service .bpo-services__hotspot:hover::before,
.service .bpo-services__hotspot:focus-visible::before,
.service .bpo-services__hotspot.is-active::before,
.service .bpo-services__hotspot:hover .bpo-services__hotspot-label,
.service .bpo-services__hotspot:focus-visible .bpo-services__hotspot-label,
.service .bpo-services__hotspot.is-active .bpo-services__hotspot-label {
  opacity: 1;
}

.service .bpo-services__hotspot-badge {
  position: absolute;
  z-index: 1;
  /* 中心を円周上（右下45°）に置く：50% + 50%×cos45° − 幅の半分 */
  right: 7.14%;
  bottom: 7.14%;
  width: 15%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: inline-size;
  border-radius: 50%;
  background: var(--color-red);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  opacity: 0.55;
  scale: 0.85;
  transition: scale 0.3s ease, opacity 0.3s ease;
}

.service .bpo-services__hotspot-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 50cqw;
  line-height: 1;
  color: var(--color-white);
}

.service .bpo-services__hotspot.is-inactive {
  pointer-events: none;
  cursor: default;
}

.service .bpo-services__hotspot.is-inactive::after {
  display: none;
}

.service .bpo-services__hotspot-badge::before,
.service .bpo-services__hotspot-badge::after {
  content: none;
}

.service .bpo-services__hotspot:hover,
.service .bpo-services__hotspot:focus-visible,
.service .bpo-services__hotspot.is-active {
  scale: 1.05;
}

.service .bpo-services__hotspot:hover::after,
.service .bpo-services__hotspot:focus-visible::after,
.service .bpo-services__hotspot.is-active::after {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 6px rgba(245, 84, 48, 0.12);
}

.service .bpo-services__hotspot:hover .bpo-services__hotspot-badge,
.service .bpo-services__hotspot:focus-visible .bpo-services__hotspot-badge,
.service .bpo-services__hotspot.is-active .bpo-services__hotspot-badge {
  scale: 1.15;
  opacity: 1;
}

.service .bpo-services__hotspot:focus-visible {
  outline: none;
}

@media (max-width: 1199px) and (min-width: 1024px) {
  .service .bpo-services__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    gap: 32px;
  }
}

@media (max-width: 1023px) {
  .service .bpo-services__decor {
    inset: 60px 0 auto;
    height: auto;
  }

  .service .bpo-services__cloud {
    width: min(540px, 55vw);
    height: auto;
  }

  .service .bpo-services__cloud--left {
    left: -10vw;
    transform: none;
  }

  .service .bpo-services__cloud--right {
    right: -10vw;
    transform: none;
  }

  .service .bpo-services__layout {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 0;
  }

  .service .bpo-services__stage {
    position: static;
    height: auto;
    padding-top: 0;
  }

  .service .bpo-services__art {
    max-width: 600px;
  }

  .service .bpo-services__list {
    max-width: 560px;
    margin: 0 auto;
    padding-top: 0;
  }

  .service .bpo-services__list.has-active .bpo-services__card.is-active {
    translate: 0 0;
  }

  .service .bpo-services__num {
    top: 10px;
    right: 18px;
    font-size: 52px;
  }

  .service .bpo-services__title {
    margin-left: -16px;
    font-size: clamp(19px, 5.2vw, 23px);
  }

  .service .bpo-services__text {
    padding: 0 24px;
    font-size: clamp(14px, 3.8vw, 16px);
  }

  .service .bpo-services__more {
    margin: 20px 24px 0;
  }
}
