/*
 * Homepage sections. Enqueued on the front page only.
 */

/* Hero ------------------------------------------------------------------- */

.vx-hero {
	position: relative;
	overflow: hidden;
	background: var(--vx-color-primary-lighter);
}

.vx-hero__inner {
	display: grid;
	align-items: center;
	min-height: clamp(30rem, 24rem + 14vw, 38rem);
	padding-block: var(--vx-space-16);
}

.vx-hero__content {
	position: relative;
	z-index: 2;
	max-width: 40rem;
}

.vx-hero__eyebrow {
	margin-bottom: var(--vx-space-4);
}

.vx-hero__title {
	margin-bottom: var(--vx-space-5);
}

.vx-hero__title > span {
	display: block;
}

.vx-hero__text {
	max-width: 32rem;
	margin-bottom: var(--vx-space-6);
	color: var(--vx-color-text-muted);
	font-size: var(--vx-text-lead);
}

.vx-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--vx-space-4) var(--vx-space-8);
}

/* Media: bleeds to the right edge on desktop, stacks below on mobile. */
.vx-hero__media {
	position: relative;
	margin: 0 calc(-1 * var(--vx-gutter));
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.vx-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

@media (max-width: 1023px) {
	.vx-hero__inner {
		gap: var(--vx-space-10);
		min-height: 0;
		padding-block: var(--vx-space-12) 0;
	}
}

@media (min-width: 1024px) {
	.vx-hero__inner {
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
	}

	.vx-hero__title {
		font-size: clamp(2.75rem, 1rem + 2.9vw, 3.5rem);
	}

	.vx-hero__media {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: 50%;
		margin: 0;
		aspect-ratio: auto;
	}

	/* Fade the photo into the hero background, as in the mockup. */
	.vx-hero__media::before {
		content: "";
		position: absolute;
		inset: 0 auto 0 0;
		z-index: 1;
		width: 40%;
		background: linear-gradient(90deg, var(--vx-color-primary-lighter) 0%, rgba(248, 246, 254, 0) 100%);
		pointer-events: none;
	}
}

/* Replaceable media slot shown until a hero image is chosen in the Customizer. */
.vx-hero__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: var(--vx-space-10);
	background:
		radial-gradient(60% 70% at 70% 35%, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0) 70%),
		radial-gradient(50% 60% at 30% 80%, rgba(78, 34, 198, 0.22) 0%, rgba(78, 34, 198, 0) 70%),
		linear-gradient(160deg, #ece6fd 0%, #ddd2fb 100%);
}

.vx-hero__placeholder-stack {
	position: relative;
	width: min(100%, 26rem);
}

.vx-mock-window {
	overflow: hidden;
	border-radius: var(--vx-radius-lg);
	background: var(--vx-color-ink);
	box-shadow: var(--vx-shadow-lg);
	color: #d9d7f5;
	font-family: var(--vx-font-mono);
	font-size: 0.8125rem;
	line-height: 1.8;
}

.vx-mock-window__bar {
	display: flex;
	gap: 6px;
	padding: var(--vx-space-3) var(--vx-space-4);
	background: var(--vx-color-ink-raised);
}

.vx-mock-window__bar span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #3b3c75;
}

.vx-mock-window__code {
	margin: 0;
	padding: var(--vx-space-5);
	white-space: pre;
	overflow: hidden;
}

.vx-mock-window__code .k {
	color: #b79cff;
}

.vx-mock-window__code .s {
	color: #7ee2b8;
}

.vx-mock-window__code .c {
	color: #6f70a3;
}

.vx-mock-card {
	position: absolute;
	right: -1.5rem;
	bottom: -2rem;
	display: flex;
	align-items: center;
	gap: var(--vx-space-3);
	padding: var(--vx-space-3) var(--vx-space-4);
	border-radius: var(--vx-radius-md);
	background: #ffffff;
	box-shadow: var(--vx-shadow-md);
	font-size: var(--vx-text-small);
	font-weight: var(--vx-weight-semibold);
}

.vx-mock-card small {
	display: block;
	color: var(--vx-color-text-subtle);
	font-size: var(--vx-text-caption);
	font-weight: var(--vx-weight-regular);
}

.vx-hero__slot-hint {
	position: absolute;
	left: 50%;
	bottom: var(--vx-space-4);
	z-index: 2;
	transform: translateX(-50%);
	white-space: nowrap;
}

@media (max-width: 1023px) {
	/* Fixed fluid height rather than aspect-ratio + max-height, which would
	   shrink the panel's width and leave an untinted band on tablets. */
	.vx-hero__media {
		height: clamp(18rem, 70vw, 26rem);
		aspect-ratio: auto;
	}

	.vx-mock-card {
		right: 0;
	}
}

/* Section rhythm --------------------------------------------------------- */

.vx-home-programmes {
	padding-bottom: calc(var(--vx-section-space) * 0.75);
}

.vx-home-programmes__more {
	margin: var(--vx-space-8) 0 0;
	text-align: center;
}

.vx-home-why {
	padding-top: 0;
	padding-bottom: calc(var(--vx-section-space) * 0.75);
}

.vx-home-proof {
	display: grid;
	gap: var(--vx-space-6);
	padding-bottom: var(--vx-section-space);
}
