/* トップは最終セクションがフッター直前まで続くので下余白なし */
main {
	padding-bottom: 0;
}

/*
 * ヒーロー縦幅:
 * - Swiper 初期化が container に短い inline height を書くため !important で固定
 * - JS (HomeSwiper) が header / 告知バー実寸で --home-hero-chrome と height を上書き
 */
#visual {
	--home-hero-chrome: 180px; /* header + vuln-notice のざっくり合計 */
	width: 100%;
	height: calc(100vh - var(--home-hero-chrome)) !important;
	height: calc(100dvh - var(--home-hero-chrome)) !important;
	min-height: 280px !important;
	max-height: none !important;
	overflow: hidden;
}
#visual #visual-slider,
#visual .swiper,
#visual .swiper-container {
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	max-height: none !important;
	overflow: hidden;
}
#visual .swiper-wrapper {
	height: 100% !important;
	min-height: 100% !important;
	max-height: none !important;
}
/*
 * 横半分白抜け対策:
 * - 焼き込み width:Npx や Swiper の誤計測を 100% で抑止
 * - 初期化前は先頭以外を隠して flex 横並びが見えないようにする
 */
#visual .swiper-slide {
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	max-height: none !important;
	box-sizing: border-box;
	background-size: cover !important;
	background-position: center top !important;
	background-repeat: no-repeat !important;
}
#visual:not(.is-swiper-ready) .swiper-slide:not(:first-child) {
	visibility: hidden;
}
#visual .swiper-pagination {
	z-index: 2;
}

header .globalnav { display: block !important; }
header .globalnav > ul { list-style: none; margin: 0; padding: .4em 0 0; text-align: center; }
header .globalnav li { display: inline-block; }
header .globalnav li a { display: block; padding: .5em 1.4em; font-weight: bold; color: #000; }
header .globalnav li a:hover { opacity: .5; }

.vuln-notice { background: #f2f2f2; border-top: 1px solid #c5c5c5; border-bottom: 1px solid #c5c5c5; padding: 1.1rem 2rem; }
.vuln-notice p { margin: 0; color: #111; font-family: inherit; font-size: 2rem; font-weight: bold; line-height: 1.5; }
.vuln-notice a { color: inherit; text-decoration: underline; }
.vuln-notice a:hover { opacity: .6; }
@media (max-width: 767px) {
	.vuln-notice { padding: 1rem 5.6rem 1rem 1.6rem; }
	.vuln-notice p { font-size: 1.5rem; }
}

#products,
#cases-home {
	--p-blue: #0e6eb8;
	--p-red: #e30920;
	--rail-ink: #1f1f1f;
	--rail-muted: #4a4a4a;
	--rail-gap: 24px;
	/* 何枚分見せるか（2.5 = 2枚＋3枚目が半分） */
	--rail-show: 2.5;
	padding: 72px 0 88px;
	scroll-margin-top: 90px;
}
#products { background: #f6f4f0; }
#cases-home { background: #fff; }
#cregit { background: #AC0C25; }
#products .inner,
#cases-home .inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* プロダクト／事例見出し（大見出し＋薄い英字を背景に） */
#products .p-head--products,
#cases-home .p-head--cases {
	text-align: left;
	margin: 0 0 40px;
}
#products .p-head__main,
#cases-home .p-head__main {
	position: relative;
	isolation: isolate;
	display: inline-block;
	/* 英字透かしが上にはみ出す分 */
	padding-top: 0.55em;
}
/* 薄い英字の透かし（日本語見出しの下端に揃える） */
#products .p-head__main::before,
#cases-home .p-head__main::before {
	content: attr(data-en);
	position: absolute;
	z-index: -1;
	left: -0.04em;
	bottom: 0;
	top: auto;
	color: rgba(31, 31, 31, .12);
	font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
	font-size: clamp(6rem, 13vw, 11rem);
	font-weight: 800;
	letter-spacing: .02em;
	line-height: 1;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
}
#products .p-title,
#cases-home .p-title {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--rail-ink);
	font-size: clamp(3.2rem, 5vw, 4.8rem);
	font-weight: 800;
	letter-spacing: .04em;
	line-height: 1;
}

.home-rail {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: stretch;
	gap: 10px;
}
.home-rail__track {
	--rail-gap: 24px;
	--rail-show: 2.5; /* 2枚＋3枚目半分 */
	--rail-gaps: 2; /* 見えている区間に入る gap 数 */
	display: grid;
	grid-auto-flow: column;
	/* [card][gap][card][gap][half] = show*card + gaps*gap = 100% */
	grid-auto-columns: calc(
		(100% - (var(--rail-gap) * var(--rail-gaps)))
		/ var(--rail-show)
	);
	gap: var(--rail-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 2px;
	padding: 6px 2px 16px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.home-rail--products .home-rail__track,
.home-rail--cases .home-rail__track {
	--rail-show: 2.5;
	--rail-gaps: 2;
	--rail-gap: 24px;
}
.home-rail__track::-webkit-scrollbar { display: none; }
.home-rail__slide {
	scroll-snap-align: start;
	min-width: 0;
	height: 100%;
	margin-top: 0; /* style-common の `article + article` を打ち消し */
}
.home-rail__slide + .home-rail__slide {
	margin-top: 0;
}
.home-rail__nav {
	align-self: center;
	width: 42px;
	height: 42px;
	border: 1px solid #ddd6cc;
	border-radius: 999px;
	background: #fff;
	color: var(--rail-ink);
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.home-rail__nav:hover {
	background: #fff;
	border-color: #c4bbb0;
	transform: scale(1.04);
}
.home-rail__nav::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: translate(-40%, -50%) rotate(45deg);
}
.home-rail__nav--prev::before {
	transform: translate(-20%, -50%) rotate(-135deg);
}

#products .p-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e4e0d9;
	border-radius: 14px;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#products .p-card:hover {
	transform: translateY(-4px);
	border-color: #d3cdc3;
	box-shadow: 0 14px 32px rgba(31, 31, 31, .08);
}
#products .p-card__main {
	display: flex;
	flex-direction: column;
	flex: 1;
	color: inherit;
	text-decoration: none;
}
#products .p-card__main:hover { opacity: 1; }
#products .p-shot {
	height: 220px;
	min-height: 220px;
	max-height: 220px;
	overflow: hidden;
	background: #f5f5f5;
	flex-shrink: 0;
}
#products .p-shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left top;
	transition: transform .4s ease;
}
#products .p-card:hover .p-shot img { transform: scale(1.03); }
#products .p-body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 8px; }
#products .p-name { margin: 0 0 12px; padding: 0; border: 0; background: none; line-height: 1; }
#products .p-name img { display: block; height: 32px; width: auto; }
#products .p-name img.p-logo--tall { height: 44px; }
#products .p-desc { margin: 0 0 16px; color: #333; font-size: 1.45rem; font-weight: bold; line-height: 1.7; }
#products .p-tags { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
#products .p-tags li {
	margin: 0;
	padding: 5px 12px;
	background: #eef5fb;
	border-radius: 999px;
	color: #0b4f86;
	font-size: 1.2rem;
	line-height: 1.5;
}
#products .p-tags li::before {
	content: "\f00c";
	margin-right: 6px;
	color: var(--p-blue);
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 1rem;
}
#products .p-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	margin-top: auto;
	padding: 10px 26px 22px;
}
#products .p-help,
#products .p-more {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--p-red);
	font-size: 1.3rem;
	font-weight: bold;
	line-height: 1.4;
	text-decoration: none;
}
#products .p-help { color: #8a8580; }
#products .p-help:hover { color: var(--p-red); opacity: 1; }
#products .p-more:hover { opacity: 1; }
#products .p-help i,
#products .p-more i {
	display: inline-block;
	font-family: "Font Awesome 6 Free";
	font-style: normal;
	font-weight: 900;
	font-size: 1.4rem;
	line-height: 1;
	transition: transform .25s ease;
}
#products .p-help i::before,
#products .p-more i::before { content: "\f061"; }
#products .p-card:hover .p-help i,
#products .p-card:hover .p-more i { transform: translateX(4px); }

/* プロダクト直下：無料お試し / デモ環境 */
#products .p-try {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 40px;
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid rgba(31, 31, 31, .08);
}
#products .p-try__copy { max-width: 28em; }
#products .p-try__title {
	margin: 0;
	color: var(--rail-ink);
	font-size: clamp(2.4rem, 3.2vw, 3.6rem);
	font-weight: 800;
	letter-spacing: .04em;
	line-height: 1.25;
}
#products .p-try__lead {
	margin: 12px 0 0;
	color: var(--rail-muted);
	font-size: 1.4rem;
	font-weight: 500;
	line-height: 1.65;
	letter-spacing: .02em;
}
#products .p-try__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 14px;
}
#products .p-try__btn {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	min-width: 240px;
	min-height: 64px;
	padding: 12px 18px;
	border-radius: 10px;
	text-decoration: none;
	letter-spacing: .02em;
	line-height: 1.35;
	transition: opacity .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
#products .p-try__btn:hover { opacity: 1; }
#products .p-try__btn-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}
#products .p-try__btn-main {
	font-size: 1.5rem;
	font-weight: 700;
}
#products .p-try__btn-sub {
	font-size: 1.15rem;
	font-weight: 500;
}
#products .p-try__btn--demo {
	position: relative;
	align-items: flex-start;
	padding-right: 40px;
	background: #fff;
	border: 1.5px solid #1f1f1f;
	color: var(--rail-ink);
	box-shadow: 0 1px 0 rgba(31, 31, 31, .04);
}
#products .p-try__btn--demo:hover {
	background: #fafafa;
	box-shadow: 0 4px 14px rgba(31, 31, 31, .06);
}
#products .p-try__btn--demo .p-try__btn-sub { color: #6b6b6b; }
#products .p-try__btn-ext {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 14px;
	height: 14px;
}
#products .p-try__btn-ext::before,
#products .p-try__btn-ext::after {
	content: "";
	position: absolute;
	background: currentColor;
}
#products .p-try__btn-ext::before {
	top: 1px;
	right: 1px;
	width: 9px;
	height: 9px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	background: none;
}
#products .p-try__btn-ext::after {
	top: 3px;
	left: 2px;
	width: 1.5px;
	height: 12px;
	transform: rotate(-45deg);
	transform-origin: top center;
}
#products .p-try__btn--trial {
	justify-content: space-between;
	background: var(--p-red);
	border: 1.5px solid var(--p-red);
	color: #fff;
	box-shadow: 0 6px 16px rgba(227, 9, 32, .22);
}
#products .p-try__btn--trial:hover {
	background: #c4081c;
	border-color: #c4081c;
	box-shadow: 0 8px 18px rgba(227, 9, 32, .28);
}
#products .p-try__btn-arrow {
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .22);
	position: relative;
}
#products .p-try__btn-arrow::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 8px;
	height: 8px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	transform: rotate(45deg) translate(-1px, 1px);
}

.case-rail-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	background: #f3f3f3;
	border-radius: 10px;
	transition: transform .25s ease, box-shadow .25s ease;
}
.case-rail-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(31, 31, 31, .08);
	opacity: 1;
}
.case-rail-card__media {
	aspect-ratio: 16 / 9;
	height: auto;
	overflow: hidden;
	background: #2a2a2a;
	flex-shrink: 0;
}
.case-rail-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform .35s ease;
}
.case-rail-card:hover .case-rail-card__media img { transform: scale(1.03); }
.case-rail-card__body {
	display: flex;
	flex-direction: column;
	gap: .75rem;
	flex: 1;
	padding: 1.4rem 1.4rem 1.7rem;
}
.case-rail-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.case-rail-card__tags li {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--p-red);
	background: #fff;
	border: 1px solid #efd0d1;
	border-radius: 999px;
	padding: .25em .7em;
	line-height: 1.5;
}
.case-rail-card__headline {
	margin: 0;
	font-size: 1.55rem;
	font-weight: 700;
	line-height: 1.55;
	letter-spacing: .02em;
	color: var(--rail-ink);
}
.case-rail-card__company {
	margin: 0;
	margin-top: auto;
	font-size: 1.25rem;
	font-weight: 500;
	color: var(--rail-muted);
	line-height: 1.5;
}

@media (max-width: 767px) {
	#products,
	#cases-home { padding: 52px 0 64px; }
	#products .p-title,
	#cases-home .p-title { font-size: 3.2rem; }
	#products .p-head__main::before,
	#cases-home .p-head__main::before { font-size: 6.4rem; bottom: 0; top: auto; }
	.home-rail { grid-template-columns: 1fr; gap: 0; }
	.home-rail__nav { display: none; }
	.home-rail__track,
	.home-rail--products .home-rail__track,
	.home-rail--cases .home-rail__track {
		--rail-show: 1.35; /* 1枚＋次が少し〜半分 */
		--rail-gaps: 1;
		--rail-gap: 16px;
		padding-bottom: 8px;
	}
	#products .p-try {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		margin-top: 36px;
		padding-top: 28px;
	}
	#products .p-try__actions { flex-direction: column; }
	#products .p-try__btn {
		min-width: 0;
		width: 100%;
	}
}

@media (min-width: 768px) {
	.home-rail--products .home-rail__track,
	.home-rail--cases .home-rail__track {
		--rail-show: 2.5;
		--rail-gaps: 2;
		--rail-gap: 20px;
	}
}

@media (min-width: 1100px) {
	.home-rail--products .home-rail__track,
	.home-rail--cases .home-rail__track {
		--rail-show: 2.5;
		--rail-gaps: 2;
		--rail-gap: 24px;
	}
}
