/* ==========================================================================
   KaitoriAI 総称ページ（/reuse/）
   意図・禁止事項の正本は ./DESIGN.md。色・書体の値の正本は _shared/theme.css
   （このファイルは theme.css の変数を受ける側で、色を作らない）。

   このページの役割は「信用確認の受け皿」。フォーム営業・DM・業界紙で接触した
   相手が「何者か」を確かめに来る面なので、装飾より情報の階層を優先する。
   固有の視覚表現は次の2つ:
     1. ヒーローに実物の画面を3枚ずらして重ねる（会話・受付票・投稿の下書き）
     2. 主力製品を大きな1枚、残り3つを下段の3列にして、序列を面積で見せる
   ========================================================================== */

:root {
  /* 共通テーマの受け取り。ここで色を作らない（DESIGN.md §1） */
  --bg: var(--paper);
  --bg-alt: var(--paper-warm);
  --bg-deep: var(--paper-deep);
  --text: var(--text-on-paper);
  --text-sub: var(--text-on-paper-sub);
  --line: var(--paper-line);

  /* 読ませる文章の行長上限。和文は 40em を超えると行を追いにくい */
  --measure: 38em;
  /* 意味色の淡い面。theme.css は文字色だけを持つので、面はここで薄く作る */
  --ok-veil: rgba(15, 122, 61, 0.10);
  --danger-veil: rgba(192, 57, 43, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%; /* px 固定にするとブラウザの文字サイズ設定を殺す。変えない */
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 和文の組版。禁則を厳格にして行末を安定させる */
p, li, dd, dt, figcaption, label, summary, td, th {
  line-break: strict;
  overflow-wrap: break-word;
}

p { text-wrap: pretty; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

strong { font-weight: 700; color: var(--text); }

::selection { background: var(--accent); color: #ffffff; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 見出しの中で折り返させたくない塊 */
.nw { display: inline-block; }

/* --------------------------------------------------------------------------
   共通レイアウト
   -------------------------------------------------------------------------- */

.section { padding: 104px 24px; }

/* 白と薄地を交互に。境目に罫線を引かず、地の差だけで段を分ける */
.products-section,
.scope-section,
.flow-section,
.faq-section { background: var(--bg-alt); }

.section-heading {
  max-width: var(--max-width);
  margin: 0 auto 56px;
}

.eyebrow {
  font-size: var(--fs-cap);
  font-weight: 700;
  letter-spacing: 0.08em; /* 和文が入るので字間を広げすぎない */
  color: var(--accent-strong);
  margin-bottom: 14px;
}

/* 主色の短い罫。見出しの上に置く印 */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  margin-right: 12px;
  vertical-align: 0.28em;
  background: var(--accent);
}

.section-heading h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.65rem, 3.4vw, 2.4rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.heading-note {
  margin-top: 20px;
  max-width: var(--measure);
  font-size: var(--fs-read);
  color: var(--text);
}

.button {
  /* button 要素は font-family を継承しない。指定しないと和文が OS 標準へ落ちる */
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--fs-read);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover { background: var(--accent-strong); }

.button-ghost {
  border-color: var(--accent-dim);
  color: var(--accent-strong);
  background: var(--paper);
}

.button-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.link-arrow {
  font-size: var(--fs-cap);
  font-weight: 700;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.link-arrow::after { content: " →"; text-decoration: none; }

/* --------------------------------------------------------------------------
   ヘッダー
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease;
}

.site-header[data-elevated="true"] { box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(15, 27, 45, 0.06); }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { border-radius: 8px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
}

.brand-name small {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-sub);
}

.header-nav { display: flex; gap: 24px; margin-left: auto; }
.header-nav a { font-size: var(--fs-cap); font-weight: 500; color: var(--text); }
.header-nav a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 5px; }

.header-cta {
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: var(--fs-cap);
}

.header-cta:hover { background: var(--accent-strong); }

/* --------------------------------------------------------------------------
   ヒーロー
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 156px 24px 104px;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--accent-soft) 0%, rgba(231, 239, 251, 0) 62%),
    var(--paper);
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.5;
  letter-spacing: 0;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-strong);
  /* 強調は主色1色。下線で面を増やさず、線1本にとどめる */
  box-shadow: inset 0 -0.22em 0 var(--accent-soft);
}

.hero .lead {
  max-width: var(--measure);
  font-size: var(--fs-read);
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.trust-strip {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  max-width: 620px;
  overflow: hidden;
}

.trust-strip > div { flex: 1; padding: 16px 18px; min-width: 0; }
.trust-strip > div + div { border-left: 1px solid var(--line); }

.trust-strip dt {
  font-size: var(--fs-label);
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.trust-strip dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

.trust-strip .unit { font-size: 0.6em; margin-left: 2px; }

.trust-strip .sub {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: 0;
}

.trust-note {
  margin-top: 18px;
  max-width: var(--measure);
  font-size: var(--fs-cap);
  line-height: 1.85;
  color: var(--text-sub);
}

.trust-note a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* ---- ヒーローの実物画面（写真素材を使わない。DESIGN.md §3） ---- */

.hero-visual {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: end;
}

.screen {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.screen-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
}

.screen-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
}

.screen-badge {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--fs-label);
  font-weight: 700;
}

.screen-title { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.screen-title strong { font-size: var(--fs-cap); }
.screen-title span { font-size: var(--fs-label); color: var(--text-sub); }
.screen-clock { margin-left: auto; font-weight: 700; font-size: var(--fs-cap); color: var(--text-sub); }

/* LINE のチャット UI。緑はこの中だけ（theme.css の規律） */
.chat-body {
  background: var(--chat-bg);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: var(--fs-label);
  line-height: 1.6;
  color: #1a2330;
}

.msg.bot { align-self: flex-start; background: #ffffff; border-bottom-left-radius: 5px; }
.msg.user { align-self: flex-end; background: var(--line-bubble); border-bottom-right-radius: 5px; }
.msg.photo { background: none; padding: 0; }

.photo-frame {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 136px;
  height: 94px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, #46505d 0%, #2b3440 55%, #212831 100%);
}

.photo-glass {
  position: absolute;
  top: 22px;
  left: 16px;
  width: 100px;
  height: 26px;
  border-radius: 3px;
  background: repeating-linear-gradient(0deg, #e8e8e2 0 4px, #c9c9c2 4px 6px);
  opacity: 0.9;
}

.photo-label {
  position: relative;
  width: 100%;
  padding: 3px 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(10, 19, 32, 0.6);
}

/* 電話の受付票 */
.receipt { padding: 6px 16px 14px; }
.receipt > div { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.receipt > div:last-child { border-bottom: none; }
.receipt dt { flex: none; width: 4.5em; font-size: var(--fs-label); font-weight: 700; color: var(--text-sub); }
.receipt dd { font-size: var(--fs-cap); }

/* 実績投稿の下書き */
.post-body { display: flex; gap: 14px; padding: 14px 16px 16px; }

.post-thumb {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--paper-deep) 0%, #d6dfeb 100%);
  border: 1px solid var(--line);
}

.post-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.post-title { font-size: var(--fs-cap); font-weight: 700; }
.post-line { display: block; height: 8px; border-radius: 4px; background: var(--paper-deep); }
.post-line.short { width: 62%; }

.post-state {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ok-veil);
  color: var(--ok-ink);
  font-size: var(--fs-label);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   スクロールリビール
   -------------------------------------------------------------------------- */

.js .section:not(.hero) {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.js .section[data-visible="true"] { opacity: 1; transform: translateY(0); }

/* --------------------------------------------------------------------------
   製品（序列を面積で見せる。4つを同じ大きさで横に並べない）
   -------------------------------------------------------------------------- */

.product-lead {
  max-width: var(--max-width);
  margin: 0 auto 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  padding: 44px 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.product-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: var(--fs-label);
  font-weight: 700;
}

.product h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.45;
  margin-bottom: 14px;
}

.product h3 small {
  font-size: var(--fs-cap);
  font-weight: 500;
  color: var(--text-sub);
}

.product-lead-text { font-size: var(--fs-read); max-width: var(--measure); }

.product-points { margin-top: 18px; display: grid; gap: 8px; }

.product-points li {
  position: relative;
  padding-left: 24px;
  font-size: var(--fs-body);
}

.product-points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.82em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.product-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.product-label {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.5;
}

.product-label.is-proven { background: var(--ok-veil); color: var(--ok-ink); }
.product-label.is-demo { background: var(--accent-soft); color: var(--accent-strong); }
.product-label.is-planned { background: var(--bg-deep); color: var(--text); }
.product-label.is-scoping { border: 1px solid var(--line); color: var(--text-sub); }

.product-note { font-size: var(--fs-label); color: var(--text-sub); }

.product-figure {
  padding: 30px 28px;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
}

.figure-metric { display: flex; flex-direction: column; gap: 8px; }

.figure-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1.05;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

.figure-unit { font-size: 0.45em; margin-left: 2px; }

.figure-label { font-size: var(--fs-body); font-weight: 700; }
.figure-label span { display: block; font-weight: 500; font-size: var(--fs-cap); color: var(--text-sub); }

.figure-note { margin-top: 18px; font-size: var(--fs-cap); color: var(--text-sub); line-height: 1.8; }
.figure-note a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

.product-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-sub {
  padding: 30px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.product-sub h3 { font-size: 1.2rem; }
.product-sub p { font-size: var(--fs-body); }
.product-sub .product-actions { margin-top: auto; padding-top: 22px; }

/* --------------------------------------------------------------------------
   実測（数値は表で出す。1つの巨大な数字より、比較の形のほうが疑われない）
   -------------------------------------------------------------------------- */

.case-table-wrap { max-width: var(--max-width); margin: 0 auto; overflow-x: auto; }

.case-table {
  width: 100%;
  min-width: 660px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-body);
}

.case-table caption {
  text-align: left;
  font-size: var(--fs-cap);
  color: var(--text-sub);
  padding-bottom: 12px;
}

.case-table th,
.case-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.case-table thead th {
  font-size: var(--fs-cap);
  color: var(--text-sub);
  border-bottom: 2px solid var(--line);
}

.case-table tbody th { font-weight: 700; }
.case-table td { font-variant-numeric: tabular-nums; }

.case-table .is-ours { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.case-table thead .is-ours { color: var(--accent-strong); }

.case-notes { max-width: var(--max-width); margin: 32px auto 0; display: grid; gap: 16px; }
.case-notes p { max-width: var(--measure); font-size: var(--fs-cap); line-height: 1.9; color: var(--text-sub); }
.case-notes strong { color: var(--text); }
.case-source a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   できること・やらないこと
   -------------------------------------------------------------------------- */

.scope-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.scope-card {
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.scope-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 18px; }
.scope-card.can { border-top: 3px solid var(--ok); }
.scope-card.can h3 { color: var(--ok-ink); }
.scope-card.cannot { border-top: 3px solid var(--danger); background: var(--paper); }
.scope-card.cannot h3 { color: var(--danger-ink); }

.scope-card li {
  position: relative;
  padding: 10px 0 10px 26px;
  font-size: var(--fs-body);
  border-bottom: 1px solid var(--line);
}

.scope-card li:last-child { border-bottom: none; }

.scope-card li::before {
  position: absolute;
  left: 2px;
  top: 10px;
  font-weight: 700;
}

.scope-card.can li::before { content: "○"; color: var(--ok-ink); }
.scope-card.cannot li::before { content: "×"; color: var(--danger-ink); }

/* --------------------------------------------------------------------------
   比較表
   -------------------------------------------------------------------------- */

.compare-scroll { max-width: var(--max-width); margin: 0 auto; overflow-x: auto; }

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-body);
}

.compare-table th,
.compare-table td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.compare-table thead th { font-size: var(--fs-cap); color: var(--text-sub); border-bottom: 2px solid var(--line); }
.compare-table tbody th { width: 12em; font-weight: 700; }
.compare-table .is-ours { background: var(--accent-soft); }
.compare-table thead .is-ours { color: var(--accent-strong); font-weight: 700; }

.compare-note {
  max-width: var(--max-width);
  margin: 24px auto 0;
  font-size: var(--fs-cap);
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   料金 / 導入の流れ
   -------------------------------------------------------------------------- */

.pricing-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.price-card {
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.price-card h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 12px; color: var(--accent-strong); }
.price-card p { font-size: var(--fs-body); }

.pricing-note { max-width: 900px; margin: 24px auto 0; font-size: var(--fs-cap); color: var(--text-sub); }

.flow-steps {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.flow-steps li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 20px;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-cap);
  letter-spacing: 0.12em;
  color: var(--accent);
}

.flow-steps h3 { font-size: var(--fs-card); margin: 8px 0 8px; }
.flow-steps p { font-size: var(--fs-cap); color: var(--text-sub); line-height: 1.8; }

/* --------------------------------------------------------------------------
   記事（トップの抜粋。一覧は /reuse/articles/）
   -------------------------------------------------------------------------- */

.article-list {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-list > li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease;
}

.article-list > li:hover { border-color: var(--accent-dim); }

.article-list a { display: block; padding: 26px 24px; height: 100%; }
.article-list time { font-size: var(--fs-label); color: var(--text-sub); font-variant-numeric: tabular-nums; }

.article-list h3 {
  margin: 10px 0 10px;
  font-family: var(--font-display);
  font-size: var(--fs-card);
  line-height: 1.6;
  color: var(--accent-strong);
}

.article-list p { font-size: var(--fs-cap); color: var(--text-sub); }

.article-empty {
  grid-column: 1 / -1;
  padding: 26px 24px;
  font-size: var(--fs-body);
  color: var(--text-sub);
}

.articles-more { max-width: var(--max-width); margin: 26px auto 0; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-list { max-width: 820px; margin: 0 auto; }
.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 22px 48px 22px 0;
  font-weight: 700;
  font-size: var(--fs-body);
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.faq-list details p {
  padding: 0 0 22px;
  font-size: var(--fs-body);
  max-width: var(--measure);
}

.faq-list details p a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   問い合わせフォーム（3状態: 送信中disabled / 成功トースト / 失敗メッセージ）
   -------------------------------------------------------------------------- */

.contact-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.contact-copy h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.65rem, 3.4vw, 2.4rem);
  line-height: 1.5;
  margin-bottom: 20px;
}

.contact-copy p { font-size: var(--fs-read); margin-bottom: 14px; max-width: var(--measure); }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 36px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form > label { display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-cap); font-weight: 700; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: var(--fs-read); /* 入力欄は17px以上。小さいとスマホで拡大ズームが起きる */
  padding: 13px 15px;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--text);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form textarea { resize: vertical; }

.contact-form fieldset {
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 14px 16px 12px;
}

.contact-form legend { font-size: var(--fs-cap); font-weight: 700; padding: 0 8px; }

.contact-form fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: var(--fs-body);
  font-weight: 500;
  cursor: pointer;
}

.contact-form input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; padding: 0; flex: none; }

.form-error { min-height: 1.2em; font-size: var(--fs-cap); color: var(--danger-ink); font-weight: 700; }
.submit-button { width: 100%; padding: 17px; }
.submit-button:disabled { opacity: 0.6; cursor: wait; }
.form-privacy { font-size: var(--fs-cap); color: var(--text-sub); line-height: 1.8; }
.form-privacy a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   フッター / フローティングCTA / トースト
   -------------------------------------------------------------------------- */

.site-footer {
  padding: 52px 24px 36px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}

.site-footer .brand, .footer-note, .footer-meta { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.site-footer .brand { display: flex; margin-bottom: 20px; }

.footer-note {
  display: block;
  font-size: var(--fs-cap);
  line-height: 1.9;
  color: var(--text-sub);
  margin-bottom: 26px;
  max-width: 62em;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.footer-meta nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: var(--fs-cap); }
.footer-meta nav a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 4px; }
.copyright { font-size: var(--fs-label); color: var(--text-sub); }

.floating-cta {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: var(--fs-cap);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-cta[data-visible="true"] { opacity: 1; transform: translateY(0); pointer-events: auto; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 70;
  max-width: min(92vw, 520px);
  background: var(--ink);
  color: var(--text-on-dark);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  font-size: var(--fs-cap);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast[data-visible="true"] { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   記事ページ / 記事一覧 / プライバシーポリシー
   -------------------------------------------------------------------------- */

.doc-hero {
  padding: 148px 24px 44px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, rgba(231, 239, 251, 0) 100%);
}

.doc-hero > div { max-width: 760px; margin: 0 auto; }

.doc-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  line-height: 1.55;
  margin-bottom: 14px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: var(--fs-cap);
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.doc-lead { margin-top: 16px; font-size: var(--fs-read); }

.doc-body { max-width: 760px; margin: 0 auto; padding: 20px 24px 80px; }

.doc-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.6;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-dim);
}

.doc-body h3 { font-family: var(--font-display); font-size: var(--fs-card); margin: 32px 0 12px; }
.doc-body p { margin-bottom: 20px; font-size: var(--fs-read); }
.doc-body ul, .doc-body ol { margin: 0 0 20px; }

.doc-body li {
  position: relative;
  padding: 5px 0 5px 24px;
  font-size: var(--fs-read);
}

.doc-body ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 1em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.doc-body ol { counter-reset: doc-ol; }
.doc-body ol li { counter-increment: doc-ol; }
.doc-body ol li::before {
  content: counter(doc-ol) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--accent-strong);
}

.doc-body a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

.doc-body blockquote {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--paper-warm);
  font-size: var(--fs-body);
}

.doc-body blockquote p:last-child { margin-bottom: 0; }

.doc-table-wrap { overflow-x: auto; margin-bottom: 20px; }

.doc-body table {
  width: 100%;
  min-width: 480px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-body);
}

.doc-body th, .doc-body td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-body thead th { font-size: var(--fs-cap); color: var(--text-sub); border-bottom: 2px solid var(--line); }

.doc-body code {
  font-family: "SFMono-Regular", Consolas, "Courier New", var(--font-body);
  font-size: 0.94em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--paper-deep);
}

.doc-body hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

.doc-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.doc-back { font-size: var(--fs-cap); font-weight: 700; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 4px; }

/* 記事一覧 */
.index-list { max-width: 860px; margin: 0 auto; padding: 20px 24px 80px; display: grid; gap: 18px; }

.index-list > li {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.index-list a { display: block; padding: 26px 28px; }
.index-list time { font-size: var(--fs-label); color: var(--text-sub); font-variant-numeric: tabular-nums; }

.index-list h2 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: var(--fs-card);
  line-height: 1.6;
  color: var(--accent-strong);
}

.index-list p { font-size: var(--fs-cap); color: var(--text-sub); }
.index-empty { padding: 26px 28px; font-size: var(--fs-body); color: var(--text-sub); }

/* プライバシーポリシー（スケルトン由来のクラス名を維持する） */
.policy-hero { padding-top: 148px; }
.policy-hero > div { max-width: 760px; margin: 0 auto; }
.policy-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin-bottom: 16px; }
.policy-updated { margin-top: 14px; font-size: var(--fs-cap); color: var(--text-sub); }
.policy-content { max-width: 760px; margin: 0 auto; }
.policy-content article { margin-bottom: 40px; }
.policy-content h2 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--accent-dim); }
.policy-content p, .policy-content li { font-size: var(--fs-body); color: var(--text); }
.policy-content p { margin-bottom: 14px; }
.policy-content li { padding: 6px 0 6px 22px; position: relative; }
.policy-content li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.policy-content a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   レスポンシブ / reduced-motion（削らない）
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { justify-items: stretch; }
  .screen { max-width: none; }
  .product-lead { grid-template-columns: 1fr; gap: 28px; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
  .article-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .header-nav { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .scope-grid, .pricing-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .article-list { grid-template-columns: 1fr; }
  .trust-strip { flex-wrap: wrap; }
  .trust-strip > div { flex: 1 1 45%; }
  .trust-strip > div:nth-child(3) { flex-basis: 100%; border-left: none; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .section { padding: 72px 20px; }
  .hero { padding: 128px 20px 76px; }
  .hero-actions .button { width: 100%; }
  .product-lead { padding: 30px 22px; }
  .product-sub { padding: 26px 22px; }
  .contact-form { padding: 28px 22px; }
  .flow-steps { grid-template-columns: 1fr; }
  .footer-meta { flex-direction: column; align-items: flex-start; }
  .trust-strip > div { flex-basis: 100%; border-left: none; }
  .trust-strip > div + div { border-top: 1px solid var(--line); }
  .doc-body, .index-list, .doc-foot { padding-left: 20px; padding-right: 20px; }
}

/* 極小幅。本文は縮めず、固定幅になりやすい要素だけを詰めて横溢れを防ぐ */
@media (max-width: 420px) {
  .site-header { padding: 12px 14px; gap: 10px; }
  .brand-name { font-size: 1.05rem; }
  .brand-name small { font-size: 0.8125rem; }
  .header-cta { padding: 9px 14px; font-size: var(--fs-label); }
  .section { padding: 64px 16px; }
  .hero { padding: 120px 16px 68px; }
  .floating-cta { right: 12px; padding: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .section:not(.hero) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
