/*
Theme Name: March AC
Theme URI: https://marchac.co.uk/
Author: March Athletic Club Committee
Description: Child theme of Twenty Twenty-Five for March Athletic Club, an England Athletics affiliated running club in March, Cambridgeshire. Built to the design approved by the club committee in October 2026. All customisation lives here so the parent theme can keep receiving WordPress core updates.
Template: twentytwentyfive
Version: 1.0.3
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marchac
Tags: block-theme, sports, club
*/

/* ---------------------------------------------------------------------------
   Almost everything lives in theme.json, not here.

   theme.json is the right place for colour, type, spacing and layout, because
   the Site Editor can then show those values to a committee member as named
   choices rather than as code. Only put CSS in this file when theme.json
   genuinely cannot express it — the handful of cases below.
   --------------------------------------------------------------------------- */

/* Condensed display type is set in SMALL CAPS throughout the approved design:
   headings, navigation and buttons. theme.json has no text-transform control,
   so it is applied here. */
.wp-block-post-title,
h1, h2, h3,
.wp-block-navigation__container,
.wp-block-button__link {
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* The hero headline is set tighter than any other heading. */
.is-style-marchac-hero h1,
h1.has-xxx-large-font-size {
	line-height: 0.94;
	letter-spacing: 0.01em;
}

/* Eyebrow label — the small uppercase tag above a heading ("TUESDAY",
   "AFFILIATED TO ENGLAND ATHLETICS"). Used on the training rail and the hero. */
.is-style-marchac-eyebrow {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

/* The two header bars run edge to edge, but their contents stop at the same
   1280px the rest of the site uses. Without this the logo and the Join us
   button sit at opposite ends of a 1900px monitor with a lake between them. */
.wp-block-group.marchac-bar {
	--marchac-bar-max: 1280px;
	padding-inline: max(
		var(--wp--preset--spacing--50),
		calc((100% - var(--marchac-bar-max)) / 2)
	);
}

/* Unbulleted link list — the footer columns. */
.wp-block-list.is-style-no-bullets {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}

/* Footer links sit on ink and need their own colour: the global link colour
   (club blue) has nowhere near enough contrast against the dark panel.
   The selector is doubled to out-rank theme.json's generated link rule, which
   ships later in the cascade. */
footer.wp-block-group footer.wp-block-group a,
footer.wp-block-group a:where(:not(.wp-block-button__link)) {
	color: var(--wp--preset--color--muted-light);
	text-decoration: none;
}
footer.wp-block-group a:where(:not(.wp-block-button__link)):hover,
footer.wp-block-group a:where(:not(.wp-block-button__link)):focus-visible {
	color: #ffffff;
	text-decoration: underline;
}

/* The club logo is purple line art, which all but vanishes on the ink footer.
   It sits on a white chip instead — the same treatment the approved design
   uses. Width is capped so the chip hugs the mark rather than the column. */
.marchac-footer-logo {
	display: inline-block;
	width: auto;
	max-width: 160px;
}
.marchac-footer-logo .wp-block-site-logo img {
	display: block;
}

/* Outline button: a white-bordered secondary action, used over the hero image.
   theme.json cannot describe a border that inherits the current text colour. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
}

/* Skip link and focus visibility. The September accessibility review found no
   visible focus state anywhere on the old site; this makes keyboard navigation
   usable, and it must not be removed. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Minimum touch target. The design review flagged several sub-44px tap
   targets in the artboards; this enforces the floor on phones. */
@media (max-width: 781px) {
	.wp-block-navigation__container a,
	.wp-block-button__link {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}
}

/* Respect a reader who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
