/* =========================================================
   contact.css — お問い合わせフォーム（/contact/）
   ========================================================= */

/* 下層ページは固定ヘッダーぶんの余白を確保する。
   フォームは横に広がりすぎると読みにくいので幅を絞って中央に置く。 */
.section--form {
  max-width: 980px;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(48px, 8vw, 110px))
           clamp(20px, 5vw, 40px)
           var(--section-y);
}

/* ---------------------------------------------------------
   パンくず
   --------------------------------------------------------- */

.breadcrumb {
  margin-bottom: 20px;
  font-size: 12px;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
}

/* 項目のあいだに区切りを入れる */
.breadcrumb__item + .breadcrumb__item::before {
  content: '/';
  margin-right: 8px;
  opacity: 0.6;
}

.breadcrumb__link {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.breadcrumb__link:hover {
  color: var(--c-accent-hi);
}

/* ---------------------------------------------------------
   フォームを載せる黒いパネル
   --------------------------------------------------------- */

.form-panel {
  margin-top: clamp(36px, 5vw, 56px);
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: 24px;
  border: 1px solid var(--c-border);
  background: rgba(0, 0, 0, 0.55);
}

/* ---------------------------------------------------------
   入力項目
   --------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vw, 40px);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: none;   /* fieldset の既定の枠を消す */
  padding: 0;
  min-width: 0;   /* fieldset が grid/flex 内で縮まるようにする */
}

.form-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;     /* legend の既定の余白を消す */
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.form-required {
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--c-accent);
  color: var(--c-fg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.form-hint {
  font-size: 12px;
  opacity: 0.5;
}

/* legend は flex アイテムにならず gap が効かないため、
   見出しと本体の間隔は margin で確保する */
.form-field--choices > .form-label {
  margin-bottom: 10px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--c-fg);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.form-textarea {
  resize: vertical;
  min-height: 160px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-input:hover,
.form-textarea:hover {
  border-color: rgba(255, 255, 255, 0.38);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--c-accent-hi);
  background: rgba(0, 0, 0, 0.55);
}

/* ---------------------------------------------------------
   お問い合わせ種別（見た目は丸／実体はチェックボックスで複数選択可）
   --------------------------------------------------------- */

.form-choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  cursor: pointer;
}

/* 実体のチェックボックスは隠すが、キーボード操作は殺さない */
.choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice__mark {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transition: border-color 0.2s ease;
}

.choice__mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--c-accent);
  transform: scale(0);
  transition: transform 0.2s var(--ease-out);
}

.choice:hover .choice__mark {
  border-color: rgba(255, 255, 255, 0.7);
}

.choice__input:checked + .choice__mark {
  border-color: var(--c-accent);
}

.choice__input:checked + .choice__mark::after {
  transform: scale(1);
}

.choice__input:focus-visible + .choice__mark {
  outline: 2px solid var(--c-accent-hi);
  outline-offset: 3px;
}

.choice__text {
  font-size: 14px;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   エラー表示
   --------------------------------------------------------- */

.form-alert {
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid rgba(206, 54, 43, 0.6);
  border-radius: 10px;
  background: rgba(206, 54, 43, 0.16);
  font-size: 14px;
  line-height: 1.6;
}

.form-error {
  font-size: 13px;
  line-height: 1.6;
  color: #ff8175;
}

.has-error .form-input,
.has-error .form-textarea {
  border-color: var(--c-accent);
  background: rgba(206, 54, 43, 0.1);
}

.has-error .choice__mark {
  border-color: rgba(206, 54, 43, 0.75);
}

/* ---------------------------------------------------------
   ハニーポット（画面には出さない）
   --------------------------------------------------------- */

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------
   送信ボタン
   --------------------------------------------------------- */

.form-submit {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.form-submit .btn {
  min-width: 260px;
  border: none;
  cursor: pointer;
}

.form-submit .btn:disabled {
  opacity: 0.5;
  cursor: progress;
  transform: none;
}

/* ---------------------------------------------------------
   送信完了
   --------------------------------------------------------- */

.form-panel--done {
  text-align: center;
}

.form-done__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-fg);
}

.form-done__title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 500;
}

.form-done__text {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.7;
}

.form-done__note {
  max-width: 520px;
  margin: 24px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.6;
}

.form-done__action {
  margin-top: 32px;
}

/* ---------------------------------------------------------
   レスポンシブ
   --------------------------------------------------------- */

@media (max-width: 640px) {
  .form-submit .btn {
    width: 100%;
    min-width: 0;
  }
}
