/**
 * Section rhythm — Homepage (2026-10-03, NOT design-locked)
 *
 * Markup: modules/frontend/templates/homepage.php (Live Competitions,
 * Recent winners, How it works below the hero). One calmer rhythm than
 * the generic .ec-section: tighter vertical padding and section titles a
 * step down from the old h2, matching the Competition Page's section
 * headings in weight. Recent winners and How it works are the
 * Competition Page's own components (competition-tail.css) — only their
 * spacing is set here.
 */

/* Spacing (2026-10-03): one gap between every section — 48px on phones,
   64px from 1024px — made of each section's top + bottom padding, the
   first section after the hero carrying the full gap itself. How it
   works has no bottom padding: the footer's own top margin (64px) is
   the gap before the footer. */
.ec-home-section {
	padding-top: var(--ec-space-5);
	padding-bottom: var(--ec-space-5);
}

.ec-section--featured-competitions.ec-home-section {
	padding-top: var(--ec-space-7);
}

.ec-home-section--how {
	padding-bottom: 0;
}

.ec-home-section .ec-section__header {
	align-items: baseline;
	margin-bottom: var(--ec-space-4);
}

.ec-home-section .ec-section__title,
.ec-home-section .ec-competition-tail__title {
	font-size: var(--ec-font-size-h4);
	font-weight: var(--ec-font-weight-bold);
	letter-spacing: var(--ec-letter-spacing-tight);
}

.ec-home-section .ec-competition-tail__proof-head {
	margin-bottom: var(--ec-space-4);
}

.ec-home-section .ec-competition-tail__proof-head .ec-competition-tail__title {
	margin-bottom: 0;
}

.ec-home-section .ec-section__header .ec-link,
.ec-home-section .ec-competition-tail__proof-head .ec-link {
	flex-shrink: 0;
	white-space: nowrap;
}

/* Phones: the gap before the footer matches the 48px between sections
   (the footer's site-wide top margin is 64px; homepage only). */
@media (max-width: 1023px) {
	.ec-layout__main:has(> .ec-home-section--how:last-child) + .ec-site-footer {
		margin-top: var(--ec-space-7);
	}
}

@media (min-width: 1024px) {
	.ec-home-section {
		padding-top: var(--ec-space-6);
		padding-bottom: var(--ec-space-6);
	}

	.ec-section--featured-competitions.ec-home-section {
		padding-top: var(--ec-space-8);
	}

	.ec-home-section--how {
		padding-bottom: 0;
	}

	.ec-home-section .ec-section__title,
	.ec-home-section .ec-competition-tail__title {
		font-size: var(--ec-font-size-h3);
	}
}
