/*
 * Home page blocks: Home Banner, Featured Programs Carousel, Program Cards, Get Started.
 * Same palette and type as the news hub (blog.css): industry-inc-base headings, aaux-next body.
 */

:root {
	--home-navy: #001f66;
	--home-blue: #0050ff;
	--home-sky: #007aff;
	--home-cyan: #00b3ff;
	--home-yellow: #fff01d;
	--home-bg: #f5f5f5;
	--home-text: #313130;
	--home-body: #494948;
	--home-muted: #939391;
	--home-gutter: 24px;
	--home-max: 1280px;
	--home-header: 70px; /* fixed site navigation */
}

@media (min-width: 768px) {
	:root {
		--home-gutter: 48px;
		--home-header: 100px;
	}
}

.home-wrap {
	max-width: var(--home-max);
	margin: 0 auto;
	padding: 0 var(--home-gutter);
}

.home-empty {
	padding: 32px;
	border: 2px dashed var(--home-muted);
	text-align: center;
	color: var(--home-body);
}

/* ---------- Shared pieces ---------- */

.home-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	font-family: "industry-inc-base", sans-serif;
	font-size: 0.8125rem;
	line-height: 1.2;
	letter-spacing: 2.6px;
	text-transform: uppercase;
	color: var(--home-blue);
}

.home-eyebrow--muted {
	color: var(--home-muted);
}

.home-section-head {
	max-width: 720px;
	margin: 0 auto 40px;
	text-align: center;
}

.home-section-title {
	margin: 0 0 16px;
	font-size: clamp(1.875rem, 3.4vw, 2.75rem);
	line-height: 1.1;
	letter-spacing: 2px;
	color: var(--home-text);
}

.home-section-text {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--home-body);
}

.home-section-cta {
	margin-top: 40px;
	text-align: center;
}

.home-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 12px 28px;
	border: 2px solid var(--home-blue);
	border-radius: 3px;
	background: var(--home-blue);
	font-family: "industry-inc-base", sans-serif;
	font-size: 1rem;
	line-height: 1.2;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	text-align: center;
	color: #fff;
	box-shadow: 0 8px 20px rgba(0, 80, 255, 0.25);
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.home-btn:hover,
.home-btn:focus {
	border-color: var(--home-navy);
	background: var(--home-navy);
	color: #fff;
}

.home-btn--outline {
	background: transparent;
	color: var(--home-blue);
	box-shadow: none;
}

.home-btn--outline:hover,
.home-btn--outline:focus {
	background: var(--home-blue);
	border-color: var(--home-blue);
}

.home-btn:focus-visible,
.featured-slider__arrow:focus-visible,
.featured-slider__dot:focus-visible,
.program-card a:focus-visible {
	outline: 3px solid var(--home-cyan);
	outline-offset: 3px;
}

/* ---------- Home Banner ---------- */

.home-banner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: min(92vh, 760px);
	padding: calc(var(--home-header) + 48px) var(--home-gutter) 96px;
	overflow: hidden;
	background: radial-gradient(ellipse at center, #0b2a7a 0%, var(--home-navy) 70%);
	color: #fff;
	text-align: center;
}

.home-banner__media,
.home-banner__poster,
.home-banner__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.home-banner__poster,
.home-banner__video {
	object-fit: cover;
}

.home-banner__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 15, 51, 0.45) 0%, rgba(0, 15, 51, 0.55) 55%, rgba(0, 15, 51, 0.85) 100%);
}

.home-banner__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	max-width: 960px;
}

.home-banner__title {
	margin: 0;
	font-size: clamp(2.5rem, 7vw, 5.5rem);
	line-height: 1;
	letter-spacing: 1px;
	color: #fff;
	text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.home-banner__subtitle {
	max-width: 640px;
	margin: 0;
	font-size: clamp(1.125rem, 2vw, 1.375rem);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.92);
}

.home-banner__buttons {
	display: grid;
	gap: 16px;
	width: 100%;
	max-width: 340px;
	margin-top: 16px;
}

@media (min-width: 768px) {
	.home-banner__buttons {
		display: flex;
		justify-content: center;
		max-width: none;
		gap: 24px;
	}

	.home-banner__buttons .home-btn {
		min-width: 260px;
	}
}

/* Editor preview: keep the hero compact */
.home-banner.is-admin {
	min-height: 420px;
	padding-top: 64px;
	padding-bottom: 64px;
}

/* ---------- Featured Programs Carousel ---------- */

.featured-slider {
	position: relative;
	z-index: 2;
	margin-top: -72px; /* overlap the hero, as in the redesign */
	padding: 0 var(--home-gutter) 56px;
}

.featured-slider.is-admin {
	margin-top: 0;
	padding-top: 24px;
}

.featured-slider__frame {
	position: relative;
	max-width: var(--home-max);
	margin: 0 auto;
}

.featured-slider__torch {
	position: absolute;
	top: -44px;
	left: 20px;
	z-index: 3;
	width: 44px;
	pointer-events: none;
}

.featured-slider__torch svg {
	display: block;
	width: 100%;
	height: auto;
}

.featured-slider__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 31, 102, 0.18);
}

/* With JS, the carousel takes the height of the current slide instead of the tallest one. */
.featured-slider.is-auto-height .featured-slider__track {
	align-items: start;
	overflow-y: hidden;
	transition: height 0.35s ease;
}

.featured-slider__track::-webkit-scrollbar {
	display: none;
}

.featured-slide {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: center;
	min-height: 460px;
	padding: 32px 24px;
	overflow: hidden;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #fff;
}

@media (min-width: 900px) {
	.featured-slide {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: 40px;
		padding: 48px 56px;
	}
}

.featured-slide__bg {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
}

.featured-slide__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.82) 100%);
}

.featured-slide__text,
.featured-slide__card {
	position: relative;
	z-index: 1;
}

.featured-slide__label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	font-family: "industry-inc-base", sans-serif;
	font-size: 0.8125rem;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--home-blue);
}

.featured-slide__label::after {
	content: "";
	width: 44px;
	height: 4px;
	border-radius: 2px;
	background: var(--home-yellow);
}

.featured-slide__title {
	margin: 0 0 16px;
	font-size: clamp(1.875rem, 3.6vw, 3rem);
	line-height: 1.05;
	color: var(--home-text);
}

.featured-slide__desc {
	margin: 0 0 24px;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--home-body);
}

/* Rich text: paragraphs, lists and links from the editor */
.featured-slide__desc p,
.featured-slide__desc ul,
.featured-slide__desc ol {
	margin: 0 0 12px;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.featured-slide__desc > :last-child {
	margin-bottom: 0;
}

.featured-slide__desc a,
.featured-slide__title a {
	color: var(--home-blue);
	text-decoration: underline;
}

.featured-slide__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.featured-slide__card {
	padding: 16px 16px 20px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 16px 40px rgba(0, 31, 102, 0.16);
}

/* Flyers carry text, so show them whole (no cropping), up to a sensible height. */
.featured-slide__media {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 10px;
}

.featured-slide__media img,
.featured-slide__media video {
	display: block;
	width: 100%;
	height: auto;
	max-height: 420px;
	border-radius: 10px;
	object-fit: contain;
}

/* Videos keep their own proportions (vertical stays vertical), up to 500px tall: no cropping,
   no bars, no stretching. */
.featured-slide__media video {
	width: auto;
	max-width: 100%;
	max-height: 500px;
}

.featured-slide__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	font-family: "industry-inc-base", sans-serif;
	font-size: 0.875rem;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--home-blue);
}

.featured-slide__more:hover {
	color: var(--home-navy);
}

/* Phones: card first, text below; keep tall flyers from pushing the headline off screen. */
@media (max-width: 899px) {
	.featured-slide__card {
		order: -1;
	}

	.featured-slide__media img {
		max-height: 300px;
	}

	.featured-slide__media video {
		max-height: 420px;
	}
}

.featured-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 6px 18px rgba(0, 31, 102, 0.2);
	font-size: 30px;
	line-height: 1;
	color: var(--home-blue);
	cursor: pointer;
}

.featured-slider__arrow--prev {
	left: -24px;
}

.featured-slider__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.featured-slider__arrow--next {
	right: -24px;
}

/* Phones: smaller arrows, still centered on the slide's sides, half over the 24px gutter. */
@media (max-width: 899px) {
	.featured-slider__arrow {
		width: 40px;
		height: 40px;
		margin-top: -20px;
		font-size: 26px;
	}

	.featured-slider__arrow--prev {
		left: -20px;
	}

	.featured-slider__arrow--next {
		right: -20px;
	}
}

.featured-slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.featured-slider__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #c9cfdd;
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease;
}

.featured-slider__dot.is-active {
	width: 32px;
	background: var(--home-blue);
}

/* ---------- Program Cards ---------- */

.program-cards {
	padding: 80px 0;
	background: var(--home-bg);
}

.program-cards__grid {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 82%;
	gap: 20px;
	margin: 0 calc(-1 * var(--home-gutter));
	padding: 4px var(--home-gutter) 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--home-gutter);
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.program-cards__grid::-webkit-scrollbar {
	display: none;
}

@media (min-width: 768px) {
	.program-cards__grid {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 28px;
		margin: 0;
		padding: 0;
		overflow: visible;
	}
}

.program-card {
	position: relative; /* contains the stretched link and any screen-reader text */
	display: flex;
	flex-direction: column;
	overflow: hidden;
	scroll-snap-align: start;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 31, 102, 0.06), 0 8px 24px rgba(0, 31, 102, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--home-navy);
}

.program-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.program-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 22px 24px;
	border-top: 4px solid var(--home-yellow);
}

.program-card__title {
	margin: 0 0 10px;
	font-size: 1.25rem;
	line-height: 1.25;
	letter-spacing: 2.4px;
	color: var(--home-text);
}

.program-card__title a {
	color: inherit;
}

/* The whole card is clickable through the title link. */
.program-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.program-card__text {
	flex: 1;
	margin: 0 0 18px;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--home-body);
}

.program-card__more {
	font-family: "industry-inc-base", sans-serif;
	font-size: 0.8125rem;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--home-blue);
}

@media (hover: hover) and (pointer: fine) {
	.program-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 2px 4px rgba(0, 31, 102, 0.08), 0 16px 40px rgba(0, 31, 102, 0.12);
	}
}

/* ---------- Get Started ---------- */

.get-started {
	padding: 0 0 80px;
	overflow: hidden;
	background: linear-gradient(180deg, var(--home-bg) 0, var(--home-sky) 220px, var(--home-sky) 100%);
}

.get-started__marquee {
	padding: 24px 0 48px;
	font-family: "industry-inc-base", sans-serif;
	font-size: clamp(3.5rem, 11vw, 9rem);
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	user-select: none;
}

.get-started__line {
	display: flex;
	width: max-content;
	animation: home-marquee 40s linear infinite;
}

.get-started__line--solid {
	color: var(--home-navy);
}

.get-started__line--outline {
	margin-top: 8px;
	color: transparent;
	-webkit-text-stroke: 2px var(--home-yellow);
	animation-direction: reverse;
}

@keyframes home-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

.get-started__panel {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 420px;
	padding: 24px;
	border-radius: 16px;
	background-color: #fbe9c0;
	background-position: right center;
	background-size: cover;
}

@media (min-width: 768px) {
	.get-started__panel {
		padding: 40px;
		background-size: auto 115%;
		background-repeat: no-repeat;
		background-position: 85% 40%;
	}
}

.get-started__card {
	position: relative;
	max-width: 560px;
	padding: 32px 28px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 16px 40px rgba(0, 31, 102, 0.16);
}

@media (min-width: 768px) {
	.get-started__card {
		padding: 44px 40px;
	}
}

.get-started__wave {
	position: absolute;
	top: 6px;
	left: -18px;
	width: 64px;
	pointer-events: none;
}

.get-started__wave svg {
	display: block;
	width: 100%;
	height: auto;
}

.get-started__title {
	margin: 0 0 16px;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.02;
	color: var(--home-text);
}

.get-started__text {
	margin: 0 0 28px;
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--home-body);
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
	.get-started__line {
		animation: none;
	}

	.featured-slider__dot,
	.featured-slider.is-auto-height .featured-slider__track,
	.program-card {
		transition: none;
	}
}
