.site-header {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	width: 100%;
	height: 82px;
	isolation: isolate;
}

.site-header::before {
	position: absolute;
	z-index: -1;
	inset: 0;
	background: rgb(14 14 12 / 68%);
	backdrop-filter: blur(10px);
	content: "";
	opacity: 0;
	pointer-events: none;
	transition: opacity 280ms ease;
	-webkit-backdrop-filter: blur(10px);
}

.site-header.is-scrolled::before {
	opacity: 1;
}

.site-header__inner {
	position: relative;
	display: flex;
	width: 100%;
	margin-inline: auto;
	align-items: center;
	min-height: 82px;
	padding-inline: 40px;
	gap: 32px;
}

.site-header__brand {
	width: 159px;
	height: 50px;
	margin-right: auto;
	background: url("../../images/logo.svg") center / contain no-repeat;
}

.site-header__nav {
	display: flex;
	align-items: center;
	gap: 32px;
	font-family: var(--font-en);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0.1em;
}

.site-header__nav a,
.site-header__nav-trigger {
	transition: color 160ms ease;
	white-space: nowrap;
}

.site-header__direct-link:focus-visible,
.site-header__nav-trigger:focus-visible {
	color: var(--color-accent);
}

.site-header__nav-item {
	display: flex;
	align-items: center;
}

.site-header__nav-trigger {
	display: inline-flex;
	align-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font: inherit;
	letter-spacing: inherit;
}

.site-header__chevron {
	display: block;
	width: 8px;
	height: 8px;
	margin-left: 10px;
	border-right: 1px solid currentcolor;
	border-bottom: 1px solid currentcolor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 180ms ease;
}

.site-header__nav-item.is-open .site-header__nav-trigger {
	color: var(--color-accent);
}

.site-header__nav-item.is-open .site-header__chevron {
	transform: translateY(2px) rotate(225deg);
}

.site-header__mega {
	position: absolute;
	z-index: 10;
	top: 82px;
	left: 50%;
	width: min(1840px, calc(100% - 80px));
	padding-top: 16px;
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transform: translate(-50%, -12px);
	transition: opacity 180ms ease, transform 180ms ease;
}

.site-header__nav-item.is-open .site-header__mega {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
	transform: translate(-50%, 0);
}

.site-header__mega-surface {
	display: grid;
	grid-template-columns: 500px minmax(0, 1fr) 548px;
	min-height: 470px;
	padding: 64px;
	gap: 64px;
	border-radius: 16px;
	background: #303030;
	box-shadow: 0 24px 60px rgb(0 0 0 / 24%);
}

.site-header__mega-intro,
.site-header__mega-links {
	min-width: 0;
}

.site-header__mega-title,
.site-header__mega-subtitle {
	margin: 0;
}

.site-header__mega-title {
	font-family: var(--font-en);
	font-size: 60px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.03em;
}

.site-header__mega-subtitle {
	margin-top: 8px;
	font-family: var(--font-jp);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0;
}

.site-header__mega-overview {
	display: inline-flex;
	align-items: center;
	margin-top: 46px;
	gap: 10px;
	font-family: var(--font-jp);
	font-size: 20px;
	letter-spacing: 0;
}

.site-header__mega-links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 30px;
	font-family: var(--font-jp);
	font-size: 20px;
	letter-spacing: 0;
}

.site-header__mega-links a,
.site-header__mega-overview {
	transition: color 160ms ease;
}

.site-header__mega-links a {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	gap: 10px;
	white-space: normal;
}

.site-header__mega-links a span,
.site-header__mega-overview span {
	flex: none;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
}

.site-header__mega-links a:focus-visible,
.site-header__mega-links a.is-active,
.site-header__mega-overview:focus-visible {
	color: var(--color-accent);
}

/* タッチ端末はタップ後に:hoverが残るため、ホバーできる入力に限定する。 */
@media (hover: hover) {
	.site-header__direct-link:hover,
	.site-header__nav-trigger:hover,
	.site-header__mega-links a:hover,
	.site-header__mega-overview:hover {
		color: var(--color-accent);
	}
}

.site-header__mega-visual {
	position: relative;
	align-self: center;
	width: 100%;
	aspect-ratio: 1.6;
	overflow: hidden;
	border-radius: 10px;
	background: #d9d9d9;
}

.site-header__mega-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 180ms ease;
}

.site-header__mega-image.is-active {
	opacity: 1;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.site-header__download,
.site-header__contact {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	gap: 12px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.1em;
	transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
	white-space: nowrap;
}

.site-header__download {
	width: 204px;
	border-color: #fff;
	background: #fff;
	color: var(--color-ink);
}

.site-header__contact {
	width: 174px;
	border-color: var(--color-accent);
	background: var(--color-accent);
	color: #fff;
}

.site-header__action-icon {
	display: block;
	width: 19px;
	height: 19px;
	flex: none;
	background: currentcolor;
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
}

.site-header__action-icon--download {
	mask-image: url("../../images/nav-download.svg");
	-webkit-mask-image: url("../../images/nav-download.svg");
}

.site-header__action-icon--contact {
	height: 16px;
	mask-image: url("../../images/nav-contact.svg");
	-webkit-mask-image: url("../../images/nav-contact.svg");
}

@media (min-width: 1161px) {
	.site-header__download:focus-visible {
		border-color: #fff;
		background: var(--color-ink);
		color: #fff;
	}

	.site-header__contact:focus-visible {
		border-color: var(--color-accent);
		background: #fff;
		color: var(--color-accent);
	}
}

@media (hover: hover) and (min-width: 1161px) {
	.site-header__download:hover {
		border-color: #fff;
		background: var(--color-ink);
		color: #fff;
	}

	.site-header__contact:hover {
		border-color: var(--color-accent);
		background: #fff;
		color: var(--color-accent);
	}
}

.site-header__menu {
	display: none;
	width: 57px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--color-ink);
	border-radius: 25px;
	background: #fff;
	cursor: pointer;
}

/*
 * 3本線（閉）とバツ（開）を1つの部品で描き、線を動かして切り替える。
 * 画像の差し替えだとアニメーションできないため、線を要素に分けている。
 * 開いたときの角度と長さはFigmaのmenu-close（22×14の対角線）に合わせる。
 */
.site-header__menu-icon {
	position: relative;
	display: block;
	width: 21px;
	height: 14px;
	margin: 0 auto;
}

.site-header__menu-icon span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1px;
	background: var(--color-ink);
	transition:
		transform 320ms var(--ease-out-quint),
		opacity 160ms ease;
}

.site-header__menu-icon span:nth-child(1) {
	top: 0;
}

.site-header__menu-icon span:nth-child(2) {
	top: 6.5px;
}

.site-header__menu-icon span:nth-child(3) {
	top: 13px;
}

.site-header__menu[aria-expanded="true"] .site-header__menu-icon span:nth-child(1) {
	transform: translateY(6.5px) rotate(33deg) scaleX(1.21);
}

.site-header__menu[aria-expanded="true"] .site-header__menu-icon span:nth-child(2) {
	opacity: 0;
	transform: scaleX(0.4);
}

.site-header__menu[aria-expanded="true"] .site-header__menu-icon span:nth-child(3) {
	transform: translateY(-6.5px) rotate(-33deg) scaleX(1.21);
}

@media (prefers-reduced-motion: reduce) {
	.site-header::before,
	.site-header__menu-icon span {
		transition: none;
	}
}

/* ドロワー下部のCTA。PCでは出さない。 */
.site-header__nav-actions {
	display: none;
}

/* Recruitは外部サイトのため、ラベルの後ろにアイコンを添える（PC gap 12px）。 */
.site-header__direct-link[target="_blank"] {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.site-header__external {
	display: block;
	width: 12px;
	height: 12px;
	flex: none;
	background: currentcolor;
	mask: url("../../images/external-link.svg") center / contain no-repeat;
	-webkit-mask: url("../../images/external-link.svg") center / contain no-repeat;
}

@media (max-width: 1599px) and (min-width: 1161px) {
	.site-header__mega-surface {
		grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.1fr) minmax(320px, 1fr);
		min-height: 380px;
		padding: 48px;
		gap: 40px;
	}

	.site-header__mega-title {
		font-size: 48px;
	}

	.site-header__mega-links,
	.site-header__mega-overview {
		font-size: 16px;
	}
}

@media (max-width: 1160px) {
	.site-header {
		height: 60px;
	}

	.site-header__inner {
		min-height: 60px;
		padding-inline: 20px;
		gap: 8px;
	}

	.site-header__brand {
		width: 114px;
		height: 36px;
	}

	.site-header__menu {
		display: block;
	}

	.site-header__download {
		display: none;
	}

	.site-header__contact {
		width: 92px;
		height: 36px;
		gap: 0;
		border-radius: 25px;
		background: var(--color-accent);
		color: #fff;
		font-size: 12px;
		letter-spacing: 0;
	}

	.site-header__contact .site-header__action-icon {
		display: none;
	}

	/*
	 * SPドロワー（Figma メニュー 142:160）。
	 * ヘッダー60pxの下4pxから66pxの行が並び、区切り線は#BABABAで幅350px。
	 * 最後にダウンロード／お問い合わせのボタンが入る。
	 */
	/*
	 * メニューを開いている間はヘッダーの背後まで#303030で覆う（Figma 142:160は
	 * 画面全体のパネルの上に透明なヘッダーが乗る構造）。ロゴと右側のボタンは
	 * パネルより前面に出す。スクロール途中で開いてもヘッダーが流れないよう、
	 * 開いている間だけヘッダーを固定する。
	 */
	body.menu-open .site-header {
		position: fixed;
	}

	.site-header__brand,
	.site-header__actions {
		position: relative;
		z-index: 1;
	}

	.site-header__nav {
		position: fixed;
		inset: 0;
		display: grid;
		align-content: start;
		gap: 0;
		padding: 64px 20px 40px;
		overflow-y: auto;
		background: var(--color-surface);
		font-size: 16px;
		font-weight: 700;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-12px);
		transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
	}

	.site-header__direct-link,
	.site-header__nav-trigger {
		display: flex;
		width: 100%;
		height: 66px;
		padding: 0 0 0 20px;
		align-items: center;
		border-bottom: 1px solid #bababa;
		text-align: left;
	}

	.site-header__nav-item {
		display: block;
	}

	.site-header__nav-trigger {
		justify-content: space-between;
		padding-right: 0;
	}

	/* 右端の66px角がシェブロン。左辺に42pxの縦罫線が入る。 */
	.site-header__chevron {
		position: relative;
		width: 66px;
		height: 66px;
		margin: 0;
		border: 0;
		transform: none;
	}

	.site-header__chevron::before {
		position: absolute;
		top: 50%;
		left: 0;
		width: 1px;
		height: 42px;
		transform: translateY(-50%);
		background: #bababa;
		content: "";
	}

	.site-header__chevron::after {
		position: absolute;
		inset: 0;
		background: url("../../images/nav-chevron.svg") center / 12px auto no-repeat;
		transition: transform 180ms ease;
		content: "";
	}

	.site-header__nav-item.is-open .site-header__chevron {
		transform: none;
	}

	.site-header__nav-item.is-open .site-header__chevron::after {
		transform: rotate(180deg);
	}

	/* SPは行いっぱいの高さを持つので、左寄せに戻してアイコンを文字の直後に置く。 */
	.site-header__direct-link[target="_blank"] {
		display: flex;
		justify-content: flex-start;
		gap: 16px;
	}

	.site-header__nav-actions {
		display: grid;
		gap: 12px;
		margin-top: 40px;
	}

	.site-header__nav-download,
	.site-header__nav-contact {
		display: flex;
		height: 58px;
		align-items: center;
		justify-content: center;
		gap: 12px;
		border-radius: 4px;
		font-family: var(--font-jp);
		font-size: 14px;
		font-weight: 700;
		letter-spacing: 0.1em;
	}

	.site-header__nav-download {
		background: #fff;
		color: var(--color-ink);
	}

	.site-header__nav-contact {
		background: var(--color-accent);
		color: #fff;
	}

	.site-header__nav-download img,
	.site-header__nav-contact img {
		width: 18px;
		height: auto;
		flex: none;
	}

	.site-header__mega {
		position: static;
		width: 100%;
		max-height: 0;
		padding: 0;
		overflow: hidden;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: max-height 240ms ease;
	}

	.site-header__nav-item.is-open .site-header__mega {
		max-height: 620px;
		border-bottom: 1px solid #bababa;
		transform: none;
	}

	.site-header__mega-surface {
		display: block;
		min-height: 0;
		padding: 8px 0 20px 16px;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header__mega-title,
	.site-header__mega-subtitle,
	.site-header__mega-visual {
		display: none;
	}

	.site-header__mega-overview {
		margin-top: 0;
	}

	.site-header__mega-links {
		display: block;
	}

	.site-header__mega-links a,
	.site-header__mega-overview {
		display: flex;
		width: 100%;
		padding: 10px 0;
		border: 0;
		font-size: 14px;
		line-height: 1.6;
	}

	.site-header__mega-links a span,
	.site-header__mega-overview span {
		font-size: 20px;
	}

	.site-header__nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
}
