/*--------------------------------------------------------------
# Homepage Components
--------------------------------------------------------------*/

/* Homepage Hero Section
--------------------------------------------- */
.homepage-hero {
	padding-top: var(--menu-height);
	padding-bottom: 2rem;
	background-color: var(--color-bg-default);
}

.homepage-hero>.container {
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 28px;
}

.homepage-hero .columns {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

.homepage-hero .column {
	width: 100%;
}

.homepage-hero .column--primary {
	max-width: 100%;
	padding-top: 60px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/* Base styles - homepage hero inherits font-family from body */
.homepage-hero .column--primary>h1 {
	color: var(--color-text-heading);
	font-size: var(--font-size-heading-xl);
	font-weight: 500;
	line-height: var(--line-height-heading-xl);
	letter-spacing: -3px;
	margin: 0;
}

.homepage-hero .content {
	color: var(--color-text-body);
	font-size: var(--font-size-body-lg);
	font-weight: 400;
	line-height: var(--line-height-body-lg);
	margin: 0;
}

.homepage-hero .content p {
	margin-top: 0;
	margin-bottom: 1em;
}

.homepage-hero .content p:last-child {
	margin-bottom: 0;
}

.homepage-hero .buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	margin: 0;
}

.homepage-hero .column--secondary {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* Homepage Video Section
--------------------------------------------- */
.homepage-video {
	padding: 4rem 1.5rem;
	background-color: var(--color-bg-surface);
}

.homepage-video>.container {
	max-width: 1200px;
	margin: 0 auto;
}

.homepage-video .player {
	width: 100%;
	height: auto;
	border-radius: 0.5rem;
	box-shadow: 0 4px 6px var(--color-shadow-md);
}

/* Masked Video Component
--------------------------------------------- */
.video-masked {
	width: 100%;
	position: relative;
}

.video-masked__container {
	width: 100%;
	position: relative;
	overflow: hidden;
	/* Maintain mask aspect ratio: 1117 / 586 ≈ 1.906 */
	aspect-ratio: 1117 / 586;
}

.video-masked__container--svg {
	/* SVG mask properties - mask fills container */
	mask-size: 100% 100%;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
}

.video-masked__player {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	/* Ensure video plays smoothly */
	will-change: transform;
}

/* Ensure video fills container */
.video-masked__container video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@media screen and (min-width: 376px) {
	.homepage-hero .column--primary {
		gap: 0;
	}

	.homepage-hero .column--primary>h1 {
		color: #011B5D;
		font-size: 42px;
		font-weight: 500;
		line-height: 42px;
		letter-spacing: -3px;
	}

	.homepage-hero .content {
		color: #101B36;
		font-size: 18px;
		font-weight: 400;
		line-height: 24px;
		margin-top: 8px;
		margin-bottom: 40px;
		max-width: 480px;
	}

	.homepage-hero .buttons {
		flex-direction: column;
		gap: 1rem;
		margin-top: 0;
	}

	.homepage-hero .buttons a,
	.homepage-hero .buttons .button {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}

@media screen and (min-width: 768px) {
	.homepage-hero {
		padding-top: calc(30px + var(--menu-height));
		padding-bottom: 6rem;
	}

	.homepage-hero .columns {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.homepage-hero .column--primary {
		max-width: 546px;
	}

	.homepage-hero .column--primary>h1 {
		font-size: clamp(40px, 5vw, var(--font-size-heading-xl));
		line-height: clamp(40px, 5vw, var(--line-height-heading-xl));
	}

	.homepage-hero .buttons {
		flex-direction: row;
	}

	.homepage-hero .buttons a,
	.homepage-hero .buttons .button {
		width: auto;
	}

	.homepage-video {
		padding: 6rem 1.5rem;
	}
}

@media screen and (min-width: 1024px) {
	.homepage-hero .columns {
		grid-template-columns: minmax(0, 546px) 1fr;
		gap: 40px;
		align-items: center;
	}
}

@media screen and (min-width: 1200px) {
	.homepage-hero {
		padding-top: calc(90px + var(--menu-height));
	}

	.homepage-hero .columns {
		grid-template-columns: minmax(0, 546px) 1fr;
		gap: 70px;
		align-items: center;
	}

	.homepage-hero .column--primary {
		justify-content: center;
	}
}

@media screen and (min-width: 1600px) {
	.homepage-hero {
		position: relative;
		padding-top: calc(150px + var(--menu-height));
		overflow: visible;
	}

	.homepage-hero>.container {
		overflow: visible;
	}

	.homepage-hero .columns {
		grid-template-columns: minmax(0, 546px) 1fr;
		gap: 70px;
		overflow: visible;
	}

	.homepage-hero .column--primary {
		max-width: 546px;
	}

	.homepage-hero .column--secondary {
		overflow: visible;
		position: static;
	}

	.video-masked {
		/* Break out of grid and scale up from 1600px to 2560px max, stops scaling above 2560px */
		/* Container: 1600px centered, padding 28px, primary 546px, gap 70px */
		/* Video scales from grid position and extends to viewport right edge, max at 2560px */
		position: absolute;
		left: calc(((min(100vw, 2560px) - 1600px) / 2) + 28px + 546px + 70px);
		right: min(0px, calc((100vw - min(100vw, 2560px)) / 2));
		width: auto;
		min-width: 500px;
		max-width: calc(2560px - (((min(100vw, 2560px) - 1600px) / 2) + 28px + 546px + 70px));
	}

	.video-masked__container {
		width: 100%;
		height: 100%;
	}
}

@media screen and (min-width: 2560px) {
	.video-masked {
		/* Fixed position and width above 2560px - stops scaling */
		/* At 2560px: left = ((2560 - 1600) / 2) + 28 + 546 + 70 = 1124px */
		/* At 2560px: width = 2560 - 1124 = 1436px */
		left: 1124px;
		right: auto;
		width: 1436px;
		max-width: 1436px;
	}
}
