/*
 * トップページ(事業部TOP)
 * デザイン: Figma「事業部TOP｜PC1440_修正版」。
 * SP版のデザインは無いため、769px以下は PC をもとに組んだ(375px で確認)。770〜1279px は PC の組み方を縮めるだけ。
 *
 * このページのデザインは、他のページと色が違う(紺 #0b1f5c / 青 #1a3fc2 / 文字 #15232f)。
 * ページ内だけのカスタムプロパティにして、共通の --color-* は変えない。
 * お問い合わせ・採用情報の青(#005ef5)は修正前のデザインから変わっていない。
 * 英字・数字はデザインでは Montserrat だが、他のページと同じ Inter にした(フォントを増やさないため)。
 * 例外としてヒーローの「MIRAPRO」だけは Montserrat(その6文字だけを読み込む)。
 */
.p-top {
	--top-color-navy: #0b1f5c;
	--top-color-blue: #1a3fc2;
	--top-color-blue-light: #a9c4f2;
	--top-color-cyan: #19bfd8;
	--top-color-brand: #005ef5; /* お問い合わせ・採用情報 */
	--top-color-text: #15232f;
	--top-color-text-body: #3a4558;
	--top-color-text-sub: #4a5868;
	--top-color-tint: #f3f6fb;
	--top-color-panel: #f7f9fc; /* 白い箱の中の図の地 */
	--top-color-form: #f2f6fc; /* お問い合わせフォームの地 */
	--top-color-line: #d6e2f2;
	--top-color-muted: #c9d5e6; /* 「任意」の地 */
	--top-color-word: rgb(0 94 245 / 0.05); /* 背景に薄く置く大きな英字 */
	--top-shadow: 0 10px 30px rgb(11 31 92 / 0.08);

	/* セクションの中身の幅。デザインは 1440px の画面で左右160pxあける */
	--top-inner-width: 1120px;

	color: var(--top-color-text);
	letter-spacing: 0.04em;
}

/*
 * セクションの共通の余白。大きな英字がはみ出さないよう切り取る。
 * hidden ではなく clip にする(hidden はスクロールコンテナになり、中の英字・写真のスクロール連動の動きが止まるため)
 */
.p-top-section {
	position: relative;
	overflow: clip;
	background: var(--color-bg);
}

.p-top-section--tint {
	background: var(--top-color-tint);
}

.p-top-section__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 32px;
	max-width: calc(var(--top-inner-width) + var(--space-gutter) * 2);
	margin-inline: auto;
	padding: 88px var(--space-gutter);

	@media (width < 770px) {
		gap: var(--space-lg);
		padding-block: 56px;
	}
}

/* 背景に薄く置く大きな英字(飾り)。位置は各英字のクラスの --word-* で決める */
.p-top-bg-word {
	position: absolute;
	top: var(--word-top, -40px);
	right: var(--word-right, 0);
	left: var(--word-left, auto);
	margin: 0;
	color: var(--top-color-word);
	font-family: var(--font-family-en);
	font-size: 180px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.01em;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;

	@media (width < 770px) {
		top: -12px;
		font-size: 72px;
	}
}

.p-top-bg-word--ses {
	--word-right: 60px;

	color: rgb(255 255 255 / 0.05);
}

.p-top-bg-word--works {
	--word-right: -21px;
}

.p-top-bg-word--development {
	--word-top: 9px;
	--word-right: auto;
	--word-left: calc(50% - 291px);

	font-size: 140px;
	line-height: normal;

	/* SP は他の英字と同じ大きさにする(140px のままだと一部しか見えない) */
	@media (width < 770px) {
		--word-left: auto;
		--word-right: 0;

		font-size: 72px;
		line-height: 1.2;
	}
}

/* 見出し + リード文 */
.p-top-heading {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.p-top-heading--center {
	gap: 10px;
	text-align: center;
}

.p-top-heading__title {
	margin: 0;
	color: var(--top-color-navy);
	font-size: 40px;
	font-weight: 900;
	line-height: 1.4;
	letter-spacing: 0.016em;

	/* SP で1〜2文字だけ次の行に残らないよう、行の長さを揃える */
	@media (width < 770px) {
		font-size: 26px;
		text-wrap: balance;
	}
}

.p-top-heading__lead {
	margin: 0;
	color: var(--top-color-text-sub);
	font-size: 15px;
	line-height: 1.9;

	@media (width < 770px) {
		font-size: 14px;
	}
}

/* お問い合わせの見出しは、修正前のデザインのまま(大きく、字間が広い) */
.p-top-heading--large {
	gap: 28px;

	& .p-top-heading__title {
		color: var(--top-color-text);
		font-size: 46px;
		font-weight: 700;
		letter-spacing: 0.1em;

		@media (width < 770px) {
			font-size: 28px;
			letter-spacing: 0.08em;
		}
	}

	& .p-top-heading__lead {
		color: var(--top-color-text);
		font-size: 17px;
		line-height: 1.8;

		@media (width < 770px) {
			font-size: 13px;
		}
	}

	@media (width < 770px) {
		gap: 11px;
	}
}

/* 丸いボタン */
.p-top-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 56px;
	padding: 0 24px 0 32px;
	border-radius: var(--radius-pill);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.6;
	text-decoration: none;
	transition: opacity 0.2s;

	&:hover {
		opacity: 0.8;
	}

	& img {
		flex-shrink: 0;
	}
}

.p-top-button--navy {
	min-height: 60px;
	background: var(--top-color-navy);
	color: var(--color-text-inverse);
	font-size: 16px;
	letter-spacing: 0;
}

.p-top-button--blue {
	gap: 10px;
	padding-right: 26px;
	background: var(--top-color-blue);
	color: var(--color-text-inverse);
	letter-spacing: 0;

	& span:last-child {
		font-size: 16px;
	}
}

.p-top-button--white {
	padding-right: var(--space-md);
	background: var(--color-bg);
	color: var(--top-color-blue);
}

.p-top-button__icon {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--top-color-blue);
}

/* -------------------------------------------------------------------------
 * メインビジュアル
 * ---------------------------------------------------------------------- */
/* 「MIRAPRO」の大きさをスクロールバーを除いた横幅から決めるため、コンテナにする(100vw だとスクロールバーの分はみ出す) */
.p-top-hero {
	container-type: inline-size;
}

.p-top-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 111px;
	max-width: calc(1260px + var(--space-gutter) * 2);
	margin-inline: auto;
	padding: 97px var(--space-gutter) 72px;

	@media (width < 770px) {
		gap: 32px;
		padding-block: 40px 56px;
	}
}

/* 写真を文字の形に切り抜く。写真の上に紺を18%重ねる */
.p-top-hero__logo {
	margin: 0;
	background:
		linear-gradient(rgb(11 31 92 / 0.18), rgb(11 31 92 / 0.18)),
		var(--hero-image) center / cover no-repeat;
	background-clip: text;
	color: transparent;
	/* この6文字だけ Montserrat(inc/enqueue.php で text=MIRAPRO 指定で読み込む) */
	font-family: "Montserrat", var(--font-family-en);
	/*
	 * 画面の横幅いっぱい(左右の余白を除く)に広げる。中身の幅(1260px)を超えてよい。
	 * Montserrat 800・字間 -0.04em の「MIRAPRO」の幅は約 4.86em。少し余裕を見て 4.9 で割る。
	 */
	font-size: calc((100cqi - var(--space-gutter) * 2) / 4.9);
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.04em;
	white-space: nowrap;

	/*
	 * SP は「MIRA / PRO」の2行にして大きく見せる。長い方の「MIRA」(字間込みで約 2.66em)が横幅いっぱいになる大きさ。少し余裕を見て 2.7 で割る。
	 * 2行目は1行目の左に揃える
	 */
	@media (width < 770px) {
		align-self: stretch;
		font-size: calc((100cqi - var(--space-gutter) * 2) / 2.7);
		line-height: 0.88;

		& span {
			display: block;
		}
	}
}

.p-top-hero__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-lg);
	width: 100%;

	@media (width < 770px) {
		gap: 28px;

		& .p-top-button {
			width: 100%;
		}
	}
}

.p-top-hero__copy {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.p-top-hero__title {
	margin: 0;
	color: var(--top-color-navy);
	font-size: 40px;
	font-weight: 900;
	line-height: 1.4;
	letter-spacing: 0.02em;

	/* 375px で1行に収まる大きさ(24px だと端に接して折り返すことがある) */
	@media (width < 770px) {
		font-size: 22px;
	}
}

.p-top-hero__lead {
	margin: 0;
	color: var(--top-color-text-sub);
	font-size: 15px;
	font-weight: 700;

	@media (width < 770px) {
		font-size: 13px;
	}
}

/* -------------------------------------------------------------------------
 * 選ばれる5つの理由
 * ---------------------------------------------------------------------- */
.p-top-reasons .p-top-section__inner {
	padding-block: 72px;

	@media (width < 770px) {
		gap: var(--space-md);
		padding-block: 56px;

		& > .p-top-heading {
			margin-bottom: var(--space-sm);
		}
	}
}

.p-top-reasons__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;

	@media (width < 1024px) {
		grid-template-columns: 1fr;
	}

	@media (width < 770px) {
		gap: var(--space-md);
	}
}

/* 白い箱 */
.p-top-reason {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	margin: 0;
	padding: 36px;
	border-radius: 12px;
	background: var(--color-bg);

	@media (width < 770px) {
		gap: var(--space-md);
		padding: 28px 20px;
	}
}

/* 01 は左に説明、右に「供給力のしくみ」を並べる */
.p-top-reason--main {
	display: grid;
	grid-template-columns: 492px 1fr;
	align-items: start;
	gap: 48px;
	padding: 44px 44px 40px;
	box-shadow: var(--top-shadow);

	@media (width < 1024px) {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--space-xl);
	}

	@media (width < 770px) {
		gap: 28px;
		padding: 32px 20px 28px;
	}
}

.p-top-reason__body {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding-right: var(--space-lg);
	border-right: 1px solid #e7eefb;

	@media (width < 1024px) {
		padding-right: 0;
		border-right: 0;
	}

	@media (width < 770px) {
		gap: 14px;
	}
}

.p-top-reason__head {
	display: flex;
	align-items: flex-start;
	gap: 20px;

	@media (width < 770px) {
		flex-direction: column;
		gap: 10px;
	}
}

.p-top-reason__number {
	color: var(--top-color-blue);
	font-family: var(--font-family-en);
	font-size: 44px;
	font-weight: 800;
	line-height: 1;

	.p-top-reason--main & {
		font-size: 56px;
	}

	@media (width < 770px) {
		font-size: 36px;

		.p-top-reason--main & {
			font-size: 44px;
		}
	}
}

.p-top-reason__number--small {
	font-size: 40px;
	margin-bottom: -8px; /* 番号と見出しの間を詰める(デザインは11px) */

	@media (width < 770px) {
		font-size: 36px;
		margin-bottom: -6px;
	}
}

.p-top-reason__title {
	margin: 0;
	font-size: 21px;
	font-weight: 900;
	line-height: 1.5;
	letter-spacing: 0.03em;

	.p-top-reason--main & {
		color: var(--top-color-navy);
		font-size: 26px;
		line-height: 1.55;
	}

	& em {
		color: var(--top-color-blue);
		font-style: normal;
	}

	@media (width < 770px) {
		font-size: 18px;

		/* 「確かなエンジニアを届ける供給力」を1行に収める */
		.p-top-reason--main & {
			font-size: 19px;
		}
	}
}

.p-top-reason__title--small {
	font-size: 19px;

	@media (width < 770px) {
		font-size: 18px;
	}
}

.p-top-reason__text {
	margin: 6px 0 0;
	color: var(--top-color-text-body);
	font-size: 14px;
	line-height: 1.8;

	.p-top-reason--main & {
		margin: 0;
		font-size: 15px;
		line-height: 1.95;
	}

	@media (width < 770px) {
		margin-top: 0;

		.p-top-reason--main & {
			font-size: 14px;
			line-height: 1.9;
		}
	}
}

.p-top-reason__text--small {
	margin: -8px 0 0;
	font-size: 13px;

	@media (width < 770px) {
		margin-top: -6px;
	}
}

/* 青い箱の数字 */
.p-top-stats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	width: 100%;
	margin: 0;

	&.p-top-stats--compact {
		margin-top: auto; /* 05 の箱と高さを揃えたとき、数字を下に寄せる */
		padding-top: 20px;

		@media (width < 770px) {
			padding-top: 4px;
		}
	}

	@media (width < 770px) {
		gap: 8px;
	}
}

.p-top-stat {
	padding: var(--space-md);
	border-radius: 10px;
	background: var(--top-color-blue);
	color: var(--color-text-inverse);

	& dt {
		color: #d6e0ff;
		font-size: 12px;
		font-weight: 700;
		line-height: 1.8;
		letter-spacing: 0;
	}

	& dd {
		display: flex;
		align-items: baseline;
		gap: 2px;
		margin: 6px 0 0;
		font-size: 14px;
		font-weight: 700;
		line-height: 1;

		& span {
			font-family: var(--font-family-en);
			font-size: 40px;
			font-weight: 800;
		}
	}

	.p-top-stats--compact & {
		padding: 14px 18px;

		& dt {
			color: #bfd0f5;
			font-weight: 400;
		}

		& dd {
			margin-top: 4px;
			font-size: 13px;

			& span {
				font-size: 34px;
			}
		}
	}

	/* SP は2列のまま、ラベル(2行になる)と数字を小さくする */
	@media (width < 770px) {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		padding: 12px 14px 14px;

		& dt {
			font-size: 11px;
			line-height: 1.6;
		}

		& dd {
			margin-top: 8px;
			font-size: 13px;

			& span {
				font-size: 32px;
			}
		}

		.p-top-stats--compact & {
			padding: 12px 14px 14px;

			& dd span {
				font-size: 28px;
			}
		}
	}
}

/* 図の小見出し(「供給力のしくみ」「対応領域の内訳」など) */
.p-top-figure-title {
	margin: 0;
	color: var(--top-color-text-sub);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.8;
}

/* 01「供給力のしくみ」。下へ進むほど地の色が濃くなり、間に▼を置く */
.p-top-supply {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.p-top-supply__list {
	display: flex;
	flex-direction: column;
	gap: 26px; /* ▼(14px)と上下6pxずつ */
	margin: 0;
	padding: 0;
	list-style: none;
}

.p-top-supply__item {
	--supply-bg: #f1f5fb;
	--supply-icon-bg: var(--color-bg);

	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: var(--space-md);
	border-radius: 10px;
	background: var(--supply-bg);

	@media (width < 770px) {
		gap: 12px;
		padding: 14px;
	}

	&:nth-child(2) {
		--supply-bg: #e1ebfb;
	}

	&:nth-child(3) {
		--supply-bg: var(--top-color-blue-light);
		--supply-icon-bg: rgb(255 255 255 / 0.6);
	}

	&:last-child {
		--supply-bg: var(--top-color-blue);
		--supply-icon-bg: rgb(255 255 255 / 0.14);

		color: var(--color-text-inverse);
	}

	&:not(:last-child)::after {
		content: "";
		position: absolute;
		top: calc(100% + 6px);
		left: 50%;
		width: 22px;
		height: 14px;
		background: url("../../images/top/reason-flow-arrow.svg") no-repeat center / contain;
		translate: -50% 0;
	}
}

.p-top-supply__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--supply-icon-bg);
}

.p-top-supply__body {
	display: flex;
	flex-direction: column;
	letter-spacing: 0.04em;
}

.p-top-supply__title {
	font-size: 16px;
	line-height: 1.55;

	@media (width < 770px) {
		font-size: 15px;
	}
}

.p-top-supply__text {
	font-size: 13px;
	line-height: 1.55;
	opacity: 0.85;

	@media (width < 770px) {
		margin-top: 2px;
		font-size: 12px;
		line-height: 1.6;
	}
}

/* 02・03 の図の枠 */
.p-top-figure {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 20px 22px;
	border-radius: 10px;
	background: var(--top-color-panel);

	& .p-top-figure-title {
		padding-bottom: 4px;
	}

	@media (width < 770px) {
		padding: var(--space-md);
	}
}

/* 02「対応領域の内訳」の横棒 */
.p-top-bars {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	line-height: 1.8;
}

.p-top-bars__row {
	display: grid;
	grid-template-columns: 64px 1fr;
	align-items: center;
	gap: 12px;

	& dt {
		white-space: nowrap;
	}

	& dd {
		display: grid;
		grid-template-columns: 1fr 52px;
		align-items: center;
		gap: 12px;
		margin: 0;
	}

	&.is-strong dt {
		font-weight: 700;
	}

	@media (width < 770px) {
		grid-template-columns: 58px 1fr;
		gap: 8px;

		& dd {
			grid-template-columns: 1fr 44px;
			gap: 8px;
		}
	}
}

.p-top-bars__bar {
	position: relative;
	height: 12px;
	overflow: hidden;
	border-radius: 6px;
	background: #e6ebf2;

	&::before {
		content: "";
		position: absolute;
		inset: 0 auto 0 0;
		width: calc(var(--ratio) * 100%);
		border-radius: inherit;
		background: var(--top-color-blue-light);
	}
}

/* 「&」は疑似要素を表せないため、入れ子にせずに書く */
.is-strong .p-top-bars__bar::before {
	background: var(--top-color-blue);
}

.p-top-bars__value {
	font-family: var(--font-family-en);
	font-weight: 700;
	text-align: right;
}

/* 03「担当フェーズの内訳」の帯グラフ */
.p-top-reason .p-top-figure:has(.p-top-stack) {
	gap: 14px;
}

.p-top-stack {
	display: flex;
	height: 44px;
	overflow: hidden;
	border-radius: 8px;
}

.p-top-stack__part {
	display: grid;
	place-items: center;
	flex-basis: 0;
	color: var(--color-text-inverse);
	font-size: 13px;
	font-weight: 700;
}

.p-top-stack__part--requirements,
.p-top-stack__legend-item--requirements {
	--part-color: #6e93e0;
}

.p-top-stack__part--design,
.p-top-stack__legend-item--design {
	--part-color: var(--top-color-blue);
}

.p-top-stack__part--development,
.p-top-stack__legend-item--development {
	--part-color: var(--top-color-cyan);
}

.p-top-stack__part--test,
.p-top-stack__legend-item--test {
	--part-color: var(--top-color-blue-light);
}

/* 運用保守の帯は凡例(#d8e1f0)より少し薄い(デザインどおり) */
.p-top-stack__part--operation {
	--part-color: #e1ebfb;
}

.p-top-stack__legend-item--operation {
	--part-color: #d8e1f0;
}

.p-top-stack__part {
	background: var(--part-color);
}

.p-top-stack__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.8;
	list-style: none;

	/* SP は2列に揃える(折り返し任せだと行ごとに位置がずれるため) */
	@media (width < 770px) {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4px 12px;
	}
}

.p-top-stack__legend-item {
	display: flex;
	align-items: center;
	gap: 6px;

	&::before {
		content: "";
		width: 12px;
		height: 12px;
		border-radius: 3px;
		background: var(--part-color);
	}

	& span {
		font-family: var(--font-family-en);
		font-weight: 700;

		@media (width < 770px) {
			margin-left: auto;
		}
	}
}

/* 05 の一覧 */
.p-top-knowledge {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p-top-knowledge__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--top-color-panel);

	& > span:last-child {
		display: flex;
		flex-direction: column;
	}
}

.p-top-knowledge__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #e6edfc;

	.p-top-knowledge__item--follow & {
		background: #e0f6f9;
	}

	.p-top-knowledge__item--growth & {
		background: #ede8fa;
	}
}

.p-top-knowledge__title {
	font-size: 14px;
	line-height: 1.5;
}

.p-top-knowledge__text {
	color: var(--top-color-text-sub);
	font-size: 12px;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
 * 技術支援(SES)
 * ---------------------------------------------------------------------- */
.p-top-ses {
	isolation: isolate; /* 写真(z-index: -1)の上にグラデーションを重ねる */
	background: transparent;
	color: var(--color-text-inverse);

	&::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		background: linear-gradient(94deg, rgb(0 62 170 / 0.92) 0%, rgb(0 80 210 / 0.84) 55%, rgb(0 94 245 / 0.72) 100%);
	}

	& .p-top-section__inner {
		gap: 36px;
	}

	& .p-top-heading__title,
	& .p-top-heading__lead {
		color: inherit;
	}

	& .p-top-heading__lead {
		line-height: 2;
	}

	@media (width < 770px) {
		& .p-top-section__inner {
			gap: var(--space-xl);
		}

		& .p-top-heading__lead {
			line-height: 1.9;
		}
	}
}

.p-top-ses__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.p-top-ses__intro {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px 56px;

	& .p-top-heading {
		flex: 1 1 400px;
	}
}

/*
 * 参画のしくみの図。560×300 の中に絶対配置で描く。770〜1279px の狭い画面では横にスクロールする。
 * SP(769px以下)は縦の流れに組み替える(チーム → お客様の現場 → 営業・上長 → 左の線でチームへ戻る)。
 * 箱の並びは .p-top-ses-flow__canvas の grid で決め、PC 用の矢印の画像は使わない。
 */
.p-top-ses-flow {
	position: relative;
	flex: 0 1 560px;
	min-width: 0;
	margin: 0;
	overflow-x: auto;
	font-size: 13px;
	font-weight: 700;
	line-height: 16px;

	@media (width < 770px) {
		flex-basis: 100%;
		overflow: visible;
	}
}

.p-top-ses-flow__caption {
	position: absolute;
	top: 49px;
	left: 0;
	font-size: 14px;
	line-height: 1.8;

	@media (width < 770px) {
		position: static;
		margin-bottom: var(--space-sm);
	}
}

.p-top-ses-flow__canvas {
	position: relative;
	width: 560px;
	height: 300px;

	/*
	 * 左の列(44px)に戻りの線と縦書きのラベル、右の列に箱と下向きの矢印を並べる。
	 * 行の高さを固定し、戻りの線の上端・下端をチーム・営業・上長の箱の真ん中に合わせる。
	 */
	@media (width < 770px) {
		--flow-box: 68px;
		--flow-arrow: 52px;
		--flow-manager: 52px;

		display: grid;
		grid-template-columns: 44px minmax(0, 1fr);
		grid-template-rows: var(--flow-box) var(--flow-arrow) var(--flow-box) var(--flow-arrow) var(--flow-manager);
		width: auto;
		height: auto;

		/* 戻りの線(営業・上長 → チーム)。左の枠線で「コ」の字を描く */
		&::before {
			content: "";
			position: absolute;
			top: calc(var(--flow-box) / 2);
			bottom: calc(var(--flow-manager) / 2);
			left: 8px;
			width: 36px;
			border: 1.5px solid var(--color-bg);
			border-right: 0;
			border-radius: 8px 0 0 8px;
		}

		/* 戻りの線の先(チームの箱を指す矢じり) */
		&::after {
			content: "";
			position: absolute;
			top: calc(var(--flow-box) / 2 - 5px);
			left: 34px;
			width: 7px;
			height: 7px;
			border-top: 1.5px solid var(--color-bg);
			border-right: 1.5px solid var(--color-bg);
			rotate: 45deg;
			translate: 0 1px;
		}
	}
}

.p-top-ses-flow__line {
	position: absolute;
	max-width: none;

	@media (width < 770px) {
		display: none;
	}
}

.p-top-ses-flow__line--team {
	top: 142.6px;
	left: 175px;
	width: 176px;
	height: 14.7px;
}

.p-top-ses-flow__line--down {
	top: 199.5px;
	left: 448.6px;
	width: 14.7px;
	height: 40.5px;
}

.p-top-ses-flow__line--back {
	top: 264px;
	left: 87px;
	width: 266px;
	height: 8px;
}

.p-top-ses-flow__line--up {
	top: 201px;
	left: 80.6px;
	width: 14.7px;
	height: 68px;
}

.p-top-ses-flow__box {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	border-radius: 10px;
	font-size: 15px;
	line-height: 21px;
	text-align: center;

	/* SP は箱の中を横並び(アイコン + 文言)にし、grid の行に置く */
	@media (width < 770px) {
		position: static;
		grid-column: 2;
		flex-direction: row;
		gap: 10px;
		width: auto;
		height: auto;

		& br {
			display: none;
		}
	}
}

.p-top-ses-flow__box--team {
	top: 100px;
	left: 0;
	width: 176px;
	height: 100px;
	background: var(--color-bg);
	color: var(--top-color-blue);

	@media (width < 770px) {
		grid-row: 1;
		width: auto;
		height: auto;
	}
}

.p-top-ses-flow__box--site {
	top: 100px;
	left: 352px;
	width: 208px;
	height: 100px;
	border: 1px solid var(--color-bg);
	background: rgb(255 255 255 / 0.3);

	@media (width < 770px) {
		grid-row: 3;
		width: auto;
		height: auto;
	}
}

.p-top-ses-flow__box--manager {
	top: 240px;
	left: 352px;
	flex-direction: row;
	width: 208px;
	height: 56px;
	background: var(--top-color-cyan);
	color: var(--top-color-navy);

	@media (width < 770px) {
		grid-row: 5;
		width: auto;
		height: auto;
	}
}

.p-top-ses-flow__label {
	position: absolute;
	margin: 0;
	white-space: nowrap;

	/* SP は箱の間に、下向きの矢印 + 文言で置く */
	@media (width < 770px) {
		position: static;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: auto;

		&::before {
			content: "";
			width: 15px;
			height: 36px;
			background: url("../../images/top/ses-line-down.svg") no-repeat center / contain;
		}
	}
}

.p-top-ses-flow__label--team {
	top: 122px;
	left: 212px;
	width: 104px;
	text-align: center;

	@media (width < 770px) {
		grid-row: 2;
		grid-column: 2;
		width: auto;
	}
}

.p-top-ses-flow__label--check {
	top: 212px;
	left: 468px;

	@media (width < 770px) {
		grid-row: 4;
		grid-column: 2;
		width: auto;
	}
}

/* SP は戻りの線に沿わせて縦書きにする */
.p-top-ses-flow__label--back {
	top: 280px;
	left: 156px;
	width: 128px;
	text-align: center;

	@media (width < 770px) {
		grid-row: 2 / 5;
		grid-column: 1;
		width: auto;
		align-self: center;
		justify-self: start;
		padding-left: 18px;
		writing-mode: vertical-rl;
		letter-spacing: 0.12em;

		&::before {
			display: none;
		}
	}
}

.p-top-ses__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;

	@media (width < 1024px) {
		grid-template-columns: 1fr;
		max-width: 560px;
	}

	@media (width < 770px) {
		gap: var(--space-md);
	}
}

.p-top-ses-card {
	overflow: hidden;
	border-radius: 12px;
	background: var(--color-bg);
	box-shadow: 0 8px 24px rgb(11 31 92 / 0.08);
	color: var(--top-color-text);
}

.p-top-ses-card__image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #dce3ef;
}

.p-top-ses-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
}

.p-top-ses-card__number {
	color: var(--top-color-blue);
	font-family: var(--font-family-en);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.8;
}

.p-top-ses-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.5;

	@media (width < 770px) {
		font-size: 17px;
	}
}

.p-top-ses-card__text {
	margin: 0;
	color: var(--top-color-text-body);
	font-size: 14px;
	line-height: 1.8;
}

.p-top-ses__button {
	align-self: center;

	@media (width < 770px) {
		align-self: stretch;
	}
}

/* -------------------------------------------------------------------------
 * 対応フェーズ・スキル
 * ---------------------------------------------------------------------- */
.p-top-phases {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 20px var(--space-lg);
	border-radius: 12px;
	background: var(--color-bg);

	@media (width < 770px) {
		padding: 20px;
	}
}

.p-top-phases__title {
	margin: 0 6px 0 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.8;
}

/* SP は2列に揃えて並べる(5つ目は左の列に残る) */
.p-top-phases__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin: 0;
	padding: 0;
	list-style: none;

	@media (width < 770px) {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		width: 100%;
	}
}

.p-top-phases__item {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 0 18px 0 6px;
	border-radius: var(--radius-pill);
	background: var(--top-color-tint);
	font-size: 14px;
	font-weight: 700;

	@media (width < 770px) {
		gap: 8px;
		height: 40px;
		padding-right: 12px;
		font-size: 13px;
		white-space: nowrap;
	}
}

.p-top-phases__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--top-color-blue);

	@media (width < 770px) {
		width: 28px;
		height: 28px;
	}
}

.p-top-skills__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-md);
	margin: 0;
	padding: 0;
	list-style: none;

	@media (width < 770px) {
		grid-template-columns: 1fr;
		gap: var(--space-sm);
	}
}

.p-top-skill {
	--skill-color: var(--top-color-blue);
	--skill-icon-bg: #e6edfc;

	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: var(--space-lg);
	border: 1px solid #e1e8f3;
	border-radius: 12px;
	background: var(--color-bg);

	@media (width < 770px) {
		padding: 20px;
	}
}

.p-top-skill--infra {
	--skill-color: #b03462;
	--skill-icon-bg: #fce8ef;
}

.p-top-skill--database {
	--skill-color: #127e6b;
	--skill-icon-bg: #e4f5f1;
}

.p-top-skill--cloud {
	--skill-color: #5b3fc4;
	--skill-icon-bg: #ede8fa;
}

.p-top-skill__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.p-top-skill__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--skill-icon-bg);

	@media (width < 770px) {
		width: 44px;
		height: 44px;
	}
}

.p-top-skill__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.p-top-skill__text {
	margin: 0;
	color: var(--top-color-text-body);
	font-size: 13px;
	line-height: 1.8;
}

.p-top-skill__tech {
	margin: 0;
	color: var(--skill-color);
	font-family: var(--font-family-en);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: 0.02em;
}

/* -------------------------------------------------------------------------
 * 支援事例
 * ---------------------------------------------------------------------- */
.p-top-works__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;

	@media (width < 1024px) {
		grid-template-columns: 1fr;
	}

	@media (width < 770px) {
		gap: var(--space-md);
	}
}

.p-top-work {
	display: flex;
	overflow: hidden;
	border-radius: 12px;
	background: var(--top-color-panel);
	box-shadow: var(--top-shadow);

	@media (width < 770px) {
		flex-direction: column;
	}
}

/* 切り抜き位置は写真ごとに front-page.php から object-position で渡す */
.p-top-work__photo {
	display: block;
	flex: 0 0 188px;
	align-self: stretch;
	width: 188px;
	height: auto;
	min-height: 240px;
	background: #dce3ef;
	object-fit: cover;

	/* SP は上に横長で置く */
	@media (width < 770px) {
		flex-basis: auto;
		width: 100%;
		min-height: 0;
		aspect-ratio: 2 / 1;
	}
}

.p-top-work__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 20px;

	@media (width < 770px) {
		gap: 8px;
	}
}

.p-top-work__title {
	margin: 0;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.5;

	@media (width < 770px) {
		font-size: 17px;
	}
}

.p-top-work__badge {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0;
	color: var(--top-color-blue);
	font-size: 13px;
	font-weight: 700;
	line-height: 30px;

	/* 年数が無いもの(「チーム体制で参画」)は少し大きい */
	&:not(:has(.p-top-work__years)) {
		font-size: 14px;
	}
}

.p-top-work__years {
	font-family: var(--font-family-en);
	font-size: 30px;
	font-weight: 800;
	line-height: 1;
}

.p-top-work__info {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 4px 8px;
	margin: 0;
	font-size: 13px;
	line-height: 1.7;

	& dt {
		color: #5a6478;
		font-weight: 700;
	}

	& dd {
		margin: 0;
	}
}

.p-top-work__summary {
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid #e3e8f0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.75;
}

/* -------------------------------------------------------------------------
 * 受託開発
 * ---------------------------------------------------------------------- */
.p-top-development {
	border-block: 1px solid #e6ebf3;
}

.p-top-development__inner {
	position: relative;
	display: flex;
	gap: 64px;
	max-width: calc(1193px + var(--space-gutter) * 2);
	margin-inline: auto;
	padding: 73px var(--space-gutter) 72px;

	@media (width < 1024px) {
		flex-direction: column;
		gap: var(--space-xl);
	}

	@media (width < 770px) {
		gap: 28px;
		padding-block: 56px;
	}
}

.p-top-development__intro {
	display: flex;
	flex: 0 0 452px;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;

	@media (width < 1024px) {
		flex-basis: auto;
	}

	@media (width < 770px) {
		gap: var(--space-md);
	}
}

/* SP は他のセクションの見出し(26px)に揃える */
.p-top-development__title {
	margin: 0;
	color: var(--top-color-navy);
	font-size: 30px;
	font-weight: 900;
	line-height: 1.4;

	@media (width < 770px) {
		font-size: 26px;
	}
}

.p-top-development__catch {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.75;

	@media (width < 770px) {
		font-size: 15px;
		text-wrap: balance;
	}
}

.p-top-development__lead {
	margin: 0;
	color: var(--top-color-text-sub);
	font-size: 14px;
	line-height: 1.9;
}

.p-top-development .p-top-button--blue {
	@media (width < 770px) {
		width: 100%;
		margin-top: 4px;
	}
}

.p-top-development__detail {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--space-lg);
	min-width: 0;
}

.p-top-development__services {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	max-width: 612px;
	margin: 0;
	padding: 0;
	list-style: none;

	@media (width < 770px) {
		grid-template-columns: 1fr;
		gap: 8px;
	}
}

.p-top-development__service {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 72px;
	padding: var(--space-md) 18px;

	@media (width < 770px) {
		min-height: 60px;
		padding: 10px 14px;
	}
	border-radius: 10px;
	background: var(--color-bg);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}

.p-top-development__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--top-color-tint);
}

.p-top-development__advice {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px var(--space-lg);
	border-radius: 10px;
	background: var(--color-bg);
	font-size: 14px;

	@media (width < 770px) {
		padding: 20px;
		font-size: 13px;
	}
}

.p-top-development__advice-title {
	margin: 0;
	color: var(--top-color-navy);
	font-size: inherit;
	font-weight: 700;
	line-height: 22px;
}

.p-top-development__advice-list {
	margin: 0;
	padding: 0;
	color: var(--top-color-text-sub);
	line-height: 26px;
	list-style: none;

	& li::before {
		content: "・";
	}
}

/* -------------------------------------------------------------------------
 * 3つのメリット
 * ---------------------------------------------------------------------- */
.p-top-merits {
	isolation: isolate;
	background: transparent;

	&::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		background: linear-gradient(rgb(255 255 255 / 0.9), rgb(232 239 250 / 0.82));
	}

	& .p-top-section__inner {
		gap: 40px;

		@media (width < 770px) {
			gap: 28px;
		}
	}
}

.p-top-merits__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.p-top-merits__list {
	display: flex;
	justify-content: center;
	gap: 12px 52px; /* 箱の間の 12 + 28 + 12。デザインでは間に空の要素がある */
	margin: 0;
	padding: 0;
	list-style: none;

	@media (width < 1024px) {
		flex-direction: column;
		align-items: center;
		gap: var(--space-md);
	}

	@media (width < 770px) {
		gap: var(--space-sm);
	}
}

.p-top-merit {
	--merit-color: var(--top-color-blue);

	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 360px;
	padding: 20px;
	border-radius: 12px;
	background: var(--color-bg);
	filter: drop-shadow(0 8px 12px rgb(11 31 92 / 0.08));

	@media (width < 1024px) {
		width: 100%;
	}

	/*
	 * SP はアイコンを左、番号・見出しを右に並べ、本文を下に通す(縦に積むと1枚が長くなるため)。
	 * 3枚のアイコンと見出しの位置が揃い、流し読みしやすい
	 */
	@media (width < 770px) {
		display: grid;
		grid-template-columns: 56px minmax(0, 1fr);
		grid-template-areas:
			"icon number"
			"icon title"
			"text text";
		align-items: center;
		gap: 0 14px;
		max-width: none;
		padding: 20px;
	}
}

.p-top-merit--onboarding {
	--merit-color: #0e8aa0;
}

.p-top-merit--stability {
	--merit-color: var(--top-color-cyan);
}

.p-top-merit__icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--merit-color);

	@media (width < 770px) {
		grid-area: icon;
		width: 56px;
		height: 56px;

		& img {
			width: 28px;
		}
	}
}

.p-top-merit__number {
	color: var(--merit-color);
	font-family: var(--font-family-en);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.8;
	letter-spacing: 0.14em;

	@media (width < 770px) {
		grid-area: number;
		align-self: end;
		font-size: 11px;
	}
}

.p-top-merit__title {
	margin: 0;
	font-size: 20px;
	font-weight: 900;
	line-height: 1.8;
	text-align: center;

	@media (width < 770px) {
		grid-area: title;
		align-self: start;
		font-size: 18px;
		line-height: 1.5;
		text-align: left;
	}
}

.p-top-merit__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.85;

	@media (width < 770px) {
		grid-area: text;
		margin-top: 14px;
		padding-top: 14px;
		border-top: 1px solid #e3e8f0;
		font-size: 13px;
	}
}

/* -------------------------------------------------------------------------
 * お問い合わせ(フォームの中身は pages/contact.css)
 * ---------------------------------------------------------------------- */
.p-top-bg-word--contact {
	--word-top: 8px;
	--word-right: auto;
	--word-left: calc(max(var(--space-gutter), (100% - 1200px) / 2) + 408px);

	color: #f2f7fe;
	line-height: 120px;

	@media (width < 770px) {
		--word-top: 18px;
		--word-left: auto;
		--word-right: 0;
	}
}

.p-top-contact .p-top-section__inner {
	--top-inner-width: 1200px;

	gap: 40px;
	padding-block: 135px 120px;

	@media (width < 770px) {
		gap: var(--space-md);
		padding-block: 63px 48px;
	}
}

.p-top-contact__columns {
	display: grid;
	grid-template-columns: 780px 1fr;
	align-items: start;
	gap: 40px;

	@media (width < 1280px) {
		grid-template-columns: 1fr;
		gap: var(--space-lg);
	}

	@media (width < 770px) {
		gap: var(--space-md);
	}
}

.p-top-contact__form {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
	padding: 44px 40px 48px;
	background: var(--top-color-form);
	filter: drop-shadow(0 10px 15px rgb(11 31 92 / 0.08));

	@media (width < 770px) {
		gap: 14px;
		padding: 24px 20px 28px;
	}
}

.p-top-contact__form-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.8;
	letter-spacing: 0.03em;

	@media (width < 770px) {
		font-size: 17px;
	}
}

.p-top-contact__form-note {
	color: var(--top-color-text-sub);
	font-size: 14px;
	font-weight: 400;

	@media (width < 770px) {
		font-size: 12px;
	}
}

.p-top-contact__tel {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 44px 36px;
	border: 1px solid var(--top-color-line);

	@media (width < 770px) {
		padding: 20px;
	}
}

.p-top-contact__tel-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.8;
	letter-spacing: 0.03em;

	@media (width < 770px) {
		font-size: 15px;
	}
}

.p-top-contact__tel-number {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	margin: 7px 0 0;
	color: var(--top-color-brand);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;

	& img {
		flex-shrink: 0;
	}

	/* スマホでタップすると発信できるよう tel: のリンクにしている。見た目は文字のまま */
	& a {
		color: inherit;
		text-decoration: none;
	}

	@media (width < 770px) {
		margin-top: 0;
		font-size: 21px;
	}
}

.p-top-contact__tel-hours {
	margin: 0;
	color: var(--top-color-text-sub);
	font-size: 14px;
	line-height: 1.8;
}

.p-top-contact__tel-text {
	margin: 8px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--top-color-line);
	font-size: 15px;
	line-height: 1.9;

	@media (width < 770px) {
		font-size: 13px;
	}
}

/* -------------------------------------------------------------------------
 * 採用情報
 * ---------------------------------------------------------------------- */
.p-top-recruit {
	position: relative;
	isolation: isolate; /* 写真(z-index: -1)の上にグラデーションを重ねる */
	overflow: clip; /* hidden だと写真のスクロール連動の動きが止まる(.p-top-section と同じ) */
	color: var(--color-text-inverse);

	&::before {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(100deg, rgb(0 62 170 / 0.92) 0%, rgb(0 80 210 / 0.84) 55%, rgb(0 94 245 / 0.72) 100%);
	}
}

.p-top-recruit__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.p-top-recruit__inner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 40px 64px;
	padding-block: 120px;

	/* 上の余白は、見出しの上に出す大きな英字(RECRUIT)の分 */
	@media (width < 770px) {
		gap: 28px;
		padding-block: 88px 56px;
	}
}

.p-top-recruit__body {
	position: relative;
	flex: 1 1 0;
	min-width: min(100%, 480px);
}

.p-top-bg-word--recruit {
	--word-top: -111px;
	--word-right: auto;
	--word-left: -89px;

	color: rgb(255 255 255 / 0.08);
	line-height: 120px;

	/* SP は見出しに重ならないよう、見出しのすぐ上に置く */
	@media (width < 770px) {
		top: -72px; /* .p-top-bg-word の SP の top(-12px)を上書きする */
		--word-left: -4px;
	}
}

.p-top-recruit__title {
	position: relative;
	margin: 0;
	font-size: 46px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.1em;

	@media (width < 770px) {
		font-size: 28px;
	}
}

.p-top-recruit__lead {
	position: relative;
	margin: 28px 0 0;
	font-size: 17px;
	line-height: 2;

	@media (width < 770px) {
		margin-top: var(--space-md);
		font-size: 13px;
	}
}

.p-top-recruit__actions {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	min-width: 380px;

	@media (width < 770px) {
		gap: 10px;
		width: 100%;
		min-width: 0;
	}
}

.p-top-recruit__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 64px;
	padding: 0 30px 0 34px;
	border-radius: var(--radius-pill);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.8;
	text-decoration: none;
	transition: opacity 0.2s;

	&:hover {
		opacity: 0.8;
	}

	& img {
		flex-shrink: 0;
	}

	@media (width < 770px) {
		min-height: 56px;
		font-size: 15px;
	}
}

.p-top-recruit__button--white {
	padding-right: 22px;
	background: var(--color-bg);
	color: var(--top-color-text);
}

.p-top-recruit__button--dark {
	background: var(--top-color-text);
	color: var(--color-text-inverse);
}

.p-top-recruit__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--top-color-brand);
}

/* -------------------------------------------------------------------------
 * 動き(トップページ固有)
 *
 * 共通の動き(up / fade / children / left)と仕組みは components.css の「動き(共通)」、
 * どの要素をどう動かすかは assets/js/motion.js のトップページの設定を参照。
 * - メインビジュアルの動き: <html> の is-motion(inc/enqueue.php が <head> で付ける)があるときだけ動かす
 * - スクロールに連動する動き(背景の英字が流れる・写真の視差): CSS の animation-timeline で動かす。
 *   対応していないブラウザでは止まったまま表示する。「視差効果を減らす」の設定では media で外す
 * ---------------------------------------------------------------------- */

/* --- メインビジュアル(読み込み時) --- */

/* 写真で切り抜いた「MIRAPRO」を、左から右へ広げながら出す。字の外側(上下・左右)は切らないよう、大きめに開ける */
@keyframes p-top-hero-logo {
	from {
		opacity: 0;
		clip-path: inset(-20% 100% -20% -20%);
	}

	to {
		opacity: 1;
		clip-path: inset(-20%);
	}
}

/* 1文字ずつ、少し下から出す */
@keyframes p-top-hero-char {
	from {
		opacity: 0;
		translate: 0 0.25em;
	}
}

.p-top-hero__char {
	display: inline-block;
}

.is-motion {
	& .p-top-hero__logo {
		animation: p-top-hero-logo 1.2s var(--motion-ease-out) 0.1s backwards;
	}

	/* JS で1文字ずつに分けるまでは隠しておく(分ける前の見出しが一瞬見えないように) */
	& .p-top-hero__title:not(.is-split) {
		opacity: 0;
	}

	& .p-top-hero__char {
		animation: p-top-hero-char 0.8s var(--motion-ease-out) backwards;
		animation-delay: calc(0.5s + var(--i) * 30ms);
	}

	& .p-top-hero__lead {
		animation: c-motion-up 0.9s var(--motion-ease-out) 0.9s backwards;
	}

	& .p-top-hero__bottom > .p-top-button {
		animation: c-motion-up 0.9s var(--motion-ease-out) 1s backwards;
	}
}

/* --- 画面に入ったときの動き --- */

/* 02 対応領域の内訳: 横棒が上から順に伸びる */
.is-reveal--figure.is-inview .p-top-bars__bar::before {
	animation: c-motion-wipe-right 1s var(--motion-ease-out) backwards;
	animation-delay: calc(var(--reveal-at) + 200ms + var(--i, 0) * 60ms);
}

/* 03 担当フェーズの内訳: 帯が左から伸び、凡例が順に出る */
.is-reveal--figure.is-inview {
	& .p-top-stack {
		animation: c-motion-wipe-right 1.2s var(--motion-ease-out) calc(var(--reveal-at) + 200ms) backwards;
	}

	& .p-top-stack__legend-item {
		animation: c-motion-fade 0.6s ease-out backwards;
		animation-delay: calc(var(--reveal-at) + 200ms + var(--i, 0) * 60ms);
	}
}

/* 01 供給力のしくみ: 下向きの▼は、箱が出たあとに出す */
.is-reveal--left.is-inview .p-top-supply__item::after {
	animation: c-motion-fade 0.5s ease-out backwards;
	animation-delay: calc(var(--reveal-at) + 350ms + var(--i, 0) * 70ms);
}

/* 数字は桁が変わっても幅が揺れないよう、等幅の数字にする(カウントアップ中) */
.p-top-stat dd span,
.p-top-bars__value,
.p-top-stack__legend-item span {
	font-variant-numeric: tabular-nums;
}

/*
 * 参画のしくみ: チーム → (線) → お客様の現場 → (線) → 営業・上長 → (線) → チームへ戻る、の順に描く。
 * 線は矢印の向きに沿って切り抜きを広げる。SP は線の画像を使わないため、箱と文言が順に出る
 */
.is-reveal--flow:not(.is-inview) {
	& .p-top-ses-flow__box,
	& .p-top-ses-flow__label,
	& .p-top-ses-flow__line,
	& .p-top-ses-flow__canvas::before,
	& .p-top-ses-flow__canvas::after {
		opacity: 0;
	}
}

.is-reveal--flow.is-inview {
	& .p-top-ses-flow__caption,
	& .p-top-ses-flow__box,
	& .p-top-ses-flow__label {
		animation: c-motion-fade 0.5s ease-out backwards;
	}

	& .p-top-ses-flow__caption {
		animation-delay: var(--reveal-at);
	}

	& .p-top-ses-flow__box--team {
		animation-delay: calc(var(--reveal-at) + 100ms);
	}

	& .p-top-ses-flow__line--team {
		animation: c-motion-wipe-right 0.4s ease-in-out calc(var(--reveal-at) + 300ms) backwards;
	}

	& .p-top-ses-flow__label--team {
		animation-delay: calc(var(--reveal-at) + 400ms);
	}

	& .p-top-ses-flow__box--site {
		animation-delay: calc(var(--reveal-at) + 550ms);
	}

	& .p-top-ses-flow__line--down {
		animation: c-motion-wipe-down 0.3s ease-in-out calc(var(--reveal-at) + 750ms) backwards;
	}

	& .p-top-ses-flow__label--check {
		animation-delay: calc(var(--reveal-at) + 800ms);
	}

	& .p-top-ses-flow__box--manager {
		animation-delay: calc(var(--reveal-at) + 950ms);
	}

	& .p-top-ses-flow__line--back {
		animation: c-motion-wipe-left 0.4s ease-in-out calc(var(--reveal-at) + 1150ms) backwards;
	}

	& .p-top-ses-flow__label--back {
		animation-delay: calc(var(--reveal-at) + 1250ms);
	}

	& .p-top-ses-flow__line--up {
		animation: c-motion-wipe-up 0.3s ease-out calc(var(--reveal-at) + 1500ms) backwards;
	}

	/* SP の戻りの線(枠線と矢じり) */
	& .p-top-ses-flow__canvas::before,
	& .p-top-ses-flow__canvas::after {
		animation: c-motion-fade 0.6s ease-out calc(var(--reveal-at) + 1150ms) backwards;
	}
}

/* 技術支援のカード・支援事例: 写真が少しだけ寄った状態から引いていく */
.is-reveal--photo.is-inview :is(.p-top-ses-card__image, .p-top-work__photo) {
	animation: c-motion-zoom-out 1.4s var(--motion-ease-out) var(--reveal-at) backwards;
}

/* --- ホバー --- */
@media (hover: hover) {
	.p-top-ses-card__image,
	.p-top-work__photo {
		transition: scale 0.6s var(--motion-ease-out);
	}

	.p-top-ses-card:hover .p-top-ses-card__image,
	.p-top-work:hover .p-top-work__photo {
		scale: 1.03;
	}

	.p-top-skill {
		transition: box-shadow 0.3s ease-out;

		&:hover {
			box-shadow: var(--top-shadow);
		}
	}

	/* ボタンの矢印を、進む向きに少しずらす */
	.p-top-button > img,
	.p-top-button__icon,
	.p-top-button--blue > span:last-child,
	.p-top-recruit__button > img,
	.p-top-recruit__icon {
		transition: translate 0.3s var(--motion-ease-out);
	}

	.p-top-button:hover > img,
	.p-top-button:hover .p-top-button__icon,
	.p-top-button--blue:hover > span:last-child,
	.p-top-recruit__button:hover > img,
	.p-top-recruit__button:hover .p-top-recruit__icon {
		translate: 3px 0;
	}
}

/* --- スクロールに連動する動き --- */
@keyframes p-top-hero-leave {
	to {
		opacity: 0.6;
		transform: translateY(6%);
	}
}

/* 背景の大きな英字を、スクロールに合わせて右から左へゆっくり流す(画面に入る〜出るまでで) */
@keyframes p-top-word-drift {
	from {
		transform: translateX(3%);
	}

	to {
		transform: translateX(-3%);
	}
}

/* 背景の写真を、文字より少し遅く動かして奥行きを出す。拡大しておき、動かしても端が見えないようにする */
@keyframes p-top-bg-parallax {
	from {
		transform: translateY(-4%) scale(1.1);
	}

	to {
		transform: translateY(4%) scale(1.1);
	}
}

@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		/* メインビジュアルは、スクロールで画面から出ていくあいだ、少し遅れて沈みながら薄くなる */
		.p-top-hero__inner {
			animation: p-top-hero-leave linear both;
			animation-timeline: view();
			animation-range: exit 0% exit 100%;
		}

		.p-top-bg-word {
			animation: p-top-word-drift linear both;
			animation-timeline: view();
			animation-range: cover;
		}

		/* 英字は画面に入ったときの動き(fade)も持つため、両方を並べる */
		.p-top-bg-word.is-reveal.is-inview {
			animation:
				c-motion-fade 1.2s ease-out var(--reveal-at) backwards,
				p-top-word-drift linear both;
			animation-timeline: auto, view();
			animation-range: normal, cover;
		}

		.p-top-ses__bg,
		.p-top-merits__bg,
		.p-top-recruit__bg {
			animation: p-top-bg-parallax linear both;
			animation-timeline: view();
			animation-range: cover;
		}
	}
}
