/* ============================================================
   cta-form.css — CTA ブロック + インラインフォーム
   全ページ共通。AtoBoo デザイントークン（オリーブ系）に合わせる。
============================================================ */

/* ============================================================
   CTA ブロック基盤（全ページ共通）
   ※ page-about.css から移動。l-container 突き破り全幅表示。
============================================================ */
.cta-block {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	padding: 80px 48px;
	background-color: #3f3b00;   /* ダークオリーブ */
	color: #3f3b00;
}

.cta-block__inner {
	max-width: 760px;
	margin: 0 auto;
	padding: 60px 48px;
	text-align: center;
	background: #ededdc;
	border-radius: 0 32px 0 32px;
	box-shadow: 8px 16px 48px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.15);
}

.cta-block__title {
	font-size: clamp(1.25rem, 3vw, 1.7rem);
	font-weight: 700;
	margin-bottom: 1.5rem;
	letter-spacing: 0.05em;
	color: #3f3b00;
}

.cta-block__body {
	font-size: 0.95rem;
	line-height: 1.8;
	color: #3f3b00;
	opacity: 0.85;
	margin-bottom: 0.75rem;
}

.cta-block__note {
	font-size: 0.85rem;
	color: #3f3b00;
	opacity: 0.6;
	margin-bottom: 2.25rem;
}

/* --- CTA ボタン（トグルトリガー） --------------------------------- */
.cta-block__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #c45c3a;
	color: #ededdc;
	font-weight: 700;
	font-size: 1rem;
	padding: 0.9rem 2.75rem;
	border-radius: 2px;
	border: none;
	cursor: pointer;
	letter-spacing: 0.08em;
	font-family: inherit;
	transition: background-color 0.2s;
	/* button のデフォルトリセット */
	-webkit-appearance: none;
}

.cta-block__btn:hover {
	background-color: #a34a2e;
	color: #ededdc;
}

/* 開いているとき */
.cta-block__btn[aria-expanded="true"] {
	background-color: rgba(196, 92, 58, 0.7);
	color: #ededdc;
	border: none;
}

.cta-block__btn[aria-expanded="true"]:hover {
	background-color: rgba(196, 92, 58, 0.85);
}


/* ============================================================
   フォームラッパー（展開アニメーション）
============================================================ */
.cta-form-wrapper {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition:
		max-height 0.55s cubic-bezier(0.16, 1, 0.3, 1),
		opacity    0.3s  ease;
}

.cta-form-wrapper.is-open {
	max-height: 2400px;   /* フォーム全体が収まる十分な高さ */
	opacity: 1;
}


/* ============================================================
   フォーム本体
============================================================ */
.cta-form {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(63, 59, 0, 0.15);
	text-align: left;
}

.cta-form__required-note {
	display: block;
	font-size: 0.75rem;
	opacity: 0.55;
	margin-bottom: -0.5rem;
}

/* ハニーポット（ボット対策・視覚的に非表示） */
.hp-field {
	display: none !important;
	visibility: hidden;
	position: absolute;
	left: -9999px;
}


/* ============================================================
   フォームコンポーネント
============================================================ */

/* --- 行・グループ ------------------------------------------- */
.form-row {
	width: 100%;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* --- ラベル ------------------------------------------------- */
.form-label {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: #3f3b00;
}

.required {
	color: #c45c3a;
	margin-left: 2px;
	font-weight: 700;
}

.optional {
	font-size: 0.78rem;
	font-weight: 400;
	opacity: 0.5;
	margin-left: 4px;
	letter-spacing: 0.04em;
}

/* --- 入力欄ラッパー（フローティングヒントの基点） --------------- */
.form-field {
	position: relative;
}

/* --- テキスト入力・textarea --------------------------------- */
.form-input {
	width: 100%;
	background: transparent;
	border: none;
	border-bottom: 1px solid rgba(63, 59, 0, 0.25);
	padding: 10px 0;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 400;
	color: #3f3b00;
	outline: none;
	transition: border-color 0.2s ease;
	-webkit-appearance: none;
}

.form-input::placeholder {
	color: rgba(63, 59, 0, 0.35);
}

.form-input:focus {
	border-bottom-color: rgba(63, 59, 0, 0.7);
}

/* --- フローティングヒント（値が入ったときに上に浮かぶ記入例） --- */
.form-hint {
	position: absolute;
	top: 3px;
	left: 0;
	font-size: 0.7rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: rgba(63, 59, 0, 0.45);
	pointer-events: none;
	opacity: 0;
	transform: translateY(3px);
	transition:
		opacity   0.2s ease,
		transform 0.2s ease;
}

/* 値が入力されたとき（プレースホルダー非表示）にヒントを表示 */
.form-input:not(:placeholder-shown) ~ .form-hint {
	opacity: 1;
	transform: translateY(0);
}

/* ヒントの分の上余白を確保（入力テキストと重ならないよう） */
.form-input:not(:placeholder-shown) {
	padding-top: 20px;
}

/* --- バリデーションエラー ------------------------------------ */
.form-input.is-invalid {
	border-bottom-color: #c45c3a;
}

.form-error {
	font-size: 0.78rem;
	color: #c45c3a;
	letter-spacing: 0.03em;
	margin-top: 4px;
	line-height: 1.4;
}

/* --- textarea ----------------------------------------------- */
.form-textarea {
	resize: vertical;
	min-height: 110px;
	line-height: 1.75;
}

/* --- セレクトボックス --------------------------------------- */
.form-select {
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	padding-right: 28px;
	/* ダーク矢印SVG */
	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 1l5 5 5-5' stroke='%233f3b00' stroke-opacity='0.6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
}

.form-select option {
	background: #ededdc;
	color: #3f3b00;
}

.form-select:invalid,
.form-select option[value=""] {
	color: rgba(63, 59, 0, 0.35);
}

.form-select:not(:invalid) {
	color: #3f3b00;
}


/* ============================================================
   チェックボックス
============================================================ */
.check-list {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.check-item {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	cursor: pointer;
	line-height: 1.5;
}

/* 実際のチェックボックスは隠す */
.check-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* カスタムチェックボックス */
.check-box {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 0.1em;
	border: 1.5px solid rgba(63, 59, 0, 0.4);
	border-radius: 2px;
	background: transparent;
	transition: border-color 0.15s, background-color 0.15s;
	position: relative;
}

.check-item:hover .check-box {
	border-color: rgba(63, 59, 0, 0.7);
}

.check-input:checked ~ .check-box {
	background: #3f3b00;
	border-color: #3f3b00;
}

/* チェックマーク */
.check-input:checked ~ .check-box::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 6px;
	height: 10px;
	border: 2px solid #ededdc;
	border-top: none;
	border-left: none;
	transform: rotate(45deg);
}

/* フォーカス可視化（キーボード操作対応） */
.check-input:focus-visible ~ .check-box {
	outline: 2px solid rgba(63, 59, 0, 0.6);
	outline-offset: 2px;
}

.check-label {
	font-size: 0.9rem;
	color: rgba(63, 59, 0, 0.85);
	line-height: 1.5;
}

.check-label a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.check-label a:hover {
	opacity: 0.75;
}


/* ============================================================
   フォームフッター（送信ボタン + reCAPTCHA 注記）
============================================================ */
.cta-form__footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	padding-top: 0.5rem;
}

/* 送信ボタン */
.cta-form__submit {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #c45c3a;
	color: #ededdc;
	border: none;
	padding: 0.9rem 2.5rem;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	border-radius: 2px;
	cursor: pointer;
	transition: opacity 0.2s;
}

.cta-form__submit:hover {
	opacity: 0.8;
}

.cta-form__submit:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.submit-icon {
	display: flex;
	align-items: center;
}

.submit-icon svg {
	width: 16px;
	height: 16px;
}

/* reCAPTCHA 注記 */
.recaptcha-notice {
	font-size: 0.7rem;
	opacity: 0.45;
	line-height: 1.6;
}

.recaptcha-notice a {
	color: inherit;
	text-decoration: underline;
}


/* ============================================================
   送信完了・エラーページ（page-thanks.php / page-form-error.php）
============================================================ */
.result-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding-block: 5rem;
}

.result-page__inner {
	max-width: 540px;
	text-align: center;
	padding-inline: var(--ark-padding--container, min(48px, 4vw));
}

.result-page__eyebrow {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	color: var(--ark-color--main, #3f3b00);
	opacity: 0.55;
	margin-bottom: 1rem;
}

.result-page__heading {
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.04em;
	margin-bottom: 1.5rem;
	color: var(--ark-color--text, #3f3b00);
}

.result-page--error .result-page__heading {
	color: #7a2020;
}

.result-page__body {
	font-size: 0.95rem;
	line-height: 1.8;
	color: var(--ark-color--text, #3f3b00);
	opacity: 0.75;
	margin-bottom: 1.5rem;
}

/* エラーページのメールアドレス（難読化） */
.result-page__email {
	font-size: 0.9rem;
	margin-bottom: 2rem;
	opacity: 0.7;
}

.result-page__link {
	display: inline-block;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ark-color--link, #65a1d8);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 0.1em;
	transition: opacity 0.15s;
}

.result-page__link:hover {
	opacity: 0.7;
}


/* ============================================================
   レスポンシブ
============================================================ */
@media (max-width: 640px) {
	.cta-block {
		padding-left: 16px;
		padding-right: 16px;
	}

	.cta-block__inner {
		padding: 40px 24px;
	}
}
