/*
 * front-page.css — front-page.php only (m6m_template_styles() in
 * functions.php). Depends on assets/css/components/matchday.css, the
 * shared matchday components (frame, kicker, h2, buttons, hero, proof
 * strip, latest rail, club wall, voices, booking panel), which prints
 * directly before this file. Only what the front page needs on top of
 * those lives here; scoped under .m6mfp so none of it can reach the
 * portfolio.
 *
 * Tokens only: theme.json palette, fonts and custom values. Teal is
 * light (hairlines, kicker, the latest-result date, hover); gold is the
 * scoreline.
 *
 * Contrast: text over the hero photo sits on at least 88% obsidian on
 * phones and 86% on wider screens (worst case over a white shirt:
 * `text` ≈ 11:1, gold ≈ 7.5:1).
 *
 * Mobile-first; min-width 560 / 640 / 900.
 */

/* ============================================================
   1. HERO — identity, one photo, two routes in
   ============================================================ */
.m6mfp-hero__title { font-size: clamp(2.4rem, 6vw, 5.5rem); }

/* "Photography" set as an outlined figure, like the proof-strip numerals. */
.m6mfp-hero__outline { text-wrap: balance; }
@supports (-webkit-text-stroke: 1px) {
	.m6mfp-hero__outline {
		color: transparent;
		-webkit-text-stroke: 1.5px var(--wp--preset--color--text);
	}
}

/* Over the photo, secondary text is lifted to `text` for contrast. */
.m6mfp-hero .m6mpf-kicker { color: var(--wp--preset--color--text); }
.m6mfp-hero__sub {
	margin: 1.1rem 0 0;
	max-width: 34ch;
	font-family: var(--wp--preset--font-family--body);
	font-size: clamp(1.02rem, 1.8vw, 1.3rem);
	line-height: 1.55;
	color: var(--wp--preset--color--text);
	text-wrap: pretty;
}

/* Latest result: one line of freshness under the actions. */
.m6mfp-hero__latest {
	display: grid;
	gap: .25rem;
	width: fit-content;
	max-width: 100%;
	min-height: 44px;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--m6mpf-rule);
	color: var(--wp--preset--color--text);
	text-decoration: none;
}
.m6mfp-hero__latest-label {
	font-size: .72rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--m6mpf-hi);
}
.m6mfp-hero__latest-match {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .02em;
	text-transform: uppercase;
	transition: color var(--wp--custom--duration--base) var(--wp--custom--easing--standard);
}
.m6mfp-hero__latest-end { white-space: nowrap; } /* score and arrow never wrap apart */
.m6mfp-hero__latest-score {
	margin-left: .4em;
	margin-right: .35em;
	font-variant-numeric: tabular-nums;
	color: var(--m6mpf-score);
}
.m6mfp-hero__latest:hover .m6mfp-hero__latest-match { color: var(--m6mpf-hi); }
.m6mfp-hero__latest:hover .m6mpf-arrow { transform: translateX(4px); }

/* Phones: the photo is a 3:2 band (the Customizer photo's own shape,
   so sizes="100vw" is exact) and the board overlaps its lower quarter,
   which the gradient holds at 88%+ obsidian. Both buttons run full
   width for the thumb. */
@media (max-width: 899px) {
	.m6mfp-hero .m6mpf-hero__frame { aspect-ratio: 3 / 2; }
	.m6mfp-hero .m6mpf-hero__frame::after {
		background: linear-gradient(to top,
			var(--wp--preset--color--bg) 0%,
			color-mix(in srgb, var(--wp--preset--color--bg) 88%, transparent) 30%,
			color-mix(in srgb, var(--wp--preset--color--bg) 0%, transparent) 70%);
	}
	.m6mfp-hero .m6mpf-hero__board { margin-top: -4rem; }
}
@media (max-width: 559px) {
	.m6mfp-hero .m6mpf-hero__actions .m6mpf-btn { flex: 1 1 100%; }
}

/* Wider screens: full-bleed photo, board bottom-left. Everything on the
   board is held within 44rem of the edge and the gradient stays at 86%+
   obsidian across at least that much, then clears to the right. */
@media (min-width: 900px) {
	.m6mfp-hero .m6mpf-hero__board > * { max-width: 40rem; }
	.m6mfp-hero .m6mpf-hero__frame::after {
		background:
			linear-gradient(to right,
				color-mix(in srgb, var(--wp--preset--color--bg) 92%, transparent) 0%,
				color-mix(in srgb, var(--wp--preset--color--bg) 86%, transparent) max(52%, 44rem),
				color-mix(in srgb, var(--wp--preset--color--bg) 0%, transparent) max(80%, 60rem)),
			linear-gradient(to top,
				var(--wp--preset--color--bg) 0%,
				color-mix(in srgb, var(--wp--preset--color--bg) 0%, transparent) 35%);
	}
}

/* No image at all: a type-only poster under the booking panel's light spill. */
.m6mfp-hero--type { overflow: hidden; }
.m6mfp-hero--type::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(ellipse 70% 60% at 50% 0%,
		color-mix(in srgb, var(--m6mpf-hi) 14%, transparent) 0%,
		color-mix(in srgb, var(--m6mpf-hi) 0%, transparent) 70%);
}
.m6mfp-hero--type .m6mpf-hero__board {
	margin-top: 0;
	padding-top: clamp(3.5rem, 14vw, 8rem);
}

/* ============================================================
   3. LATEST FIXTURES — one or two matches: a static row, not a rail
   ============================================================ */
.m6mfp .m6mpf-rail--short {
	box-sizing: border-box;
	grid-auto-flow: row;
	grid-template-columns: repeat(auto-fill, min(100%, 400px)); /* sizes in latest.php: 400px, else 100vw - 32px */
	max-width: var(--wp--custom--layout--max-w-portfolio);
	margin-inline: auto;
	padding-inline: var(--m6mpf-px);
	overflow: visible;
	scroll-snap-type: none;
}

/* ============================================================
   4. PROOF STRIP — three counts, one row, after the rail
   ============================================================ */
.m6mfp .m6mpf-latest + .m6mpf-strip { margin-top: clamp(2.5rem, 6vw, 4rem); }
.m6mfp .m6mpf-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ============================================================
   8. FOLLOW — channels as route rows, Instagram strip, support line
   ============================================================ */
.m6mfp-follow { padding-bottom: clamp(3.5rem, 9vw, 7rem); }
.m6mfp-follow__sub {
	margin: .9rem 0 0;
	max-width: 46ch;
	color: var(--wp--preset--color--text-secondary);
}

.m6mfp-follow__channels {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--m6mpf-rule);
}
.m6mfp-follow__channels .m6mpf-route { border-bottom: 0; }
.m6mfp-channel .m6mpf-route__what { text-transform: none; } /* handles keep their real case */
.m6mfp-channel__tag {
	grid-column: 1;
	font-size: .85rem;
	color: var(--wp--preset--color--text-secondary);
}
.m6mfp-channel .m6mpf-route__arrow { grid-row: 1 / span 3; }
.m6mfp-channel__glyph svg { display: block; width: 18px; height: 18px; }
@media (min-width: 900px) {
	.m6mfp-follow__channels { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
}

.m6mfp-insta { margin-top: clamp(2rem, 5vw, 3rem); }
.m6mfp-insta__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 640px) { .m6mfp-insta__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; } }
.m6mfp-insta__link {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--wp--preset--color--surface);
}
.m6mpf a.m6mfp-insta__link:focus-visible { outline-offset: -3px; }
.m6mfp-insta__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: filter var(--wp--custom--duration--slow) var(--wp--custom--easing--out);
}
@media (hover: hover) {
	.m6mfp-insta__img { filter: var(--wp--custom--exposure--dim); }
	.m6mfp-insta__link:hover .m6mfp-insta__img,
	.m6mfp-insta__link:focus-visible .m6mfp-insta__img { filter: var(--wp--custom--exposure--full); }
}

.m6mfp-follow__support {
	margin: clamp(2rem, 5vw, 3rem) 0 0;
	max-width: 60ch;
	color: var(--wp--preset--color--text-secondary);
}
.m6mfp-follow__support a {
	color: var(--wp--preset--color--text);
	text-decoration: underline;
	text-decoration-color: var(--m6mpf-hi);
	text-underline-offset: .25em;
}

/* Links inside sentences: a 44px+ tap area without moving the text. */
.m6mfp .m6mpf-book__parents a,
.m6mfp-follow__support a {
	display: inline-block;
	padding-block: 13px;
	margin-block: -13px;
}

/* ============================================================
   MOTION + FORCED COLOURS
   (transitions under .m6mpf are already off for reduced motion in
   matchday.css; these cover the front page's own movement)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.m6mfp-hero__latest:hover .m6mpf-arrow { transform: none; }
}
@media (forced-colors: active) {
	.m6mfp-hero__outline { color: CanvasText; -webkit-text-stroke: 0; }
	.m6mfp-hero__latest,
	.m6mfp-follow__channels { border-color: CanvasText; }
}
