@charset "UTF-8";
/*
 * お問い合わせフォーム専用のスタイル。
 * CF7のフォーム48（/ec-consulting/ と /contact/ の両方で使っている）を対象にする。
 *
 * 色とフォントの変数は front-page.css が body.ecn-top と .ecn-lower に定義していて、
 * front-page.css は全ページで読み込まれているので、ここでは定義し直さない。
 *
 * Figmaの 1440px アートボード基準。コンテンツ幅 1200px、2カラムのgap 56px。
 */

/* ============================================================
   Contactセクション（左の説明＋右のフォームカード）
   ============================================================ */

/*
 * post_content の中に置くので、SWELLの本文幅（.post_content の max-width）を
 * 突き抜けて画面いっぱいの帯にする必要がある。
 *
 * margin-inline の % は親（.post_content）の幅に対して解決されるので、
 * calc(50% - 50vw) でちょうど画面幅まで広がる。
 * padding は左右の最低限の余白だけにして、コンテンツ幅は __inner の
 * max-width:1200px + margin:auto で作る（padding で本文幅に戻すと1200pxにならない）。
 */
.ecn-contact {
  margin-inline: calc(50% - 50vw);
  margin-block: 96px 0;
  padding-block: 112px;
  padding-inline: 24px;
  background: var(--ecn-bg);
  font-family: var(--ecn-jp);
  color: var(--ecn-ink);
}

.ecn-contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
  max-width: 1200px;
  margin-inline: auto;
}

/* 左カラム ------------------------------------------------- */

/*
 * post_content の中に置くので、SWELLが h2 に付ける装飾を素に戻す。
 * SWELLは .post_content h2（0,1,1）で背景・border-bottom・擬似要素を当ててくるため、
 * :where() で詳細度を0にすると負ける。クラス2つ（0,2,0）で受ける。
 */
.ecn-contact .ecn-sechead {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
  line-height: inherit;
}
.ecn-contact .ecn-sechead::before,
.ecn-contact .ecn-sechead::after {
  content: none;
  display: none;
}

/*
 * 「Contact」の英字と青い見出しは front-page.css の .ecn-sechead と同じ型だが、
 * あちらは span が 15px の黒。ここは 24px の青なので上書きする。
 */
.ecn-contact__lead .ecn-sechead {
  margin-bottom: 0;
}
.ecn-contact__lead .ecn-sechead span {
  margin-top: 20px;
  font-size: 24px;
  line-height: 45.6px;
  color: var(--ecn-accent);
}

.ecn-contact__text {
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 28.5px;
}
.ecn-contact__text strong {
  font-weight: 700;
}

/* ============================================================
   フォーム本体（CF7のフォーム48が出力する .ecn-form）
   ============================================================ */

.ecn-contact__form {
  background: #fff;
}

/* CF7が .ecn-form の外側に差し込む要素は素通しにしておく。 */
.ecn-contact__form .wpcf7,
.ecn-contact__form form.wpcf7-form {
  margin: 0;
}

.ecn-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px;
  box-sizing: border-box;
}
.ecn-form *,
.ecn-form *::before,
.ecn-form *::after {
  box-sizing: border-box;
}

.ecn-form__field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ラベルと必須／任意バッジ ---------------------------------- */

.ecn-form__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
  line-height: 26.6px;
  color: var(--ecn-ink);
}

.ecn-form__badge {
  padding: 1px 8px;
  background: var(--ecn-accent);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  line-height: 17.6px;
  white-space: nowrap;
}
.ecn-form__badge--opt {
  background: var(--ecn-accent-pale);
  color: var(--ecn-navy2);
}

/* 入力欄 ---------------------------------------------------- */

/*
 * CF7は input/select/textarea を <span class="wpcf7-form-control-wrap"> で包む。
 * このspanがinline要素のままだと幅100%が効かないのでblockにする。
 */
.ecn-form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.ecn-form input[type="text"],
.ecn-form input[type="email"],
.ecn-form input[type="tel"],
.ecn-form select,
.ecn-form textarea {
  width: 100%;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid #c9cdd3;
  border-radius: 0;
  font-family: var(--ecn-jp);
  font-size: 15px;
  color: var(--ecn-ink);
  transition: border-color 0.2s;
  appearance: none;
}

.ecn-form input[type="text"],
.ecn-form input[type="email"],
.ecn-form input[type="tel"],
.ecn-form select {
  height: 48px;
}

.ecn-form textarea {
  height: 150px;
  line-height: 25.5px;
  resize: vertical;
}

.ecn-form ::placeholder {
  color: #757575;
  opacity: 1;
}

.ecn-form input[type="text"]:focus,
.ecn-form input[type="email"]:focus,
.ecn-form input[type="tel"]:focus,
.ecn-form select:focus,
.ecn-form textarea:focus {
  outline: none;
  border-color: var(--ecn-accent);
  box-shadow: 0 0 0 3px var(--ecn-accent-pale);
}

/* セレクトの三角は appearance:none で消えるので自前で描く。 */
.ecn-form select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231c1d1f' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* 入力欄の下の補足文 ---------------------------------------- */

.ecn-form__note {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 22.8px;
  color: #5b5f66;
}

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

/*
 * デザインは「文字＋矢印」が中央に並ぶ形。input[type=submit] には擬似要素を
 * 付けられないため、見た目は span と ::after で作り、実際のinputは透明にして
 * ボタン全体に重ねる。読み上げ用の名前はinputのvalueが持つ。
 */
.ecn-form__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 56px;
  margin-top: 0;
  background: var(--ecn-ink);
  transition: background 0.2s;
}
.ecn-form__submit::after {
  content: "";
  width: 14px;
  height: 10px;
  background: url("../img/icon-arrow-right-white.svg") no-repeat center / contain;
}
.ecn-form__submit:hover {
  background: var(--ecn-accent);
}

.ecn-form__submit-label {
  font-weight: 700;
  font-size: 15px;
  line-height: 28.5px;
  letter-spacing: 0.6px;
  color: #fff;
}

.ecn-form__submit .wpcf7-spinner {
  position: absolute;
  right: 16px;
  margin: 0;
}

.ecn-form__submit-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: transparent;
  font-size: 0;
  cursor: pointer;
}
.ecn-form__submit-input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.ecn-form__footnote {
  margin: 0;
  font-size: 12px;
  line-height: 22.8px;
  color: #5b5f66;
  text-align: center;
}

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

.ecn-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 22.8px;
  color: #d93025;
}
.ecn-form input.wpcf7-not-valid,
.ecn-form select.wpcf7-not-valid,
.ecn-form textarea.wpcf7-not-valid {
  border-color: #d93025;
}

.ecn-contact__form .wpcf7-response-output {
  margin: 0 32px 32px;
  padding: 14px 16px;
  border: 1px solid #c9cdd3;
  font-size: 14px;
  line-height: 24px;
}

/* ============================================================
   タブレット・スマホ
   ============================================================ */

@media (max-width: 1100px) {
  .ecn-contact__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 960px) {
  .ecn-contact {
    margin-block: 64px 0;
    padding-block: 72px;
    padding-inline: 24px;
  }
  .ecn-contact__lead .ecn-sechead em {
    font-size: 56px;
    line-height: 1.05;
  }
  .ecn-contact__lead .ecn-sechead span {
    margin-top: 16px;
    font-size: 21px;
    line-height: 1.7;
  }
}

@media (max-width: 600px) {
  .ecn-contact {
    padding-block: 56px;
    padding-inline: 16px;
  }
  .ecn-contact__lead .ecn-sechead em {
    font-size: 44px;
  }
  .ecn-contact__lead .ecn-sechead span {
    font-size: 19px;
  }
  .ecn-contact__text {
    font-size: 15px;
    line-height: 27px;
  }
  .ecn-form {
    gap: 20px;
    padding: 20px;
  }
  /* iOSは16px未満の入力欄でフォーカス時に拡大するので下げない。 */
  .ecn-form input[type="text"],
  .ecn-form input[type="email"],
  .ecn-form input[type="tel"],
  .ecn-form select,
  .ecn-form textarea {
    font-size: 16px;
  }
  .ecn-contact__form .wpcf7-response-output {
    margin: 0 20px 20px;
  }
}
