/*
  Case Study(下層ページ)用CSS。
  トップページ(front-page.css)のデザイントークン・タイポグラフィ・余白設計・
  ブレークポイント(900px / 600px)をそのまま踏襲している。
  front-page.css とは独立して読み込むため、共通トークンは同じ値で再宣言している。
  全セレクタを .tp-case 配下に限定し、SERUM本体および既存CSSには影響しない。
*/
.tp-case{--tp-bg:#f7f6f2;--tp-white:#fff;--tp-ink:#242424;--tp-muted:#77736c;--tp-line:#ddd9d1;--tp-dark:#252421;--tp-accent:#eadca6;margin:0;background:var(--tp-bg);color:var(--tp-ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;line-height:1.8}
.tp-case,.tp-case *{box-sizing:border-box}
.tp-case a{color:inherit;text-decoration:none}

/* HERO ─ 本文側と馴染む明るい無地。方眼・円などの装飾は使わない。文字色は本文と同じトークンを使用 */
.tp-case .hero{background-color:var(--tp-white);color:var(--tp-ink);padding:9vw 7.5vw 7vw;position:relative;overflow:hidden}
.tp-case .hero-inner{position:relative;z-index:2;max-width:1000px}
.tp-case .hero .eyebrow{font-size:10px;letter-spacing:.2em;color:var(--tp-muted);margin-bottom:20px}
.tp-case h1{font-size:clamp(36px,5.6vw,78px);line-height:1.1;letter-spacing:-.04em;font-weight:500;margin:0 0 28px}
.tp-case .hero-lead{font-size:clamp(16px,1.7vw,20px);line-height:1.95;color:var(--tp-muted);max-width:760px}
.tp-case .hero-tags{display:flex;flex-wrap:wrap;gap:20px;margin-top:38px;font-size:9px;letter-spacing:.13em;color:var(--tp-muted)}

/* SECTION ─ トップページと同じ余白・境界線 */
.tp-case .section{padding:110px 7.5vw;border-top:1px solid var(--tp-line)}
.tp-case .head{margin-bottom:55px}
.tp-case .secno{font-size:10px;letter-spacing:.2em;color:var(--tp-muted)}
.tp-case h2{font-size:clamp(26px,3.4vw,42px);line-height:1.6;letter-spacing:0;font-weight:500;margin:14px 0 0;max-width:1000px}

/* 本文 */
.tp-case .prose{max-width:880px}
.tp-case .prose p{font-size:15px;line-height:2.1;color:var(--tp-muted);margin:0 0 28px}
.tp-case .prose p:last-child{margin-bottom:0}
.tp-case .prose strong{color:var(--tp-ink);font-weight:500}
.tp-case .prose + .facts,.tp-case .prose + .story-list,.tp-case .prose + .figure,.tp-case .prose + .figure-row{margin-top:55px}

/* 定義リスト ─ トップページ PROFILE の .facts / .fact と同じ構造 */
.tp-case .facts{border-top:1px solid var(--tp-line);max-width:1000px}
.tp-case .fact{display:grid;grid-template-columns:150px 1fr;gap:30px;border-bottom:1px solid var(--tp-line);padding:20px 0}
.tp-case .fact dt{font-size:9px;letter-spacing:.12em;color:var(--tp-muted);line-height:2.6}
.tp-case .fact dd{margin:0;font-size:15px;line-height:1.9;color:var(--tp-muted)}

/* 構造リスト ─ トップページ HOW I BUILT IT の .story と同じ構造 */
.tp-case .story-list{border-top:1px solid var(--tp-line)}
.tp-case .story{display:grid;grid-template-columns:1fr 1.4fr;gap:60px;padding:64px 0;border-bottom:1px solid var(--tp-line)}
.tp-case .story:last-child{border-bottom:0}
.tp-case .story-title{font-size:21px;line-height:1.6;font-weight:500;margin:0}
.tp-case .story-num{color:var(--tp-muted)}
.tp-case .story-body p{font-size:15px;line-height:2.1;color:var(--tp-muted);margin:0 0 24px}
.tp-case .story-body p:last-child{margin-bottom:0}

/* 図版 ─ セクション幅いっぱいに配置。キャプションのみ本文幅に制限 */
.tp-case .figure{margin:0 0 56px}
.tp-case .figure:last-child{margin-bottom:0}
.tp-case .figure-media{aspect-ratio:16/9;background:#ddd8cd;border:1px solid var(--tp-line);display:grid;place-items:center;overflow:hidden}
.tp-case .figure-media.dark{background:var(--tp-dark)}
.tp-case .figure-media.accent{background:var(--tp-accent)}
.tp-case .figure-media.square{aspect-ratio:4/3}
.tp-case .figure-media img{display:block;width:100%;height:100%;object-fit:cover}
.tp-case .figure-label{font-size:8px;letter-spacing:.18em;color:var(--tp-muted)}
.tp-case .figure-media.dark .figure-label{color:#aaa79f}
.tp-case .figure figcaption{margin-top:14px;max-width:880px;font-size:12px;line-height:1.9;color:var(--tp-muted)}
.tp-case .figure-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:56px}
.tp-case .figure-row .figure{margin-bottom:0}

/* ============================================================
   図解コンポーネント(構造・関係性の可視化用)
   /Users/takayo/Local Sites/takayo-naitho-dev/app/public/preview.html
  (HANZO UI/UX Renewal — Diagram Reference v2)を構造・情報量の基準とする。
   色は既存トークン(--tp-dark / --tp-bg / --tp-white / --tp-line / --tp-muted / --tp-accent)のみを使用。
   罫線・余白・タイポグラフィで構成し、新しいアクセントカラーは追加していない。
   ============================================================ */

/* 図解の見出し直下に置く短い説明文 */
.tp-case .head .diagram-desc{margin:16px 0 0;font-size:13px;line-height:1.9;color:var(--tp-muted);max-width:820px}

/* 共通パーツ: 1本の帯(diagram-step) / 矢印(diagram-down, diagram-arrow) / 横並び(diagram-row) */
.tp-case .diagram-step{border:1px solid var(--tp-line);background:var(--tp-bg);padding:16px 14px;font-size:12px;line-height:1.7;text-align:center;color:var(--tp-ink)}
.tp-case .diagram-step.accent{background:var(--tp-accent);border-color:var(--tp-accent)}
.tp-case .diagram-step-label{display:block;font-size:13px;font-weight:500}
.tp-case .diagram-step-value{display:block;font-size:10px;margin-top:6px;color:var(--tp-muted)}
.tp-case .diagram-down{text-align:center;color:var(--tp-muted);font-size:13px;line-height:24px;height:24px}
.tp-case .diagram-row{display:flex;align-items:stretch;gap:0;margin:34px 0 12px}
.tp-case .diagram-row .diagram-step{flex:1;display:flex;flex-direction:column;justify-content:center}
.tp-case .diagram-arrow{display:flex;align-items:center;justify-content:center;width:34px;flex-shrink:0;color:var(--tp-muted);font-size:18px}
.tp-case .diagram-note{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.tp-case .diagram-note p{font-size:11px;color:var(--tp-muted);line-height:1.8;margin:0;text-align:center}

/* PROBLEM: 4条件が中央へ収束する図(左)+ KEY INSIGHT(右) */
.tp-case .problem-layout{display:grid;grid-template-columns:1.15fr .85fr;gap:48px;align-items:center;margin-bottom:55px}
.tp-case .problem-diagram{display:grid;grid-template-columns:1fr 34px 1fr 34px 1fr;grid-template-rows:auto 30px auto 30px auto;max-width:520px;margin:0 auto;width:100%}
.tp-case .problem-node{border:1px solid var(--tp-line);background:var(--tp-bg);padding:14px 12px;text-align:center}
.tp-case .problem-node-label{display:block;font-size:11px;font-weight:500;letter-spacing:.02em}
.tp-case .problem-node-line{display:block;font-size:10px;color:var(--tp-muted);margin-top:4px}
.tp-case .problem-node.product{grid-column:3;grid-row:1}
.tp-case .problem-node.users{grid-column:1;grid-row:3}
.tp-case .problem-node.business{grid-column:5;grid-row:3}
.tp-case .problem-node.engineering{grid-column:3;grid-row:5}
.tp-case .problem-center{grid-column:3;grid-row:3;background:var(--tp-dark);color:#fff;padding:14px 12px;text-align:center;font-size:12px;line-height:1.6;display:flex;align-items:center;justify-content:center}
.tp-case .problem-arrow{display:flex;align-items:center;justify-content:center;color:var(--tp-muted);font-size:16px}
.tp-case .problem-arrow.t{grid-column:3;grid-row:2}
.tp-case .problem-arrow.l{grid-column:2;grid-row:3}
.tp-case .problem-arrow.r{grid-column:4;grid-row:3}
.tp-case .problem-arrow.b{grid-column:3;grid-row:4}
.tp-case .problem-insight{border-left:1px solid var(--tp-line);padding-left:30px}
.tp-case .problem-insight h3{font-size:10px;letter-spacing:.16em;color:var(--tp-muted);font-weight:500;margin:0 0 16px}
.tp-case .problem-insight p{font-size:13px;color:var(--tp-ink);margin:0 0 16px;line-height:1.9}
.tp-case .problem-insight p:last-child{margin-bottom:0}

/* APPROACH: 3スコープの要点リスト(詳細は既存の .story-list に譲る) */
.tp-case .principle-list{border-top:1px solid var(--tp-line);margin-bottom:48px}
.tp-case .principle{padding:22px 0;border-bottom:1px solid var(--tp-line)}
.tp-case .principle:last-child{border-bottom:0}
.tp-case .principle-num{font-size:10px;color:var(--tp-muted);letter-spacing:.12em}
.tp-case .principle-title{display:block;font-size:14px;font-weight:500;margin:6px 0;color:var(--tp-ink)}
.tp-case .principle-desc{font-size:12px;color:var(--tp-muted);line-height:1.9;margin:0;max-width:820px}

/* OUTCOME: Full Renewal → Lv2 → NEXT(左)+ RESULT(右) */
.tp-case .outcome-layout{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center;margin-bottom:55px}
.tp-case .outcome-timeline{max-width:420px;margin:0 auto;width:100%}
.tp-case .outcome-phase{border:1px solid var(--tp-line);background:var(--tp-bg);padding:16px 18px;text-align:center}
.tp-case .outcome-phase.current{background:var(--tp-accent);border-color:var(--tp-accent)}
.tp-case .outcome-phase strong{display:block;font-size:13px;font-weight:500;color:var(--tp-ink)}
.tp-case .outcome-phase span{font-size:10px;color:var(--tp-muted)}
.tp-case .outcome-impact{border-left:1px solid var(--tp-line);padding-left:30px}
.tp-case .outcome-impact h3{font-size:10px;letter-spacing:.16em;color:var(--tp-muted);font-weight:500;margin:0 0 16px}
.tp-case .outcome-impact-item{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--tp-line)}
.tp-case .outcome-impact-item:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}
.tp-case .outcome-impact-item b{display:block;font-size:9px;color:var(--tp-muted);letter-spacing:.1em;font-weight:400}
.tp-case .outcome-impact-item strong{display:block;font-size:13px;font-weight:500;margin:3px 0;color:var(--tp-ink)}
.tp-case .outcome-impact-item span{font-size:12px;color:var(--tp-muted);line-height:1.8}

/* LEARNING: NEXT TIME */
.tp-case .next-time{margin-top:34px;border-left:1px solid var(--tp-dark);padding-left:24px;max-width:820px}
.tp-case .next-time-label{font-size:10px;letter-spacing:.16em;color:var(--tp-muted);margin-bottom:10px}
.tp-case .next-time p{font-size:13px;line-height:1.9;color:var(--tp-muted);margin:0}

@media(max-width:900px){
.tp-case .story{grid-template-columns:1fr;gap:26px}
.tp-case .figure-row{grid-template-columns:1fr;gap:36px}
.tp-case .problem-layout,.tp-case .outcome-layout{grid-template-columns:1fr}
.tp-case .problem-insight,.tp-case .outcome-impact{border-left:0;border-top:1px solid var(--tp-line);padding:24px 0 0}
.tp-case .diagram-row{flex-direction:column}
.tp-case .diagram-row .diagram-arrow{width:auto;height:26px;transform:rotate(90deg)}
.tp-case .diagram-note{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
.tp-case .hero{padding:55px 24px 45px}
.tp-case .section{padding:65px 24px}
.tp-case .story{padding:44px 0;gap:20px}
.tp-case .fact{grid-template-columns:1fr;gap:6px;padding:18px 0}
.tp-case .fact dt{line-height:1.8}
.tp-case .figure,.tp-case .figure-row{margin-bottom:36px}
.tp-case .problem-diagram{grid-template-columns:1fr;grid-template-rows:none;gap:10px}
.tp-case .problem-diagram .problem-node,.tp-case .problem-diagram .problem-center{grid-column:1;grid-row:auto}
.tp-case .problem-arrow{display:none}
.tp-case .diagram-note{grid-template-columns:1fr}
}
