/* ===========================================================
   GeoSynap — 導入相談（30 分）フォーム /contact.html
   ===========================================================
   配色は index / diagnose と同じ dark。styles.css の :root トークンを
   そのまま使い、このファイルではレイアウトと部品だけを定義する。

   参照した体裁：運営会社の問い合わせページ
     https://www.e-business.co.jp/contact/
   （ステップ帯 / 項目立て / 個人情報同意ボックス + チェック / 確認ステップ）
   ブランド色だけは向こうの青ではなく GeoSynap の teal に置き換えている。
   ============================================================ */

/* 診断ページと同じ「← ホームに戻る」だけの chrome。
   通常フローに置くと <main> より上に body 地の方眼が帯として出るので absolute で重ねる */
/* 完了ステップは中身が短くフッタが画面中腹に浮くので、縦 flex で最下部へ落とす */
body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }

.ct-home-link {
  position: absolute;
  top: 24px;
  left: 32px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  text-decoration: none;
  transition: color 0.15s;
}
.ct-home-link:hover { color: var(--teal); }

main {
  background: var(--bg);
  /* main を flex アイテムにすると子の背景が縦いっぱいに伸びない為、ここでも縦 flex */
  display: flex;
  flex-direction: column;
}
.ct-screen {
  flex: 1 0 auto;
  padding: 96px 0 80px;
  background: var(--bg);
  /* 入力画面と同じ teal のうっすらしたグロー。単色ベタだと重く見える為 */
  background-image: radial-gradient(ellipse at 78% 8%, rgba(55, 154, 158, 0.18), transparent 42%);
}
.ct-shell {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============ ステップ帯（ご入力 / ご確認 / 完了）============
   現在地 = .is-current（teal ベタ）、通過済み = .is-done（teal の細枠）、
   未到達 = 既定（暗いグレー）。状態の付け外しは contact.js が行う。 */
.ct-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  border: 1px solid var(--line);
}
.ct-step {
  padding: 12px 8px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  background: rgba(18, 30, 33, 0.6);
  border-right: 1px solid var(--line);
}
.ct-step:last-child { border-right: 0; }
.ct-step.is-done { color: var(--teal-3); }
.ct-step.is-current {
  background: var(--teal);
  color: #071113;
}

/* ============ 見出し・リード ============ */
.ct-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 18px;
}
.ct-lede {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 40px;
}

/* ============ 入力フィールド ============ */
.ct-field { margin-bottom: 26px; }
.ct-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
/* 必須は teal、任意はグレー。赤は使わない（dark 背景で彩度が浮く為） */
.ct-req {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal-3);
  margin-left: 6px;
}
.ct-any {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  margin-left: 6px;
}
.ct-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  background: rgba(9, 17, 19, 0.7);
  font-family: var(--jp);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.ct-input:focus {
  border-color: var(--teal);
  background: var(--bg-3);
}
/* 未入力のまま送ろうとした項目は枠を赤系に寄せる（JS が付け外し） */
.ct-input.is-invalid { border-color: #e06a6a; }
.ct-textarea {
  resize: vertical;
  min-height: 180px;
}

/* honeypot：視覚・読み上げの両方から外す。display:none だと一部 bot に見抜かれる為
   画面外に飛ばす方式を採る（diagnose のモーダルと同じ手口） */
.ct-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============ 個人情報の取扱い（スクロールボックス）============ */
.ct-consent-box {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: rgba(9, 17, 19, 0.7);
  padding: 22px 24px;
  margin: 36px 0 20px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.ct-consent-box:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ct-consent-box h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 20px 0 6px;
}
.ct-consent-box h2:first-of-type { margin-top: 0; }
.ct-consent-box p { margin: 0 0 8px; }
.ct-consent-box a { color: var(--teal-text); text-decoration: underline; text-underline-offset: 3px; }
.ct-consent-org {
  text-align: right;
  color: var(--ink-3);
  margin-bottom: 22px !important;
}

.ct-consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 28px;
}
.ct-consent-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

/* ============ 確認ステップの内容一覧 ============ */
.ct-review {
  display: grid;
  grid-template-columns: 10em 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-bottom: 36px;
}
.ct-review dt,
.ct-review dd {
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.ct-review dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.ct-review dd {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  /* お問い合わせ内容は改行を含むのでそのまま見せる */
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============ ボタン・エラー ============ */
.ct-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.ct-btn {
  flex: 1 1 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  font-family: var(--jp);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ct-btn-primary {
  background: var(--teal);
  color: #071113;
  border-color: var(--teal);
}
.ct-btn-primary:hover { background: #79d7d9; border-color: #79d7d9; }
.ct-btn-primary[disabled] { opacity: 0.55; cursor: progress; }
.ct-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.ct-btn-ghost:hover { border-color: var(--teal); color: var(--teal-3); }

.ct-err {
  font-size: 14px;
  line-height: 1.8;
  color: #f0a0a0;
  margin: 0 0 18px;
}

/* 完了画面は中央寄せで区切りを付ける */
.ct-panel-done { text-align: center; }
.ct-panel-done .ct-actions { justify-content: center; }

/* ============ フッタ（診断ページと同型の 1 行）============ */
.ct-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  padding: 22px 20px 28px;
  border-top: 1px solid var(--line);
  background: #091113;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #aebbbc;
}
.ct-footer a { color: #d9f0ef; text-decoration: none; }
.ct-footer a:hover { color: var(--teal-3); }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .ct-screen { padding: 72px 0 56px; }
  .ct-shell { padding-inline: 20px; }
  .ct-steps { margin-bottom: 36px; }
  .ct-step { font-size: 10px; letter-spacing: 0.08em; padding: 11px 4px; }
  /* ラベル列 10em 固定は幅が足りないので縦積みに切り替える */
  .ct-review { grid-template-columns: 1fr; }
  .ct-review dt { padding-bottom: 0; border-bottom: 0; }
  .ct-review dd { padding-top: 6px; }
  .ct-actions { flex-direction: column; }
  .ct-btn { flex: 1 1 auto; }
}

@media (max-width: 540px) {
  .ct-home-link { top: 16px; left: 20px; }
}
