/* ==========================================================================
   基礎スタイル：リセット・タイポグラフィ・共通部品
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "palt" 1;   /* 日本語の詰め組み */
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* overflow-x: hidden は position:sticky を壊すため使わない。
     はみ出しは各セクション側で抑える。 */;
}
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd { margin: 0; }
/* 日本語の禁則を厳しめに。見出しは行末の座りを整える。 */
h1,
h2,
h3,
h4,
p,
li,
blockquote {
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
  /* 最終行に1〜2文字だけ残る（「…意味しま／す」）のを避ける。
     見出しは後段の balance が勝つのでここでは効かせない。 */
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
.epigraph span,
.steps__title,
.doc__title,
.person__name,
.entry__name,
.plan__name { text-wrap: balance; word-break: auto-phrase; }
/* 短い列挙や説明も文節で折る（「役不足」→「役不／足」のような分断を防ぐ） */
.trouble li,
.person__bio,
.ability__desc,
.pullquote p { text-wrap: pretty; word-break: auto-phrase; }
/* auto-phrase 非対応環境は normal にフォールバック */
ul,
ol { padding: 0; list-style: none; }
img,
svg,
canvas { display: block; max-width: 100%; }
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
img { height: auto; }
a { color: inherit; text-decoration: none; }
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
  border-radius: 1px;
}
/* main は「スキップリンクの着地点」としてのみフォーカスを受けるので枠線は出さない
   （出すと本文全体を囲む1万px級の枠になる） */
main:focus-visible { outline: none; }
/* 反転面では明るい真鍮に切り替える（暗地でのコントラスト確保: 6.9:1） */
.section--invert :where(a, button, summary, [tabindex]):focus-visible,
.pricing-panel :where(a, button, summary, [tabindex]):focus-visible,
.site-foot :where(a, button, summary, [tabindex]):focus-visible { outline-color: var(--brass-light); }
::selection { background: var(--ink); color: var(--paper); }
/* --- スキップリンク ------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--sp-4); }
/* --- レイアウト部品 ------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
/* 章として続く節は間隔を詰め、章の切れ目との差をつける */
.section--group { padding-block: clamp(56px, 6.5vw, 108px); }
.section + .section { border-top: 1px solid var(--rule-faint); }
.section--invert {
  background: var(--ink-deep);
  color: var(--paper);
  border-top: 0 !important;
}
.section--invert .section-title { color: var(--paper); }
.section--invert .lede,
.section--invert .prose > p:not([class]) { color: var(--paper-72); }
/* 目次から飛んだときに見出しがヘッダーに隠れないようにする */
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
/* --- セクション見出し ---------------------------------------------------- */
.section-head {
  display: grid;
  gap: var(--sp-5);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  font-weight: 600;
  color: var(--ink-72);
  font-feature-settings: normal;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.eyebrow--group { color: var(--ink-72); }
/* 群の中での位置を示す従属番号。真鍮はページ通し番号（01〜06）に予約する。 */
.eyebrow__sub {
  font-variant-numeric: tabular-nums;
  color: var(--ink-72);
  font-feature-settings: normal;
}
.section--invert .eyebrow__sub { color: var(--paper-52); }
.eyebrow__num {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  color: var(--brass);
}
.section--invert .eyebrow { color: var(--paper-52); }
.section--invert .eyebrow::after { background: var(--rule-invert); }
.section--invert .eyebrow__num { color: var(--brass-light); }
.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: 0.015em;
  font-weight: 600;
  max-width: 22em;
}
.lede {
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--ink-72);
  max-width: var(--measure);
}
/* --- 本文 ---------------------------------------------------------------- */
.prose > p:not([class]) {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-72);
  max-width: var(--measure);
}
.prose > p + p { margin-top: 1.5em; }
.prose strong { color: var(--ink); font-weight: 600; }
.note {
  font-size: var(--fs-xs);
  line-height: 1.85;
  color: var(--ink-72);
}
.section--invert .note { color: var(--paper-52); }
/* --- ボタン -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--brass); border-color: var(--brass); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-control);
  /* 操作部品の境界は3:1以上 */;
}
.btn--ghost:hover { border-color: var(--ink); background: var(--ink-06); }
/* 暗い面（反転セクション・料金パネル・フッター）のボタン */
.section--invert .btn--primary,
.pricing-panel .btn--primary,
.site-foot .btn--primary {
  background: var(--paper);
  color: var(--ink-deep);
  border-color: var(--paper);
}
.section--invert .btn--primary:hover,
.pricing-panel .btn--primary:hover,
.site-foot .btn--primary:hover { background: var(--brass-light); border-color: var(--brass-light); }
.section--invert .btn--ghost,
.pricing-panel .btn--ghost,
.site-foot .btn--ghost { color: var(--paper); border-color: var(--rule-control-invert); }
.section--invert .btn--ghost:hover,
.pricing-panel .btn--ghost:hover,
.site-foot .btn--ghost:hover { border-color: var(--paper); background: var(--paper-10); }
.btn__arrow {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform var(--dur) var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
@media (max-width: 479px) {
  .btn-row { display: grid; }
  .btn-row .btn { width: 100%; }
}
/* --- テキストリンク ------------------------------------------------------
   インライン要素のまま扱う。2行に折り返しても下線と外部リンクアイコンが
   本文から離れない（inline-flex + baseline だとアイコンが1行目に取り残される）。
   縦パディングでタップ領域44pxを確保し、同量の負マージンで版面をずらさない。 */
.link {
  display: inline;
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-sm);
  position: relative;   /* 縦パディングのヒット領域が隣接ブロックに覆われないようにする */
  z-index: 1;
  padding-block: 16px;
  /* 上は負マージンで版面をずらさず、下だけは実体のある余白にする。
     こうしないと44pxのタップ領域が次のブロックに食い込み、タップを奪う。 */
  margin-block: -16px 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.32em;
  text-decoration-color: var(--rule-control);
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
.link:hover { color: var(--brass); text-decoration-color: var(--brass); }
.link__ext {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 6px;
  vertical-align: -0.03em;
  opacity: 0.75;
}
.section--invert .link,
.pricing-panel .link,
.site-foot .link { color: var(--paper); text-decoration-color: var(--rule-control-invert); }
.section--invert .link:hover,
.pricing-panel .link:hover,
.site-foot .link:hover { color: var(--brass-light); text-decoration-color: var(--brass-light); }
/* --- 動きの抑制 ----------------------------------------------------------
   本文は常時表示する。スクロール出現演出は内容理解への寄与がないため使わない。 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
/* --- 印刷 ---------------------------------------------------------------- */
@media print {
  .site-head,
  .to-top { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; }
}

