/* お問い合わせページ */

.contact-page {
  background: #fff;
}

/* =============================================
   ヒーローセクション
   ============================================= */
.contact-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  display: grid;
  align-items: center;
  background: #fff;
}

.contact-hero__image {
  position: absolute;
  inset: 0;
  background: url("a_imges/top.png") center right / cover;
}

.contact-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.65);
  opacity: 0;
  pointer-events: none;
}

.contact-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 86px 34px;
}

.contact-hero h1 {
  font-size: clamp(2.35rem, 5vw, 3.7rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.contact-hero__lead {
  color: var(--green-dark);
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.contact-hero__inner p:not(.contact-hero__lead) {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 2.05;
  color: #44443e;
}

/* 葉っぱ装飾 */
.contact-hero__leaf {
  position: absolute;
  top: -50px;
  right: -20px;
  width: clamp(180px, 28vw, 340px);
  opacity: 0.78;
  pointer-events: none;
  z-index: 2;
}

/* =============================================
   フォームセクション
   ============================================= */
.contact-form-section {
  padding: 70px 34px 82px;
  background: #fff;
}

.contact-form-wrap {
  max-width: var(--max);
  margin: 0 auto;
  background: #fff;
  border: 0;
  border-radius: 6px;
  padding: 44px 38px 36px;
  box-shadow: 0 8px 28px rgba(57, 54, 42, 0.09);
}

/* =============================================
   フォーム各要素
   ============================================= */
.form-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0 26px;
  align-items: start;
  padding: 22px 12px;
  border-bottom: 1px solid #ede8e0;
}

.form-row:last-of-type {
  border-bottom: 0;
}

.form-row--privacy {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 30px 0 0;
  border-bottom: 0;
}

/* ラベル */
.form-label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-top: 15px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: #3a3a34;
  line-height: 1.5;
}

.form-label__required {
  display: inline-block;
  padding: 0;
  background: transparent;
  color: var(--gold-dark);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.6;
  flex-shrink: 0;
}

/* テキスト入力 */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #d4cfc6;
  background: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: #3a3a34;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(44, 80, 42, 0.1);
  background: #fff;
}

/* バリデーションエラー時 */
.form-input[aria-invalid="true"],
.form-select[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
  border-color: #c0392b;
}

.form-input--half {
  max-width: none;
}

/* セレクトボックス */
.form-select-wrap {
  position: relative;
}

.form-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #888;
  pointer-events: none;
}

.form-select {
  cursor: pointer;
  padding-right: 36px;
  color: #3a3a34;
}

.form-select option[value=""] {
  color: #999;
}

/* テキストエリア */
.form-textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.8;
}

/* エラーメッセージ */
.form-error {
  grid-column: 2;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.74rem;
  color: #c0392b;
  font-weight: 500;
}

/* チェックボックス */
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1rem;
  color: #3a3a34;
  user-select: none;
}

.form-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-checkbox__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid #c0b9ae;
  background: #fafaf8;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.form-checkbox input:checked + .form-checkbox__mark {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.form-checkbox input:checked + .form-checkbox__mark::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.form-checkbox input:focus + .form-checkbox__mark {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
}

.form-link {
  color: var(--green-dark);
  text-decoration: underline;
}

/* 送信ボタン */
.form-submit-wrap {
  padding-top: 32px;
  text-align: center;
}

.form-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 520px);
  min-height: 70px;
  padding: 18px 56px;
  background: var(--green-dark);
  color: #fff;
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.form-submit:hover {
  opacity: 0.85;
}

.form-submit:disabled {
  color: #fff;
  background: #a9ada5;
  cursor: not-allowed;
  opacity: 0.65;
}

.form-submit:disabled:hover {
  opacity: 0.65;
}

.form-submit span {
  position: absolute;
  right: 28px;
  font-size: 1.5rem;
}

/* 送信完了表示 */
.form-thanks {
  text-align: center;
  padding: 20px 0;
}

.form-thanks__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  background: #eef3eb;
  border-radius: 50%;
  color: var(--green-dark);
}

.form-thanks__icon svg {
  width: 42px;
  height: 42px;
}

.form-thanks h3 {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

.form-thanks p {
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 2;
  color: #5c5b54;
  margin-bottom: 28px;
}

/* =============================================
   送信完了ページ (thanks.php)
   ============================================= */
.thanks-section {
  min-height: calc(100vh - 200px);
  display: grid;
  align-items: center;
  padding: 80px 34px;
}

.thanks-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.thanks-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  background: #eef3eb;
  border-radius: 50%;
  color: var(--green-dark);
}

.thanks-icon svg {
  width: 46px;
  height: 46px;
}

.thanks-inner h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.6;
  margin-bottom: 22px;
}

.thanks-inner p {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 2.1;
  color: #5c5b54;
  margin-bottom: 34px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* =============================================
   レスポンシブ
   ============================================= */
@media (max-width: 900px) {
  .contact-form-wrap {
    padding: 36px 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .form-label {
    padding-top: 0;
  }

  .form-error {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  /* スマホ：TOP画像にテキスト可読用の白オーバーレイを表示 */
  .contact-hero__overlay {
    opacity: 1;
  }

  .contact-hero__inner {
    padding: 72px 20px;
  }

  .contact-hero__leaf {
    width: 160px;
    top: -20px;
    right: -10px;
  }

  .contact-form-section {
    padding: 36px 16px 54px;
  }

  .contact-form-wrap {
    padding: 28px 20px;
    border: none;
    box-shadow: 0 4px 24px rgba(57,54,42,0.07);
  }

  .form-input--half {
    max-width: 100%;
  }

  .form-submit {
    width: 100%;
    min-width: 0;
  }

  .thanks-section {
    padding: 60px 20px;
  }
}
