/* ============================================================
   お問い合わせフォーム（CONTACT-1）
   - 既存 style.css のデザイントークン（--marine / --gold / --l-* 等）に準拠
   - グローバルトークンは再定義しない。薄背景のみ本ページ内ローカル変数で定義
   ============================================================ */

.contact-page {
  /* 既存トークンに無い薄背景だけをローカル定義（グローバルは汚さない） */
  --c-marine-bg: #EBF2F7;
  --c-gold-bg:   #F7F1E8;
  --c-hover-bg:  #FAFBFC;
  display: block;
}

/* ---- パンくず ---- */
.breadcrumb { background: var(--l-card); border-bottom: 1px solid var(--l-line); padding: 12px 0; }
.breadcrumb .bc-inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; font-size: 12px; color: var(--l-sub); display: flex; align-items: center; gap: 8px; }
.breadcrumb .bc-sep { color: var(--l-dim); }
.breadcrumb .bc-current { color: var(--l-sub); }

/* ---- ヒーロー ---- */
.contact-hero { background: var(--d-bg); color: var(--d-text); padding: 48px 0 52px; border-bottom: 1px solid var(--d-line); }
.contact-hero-inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.contact-hero-en { font-family: var(--en); font-style: italic; font-size: 13px; letter-spacing: .3em; color: var(--d-sub); display: block; margin-bottom: 6px; }
.contact-hero-title { font-family: var(--ja); font-size: 32px; font-weight: 700; letter-spacing: .08em; color: #fff; margin-bottom: 12px; }
.contact-hero-desc { font-size: 14px; line-height: 1.95; color: var(--d-sub); max-width: 720px; }

/* ---- レイアウト ---- */
.contact-grid { max-width: 1080px; margin: 0 auto; padding: 40px 20px 72px; display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.contact-col-main { min-width: 0; }

/* ---- 準備中ノート（CONTACT-1：誤受付防止） ---- */
.contact-prep { border-left: 4px solid var(--gold); background: var(--c-gold-bg); padding: 16px 20px; margin-bottom: 28px; border-radius: 2px; }
.contact-prep-title { font-size: 14px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.contact-prep-body { font-size: 13px; line-height: 1.85; color: var(--l-text); }

/* ---- ステップ ---- */
.contact-steps { list-style: none; display: flex; align-items: center; gap: 14px; margin: 0 0 28px; padding: 0; }
.contact-step { display: flex; align-items: center; gap: 8px; }
.contact-step-num { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--l-line); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; color: var(--l-dim); background: var(--l-card); }
.contact-step-label { font-size: 13px; color: var(--l-dim); }
.contact-step.is-active .contact-step-num { background: var(--marine); border-color: var(--marine); color: #fff; }
.contact-step.is-active .contact-step-label { color: var(--marine); font-weight: 700; }
.contact-step.is-done .contact-step-num { background: var(--seafoam); border-color: var(--seafoam); color: #fff; }

/* ---- フォームカード・セクション ---- */
.contact-form { background: var(--l-card); border: 1px solid var(--l-line); padding: 32px 32px; border-radius: 2px; }
.contact-section { border: none; padding: 0; margin: 0 0 36px; }
.contact-section:last-child { margin-bottom: 0; }
.contact-section-head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--l-line); margin-bottom: 18px; width: 100%; }
.contact-section-num { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--marine); }
.contact-section-title { font-family: var(--ja); font-size: 18px; font-weight: 700; letter-spacing: .04em; color: var(--l-text); }
.contact-section-desc { font-size: 13px; color: var(--l-sub); line-height: 1.85; margin: -8px 0 18px; }

/* ---- 種別カード ---- */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.category-card { position: relative; text-align: left; width: 100%; background: var(--l-card); border: 1px solid var(--l-line); padding: 18px 20px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color var(--t-fast), background var(--t-fast); font-family: var(--ja); }
.category-card:hover { border-color: var(--marine); background: var(--c-hover-bg); }
.category-card.is-selected { border-color: var(--marine); background: var(--c-marine-bg); box-shadow: inset 0 0 0 1px var(--marine); }
.category-card:focus-visible { outline: 2px solid var(--marine); outline-offset: 2px; }
.category-card-radio { position: absolute; top: 16px; right: 16px; width: 16px; height: 16px; border: 1.5px solid var(--l-line); border-radius: 50%; }
.category-card.is-selected .category-card-radio { border-color: var(--marine); background: var(--marine); box-shadow: inset 0 0 0 3px var(--l-card); }
.category-card-title { font-size: 15px; font-weight: 700; color: var(--l-text); padding-right: 26px; }
.category-card-desc { font-size: 12.5px; color: var(--l-sub); line-height: 1.7; }

.category-select-fallback { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- 可変ブロック ---- */
.category-placeholder { background: var(--l-bg); border: 1px dashed var(--l-line); padding: 28px 20px; text-align: center; font-size: 13px; color: var(--l-dim); }
.category-specific[hidden] { display: none; }

/* ---- 行・入力 ---- */
.form-row { margin-bottom: 18px; }
.form-row:last-child { margin-bottom: 0; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 700; color: var(--l-text); margin-bottom: 7px; letter-spacing: .02em; }
.form-label-sub { font-weight: 400; font-size: 11px; color: var(--l-dim); }
.req { display: inline-block; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; background: var(--marine); color: #fff; padding: 2px 6px; vertical-align: middle; }
.opt { display: inline-block; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--l-dim); border: 1px solid var(--l-line); padding: 1px 6px; vertical-align: middle; }

.form-input { width: 100%; padding: 11px 14px; font-family: var(--ja); font-size: 14px; line-height: 1.6; color: var(--l-text); background: var(--l-card); border: 1px solid var(--l-line); border-radius: 2px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.form-input:hover { border-color: var(--l-sub); }
.form-input:focus { outline: none; border-color: var(--marine); box-shadow: 0 0 0 3px rgba(28, 104, 144, .12); }
.form-input::placeholder { color: var(--l-dim); }
.form-textarea { min-height: 120px; resize: vertical; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238A9AA5' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.form-help { font-size: 12px; color: var(--l-sub); line-height: 1.75; margin-top: 6px; }

/* ---- チェック・ラジオ ---- */
.form-checks, .form-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.form-check { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--l-line); background: var(--l-card); font-size: 13px; color: var(--l-text); cursor: pointer; user-select: none; transition: border-color var(--t-fast), background var(--t-fast); border-radius: 2px; }
.form-check:hover { border-color: var(--marine); background: var(--c-hover-bg); }
.form-check input { width: 16px; height: 16px; accent-color: var(--marine); cursor: pointer; flex-shrink: 0; }
.form-check:has(input:checked) { border-color: var(--marine); background: var(--c-marine-bg); }

/* ---- 注意ボックス ---- */
.contact-note { font-size: 13px; line-height: 1.85; color: var(--l-text); border-left: 3px solid var(--marine); background: var(--c-marine-bg); padding: 14px 18px; margin-bottom: 18px; border-radius: 2px; }
.contact-note-warn { border-left-color: var(--gold); background: var(--c-gold-bg); }
.contact-note-warn strong { display: block; color: var(--gold); margin-bottom: 4px; font-size: 12.5px; letter-spacing: .06em; }
.contact-note strong { color: var(--l-text); }

/* ---- 同意 ---- */
.form-consent { background: var(--l-bg); border: 1px solid var(--l-line); padding: 18px 20px; margin: 28px 0 18px; border-radius: 2px; }
.form-consent .form-check { border: none; background: none; padding: 0; align-items: flex-start; }
.form-consent .form-check:hover { background: none; }
.form-consent a { color: var(--marine); border-bottom: 1px solid currentColor; }

/* ---- エラー ---- */
.form-error { color: var(--red); font-size: 13px; font-weight: 700; margin: 0 0 14px; }
.form-error[hidden] { display: none; }

/* ---- サーバー側エラー／送信失敗の通知バナー ---- */
.contact-alert { border-radius: 2px; padding: 16px 20px; margin-bottom: 24px; }
.contact-alert-error { border-left: 4px solid var(--red); background: #FCEDEC; }
.contact-alert-title { font-size: 14px; font-weight: 700; color: var(--red); margin: 0; line-height: 1.7; }
.contact-alert-list { margin: 10px 0 0; padding-left: 20px; }
.contact-alert-list li { font-size: 13px; line-height: 1.85; color: var(--l-text); }

/* ---- 完了画面 ---- */
.contact-complete { background: var(--l-card); border: 1px solid var(--l-line); border-top: 3px solid var(--seafoam); padding: 48px 36px; border-radius: 2px; text-align: center; }
.contact-complete-icon { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; background: var(--seafoam); color: #fff; font-size: 28px; line-height: 56px; }
.contact-complete-title { font-family: var(--ja); font-size: 22px; font-weight: 700; letter-spacing: .04em; color: var(--l-text); margin-bottom: 14px; }
.contact-complete-lead { font-size: 15px; line-height: 1.9; color: var(--l-text); margin-bottom: 8px; }
.contact-complete-note { font-size: 13px; line-height: 1.85; color: var(--l-sub); margin-bottom: 28px; }
.contact-complete-actions { display: flex; justify-content: center; }
.contact-complete-actions .btn-main { flex: 0 0 auto; min-width: 200px; }

/* ---- ボタン ---- */
.form-actions { display: flex; gap: 12px; margin-top: 10px; }
.btn { font-family: var(--ja); font-size: 14px; font-weight: 700; letter-spacing: .06em; padding: 13px 26px; border: 1px solid transparent; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 2px; transition: background var(--t-fast), border-color var(--t-fast); }
.btn-main { background: var(--marine); color: #fff; border-color: var(--marine); flex: 1; }
.btn-main:hover:not(:disabled) { background: var(--marine-lt); border-color: var(--marine-lt); }
.btn-main:disabled { background: var(--l-dim); border-color: var(--l-dim); cursor: not-allowed; opacity: .7; }
.btn-sub { background: var(--l-card); color: var(--l-text); border-color: var(--l-line); }
.btn-sub:hover { border-color: var(--l-sub); }
.btn:focus-visible { outline: 2px solid var(--marine); outline-offset: 2px; }

/* ---- 確認リスト ---- */
.confirm-list { border: 1px solid var(--l-line); border-radius: 2px; }
.confirm-list > div { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--l-line); }
.confirm-list > div:last-child { border-bottom: none; }
.confirm-list dt { font-size: 12.5px; font-weight: 700; color: var(--l-sub); }
.confirm-list dd { font-size: 13.5px; color: var(--l-text); line-height: 1.7; word-break: break-word; }
.confirm-list dd.is-empty { color: var(--l-dim); font-style: italic; }

/* ---- サイドバー ---- */
.contact-col-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--l-card); border: 1px solid var(--l-line); padding: 22px 20px; border-radius: 2px; }
.side-card-title { font-family: var(--ja); font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--l-text); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--l-line); }
.side-list { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; }
.side-list li { font-size: 12.5px; line-height: 1.7; color: var(--l-sub); padding-left: 14px; position: relative; }
.side-list li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 1px; background: var(--l-dim); }

/* ---- レスポンシブ ---- */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-col-side { order: -1; }
}
@media (max-width: 600px) {
  .contact-hero-title { font-size: 26px; }
  .contact-grid { padding: 28px 16px 56px; }
  .contact-form { padding: 22px 18px; }
  .category-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .form-actions { flex-direction: column-reverse; }
  .btn-main, .btn-sub { width: 100%; }
  .confirm-list > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- モーション配慮 ---- */
@media (prefers-reduced-motion: reduce) {
  .category-card, .form-input, .form-check, .btn, .contact-step-num { transition: none; }
}

/* ---- honeypot（CONTACT-2b スパムbot 対策）----
   通常ユーザーには見えない欄。display:none / visibility:hidden は bot に回避されやすいため
   画面外へ追い出す方式（既存 .category-select-fallback と同じ clip 手法）で隠す。
   入力欄としては DOM に存在し送信もされるため、bot が値を入れるとサーバー側で検出できる。 */
.contact-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
