@charset "UTF-8";

/* =========================================================
   TOPページ 入口UI（2カラム）
   旧「ローディング後モーダル（p-top-intro-modal）」を差し替え。
   左：M&A／内装譲渡サポート → /lp-ma/
   右：研修／資格取得／助成金・補助金 → 入口を閉じて現TOPを表示
   配色は既存ブランド（#0097b2 → #8cc63f）に準拠。
   ========================================================= */

.p-top-entry {
	position: fixed;
	inset: 0;
	z-index: 100000; /* ローダー(z100)・サイト最大要素(z9999)・WP管理バー(z99999)より前面 */
	display: flex;
	flex-direction: column;
	background: #fff;
	opacity: 1;
	visibility: visible;
	transition: opacity .6s ease, visibility .6s ease;
}

/* 初回アクセス時のみ表示。サイト内遷移（下層→TOP）・再訪・右側選択後の再読込では
   front-page.php のインラインスクリプトが html.azt-entered を付与し、入口を非表示にする
   （＝通常のローディング/イントロが再生される）。 */
html.azt-entered .p-top-entry {
	display: none;
}

/* リード文（上部中央） */
.p-top-entry__lead {
	position: absolute;
	top: 2.4rem;
	left: 50%;
	z-index: 4;
	margin: 0;
	padding: 0 1.5rem;
	color: #fff;
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.5;
	text-align: center;
	text-shadow: 0 .2rem 1.2rem rgba(0, 0, 0, .4);
	white-space: nowrap;
	opacity: 0;
	transform: translate(-50%, 0);
	animation: top-entry-lead .8s .5s ease forwards;
}

@keyframes top-entry-lead {
	from { opacity: 0; transform: translate(-50%, -1rem); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

/* カラム群 */
.p-top-entry__cols {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
}

/* 各カラム（左=<a> / 右=<button> 共通） */
.p-top-entry__col {
	position: relative;
	flex: 1 1 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: none;
	background-color: #0a2a3d;
	color: #fff;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	overflow: hidden;
	-webkit-appearance: none;
	appearance: none;
	opacity: 0;
}

.p-top-entry__col--ma {
	animation: top-entry-in-l .8s .15s ease forwards;
}

.p-top-entry__col--ai {
	animation: top-entry-in-r .8s .15s ease forwards;
}

@keyframes top-entry-in-l {
	from { opacity: 0; transform: translateX(-2rem); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes top-entry-in-r {
	from { opacity: 0; transform: translateX(2rem); }
	to   { opacity: 1; transform: translateX(0); }
}

/* 背景スクリーンショット（拡大アニメ用に擬似要素へ）。
   上基準でクロップ＝ロゴ/メインビジュアルを優先表示（下を切る）。
   推奨ソース比は 3:4 縦長（横長フルページ画像だと左右が大きく切れる）。 */
.p-top-entry__col::before {
	content: "";
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: top center;
	background-repeat: no-repeat;
	transform: scale(1.02);
	transition: transform .8s ease;
}

/* --entry-bg は front-page.php が ACF（entrance_left/right）から出力。未設定時は同梱JPGにフォールバック */
.p-top-entry__col--ma::before {
	background-image: var(--entry-bg, url("../img/top-entry-bg-ma.jpg"));
}

.p-top-entry__col--ai::before {
	background-image: var(--entry-bg, url("../img/top-entry-bg-ai.jpg"));
}

/* オーバーレイ（文字可読性の確保） */
.p-top-entry__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	transition: opacity .4s ease;
}

.p-top-entry__col--ma .p-top-entry__overlay {
	background: linear-gradient(180deg, rgba(0, 50, 80, .48), rgba(0, 45, 72, .74));
}

.p-top-entry__col--ai .p-top-entry__overlay {
	background: linear-gradient(180deg, rgba(0, 85, 75, .44), rgba(8, 80, 38, .72));
}

/* ラベル本体 */
.p-top-entry__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.8rem;
	padding: 2rem;
	text-align: center;
	transition: transform .5s ease;
}

.p-top-entry__label {
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .04em;
	text-shadow: 0 .2rem 1.6rem rgba(0, 0, 0, .45);
}

.p-top-entry__cta {
	display: inline-flex;
	align-items: center;
	gap: .9rem;
	padding: 1.1rem 2.8rem;
	border: 1px solid rgba(255, 255, 255, .9);
	border-radius: 5rem;
	background: rgba(255, 255, 255, .08);
	font-size: 1.4rem;
	font-weight: 600;
	letter-spacing: .08em;
	transition: background-color .4s ease, color .4s ease;
}

.p-top-entry__arrow {
	display: inline-block;
	width: .8rem;
	height: .8rem;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .4s ease;
}

/* PC ホバー（幅は左右50%固定。オーバーで背景画像のみ拡大） */
@media screen and (min-width: 768px) {
	.p-top-entry__col:hover::before {
		transform: scale(1.1);
	}

	.p-top-entry__col:hover .p-top-entry__overlay {
		opacity: .8;
	}

	.p-top-entry__col:hover .p-top-entry__body {
		transform: translateY(-.4rem);
	}

	.p-top-entry__col:hover .p-top-entry__cta {
		background: rgba(255, 255, 255, .95);
		color: #0097b2;
	}

	.p-top-entry__col:hover .p-top-entry__arrow {
		transform: rotate(45deg) translate(.2rem, -.2rem);
	}
}

/* ------------- SP（縦2分割） ------------- */
@media screen and (max-width: 767px) {
	.p-top-entry__cols {
		flex-direction: column;
	}

	.p-top-entry__col {
		flex: 1 1 50%;
	}

	.p-top-entry__col--ma {
		animation-name: top-entry-in-t;
	}

	.p-top-entry__col--ai {
		animation-name: top-entry-in-b;
	}

	@keyframes top-entry-in-t {
		from { opacity: 0; transform: translateY(-2rem); }
		to   { opacity: 1; transform: translateY(0); }
	}

	@keyframes top-entry-in-b {
		from { opacity: 0; transform: translateY(2rem); }
		to   { opacity: 1; transform: translateY(0); }
	}

	.p-top-entry__lead {
		top: 1.6rem;
		width: 100%;
		font-size: 1.3rem;
		white-space: normal;
	}

	.p-top-entry__label {
		font-size: 1.7rem;
	}

	.p-top-entry__cta {
		padding: 1rem 2.4rem;
		font-size: 1.3rem;
	}
}
