/* ========================================
  Service Page Specific Styles
======================================== */

/* Main Visual オーバーレイテキスト */
.main_visual__image {
  position: relative;
}

.main_visual__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.main_visual__title {
  font-size: clamp(48px, 8vw, 120px); /* indexページと同じサイズ */
  font-weight: 700;
  color: #58E1F3;
  text-align: center;
  letter-spacing: 0.1em;
  margin: 0;
  line-height: 1.2;
  position: relative;
  display: inline-block;
  padding: 20px 40px;
  background: rgba(20, 20, 20, 0.7); /* 文字の後ろに濃いグレー背景 */
  border-radius: 20px;
  backdrop-filter: blur(4px); /* ぼかし効果でさらに見やすく */
}

/* スクランブル中の文字スタイル */
.main-visual-scramble {
  opacity: 0.9;
}






/* ========================================
  Service Content Section Styles
======================================== */

/* ここにサービスコンテンツ用のスタイルを追加 */
.service-hub {
  padding: clamp(60px, 8vw, 140px) 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(15, 15, 15, 0.85);
}

.service-hub__inner {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
  border: none;
  border-radius: 24px;
  background: rgba(8, 8, 8, 0.75);
  backdrop-filter: blur(6px);
  box-shadow: none;
}

.service-hub__title {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #58E1F3;
  font-weight: 700;
}

.service-hub__lead {
  margin: clamp(16px, 3vw, 32px) auto clamp(32px, 4vw, 48px);
  max-width: 720px;
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.8;
  color: #58E1F3;
  text-align: center;
}

.service-hub__canvas {
  margin: 0 auto;
  width: min(100%, 980px);
}

.service-hub__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hub-lines {
  stroke: #58E1F3;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.hub-core {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: none;
}

.hub-core__image {
  width: 100%;
  height: 100%;
}

/* ==== 共通（親は発光だけ／拡大は子だけ） ==== */
.hub-card {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    transition: filter 0.35s ease;   /* ← transformは子でやる */
    cursor: pointer;
  }
  .hub-card:hover,
  .hub-card:focus {
    filter: drop-shadow(0 0 24px rgba(88, 225, 243, 0.65));
    /* transformは付けない */
  }
  
  /* ==== 子（画像）を各カードの“固定位置”で拡大 ==== */
  .hub-card__img {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    transition: transform 0.35s ease, filter 0.35s ease;
  }
  
  /* 固定位置マッピング
     1: 右下角 / 2: 下部中心 / 3: 左下角
     4: 右側面中心 / 5: 左側面中心
     6: 右上角 / 7: 上部中心 / 8: 左上角
  */
  .hub-card--1 .hub-card__img { transform-origin: 100% 100%; }
  .hub-card--2 .hub-card__img { transform-origin:  50% 100%; }
  .hub-card--3 .hub-card__img { transform-origin:   0% 100%; }
  .hub-card--4 .hub-card__img { transform-origin: 100%  50%; } /* 既にOK */
  .hub-card--5 .hub-card__img { transform-origin:   0%  50%; }
  .hub-card--6 .hub-card__img { transform-origin: 100%   0%; }
  .hub-card--7 .hub-card__img { transform-origin:  50%   0%; }
  .hub-card--8 .hub-card__img { transform-origin:   0%   0%; }
  
  /* ホバー時：全カード同一ルール（アンカー基点で拡大） */
  .hub-card:hover .hub-card__img,
  .hub-card:focus .hub-card__img {
    transform: scale(1.04);
  }
  

/* カード4だけは親のtransformを殺す */
.hub-card--4:hover,
.hub-card--4:focus {
  transform: none; /* ← ここが肝 */
}

/* 2) 子要素（画像）側で “右端中心” を厳密指定して拡大 */
.hub-card__img {
  transform-box: fill-box;           /* ← SVGで必須 */
  transform-origin: 50% 50%;
  transition: transform 0.35s ease, filter 0.35s ease;
}

/* カード4は右端中心を軸に */
.hub-card--4 .hub-card__img {
  transform-origin: 100% 50%;        /* 右端の中央を軸 */
}

/* 3) ホバー時は子だけを拡大。translateは封印（ズレの原因） */
.hub-card:hover .hub-card__img,
.hub-card:focus .hub-card__img {
  transform: scale(1.02);
}

.hub-card--4:hover .hub-card__img,
.hub-card--4:focus .hub-card__img {
  transform: scale(1.04);            /* 右端固定でふわっと外へ */
}

/* （任意）親の発光は維持 */
.hub-card--4:hover,
.hub-card--4:focus {
  filter: drop-shadow(0 0 24px rgba(88, 225, 243, 0.65));
}


.service-detail {
  width: min(100%, 900px);
  margin: clamp(48px, 8vw, 96px) auto;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 18px;
  background: rgba(10, 20, 26, 0.78);
  border: 1px solid rgba(88, 225, 243, 0.2);
  box-shadow: 0 14px 28px rgba(6, 12, 18, 0.45);
  color: #0F9403;
  line-height: 1.9;
  transition: color 0.3s ease;
}

.service-detail:hover {
  color: #58E1F3;
}

.service-detail h3 {
  margin: 0 0 clamp(12px, 2vw, 20px);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.05em;
  color: #0F9403;
  display: flex;
  align-items: center;
  gap: 14px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.service-detail:hover h3 {
  color: #58E1F3;
}

.service-detail h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.service-detail h3 a:hover {
  color: #58E1F3;
}

.service-detail h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 148, 3, 0.12);
  border: 1px solid rgba(15, 148, 3, 0.45);
  font-size: clamp(16px, 2.5vw, 20px);
  color: #0F9403;
  transition: all 0.3s ease;
}

.service-detail:hover h3 span {
  background: rgba(88, 225, 243, 0.12);
  border-color: rgba(88, 225, 243, 0.45);
  color: #58E1F3;
}

.service-detail p {
  margin: 0 0 clamp(16px, 2.5vw, 24px);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.8;
  color: #0F9403;
  transition: color 0.3s ease;
}

.service-detail:hover p {
  color: #58E1F3;
}

.service-detail h4 {
  margin: clamp(20px, 3vw, 32px) 0 clamp(12px, 2vw, 18px);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: #0F9403;
  letter-spacing: 0.03em;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.service-detail:hover h4 {
  color: #58E1F3;
}

.service-detail__subsection {
  margin: clamp(24px, 4vw, 40px) 0;
  padding: clamp(20px, 3vw, 32px);
  background: rgba(15, 148, 3, 0.05);
  border-left: 3px solid rgba(15, 148, 3, 0.4);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.service-detail:hover .service-detail__subsection {
  background: rgba(88, 225, 243, 0.05);
  border-left-color: rgba(88, 225, 243, 0.4);
}

.service-detail__subsection h4 {
  margin-top: 0;
  margin-bottom: clamp(12px, 2vw, 18px);
  font-size: clamp(16px, 2.2vw, 20px);
  color: #0F9403;
  transition: color 0.3s ease;
}

.service-detail:hover .service-detail__subsection h4 {
  color: #58E1F3;
}

.service-detail__subsection p {
  margin-bottom: 0;
  color: #0F9403;
  transition: color 0.3s ease;
}

.service-detail:hover .service-detail__subsection p {
  color: #58E1F3;
}

/* KPI Navigator Animation Styles */
.service-kpi-animation {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.service-kpi-animation__phrase-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  text-align: center;
}

.service-kpi-animation__phrase {
  font-family: "Share Tech Mono", "Orbitron", "Noto Sans JP", sans-serif;
  font-size: clamp(33px, 4.5vw, 45px);
  letter-spacing: 0.05em;
  color: #58E1F3;
  line-height: 1.3;
  white-space: pre-wrap;
  display: inline-block;
  min-width: 0;
  padding: 70px 0;
  min-height: clamp(85.8px, 11.7vw, 117px); /* 2行分の高さを確保（最小33px*1.3*2=85.8px、最大45px*1.3*2=117px） */
  box-sizing: border-box;
}

.service-kpi-animation__glyph {
  opacity: 0.9;
}

.service-kpi-animation__caret {
  display: inline-block;
  width: 0.6ch;
  height: 1.2em;
  border-bottom: 2px solid #58E1F3;
  animation: serviceKpiCaretBlink 1.1s steps(1) infinite;
  transform: translateY(0.18em);
}

@keyframes serviceKpiCaretBlink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .service-kpi-animation__caret {
    animation: none !important;
  }
}

.service-detail--coming-soon {
  text-align: center;
}

.service-comingsoon {
  margin-top: clamp(12px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 3vw, 20px);
}

.service-comingsoon__tag {
  font-size: clamp(12px, 1.8vw, 15px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0F9403;
}

.service-comingsoon__headline-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  text-align: center;
}

.service-comingsoon__headline {
  font-family: "Share Tech Mono", "Orbitron", "Noto Sans JP", sans-serif;
  font-size: clamp(26px, 7vw, 60px);
  letter-spacing: 0.12em;
  color: #58E1F3;
  line-height: 1.18;
  white-space: pre-wrap;
  display: inline-block;
  min-width: 0;
}

.service-comingsoon__headline .service-comingsoon__glyph {
  opacity: 0.9;
}

.service-comingsoon__caret {
  display: inline-block;
  width: 0.6ch;
  height: 1.2em;
  border-bottom: 2px solid #58E1F3;
  animation: serviceCaretBlink 1.1s steps(1) infinite;
  transform: translateY(0.18em);
}

@keyframes serviceCaretBlink {
  50% { opacity: 0; }
}

.scs-fade-enter {
  opacity: 0;
  transform: translateY(6px);
}

.scs-fade-enter-active {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .service-comingsoon__headline,
  .service-comingsoon__caret {
    animation: none !important;
    transition: none !important;
  }
}

.service-comingsoon__note {
  max-width: 520px;
  font-size: clamp(14px, 2vw, 18px);
  color: #0F9403;
  line-height: 1.7;
  margin: 0 auto;
}

.service-detail--coming-soon .service-detail__back {
  margin-left: auto;
  margin-right: auto;
}

.service-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(24px, 4vw, 36px);
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid #58E1F3;
  background: rgba(88, 225, 243, 0.12);
  color: #58E1F3;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 28px rgba(88, 225, 243, 0.18);
}

.service-detail__back::after {
  content: "↩";
  font-size: 1.1em;
  transition: transform 0.25s ease;
}

.service-detail__back:hover,
.service-detail__back:focus {
  background: #58E1F3;
  color: #031218;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 36px rgba(88, 225, 243, 0.35);
}

.service-detail__back:hover::after,
.service-detail__back:focus::after {
  transform: translateX(4px);
}

.service-detail__back:focus-visible {
  outline: 2px solid #58E1F3;
  outline-offset: 4px;
}

@keyframes hubFlow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -400;
  }
}

@media (max-width: 640px) {
  .service-hub {
    padding: clamp(40px, 12vw, 80px) 12px;
  }

  .service-hub__inner {
    padding: clamp(20px, 6vw, 36px);
    border-radius: 18px;
  }
}

/* === 553px以下：main_visualの文字を折り返さないように縮小 === */
@media (max-width: 553px){
  .main_visual__title {
    font-size: clamp(28px, 6.5vw, 48px) !important; /* 最小値を28pxに、最大値を48pxに調整（6.5vwでより小さく） */
    padding: 16px 24px !important; /* paddingも少し縮小 */
    letter-spacing: 0.05em !important; /* 文字間隔も少し詰める */
  }
}

/* === 430px以下（iPhone 16 Pro Maxなど）：さらに縮小 === */
@media (max-width: 430px){
  .main_visual__title {
    font-size: clamp(24px, 5.5vw, 36px) !important; /* iPhone 16 Pro Max用にさらに縮小 */
    padding: 12px 20px !important;
  }
}


