/* Homepage company introduction: video entry and player. */
.company-video-card {
	position: relative;
	display: block;
	width: 100%;
	height: clamp(150px, 27vh, 300px);
	flex-shrink: 0;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 20px;
	background: #22324a;
	color: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.company-video-card__cover {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s;
}

.company-video-card__preview {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #e4edf2;
	opacity: 0;
	transition: opacity 0.2s;
}

.company-video-card.is-previewing .company-video-card__cover {
	opacity: 0;
}

.company-video-card.is-previewing .company-video-card__preview {
	opacity: 1;
}

.company-video-card.is-previewing .company-video-card__play-control {
	opacity: 0;
	visibility: hidden;
}

.company-video-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 27, 43, 0.05) 20%, rgba(15, 27, 43, 0.8) 100%);
}

.company-video-card__content {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 24px;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 16px;
}

.company-video-card__play {
	width: 52px;
	height: 52px;
	object-fit: contain;
	flex-shrink: 0;
}

.company-video-card__text strong,
.company-video-card__text > span {
	display: block;
}

.company-video-card__text strong {
	font-size: 22px;
	line-height: 1.5;
	font-weight: normal;
}

.company-video-card__text > span,
.company-video-card__hint {
	font-size: 13px;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.8);
}

.company-video-card__hint {
	margin-left: auto;
	white-space: nowrap;
}

.company-video-card:hover .company-video-card__cover {
	transform: scale(1.04);
}

.company-video-card:focus-visible,
.company-video-modal__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -5px;
}

.company-video-modal[hidden],
.company-video-modal__error[hidden] {
	display: none;
}

.company-video-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.85);
	overscroll-behavior: contain;
}

.company-video-modal__panel {
	width: min(100%, 1000px);
	max-height: 100%;
	overflow: auto;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	background: #111b29;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.company-video-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 20px;
	color: #fff;
}

.company-video-modal__header h2 {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
	font-weight: normal;
}

.company-video-modal__close {
	min-width: 60px;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 22px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	flex-shrink: 0;
}

.company-video-modal__close:hover {
	background: rgba(255, 255, 255, 0.12);
}

.company-video-modal__player {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 160px);
	max-height: calc(100dvh - 160px);
	aspect-ratio: 16 / 9;
	object-fit: contain;
	background: #000;
}

.company-video-modal__error {
	padding: 12px 20px;
	font-size: 14px;
	color: #fff;
}

html.company-video-open,
body.company-video-open {
	overflow: hidden !important;
	overscroll-behavior: none;
}

@media (max-width: 999px) {
	.company-video-card {
		height: auto;
		aspect-ratio: 16 / 9;
		margin-bottom: 2rem;
		border-radius: 10px;
	}

	.company-video-card__content {
		left: 16px;
		right: 16px;
		bottom: 16px;
		gap: 12px;
	}

	.company-video-card__play {
		width: 44px;
		height: 44px;
	}

	.company-video-card__text strong {
		font-size: 20px;
	}

	.company-video-card__hint {
		display: none;
	}

	.company-video-modal {
		padding: 12px;
	}

	.company-video-modal__header {
		padding: 12px;
	}

	.company-video-modal__header h2 {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.company-video-card__cover,
	.company-video-card__preview {
		transition: none;
	}
}
