/*
 * 制作実績詳細の「その他の制作実績」。
 * 一覧カードの操作感を踏襲しつつ、詳細ページ末尾で情報量が重くなりすぎないよう簡潔に見せる。
 */

.p-other-works {
	padding: 72px 0 80px;
	background: var(--color-background-subtle);
	border-top: 1px solid var(--color-border);
}

.p-other-works__head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 28px;
	margin-bottom: 30px;
}

.p-other-works__head .c-eyebrow {
	margin: 0 0 8px;
}

.p-other-works__head h2 {
	margin: 0;
	color: var(--color-primary-dark);
	font-weight: 500;
	line-height: 1.5;
}

.p-other-works__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--color-primary);
	font-size: 0.84rem;
	font-weight: 500;
	white-space: nowrap;
}

.p-other-works__all span,
.c-other-work-card__underline {
	display: inline;
	padding-bottom: 2px;
	background-image: linear-gradient(var(--color-primary), var(--color-primary));
	background-repeat: no-repeat;
	background-position: right bottom;
	background-size: 0 1px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	transition: background-size 0.3s ease;
}

.p-other-works__all:hover span,
.p-other-works__all:focus-visible span,
.c-other-work-card > a:hover .c-other-work-card__underline,
.c-other-work-card > a:focus-visible .c-other-work-card__underline {
	background-position: left bottom;
	background-size: 100% 1px;
}

.p-other-works__all i,
.c-other-work-card__link i {
	font-style: normal;
	transition: transform 0.2s ease;
}

.p-other-works__all:hover i,
.p-other-works__all:focus-visible i,
.c-other-work-card > a:hover .c-other-work-card__link i,
.c-other-work-card > a:focus-visible .c-other-work-card__link i {
	transform: translateX(4px);
}

.p-other-works__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

.c-other-work-card {
	min-width: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--color-border);
	transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.c-other-work-card:hover,
.c-other-work-card:focus-within {
	border-color: var(--color-primary-muted);
	box-shadow: 0 14px 30px var(--color-shadow-primary-soft);
	transform: translateY(-4px);
}

.c-other-work-card > a {
	display: flex;
	height: 100%;
	flex-direction: column;
}

.c-other-work-card__visual {
	position: relative;
	display: grid;
	aspect-ratio: 32 / 15;
	place-items: center;
	overflow: hidden;
	color: var(--color-primary);
	background: #f8fafb;
	border-bottom: 1px solid #edf1f3;
	font-size: 2rem;
	font-weight: 500;
}

.c-other-work-card__visual img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	background: #fff;
	transition: transform 0.28s ease;
}

.c-other-work-card:hover .c-other-work-card__visual img,
.c-other-work-card:focus-within .c-other-work-card__visual img {
	transform: scale(1.018);
}

.c-other-work-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 22px 20px;
}

.c-other-work-card__company {
	margin: 0 0 7px;
	color: var(--color-text-secondary);
	font-size: 0.74rem;
	font-weight: 500;
}

.c-other-work-card h3 {
	margin: 0 0 18px;
	color: var(--color-primary-dark);
	font-weight: 500;
	line-height: 1.65;
	transition: color 0.2s ease;
}

.c-other-work-card:hover h3,
.c-other-work-card:focus-within h3 {
	color: var(--color-primary);
}

.c-other-work-card__meta {
	padding-top: 14px;
	margin: auto 0 0;
	color: var(--color-text-secondary);
	border-top: 1px solid #edf1f3;
	font-size: 0.7rem;
}

.c-other-work-card__link {
	display: inline-flex;
	width: fit-content;
	align-items: center;
	gap: 7px;
	margin: 8px 0 0;
	color: var(--color-primary);
	font-size: 0.8rem;
	font-weight: 500;
}

@media (max-width: 900px) {
	.p-other-works__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.p-other-works {
		padding: 56px 0 64px;
	}

	.p-other-works__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 16px;
		margin-bottom: 24px;
	}

	.p-other-works__grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-other-work-card,
	.c-other-work-card__visual img,
	.p-other-works__all span,
	.c-other-work-card__underline,
	.p-other-works__all i,
	.c-other-work-card__link i {
		transition: none;
	}

	.c-other-work-card:hover,
	.c-other-work-card:focus-within,
	.c-other-work-card:hover .c-other-work-card__visual img,
	.c-other-work-card:focus-within .c-other-work-card__visual img {
		transform: none;
	}
}
