/* =============================================================
   ブランドの編集室|実装スターターCSS
   -------------------------------------------------------------
   使い方(WordPress):
   - テーマの style.css に貼るか、子テーマで
     wp_enqueue_style() で読み込む
   - コンポーネントの使い方は henshushitsu-components.html 参照
   ============================================================= */

/* ---------- 1. デザイントークン ---------- */
:root {
  /* 基本色(凛とした水色×墨) */
  --ink:   #2a3440;   /* 文字:青みの墨色 */
  --body:  #46535e;   /* 本文グレー */
  --sub:   #8494a0;   /* 補助テキスト */
  --line:  #d9e2e9;   /* 罫線 */
  --bg:    #f3f7fa;   /* 背景:じゃっかん水色の白 */
  --paper: #fbfdff;   /* 紙面:ほぼ白の青白 */

  /* 朱(編集者のペンの跡。手書きNEW・校正の朱・結び目のみ) */
  --shu:   #c2543f;

  /* 栞カテゴリ色(=4つの整える) */
  --cat-kotoba:  #5b7a9d;  /* 言葉:藍 */
  --cat-insho:   #c2543f;  /* 印象:朱 */
  --cat-tsutae:  #6fa3b7;  /* 伝え方:水色 */
  --cat-zentai:  #9aa7b0;  /* 全体:銀鼠 */

  /* 書体(スタンス文=明朝/説明文=ゴシック) */
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans:  "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;

  /* 余白リズム */
  --section-pad: clamp(72px, 12vw, 140px);
  --inner-w: 620px;
  --wide-w: 760px;
}

/* ---------- 2. ベース ---------- */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt"; /* 日本語詰め */
}

.section { padding: var(--section-pad) 0; }
.inner   { max-width: var(--inner-w); margin: 0 auto; padding: 0 24px; }
.inner--wide { max-width: var(--wide-w); }

/* 見出し:スタンス文=明朝 */
h1, h2, .serif {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: .06em;
}
h1 { font-size: clamp(26px, 4.5vw, 34px); line-height: 1.8; }
h2 { font-size: clamp(18px, 3vw, 22px);  line-height: 2; }

/* リード文(明朝・ゆったり) */
.lead {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2.6;
  letter-spacing: .08em;
}

/* 本文(ゴシック) */
p, .body-text {
  font-size: 13.5px;
  line-height: 2.4;
  letter-spacing: .05em;
  color: var(--body);
}

/* 小見出しキッカー(英字・トラッキング広め) */
.kicker {
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--sub);
  margin-bottom: 36px;
}

/* ---------- 3. 傍点(強調は太字でなくこれ。1画面1箇所まで) ---------- */
.em {
  -webkit-text-emphasis: filled dot var(--ink);
  text-emphasis: filled dot var(--ink);
}

/* ---------- 4. 縦書き(トップの一文のみ) ---------- */
.tate {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: clamp(20px, 3.4vw, 26px);
  letter-spacing: .28em;
  line-height: 2.4;
  height: 340px;
  margin: 0 auto;
  font-weight: 500;
}
@media (max-width: 640px) { .tate { height: 260px; } }

/* ---------- 5. 鍵かっこボタン(全CTA共通。塗りボタン禁止) ---------- */
.kagi {
  position: relative;
  display: inline-block;
  padding: 18px 52px;
  font-size: 11.5px;
  letter-spacing: .25em;
  color: var(--ink);
  text-decoration: none;
}
.kagi::before,
.kagi::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  transition: width .45s ease, height .45s ease;
}
.kagi::before { top: 0; left: 0;   border-top: 1px solid var(--ink);    border-left: 1px solid var(--ink); }
.kagi::after  { bottom: 0; right: 0; border-bottom: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.kagi:hover::before,
.kagi:hover::after { width: 100%; height: 100%; }

/* ---------- 6. 目次(サービス一覧。点線リーダー) ---------- */
.toc { max-width: 560px; margin: 0 auto; }
.toc-row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 16px 0;
  text-decoration: none; color: inherit;
}
.toc-row .no  { font-size: 11px; letter-spacing: .2em; color: var(--sub); flex-shrink: 0; }
.toc-row .t   { font-family: var(--serif); font-size: 15px; letter-spacing: .08em; flex-shrink: 0; }
.toc-row .dots{ flex: 1; border-bottom: 1px dotted var(--sub); transform: translateY(-4px); min-width: 30px; }
.toc-row .tag { font-size: 11px; color: var(--sub); letter-spacing: .06em; flex-shrink: 0; max-width: 45%; text-align: right; }
@media (max-width: 640px) {
  .toc-row { flex-wrap: wrap; }
  .toc-row .tag { max-width: 100%; text-align: left; width: 100%; padding-left: 25px; }
  .toc-row .dots { display: none; }
}

/* ---------- 7. 動詞リスト+綴じ糸(Process) ---------- */
.verbs {
  position: relative;
  padding-left: 56px;
}
/* 綴じ糸:グレーの下地 */
.verbs::before {
  content: "";
  position: absolute;
  left: 20px; top: 34px; bottom: 34px;
  width: 1px;
  background: var(--line);
}
/* 綴じ糸:スクロールで伸びる墨色の糸(JSで --ito を 0→1 に) */
.verbs::after {
  content: "";
  position: absolute;
  left: 20px; top: 34px;
  width: 1px;
  height: calc((100% - 68px) * var(--ito, 0));
  background: var(--ink);
  transition: height .1s linear;
}
.verb {
  position: relative;
  padding: 34px 0;
  border-bottom: 1px solid #e3ebf1;
}
.verb:last-child { border-bottom: none; }
.verb .num {
  position: absolute; left: -44px; top: 38px;
  font-family: var(--serif); font-size: 12px; color: var(--sub);
  background: var(--bg); padding: 6px 0; z-index: 1;
}
.verb .v {
  font-family: var(--serif);
  font-size: 19px; letter-spacing: .1em; margin-bottom: 10px;
}
.verb .d {
  font-size: 12.5px; line-height: 2.1; color: var(--body); letter-spacing: .04em;
}

/* 動詞を一列で見せる(TOP/01用) */
.verbline {
  font-family: var(--serif);
  font-size: 16px; line-height: 3; letter-spacing: .12em;
  text-align: center;
}

/* ---------- 8. 共感リスト(こんなとき/こんな抵抗) ---------- */
.voice {
  font-family: var(--serif);
  font-size: 15px; line-height: 2; letter-spacing: .06em;
  padding: 18px 0;
  border-bottom: 1px solid #e3ebf1;
}
.voice:last-child { border-bottom: none; }
.voice-close {
  font-family: var(--serif);
  font-size: 15px; letter-spacing: .08em;
  margin-top: 44px; text-align: right;
}

/* ---------- 9. 栞:色面サムネ(写真の代わり。雑誌の中扉風) ---------- */
.shiori-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 640px) { .shiori-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }

.shiori-card { text-decoration: none; color: inherit; display: block; }
.shiori-card .plate {
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
}
.shiori-card .plate span {
  font-family: var(--serif);
  color: var(--paper);
  font-size: 14px; line-height: 2; letter-spacing: .1em;
  text-align: center;
}
.shiori-card .meta { font-size: 10px; color: var(--sub); letter-spacing: .15em; margin-top: 12px; }
.shiori-card .title { font-size: 12.5px; margin-top: 6px; color: var(--ink); }

/* カテゴリ色 (スラッグ: words / impression / express / all) */
.plate--words      { background: var(--cat-kotoba); }
.plate--impression { background: var(--cat-insho);  }
.plate--express    { background: var(--cat-tsutae); }
.plate--all        { background: var(--cat-zentai); }

/* カテゴリ凡例 */
.cat-legend { text-align: center; font-size: 11px; letter-spacing: .15em; }
.cat-legend span { display: inline-block; margin: 0 10px; }
.cat-legend i {
  display: inline-block; width: 9px; height: 9px; margin-right: 6px;
  vertical-align: baseline;
}

/* ---------- 10. 朱の手書きNEW(編集者のペンの跡。新着のみ) ---------- */
/* SVGごと henshushitsu-components.html からコピーして使う */
.new-mark { position: absolute; left: -84px; top: -6px; width: 72px; height: 38px; overflow: visible; }
@media (max-width: 640px) { .new-mark { left: -8px; top: -22px; width: 56px; } }

/* ---------- 11. 柱・奥付(本の様式) ---------- */
.hashira {
  position: fixed;
  top: 90px; right: 18px;
  writing-mode: vertical-rl;
  font-size: 9px; letter-spacing: .4em; color: var(--sub);
  z-index: 5;
}
@media (max-width: 640px) { .hashira { display: none; } }

.okuduke {
  padding: 60px 24px 48px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.okuduke .rule { width: 36px; border: 0; border-top: 1px solid var(--ink); margin: 0 auto 28px; }
.okuduke .row  { font-size: 10.5px; letter-spacing: .2em; color: var(--body); line-height: 2.4; }
.okuduke .row .k { color: var(--sub); margin-right: 14px; }

/* ---------- 12. フォーム(はじめましての相談) ---------- */
.soudan-form { max-width: 440px; margin: 0 auto; }
.soudan-form label {
  display: block;
  font-size: 11px; letter-spacing: .1em; color: var(--body);
  margin: 22px 0 8px;
}
.soudan-form label small { display: block; font-size: 9.5px; color: var(--sub); margin-top: 4px; }
.soudan-form input[type="text"],
.soudan-form input[type="email"],
.soudan-form textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 13px 14px;
  font-family: var(--sans); font-size: 13px; color: var(--ink);
  border-radius: 0; /* 角丸にしない */
}
.soudan-form input:focus,
.soudan-form textarea:focus { outline: none; border-color: var(--ink); }
.soudan-form .checks { line-height: 2.6; font-size: 12.5px; color: var(--body); }
.soudan-form .submit { text-align: center; margin-top: 36px; }

/* ---------- 13. SVG線画の描画アニメ ---------- */
/* JS(components参照)が .is-inview を付けたら糸が描かれる */
.draw-path {
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 2000);
  stroke-dashoffset: var(--len, 2000);
}
.is-inview .draw-path {
  animation: draw 2.4s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* イラスト本体(人・机)は向き不問でフェードイン */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 1s ease, transform 1s ease; }
.is-inview.fade-in, .is-inview .fade-in { opacity: 1; transform: none; }

/* 動きが苦手な人への配慮(必須) */
@media (prefers-reduced-motion: reduce) {
  .draw-path { stroke-dashoffset: 0 !important; animation: none !important; }
  .fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .verbs::after { height: calc(100% - 68px); }
}
