/* 案件獲得用ポートフォリオ — 共通スタイル
   方針: オフホワイト地・チャコール文字・オレンジは要所だけ。実物の画像を大きく見せる。
   外部フォント・外部CDNは読み込まない（ローカルだけで完結させる）。 */

:root {
  --bg: #f5f3ee;
  --bg-alt: #ece9e2;
  --paper: #ffffff;
  --ink: #161616;
  --ink-soft: #3b3a37;
  --mute: #77736b;
  --line: #d9d5cc;
  --accent: #e8590c;
  --accent-ink: #b8430a;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 6px;
  --font-jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  --font-en: "Helvetica Neue", Helvetica, "Segoe UI", Arial, var(--font-jp);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* 英字の小見出し */
.label {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.label--accent { color: var(--accent-ink); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 238, 0.94);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--font-en); font-weight: 700; letter-spacing: 0.14em; font-size: 13px; text-decoration: none; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { font-family: var(--font-en); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--accent-ink); }
.nav .nav-cta { color: var(--paper); background: var(--ink); padding: 9px 18px; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--accent); color: var(--paper); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn .arrow { font-family: var(--font-en); }

/* ---------- HERO ---------- */
.hero { padding: clamp(64px, 11vw, 140px) 0 clamp(48px, 7vw, 88px); }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(36px, 7.2vw, 92px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero h1 .dot { color: var(--accent); }
.hero .lead { margin-top: 30px; max-width: 34em; font-size: clamp(16px, 1.7vw, 20px); color: var(--ink-soft); }
.hero .scope { margin-top: 20px; font-family: var(--font-en); font-size: 13px; letter-spacing: 0.08em; color: var(--mute); }
.hero .actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-visual { margin-top: clamp(48px, 7vw, 88px); }
.hero-visual .frame { border-radius: var(--radius); overflow: hidden; background: #111; border: 1px solid var(--line); }
.hero-visual figcaption { margin-top: 12px; font-size: 13px; color: var(--mute); }

/* ---------- セクション共通 ---------- */
.section { padding: clamp(72px, 10vw, 136px) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.35; font-weight: 700; }
.section-head p { max-width: 40em; color: var(--ink-soft); }

/* ---------- SELECTED WORK ---------- */
.work { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); text-decoration: none; }
.work:first-of-type { border-top: 0; padding-top: 0; }
.work-media { border-radius: var(--radius); overflow: hidden; background: #111; border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.work-media img, .work-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.work:hover .work-media img { transform: scale(1.02); }
.work-num { font-family: var(--font-en); font-size: 13px; letter-spacing: 0.16em; color: var(--accent-ink); font-weight: 600; }
.work-body h3 { margin-top: 10px; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.3; }
.work-body .kind { margin-top: 6px; font-size: 14px; color: var(--mute); }
.work-body .summary { margin-top: 18px; color: var(--ink-soft); max-width: 32em; }
.facts { margin-top: 22px; display: grid; gap: 8px; }
.facts li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.7; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--accent); }
.more { margin-top: 26px; display: inline-flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14.5px; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.work:hover .more { color: var(--accent-ink); border-color: var(--accent-ink); }

@media (min-width: 900px) {
  .work { grid-template-columns: 1.35fr 1fr; align-items: center; }
  .work:nth-of-type(even) .work-media { order: 2; }
}

/* ---------- WHAT I DO ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(26px, 3vw, 40px); }
.card h3 { font-family: var(--font-en); font-size: 20px; line-height: 1.4; }
.card .jp { margin-top: 6px; font-weight: 600; }
.card p { margin-top: 14px; font-size: 15px; color: var(--ink-soft); }
.card .eg { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--mute); }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- HOW I BUILD ---------- */
.steps { display: grid; gap: 0; grid-template-columns: 1fr; counter-reset: step; }
.step { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 8px 16px; }
.step .n { font-family: var(--font-en); font-size: 13px; letter-spacing: 0.14em; color: var(--accent-ink); font-weight: 600; padding-top: 6px; }
.step h3 { font-family: var(--font-en); font-size: 22px; }
.step .jp { font-size: 14px; color: var(--mute); margin-left: 10px; font-weight: 400; font-family: var(--font-jp); }
.step p { grid-column: 2; font-size: 15px; color: var(--ink-soft); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 28px; }
  .step { grid-template-columns: 1fr; border-top: 2px solid var(--ink); padding: 22px 0 0; }
  .step p { grid-column: 1; }
  .step .jp { display: block; margin: 2px 0 0; }
}

/* ---------- OTHER WORKS ---------- */
.others { display: grid; gap: 28px 24px; grid-template-columns: 1fr; }
.other .thumb { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #111; border: 1px solid var(--line); }
.other .thumb img, .other .thumb video { width: 100%; height: 100%; object-fit: cover; }
.other h3 { margin-top: 16px; font-size: 18px; line-height: 1.5; }
.other .kind { font-size: 13px; color: var(--mute); }
.other p { margin-top: 8px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.8; }
@media (min-width: 640px) { .others { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .others { grid-template-columns: repeat(3, 1fr); } }

/* ---------- ABOUT ---------- */
.about { display: grid; gap: 32px; grid-template-columns: 1fr; }
.about .big { font-size: clamp(22px, 2.8vw, 34px); line-height: 1.7; font-weight: 700; }
.about .big em { font-style: normal; box-shadow: inset 0 -0.42em 0 rgba(232, 89, 12, 0.22); }
.about .body p + p { margin-top: 1.2em; }
.about .body { color: var(--ink-soft); }
@media (min-width: 900px) { .about { grid-template-columns: 1.1fr 1fr; gap: 72px; } }

/* ---------- CONTACT ---------- */
.contact { background: var(--ink); color: #f5f3ee; border-top: 0; }
.contact .label { color: #a9a49a; }
.contact h2 { font-family: var(--font-en); font-size: clamp(40px, 8vw, 104px); line-height: 1.05; letter-spacing: -0.02em; margin-top: 16px; }
.contact .lead { margin-top: 26px; max-width: 32em; color: #d7d2c8; font-size: clamp(16px, 1.6vw, 19px); }
.contact .topics { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.contact .topics li { border: 1px solid #4a4843; border-radius: 999px; padding: 7px 18px; font-size: 14px; color: #e7e2d8; }
.contact .actions { margin-top: 40px; }
.contact .note { margin-top: 18px; font-size: 13px; color: #a9a49a; }

.site-footer { background: var(--ink); color: #8d887f; padding: 26px 0 40px; font-size: 12px; font-family: var(--font-en); letter-spacing: 0.08em; border-top: 1px solid #2f2e2b; }

/* ---------- CASE STUDY ページ ---------- */
.case-hero { padding: clamp(48px, 8vw, 104px) 0 clamp(32px, 5vw, 56px); }
.back { font-family: var(--font-en); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--mute); }
.back:hover { color: var(--accent-ink); }
.case-hero h1 { margin-top: 26px; font-size: clamp(34px, 6vw, 76px); line-height: 1.2; }
.case-hero .tagline { margin-top: 18px; font-size: clamp(17px, 2vw, 22px); color: var(--ink-soft); max-width: 30em; }
.meta { margin-top: 36px; display: grid; gap: 18px 32px; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); padding-top: 24px; }
.meta dt { font-family: var(--font-en); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.meta dd { margin-top: 4px; font-size: 15px; font-weight: 600; line-height: 1.6; }
@media (min-width: 900px) { .meta { grid-template-columns: repeat(4, 1fr); } }

.case-cover { border-radius: var(--radius); overflow: hidden; background: #111; border: 1px solid var(--line); }
.case-cover img, .case-cover video { width: 100%; }

.block { display: grid; gap: 14px 48px; grid-template-columns: 1fr; padding: clamp(36px, 5vw, 60px) 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; }
.block > .label { padding-top: 8px; }
.block h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.5; }
.block .text > * + * { margin-top: 1.1em; }
.block .text p { color: var(--ink-soft); }
.block .text ul { display: grid; gap: 10px; }
.block .text ul li { position: relative; padding-left: 20px; line-height: 1.8; }
.block .text ul li::before { content: ""; position: absolute; left: 0; top: 0.82em; width: 9px; height: 2px; background: var(--accent); }
.block .text strong { color: var(--ink); }
@media (min-width: 900px) { .block { grid-template-columns: 200px 1fr; } .block .text { max-width: 46em; } }

.gallery { display: grid; gap: 20px; grid-template-columns: 1fr; margin: clamp(8px, 2vw, 24px) 0 clamp(36px, 5vw, 60px); }
.gallery figure { margin: 0; }
.gallery .shot { border-radius: var(--radius); overflow: hidden; background: #111; border: 1px solid var(--line); }
.gallery .shot img, .gallery .shot video { width: 100%; }
.gallery figcaption, .case-cover + figcaption { margin-top: 10px; font-size: 13px; color: var(--mute); line-height: 1.7; }
@media (min-width: 800px) { .gallery--2 { grid-template-columns: repeat(2, 1fr); } .gallery--3 { grid-template-columns: repeat(3, 1fr); } }

/* 版の履歴などの時系列 */
.timeline { display: grid; gap: 0; border-left: 2px solid var(--ink); margin-left: 4px; }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.6em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline .when { font-family: var(--font-en); font-size: 12.5px; letter-spacing: 0.08em; color: var(--mute); }
.timeline .what { font-weight: 600; }
.timeline .note { font-size: 14.5px; color: var(--ink-soft); }

.tech { display: flex; flex-wrap: wrap; gap: 8px; }
.tech li { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 16px; font-size: 13.5px; font-family: var(--font-en); }

.next { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.next a.title { font-size: clamp(22px, 3vw, 36px); font-weight: 700; text-decoration: none; }
.next a.title:hover { color: var(--accent-ink); }

/* 人の確認待ちの箇所（公開前に必ず消す） */
.todo { background: #fff4d6; border: 1px dashed #c98a00; color: #6b4a00; padding: 2px 8px; border-radius: 4px; font-size: 0.86em; font-family: var(--font-en); letter-spacing: 0.02em; }

/* ---------- スマートフォン ---------- */
@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
  .site-header .wrap { height: 56px; }
  body { font-size: 15.5px; }
  .hero .actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work-media img { transition: none; }
}

/* ---------- HERO の4枚組（事例1つにつき実物1枚） ---------- */
.mosaic { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.mosaic a { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #111; border: 1px solid var(--line); }
.mosaic img, .mosaic video { width: 100%; height: 100%; object-fit: cover; }
.mosaic .tag { position: absolute; left: 10px; bottom: 10px; background: rgba(22, 22, 22, 0.86); color: #fff; font-family: var(--font-en); font-size: 11px; letter-spacing: 0.12em; padding: 4px 10px; border-radius: 3px; }
@media (max-width: 560px) { .mosaic { gap: 6px; } .mosaic .tag { font-size: 9.5px; left: 6px; bottom: 6px; padding: 3px 7px; } }

/* 前後比較の見出し札 */
.shot { position: relative; }
.badge { position: absolute; left: 12px; top: 12px; z-index: 2; background: var(--ink); color: #fff; font-family: var(--font-en); font-size: 11px; letter-spacing: 0.14em; padding: 4px 10px; border-radius: 3px; }
.badge--after { background: var(--accent); }

/* 事実の数字（証拠のあるものだけ） */
.stats { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: clamp(32px, 5vw, 56px) 0 0; }
.stats div { background: var(--paper); padding: 22px 20px; }
.stats .num { font-family: var(--font-en); font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; line-height: 1.2; }
.stats .num small { font-size: 0.5em; font-weight: 600; margin-left: 3px; }
.stats .cap { margin-top: 6px; font-size: 13px; color: var(--mute); line-height: 1.6; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.shot--light { background: var(--paper) !important; }
.work-media--contain img { object-fit: contain; background: var(--paper); }

/* 固定ヘッダーの下に見出しが隠れないようにする */
section[id], main[id] { scroll-margin-top: 72px; }
