/*
Theme Name: RacerPacer
Theme URI: https://builtby.racerpacer.com/kit/
Author: RacerPacer
Author URI: https://racerpacer.com
Description: A block theme for a running club's or a race organiser's site. The home page is the club's card with its next runs, upcoming events and news underneath, and every template can be changed in the Site Editor. Colours and fonts come from the RacerPacer plugin's style settings until you choose your own in Styles.
Version: 0.2.4
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Update URI: https://builtby.racerpacer.com/kit/racerpacer-runs-blocks/
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: racerpacer-runs-blocks
Tags: one-column, full-site-editing, block-patterns, custom-logo, custom-menu, featured-images, blog, e-commerce
*/

/*
 * Almost everything is in theme.json. What is here is what theme.json can't say:
 * the page background pattern chosen in the plugin, and a few finishing touches.
 * Colours are the --rpkit-* custom properties functions.php writes onto :root.
 */

html {
	scrollbar-gutter: stable;
}
body {
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.rpkit-mode-dark {
	color-scheme: dark;
}

/* The page background, as chosen in Runs → Settings. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}
body.rpkit-bg-gradient::before {
	background: radial-gradient(120% 70% at 50% 0%, var(--rpkit-glow) 0%, var(--rpkit-bg) 70%);
}
body.rpkit-bg-contour::before {
	background: var(--rpkit-pattern);
	-webkit-mask: url("assets/img/contour.svg") center / cover no-repeat;
	mask: url("assets/img/contour.svg") center / cover no-repeat;
}
body.rpkit-bg-dots::before {
	background-image: radial-gradient(var(--rpkit-pattern) 1.6px, transparent 1.8px);
	background-size: 22px 22px;
	-webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.35) 100%);
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.35) 100%);
}

:focus-visible {
	outline: 3px solid var(--rpkit-accent-text);
	outline-offset: 3px;
}
h1,
h2,
h3 {
	text-wrap: balance;
}

/* Header and footer bands sit on the surface colour, above the pattern. */
.rprb-band {
	background: var(--rpkit-surface);
}
.rprb-header {
	border-bottom: 1px solid var(--rpkit-border);
}
.rprb-footer {
	border-top: 1px solid var(--rpkit-border);
}
.rprb-header .wp-block-navigation a:hover,
.rprb-header .wp-block-navigation .current-menu-item > a {
	color: var(--rpkit-accent-text);
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}

/* Cards for posts in a list, matching the run cards. */
.rprb-card {
	border-radius: 16px;
	background: var(--rpkit-surface);
	color: var(--rpkit-text);
	box-shadow: inset 0 0 0 1px var(--rpkit-border);
}
.rprb-card .wp-block-post-title a {
	text-decoration: none;
}
.rprb-card .wp-block-post-title a:hover {
	text-decoration: underline;
}
.wp-block-post-featured-image img {
	border-radius: 16px;
}

/* The plugin's own chips keep their look inside the theme's button styles. */
.rpkit button.rpkit-chip {
	font-weight: 400;
}

/* The footer sits at the bottom of the window on a short page. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.wp-site-blocks > main {
	flex: 1;
	width: 100%;
}
.wp-site-blocks > * {
	margin-block-start: 0;
}

/* The events blocks keep to the same column as the header and footer. */
.rprb .rpkit-ev {
	--rpkit-ev-maxw: 1132px;
	--rpkit-ev-pad: 16px;
}
