@charset "utf-8";

/* ==========================================================================
   style.css — 各セクションの見た目
   index.html に出てくる順番どおりに並べています。
   ========================================================================== */


/* --------------------------------------------------------------------------
   ページ全体（方眼紙の背景）
   -------------------------------------------------------------------------- */
.page {
  min-height: 100vh;
  background-color: var(--bg);
  /* 24px 間隔の方眼。横線と縦線を重ねて描いています */
  background-image:
    repeating-linear-gradient(var(--line) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 24px);
}


/* ==========================================================================
   ヘッダー
   ========================================================================== */
/* スクロールしても画面上部に貼り付く（追従ヘッダー）。
   背景を不透明にしておかないと、下の内容が透けます。 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
}

/* メニューから飛んだとき、見出しが追従ヘッダーの下に隠れないようにする。
   ヘッダーの高さ（--header-h）＋ 少し余白 の分だけ、手前で止めます。
   ヘッダーの高さは画面幅で変わるので、変数にまとめて管理しています
   （スマホ用の値はこのファイルの一番下、640px以下の指定にあります）。 */
:root {
  --header-h: 73px;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.site-header__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.logo__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.logo__en {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
}

.gnav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
}

/* 「点検／票」のように項目の途中で折り返さないようにする */
.gnav a {
  white-space: nowrap;
}


/* ==========================================================================
   ヒーロー（ファーストビュー）
   ========================================================================== */
.hero {
  padding-top: 72px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: start;
}

.hero__lead {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-head);
  font-weight: 900;
  /* 画面幅に合わせて 32px（スマホ）〜 48px（PC）まで、なめらかに変化します。
     rem を混ぜているのは、ブラウザの文字サイズ設定を無効にしないためです。 */
  font-size: clamp(2rem, 1.5rem + 1.75vw, 3rem);
  line-height: 1.3;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  text-wrap: pretty;
}

.hero__text {
  font-size: 16px;
  line-height: 2;
  margin-bottom: 32px;
  max-width: 34em;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* --- 右側の答案用紙カード --- */
.answer-sheet {
  border: 1px solid var(--ink);
  background: var(--bg);
}

.answer-sheet__head {
  background: var(--green);
  color: var(--bg);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

.answer-sheet__body {
  padding: 22px 20px;
}

.answer-sheet__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.stuck-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 「01 ○○○」の1項目 */
.stuck {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 14px;
}

.stuck--last {
  border-bottom: 0;
  padding-bottom: 0;
}

.stuck__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--red);
  font-weight: 700;
}

.stuck__title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.stuck__desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--gray);
}


/* ==========================================================================
   01 点検票
   ========================================================================== */

/* --- 数値サマリー（4つ並ぶ枠） --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;                    /* すき間の1pxが仕切り線になります */
  background: var(--line);
  border: 1px solid var(--ink);
  margin-bottom: 40px;
}

.kpi {
  background: var(--bg);
  padding: 20px;
}

.kpi__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 10px;
}

.kpi__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.kpi__note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
}

.kpi__note--good  { color: var(--green); }
.kpi__note--alert { color: var(--red); }

/* --- 凡例（● 設定済 ▲ 改善中 ○ 未着手） --- */
.legend {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend__item .mark {
  font-size: 15px;
}

.legend__count {
  font-family: var(--font-mono);
  color: var(--gray);
}

/* --- 点検項目の表 --- */
.check-table tbody { font-size: 13.5px; }

.check-table .col-state { width: 64px; }
.check-table .col-memo  { width: 34%; }

.cell-memo {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
}

.cell-memo--alert { color: var(--red); }

/* 表の中の赤い指摘メモ
   項目名と同じ行に続けると「お客様の声の掲載指摘：…」のように
   1つの文として読めてしまうため、行を分けて出します。
   width:fit-content は、赤い下線を文字の長さで止めるためです
   （block のままだとセルの端まで線が伸びてしまいます）。 */
.note-red {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 11px;
  border-bottom: 1px solid var(--red);
}

.table-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray);
  margin-top: 14px;
}


/* ==========================================================================
   02 できること（カード3枚）
   ========================================================================== */

/* 3列に並べる共通の枠。すき間の1pxが仕切り線になります */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.card {
  background: var(--bg);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}

/* 右下に薄く置く図形（四角・丸・ひし形） */
.card__deco {
  position: absolute;
  border: 14px solid var(--green);
  opacity: 0.07;
  pointer-events: none;
}

.card__deco--square  { right: -40px; bottom: -40px; width: 200px; height: 200px; }
.card__deco--circle  { right: -30px; bottom: -50px; width: 180px; height: 180px; border-radius: 50%; }
.card__deco--diamond { right: -30px; bottom: -45px; width: 170px; height: 170px; transform: rotate(45deg); }

.card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  margin-bottom: 14px;
  position: relative;   /* 図形より前に出す */
}

.card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  position: relative;
}

.card__text {
  font-size: 13.5px;
  line-height: 2;
  margin-bottom: 16px;
  position: relative;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  position: relative;
}


/* ==========================================================================
   03 料金
   ========================================================================== */

/* --- 料金の全体像の表 --- */
.price-table tbody { font-size: 14px; }
.price-table td    { padding: 16px; }

.price-table .col-no    { width: 56px; }
.price-table .col-term  { width: 22%; }
.price-table .col-price { width: 22%; }

.cell-no {
  font-family: var(--font-mono);
  color: var(--gray);
}

.cell-strong { font-weight: 700; }

.cell-term {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray);
}

.cell-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
}

/* 「都度お見積り」だけ日本語フォント */
.cell-price--jp {
  font-family: var(--font-body);
  font-size: 15px;
}

/* --- 中見出し --- */
.sub-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.sub-title--mb { margin-bottom: 24px; }

.sub-title__price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
}

.sub-note {
  font-size: 13.5px;
  line-height: 2;
  margin-bottom: 24px;
  color: var(--gray);
}

/* --- 3列に並ぶ白いパネル --- */
.panel {
  background: var(--bg);
  padding: 24px 22px;
}

.panel__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  margin-bottom: 14px;
}

.panel__label--alert { color: var(--red); }

.panel__list {
  padding-left: 1.1em;
  list-style: disc;
  font-size: 13.5px;
  line-height: 2.1;
}

.panel__text {
  font-size: 13.5px;
  line-height: 2;
  margin-bottom: 10px;
}

.panel__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
}

/* --- 保守プランの比較表 --- */
.plan-table tbody { font-size: 13.5px; }

.plan-table .col-plan      { width: 40%; }
.plan-table .col-plan-name { width: 20%; }

.plan-table th {
  padding: 14px 16px;
}

/* プラン名の列だけ日本語の見出しフォント */
.plan-table .col-plan-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

/* 月額の行は下線を濃くする */
.plan-table .row-price {
  border-bottom: 1px solid var(--ink);
}

.plan-table .row-price td { padding: 16px; }

.cell-plan-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
}

.cell-none { color: var(--gray); }

.cell-cond {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* --- お約束していること／していないこと --- */
.promise {
  border: 1px solid var(--ink);
  padding: 24px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.promise__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.promise__title--alert { color: var(--red); }


/* ==========================================================================
   04 進め方
   ========================================================================== */
.flow {
  position: relative;
}

/* 5つのステップの上を横切る1本線 */
.flow__rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 17px;
  height: 1px;
  background: var(--ink);
}

.flow__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
}

.step__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex: 0 0 auto;
}

.step__num {
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.step__bar {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

/* 次のステップへ向かう小さい三角形 */
.step__arrow {
  width: 0;
  height: 0;
  border-left: 8px solid var(--ink);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.step__title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}

.step__desc {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--gray);
  margin-bottom: 12px;
}

/* margin-top:auto で、カードの高さが違っても下端にそろえます */
.step__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--green);
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}


/* ==========================================================================
   05 自己紹介
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}

/* 顔写真の枠（斜線のプレースホルダー）
   ※ 現在は下の .portrait__img で画像を表示しているため未使用。
      画像をやめて枠だけに戻したいときに使います。 */
.portrait {
  border: 1px solid var(--ink);
  height: 380px;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(135deg, var(--line) 0 6px, var(--bg) 6px 12px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.portrait__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 6px 10px;
}

/* 写真に差し替えたときのスタイル */
.portrait__img {
  border: 1px solid var(--ink);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about__en {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 28px;
}

.about__text {
  font-size: 15px;
  line-height: 2.1;
  margin-bottom: 20px;
  max-width: 38em;
  text-wrap: pretty;
}

.about__text--last { margin-bottom: 28px; }

/* 実績の数字3つ */
.facts {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.fact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 8px;
}

.fact__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 26px;
}


/* ==========================================================================
   06 記録（ブログ記事カード）
   ========================================================================== */
.journal-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.all-posts {
  font-family: var(--font-mono);
  font-size: 12px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.all-posts:hover { border-bottom-color: var(--red); }

/* 対角線の位置を記憶する変数。
   ふつうの CSS 変数はアニメーションできませんが、@property で「これは％の値だ」と
   ブラウザに教えておくと、transition でなめらかに動かせるようになります。 */
@property --post-cut {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}

.post {
  background: var(--bg);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  position: relative;
  isolation: isolate;   /* 背景画像を下に潜り込ませるための指定 */

  --post-cut: 50%;      /* 通常時：カードのちょうど中央 */
  transition: --post-cut 0.2s ease-out, background-color 0.15s ease-out;
}

/* マウスを乗せると対角線が左下へスライドし、写真が少し広がります */
.post:hover {
  background: var(--hover-bg);
  color: var(--ink);
  --post-cut: 43%;
}

/* 動きを控えたい設定にしている人には、アニメーションを出さない */
@media (prefers-reduced-motion: reduce) {
  .post        { transition: background-color 0.15s ease-out; }
  .post:hover  { --post-cut: 50%; }
}

/* --- アイキャッチは2層構造 ---
   1層目（.post__bg）: 斜線パターンをカード全面に敷く
   2層目（.post__img）: 写真を対角線で切り抜き、右上側だけ重ねる
   → 左下側には1層目の斜線がそのまま見えます。 */

/* 1層目：斜線パターン（左下側だけ表示。右上側は写真が乗るので消す） */
.post__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: var(--post-stripe-opacity);   /* 濃さの調整は base.css で */
  background-image: repeating-linear-gradient(135deg, var(--line) 0 6px, var(--bg) 6px 12px);
  -webkit-mask-image: linear-gradient(45deg, #000 var(--post-cut), transparent var(--post-cut));
          mask-image: linear-gradient(45deg, #000 var(--post-cut), transparent var(--post-cut));
}

/* 2層目：写真（対角線でクリップ） */
.post__img {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: var(--post-photo-opacity);    /* 濃さの調整は base.css で */
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* 45度ぴったりの対角線で切り抜きます。
     斜線パターンが135度なので、それと直角に交わって境目がはっきり出ます。
     写真＝右上側、斜線＝左下側。逆にしたい場合は #000 と transparent を入れ替えてください。 */
  -webkit-mask-image: linear-gradient(45deg, transparent var(--post-cut), #000 var(--post-cut));
          mask-image: linear-gradient(45deg, transparent var(--post-cut), #000 var(--post-cut));
}

/* カード内の文字は、下に写真が敷かれるぶん薄く見えます。
   グレーではなく本文色（濃紺）を使って、はっきり読めるようにしています。 */
.post__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  margin-bottom: 16px;
}

.post__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.04em;
  line-height: 1.9;   /* ホバー時のバー同士が上下でくっつかないよう、通常より広め */
  margin-bottom: 12px;

}

/* マウスを乗せたときだけ、テーマカラーのバーを敷いて白抜きにする。
   行ごとにバーが付くよう、中の <span> に背景を持たせています。 */
.post__title > span {
  color: var(--ink);
  padding: 4px 0;
  /* 2行以上に折り返したとき、行ごとに背景を付ける指定。
     これがないと、折り返し部分の背景が途切れます。 */
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
  transition: background-color 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.post:hover .post__title > span {
  background: var(--green);
  color: var(--bg);
  /* バーを文字の左右に8pxずつはみ出させます。
     padding ではなく影を使うのは、文字の位置をずらさないためです
     （padding だと日付や本文と左端がそろわなくなります）。 */
  box-shadow: -8px 0 0 var(--green), 8px 0 0 var(--green);
}

/* 日付・説明文・READ にも、ホバー時に白いバーを敷く。
   タイトルと同じ作りで、色だけ白にしています。 */
.post__date > span,
.post__desc > span,
.post__read > span {
  padding: 3px 0;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
  transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.post:hover .post__date > span,
.post:hover .post__desc > span,
.post:hover .post__read > span {
  background: var(--bg);
  box-shadow: -8px 0 0 var(--bg), 8px 0 0 var(--bg);
}

.post__desc {
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 20px;
}

.post__read {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}


/* ==========================================================================
   07 お問い合わせ
   ========================================================================== */
.contact {
  border-top: 1px solid var(--ink);
  background: var(--green);
  color: var(--bg);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact__text {
  font-size: 14.5px;
  line-height: 2.1;
  margin-bottom: 28px;
  color: var(--on-green-text);
  max-width: 30em;
}

.contact-list {
  border-top: 1px solid var(--on-green-line);
  padding-top: 20px;
  display: grid;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--on-green-text);
}

.contact-list a {
  color: var(--on-green-text);
  border-bottom: 1px solid var(--on-green-line);
}

.contact-list a:hover {
  color: var(--bg);
  border-bottom-color: var(--bg);
}

/* --- フォームの白いカード --- */
.form-card {
  background: var(--bg);
  color: var(--ink);
  padding: 28px;
  border: 1px solid var(--ink);
}

.form-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 20px;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea {
  border: 1px solid var(--ink);
  background: var(--bg);
  padding: 12px;
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  width: 100%;
}

/* URL・メールアドレス欄は等幅フォント */
.field .input-mono { font-family: var(--font-mono); }

.field textarea { resize: vertical; }

/* キーボード操作でどこを選んでいるか分かるようにする */
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.btn-submit {
  background: var(--green);
  color: var(--bg);
  border: 0;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: -0.02em;
  cursor: pointer;
}

.btn-submit:hover { background: var(--red); }

.form__note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
}


/* ==========================================================================
   フッター
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--ink);
  background: var(--bg);
}

.site-footer__inner {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.04em;
}

.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray);
}


/* ==========================================================================
   画面幅に合わせた調整（タブレット・スマートフォン）
   ========================================================================== */

/* --- タブレット（横幅 960px 以下） --- */
@media (max-width: 960px) {

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
  }

  .kpi-grid    { grid-template-columns: repeat(2, 1fr); }
  .grid-3      { grid-template-columns: 1fr 1fr; }
  .about       { grid-template-columns: 1fr; gap: 32px; }
  .portrait    { height: 320px; }
  .contact__inner { grid-template-columns: 1fr; gap: 36px; }
  .promise     { grid-template-columns: 1fr; gap: 24px; }

  /* 進め方は2列に折り返す（横線は消す） */
  .flow__rail  { display: none; }
  .flow__steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }

  /* メニューが横1列に収まらなくなるので、ロゴとメニューを2段に分ける */
  .site-header__inner {
    height: auto;
    flex-wrap: wrap;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 14px;
  }

  .gnav { gap: 20px; flex-wrap: wrap; }
}


/* --- スマートフォン（横幅 640px 以下） --- */
@media (max-width: 640px) {

  /* スマホではメニューが2段に折り返すぶん、ヘッダーが高くなります */
  :root { --pad-x: 18px; --header-h: 148px; }

  .section-inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  /* ヘッダーはさらに詰める（2段にする指定は 960px 以下で適用済み） */
  .gnav {
    gap: 16px;
    font-size: 12.5px;
  }

  .section-title { font-size: 26px; }
  .sub-title     { font-size: 19px; }

  .kpi-grid    { grid-template-columns: 1fr; }
  .grid-3      { grid-template-columns: 1fr; }
  /* --- 進め方：スマホでは番号とバーを左に縦並びにする ---
       [01]  お問い合わせ
        │    URLとお困りごとを…
        ▼    無料
       という、上から下へ流れる形にします。 */
  .flow__steps { grid-template-columns: 1fr; gap: 22px; }

  .step {
    display: grid;
    grid-template-columns: 36px 1fr;   /* 左＝番号とバー / 右＝文章 */
    grid-template-rows: auto auto auto;
    column-gap: 16px;
  }

  /* 左の列。文章3行ぶんの高さいっぱいに伸ばす */
  .step__head {
    grid-column: 1;
    grid-row: 1 / span 3;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
  }

  /* バーを横線から縦線に。
     色は方眼の罫線と同じだと埋もれてしまうので、矢印と同じ濃さにします */
  .step__bar {
    width: 1px;
    height: auto;
    min-height: 16px;
    background: var(--ink);
  }

  /* 矢印を下向きに倒す */
  .step__arrow { transform: rotate(90deg); }

  /* 右の列に文章を縦に並べる。
     料金の上の区切り線は、横並びのときの名残で浮くので消します */
  .step__title { grid-column: 2; grid-row: 1; }
  .step__desc  { grid-column: 2; grid-row: 2; }
  .step__meta  {
    grid-column: 2;
    grid-row: 3;
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
  }
  .facts       { gap: 24px; }
  .portrait    { height: 260px; }

  /* 見出しのサイズは上の clamp() が自動で調整するため、ここでの指定は不要 */
  /* --- 保守プランの表：スマホでは1項目ずつのブロックに組み替える ---
       ┌────────────────────────────┐
       │ 軽微な修正・更新代行        │
       │ ライト   標準      しっかり  │
       │  —     月2件まで  月5件まで  │
       └────────────────────────────┘
     横スクロールなしで、3プランを並べて見比べられます。
     プラン名は各セルの data-label 属性から CSS が書き出しています。 */
  .plan-table {
    display: block;
    min-width: 0;          /* 横スクロール用の下限を解除 */
    border: 0;
  }

  .plan-table thead { display: none; }   /* 見出し行は各行に出るので不要 */
  .plan-table tbody { display: block; }

  /* 枠線はなし。項目名の緑の帯が区切りの役目をします */
  .plan-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg);
  }

  /* 項目名はテーマカラーの帯にして白抜きに */
  .plan-table tbody td:first-child {
    grid-column: 1 / -1;
    font-weight: 700;
    padding: 10px 12px;
    background: var(--green);
    color: var(--bg);
  }

  /* 3プランの値を横並びに */
  .plan-table tbody td:not(:first-child) {
    text-align: center;
    padding: 8px 6px 10px;
  }

  /* 値の上にプラン名を小さく添える */
  .plan-table tbody td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    color: var(--gray);
    margin-bottom: 4px;
  }

  /* 月額の行だけ、金額まわりに少し余白を足して目立たせる */
  .plan-table .row-price td:not(:first-child) { padding: 8px 6px 14px; }

  .hero__text  { font-size: 15px; }
  .btn-primary { width: 100%; text-align: center; }

  .form-card   { padding: 20px; }
}
