/**
 * Home page styles
 *
 * 1. Hero
 * 2. Join Maiwand FC
 * 3. A Club For Everyone
 * 4. Fixtures (tabs, next match, fixture cards)
 * 5. Latest Results
 * 6. Our Teams
 * 7. Featured Tournament (countdown)
 * 8. Latest News
 * 9. Follow (Instagram)
 * 10. Responsive
 */

/* ============================ HERO ============================ */
.hero {
	--hero-bleed: calc((100vw - min(var(--container-max), var(--container-fluid))) / 2);
	position: relative;
	overflow-x: clip;
	background: var(--white);
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); /* copy column widened by its no-wrap heading in the design: seam at 1005px of 1920 */
	min-height: calc(964 * var(--u));
}

.hero__copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--space-110) var(--space-96) var(--space-110) 0;
}

.hero__eyebrow {
	margin-bottom: calc(22 * var(--u));
	font-size: var(--fs-24);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--text-color);
	text-transform: capitalize;
}

.hero__dot {
	color: var(--primary-color);
}

.hero__title {
	margin-bottom: var(--space-30);
	font-size: var(--fs-h1-home);
}

.hero__text {
	max-width: calc(423 * var(--u));
	margin-bottom: var(--space-40);
	font-size: var(--fs-lead);
	font-weight: var(--font-weight-light);
	line-height: 1.45;
	color: var(--text-color);
}

.hero__facts {
	display: flex;
	gap: calc(34 * var(--u));
	margin: var(--space-60) 0 0;
	padding-top: calc(35 * var(--u));
	border-top: var(--stroke-thin) solid var(--border-color);
}

.hero__fact {
	flex: 1 1 0;
	min-width: 0;
}

.hero__fact-value {
	font-size: var(--fs-stat);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--heading-color);
}

.hero__fact-label {
	margin: 0;
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

.hero__media {
	position: relative;
}

.hero__shot {
	position: absolute;
	inset: 0 calc(-1 * var(--hero-bleed)) 0 0;
	overflow: hidden;
	background: var(--light-bg-alt);
}

.hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--transition-slow);
}

.hero__slide.is-active {
	opacity: 1;
}

.hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__dots {
	position: absolute;
	left: 39%;
	bottom: calc(45 * var(--u));
	z-index: 2;
	display: flex;
	gap: calc(5 * var(--u));
}

.hero__dot-btn {
	width: calc(11 * var(--u));
	height: calc(11 * var(--u));
	min-width: 8px;
	min-height: 8px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-full);
	background: var(--white);
	cursor: pointer;
}

.hero__dot-btn.is-active {
	background: var(--primary-color);
}

.hero__seam {
	position: absolute;
	inset: 0 auto 0 0;
	z-index: 1;
	width: calc(15 * var(--u));
	min-width: 8px;
	background: var(--flag-columns);
}

.hero__badge {
	top: calc(50% - 14 * var(--u));
}

/* ============================ JOIN MAIWAND FC ============================ */
.join__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: calc(29 * var(--u));
}

.join__card {
	display: flex;
	flex-direction: column;
	min-height: calc(653 * var(--u));
	background: var(--white);
	border: var(--stroke-thin) solid var(--border-color);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.join__media {
	position: relative;
	height: calc(218 * var(--u));
	min-height: 150px;
	background: var(--light-bg-alt);
}

.join__media::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: calc(7 * var(--u));
	min-height: 4px;
	background: var(--accent-current);
}

.join__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.join__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	padding: calc(51 * var(--u)) var(--space-48) calc(44 * var(--u)) calc(44 * var(--u));
}

.join__icon {
	display: inline-flex;
	width: calc(66 * var(--u));
	height: calc(66 * var(--u));
	min-width: 40px;
	min-height: 40px;
	margin-bottom: var(--space-28);
	color: var(--heading-color);
}

.join__icon svg,
.join__icon-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.join__title {
	font-size: clamp(1.375rem, 1.807vw, 2.17rem);
	font-weight: var(--font-weight-bold);
	letter-spacing: -0.012em;
	line-height: 1.15;
}

.join__text {
	margin: var(--space-6) 0 var(--space-40);
	font-size: var(--fs-intro);
	font-weight: var(--font-weight-light);
	line-height: 1.45;
	color: var(--text-color);
}

.join__btn {
	margin-top: auto;
}

/* ============================ A CLUB FOR EVERYONE ============================ */
.club-for-everyone__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: var(--space-96);
	align-items: center;
}

.club-for-everyone__media {
	aspect-ratio: 675 / 662;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--light-bg-alt);
}

.club-for-everyone__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.club-for-everyone__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-24);
}

.club-for-everyone__text {
	max-width: calc(769 * var(--u));
	margin-bottom: calc(22 * var(--u));
	font-size: var(--fs-h4);
	font-weight: var(--font-weight-light);
	line-height: 1.6;
	color: var(--text-color);
}

.club-for-everyone__text p + p {
	margin-top: var(--space-24);
}

/* ============================ FIXTURES ============================ */
.fixtures__head {
	align-items: flex-end;
}

.fixtures__tabs {
	display: flex;
	gap: var(--space-10);
	padding: calc(7 * var(--u));
	background: var(--light-bg-alt);
	border-radius: calc(5 * var(--u));
}

.fixtures__tab {
	padding: calc(13.5 * var(--u)) var(--space-30);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--text-color);
	background: transparent;
	border: 0;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: background-color var(--transition-base), color var(--transition-base);
}

.fixtures__tab.is-active {
	background: var(--primary-color);
	color: var(--white);
}

.fixtures__panel {
	display: flex;
	flex-direction: column;
	gap: calc(34 * var(--u));
}

.next-match {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-60);
	padding: calc(54 * var(--u)) var(--space-60);
	background: var(--dark-bg);
	border-radius: var(--radius-lg);
	color: var(--white);
}

.next-match__main {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: var(--space-20);
	min-width: 0;
}

.next-match__label {
	font-size: var(--fs-24);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--accent-color);
}

.next-match__teams {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: calc(34 * var(--u));
	row-gap: var(--space-12);
}

.next-match__club {
	display: inline-flex;
	align-items: center;
	gap: var(--space-18);
}

.next-match__crest,
.next-match__initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: calc(86 * var(--u));
	height: calc(86 * var(--u));
	min-width: 52px;
	min-height: 52px;
}

.next-match__crest img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.next-match__initials {
	border-radius: var(--radius-full);
	background: var(--dark-surface);
	color: var(--muted-dark);
	font-size: var(--fs-40);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.02em;
	overflow: hidden;
}

.next-match__initials img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.next-match__name {
	font-size: var(--fs-40);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.02em;
	line-height: 1.55;
	color: var(--white);
}

.next-match__vs {
	font-size: var(--fs-lead);
	font-weight: var(--font-weight-light);
	color: var(--muted-color);
}

.next-match__info {
	display: flex;
	flex-wrap: wrap;
	column-gap: calc(52 * var(--u));
	row-gap: var(--space-12);
	margin: 0;
	padding-top: var(--space-12);
}

.next-match__info dt {
	font-size: var(--fs-28);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--white);
}

.next-match__info dd {
	margin: 0;
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--muted-color);
}

.next-match__btn {
	flex: none;
}

.fixtures__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-30);
}

.home-fixture {
	display: flex;
	flex-direction: column;
	padding: calc(34 * var(--u)) var(--space-36) var(--space-36);
	background: var(--white);
	border: var(--stroke-thin) solid var(--border-color);
	border-radius: var(--radius-lg);
}

.home-fixture__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-16);
	padding-bottom: var(--space-18);
	border-bottom: var(--stroke-thin) solid var(--border-color);
}

.home-fixture__date {
	font-size: var(--fs-intro);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--heading-color);
	white-space: nowrap;
}

.home-fixture__comp {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
	text-align: right;
}

.home-fixture__body {
	display: flex;
	align-items: center;
	gap: var(--space-20);
	padding: calc(26 * var(--u)) 0 calc(22 * var(--u));
}

.home-fixture__crest,
.home-fixture__initials {
	width: calc(60 * var(--u));
	height: calc(60 * var(--u));
}

.home-fixture__vs {
	font-size: var(--fs-24);
	font-weight: var(--font-weight-light);
	color: var(--text-color);
}

.home-fixture__score {
	padding: var(--space-4) var(--space-12);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-black);
	color: var(--white);
	background: var(--black);
	border-radius: var(--radius-md);
	white-space: nowrap;
}

.home-fixture__opp {
	font-size: var(--fs-28);
	font-weight: var(--font-weight-bold);
	letter-spacing: -0.01em;
	line-height: 1.2;
	color: var(--heading-color);
}

.home-fixture__foot {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-14);
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

.home-fixture__time {
	font-weight: var(--font-weight-medium);
	color: var(--heading-color);
}

/* ============================ LATEST RESULTS ============================ */
.latest-results__list {
	margin: 0;
	padding: 0;
	list-style: none;
	background: var(--white);
	border: var(--stroke-thin) solid var(--border-color);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.latest-results__row {
	display: flex;
	align-items: center;
	gap: var(--space-40);
	padding: calc(34 * var(--u)) calc(46 * var(--u));
	border-bottom: var(--stroke-thin) solid var(--border-color);
}

.latest-results__row:last-child {
	border-bottom: 0;
}

.latest-results__when {
	display: flex;
	flex: none;
	flex-direction: column;
	width: calc(260 * var(--u));
	min-width: 150px;
}

.latest-results__date {
	font-size: var(--fs-intro);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--heading-color);
}

.latest-results__comp {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

.latest-results__score {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: calc(50 * var(--u));
	min-width: 0;
	padding-right: calc(176 * var(--u));
}

.latest-results__side {
	display: flex;
	flex: 0 1 calc(293 * var(--u));
	align-items: center;
	gap: var(--space-16);
	min-width: 0;
}

.latest-results__side--home {
	justify-content: flex-end;
}

.latest-results__side--away {
	justify-content: space-between;
}

.latest-results__crest,
.latest-results__initials {
	width: calc(58 * var(--u));
	height: calc(58 * var(--u));
}

.latest-results__name {
	font-size: var(--fs-28);
	font-weight: var(--font-weight-bold);
	line-height: 1.55;
	color: var(--heading-color);
}

.latest-results__side--away .latest-results__name {
	line-height: 1.55;
}

.latest-results__nums {
	flex: none;
	min-width: calc(139 * var(--u));
	padding: var(--space-10) calc(26 * var(--u));
	font-size: var(--fs-40);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.02em;
	line-height: 1.55;
	text-align: center;
	color: var(--heading-color);
	background: var(--light-bg);
	border-radius: var(--radius-md);
	white-space: nowrap;
}

.latest-results__row--won .latest-results__nums {
	background: var(--black);
	color: var(--white);
}

.latest-results__tag {
	flex: none;
	padding: calc(7.5 * var(--u)) var(--space-18);
}

.latest-results__tag.mfc-badge--lost {
	color: var(--primary-dark);
}

/* ============================ OUR TEAMS ============================ */
.our-teams__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: calc(26 * var(--u));
}

.our-teams__card {
	display: flex;
	align-items: center;
	gap: var(--space-28);
	min-height: calc(162 * var(--u));
	padding: var(--space-32) calc(38 * var(--u));
	background: var(--white);
	border: var(--stroke-thin) solid var(--border-color);
	border-radius: var(--radius-lg);
	transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.our-teams__card:hover,
.our-teams__card:focus-visible {
	border-color: var(--heading-color);
	box-shadow: var(--shadow-sm);
}

.our-teams__crest {
	display: inline-flex;
	flex: none;
	width: calc(92 * var(--u));
	height: calc(92 * var(--u));
	min-width: 56px;
	min-height: 56px;
}

.our-teams__crest img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.our-teams__copy {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

.our-teams__name {
	font-size: var(--fs-28);
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	color: var(--text-color);
}

.our-teams__league {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--text-color);
}

/* ============================ FEATURED TOURNAMENT ============================ */
.featured-tournament {
	--hero-bleed: calc((100vw - min(var(--container-max), var(--container-fluid))) / 2);
	position: relative;
	overflow-x: clip;
	background: var(--off-white);
}

.featured-tournament__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
	min-height: calc(1088 * var(--u));
}

.featured-tournament__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: calc(91 * var(--u)) var(--space-80) var(--space-96) 0;
}

.featured-tournament__title {
	margin: calc(20 * var(--u)) 0 0;
	font-size: clamp(2.5rem, 4.307vw, 5.17rem);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.022em;
	line-height: 0.98;
	color: var(--heading-color);
}

.featured-tournament__text {
	max-width: calc(680 * var(--u));
	margin: var(--space-24) 0 var(--space-30);
	font-size: var(--fs-h4);
	font-weight: var(--font-weight-light);
	line-height: 1.55;
	color: var(--text-color);
}

.countdown {
	position: relative;
	width: 100%;
	max-width: calc(702 * var(--u));
	margin-bottom: calc(44 * var(--u));
	background: var(--dark-bg);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.countdown::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: calc(9 * var(--u));
	min-height: 5px;
	background: linear-gradient(90deg, var(--crumb-divider) 0%, var(--crumb-divider) 33.4%, var(--primary-color) 33.4%, var(--primary-color) 66.7%, var(--accent-color) 66.7%, var(--accent-color) 100%);
}

.countdown__top {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-18);
	padding: var(--space-32) calc(34 * var(--u)) 0;
	font-size: var(--fs-24);
	line-height: 1.55;
}

.countdown__label {
	font-weight: var(--font-weight-bold);
	color: var(--accent-color);
}

.countdown__entries {
	font-weight: var(--font-weight-light);
	color: var(--muted-color);
}

.countdown__units {
	display: flex;
	padding: var(--space-40) calc(34 * var(--u)) var(--space-28);
}

.countdown__unit {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	gap: var(--space-10);
}

.countdown__unit + .countdown__unit {
	border-left: var(--stroke-thin) solid var(--border-dark);
}

.countdown__value {
	font-size: clamp(2rem, 3.474vw, 4.17rem);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--white);
	font-variant-numeric: tabular-nums;
}

.countdown__unit-label {
	font-size: var(--fs-24);
	line-height: 1.55;
	color: var(--muted-color);
}

.countdown__meta {
	padding: var(--space-20) calc(34 * var(--u));
	font-size: var(--fs-h4);
	font-weight: var(--font-weight-light);
	line-height: 1.55;
	color: var(--text-color);
	border-top: var(--stroke-thin) solid var(--border-dark);
}

.featured-tournament__media {
	position: relative;
}

.featured-tournament__shot {
	position: absolute;
	inset: 0 calc(-1 * var(--hero-bleed)) 0 0;
	overflow: hidden;
	background: var(--light-bg-alt);
}

.featured-tournament__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.featured-tournament__seam {
	position: absolute;
	inset: 0 auto 0 0;
	width: calc(15 * var(--u));
	min-width: 8px;
	background: var(--flag-columns);
}

/* ============================ LATEST NEWS ============================ */
.latest-news {
	padding-bottom: 0;
}

/* ============================ FOLLOW ============================ */
.follow {
	padding-block: var(--space-96);
}

.follow__title {
	text-transform: none;
}

.follow__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: var(--space-20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.follow__tile {
	aspect-ratio: 1;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--light-bg-alt);
}

.follow__link {
	display: block;
	width: 100%;
	height: 100%;
}

.follow__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow);
}

.follow__tile:hover .follow__img {
	transform: scale(1.04);
}

/* ============================ RESPONSIVE ============================ */

/* --- LG --- */
@media (max-width: 1200px) {
	.latest-results__score {
		padding-right: 0;
	}
}

/* --- MD / Tablet --- */
@media (max-width: 992px) {
	.hero__grid,
	.featured-tournament__grid {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.hero__copy {
		padding: 48px 0;
	}

	.hero__media,
	.featured-tournament__media {
		aspect-ratio: 16 / 11;
		margin-inline: calc(-1 * var(--hero-bleed));
	}

	.hero__shot,
	.featured-tournament__shot {
		inset: 0;
	}

	.hero__seam,
	.featured-tournament__seam {
		inset: 0 0 auto 0;
		width: auto;
		height: 8px;
		min-width: 0;
		background: var(--flag-thirds);
	}

	.hero__badge {
		top: 0;
	}

	.hero__dots {
		left: 50%;
		bottom: 16px;
		transform: translateX(-50%);
	}

	.featured-tournament__copy {
		order: 2;
		padding: 48px 0 56px;
	}

	.join__grid,
	.fixtures__grid,
	.our-teams__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.club-for-everyone__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.next-match {
		flex-direction: column;
		align-items: flex-start;
		padding: 32px 24px;
		gap: 24px;
	}

	.latest-results__row {
		flex-wrap: wrap;
		gap: 12px 20px;
		padding: 20px;
	}

	.latest-results__when {
		width: auto;
		flex: 1 1 100%;
	}

	.latest-results__score {
		justify-content: flex-start;
		gap: 16px;
	}

	.follow__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}
}

/* --- SM / Mobile --- */
@media (max-width: 768px) {
	.join__grid,
	.fixtures__grid,
	.our-teams__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.join__card {
		min-height: 0;
	}

	.join__body {
		padding: 28px 24px;
	}

	.hero__facts {
		gap: 16px;
	}

	.fixtures__head {
		align-items: flex-start;
	}

	.latest-results__score {
		flex-wrap: wrap;
	}

	.latest-results__side {
		flex: 1 1 100%;
	}

	.latest-results__side--home {
		justify-content: flex-start;
	}

	.latest-results__side--away {
		flex-direction: row-reverse;
		justify-content: flex-end;
	}

	.countdown__units {
		padding-inline: 12px;
	}
}

/* --- XS / Small Mobile --- */
@media (max-width: 575px) {
	.hero__facts {
		flex-direction: column;
	}

	.follow__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
