/* ============================================================
   事例詳細（レイアウト検証版）
   assets/news-b.css の共通部分（ヘッダー・フッター・本文組版）に
   事例ページ固有の見え方だけを足している。
   ============================================================ */

/* ---- 記事の入口 ---- */
.case-head {
  padding: 76px 0 0;
}

.case-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
}

.case-title {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .01em;
}

.case-lead {
  max-width: 820px;
  margin: 28px 0 0;
  font-size: 15.5px;
  line-height: 2.05;
  color: rgba(24, 27, 57, .78);
}

/* アイキャッチは白地に直接載せる。角丸は他の画像ボックスと同じ3pxに揃える */
.case-eyecatch {
  margin: 48px 0 0;
}

.case-eyecatch img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

/* ---- 記事情報 ---- */
.case-meta {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.case-meta div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.9;
}

.case-meta dt {
  color: var(--dim);
  font-size: 12.5px;
  letter-spacing: .08em;
}

.case-meta dd {
  margin: 0;
}

/* ---- 節の見出し（小さなラベル＋罫） ---- */
.case-section {
  padding: 74px 0 0;
}

.case-section-label {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 0 30px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ink);
}

.case-section-label::after {
  flex: 1;
  height: 1px;
  content: "";
  background: var(--line);
}

/* 節の要点。本文より先に結論を1行で置く */
.case-key {
  margin: 0 0 30px;
  color: var(--blue);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.85;
}

/* ---- 引用 ---- */
.case-quote {
  margin: 34px 0;
  padding: 26px 30px;
  border-left: 3px solid var(--blue);
  background: var(--paper);
}

.case-quote p {
  margin: 0;
  font-size: 15.5px;
  line-height: 2;
  color: rgba(24, 27, 57, .86);
}

.case-quote cite {
  display: block;
  margin-top: 14px;
  font-size: 12.5px;
  font-style: normal;
  letter-spacing: .04em;
  color: var(--dim);
}

/* ---- 写真 ---- */
.case-figure {
  margin: 44px 0;
}

.case-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.case-figure figcaption {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--dim);
}

/* ---- 記事末尾の情報 ---- */
.case-profile {
  margin: 74px 0 0;
  padding: 34px 36px;
  border: 1px solid var(--line);
}

.case-profile h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.case-profile .case-meta {
  border-top: 0;
}

.case-profile .case-meta div:last-child {
  border-bottom: 0;
}

.case-note {
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 1.95;
  color: var(--dim);
}

/* ---- 関連するサービス ---- */
.case-services {
  margin: 44px 0 0;
}

.case-services h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.case-services a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 600;
  transition: background .3s;
}

.case-services a:first-of-type {
  border-top: 1px solid var(--line-soft);
}

.case-services a:hover {
  background: rgba(24, 27, 57, .035);
}

.case-services span {
  font-size: 18px;
  transition: transform .3s;
}

.case-services a:hover span {
  transform: translateX(6px);
}

@media (max-width: 700px) {
  .case-head { padding-top: 44px; }
  .case-eyecatch { margin-top: 40px; }
  .case-section { padding-top: 54px; }
  .case-key { font-size: 15.5px; }
  .case-quote { padding: 20px 20px; }
  .case-quote p { font-size: 14.5px; }
  .case-meta div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .case-profile { padding: 26px 22px; }
  .case-figure { margin: 32px 0; }
}

/* ============================================================
   事例ページ共通の部品
   /works/smaregi と preview/initium-case が同じ見え方になるよう、
   ここに置く。ページ個別CSSへ複製しない。
   ============================================================ */

/* 節見出しは見出しレベルを飛ばさないため <h2 class="case-section-label"> で書く。
   news-b.css の .article-body h2（明朝24px・左に3pxの罫）の方が詳細度が高いので、
   その装飾をここで打ち消す。line-height まで書くのは、.article-body h2 の 1.5 が
   効いて .article-body の 2.05 を継承する場合と行間が変わるため。 */
.article-body h2.case-section-label {
  margin: 0 0 30px;
  padding-left: 0;
  border-left: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 2.05;
}

/* ---- 支援概要（タイトル直下）＋ 記事内の目次 ---- */
.case-overview {
  margin: 42px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.case-overview-grid > div {
  min-width: 0;
  padding: 22px 26px;
  border-right: 1px solid var(--line-soft);
}

.case-overview-grid > div:first-child { padding-left: 2px; }
.case-overview-grid > div:last-child { border-right: 0; }

/* dt・ddの級数は記事末尾の .case-meta（プロジェクト情報）と同じ */
.case-overview-grid dt {
  margin-bottom: 7px;
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
}

.case-overview-grid dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

/* 横並びの目次。現在地ナビ（.case-sec-rail）が入らない幅でだけ出す */
.case-toc {
  display: none;
  align-items: center;
  gap: 28px;
  padding: 17px 2px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  white-space: nowrap;
}

.case-toc > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}

.case-toc a { color: var(--dim); }
.case-toc a:hover { color: var(--blue); }

/* ---- 画面右端の現在地ナビ ---- */
.case-sec-rail {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-50%);
}

.case-sec-rail-item {
  position: relative;
  display: flex;
  min-height: 18px;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.case-sec-rail-label {
  position: absolute;
  top: 50%;
  right: 50px;
  padding: 7px 11px;
  border: 1px solid rgba(24, 27, 57, .12);
  border-radius: 3px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 22px rgba(24, 27, 57, .1);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: .25s;
  white-space: nowrap;
}

.case-sec-rail-no {
  color: var(--dim);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(6px);
  transition: .3s;
}

.case-sec-rail-bar {
  width: 16px;
  height: 2px;
  border-radius: 3px;
  background: rgba(82, 104, 159, .4);
  transition: .3s;
}

.case-sec-rail-item:hover .case-sec-rail-label,
.case-sec-rail-item:focus-visible .case-sec-rail-label { opacity: 1; transform: translate(0, -50%); }

.case-sec-rail-item:hover .case-sec-rail-no,
.case-sec-rail-item:focus-visible .case-sec-rail-no,
.case-sec-rail-item.is-active .case-sec-rail-no { opacity: 1; transform: none; }

.case-sec-rail-item.is-active .case-sec-rail-bar { width: 30px; background: var(--ink); }

/* 支援概要の下けい線が区切りになるので、最初の節の上の余白（article-bodyの46px）は外す。
   足したままだと、概要と「01」の間が120px空く。 */
.case-overview ~ .article-body { padding-top: 0; }

/* 目次から飛んだときに、固定ヘッダーの下へ潜らせない */
.case-section { scroll-margin-top: 96px; }

/* 現在地ナビの札（右端から50px）が本文に重なる幅では、横並びの目次に切り替える */
@media (max-width: 1259px) {
  .case-sec-rail { display: none; }
  .case-toc { display: flex; }
}

@media (max-width: 700px) {
  .case-overview { margin-top: 32px; }
  .case-overview-grid { grid-template-columns: 1fr; }
  .case-overview-grid > div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 2px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .case-overview-grid > div:last-child { border-bottom: 0; }
  .case-toc {
    gap: 22px;
    margin-right: -18px;
    padding-right: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }
}
