/* ベテ補助 共通スタイル
   製品LPとは独立。LP側のCSSをここに混ぜないこと。 */

:root {
  /* ブランド色。名刺から採取。
     #a57e62 が名刺の地色（濃茶）だが、これは面では塗らない。
     地色として使うのは、これを明るくした --brand-frame のほう。 */
  --brand-brown: #a57e62;   /* 参照用。面には使わない */
  --brand-tan:   #c08d5f;   /* キャラクターの body。参照用 */
  --brand-ink:   #1f1b18;   /* 輪郭線。--text と同値 */
  --brand-frame: #ddcdbc;   /* ★外側の地色。名刺の枠にあたる薄茶 */
  --paper:       #fbf9f7;   /* ★本文が載る面。白より一段落とした紙色 */

  --bg: #ffffff;
  --bg-sub: #f1ebe5;
  --surface: #ffffff;
  --text: #1f1b18;
  --text-muted: #6b6157;
  --line: #e2dad2;
  --accent: #8a6446;
  --accent-hover: #6d4d34;
  --accent-quiet: #f2ebe4;
  --accent-deep:  #4a352a;   /* 白抜き文字を載せる面。--accent では暗さが足りない */
  --warn-bg: #fff8e6;
  --warn-line: #e6c65c;
  --warn-text: #6b5310;
  --radius: 10px;
  --radius-card: 20px;
  --pad: clamp(1.25rem, 5vw, 4rem);   /* 紙面の左右余白。くまの食み出し計算にも使う */
  --measure: 50rem;
  --measure-wide: 64rem;
}

/* ダークモードの配色は持たない。
   名刺由来の「薄茶の枠 + 白いパネル」が識別要素そのものなので、
   閲覧側のテーマで反転させない。色は上の :root に明示的に固定する。 */

/* ブラウザの自動ダークモード(強制反転)を拒否する。配色は名刺由来で固定 */
:root { color-scheme: light only; }

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; }
/* パネルの縁で意図的に見切れる2枚は制限しない */
.hero-bear, .consult-bear { max-width: none; }

/* 地色は html が持つ。body は白い枠線そのものになるので背景を持たせない。
   （body に背景があるとキャンバス全体に伝播して、枠の外まで塗ってしまう） */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--brand-frame);
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP",
               "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: .5rem 1rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}

/* 本文が載る一枚の紙。白いパネルを積むのをやめ、
   この面の上で罫線と余白だけで区切る。左右の余白は本文の左端を決めるので
   ここだけで管理する。
   見切りは body ではなくこの要素が持つ。body に overflow:hidden を置くと
   ビューポートへ伝播してページ全体がスクロールできなくなる。 */
.paper {
  width: min(100% - 2 * clamp(.75rem, 2vw, 1.5rem), calc(var(--measure-wide) + 8rem));
  margin: clamp(.75rem, 2vw, 1.5rem) auto;
  padding: 0 var(--pad);
  border-radius: clamp(16px, 2.6vw, 24px);
  background: var(--paper);
  overflow: hidden;
}

/* --- 枠 --- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
}
.wrap-wide {
  max-width: var(--measure-wide);   /* ★紙面の上限。これより広い分は茶色が受け持つ */
  margin: 0 auto;
  /* 中身の可変単位(cqw)の基準。画面幅(vw)ではなく白の幅に連動させるので、
     白が上限で止まればサイズも一緒に止まる。 */
  container-type: inline-size;
}

/* 面ではなく余白で区切る。法務ページの本文もこれを使う */
.panel {
  position: relative;
  padding: clamp(1.75rem, 4cqw, 2.75rem) 0;
}

/* トップページのセクション。罫線1本で区切る */
.sec {
  position: relative;
  padding: clamp(2rem, 4.5cqw, 2.75rem) 0;
  border-top: 1px solid var(--line);
}
.sec:first-child { border-top: 0; }

/* ラベル列 + 本文列。狭い幅では縦積みにする */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  gap: clamp(1rem, 4cqw, 2.5rem);
  align-items: start;
}
@container (max-width: 40rem) {
  .cols { grid-template-columns: 1fr; gap: .5rem; }
}

.site-header {
  background: transparent;
}
.site-header .wrap-wide { padding-top: .5rem; }
.site-header .wrap,
.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
}
.brand span {
  display: block;
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: .06em;
}

main { padding: 0; }

.site-footer {
  background: transparent;
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 clamp(1.5rem, 4vw, 2.5rem);
  font-size: .875rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text); }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin-bottom: 1rem;
}
.site-footer p { margin: 0; }

/* --- 文字 --- */

h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.4;
  margin: 0 0 .75rem;
  letter-spacing: -.01em;
}
h2 {
  font-size: 1.2rem;
  margin: 2.75rem 0 .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
h3 {
  font-size: 1rem;
  margin: 1.75rem 0 .5rem;
  line-height: 1.6;
}
.lede {
  color: var(--text-muted);
  margin: 0 0 2rem;
}
.meta {
  font-size: .8125rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

ol, ul { padding-left: 1.4em; }
li { margin: .35em 0; }

/* --- 表 --- */

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: .9375rem;
  background: var(--surface);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
}
tr:last-child th, tr:last-child td { border-bottom: 0; }
th[scope="row"] {
  width: clamp(6.5em, 26vw, 12em);
  font-weight: 600;
  background: var(--bg-sub);
}
thead th { background: var(--bg-sub); font-weight: 600; }

/* --- 部品 --- */

.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-size: .9375rem;
}
.note strong { font-weight: 700; }
.note :first-child { margin-top: 0; }
.note :last-child { margin-bottom: 0; }

/* 未確定のプレースホルダ。公開前にゼロ件にする */
.todo {
  background: var(--accent-quiet);
  border-bottom: 2px dotted var(--accent);
  padding: 0 .2em;
  font-weight: 600;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: .6rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9375rem;
}
.btn:hover { background: var(--accent-hover); color: #fff; }

.toc {
  background: var(--bg-sub);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 2.6rem;
  margin: 0 0 2.5rem;
}
.toc li { margin: .25em 0; }

/* ==========================================================
   トップページ専用（C案：罫線と余白で組む）
   面を積まず、紙の上に罫線1本とラベル列で構造を出す。
   色面はCTAの1枚だけに絞り、そこが終着点だと分かるようにする。
   ========================================================== */

/* --- セクションのラベル列 --- */

.panel-label {
  margin: 0;
  padding-top: .35rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .22em;
  line-height: 1.6;
  color: var(--accent);
}

/* --- ヒーロー：くまは紙の右下隅で切れる --- */

.hero-panel {
  /* --bear を基準に、高さ・食み出し・本文の逃げ幅をすべて導く。
     すべて比率なので、幅が変われば全部が一緒に追従する。 */
  --bear:   max(5rem, 26cqw);           /* 幅 */
  --bear-h: calc(var(--bear) * 1.28);   /* 高さ。上げるほど足元まで見える */
  --bleed:  calc(var(--bear) * .10);    /* 紙の縁から食み出す量 */
  display: flex;
  align-items: flex-end;
  min-height: calc(var(--bear-h) + 1rem);
  padding-top: clamp(1.5rem, 4cqw, 2.5rem);
  padding-bottom: 0;
  padding-right: max(0px, calc(var(--bear) - var(--bleed) - var(--pad) + 1.5rem));
}
.hero-copy {
  /* flexアイテムの min-width は既定が auto で、内容より狭くならない。
     縮まないと overflow:hidden に文が切り落とされる。 */
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding-bottom: clamp(2rem, 5cqw, 3rem);
}
.hero-panel h1 {
  font-size: clamp(1.35rem, 3.6cqw, 2.25rem);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .03em;
  margin: 0 0 1.25rem;
}
/* 語の途中で折り返さない塊。狭い幅では塊の境目だけで改行する */
.keep { display: inline-block; }
.hero-lede {
  margin: 0;
  max-width: 27em;   /* 全角27字。2〜3文目が3行、4文目が「相談ください。」で終わる幅 */
  line-height: 2.05;
  text-wrap: pretty;
}
.hero-bear {
  position: absolute;
  right: calc((var(--bleed) + var(--pad)) * -1);   /* 紙面の余白を跨いで縁まで出す */
  bottom: 0;
  width: var(--bear);
  height: var(--bear-h);
  object-fit: cover;            /* 縦横比は保ったまま、収まらない分を切る */
  object-position: center top;  /* 上を基準にするので、切れるのは足元 */
  pointer-events: none;
}

/* 狭い幅では、くまを本文の右下に添える別の段にする。
   文は全幅で組み、くまは紙の右縁からだけ食み出す（角に押し込んで切らない） */
@container (max-width: 40rem) {
  .hero-panel {
    --bear: clamp(6rem, 28cqw, 6.5rem);
    display: block;
    min-height: 0;
    padding-right: 0;
  }
  .hero-copy { padding-bottom: 0; }
  .hero-lede { padding-right: 0; }
  /* 最後の一文とくまを横に並べ、くまは下端を揃えて紙の右縁から食み出す */
  .hero-tail {
    display: flex;
    align-items: flex-start;   /* 文が短い幅でも、文の上に空きを作らない */
    gap: .5rem;
  }
  .hero-tail .hero-lede { flex: 1 1 auto; min-width: 0; }
  .hero-bear {
    position: static;
    display: block;
    flex-shrink: 0;
    width: var(--bear);
    height: calc(var(--bear) * 1.1);
    margin: 0 calc(-1 * (var(--bleed) + var(--pad))) 0 0;
  }
}
/* 360px 級では見出し1行目『本職のために何ができるか』(14字)を1行に収める */
@container (max-width: 24rem) {
  .hero-panel h1 { font-size: 1.25rem; letter-spacing: .02em; }
}

/* --- つくっている人 --- */

.profile-body { min-width: 0; }
.credential {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 2.2cqw, 1.2rem);
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: .01em;
}
.credential strong {
  font-size: 1.9em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--accent);
  padding: 0 .06em;
}
.profile-body p { margin: 0; max-width: 34em; line-height: 2.1; text-wrap: pretty; }
.profile-sign {
  margin: 1.5rem 0 0 !important;
  font-size: .875rem;
  color: var(--text-muted);
}
.profile-sign strong {
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: .1em;
}

/* --- 制作アプリ：画像だけが白い面を持つ --- */

.products-lead {
  margin: 0 0 1.5rem;
  font-size: .875rem;
  color: var(--text-muted);
}
.offer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3.5cqw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}
.offer-list li {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  margin: 0;
  min-width: 0;
}
/* 画面画像。出所が違っても縦横比を揃えて並びを崩さない */
.shot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  /* 画面の縦横比は製品ごとに違う（横長のウィンドウも縦長のウィンドウもある）。
     cover だと縦長の画面が大きく切れてしまうので contain で全体を見せ、
     枠の比率は揃えたまま余った側を白で埋める。 */
  object-fit: contain;
  object-position: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
/* 画像未用意の枠。公開前に実画像へ差し替えること */
.shot-todo {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  padding: .5rem;
}
/* カード全体をリンクにする。文字色は据え置き、ホバーで画像枠と製品名だけ色を変える */
.offer-link {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  color: inherit;
  text-decoration: none;
}
.offer-link:hover { color: inherit; }
.offer-link:hover .shot { border-color: var(--accent); }
.offer-link:hover .item { color: var(--accent); }
/* 製品名がリンクだと分かるように、ヘッダーの導線と同じ矢印を付ける */
/* リンク前のカード: 矢印もホバーも付けない */
.offer-link-pending .item::after { content: none; }
.offer-link-pending:hover .shot { border-color: var(--line); }
.offer-link-pending:hover .item { color: var(--text); }
.offer-link .item::after {
  content: " →";
  color: var(--accent);
  font-weight: 700;
}
.offer-text { min-width: 0; }
.offer-list .item {
  display: block;
  font-size: clamp(1rem, 2.4cqw, 1.15rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--text);
}
.offer-list .sub {
  display: block;
  margin: .25rem 0 0;
  font-size: .8125rem;
  color: var(--text-muted);
  letter-spacing: .02em;
}
.panel-note {
  margin: 1.5rem 0 0;
  font-size: .75rem;
  color: var(--text-muted);
}

@container (max-width: 34rem) {
  .offer-list { grid-template-columns: 1fr; }
}

/* --- コンサルティング --- */

.consult-body { min-width: 0; }
.consult-body h2 {
  border-top: 0;
  padding-top: 0;
  margin: 0 0 .75rem;
  font-size: clamp(1.1rem, 2.6cqw, 1.35rem);
  line-height: 1.6;
  letter-spacing: .01em;
}
.consult-body > p {
  margin: 0 0 1.5rem;
  max-width: 32em;
  line-height: 2.05;
  text-wrap: pretty;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: flex;
  gap: .875rem;
  align-items: baseline;
  margin: 0;
  font-size: .9375rem;
  line-height: 1.85;
}
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  flex-shrink: 0;
  width: 1.4em;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
}
.steps strong { color: var(--text); margin-right: .4em; }

/* --- 終着点。パネルは静かな薄茶にとどめ、色が付くのはボタンだけ。
   紺は茶系のどこにも無い色相なので、ページで唯一の「押せる場所」として立つ --- */

.contact-cta {
  --cta-blue: #2b3d5c;
  --cta-blue-hover: #1f2d45;
  --cta-pad: clamp(1.75rem, 4cqw, 2.75rem);
  /* 他セクションと同じラベル列+本文列。左列は紙面上の 9.5rem からパネルの余白分を引き、
     本文の左端が上のセクションの本文と揃うようにする */
  display: grid;
  grid-template-columns: minmax(0, calc(9.5rem - var(--cta-pad))) minmax(0, 1fr);
  gap: clamp(1rem, 4cqw, 2.5rem);
  align-items: start;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: clamp(14px, 2vw, var(--radius-card));
  padding: var(--cta-pad);
  margin: 0 0 clamp(1.5rem, 4cqw, 2.5rem);
}
/* くまはボタンと同じ行に、ボタンと同じ高さで並ぶ */
.contact-body { min-width: 0; }
.contact-cta .cta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0;
}
.contact-bear {
  height: 3.5rem;
  width: auto;
  flex-shrink: 0;
}
.contact-cta .panel-label { color: var(--accent-hover); }
.contact-cta h2 {
  border-top: 0;
  padding-top: 0;
  margin: 0 0 .75rem;
  color: var(--text);
  font-size: clamp(1.1rem, 2.6cqw, 1.35rem);
  line-height: 1.7;
  letter-spacing: .01em;
}
.contact-body p {
  margin: 0 0 1.25rem;
  max-width: 34em;
  color: var(--text);
  font-size: .9375rem;
  line-height: 1.95;
  text-wrap: pretty;
}
.contact-cta .btn {
  background: var(--cta-blue);
  color: #fff;
  padding: .8rem 2.25rem;
  font-size: 1rem;
  border-radius: 999px;
  white-space: nowrap;
}
.contact-cta .btn:hover { background: var(--cta-blue-hover); color: #fff; }

@container (max-width: 40rem) {
  .contact-cta { grid-template-columns: 1fr; gap: .5rem; }
  .contact-cta .panel-label { padding-top: 0; }
}
@container (max-width: 34rem) {
  .contact-cta { --cta-pad: 1.25rem; padding-top: 1.5rem; }
  .contact-cta .btn { padding: .7rem 1rem; font-size: .9375rem; }
}

/* --- ヘッダーの常設導線。売り込みに見えないようボタンにはしない --- */

.header-cta {
  font-size: .875rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: .4rem .2rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.header-cta::after { content: " →"; }
.header-cta:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* 法務リンクは自己紹介ページの主役ではない。存在は示すが前に出さない */
.site-footer nav { font-size: .8125rem; }
.site-footer nav a { color: var(--text-muted); }
.site-footer nav a:hover { color: var(--text); }
.site-footer nav a[href="/contact.html"] {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================
   お問い合わせフォーム
   ========================================================== */

.field { margin: 0 0 1.5rem; }
.field label {
  display: block;
  font-weight: 700;
  font-size: .9375rem;
  margin-bottom: .4rem;
}
.field .req {
  display: inline-block;
  margin-left: .5em;
  padding: .05em .5em;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  vertical-align: middle;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;   /* iOS で 16px 未満だと入力時にズームされる */
  line-height: 1.6;
}
.field textarea { resize: vertical; min-height: 9em; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.hint {
  margin: .4rem 0 0;
  font-size: .8125rem;
  color: var(--text-muted);
}
.consent { margin: 1.5rem 0; }

/* ハニーポット。表示せず、支援技術からも隠す */
.hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cf-turnstile { margin: 1.5rem 0; }

.form-actions { margin: 1.5rem 0 0; }
.form-actions .btn { padding: .75rem 2rem; font-size: 1rem; }
.form-actions .btn:disabled { opacity: .5; cursor: default; }

.form-status {
  margin: 1rem 0 0;
  font-size: .9375rem;
  font-weight: 600;
  min-height: 1.5em;
}
.form-status.is-error { color: #a3341c; }
.form-status.is-done  { color: #2f6b3a; }
.form-status.is-busy  { color: var(--text-muted); }

/* 送信完了の表示。form を隠した後に残る */
.form-done { margin: 1.5rem 0 0; }
.form-done p { margin: 0 0 .75rem; }
[hidden] { display: none !important; }
