/* ==========================================================
   NEXUS - subpage.css  下層ページ共通（SERVICE / ABOUT）
   共通部品（ヘッダー・ボタン・.section・.cta・.footer など）は style.css を使い、
   このファイルには下層ページで使う部品（ページ上部・ページ内ナビ・図・工程など）を置く。
   ページ固有の部品は about.css のように別ファイルにする（SERVICE ページは共通部品だけで構成）
   ========================================================== */

/* ---------- ページ上部（見出し + サービス相関図） ---------- */
.page-hero {
  position: relative; padding: 168px 0 80px; overflow-x: clip;
  background: radial-gradient(ellipse 70% 60% at 50% 20%, rgba(12, 26, 90, 1) 0%, rgba(6, 11, 44, .7) 45%, rgba(4, 7, 28, 0) 100%);
}
.page-hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 540px; gap: 56px; align-items: center;
}
.crumb { display: flex; gap: 10px; margin-bottom: 26px; font-family: var(--font-en); font-size: 11px; letter-spacing: .2em; color: #8fa6ff; }
.crumb a:hover { color: var(--cyan); }
.crumb span { color: #5f6f9f; }
.page-hero h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; line-height: 1.4; letter-spacing: .02em; margin-bottom: 20px; }
.page-hero__lead { font-size: 14px; color: var(--muted); margin-bottom: 30px; max-width: 520px; }
.hub { width: 100%; max-width: 540px; margin-inline: auto; }
.hub svg { width: 100%; height: auto; display: block; }

/* ---------- ページ内ナビ（5つのサービスへジャンプ） ---------- */
.svc-nav { position: sticky; top: 84px; z-index: 30; padding: 8px 0; }
.svc-nav__list {
  display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(6, 11, 44, .72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  overflow-x: auto; scrollbar-width: none;
}
.svc-nav__list::-webkit-scrollbar { display: none; }
.svc-nav__list a {
  flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-en); font-size: 12px; letter-spacing: .08em; color: #c9d4ff;
  transition: .3s;
}
.svc-nav__list a span { font-size: 10px; color: var(--cyan); }
.svc-nav__list a:hover { background: rgba(80, 140, 255, .18); color: #fff; }

/* ---------- 各サービス ---------- */
.svc { padding: 96px 0; }
.svc__grid { display: grid; grid-template-columns: 2fr 3fr; gap: 56px; align-items: center; position: relative; }
.svc--flip .svc__grid { grid-template-columns: 3fr 2fr; }   /* 図が左に来るので列幅も左右反転 */
.svc--flip .svc__text { order: 2; }
.svc--wide .svc__grid { grid-template-columns: 1fr 2fr; }   /* 横に長い図（AI）は図の列をさらに広く */
/* 縦積み：説明 → 図 の順に並べ、図を横幅いっぱいに使う（Web Create の工程図など） */
.svc--stack .svc__grid { grid-template-columns: 1fr; gap: 40px; }
.svc--stack .svc__text { max-width: 760px; }   /* 文章は1行が長くなりすぎないよう幅を抑える */
.svc--stack .step { padding: 20px 14px 18px; }
.svc__head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.svc__icon { flex: 0 0 60px; width: 60px; height: 60px; }   /* トップページのカードのアイコンを一回り小さく使う */
.svc__num { font-family: var(--font-en); font-size: 12px; letter-spacing: .2em; color: #8fa6ff; line-height: 1.4; }
.svc__num span { color: var(--cyan); }
.svc h2 { font-size: 28px; font-weight: 700; line-height: 1.45; letter-spacing: .02em; margin-bottom: 16px; }
.svc__lead { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; }
.svc__sub { font-family: var(--font-en); font-size: 10.5px; letter-spacing: .22em; color: var(--cyan); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chips li {
  padding: 6px 13px; border-radius: 999px; font-size: 11.5px; color: #dfe6ff;
  border: 1px solid var(--line); background: rgba(20, 40, 120, .2);
}
.checks li { position: relative; padding-left: 22px; font-size: 13px; color: #d7dfff; line-height: 2; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 10px; height: 6px;
  border-left: 1.5px solid var(--cyan); border-bottom: 1.5px solid var(--cyan); transform: rotate(-45deg);
}

/* ---------- 図の共通スタイル ---------- */
.dg {
  position: relative; padding: 22px 24px 24px;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(160deg, rgba(20, 40, 120, .22), rgba(8, 14, 50, .55));
}
.dg__title { font-family: var(--font-en); font-size: 12px; letter-spacing: .2em; color: #8fa6ff; margin-bottom: 14px; }
.dg__title b { color: var(--cyan); font-weight: 500; }
.dg svg { width: 100%; height: auto; display: block; font-family: var(--font-jp), var(--font-en); }
/* 横に長い図は、スマホでは縮めず横スクロールで見せる（文字が読めなくなるのを防ぐ） */
.dg--scroll { overflow-x: auto; }
.dg--scroll svg { min-width: var(--dg-min, 540px); }   /* 図ごとに --dg-min で最小幅を指定できる */
.dg__note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.dg--square svg { max-width: 560px; margin-inline: auto; }   /* 円形の図が列いっぱいに広がりすぎないように */

/* SVG の中の部品 */
.dg .box { fill: rgba(20, 40, 120, .38); stroke: var(--line-strong); stroke-width: 1; }
.dg .box--ai { fill: rgba(62, 230, 255, .08); stroke: rgba(62, 230, 255, .8); }
.dg .box--accent { stroke: rgba(62, 230, 255, .9); }
.dg .lbl { fill: #eef2ff; font-size: 16px; font-weight: 700; }
.dg .lbl--sm { font-size: 14.5px; }
.dg .sub { fill: #aab4d6; font-size: 13px; }
.dg .tag { fill: #8fa6ff; font-size: 12px; letter-spacing: .14em; font-family: var(--font-en); }
.dg .tag--cyan { fill: var(--cyan); }
.dg .line { fill: none; stroke: #7c9cff; stroke-width: 1.2; opacity: .75; }
.dg .line--soft { opacity: .35; }
.dg .dash { stroke-dasharray: 5 6; animation: dgFlow 1.4s linear infinite; }
.dg .ring { fill: none; stroke: rgba(120, 160, 255, .38); stroke-width: 1; stroke-dasharray: 3 7; }
.dg .ring--spin { animation: dgSpin 70s linear infinite; transform-box: fill-box; transform-origin: center; }
.dg .ring--rev { animation-direction: reverse; animation-duration: 45s; }
.dg .glow { filter: drop-shadow(0 0 6px rgba(62, 230, 255, .55)); }
.dg .node { stroke: rgba(255, 255, 255, .4); stroke-width: 1; }
.dg .dot { fill: var(--cyan); }
.dg .star { fill: #cfe0ff; }
@keyframes dgFlow { to { stroke-dashoffset: -22; } }
@keyframes dgSpin { to { transform: rotate(360deg); } }

/* ---------- 工程ステッパー（HTML 版の図） ---------- */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
.step {
  position: relative; padding: 16px 12px 14px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(20, 40, 120, .22);
}
.step::after {   /* 次の工程へ向かう矢印（最後の工程には付けない） */
  content: '→'; position: absolute; right: -12px; top: 50%; transform: translateY(-50%);
  width: 14px; text-align: center; font-size: 12px; color: #7c9cff; z-index: 1;
}
.step:last-child::after { content: none; }
.step__n { display: block; font-family: var(--font-en); font-size: 11.5px; letter-spacing: .16em; color: var(--cyan); margin-bottom: 6px; }
.step__t { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.step__d { display: block; font-size: 12px; color: var(--muted); line-height: 1.55; }
.step--accent { border-color: rgba(62, 230, 255, .75); box-shadow: 0 0 18px rgba(62, 230, 255, .18); }
.steps__loop {   /* 「改善 → 設計へ戻る」の戻り線 */
  position: relative; margin-top: 14px; padding-top: 12px; text-align: center;
  font-family: var(--font-en); font-size: 12px; letter-spacing: .16em; color: #8fa6ff;
}
.steps__loop::before {
  content: ''; position: absolute; left: 8%; right: 8%; top: 0; height: 12px;
  border: 1px solid rgba(124, 156, 255, .5); border-top: none; border-radius: 0 0 10px 10px;
}
.steps__loop::after {   /* 戻り線の左端に矢じり */
  content: ''; position: absolute; left: calc(8% - 4px); top: -5px;
  border: 4px solid transparent; border-bottom: 6px solid rgba(124, 156, 255, .8);
}

/* DTP の制作物一覧（アイコン付きチップ） */
.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.items li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(20, 40, 120, .18);
  font-size: 13.5px; color: #dfe6ff;
}
.items svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #9fd8ff; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- ご依頼から納品までの流れ ---------- */
.flow { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.flow::before {   /* 番号の丸をつなぐ横線 */
  content: ''; position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 22px; height: 1px;
  background: linear-gradient(90deg, rgba(62, 230, 255, .2), rgba(124, 156, 255, .6), rgba(62, 230, 255, .2));
}
.flow__item { position: relative; text-align: center; padding: 0 6px; }
.flow__dot {
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(135deg, #3ee6ff, #3b82f6); color: #04071c;
  font-family: var(--font-en); font-size: 13px; font-weight: 700; box-shadow: 0 0 18px rgba(62, 230, 255, .45);
}
.flow__t { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.flow__d { display: block; font-size: 13px; color: var(--muted); line-height: 1.7; }
.flow__time { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; font-family: var(--font-en); font-size: 11px; letter-spacing: .1em; color: #9fd8ff; border: 1px solid rgba(62, 230, 255, .35); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .page-hero { padding-top: 130px; }
  .page-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hub { max-width: 560px; }
  .svc-nav { position: static; }
  .svc__grid, .svc--wide .svc__grid, .svc--flip .svc__grid { grid-template-columns: 1fr; gap: 36px; }
  .svc--flip .svc__text { order: 0; }   /* 1列になったら「文章 → 図」の順に戻す */
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps--4 { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3n)::after { content: none; }   /* 行末の矢印は消す */
  .steps--4 .step:nth-child(3n)::after { content: '→'; }
  .steps--4 .step:nth-child(2n)::after { content: none; }
  .steps__loop::before, .steps__loop::after { display: none; }
  .flow { grid-template-columns: repeat(3, 1fr); gap: 28px 16px; }
  .flow::before { display: none; }
}
@media (max-width: 640px) {
  .page-hero { padding: 110px 0 60px; }
  .svc { padding: 70px 0; }
  .svc h2 { font-size: 23px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3n)::after { content: '→'; }
  .step:nth-child(2n)::after { content: none; }
  .items { grid-template-columns: repeat(2, 1fr); }
  /* 図は画面の端近くまで広げ、少しでも大きく表示する */
  .dg { margin-inline: -12px; padding: 18px 12px 20px; }
  /* 横スクロールになる図には、その旨のヒントを出す */
  .dg--scroll::after {
    content: '← 横にスクロールできます →'; display: block; margin-top: 10px;
    font-size: 10.5px; letter-spacing: .08em; color: #8fa6ff; text-align: center;
  }
  /* 流れは縦一列のタイムラインにする */
  .flow { grid-template-columns: 1fr; gap: 0; padding-left: 8px; }
  .flow__item { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; text-align: left; padding: 0 0 26px; }
  .flow__item::before { content: ''; position: absolute; left: 22px; top: 44px; bottom: 0; width: 1px; background: rgba(124, 156, 255, .35); }
  .flow__item:last-child::before { display: none; }
  .flow__dot { grid-row: 1 / span 3; margin: 0; }
  .flow__t { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dg .dash, .dg .ring--spin { animation: none; }
}
