/**
 * Home page (front-page.php) — Phase 11. Loaded only on the front page (inc/assets.php).
 * Sections use the shared `.pgs-section` spacing; home-specific parts follow per step
 * (hero + stats 11.2, classes + featured 11.3, why + steps 11.4, instructors 11.5,
 * achievers + testimonials 11.6, blog + final CTA 11.7; demo class, FAQ and the Become an
 * Instructor band were removed on 2026-10-27).
 */

/* ---- Sections (11.0.2): two white sections in a row share one gap (their paddings would add up).
   Only between white sections — after a coloured one (grey, mint, navy, hero) the white section keeps
   its top padding, so its heading never touches the colour edge. */
.pgs-home-section:not(.pgs-section--alt, .pgs-section--accent, .pgs-dark, .pgs-section--hero) + .pgs-home-section:not(.pgs-section--alt, .pgs-section--accent, .pgs-dark, .pgs-section--hero) {
	padding-top: 0;
}

/* The numbers strip sits on the hero's bottom edge (it pulls itself up over the hero). */
.pgs-home-stats {
	padding-top: 0;
}

/* ---- Hero (11.2.1): text + picture with two floating badges; text full width without a picture. */
.pgs-home-hero {
	--pgs-hero-swoosh: clamp(64px, 12vw, 170px);
	overflow: hidden;
	/* Bottom space taller than the curves, so they never run through the text or picture. */
	padding-block: clamp(40px, 7vw, 88px) calc(var(--pgs-hero-swoosh) + 16px);
}

.pgs-home-hero .pgs-swoosh {
	height: var(--pgs-hero-swoosh);
}

.pgs-home-hero__inner {
	position: relative;
	display: grid;
	gap: clamp(36px, 6vw, 56px);
	align-items: center;
}

.pgs-home-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	min-width: 0;
}

.pgs-home-hero__title {
	max-width: 16ch;
	margin: 0;
	font-size: clamp(2.375rem, 1.7rem + 3vw, 4rem); /* 38 → 64: the one display heading of the site */
	line-height: 1.08;
	overflow-wrap: anywhere;
}

.pgs-home-hero__text {
	max-width: 56ch;
	margin: 0;
}

.pgs-home-hero__actions {
	align-self: stretch; /* the row spans the column, so on phones the button is full width */
	margin-top: 8px;
}

.pgs-home-hero__media {
	position: relative;
	z-index: 0;
	width: 100%;
	max-width: 560px;
	margin-inline: auto;
}

.pgs-home-hero__img {
	display: block;
	width: 100%;
	height: auto;
}

/* Photo with a background: clean rounded frame. */
.pgs-home-hero--image:not(.pgs-home-hero--cutout) .pgs-home-hero__img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border: 1px solid var(--pgs-border-strong);
	border-radius: calc(var(--pgs-radius) * 2);
	box-shadow: var(--pgs-shadow-lg);
}

/* Cut-out students: glowing circle + slowly turning dashed ring behind them; they rise from the
   hero's bottom edge (the bottom space is pulled back) and the bottom of the picture fades out. */
.pgs-home-hero--cutout .pgs-home-hero__media {
	align-self: end;
	max-width: 600px;
	margin-bottom: calc(-1 * (var(--pgs-hero-swoosh) + 16px));
}

.pgs-home-hero--cutout .pgs-home-hero__media::before,
.pgs-home-hero--cutout .pgs-home-hero__media::after {
	content: "";
	position: absolute;
	z-index: -1;
	left: 50%;
	aspect-ratio: 1;
	border-radius: 50%;
	pointer-events: none;
	transform: translateX(-50%);
}

.pgs-home-hero--cutout .pgs-home-hero__media::before {
	top: 6%;
	width: 86%;
	background:
		radial-gradient(circle at 50% 45%, rgba(95, 140, 255, .45) 0%, rgba(95, 140, 255, .16) 45%, transparent 70%),
		radial-gradient(circle at 70% 80%, rgba(96, 184, 2, .35) 0%, transparent 55%),
		linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), 0 0 120px rgba(95, 140, 255, .25);
}

.pgs-home-hero--cutout .pgs-home-hero__media::after {
	top: 1%;
	width: 96%;
	border: 2px dashed rgba(142, 214, 43, .45);
	animation: pgs-hero-ring 60s linear infinite;
}

.pgs-home-hero--cutout .pgs-home-hero__img {
	position: relative;
	-webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
	filter: drop-shadow(0 24px 40px rgba(0, 8, 30, .45));
}

/* Size (2026-10-29): smaller on phones / tablets, and on computers never taller than the screen
   leaves room for (the picture is square), so the hero fits without scrolling. */
@media (max-width: 639px) {
	.pgs-home-hero--cutout .pgs-home-hero__media {
		max-width: 300px;
	}
}

@media (min-width: 640px) and (max-width: 1023px) {
	.pgs-home-hero--cutout .pgs-home-hero__media {
		max-width: 400px;
	}
}

@media (min-width: 1024px) {
	.pgs-home-hero--cutout .pgs-home-hero__media {
		max-width: min(560px, calc(100vh - 220px));
	}
}

@keyframes pgs-hero-ring {
	to { transform: translateX(-50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.pgs-home-hero--cutout .pgs-home-hero__media::after {
		animation: none;
	}
}

@media (min-width: 1024px) {
	.pgs-home-hero--image .pgs-home-hero__inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	}

	.pgs-home-hero--image .pgs-home-hero__media {
		margin-inline: auto 0;
	}
}

/* ---- Why Choose PGS (11.4.1): picture (or branded panel) + lime badge | heading, timeline, button. */
.pgs-home-why__inner {
	display: grid;
	gap: clamp(40px, 6vw, 72px);
	align-items: center;
}

.pgs-home-why__media {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin-inline: auto;
	/* Room for the badge that hangs over the bottom-left corner. */
	padding-bottom: 28px;
}

.pgs-home-why__img,
.pgs-home-why__media--panel {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	border: 1px solid var(--pgs-border-strong);
	border-radius: calc(var(--pgs-radius) * 2);
	background: var(--pgs-surface);
	box-shadow: var(--pgs-shadow-lg);
	object-fit: cover;
}

/* No picture: a branded panel — the logo on a soft glow and the motto. */
.pgs-home-why__media--panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 32px 24px 56px;
	background:
		radial-gradient(circle at 50% 40%, rgba(95, 140, 255, .30), transparent 60%),
		radial-gradient(circle at 70% 85%, rgba(96, 184, 2, .22), transparent 55%),
		var(--pgs-surface);
}

.pgs-home-why__logo {
	width: clamp(96px, 30%, 150px);
	height: auto;
	border-radius: 50%;
	box-shadow: 0 0 0 10px rgba(255, 255, 255, .06), 0 0 60px rgba(95, 140, 255, .35);
}

.pgs-home-why__panel-text {
	color: var(--pgs-text);
	font-family: var(--pgs-font-head);
	font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
	font-weight: 800;
	text-align: center;
}

.pgs-home-why__media .pgs-stat-badge--bl {
	bottom: 0;
	left: 12px;
}

/* ---- Picture frame (2026-10-29): navy glow card, dot pattern, a ring behind the person (the
   picture is a cut-out PNG), name + role on a dark fade at the bottom, badge bottom-right. ---- */
.pgs-home-why__frame {
	position: relative;
	overflow: hidden;
	margin: 0;
	aspect-ratio: 4 / 5;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: calc(var(--pgs-radius) * 2);
	background:
		radial-gradient(circle at 50% 38%, rgba(95, 140, 255, .38), transparent 58%),
		radial-gradient(circle at 85% 95%, rgba(96, 184, 2, .22), transparent 50%),
		linear-gradient(160deg, #0b2a6b 0%, #071d4d 55%, #04153a 100%);
	box-shadow: var(--pgs-shadow-lg);
}

/* Dot pattern, strongest top-right, fading out. */
.pgs-home-why__frame::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .16) 1.2px, transparent 1.4px);
	background-size: 18px 18px;
	-webkit-mask-image: radial-gradient(circle at 85% 15%, #000 0, transparent 55%);
	mask-image: radial-gradient(circle at 85% 15%, #000 0, transparent 55%);
	pointer-events: none;
}

.pgs-home-why__ring {
	position: absolute;
	top: 14%;
	left: 50%;
	width: 76%;
	aspect-ratio: 1;
	border: 2px solid rgba(132, 214, 40, .55);
	border-radius: 50%;
	box-shadow: 0 0 40px rgba(96, 184, 2, .18), inset 0 0 40px rgba(96, 184, 2, .10);
	transform: translateX(-50%);
	pointer-events: none;
}

.pgs-home-why__media--photo .pgs-home-why__img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	object-fit: contain;
	object-position: center bottom;
}

.pgs-home-why__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: grid;
	gap: 4px;
	padding: 72px 28px 26px;
	background: linear-gradient(180deg, transparent 0%, rgba(2, 12, 38, .78) 55%, rgba(2, 12, 38, .94) 100%);
}

.pgs-home-why__name {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: #fff;
	font-family: var(--pgs-font-head);
	font-size: clamp(1.25rem, 1.05rem + .8vw, 1.625rem);
	font-weight: 800;
	line-height: 1.2;
}

/* The short green line before the name. */
.pgs-home-why__name::before {
	content: "";
	flex: 0 0 auto;
	width: 28px;
	height: 2px;
	border-radius: 2px;
	background: var(--pgs-lime);
}

.pgs-home-why__role {
	padding-left: 40px;
	color: var(--pgs-lime);
	font-size: var(--pgs-fs-small);
	font-weight: 600;
	line-height: 1.5;
}

/* The badge hangs over the bottom-right corner of the photo. */
.pgs-home-why__media--photo {
	padding-bottom: 0;
}

.pgs-home-why__media--photo .pgs-stat-badge--br {
	right: -12px;
	bottom: -18px;
	z-index: 3;
}

/* The caption keeps clear of the badge; on phones the badge sits under the photo (overlapping its
   bottom edge a little) and the caption gets room above it. */
@media (min-width: 601px) {
	.pgs-home-why__media--photo .pgs-home-why__caption {
		padding-right: 170px;
	}
}

@media (max-width: 600px) {
	.pgs-home-why__media--photo .pgs-home-why__caption {
		padding-bottom: 44px;
	}

	.pgs-home-why__media--photo .pgs-stat-badge--br {
		position: relative;
		top: auto;
		right: auto;
		bottom: auto;
		width: max-content;
		margin: -26px 14px 0 auto;
	}
}

.pgs-home-why__content .pgs-heading {
	margin-bottom: 32px;
}

.pgs-home-why__actions {
	margin-top: 36px;
}

@media (min-width: 1024px) {
	.pgs-home-why__inner {
		grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
	}

	.pgs-home-why__media {
		margin-inline: 0;
	}
}

/* ---- How Admission Works (11.4.2): centred heading, steps, app store badges under them. */
.pgs-home-steps .pgs-heading {
	margin-inline: auto;
}

.pgs-home-steps__apps {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: clamp(40px, 6vw, 56px);
	text-align: center;
}

.pgs-home-steps__apps-title {
	margin: 0;
	color: var(--pgs-text);
	font-weight: 700;
}

.pgs-home-steps .pgs-app-badges {
	justify-content: center;
}

