@charset "UTF-8";
/* ==========================================================================
   ALPHAZ — CONTACT（page-contact.php）
   --------------------------------------------------------------------------
   Figma: PC 177:419（マーカー見出し＋ボタン）→ ボタンの代わりにフォーム（2026-10-19 ジョニー決定）
   ヒーローは下層共通の .page-hero（common.css / 動きは motion.css）。
   フォームは Contact Form 7。中身のマークアップ（.c-form〜）は inc/contact-form.php のコメント。
   CF7 の標準 CSS より強くなるよう、.contact-form から書く。

   01. Body（マーカー見出し）
   02. Form
   03. Messages（入力エラー・送信結果）
   04. Motion
   ========================================================================== */

.contact {
  --pad: max(20px, calc(108 * var(--s)));
  --form-line: #bfbfbf;
  --form-error: #e60012;
  overflow-x: clip;
}

/* ==========================================================================
   01. Body
   ========================================================================== */
.contact-body {
  background: var(--c-white);
}

.contact-body__inner {
  max-width: calc(1440 * var(--s));
  margin: 0 auto;
  padding: calc(100 * var(--s)) var(--pad) calc(120 * var(--s));
}

.contact-body__heading {
  display: flex;
  justify-content: center;
  font-size: max(24px, calc(50 * var(--s)));
  font-weight: 800;
}

/*
 * マーカー（黄色の帯。伸びる演出のため疑似要素で敷く）
 * Figma: 文字の上端〜下端（37px）＋上下 6px = 高さ 49px（学生ページの CONTACT と同じ作り）
 */
.contact-body__marker {
  position: relative;
  display: inline-block;
  padding: 0.054em 0 0.186em;
  line-height: 0.74;
  isolation: isolate;
}

.contact-body__marker::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--c-accent);
  transform-origin: left center;
  content: "";
}

.contact-form {
  max-width: calc(816 * var(--s));
  margin: calc(60 * var(--s)) auto 0;
}

/* ショートコード未設定の時の案内（ログイン中の編集者だけに出る） */
.contact-form__notice {
  padding: 20px;
  border: 1px dashed var(--form-line);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 767px) {
  .contact {
    --pad: 20px;
  }

  .contact-body__inner {
    padding: 56px var(--pad) 72px;
  }

  .contact-body__heading {
    font-size: 28px;
  }

  .contact-body__marker {
    padding: 0.054em 0.08em 0.186em;
  }

  .contact-form {
    margin-top: 40px;
  }
}

/* ==========================================================================
   02. Form
   ========================================================================== */
.contact-form .c-form__row {
  margin-bottom: max(28px, calc(36 * var(--s)));
}

.contact-form .c-form__label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: max(10px, calc(12 * var(--s)));
  font-size: max(14px, calc(16 * var(--s)));
  font-weight: 700;
  line-height: 1.5;
}

/* お問い合わせ種別（fieldset ＋ legend。ブラウザ標準の枠と余白を消す） */
.contact-form .c-form__fieldset {
  min-width: 0;
  margin: 0 0 max(28px, calc(36 * var(--s)));
  padding: 0;
  border: 0;
}

.contact-form .c-form__fieldset > legend {
  float: left;
  width: 100%;
  padding: 0;
}

/* legend を float させたので、選択肢は次の行から */
.contact-form .c-form__fieldset > legend + * {
  clear: both;
}

/* 必須 / 任意 */
.contact-form :is(.c-form__req, .c-form__opt) {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
}

.contact-form .c-form__req {
  background: var(--c-accent);
  color: var(--c-black);
}

.contact-form .c-form__opt {
  border: 1px solid var(--form-line);
  color: var(--c-gray);
}

/* 入力欄 */
.contact-form .wpcf7-form-control-wrap {
  display: block;
}

.contact-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea) {
  width: 100%;
  height: max(52px, calc(60 * var(--s)));
  padding: 0 max(16px, calc(20 * var(--s)));
  border: 1px solid var(--form-line);
  border-radius: 0;
  background: var(--c-white);
  color: var(--c-black);
  /* 16px 未満だと iPhone で入力時に画面が拡大されるので下限 16px */
  font: inherit;
  font-size: max(16px, calc(16 * var(--s)));
  font-weight: 500;
  line-height: 1.6;
  transition:
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
  appearance: none;
}

/* 上の :is() より強くするため属性セレクタ付き */
.contact-form textarea[name] {
  display: block;
  height: max(200px, calc(240 * var(--s)));
  padding-top: max(14px, calc(16 * var(--s)));
  padding-bottom: max(14px, calc(16 * var(--s)));
  line-height: 1.8;
  resize: vertical;
}

.contact-form ::placeholder {
  color: #aaa;
  opacity: 1;
}

/* 入力中: 枠が黒く太く＋左に黄色の線 */
.contact-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea):focus {
  border-color: var(--c-black);
  outline: none;
  box-shadow:
    inset 0 0 0 1px var(--c-black),
    inset 5px 0 0 var(--c-accent);
}

/* ラジオ（お問い合わせ種別） */
.contact-form .wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 14px max(24px, calc(36 * var(--s)));
}

.contact-form .wpcf7-list-item {
  margin: 0;
}

.contact-form .wpcf7-list-item label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: max(14px, calc(16 * var(--s)));
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.contact-form :is(input[type="radio"], input[type="checkbox"]) {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid var(--c-black);
  background: var(--c-white);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out);
  appearance: none;
}

.contact-form input[type="radio"] {
  border-radius: 50%;
}

/* 選ぶと黒地に黄色の点 */
.contact-form input[type="radio"]:checked {
  background: radial-gradient(circle, var(--c-accent) 0 4px, var(--c-black) 5px);
}

/* 同意のチェック: 黒地に黄色のチェック */
.contact-form input[type="checkbox"]:checked {
  background: var(--c-black)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.8' fill='none' stroke='%23fff200' stroke-width='2'/%3E%3C/svg%3E")
    center / 100% no-repeat;
}

.contact-form :is(input[type="radio"], input[type="checkbox"]):focus-visible {
  outline: 2px solid var(--c-black);
  outline-offset: 3px;
}

/* 同意 */
.contact-form .c-form__row--consent {
  display: flex;
  justify-content: center;
  margin-top: max(40px, calc(48 * var(--s)));
}

.contact-form .c-form__row--consent a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 送信ボタン（TOP などの黒いボタン .c-btn--dark と同じ見た目。input なので矢印は背景画像） */
.contact-form .c-form__submit-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: max(32px, calc(40 * var(--s)));
}

.contact-form .c-form__submit {
  width: max(200px, calc(240 * var(--s)));
  height: max(52px, calc(60 * var(--s)));
  padding: 0 calc(24 * var(--s)) 0 0;
  border: 0;
  border-radius: 0;
  background: var(--c-black)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.333 8h9.334M8 12.667 12.667 8 8 3.333' stroke='%23fff200' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")
    right max(18px, calc(24 * var(--s))) center / max(14px, calc(16 * var(--s))) no-repeat;
  color: var(--c-white);
  font: inherit;
  font-size: max(13px, calc(14 * var(--s)));
  font-weight: 800;
  letter-spacing: 0.1429em;
  cursor: pointer;
  transition:
    background-position var(--dur) var(--ease-out),
    opacity var(--dur) var(--ease-out);
  appearance: none;
}

@media (hover: hover) and (pointer: fine) {
  .contact-form .c-form__submit:not(:disabled):hover {
    background-position: right max(14px, calc(20 * var(--s))) center;
  }
}

.contact-form .c-form__submit:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
}

/* 同意にチェックするまで押せない（CF7 が disabled を付ける） */
.contact-form .c-form__submit:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 送信中のくるくる（ボタンの右外に置く） */
.contact-form .wpcf7-spinner {
  position: absolute;
  top: 50%;
  left: calc(50% + max(100px, calc(120 * var(--s))));
  margin: -12px 0 0 16px;
}

@media (max-width: 767px) {
  .contact-form .wpcf7-radio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
  }

  .contact-form .c-form__submit {
    width: 100%;
  }

  .contact-form .wpcf7-spinner {
    top: auto;
    bottom: -40px;
    left: 50%;
    margin: 0 0 0 -12px;
  }
}

/* ==========================================================================
   03. Messages
   ========================================================================== */
/* 入力欄の指定（:is() 内の属性セレクタ）より強くするため 2クラスで */
.contact-form .wpcf7-form-control.wpcf7-not-valid {
  border-color: var(--form-error);
}

.contact-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 8px;
  color: var(--form-error);
  font-size: 13px;
  font-weight: 700;
}

/* 送信結果（CF7 が必要な時だけ表示する。display は CF7 に任せる） */
.contact-form .wpcf7 form .wpcf7-response-output {
  margin: max(32px, calc(40 * var(--s))) 0 0;
  padding: 16px 20px;
  border: 1px solid var(--form-error);
  color: var(--form-error);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}

/* CF7 標準の色（黄・赤・オレンジ）より強くする */
.contact-form .wpcf7 form:is(.invalid, .unaccepted, .payment-required, .failed, .aborted, .spam) .wpcf7-response-output {
  border-color: var(--form-error);
}

.contact-form .wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: var(--c-black);
}

/* ==========================================================================
   04. Motion
   --------------------------------------------------------------------------
   画面に入ったら最後まで一気に再生（上に戻っても巻き戻らない）
     見出し: 黄色いマーカーが左から引かれる → 文字がせり上がる
     フォーム: 項目が上から順に下からふわっと
   ========================================================================== */
.motion-ok .contact-body__heading:not(.is-inview) .contact-body__marker::before {
  transform: scaleX(0);
}

.motion-ok .contact-body__heading.is-inview .contact-body__marker::before {
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1) 0.3s;
}

.motion-ok .contact-body__heading:not(.is-inview) .m-letter {
  opacity: 0;
  transform: translateY(60%);
}

.motion-ok .contact-body__heading.is-inview .m-letter {
  transition:
    opacity 0.4s ease calc(0.65s + var(--i) * 0.05s),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) calc(0.65s + var(--i) * 0.05s);
}

.motion-ok .contact-form:not(.is-inview) :is(.c-form__row, .c-form__submit-wrap) {
  opacity: 0;
  transform: translateY(calc(20 * var(--s)));
}

.motion-ok .contact-form.is-inview :is(.c-form__row, .c-form__submit-wrap) {
  --d: 0.9s;
  transition:
    opacity 0.6s ease var(--d),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--d);
}

.motion-ok .contact-form.is-inview :is(.c-form__row, .c-form__submit-wrap):nth-child(2) {
  --d: 0.98s;
}

.motion-ok .contact-form.is-inview :is(.c-form__row, .c-form__submit-wrap):nth-child(3) {
  --d: 1.06s;
}

.motion-ok .contact-form.is-inview :is(.c-form__row, .c-form__submit-wrap):nth-child(4) {
  --d: 1.14s;
}

.motion-ok .contact-form.is-inview :is(.c-form__row, .c-form__submit-wrap):nth-child(5) {
  --d: 1.22s;
}

.motion-ok .contact-form.is-inview :is(.c-form__row, .c-form__submit-wrap):nth-child(n + 6) {
  --d: 1.3s;
}
