/* =========================================================
   お問い合わせ contact.html
   PC: 上原ファーム CONTACT.dc.html / SP・TB: MContact.dc.html
   ========================================================= */
@keyframes stampIn { 0% { opacity: 0; transform: scale(2.2) rotate(-30deg) } 60% { opacity: 1; transform: scale(.92) rotate(-10deg) } 100% { opacity: 1; transform: rotate(-8deg) } }
@keyframes contactRing { 0% { transform: scale(1); opacity: .7 } 100% { transform: scale(2.2); opacity: 0 } }

/* PCだけ／TB・SPだけ */
@media (max-width: 1199px) { .pc-only { display: none !important; } }
@media (min-width: 1200px) { .m-only { display: none !important; } }

/* ヒーローの写真の下地（このページの色） */
.page-hero__photo { background: repeating-linear-gradient(135deg,#EDE6D2 0 14px,#F5F0E2 14px 28px); }
@media (max-width: 1199px) { .page-hero__photo { background: repeating-linear-gradient(135deg,#EDE6D2 0 12px,#F5F0E2 12px 24px); } }

:root { --err: #C2502A; --off: #9A8F94; }

/* ---------- レイアウト ---------- */
.contact { padding: 130px var(--pad-x) 150px; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 90px; align-items: start; }
.contact__side { display: flex; flex-direction: column; gap: 36px; }
.contact__intro { display: flex; flex-direction: column; gap: 20px; }
.contact__title { font-family: var(--font-mincho); font-size: 26px; font-weight: 600; letter-spacing: .1em; line-height: 1.7; }
.contact__nowrap { white-space: nowrap; }
.contact__lead { font-size: 15px; line-height: 2.1; color: var(--muted); text-wrap: pretty; }

.tel-card { display: flex; flex-direction: column; gap: 10px; padding: 32px; border-radius: 32px; background: var(--sand); color: var(--ink); }
.tel-card:hover { color: var(--ink); }
.tel-card__label { font-size: 11px; font-weight: 700; letter-spacing: .3em; color: var(--green); }
.tel-card__num { font-family: var(--font-mono); font-size: 28px; color: var(--plum); }
.tel-card__note { font-size: 13px; color: var(--muted); }

.faq-link {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 24px 28px; border-radius: 24px; border: 2px dotted rgba(91,42,78,.3); color: var(--ink);
  transition: background .4s, transform .4s cubic-bezier(.3,1.5,.5,1);
}
.faq-link:hover { color: var(--ink); background: var(--sand); transform: translateX(6px); }
.faq-link__text { display: flex; flex-direction: column; gap: 4px; }
.faq-link__en { font-size: 11px; font-weight: 700; letter-spacing: .3em; color: var(--plum); }
.faq-link__ja { font-size: 15px; font-weight: 700; }
.faq-link__arrow { font-family: var(--font-mono); color: var(--plum); }

/* ---------- フォームのカード ---------- */
.form-card {
  position: relative; padding: 64px 72px; background: #FFFDF8; border-radius: 48px;
  box-shadow: 0 30px 60px -36px rgba(62,30,58,.3); min-height: 820px;
}
.form-card__dot { position: absolute; right: -16px; top: -16px; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); animation: floatY 6s ease-in-out infinite; }

/* 手順 */
.steps { display: flex; align-items: center; gap: 12px; margin: 0 0 48px; padding: 0; list-style: none; }
.steps__item { display: flex; align-items: center; gap: 12px; }
.steps__item:not(:last-child)::after { content: ""; width: 48px; border-top: 2px dotted rgba(91,42,78,.35); }
.steps__no {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; background: transparent; color: var(--plum); border: 2px solid var(--plum);
  transition: all .5s var(--ease-bounce);
}
.steps__t { font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--off); transition: color .4s; }
.steps__item.is-on .steps__no { background: var(--plum); color: #fff; }
.steps__item.is-on .steps__t { color: var(--ink); }
.steps__item[aria-current="step"] .steps__no { transform: scale(1.15); }

/* 入力 */
.cform { display: flex; flex-direction: column; gap: 30px; animation: fadeIn .5s both; }
.cform[hidden], .confirm[hidden], .done[hidden] { display: none; }
.cform__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.cform__group > legend { padding: 0; margin-bottom: 12px; }
.cform__field { display: flex; flex-direction: column; gap: 10px; }
.cform__label { font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.cform__req { color: var(--err); font-size: 12px; }
.cform__req--opt { color: var(--muted); }
.cform__input {
  font-family: var(--font-base); font-size: 16px; padding: 16px 22px; border-radius: 20px;
  border: 2px solid rgba(91,42,78,.2); background: var(--cream); color: var(--ink); outline: none;
  transition: border-color .3s, box-shadow .3s; width: 100%;
}
.cform__input::placeholder { color: #A99FA4; }
.cform__input:focus, .cform__input:focus-visible { border-color: var(--sun); box-shadow: 0 0 0 5px rgba(242,179,61,.25); outline: none; border-radius: 20px; }
.cform__input[aria-invalid="true"] { border-color: var(--err); }
.cform__textarea { line-height: 1.8; resize: vertical; }
.cform__err { font-size: 12px; color: var(--err); animation: fadeIn .3s both; }

.kinds { display: flex; gap: 12px; flex-wrap: wrap; }
.kind { position: relative; }
.kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind span {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--plum); background: transparent; color: var(--plum);
  transition: all .4s var(--ease-bounce);
}
.kind input:checked + span { background: var(--plum); color: #fff; transform: scale(1.05); }
.kind input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 3px; }

.agree { align-self: flex-start; position: relative; }
.agree__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.agree__label { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
.agree__label a { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; }
.agree__box {
  flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--plum); background: transparent;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; transition: background .3s;
}
.agree__input:checked + .agree__label .agree__box { background: var(--plum); }
.agree__input:checked + .agree__label .agree__box::before { content: "✓"; }
.agree__input:focus-visible + .agree__label .agree__box { outline: 2px solid var(--plum); outline-offset: 3px; }

.cform__submit {
  align-self: center; display: flex; align-items: center; gap: 14px; margin-top: 8px;
  background: var(--off); color: #fff; border: 0; border-radius: 999px; padding: 18px 48px;
  font-family: var(--font-base); font-size: 16px; font-weight: 700; letter-spacing: .12em; cursor: pointer;
  transition: all .4s var(--ease-bounce);
}
.cform__submit:hover { transform: translateY(-3px) scale(1.03); }
.cform__submit.is-ready { background: var(--plum); }
.cform__submit .arrow { font-family: var(--font-mono); }

/* 確認 */
.confirm { display: flex; flex-direction: column; gap: 12px; animation: fadeIn .5s both; outline: none; }
.confirm__list { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.confirm__row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 20px 4px; border-bottom: 2px dotted rgba(91,42,78,.25); font-size: 15px; line-height: 1.9; }
.confirm__row dt { font-weight: 700; color: var(--plum); letter-spacing: .08em; }
.confirm__row dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm__error { font-size: 13px; line-height: 1.9; color: var(--err); text-align: center; margin-top: 16px; }
.confirm__btns { display: flex; justify-content: center; gap: 16px; margin-top: 40px; }
.confirm__back {
  border: 2px solid var(--plum); background: transparent; color: var(--plum); border-radius: 999px; padding: 16px 36px;
  font-family: var(--font-base); font-size: 15px; font-weight: 700; letter-spacing: .1em; cursor: pointer;
  transition: background .3s, color .3s;
}
.confirm__back:hover { background: var(--sand); }
.confirm__send {
  border: 0; background: var(--plum); color: #fff; border-radius: 999px; padding: 16px 44px;
  font-family: var(--font-base); font-size: 15px; font-weight: 700; letter-spacing: .1em; cursor: pointer;
  transition: transform .4s var(--ease-bounce);
}
.confirm__send:hover { transform: translateY(-3px) scale(1.03); }
.confirm__send:disabled { opacity: .6; cursor: wait; transform: none; }

/* 完了 */
.done { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 60px 0; text-align: center; }
.done__stamp { position: relative; width: 150px; height: 150px; }
.done__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sun); animation: contactRing 1.6s ease-out .5s both; }
.done__mark {
  position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--err);
  box-shadow: inset 0 0 0 6px #FFFDF8, inset 0 0 0 8px var(--err);
  display: flex; align-items: center; justify-content: center; color: var(--err); font-size: 60px; font-weight: 700;
  animation: stampIn .8s cubic-bezier(.3,1.4,.5,1) both;
}
.done__title { font-family: var(--font-mincho); font-size: 30px; font-weight: 600; letter-spacing: .14em; animation: riseIn .8s .5s both; outline: none; }
.done__text { font-size: 15px; line-height: 2.1; color: var(--muted); animation: riseIn .8s .7s both; }
.done__top { animation: riseIn .8s .9s both; }

/* ---------- TB（768〜1199px） ---------- */
@media (max-width: 1199px) {
  .contact { display: flex; flex-direction: column; gap: 28px; padding: 80px 96px 100px; }
  .contact__side, .contact__intro { display: contents; }
  .contact__title { font-size: 26px; letter-spacing: .08em; }
  .contact__nowrap { white-space: normal; }
  .contact__lead { font-size: 14px; line-height: 2; }
  .tel-card { gap: 6px; padding: 22px 24px; border-radius: 24px; }
  .tel-card__num { font-size: 24px; }
  .tel-card__note { font-size: 12px; }

  .form-card { padding: 48px; border-radius: 32px; box-shadow: 0 24px 48px -30px rgba(62,30,58,.3); min-height: 0; }
  .form-card__dot { display: none; }

  .steps { justify-content: center; gap: 8px; margin-bottom: 32px; }
  .steps__item { gap: 8px; }
  .steps__item:not(:last-child)::after { width: 20px; }
  .steps__no { width: 30px; height: 30px; font-size: 12px; }
  .steps__t { font-size: 12px; letter-spacing: 0; }

  .cform { gap: 22px; }
  .cform__group > legend { margin-bottom: 10px; }
  .cform__field { gap: 8px; }
  .cform__label { font-size: 13px; letter-spacing: 0; }
  .cform__req { font-size: 11px; }
  .cform__input, .cform__input:focus, .cform__input:focus-visible { padding: 14px 18px; border-radius: 18px; }
  .kinds { gap: 8px; }
  .kind span { font-size: 13px; padding: 10px 16px; }
  .kind input:checked + span { transform: none; }
  .agree__label { gap: 10px; font-size: 13px; }
  .agree__box { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
  .cform__textarea { height: 176px; }
  .cform__submit { align-self: stretch; justify-content: center; gap: .3em; margin-top: 0; padding: 17px; font-size: 15px; letter-spacing: .1em; }
  .cform__submit:hover { transform: none; }
  .cform__submit .arrow { font-family: inherit; }

  .confirm { gap: 0; }
  .confirm__list { gap: 0; }
  .confirm__row { display: flex; flex-direction: column; gap: 4px; padding: 14px 2px; font-size: 14px; line-height: normal; }
  .confirm__row dt { font-size: 12px; letter-spacing: 0; }
  .confirm__btns { flex-direction: column-reverse; gap: 12px; margin-top: 28px; }
  .confirm__send { padding: 16px; letter-spacing: 0; }
  .confirm__back { padding: 14px; font-size: 14px; letter-spacing: 0; }
  .confirm__send:hover { transform: none; }
  .confirm__back:hover { background: transparent; }

  .done { gap: 22px; padding: 32px 0; }
  .done__stamp { width: 120px; height: 120px; }
  .done__mark { font-size: 48px; box-shadow: inset 0 0 0 5px #FFFDF8, inset 0 0 0 7px var(--err); }
  .done__title { font-size: 22px; letter-spacing: .1em; }
  .done__text { font-size: 13px; line-height: 2; }
}

/* ---------- SP（〜767px） ---------- */
@media (max-width: 767px) {
  .contact { padding: 56px 20px 80px; }
  .contact__title { font-size: 21px; }
  .form-card { padding: 32px 22px; }
}
