@charset "UTF-8";

/* 工場・倉庫一覧ページ — showroom と同デザイン */

.factories-page {
	padding-bottom: 96px;
}

.factories-page__list {
	width: min(calc(100% - 80px), 1400px);
	margin: 0 auto;
}

/* 見出し：会社概要・ショールームと同じサイズ・上下余白 */
.factories-page .products-page__header {
	margin: 56px 0 56px;
}

.factories-page .products-page__title {
	margin: 0;
	color: var(--color-navy);
	font-size: clamp(3.6rem, 4.4vw, 5.2rem);
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.2;
}

/* ヒーロー：会社概要・ショールームと同じサイズ・位置・上下余白 */
.factories-page .products-hero {
	width: 100%;
	margin: 0 0 184px;
	overflow: visible;
}

.factories-page .products-hero__inner {
	position: relative;
	width: min(calc(100% - 80px), 1400px);
	margin-inline: auto;
}

.factories-page .products-hero__media {
	position: relative;
	width: 78%;
	margin-left: auto;
	margin-right: 0;
	overflow: hidden;
	background: #d8dee3;
	line-height: 0;
}

.factories-page .products-hero__image {
	display: block;
	width: 100%;
	height: auto;
}

/* 縦書きキャッチ：ショールーム／採用情報と同じデザイン（上揃え） */
.factories-page .products-hero__catch--secondary,
.factories-page .products-hero__catch--tertiary,
.factories-page .products-hero__catch--quaternary {
	margin-top: 0;
}

@media screen and (min-width: 768px) {
	.factories-page .products-page__header {
		margin: 64px 0 72px;
	}

	.factories-page .products-page__title {
		font-size: clamp(4.2rem, 4.6vw, 5.6rem);
		letter-spacing: 0.14em;
	}

	.factories-page .products-hero {
		width: 100%;
		margin: 0 auto 184px;
		padding-bottom: 0;
	}

	.factories-page .products-hero__media {
		width: 78%;
		margin-left: auto;
		margin-right: 0;
	}

	/* PC：キャッチを左余白（コンテンツ幅内）に収める */
	.factories-page .products-hero__catch-group {
		top: 62%;
		left: 0;
		right: auto;
		width: calc(22% - 24px);
		max-width: calc(22% - 24px);
		box-sizing: border-box;
		justify-content: flex-start;
		gap: 0.14em;
		font-size: clamp(2.7rem, 2.85vw, 3.8rem);
		letter-spacing: 0.08em;
		transform: translate(-28px, -50%);
	}

	.factories-page__list {
		margin-top: 0;
	}
}

/* iPad：縦書きキャッチの左端を見出し「工場・倉庫」の左端に合わせる */
@media screen and (min-width: 768px) and (max-width: 1199px) {
	.factories-page .products-hero__catch-group {
		left: 0;
		right: 78%;
		width: auto;
		max-width: none;
		box-sizing: border-box;
		justify-content: flex-end;
		transform: translateY(-50%);
	}
}

/* Factory spots */

.factories-spot {
	position: relative;
	margin: 0 0 140px;
	padding-top: 0;
}

.factories-spot:last-child {
	margin-bottom: 0;
}

.factories-spot__visual {
	position: relative;
	z-index: 1;
	width: 100%;
	margin: 0;
}

.factories-spot__frame {
	overflow: hidden;
	width: 100%;
	aspect-ratio: 3.35 / 1;
	background: #d8dee3;
}

.factories-spot__image {
	display: block;
	width: 100%;
	height: 128%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	transform: translate3d(0, calc(var(--items-parallax, 0px) - 8%), 0);
	will-change: transform;
}

/* 平尾工場: 下側の作業風景が見える位置へ */
.factories-spot--wakayama .factories-spot__image {
	object-position: 58% 68%;
	transform: translate3d(0, calc(var(--items-parallax, 0px) - 5%), 0);
}

/* 大川工場: 人物の顔が見える位置へ */
.factories-spot--fukuoka .factories-spot__image {
	object-position: 42% 26%;
	transform: translate3d(0, calc(var(--items-parallax, 0px) - 4%), 0);
}

.factories-spot__label {
	position: absolute;
	z-index: 3;
	left: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 300px;
	padding: 38px 48px 34px;
	color: var(--color-navy);
	background: #fff;
	text-align: center;
	text-decoration: none;
}

.factories-spot--reverse .factories-spot__label {
	right: 0;
	left: auto;
}

.factories-spot__label-ja {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: clamp(4.4rem, 4.6vw, 6.4rem);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.15;
}

.factories-spot__button {
	position: absolute;
	z-index: 3;
	right: 40px;
	bottom: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 280px;
	min-height: 64px;
	padding: 18px 56px;
	border: 0;
	border-radius: 999px;
	color: #fff;
	background: var(--color-navy);
	box-shadow: 0 0 0 1px var(--color-navy);
	font-size: clamp(1.8rem, 1.7vw, 2.2rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-align: center;
	transition: opacity 0.2s ease;
}

.factories-spot--reverse .factories-spot__button {
	right: auto;
	left: 40px;
}

.factories-spot__button:hover {
	opacity: 0.85;
}

@media screen and (min-width: 768px) {
	.factories-spot__button {
		position: absolute;
		overflow: hidden;
		isolation: isolate;
		color: #fff;
		border: 0;
		background: var(--color-navy);
		box-shadow: 0 0 0 1px var(--color-navy);
		transition: color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
			background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.factories-spot__button::before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		border-radius: inherit;
		background: var(--color-navy);
		transform: scaleY(1);
		transform-origin: top center;
		transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
		pointer-events: none;
		will-change: transform;
	}

	@media (hover: hover) and (pointer: fine) {
		.factories-spot__button:hover,
		.factories-spot__button:focus-visible {
			color: var(--color-navy);
			background: #fff;
			opacity: 1;
		}

		.factories-spot__button:hover::before,
		.factories-spot__button:focus-visible::before {
			transform: scaleY(0);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.factories-spot__image {
		height: 100%;
		transform: none;
		will-change: auto;
	}

	.factories-spot--wakayama .factories-spot__image {
		object-position: 58% 68%;
		transform: none;
	}

	.factories-spot--fukuoka .factories-spot__image {
		object-position: 42% 26%;
		transform: none;
	}
}

/* SP */

@media screen and (max-width: 767px) {
	.factories-page {
		padding-bottom: 64px;
	}

	.factories-page .products-page__header {
		margin: 36px 0 44px;
		padding-top: 20px;
	}

	.factories-page .products-page__title {
		font-size: clamp(2.4rem, 7vw, 3.2rem);
		letter-spacing: 0.12em;
	}

	.factories-page__list {
		width: calc(100% - 40px);
		margin-top: 0;
	}

	.factories-page .products-hero.factories-hero {
		width: 100%;
		margin: 8px 0 36px;
		padding: 0;
		overflow: visible;
	}

	.factories-page .products-hero__inner {
		width: 100%;
		margin: 0;
	}

	.factories-page .products-hero__media {
		width: 100%;
		margin: 0;
	}

	.factories-page .products-hero__catch--secondary {
		margin-top: 0;
	}

	.factories-spot {
		margin: 0 0 88px;
		padding-top: 0;
	}

	.factories-spot__visual {
		width: 100%;
		margin: 0;
	}

	.factories-spot__frame {
		aspect-ratio: 1 / 1;
	}

	.factories-spot__label {
		min-width: 148px;
		padding: 22px 20px 20px;
	}

	.factories-spot__label-ja {
		font-size: clamp(2.8rem, 7.2vw, 3.6rem);
		letter-spacing: 0.08em;
	}

	.factories-spot__button {
		right: 12px;
		bottom: 16px;
		box-sizing: border-box;
		min-width: 0;
		width: auto;
		max-width: 48%;
		min-height: 3.6em;
		padding: 1em 1.8em;
		font-size: clamp(1.4rem, 3.8vw, 1.65rem);
		letter-spacing: 0.06em;
		line-height: 1.35;
		white-space: nowrap;
	}

	.factories-spot--reverse .factories-spot__button {
		right: auto;
		left: 12px;
	}
}
