/* ===========================================================
   31-contact-form — お問い合わせフォーム

   カンプ実測（contact_pc / 1366×2104 / 背景 #EFF0EE）
     カード        Rectangle 61   X=272 Y=374  821×1120  #FFFFFF  角丸10
     緑の見出し    「必要事項を…」 X=345 Y=428  H=29      #67BE8D
     項目の並び    Frame 237      X=345 Y=500  W=701.29  間隔22
     入力欄        Rectangle 62   689.29×40  塗り#FAFAFA
                   線#D2D2D3 1px 内側  角丸4
     項目→ボタン   Frame 238 の間隔 67
     送信ボタン    Rectangle 5    689×48  #67BE8D  角丸10

   ⚠️ カンプではカード内の項目がわずかに右にずれている
      （左73 / 右58.7 で中心が7pxずれる）。設計意図とは考えにくいので
      **左右対称の 66px** にしてある（(821 − 689) / 2 = 66）。
   =========================================================== */

.sec-contact {
  padding-block: 0 120px;             /* PROVISIONAL: 下の余白は未実測 */
}

/* --- カード ------------------------------------------------ */

.sec-contact__card {
  width: 100%;
  max-width: 821px;                   /* 実測 */
  margin-inline: auto;
  padding: 54px 66px 58px;            /* 上=428−374 / 左右=(821−689)/2 / 下は実測58.5 */
  border-radius: 10px;                /* 実測 */
  background: #fff;
}

/* カード上端から項目1つ目の上端までがカンプで126px（374 → 500）。
   padding-top 54 + 見出し29 + 注記(8+12) + ここ23 = 126。 */
.sec-contact__card-head {
  margin-bottom: 23px;
}

.sec-contact__lead {
  font-size: 20px;                    /* PROVISIONAL: カンプはテキストスタイル指定で数値が読めず */
  font-weight: 700;
  line-height: 1.45;                  /* 実測 H=29 に合わせる */
  color: var(--aixeed-green, #67be8d);
}

.sec-contact__required-note {
  margin-top: 8px;                    /* PROVISIONAL */
  font-size: var(--fs-xs);
  line-height: 1;
  text-align: right;
  color: #e03131;
}

/* --- 項目 -------------------------------------------------- */

.sec-contact__form {
  display: flex;
  flex-direction: column;
}

.field + .field {
  margin-top: 22px;                   /* 実測 Frame 237 の間隔 */
}

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  /* 実測: 入力欄が項目の Y=35 から始まる。29 + margin 6 = 35 に合わせる。
     px 指定なので、SPで折り返したときは行数ぶん素直に伸びる。 */
  line-height: 29px;
}

/* 必須マーク。カンプでは赤い小さな＊。 */
.field__req {
  margin-left: 2px;
  color: #e03131;
}

.field__input {
  display: block;
  width: 100%;
  height: 40px;                       /* 実測 */
  padding-inline: 14px;               /* PROVISIONAL */
  border: 1px solid #d2d2d3;          /* 実測 */
  border-radius: 4px;                 /* 実測 */
  background: #fafafa;                /* 実測 */
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text-base, #1a1a1a);
  /* iOS Safari が入力欄を独自に描くのを止める。角丸4pxが効かなくなるため。 */
  -webkit-appearance: none;
  appearance: none;
}

.field__input::placeholder {
  color: #b5b5b5;
}

.field__input:focus-visible {
  outline: 2px solid var(--aixeed-green, #67be8d);
  outline-offset: 1px;
  border-color: transparent;
}

/* select は矢印を自前で描く（appearance:none で既定の矢印が消えるため）。 */
.field__input--select {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, #6b6b6b 50%),
    linear-gradient(135deg, #6b6b6b 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* 未選択のあいだはプレースホルダー色にする。 */
.field__input--select:invalid {
  color: #b5b5b5;
}

.field__input--textarea {
  height: auto;
  /* カンプの項目スタック 820.5 からの逆算:
     820.5 − 間隔22×7 − テキスト項目75×6 − 同意21 − ラベル29 − 6 = 160.5 */
  min-height: 160.5px;
  padding-block: 12px;
  resize: vertical;
}

/* --- 同意チェック ------------------------------------------ */

.field--consent {
  margin-top: 22px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent__box {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--aixeed-green, #67be8d);
}

.consent__text {
  font-size: var(--fs-xs);
  line-height: 1.7;
}

.consent__text a {
  text-decoration: underline;
}

/* --- エラー ------------------------------------------------ */

.field__error {
  margin-top: 6px;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: #e03131;
}

.field__input[aria-invalid='true'] {
  border-color: #e03131;
}

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

.sec-contact__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 48px;                       /* 実測 */
  margin-top: 67px;                   /* 実測 Frame 238 の間隔 */
  border: 0;
  border-radius: 10px;                /* 実測 */
  background: var(--aixeed-green, #67be8d);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity var(--dur, 0.2s) var(--ease, ease);
}


.sec-contact__submit[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.sec-contact__submit-arrow {
  position: absolute;
  right: 20px;
}

.sec-contact__status {
  margin-top: 16px;
  font-size: var(--fs-xs);
  line-height: 1.7;
}

.sec-contact__status[data-state='error'] {
  color: #e03131;
}

/* --- カード下の直接連絡先 ---------------------------------- */

.sec-contact__direct {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 821px;                   /* カードと揃える */
  margin: 32px auto 0;                /* PROVISIONAL */
  padding: 22px 40px;                 /* PROVISIONAL */
  border-radius: 10px;
  background: #fff;
}

.sec-contact__direct-lead {
  flex: 1;
  font-size: var(--fs-xs);
  line-height: 1.6;
}

.sec-contact__direct-mail {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  padding-left: 40px;
  border-left: 1px solid var(--border-soft, #e2e2e2);
}

.sec-contact__direct-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-soft, #e2e2e2);
  border-radius: 4px;
  font-size: 14px;
}

.sec-contact__direct-label {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  color: var(--text-muted, #6b6b6b);
}

.sec-contact__direct-label span {
  margin-left: 6px;
}

.sec-contact__direct-addr {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

/* ===========================================================
   SP — カンプ contact_sp（375px）。数値はまだ未実測なので、
   PC の実測値を 375px に落とし込んだ変換設計。
   contact_sp を実測したら差し替えること。
   =========================================================== */

@media (max-width: 767px) {
  .sec-contact {
    padding-block: 0 72px;
  }

  .sec-contact__card {
    padding: 32px 20px 36px;
    border-radius: 8px;
  }

  .sec-contact__lead {
    font-size: 17px;
  }

  .sec-contact__submit {
    margin-top: 40px;
  }

  /* 横並びだと375pxで潰れるので縦に落とす。 */
  .sec-contact__direct {
    display: block;
    padding: 20px;
  }

  .sec-contact__direct-mail {
    margin-top: 16px;
    padding-left: 0;
    padding-top: 16px;
    border-left: 0;
    border-top: 1px solid var(--border-soft, #e2e2e2);
  }

  .sec-contact__direct-addr {
    font-size: 16px;
  }
}
