/* ===============================
   CONTACT PAGE
================================== */

/* ===== HERO ===== */
.contact-hero {
  position: relative;
  min-height: clamp(320px, 55vh, 480px);
  display: grid;
  align-items: end;
  overflow: hidden;
}
.contact-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.contact-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.contact-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.72) 60%,
    rgba(0, 0, 0, 0.88) 100%
  );
}
.contact-hero__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;

  position: relative; /* 追加 */
  z-index: 2; /* オーバーレイより前に出す */
}

.contact-hero__bar {
  flex: 0 0 60px;
  height: 2px;
  background: #fff;
  margin-top: clamp(20px, 6vh, 60px);
}

.contact-hero__title {
  margin: clamp(20px, 6vh, 60px) 0 0 0;
  font-size: clamp(2rem, 6vw, 5rem); /* 最大を5rem(約80px)まで拡張 */
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 2;
}

.contact-crumbs {
  display: flex;
  justify-content: flex-end; /* 横方向の右寄せ */
  align-items: center;
  align-self: flex-end;
  gap: 8px;

  position: relative;
  z-index: 2; /* オーバーレイより前に出す */

  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(0.9rem, 1.4vw, 1.2rem);
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 12px; /* 見出しとちょっと間隔を空ける */
  padding-right: clamp(16px, 5vw, 40px);
}

.contact-crumbs a {
  color: inherit;
  text-decoration: none;
}

.contact-crumbs__sep {
  display: inline;
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.7);
  background: none; /* 念のためボックス化防止 */
}

/* ===== FORM SECTION ===== */
.contact-section {
  position: relative;
  z-index: 1;
  background: var(--color-bg);
  padding: var(--section-gap-top) var(--section-padding-side);
}

/* 2カラム（左：ラベル／右：入力） */
.contact-form {
  width: min(var(--content-rail), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: clamp(160px, 20vw, 220px) 1fr;
  column-gap: clamp(20px, 3vw, 32px);
  row-gap: clamp(22px, 3vw, 28px);
  align-items: center;
}
.contact-form__row {
  display: contents;
}

.contact-form__label {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-family: var(--font-jp);
  font-size: var(--font-size-small);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
}

.chip {
  display: inline-block;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 2px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-align: center;
}
.chip--req {
  background: var(--chip-req, #3a3a3a);
  color: var(--color-text);
}
.chip--opt {
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-text);
}

.contact-form__field {
  width: 100%;
}

/* Inputs */
.input,
.textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-bg);
  background: #fff;
  border: 1px solid var(--bd-input, #e5e5e5);
  border-radius: 0;
  padding: 12px 16px;
  outline: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.input {
  height: 56px;
  padding: 0 18px;
}
.textarea {
  height: clamp(200px, 28vh, 280px);
  padding: 14px 18px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
}
.input:focus,
.textarea:focus {
  border-color: var(--color-text);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* エラー表示 */
.is-error .input,
.is-error .textarea {
  border-color: var(--error, #f45);
  box-shadow: 0 0 0 3px rgba(255, 68, 85, 0.2);
}
.field-msg {
  display: none;
  margin-top: 6px;
  font-size: var(--font-size-small);
  letter-spacing: 0.06em;
  color: #f99;
}
.is-error .field-msg {
  display: block;
}

/* ===============================
   CHECKBOX STYLE
================================== */

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;

  /* PCブラウザは accent-color で白いチェックマーク */
  accent-color: var(--color-text);
}

.checkbox span {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-small);
  letter-spacing: 0.08em;
}

.checkbox span a {
  pointer-events: auto; /* リンクだけ有効 */
}

/* プライバシーポリシーリンク（文中） */
.contact-form__row--privacy a {
  color: #fff;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}
.contact-form__row--privacy a:hover {
  opacity: 0.8;
}

/* ===============================
   iOS Safari 対策
   → accent-color が効かない環境用
================================== */
@supports (-webkit-touch-callout: none) {
  .checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #fff;
    border-radius: 2px;
    background: transparent;
    position: relative;
  }

  .checkbox input[type="checkbox"]:checked {
    background: #fff;
  }

  .checkbox input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
}

/* ===== ボタン ===== */

.contact-form__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end; /* ← これで右寄せ */
  margin-top: clamp(24px, 4vw, 40px);
}

.btn-send {
  display: inline-block;
  white-space: nowrap; /* ← これで改行させない！ */
  padding: 10px 40px;
  border: 1px solid var(--color-text);
  letter-spacing: 0.12em;
  font-family: var(--font-en);
  text-decoration: none;
  color: var(--color-text);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-send:hover {
  padding: 10px 100px;
  background: var(--color-text);
  color: #000;
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
  .contact-crumbs {
    justify-content: flex-start;
  }
  .contact-form {
    grid-template-columns: 1fr;
  }
  .contact-form__label {
    margin-bottom: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-send,
  .input,
  .textarea {
    transition: none;
  }
}
/* ==============================
   確認画面スタイル
============================== */

.contact-confirm-page {
  background: var(--color-bg);
  color: var(--color-text);
  padding: 2vh var(--section-padding-side) 5vh;
}

/* 見出し */
.confirm-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: left;
  margin: 0 auto 60px;
  max-width: 800px;
}

/* リスト全体 */
.confirm-list {
  max-width: 800px;
  margin: 0 auto 50px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px 20px;
}

/* ラベル */
.confirm-list dt {
  font-weight: 700;
  font-size: var(--font-size-small);
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.08em;
  align-self: start;
}

/* 値 */
.confirm-list dd {
  font-size: var(--font-size-body);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.05); /* ← 入力欄っぽい */
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* ボタンエリア */
.form-actions {
  display: flex;
  justify-content: flex-end; /* ← 横方向を右寄せ */
  gap: 16px;
  max-width: 800px;
  margin: var(--sp-gap-lg, 32px) auto 0;
}
.form-actions .btn-send {
  padding: 12px 40px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  transition: background 0.3s, color 0.3s;
}

.form-actions .btn-send:hover {
  background: #fff;
  color: #000;
}

/* SPレスポンシブ */
@media (max-width: 768px) {
  .confirm-list {
    grid-template-columns: 1fr;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .btn-send {
    width: 100%;
  }
}
/* ==============================
   THANKS ページ専用スタイル
============================== */

.contact-thanks-page {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* ← 上寄せ */
  padding-top: 5vh; /* ← 上の余白を少なめに */
  padding-bottom: 5vh; /* ← 下も余裕あれば少し取る */
  background: var(--color-bg);
}

.thanks-inner {
  max-width: 800px;
  width: 100%;
  text-align: right; /* ← テキスト・ボタンを右寄せに */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* ← ここで右寄せ */
  gap: 1rem;
}
.thanks-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 0px;
}

.thanks-message {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.8;
  color: #fff;
}

.contact-thanks-page .form-actions {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end; /* ← ボタンを右端に */
  width: 80%; /* ← 文章の幅と揃える */
}

@media (max-width: 768px) {
  .contact-thanks-page .form-actions {
    align-items: flex-end; /* ← ボタンを右寄せ */
  }

  .contact-thanks-page .form-actions .btn-send {
    width: auto; /* ← 自動サイズにする */
    max-width: 280px; /* ← 必要なら制限 */
  }
}
