/* トップの About us〜選ばれる理由。基調はサイトの紫。詳しくは top-about.php */

/* バナーそのものがリンクなので、100周年の「VIEW MORE」はスマホでは出さない（top-compact.css と同じ扱い） */
@media (max-width: 767.98px) {
	.jh-top-anniversary .vk_button,
	.jh-top-anniversary .vk_spacer {
		display: none;
	}

	/* 100周年バナーの高さ：元の 350px 固定だと画面いっぱいの大きさになるので、幅はそのまま高さだけ抑える
	   （2026.11.07 担当者の指定。画像は 1250×540 の横長で、切れる部分はむしろ減る） */
	/* aspect-ratio はこのブロックでは効かず高さが潰れたので、高さを本文の幅から計算して指定する */
	.jh-top-anniversary .wp-block-cover {
		min-height: calc((100vw - var(--vk-width-container-padding, 24px) * 2) * 0.432) !important; /* 540 / 1250 */
	}
}

/* スマホ縦（575px 以下）は今の半分の高さ（幅 350px で 175px）にそろえる */
@media (max-width: 575.98px) {
	.jh-top-anniversary .wp-block-cover {
		min-height: calc((100vw - var(--vk-width-container-padding, 20px) * 2) * 0.5) !important;
	}
}

/* 採用バナーの下の余白を「今はないものを、ともに。」の上（128px）と同じにする */
.home .entry-body > .jh-banner-strip ~ .vk_spacer:has(~ .jh-top) {
	display: none;
}

.home .entry-body > .jh-banner-strip {
	margin-bottom: 128px;
}

.home .entry-body > .jh-banner-strip > figure.wp-block-image {
	margin-bottom: 0;
}

.jh-top-banner {
	padding-top: 120px;
}

.jh-top-strategy {
	padding-top: 96px;
}

.jh-top-strategy > .wp-block-group > p.vk_block-margin-sm--margin-bottom {
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 500;
	line-height: 1.8;
}

.jh-top-anniversary {
	padding-top: 48px;
}

.jh-top-anniversary .vk_button {
	margin-top: 40px;
}

/* 写真の固定のため（overflow-x: hidden だと position: sticky が効かない） */
html:has(body.home),
body.home {
	overflow-x: clip !important;
}

.jh-top {
	--jh-top-ink: #222;
	--jh-top-sub: #555;
	--jh-top-purple: var(--vk-color-primary, #8160fc);
	color: var(--jh-top-ink);
	font-feature-settings: "palt";
}

.jh-top ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jh-top li {
	margin: 0;
}

.jh-top a {
	color: inherit;
	text-decoration: none;
}

.jh-top img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0 !important;
}

.jh-top h2 {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: inherit;
	text-align: left;
}

.jh-top h2::before,
.jh-top h2::after {
	content: none !important;
}

/* 専務の言葉：紫の面いっぱいに */
.jh-top__voice {
	background: var(--jh-top-purple);
	color: #fff;
}

/* 背景を動画にする（2026-11-08 担当者の指定。見にくければ紫に戻す）。
 * 紫に戻すときは top-about.php のマークアップから jh-top__voice--video・data-jh-voice-video・
 * .jh-top__voice-media の行を外す（この CSS は残っていても効かない）。
 * 動画は YouTube を音なしで繰り返し流す（top-about.js が、近くまでスクロールしてから読み込む）。
 * 読み込むまでは同じ動画のサムネイルを出す。文字が読めるよう、上に黒い膜を重ねる */
.jh-top__voice--video {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #1d1d1f;
}

.jh-top__voice-media {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	container-type: size;
}

.jh-top__voice-media::after {
	content: "";
	position: absolute;
	inset: 0;
	/* 動画は雰囲気づくりなので、文字を主役にして暗めにする（2026-11-08 担当者の指定で 0.5 → 0.68） */
	background: rgba(0, 0, 0, 0.68);
}

.jh-top__voice-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 16:9 の動画で枠を覆う（object-fit: cover と同じ考え方）。
 * YouTube の題名の帯（上）と「その他の動画」・ロゴ（下）は、プレーヤーの上端・下端に出る。
 * プレーヤーを映像より上下に --jh-voice-ui-bar ずつ高くすると、映像は中央に置かれ、
 * 帯やロゴは上下の余白（＝この面の外）に出るので見えなくなる（2026-11-08 担当者の指摘：iPhone で表示が出ていた） */
.jh-top__voice-frame {
	--jh-voice-ui-bar: 90px;
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100cqw, 177.78cqh);
	height: calc(max(56.25cqw, 100cqh) + var(--jh-voice-ui-bar) * 2);
	border: 0;
	opacity: 0;
	transform: translate(-50%, -50%) scale(1.05);
	transition: opacity 0.8s ease;
}

.jh-top__voice-frame.is-playing {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.jh-top__voice-frame {
		display: none;
	}
}

.jh-top h2.jh-top__words {
	width: min(100%, 1280px);
	margin: 0 auto !important;
	padding: 112px var(--vk-width-container-padding, 15px) 120px !important;
	font-size: clamp(60px, 7.6vw, 112px);
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.03em;
}

.jh-top__words span {
	display: block;
}

.jh-top__words span:nth-child(2) {
	margin-left: 1em;
}

.jh-top__words span:nth-child(3) {
	margin-left: 2em;
}

/* 3 行を 1 行ずつ、右から素早く滑り込ませる（2026-11-08 担当者の指定）。
 * top-about.js が、画面に入る前に is-words-ready、入ったら is-words-in を付ける（1 回だけ）。
 * JS が動かないとき・動きを減らす設定の端末では、クラスが付かないので最初から出ている。
 * 右からはみ出した分は、この面の overflow: hidden で隠れる */
.jh-top__voice.is-words-ready .jh-top__words > span {
	opacity: 0;
	transform: translateX(32vw);
}

.jh-top__voice.is-words-in .jh-top__words > span {
	opacity: 1;
	transform: none;
	/* 2026-11-08 担当者の指摘で、動きを 0.6s → 0.9s、次の行までの間を 0.18s → 0.35s に（どちらも少し遅く） */
	transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease-out;
}

.jh-top__voice.is-words-in .jh-top__words > span:nth-child(2) {
	transition-delay: 0.35s;
}

.jh-top__voice.is-words-in .jh-top__words > span:nth-child(3) {
	transition-delay: 0.7s;
}

/* 流れる文字 */
.jh-top__marquee {
	overflow: hidden;
	padding: 28px 0;
	border-bottom: 1px solid var(--jh-top-purple);
	color: var(--jh-top-purple);
	font-size: clamp(32px, 3.4vw, 48px);
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
}

.jh-top__marquee-track {
	display: flex;
	width: max-content;
	animation: jh-top-marquee 48s linear infinite;
}

.jh-top__marquee-track > div {
	display: flex;
}

.jh-top__marquee span {
	padding-right: 1.4em;
}

.jh-top__marquee:hover .jh-top__marquee-track {
	animation-play-state: paused;
}

@keyframes jh-top-marquee {
	to {
		transform: translateX(-50%);
	}
}

/* 「ともに」 */
.jh-top__together {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	align-items: end;
	padding-top: 128px;
}

.jh-top h2.jh-top__phrase {
	grid-column: 1 / span 6;
	color: var(--jh-top-purple);
	font-size: clamp(38px, 4vw, 56px);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.jh-top p.jh-top__lead {
	grid-column: 7 / -1;
	margin: 0;
	color: var(--jh-top-sub);
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 500;
	line-height: 1.8;
}

/* 事業紹介 */
.jh-top__business {
	padding-top: 128px;
}

.jh-top h2.jh-top__title {
	font-size: clamp(30px, 2.8vw, 40px);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -0.01em;
}

.jh-top__title a:hover {
	color: var(--jh-top-purple);
}

/* 左に写真を固定し、スクロールで右の項目と写真を切り替える */
.jh-top__scroller {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	align-items: start;
	margin-top: 48px;
	container-type: inline-size;
}

.jh-top__stage {
	position: sticky;
	top: 120px;
	grid-column: 1 / span 6;
	overflow: hidden;
	aspect-ratio: 8 / 5;
	background: #f1eefe;
}

.jh-top .jh-top__shot {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
	clip-path: inset(0 0 100%);
	transition: clip-path 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.jh-top .jh-top__shot.is-shown {
	clip-path: inset(0);
}

.jh-top__rows {
	grid-column: 7 / -1;
	padding-left: 24px !important;
}

/* 1行の高さは写真と同じ（写真の幅 = 6列 + 列間5つ = 50cqw - 12px、比率 8:5） */
.jh-top__row a {
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
	min-height: calc((50cqw - 12px) * 0.625);
	padding: 24px 0;
	border-top: 1px solid #cfcfcf;
	box-shadow: inset 0 0 0 var(--jh-top-purple);
	transition: box-shadow 0.25s ease;
}

.jh-top__row:last-child a {
	border-bottom: 1px solid #cfcfcf;
}

.jh-top__row strong {
	display: block;
	color: #8a8a8a;
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 700;
	line-height: 1.45;
	letter-spacing: -0.01em;
	transition: color 0.25s ease;
}

.jh-top__row span {
	display: block;
	margin-top: 16px;
	color: #8a8a8a;
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 500;
	line-height: 1.6;
	transition: color 0.25s ease;
}

.jh-top__row.is-active a {
	box-shadow: inset 0 2px 0 var(--jh-top-purple);
}

.jh-top__row.is-active strong {
	color: var(--jh-top-ink);
}

.jh-top__row.is-active span {
	color: var(--jh-top-sub);
}

.jh-top__row a:hover strong {
	color: var(--jh-top-purple);
}

/* 社員の写真 */
.jh-top__recruit strong {
	display: block;
	margin-top: 16px;
	font-weight: 700;
	transition: color 0.15s ease;
}

.jh-top__recruit:hover strong,
.jh-top__links a:hover {
	color: var(--jh-top-purple);
}

.jh-top__recruit {
	display: block;
}

.jh-top__people-main {
	display: block;
	overflow: hidden;
	background: #f1eefe;
}

.jh-top__recruit:hover .jh-top__people-main img {
	transform: scale(1.03);
}

.jh-top__tile-text {
	display: block;
	margin-top: 12px;
	color: var(--jh-top-sub);
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 500;
	line-height: 1.6;
}

.jh-top__people {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
	align-items: start;
	padding: 144px 0 96px;
}

.jh-top__recruit {
	grid-column: 1 / span 8;
}

.jh-top__people-main img {
	transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.jh-top__recruit strong {
	font-size: clamp(30px, 2.8vw, 40px);
	line-height: 1.4;
}

.jh-top__people-side {
	grid-column: 9 / -1;
	margin-top: 96px;
}

.jh-top__links {
	margin-top: 32px !important;
	border-top: 2px solid var(--jh-top-purple);
}

.jh-top__links a {
	display: block;
	padding: 18px 0;
	border-bottom: 1px solid #d9d9d9;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
	transition: color 0.15s ease;
}

/* お知らせ */
.jh-news {
	padding-top: 144px;
	--jh-news-purple: var(--vk-color-primary, #8160fc);
	color: #222;
	font-feature-settings: "palt";
}

.jh-news a {
	color: inherit;
	text-decoration: none;
}

.jh-news h2.jh-news__title {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: inherit;
	font-size: clamp(30px, 2.8vw, 40px);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -0.01em;
	text-align: left;
}

.jh-news h2.jh-news__title::before {
	content: none !important;
}

.jh-news h2.jh-news__title::after {
	content: "" !important;
	position: static !important;
	display: block !important;
	width: 48px !important;
	height: 1px !important;
	margin: 0 !important;
	border: 0 !important;
	background: currentColor !important;
}

.jh-news__list {
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.jh-news__item {
	position: relative;
	margin: 0;
}

/* 区切り線：JS が動くときだけ、画面に入ったら左から伸ばす */
.jh-news__item::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 1px;
	background: #cfcfcf;
	transform-origin: left;
	transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.jh-news.is-animated .jh-news__item:not(.is-seen)::after {
	transform: scaleX(0);
}

.jh-news__item > a {
	display: flex;
	align-items: flex-start;
	gap: 48px;
	padding: 28px 0;
}

.jh-news__image {
	flex: 0 0 30%;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #f1eefe;
}

.jh-news__image img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 0 !important;
	object-fit: cover;
	transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.jh-news__item > a:hover .jh-news__image img {
	transform: scale(1.03);
}

/* アイキャッチのない記事は、代わりに入る横長のロゴを切らずに見せる */
.jh-news__image.is-default img {
	box-sizing: border-box;
	padding: 0 14%;
	object-fit: contain;
}

.jh-news__body {
	flex: 1;
	min-width: 0;
}

.jh-news__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #555;
	font-size: 15px;
	line-height: 1.5;
}

.jh-news__tag {
	padding: 2px 10px;
	border: 1px solid var(--jh-news-purple);
	color: var(--jh-news-purple);
	font-size: 12px;
	font-weight: 500;
}

.jh-news__name {
	display: block;
	margin-top: 16px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.7;
	transition: color 0.15s ease;
}

.jh-news__item > a:hover .jh-news__name {
	color: var(--jh-news-purple);
}

.jh-news__arrow {
	flex: none;
	align-self: center;
	transition: transform 0.25s ease;
}

.jh-news__item > a:hover .jh-news__arrow {
	color: var(--jh-news-purple);
	transform: translateX(6px);
}

.jh-news p.jh-news__more {
	margin: 40px 0 0;
	text-align: right;
}

.jh-news__more a {
	display: inline-block;
	min-width: 200px;
	padding: 14px 32px;
	background: var(--jh-news-purple);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	transition: background-color 0.15s ease;
}

.jh-news__more a:hover {
	background: #6a4be0;
	color: #fff;
}

/* ------------------------------------------------------------
 * 事業紹介の行の写真：PC は左の固定写真を使うので、行の中の写真は 992px 未満だけ出す
 * ------------------------------------------------------------ */
.jh-top .jh-top__row-shot {
	display: none;
}

/* ------------------------------------------------------------
 * タブレット（991px 以下）
 * ------------------------------------------------------------ */
@media (max-width: 991.98px) {
	.home .entry-body > .jh-banner-strip {
		margin-bottom: 80px;
	}

	.jh-top h2.jh-top__words {
		padding: 80px var(--vk-width-container-padding, 20px) 88px !important;
		font-size: clamp(30px, 8.4vw, 72px);
	}

	.jh-top__marquee {
		padding: 18px 0;
		font-size: clamp(22px, 4vw, 32px);
	}

	.jh-top__together {
		display: block;
		padding-top: 88px;
	}

	.jh-top h2.jh-top__phrase {
		font-size: clamp(30px, 6vw, 44px);
	}

	.jh-top p.jh-top__lead {
		margin-top: 24px;
		font-size: clamp(16px, 2.4vw, 19px);
	}

	.jh-top__business {
		padding-top: 88px;
	}

	.jh-top h2.jh-top__title,
	.jh-news h2.jh-news__title {
		font-size: clamp(26px, 4.4vw, 34px);
	}

	/* 固定の写真をやめ、行ごとに写真と文を並べる */
	.jh-top__scroller {
		display: block;
		margin-top: 32px;
		container-type: normal;
	}

	.jh-top__stage {
		display: none;
	}

	.jh-top__rows {
		padding-left: 0 !important;
	}

	.jh-top .jh-top__row-shot {
		display: block;
		grid-row: 1 / span 2;
		aspect-ratio: 8 / 5;
		height: auto;
		object-fit: cover;
	}

	.jh-top__row a {
		display: grid;
		grid-template-columns: clamp(112px, 30vw, 240px) minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		column-gap: clamp(16px, 3vw, 28px);
		min-height: 0;
		padding: 20px 0;
	}

	.jh-top__row.is-active a {
		box-shadow: none;
	}

	.jh-top__row strong,
	.jh-top__row.is-active strong {
		color: var(--jh-top-ink);
		font-size: clamp(17px, 2.8vw, 22px);
	}

	.jh-top__row span,
	.jh-top__row.is-active span {
		margin-top: 6px;
		color: var(--jh-top-sub);
		font-size: clamp(14px, 2.1vw, 17px);
	}

	.jh-top-banner {
		padding-top: 72px;
	}

	.jh-top-strategy {
		padding-top: 72px;
	}

	.jh-top-strategy > .wp-block-group > p.vk_block-margin-sm--margin-bottom {
		font-size: clamp(16px, 2.4vw, 19px);
	}

	.jh-top__people {
		padding: 88px 0 56px;
	}

	.jh-top__recruit strong {
		font-size: clamp(24px, 4vw, 32px);
	}

	.jh-top__tile-text {
		font-size: clamp(16px, 2.4vw, 19px);
	}

	.jh-top__people-side {
		margin-top: 48px;
	}

	.jh-top__links {
		margin-top: 20px !important;
	}

	.jh-top__links a {
		padding: 14px 0;
		font-size: 16px;
	}

	.jh-news {
		padding-top: 88px;
	}

	.jh-news__list {
		margin-top: 28px;
	}

	.jh-news__item > a {
		gap: 28px;
		padding: 24px 0;
	}

	.jh-news__name {
		margin-top: 10px;
		font-size: 16px;
	}
}

/* ------------------------------------------------------------
 * スマホ（767px 以下）
 * ------------------------------------------------------------ */
@media (max-width: 767.98px) {
	.home .entry-body > .jh-banner-strip {
		margin-bottom: 56px;
	}

	.jh-top h2.jh-top__words {
		padding: 56px var(--vk-width-container-padding, 20px) 64px !important;
		letter-spacing: -0.02em;
	}

	.jh-top__words span:nth-child(2) {
		margin-left: 0.5em;
	}

	.jh-top__words span:nth-child(3) {
		margin-left: 1em;
	}

	.jh-top__together,
	.jh-top__business {
		padding-top: 64px;
	}

	.jh-top-banner,
	.jh-top-strategy {
		padding-top: 56px;
	}

	.jh-top__row a {
		padding: 16px 0;
	}

	.jh-top__people {
		display: block;
		padding: 64px 0 40px;
	}

	.jh-top__recruit strong {
		margin-top: 14px;
	}

	.jh-top__people-side {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: end;
		gap: 16px;
		margin-top: 32px;
	}

	.jh-top__links {
		margin-top: 0 !important;
	}

	.jh-top-anniversary {
		padding-top: 24px;
	}

	.jh-news {
		padding-top: 64px;
	}

	.jh-news__list {
		margin-top: 20px;
	}

	.jh-news__item > a {
		gap: 16px;
		padding: 16px 0;
	}

	.jh-news__image {
		flex: 0 0 112px;
		aspect-ratio: 8 / 5;
	}

	.jh-news__meta {
		flex-wrap: wrap;
		gap: 4px 8px;
		font-size: 13px;
	}

	.jh-news__tag {
		padding: 0 8px;
		font-size: 11px;
	}

	.jh-news__name {
		margin-top: 6px;
		font-size: 14px;
		line-height: 1.6;
	}

	.jh-news__arrow {
		display: none;
	}

	.jh-news p.jh-news__more {
		margin-top: 28px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jh-top__marquee-track {
		animation: none !important;
	}

	.jh-news * {
		transition: none !important;
	}

	.jh-news.is-animated .jh-news__item:not(.is-seen)::after {
		transform: none;
	}

	.jh-news__item > a:hover .jh-news__image img,
	.jh-news__item > a:hover .jh-news__arrow {
		transform: none;
	}

	.jh-top .jh-top__shot {
		transition: none !important;
	}

	.jh-top * {
		transition: none !important;
	}

	.jh-top a:hover img {
		transform: none !important;
	}
}
