/**
 * SERVICE（サービス）ページ
 * デザイン: デザインデータpng/5_Service.png
 * ベースレイアウト。画像・波形・SVG・アイコンは後日実装。
 *
 * 配色: 橙 #F5A313 / 黄 #FDCE00 / 青緑 #10A9AC / 文字 #493B3B / クリーム #FFF8EA
 */

.p-service {
	overflow: clip; /* hidden だと sticky が効かないため clip */
}

/* ヒーローは共通 l-page-hero（style.css）に移行 */

/* =========================================================
 * イントロ
 * 背景は l-page-hero の固定カバー（blur FV写真 + 橙70%）が透ける
 * ========================================================= */
.p-service__intro {
	position: relative;
	color: #fff;
	background: transparent;
	text-align: center;
	/* 100svh表示 + 100svhホールド（通り過ぎ防止・TOP方式） */
	height: 200svh;
}
.p-service__intro-hold {
	position: sticky;
	top: 0;
	height: 100svh;
	display: flex;
	align-items: center;
	overflow: clip;
}
.p-service__intro .p-service__intro-inner {
	width: 100%;
}
.p-service__intro-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	opacity: 0.35;
	/* TODO: 背景画像 + オーバーレイ */
}
.p-service__intro-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 32px;
}
.p-service__intro-text {
	font-weight: 700;
	font-size: 18px;
	line-height: 2.8;
}

/* 永続スライドの装飾テキスト */
.p-service__marquee {
	position: absolute;
	left: 0;
	bottom: -18px;
	z-index: 1;
	width: 100%;
	overflow: hidden;
	pointer-events: none;
}
.p-service__marquee-inner {
	display: inline-flex;
	white-space: nowrap;
	will-change: transform;
	animation: serviceMarquee 40s linear infinite;
}
.p-service__marquee-word {
	font-weight: 700;
	font-size: calc(100vw * 100 / 1440); /* 1440px幅で100px、画面幅に比例 */
	line-height: 1;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4); /* 流れる装飾テキストの濃度は全ページ共通 */
	padding: 0 0.2em;
}
@keyframes serviceMarquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); } /* 語を12個=2周期ぶん並べてシームレスループ */
}
@media (prefers-reduced-motion: reduce) {
	.p-service__marquee-inner { animation: none; }
}

/* =========================================================
 * SERVICE 一覧（黄背景）
 * ========================================================= */
.p-service__list {
	background-color: #FDCE00;
	color: #493B3B;
	padding: 120px 0 210px;
}
/* 1140px インナー（w-1280 の代わり） */
.p-service__list-inner {
	width: 100%;
	max-width: 1220px; /* コンテンツ1140 + 左右padding40 */
	margin: 0 auto;
	padding-left: 40px;
	padding-right: 40px;
}
.p-service__heading {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 40px;
}
.p-service__heading-eng {
	/* DM Sans / Bold / 60px / 100% / uppercase */
	font-weight: 700;
	font-size: 60px;
	line-height: 100%;
	text-transform: uppercase;
}
.p-service__heading-jp {
	font-weight: 700;
	font-size: 16px;
	line-height: 160%;
	letter-spacing: 0.2em;
}

/* サービスカード */
.p-service__item {
	position: relative;
	background: #fff;
	padding: 110px 64px 56px;
	overflow: hidden;
	/* フッターナビの #service-01 / #service-02 で飛んだ時に固定ヘッダーへ潜らせない */
	scroll-margin-top: 120px;
}
.p-service__item + .p-service__item {
	margin-top: 80px;
}
/* ---- 表示順の stagger（英字=2が先行 → label → heading → img → desc → FEATURE 1〜4） ---- */
html.js-text-anim .p-service__item .p-service__item-label.is-anim-in { transition-delay: 0.35s; }
html.js-text-anim .p-service__item .p-service__item-heading.is-anim-in { transition-delay: 0.5s; }
html.js-text-anim .p-service__item .p-service__item-img.is-anim-in { transition-delay: 0.65s; }
html.js-text-anim .p-service__item .p-service__item-desc.is-anim-in { transition-delay: 0.8s; }
html.js-text-anim .p-service__item .p-service__feature:nth-child(1).is-anim-in { transition-delay: 0.95s; }
html.js-text-anim .p-service__item .p-service__feature:nth-child(2).is-anim-in { transition-delay: 1.1s; }
html.js-text-anim .p-service__item .p-service__feature:nth-child(3).is-anim-in { transition-delay: 1.25s; }
html.js-text-anim .p-service__item .p-service__feature:nth-child(4).is-anim-in { transition-delay: 1.4s; }

/* 連番（item-title 内・下の要素と40px空ける） */
.p-service__item-no {
	display: block;
	font-weight: 700;
	font-size: 64px;
	line-height: 1;
	color: #EDEDED;
	text-transform: uppercase;
	margin-bottom: 40px;
}
.p-service__item--reverse .p-service__item-no {
	text-align: right;
}

/* 見出し + メイン画像 */
.p-service__item-head {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: flex-end;
	margin-bottom: 32px;
}
.p-service__item-title {
	padding-bottom: 20px;
}
.p-service__item--reverse .p-service__item-head {
	direction: rtl;
}
.p-service__item--reverse .p-service__item-head > * {
	direction: ltr;
}
/* ラベル: テキスト右に細ラインが伸びるあしらい */
.p-service__item-label {
	display: flex;
	align-items: center;
	/* gap は使わない: data-anim="1" でテキストが1文字ずつ .anim-char(flexアイテム)に
	 * 分割されるため、gap があると文字間に隙間が入ってしまう。線への間隔は ::after の
	 * margin-left で確保する。 */
	gap: 0;
	width: 100%;
	color: #10A9AC;
	font-weight: 700;
	font-size: 24px;
	margin-bottom: 16px;
	background: #fff;
	position: relative;
}
.p-service__item-label::after {
	content: "";
	flex: 1;
	height: 1px;
	margin-left: 24px;
	background: rgba(73, 59, 59, 0.2); /* #493B3B 20% */
}
.p-service__item-heading {
	font-weight: 700;
	font-size: 30px;
	line-height: 1.6;
}
.p-service__item-img {
	border-radius: 0;
	overflow: hidden;
}
.p-service__item-img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 480 / 310; /* PC/SP共通の比率・角丸なし */
	object-fit: cover;
}
.p-service__item-desc {
	font-size: 16px;
	line-height: 2;
	margin-bottom: 48px;
	letter-spacing: 0.1em;
	font-weight: 700;
}

/* FEATURE カード 2×2 */
.p-service__features {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px 48px;
}
.p-service__feature-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid #493B3B33;
}
.p-service__feature-badge {
	flex-shrink: 0;
	display: block;
	align-items: center;
	background: #10A9AC;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0;
	border-radius: 999px;
	padding: 6px 20px;
	line-height: 1.5;
}
.p-service__feature-title {
	font-weight: 700;
	font-size: 18px;
	line-height: 1.4;
}
.p-service__feature-img {
	border-radius: 0;
	margin-bottom: 16px;
	overflow: hidden;
}
.p-service__feature-img img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: scale 0.25s; /* 通常側に置くことで、ホバー解除時も滑らかに戻る */
}
/* ホバーで画像ズーム（TOP page-front__service__pm-list-item と同挙動） */
.p-service__feature:hover .p-service__feature-img img {
	scale: 1.05;
}
.p-service__feature-desc {
	font-size: 14px;
	line-height: 1.9;
	font-weight: 700;
}

/* =========================================================
 * レスポンシブ
 * ========================================================= */
@media screen and (max-width: 1080px) {
	.p-service__heading-eng { font-size: 44px; }
	.p-service__item { padding: 48px; }
	.p-service__item-no { font-size: 52px; }
}

@media screen and (max-width: 768px) {
	.p-service__marquee { bottom: -8px; }
	.p-service__heading-eng { font-size: 32px; }

	.p-service__intro-text { font-size: 16px; }
	.p-service__marquee-word { font-size: 64px; }

	.p-service__list { padding: 64px 0 80px; }
	.p-service__list-inner {
		padding-left: 20px;
		padding-right: 20px;
	}
	.p-service__item { padding: 28px 20px; }
	.p-service__item + .p-service__item { margin-top: 32px; }

	.p-service__feature-head {
		flex-direction: column;
		align-items: flex-start;
	}
	.p-service__features {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.p-service__item-no {
		font-size: 40px;
		margin-bottom: 32px;
	}

	.p-service__item-head {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 24px;
	}
	.p-service__item--reverse .p-service__item-head { direction: ltr; }
	/* SPは1カラム積みなので、SERVICE 02 の連番も左揃えに統一 */
	.p-service__item--reverse .p-service__item-no { text-align: left; }
	.p-service__item-heading { font-size: 24px; }
	.p-service__item-label { font-size: 20px; }
	.p-service__item-desc { font-size: 14px; margin-bottom: 32px; }

	.p-service__features { grid-template-columns: 1fr; gap: 32px; }
}

/* フッター共通CONTACTの上波色（このページの直前セクション背景に馴染ませる） */
:root {
	--contact-wave-color: #FDCE00;
}

/* 無限ループは js/wave-flow.js の rAF 駆動（WebKitのループ境界チラつき対策）。
 * JS有効時は CSS keyframes を停止（no-JS時はCSSフォールバック） */
html.js-wave-flow .p-service__marquee-inner {
	animation: none !important;
}

/* 下層FVカバーをこのページでは TOP aboutus 風に戻す:
 * ぼかしFV写真(cover-img) + 橙60% + 黒10%（numbersは不透明オレンジのまま） */
.l-page-hero__cover-img {
	display: block;
}
.l-page-hero__cover::before {
	background:
		linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
		linear-gradient(rgba(245, 163, 19, 0.6), rgba(245, 163, 19, 0.6));
}
