/* ============================================================
   AI Creative Prototype 04: 中部クロコ機装株式会社(架空)
   トークンはブリーフ §5 から導出。参考サイト(gaaboo)由来の hex は使わない。
   地 = 工場の床のライトグレー / 墨 = 濃紺(文字のみ) / アクセント = 警告色の黄(番号・下線・CTA)
   ============================================================ */

:root {
  --bg: #EEF0F1;
  --bg-deep: #E4E7E9;
  --white: #FFFFFF;
  --ink: #13223A;
  --ink-soft: #2C3A50;
  --muted: #55606E;
  --line: #D5D9DD;
  --accent: #F2C94C;
  --accent-deep: #D9AF2A;
  --font-jp: "IBM Plex Sans JP", "Noto Sans JP", "游ゴシック", "Yu Gothic", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --container: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 6px;
  --ease: cubic-bezier(.25, 1, .5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  overflow-x: clip;
  font-feature-settings: "palt";
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
.container--narrow { max-width: 760px; }

/* ---------- デモ明記リボン ---------- */
.proto-ribbon {
  position: sticky; top: 0; z-index: 200;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  padding: 8px var(--pad);
  background: var(--ink); color: var(--white);
  font-size: 12px; line-height: 1.6; letter-spacing: .04em;
}
.proto-ribbon__mark { font-family: var(--font-mono); color: var(--accent); }
.proto-ribbon a { margin-left: auto; border-bottom: 1px solid var(--accent); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 37px; z-index: 150;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--pad);
  background: rgba(238, 240, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .04em; }
.brand__mark { width: 14px; height: 14px; background: var(--ink); border-radius: 2px; position: relative; }
.brand__mark::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 8px; height: 8px; background: var(--accent); border-radius: 1px; }
.brand small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { font-size: 13px; font-weight: 500; letter-spacing: .06em; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .25s var(--ease); }
.site-nav a:hover { border-bottom-color: var(--accent); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px; letter-spacing: .06em; line-height: 1.4;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
  min-height: 44px;
}
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--sm { padding: 10px 16px; font-size: 13px; }
.btn--lg { padding: 18px 28px; font-size: 15px; width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 見出し・ラベル ---------- */
.label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--muted);
  margin-bottom: 26px;
}
.label__num { font-family: var(--font-mono); color: var(--ink); background: var(--accent); padding: 2px 8px; border-radius: 3px; letter-spacing: .08em; }
.h2 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 700; line-height: 1.5; letter-spacing: .03em; }
.lead { margin-top: 22px; max-width: 720px; color: var(--ink-soft); }

/* ---------- セクション ---------- */
.section { padding: clamp(80px, 10vw, 140px) 0; }
.section--white { background: var(--white); }
.section--ink { background: var(--ink); color: var(--white); }
.section--contact { background: var(--bg-deep); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(560px, 92vh, 860px); display: grid; align-items: center; overflow: clip; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(238,240,241,0) 35%, rgba(238,240,241,.72) 58%, rgba(238,240,241,.9) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--container); width: 100%; margin: 0 auto; padding: 100px var(--pad) 80px;
  display: grid; justify-items: end;
}
.hero__inner > * { width: min(100%, 600px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.tag {
  font-size: 13px; font-weight: 500; letter-spacing: .03em; line-height: 1.5;
  padding: 7px 12px; border-radius: 3px;
  background: var(--white); color: var(--ink);
  border-left: 3px solid var(--accent);
  box-shadow: 0 1px 2px rgba(19,34,58,.08);
  opacity: 0; transform: translateY(6px);
  animation: tag-in .6s var(--ease) forwards;
  animation-delay: calc(.25s + var(--i) * .16s);
}
@keyframes tag-in { to { opacity: 1; transform: none; } }
.hero__title { font-size: clamp(34px, 4.6vw, 60px); font-weight: 700; line-height: 1.3; letter-spacing: .02em; word-break: keep-all; overflow-wrap: anywhere; }
.hero__lead { margin-top: 26px; font-size: 15.5px; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__band { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 44px; font-size: 12px; letter-spacing: .08em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- 02 選定思想 ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.split__body p + p { margin-top: 18px; }
.quote { margin-top: 30px; padding: 22px 26px; background: var(--bg); border-left: 3px solid var(--accent); font-weight: 700; font-size: 18px; line-height: 1.7; }
.quote__by { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: .08em; }

/* ---------- 03 11 の項目(図解) ---------- */
.sheet {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 100px minmax(240px, 1.2fr);
  gap: 0; align-items: stretch;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.sheet__col { padding: 28px 24px; border-right: 1px solid var(--line); }
.sheet__head { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.sheet__list li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-weight: 500; }
.sheet__list li:last-child { border-bottom: 0; }
.sheet__list .mono { font-size: 12px; color: var(--muted); }
.sheet__arrow { display: grid; place-items: center; color: var(--muted); background: var(--bg); }
.sheet__result { padding: 28px 28px; background: var(--ink); color: var(--white); display: grid; align-content: center; }
.sheet__result-en { font-size: 11px; letter-spacing: .2em; color: var(--accent); margin-bottom: 10px; }
.sheet__result-title { font-size: clamp(20px, 2vw, 26px); font-weight: 700; line-height: 1.4; word-break: keep-all; }
.sheet__result-note { margin-top: 14px; font-size: 13px; color: rgba(255,255,255,.78); }

/* ---------- 04 課題別:sticky 走路 + 横レール ---------- */
.runway { position: relative; height: calc(100vh * 3.5); background: var(--white); }
.runway__panel { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.runway__head { flex: 0 0 auto; padding-top: clamp(120px, 12vh, 150px); }
.rail-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; align-items: flex-end; padding-bottom: clamp(24px, 5vh, 56px); }
.runway__hint { display: none; }
/* 高さが足りないビューポート(短い窓・横向きスマホ・多くの縦持ちスマホ)では、sticky 横スクラブをやめて
   通常配置 + レールの横スクロール(ドラッグ / トラックパッド)にする。見出しとカードが重ならない */
@media (max-height: 860px) {
  .runway { height: auto; }
  .runway__panel { position: static; height: auto; overflow: visible; display: block; }
  .runway__head { padding-top: clamp(80px, 10vw, 140px); }
  .rail-wrap { display: block; overflow-x: auto; overflow-y: hidden; padding: 40px 0 56px; scrollbar-width: none; cursor: grab; }
  .rail-wrap::-webkit-scrollbar { display: none; }
  .rail-wrap.is-dragging { cursor: grabbing; }
  .cases { transform: none !important; }
  .runway__hint { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
  .runway__hint::after { content: "→"; color: var(--ink); }
}
.cases { display: flex; gap: 20px; padding-left: max(var(--pad), calc((100vw - var(--container)) / 2 + var(--pad))); padding-right: var(--pad); width: max-content; will-change: transform; }
.case {
  width: min(640px, 78vw); flex: 0 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 28px; align-items: start;
  padding: 30px 30px 32px; background: var(--bg); border-radius: var(--radius);
}
.case__num { font-size: 12px; letter-spacing: .18em; color: var(--muted); margin-bottom: 12px; }
.case__q { font-size: clamp(18px, 1.7vw, 22px); font-weight: 700; line-height: 1.55; letter-spacing: .02em; }
.case__q::after { content: ""; display: block; width: 44px; height: 3px; background: var(--accent); margin-top: 14px; }
.case__dl { margin-top: 18px; display: grid; grid-template-columns: 1fr; gap: 4px 0; }
.case__dl dt { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.case__dl dd { font-size: 14px; color: var(--ink-soft); line-height: 1.75; }
.case__dl dd + dt { margin-top: 12px; }
.case__fig { aspect-ratio: 1; background: var(--white); border-radius: var(--radius); display: grid; place-items: center; padding: 20px; }
.line-art { width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.line-art .thick { stroke-width: 2.4; }
.line-art .dot { fill: var(--accent); stroke: none; }

/* ---------- 05 プロセス ---------- */
.steps { margin-top: 56px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 24px; }
.step::after { content: ""; position: absolute; top: 50%; right: -12px; width: 8px; height: 8px; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: translateY(-50%) rotate(45deg); }
.step:last-child::after { display: none; }
.step__num { display: inline-block; font-size: 12px; color: var(--ink); background: var(--accent); padding: 1px 7px; border-radius: 3px; margin-bottom: 14px; }
.step h3 { font-size: 16px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }

/* ---------- 06 事例 ---------- */
.grid-3 { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--bg); border-radius: var(--radius); padding: 30px 28px 26px; display: grid; gap: 14px; align-content: start; }
.card__tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.card__title { font-size: 18px; font-weight: 700; line-height: 1.6; }
.card p { font-size: 14.5px; color: var(--ink-soft); }
.card__why { padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; font-weight: 700; color: var(--ink); }

/* ---------- 07 人 ---------- */
.dialogue { margin-top: 56px; display: grid; grid-template-columns: 180px minmax(0, 1fr) 180px; gap: 40px; align-items: center; }
.person { text-align: center; }
.person__photo { aspect-ratio: 3 / 4; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.person__photo--placeholder .line-art { stroke: var(--muted); }
.person__role { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }
.dialogue__body { background: var(--white); border-radius: var(--radius); padding: 32px 36px; display: grid; gap: 16px; }
.dialogue__line { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; font-size: 15px; color: var(--ink-soft); }
.dialogue__who { font-size: 11px; letter-spacing: .1em; color: var(--ink); padding-top: 6px; border-top: 2px solid var(--accent); height: fit-content; }

/* ---------- 08 数字 ---------- */
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.numbers__item { border-left: 1px solid rgba(255,255,255,.25); padding-left: 24px; }
.numbers dt { font-size: 12px; letter-spacing: .14em; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.numbers dd .mono { font-size: clamp(40px, 5vw, 64px); font-weight: 500; line-height: 1; color: var(--accent); }
.numbers dd small { font-size: 14px; margin-left: 6px; color: rgba(255,255,255,.85); }
.numbers__note { margin-top: 40px; max-width: 760px; font-size: 14.5px; color: rgba(255,255,255,.8); }

/* ---------- 09 製品・メーカー ---------- */
.entry-row { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.entry { display: grid; gap: 4px; padding: 28px 30px; border: 1.5px solid var(--ink); border-radius: var(--radius); transition: background .25s var(--ease), color .25s var(--ease); }
.entry:hover { background: var(--ink); color: var(--white); }
.entry__en { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.entry:hover .entry__en { color: var(--accent); }
.entry__ja { font-size: 22px; font-weight: 700; }
.entry__note { font-size: 13px; opacity: .75; }

/* ---------- 10 フォーム ---------- */
.form { margin-top: 40px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  min-height: 44px;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* ---------- フッター ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 48px 0 40px; font-size: 13px; }
.site-footer__brand { font-weight: 700; color: var(--white); margin-bottom: 12px; }
.site-footer__note { max-width: 760px; line-height: 1.8; }
.site-footer__credit { margin-top: 24px; font-size: 12px; color: rgba(255,255,255,.6); }
.site-footer__credit a { border-bottom: 1px solid var(--accent); color: var(--white); }

/* ---------- 語単位の出現(motion-kit) ---------- */
.w { display: inline-block; white-space: pre-wrap; }
[data-reveal], [data-hero-reveal] { will-change: transform, filter, opacity; }

/* ---------- リビール ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1100px) {
  .site-nav { display: none; }
  .sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet__arrow { display: none; }
  .sheet__result { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step:nth-child(3)::after { display: none; }
  .dialogue { grid-template-columns: 1fr; }
  .person { display: flex; align-items: center; gap: 16px; text-align: left; }
  .person__photo { width: 96px; flex: 0 0 auto; }
}
@media (max-width: 760px) {
  .proto-ribbon a { margin-left: auto; }
  .site-header { top: 37px; }
  .hero { min-height: auto; }
  .hero__inner { padding: 72px var(--pad) 56px; justify-items: start; }
  .hero::after { background: linear-gradient(180deg, rgba(238,240,241,.55) 0%, rgba(238,240,241,.92) 45%, rgba(238,240,241,.96) 100%); }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .sheet { grid-template-columns: 1fr; }
  .sheet__col { border-right: 0; border-bottom: 1px solid var(--line); }
  .runway__head { padding-top: 124px; }
  .runway__head .h2 { font-size: 22px; }
  .runway__head .lead { display: none; }
  .rail-wrap { padding-bottom: 24px; }
  .case { position: relative; grid-template-columns: 1fr; gap: 0; padding: 20px 18px 22px; }
  .case__q { font-size: 17px; padding-right: 76px; }
  .case__dl { margin-top: 14px; }
  .case__dl dd { font-size: 13px; line-height: 1.65; }
  .case__fig { position: absolute; top: 16px; right: 16px; width: 64px; padding: 10px; }
  .proto-ribbon > span:not(.proto-ribbon__mark) { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .dialogue__body { padding: 24px 20px; }
  .dialogue__line { grid-template-columns: 1fr; gap: 6px; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-row { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- 検証フック / モーション低減 ---------- */
html.noanim *, html.noanim *::before, html.noanim *::after { animation: none !important; transition: none !important; }
html.noanim .tag { opacity: 1; transform: none; }
html.noanim .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tag { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
