/**
 * Homepage duo showcase — two cards meet from the sides, text rises beneath.
 * Movement is driven by GSAP in assets/js/home-motion.js.
 *
 * Start states apply only while <html class="nova-motion"> is set (added in
 * <head>, removed by a failsafe if the script never boots).
 */

.nova-duo {
	position: relative;
	display: flex;
	align-items: center;
	min-height: calc(100vh - var(--nova-header-h, 80px));
	padding: clamp(32px, 6vh, 64px) 0;
	overflow: hidden;
	isolation: isolate;
	background: var(--color-bg, #0B0D13);
}

.nova-duo:nth-of-type(even) {
	background: var(--color-surface, #131620);
}

/* Soft gold light pooling between the two cards. */
.nova-duo__glow {
	position: absolute;
	left: 50%;
	top: 42%;
	width: min(900px, 90vw);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	background: radial-gradient(closest-side, rgba(var(--color-accent-rgb, 229, 195, 120), 0.14), transparent 70%);
	opacity: 0;
	z-index: -1;
	pointer-events: none;
}

.nova-duo__inner {
	width: 100%;
}

/* ── Stage: [card] [text] [card] ─────────────────────────── */

.nova-duo__stage {
	position: relative; /* offsetParent for the JS travel distances */
	display: grid;
	grid-template-columns: minmax(0, 340px) minmax(0, 1fr) minmax(0, 340px);
	align-items: center;
	gap: clamp(24px, 3.4vw, 56px);
	max-width: 1240px;
	margin: 0 auto;
}

.nova-duo__slot {
	display: flex;
	min-width: 0;
	will-change: transform, opacity;
}

.nova-duo__slot--left { grid-column: 1; grid-row: 1; z-index: 2; }
.nova-duo__slot--right { grid-column: 3; grid-row: 1; z-index: 1; }

.nova-duo__slot > .nova-card {
	width: 100%;
}

.nova-duo__slot .nova-course-card__image {
	height: clamp(160px, 24vh, 210px);
}

.nova-duo__slot .nova-course-card__excerpt {
	display: none;
}

/* Photo stays perfectly still — only the card moves. */
.nova-duo__slot .nova-course-card__image img,
.nova-duo__slot .nova-course-card:hover .nova-course-card__image img {
	transform: none;
	scale: 1;
	transition: none;
}

/* ── Text (sits in the middle, where the cards start) ───── */

.nova-duo__text {
	grid-column: 2;
	grid-row: 1;
	text-align: center;
	padding: 0 clamp(0px, 1vw, 16px);
}

.nova-duo__label {
	display: inline-block;
	margin-bottom: 16px;
}

.nova-duo__title {
	margin: 0 0 16px;
	font-family: var(--font-display, sans-serif);
	font-size: clamp(1.6rem, 2.7vw, 2.45rem);
	line-height: 1.14;
	letter-spacing: -0.02em;
	color: var(--color-text, #fff);
}

.nova-duo__word {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding-bottom: 0.14em;
	margin-bottom: -0.14em;
}

.nova-duo__word > span {
	display: inline-block;
	will-change: transform;
}

.nova-duo__subtitle {
	margin: 0 auto 28px;
	max-width: 440px;
	color: var(--color-text-muted, rgba(255, 255, 255, 0.66));
	line-height: 1.65;
}

.nova-duo__btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.nova-duo__btn-arrow {
	display: inline-block;
	transition: transform var(--transition-base, 250ms ease);
}

.nova-duo__btn:hover .nova-duo__btn-arrow {
	transform: translateX(5px);
}

/* ── Hidden start states (no flash before JS takes over) ── */

.nova-motion .nova-duo__slot,
.nova-motion .nova-duo__text [data-duo-text],
.nova-motion .nova-duo__title {
	opacity: 0;
	visibility: hidden;
}

/* ── Narrow screens: text first, cards stacked beneath ──── */

@media (max-width: 1100px) {
	.nova-duo {
		min-height: 0;
		padding: 72px 0 80px;
	}

	.nova-duo__stage {
		grid-template-columns: minmax(0, 1fr);
		max-width: 460px;
		gap: 24px;
	}

	.nova-duo__text,
	.nova-duo__slot--left,
	.nova-duo__slot--right {
		grid-column: 1;
		grid-row: auto;
	}

	.nova-duo__text { order: -1; margin-bottom: 8px; }

	.nova-duo__slot .nova-course-card__image {
		height: 190px;
	}
}
