/*
Theme Name: Beckenham & Penge Repair Cafe
Theme URI: https://beckenhampengerepaircafe.uk
Author: Steph Gray, Pentri
Description: A clean, accessible (WCAG 2.2 AA) classic theme for the Beckenham & Penge Repair Cafe. Pages and posts, a primary menu with Donate button, search, a flexible page template (needs ACF PRO), and a print stylesheet.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: bprc
*/

/* Allerta Stencil, self-hosted (SIL Open Font License 1.1). */
@font-face {
	font-family: "Allerta Stencil";
	src: url("assets/fonts/allerta-stencil.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   Tokens
   Contrast (WCAG): ink on white 18.9, ink on green 8.8, ink on yellow 13.2,
   green-deep on white 5.3. White on the logo green is only 2.2, so the
   reversed-out H1 uses --green-title (white on it is 3.4: passes AA for large
   text, 3:1, which the H1 always is - 32px+). Don't use it for small text.
   ========================================================================== */

/* Source Sans 3 variable, self-hosted (SIL Open Font License 1.1). */
@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2");
	font-weight: 200 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
	font-weight: 200 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-ext-wght-italic.woff2") format("woff2");
	font-weight: 200 900;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("assets/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
	font-weight: 200 900;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--green: #8ec043;
	--green-title: #5c9a22;
	--green-deep: #3f7a10;
	--green-darker: #2f6b0c;
	--green-tint: #eef5e1;
	--yellow: #ffd400;
	--ink: #111;
	--ink-soft: #3d4237;
	--paper: #fff;

	--focus: var(--ink);
	--radius: 6px;
	--max: 72rem;
	--max-narrow: 46rem;
	--gutter: 1rem;

	--font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-stencil: "Allerta Stencil", "Arial Narrow", Arial, sans-serif;

	color-scheme: light;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 1rem;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--font-body);
	font-size: 1.1875rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
}

.site-main {
	position: relative;
	isolation: isolate;
	flex: 1 0 auto;
}

/* Faint watermark down the right edge: stitches, wiring or workshop notes (random per page).
   Decorative only. Narrower screens can have text over it, so it is lighter there: at
   0.09 a link in --green-deep over a full-strength line is still 4.6:1. From 70em the
   text column never reaches it, so it can be stronger. */
.site-main::before {
	content: "";
	position: absolute;
	inset: 0 0 0 auto;
	z-index: -1;
	width: max(30%, 12rem);
	background: right top / 100% auto repeat-y;
	opacity: 0.09;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 35%);
	mask-image: linear-gradient(to right, transparent 0, #000 35%);
}

@media (min-width: 70em) {
	.site-main::before {
		width: 30%;
		opacity: 0.13;
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%);
		mask-image: linear-gradient(to right, transparent 0, #000 12%);
	}
}

.watermark-stitches .site-main::before {
	/* Needle and thread laid once at the top, over the repeating stitch lines. */
	background-image: url("assets/img/watermark-stitches-needle.svg"), url("assets/img/watermark-stitches.svg");
	background-position: right top, right top;
	background-size: 100% auto, 100% auto;
	background-repeat: no-repeat, repeat-y;
}

.watermark-wiring .site-main::before {
	background-image: url("assets/img/watermark-wiring.svg");
}

.watermark-workshop .site-main::before {
	background-image: url("assets/img/watermark-workshop.svg");
}

@media (forced-colors: active) {
	.site-main::before {
		display: none;
	}
}

img,
video,
svg {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--green-deep);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--green-darker);
	text-decoration-thickness: 0.16em;
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
	border-radius: 2px;
}

p {
	margin: 0 0 1em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	font-weight: 700;
	line-height: 1.2;
}

h4,
h5,
h6 {
	font-weight: 600;
}

.wrap {
	width: min(100% - 2 * var(--gutter), var(--max));
	margin-inline: auto;
}

/* Reading column, left-aligned with the page title and wider layouts. */
.wrap--narrow {
	width: min(100% - 2 * var(--gutter), var(--max-narrow));
	margin-left: max(var(--gutter), calc((100% - var(--max)) / 2));
	margin-right: auto;
}

.entry-content--narrow {
	max-width: var(--max-narrow);
}

.section {
	padding-block: 2.5rem 3.5rem;
}

.section--intro {
	padding-bottom: 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -5rem;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--yellow);
	color: var(--ink);
	font-weight: 700;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.skip-link:focus {
	top: 1rem;
}

.print-only {
	display: none;
}

.notice {
	padding: 1rem 1.25rem;
	background: var(--green-tint);
	border-left: 6px solid var(--green-deep);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 2.75rem;
	padding: 0.5em 1.25em;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	color: var(--ink);
	background: var(--paper);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	cursor: pointer;
}

.btn .icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.btn--primary {
	background: var(--ink);
	color: #fff;
}

.btn--primary:hover {
	background: var(--green-deep);
	border-color: var(--green-deep);
	color: #fff;
}

.btn--donate {
	background: var(--yellow);
	color: var(--ink);
}

.btn--donate:hover {
	background: var(--ink);
	color: var(--yellow);
}

/* ==========================================================================
   Header
   ========================================================================== */

/* The whole header is reversed out of the title green. White on that green is
   3.4:1, so everything small-ish in here is bold and 19px or larger, which
   counts as large text (3:1). Don't shrink the nav type without changing the green. */
.site-header {
	--focus: #fff;
	position: relative;
	z-index: 20;
	color: #fff;
	background: var(--green-title);
}

.site-header__bar {
	display: grid;
	grid-template-columns: 1fr auto auto;
	grid-template-areas:
		"logo menu search"
		"nav nav nav";
	align-items: center;
	gap: 0.5rem;
	padding-block: 0.75rem;
}

.site-logo {
	grid-area: logo;
	display: block;
	justify-self: start;
	line-height: 0;
}

.site-logo img {
	display: block;
	height: 3.25rem;
	width: auto;
	max-width: none;
}

.site-logo .custom-logo-link {
	display: block;
}

.site-logo .site-logo__print {
	display: none;
}

.menu-toggle,
.search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.25rem 0.75rem;
	font: inherit;
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	background: transparent;
	border: 2px solid #fff;
	border-radius: var(--radius);
	cursor: pointer;
}

.search-toggle {
	padding-inline: 0.5rem;
}

.menu-toggle:hover,
.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
	background: var(--green-deep);
}

.menu-toggle {
	grid-area: menu;
}

.search-toggle {
	grid-area: search;
}

.menu-toggle .icon,
.search-toggle .icon {
	width: 1.4rem;
	height: 1.4rem;
}

.menu-toggle .icon--close,
.menu-toggle[aria-expanded="true"] .icon--menu {
	display: none;
}

.menu-toggle[aria-expanded="true"] .icon--close {
	display: inline-block;
}

.no-js .menu-toggle,
.no-js .search-toggle {
	display: none;
}

/* Primary nav: stacked panel on small screens. */

.site-nav {
	grid-area: nav;
}

.js .site-nav {
	display: none;
}

.js .site-nav.is-open {
	display: block;
}

.site-nav .menu,
.site-nav .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav .menu > li {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	border-top: 1px solid rgba(255, 255, 255, 0.45);
}

.site-nav a {
	display: block;
	flex: 1 1 0;
	padding: 0.75rem 0.5rem;
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
}

/* Hover is a darker fill only. The current page is marked by a white bar, so an
   underline on hover would double up on it. */
.site-nav a:hover {
	background: var(--green-deep);
	color: #fff;
}

.site-nav a[aria-current="page"],
.site-nav .current-menu-ancestor > a,
.site-nav .current-page-ancestor > a {
	box-shadow: inset 6px 0 0 #fff;
	padding-left: 1.1rem;
}

.submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 2.75rem;
	padding: 0;
	color: inherit;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.submenu-toggle .icon {
	width: 1.4rem;
	height: 1.4rem;
	transition: transform 0.15s ease;
}

.submenu-toggle[aria-expanded="true"] .icon {
	transform: rotate(180deg);
}

.no-js .submenu-toggle {
	display: none;
}

.site-nav .sub-menu {
	display: none;
	flex: 0 0 100%;
	padding-left: 1rem;
}

.site-nav .is-open > .sub-menu,
.no-js .site-nav .sub-menu {
	display: block;
}

.site-nav .menu-item--donate {
	padding-block: 0.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.45);
}

.site-nav a.btn {
	display: inline-flex;
	flex: 1 1 auto;
	padding: 0.5em 1.25em;
	text-align: center;
}

.site-nav a.btn--donate {
	color: var(--ink);
	background: var(--yellow);
	border-color: var(--ink);
}

.site-nav a.btn--donate:hover {
	color: var(--yellow);
	background: var(--ink);
	text-decoration: none;
}

/* Search panel */

.js .site-search {
	display: none;
}

.js .site-search.is-open,
.no-js .site-search {
	display: block;
}

.site-search {
	padding-block: 1rem 1.25rem;
	background: var(--green-tint);
	color: var(--ink);
	border-top: 1px solid #c9d1bb;
}

/* Desktop navigation */

@media (min-width: 60em) {
	:root {
		--gutter: 1.5rem;
	}

	.site-header__bar {
		display: flex;
		gap: 1rem;
	}

	.site-logo {
		margin-right: auto;
	}

	.site-logo img {
		height: 4rem;
	}

	.menu-toggle,
	.js .menu-toggle {
		display: none;
	}

	.js .site-nav,
	.site-nav {
		display: block;
	}

	.site-nav .menu {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.25rem;
	}

	.site-nav .menu > li {
		position: relative;
		flex-wrap: nowrap;
		align-items: center;
		border-top: 0;
	}

	.site-nav a {
		flex: none;
		padding: 0.6rem 0.75rem;
		border-radius: var(--radius);
	}

	.site-nav a[aria-current="page"],
	.site-nav .current-menu-ancestor > a,
	.site-nav .current-page-ancestor > a {
		padding-left: 0.75rem;
		box-shadow: inset 0 -4px 0 #fff;
		border-radius: var(--radius) var(--radius) 0 0;
	}

	.submenu-toggle {
		width: 1.75rem;
		height: 2.75rem;
		margin-left: -0.5rem;
	}

	.site-nav .sub-menu {
		--focus: var(--ink);
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 30;
		min-width: 15rem;
		padding: 0.5rem;
		background: var(--paper);
		border: 2px solid var(--ink);
		border-radius: var(--radius);
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
	}

	/* Open on click/keyboard (JS) and, for pointers, on hover. */
	.site-nav .is-open > .sub-menu,
	.no-js .site-nav .menu-item-has-children:focus-within > .sub-menu {
		display: block;
	}

	.no-js .site-nav .sub-menu {
		display: none;
	}

	/* Dropdown is a white panel, so it goes back to dark text. */
	.site-nav .sub-menu a {
		padding: 0.6rem 0.75rem;
		color: var(--ink);
	}

	.site-nav .sub-menu a:hover {
		color: var(--ink);
		background: var(--green-tint);
	}

	.site-nav .sub-menu a[aria-current="page"] {
		box-shadow: inset 4px 0 0 var(--green-deep);
		padding-left: 1rem;
	}

	.site-nav .sub-menu li {
		display: block;
	}

	.site-nav .menu-item--donate {
		padding: 0;
		margin-left: 0.5rem;
		border-top: 0;
	}

	.site-nav a.btn {
		flex: none;
	}
}

@media (min-width: 60em) and (hover: hover) {
	.site-nav .menu-item-has-children:hover > .sub-menu {
		display: block;
	}

	.site-nav .menu-item-has-children.is-dismissed > .sub-menu {
		display: none;
	}
}

/* ==========================================================================
   Page title: large stencil H1, white reversed out of green
   ========================================================================== */

.page-header {
	padding-block: 2.5rem 0;
}

/* Inline so the green hugs each line of text, like the logo lettering. */
.page-title,
.display-title {
	display: inline;
	margin: 0;
	padding: 0.06em 0.3em;
	font-family: var(--font-stencil);
	font-size: clamp(2rem, 1.3rem + 3.6vw, 3.75rem);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--green-title);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	-webkit-text-stroke: 0.02em currentColor;
	overflow-wrap: anywhere;
}

/* Large heading section: same look as the page title, 120% of its size. */
.display-title {
	font-size: clamp(2.4rem, 1.56rem + 4.32vw, 4.5rem);
}

.block--heading + .block {
	margin-top: 1.75rem;
}

.page-description {
	max-width: 46rem;
	margin-top: 1.25rem;
	font-size: 1.2rem;
}

.page-description p:last-child {
	margin-bottom: 0;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 1.25rem 0 0;
	font-size: 1rem;
	color: var(--ink-soft);
}

/* ==========================================================================
   Content
   ========================================================================== */

.entry-content {
	overflow-wrap: break-word;
}

.entry-content > * + * {
	margin-top: 1.25em;
	margin-bottom: 0;
}

.entry-content h2 {
	margin-top: 1.75em;
	font-size: 2rem;
	font-weight: 700;
}

.entry-content h3 {
	margin-top: 1.5em;
	font-size: 1.5rem;
	font-weight: 700;
}

.entry-content h4 {
	font-size: 1.25rem;
}

.entry-content h5,
.entry-content h6 {
	font-size: 1.05rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
}

.entry-content li + li {
	margin-top: 0.35em;
}

.entry-content blockquote {
	margin-inline: 0;
	padding: 0.25em 0 0.25em 1.25rem;
	border-left: 6px solid var(--yellow);
	font-size: 1.2rem;
}

.entry-content hr {
	border: 0;
	border-top: 2px solid var(--ink);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 0.5rem 0.75rem;
	text-align: left;
	border: 1px solid var(--ink-soft);
}

.entry-content th {
	background: var(--green-tint);
}

.entry-content pre {
	overflow-x: auto;
	padding: 1rem;
	background: var(--green-tint);
	font-size: 0.95rem;
}

.entry-content img {
	height: auto;
}

.entry-content .alignleft {
	float: left;
	margin: 0.25em 1.5rem 1rem 0;
}

.entry-content .alignright {
	float: right;
	margin: 0.25em 0 1rem 1.5rem;
}

.entry-content .aligncenter {
	display: block;
	margin-inline: auto;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.wp-caption,
figure {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	margin-top: 0.5rem;
	font-size: 0.95rem;
	color: var(--ink-soft);
}

.entry-thumbnail {
	margin: 0 0 2rem;
}

.entry-thumbnail img {
	display: block;
	width: 100%;
	max-height: 28rem;
	object-fit: cover;
	border-radius: var(--radius);
}

.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 2px solid var(--ink);
}

.entry-tags {
	margin: 0;
}

.entry-tags__label {
	font-weight: 700;
	margin-right: 0.35em;
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.page-links > a,
.page-links > span:not(.page-links__title) {
	padding: 0.25rem 0.75rem;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.page-links__title {
	font-weight: 700;
}

/* Post navigation (prev / next) */

.post-navigation {
	margin-top: 3rem;
}

.post-navigation .nav-links {
	display: grid;
	gap: 1rem;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: block;
	height: 100%;
	padding: 1rem 1.25rem;
	color: var(--ink);
	text-decoration: none;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation a:hover {
	background: var(--green-tint);
}

.post-navigation .nav-sub {
	display: block;
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--green-deep);
}

.post-navigation .nav-title {
	font-weight: 700;
}

@media (min-width: 40em) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr 1fr;
	}

	.post-navigation .nav-next {
		grid-column: 2;
	}
}

/* ==========================================================================
   Card grid
   ========================================================================== */

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: 1.5rem;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--paper);
	border: 3px solid var(--green);
	border-radius: var(--radius);
	overflow: hidden;
}

.card:hover {
	border-color: var(--ink);
}

.card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--green);
}

.card__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-family: var(--font-stencil);
	font-size: 1.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink);
}

.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1rem 1.25rem 1.25rem;
}

.card__title {
	margin: 0 0 0.35rem;
	font-size: 1.45rem;
	line-height: 1.15;
}

.card__link {
	color: var(--ink);
	text-decoration: none;
}

/* Stretch the title link over the whole card. */
.card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.card:hover .card__link {
	text-decoration: underline;
	text-decoration-thickness: 0.12em;
	text-underline-offset: 0.2em;
}

.card__link:focus-visible {
	outline: none;
}

.card__link:focus-visible::after {
	outline: 3px solid var(--focus);
	outline-offset: -3px;
	box-shadow: inset 0 0 0 6px var(--yellow);
}

.card__meta {
	margin: 0 0 0.5rem;
	font-size: 0.95rem;
	color: var(--ink-soft);
}

.card__excerpt {
	font-size: 1rem;
}

.card__excerpt p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Page Sections template blocks
   ========================================================================== */

.block + .block {
	margin-top: 3.5rem;
}

.block__title {
	margin-bottom: 1rem;
	font-size: 2rem;
}

/* Column options. Link cards: 1 column on phones, 2 from 36em, then the chosen count
   (4 cards wait until 64em). Photos: 2 columns even on phones, then the chosen count
   from 48em. */
.card-grid--cols-2,
.card-grid--cols-3,
.card-grid--cols-4 {
	grid-template-columns: 1fr;
}

.photo-grid--cols-2,
.photo-grid--cols-3,
.photo-grid--cols-4 {
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 36em) {
	.card-grid--cols-2,
	.card-grid--cols-3,
	.card-grid--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 48em) {
	.card-grid--cols-3,
	.card-grid--cols-4,
	.photo-grid--cols-3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.photo-grid--cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 64em) {
	.card-grid--cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Photo gallery: photos only. */

.photo-grid {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.photo-grid li {
	margin: 0;
}

.photo-grid__img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius);
}

/* Upcoming events. The date box is white on --green-title, so everything in it
   is bold and 19px or larger (large text, 3:1). Keep it that way. */

.events {
	max-width: 46rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.event {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding-block: 0.9rem;
	border-bottom: 1px solid #c9d1bb;
}

.event:first-child {
	padding-top: 0;
}

.event__date {
	flex: none;
}

.event__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 5.5rem;
	padding: 0.55rem 0.75rem 0.45rem;
	line-height: 1;
	color: #fff;
	background: var(--green-title);
	text-align: center;
}

.event__month,
.event__year {
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.event__day {
	margin-block: 0.15rem;
	font-family: var(--font-stencil);
	font-size: 2.75rem;
	-webkit-text-stroke: 0.02em currentColor;
}

.event__text {
	margin: 0;
	font-size: 1.3rem;
	line-height: 1.35;
}

.event__weekday {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

/* Call to action button */

.btn--large {
	min-height: 3.5rem;
	padding: 0.6em 1.75em;
	font-size: 1.3rem;
}

.cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
}

.cta__note {
	margin: 0;
	font-size: 1rem;
	color: var(--ink-soft);
}

/* Boxed content: add the class "box" to any block, or tick "Boxed" on a Text section. */

.box {
	padding: 1.25rem 1.5rem;
	background: #f4f8ec;
	border-radius: var(--radius);
}

.box > :first-child {
	margin-top: 0;
}

.box > :last-child {
	margin-bottom: 0;
}

.box a {
	color: var(--green-darker);
}

/* Pagination */

.pagination {
	margin-top: 2.5rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.25rem 0.9rem;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.pagination a.page-numbers:hover {
	background: var(--green-tint);
}

.pagination .page-numbers.current {
	color: #fff;
	background: var(--ink);
}

.pagination .page-numbers.dots {
	border-color: transparent;
}

/* Search */

.search-form {
	max-width: 36rem;
}

.search-form__label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 700;
}

.search-form__row {
	display: flex;
	gap: 0.5rem;
}

.search-form__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0.4rem 0.75rem;
	font: inherit;
	color: var(--ink);
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.search-page-form {
	margin-bottom: 1.5rem;
}

.results-count {
	margin-bottom: 1.5rem;
	font-weight: 700;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
	margin-top: 3.5rem;
	padding-top: 2rem;
	border-top: 6px solid var(--green);
}

.comments-title,
.comment-reply-title {
	font-size: 1.75rem;
}

.comment-list,
.comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-left: 1.25rem;
	padding-left: 1rem;
	border-left: 4px solid var(--green-tint);
}

.comment-body {
	margin-block: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #c9d1bb;
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	align-items: center;
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 700;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .says {
	display: none;
}

.comment-metadata a {
	color: var(--ink-soft);
}

.reply a,
.comment-reply-link {
	display: inline-block;
	padding: 0.25rem 0.9rem;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.reply a:hover {
	background: var(--green-tint);
}

.comment-awaiting-moderation {
	font-style: italic;
}

.comment-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 700;
}

.comment-form p {
	margin-bottom: 1.1rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	font: inherit;
	color: var(--ink);
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.comment-form-cookies-consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
}

.comment-form-cookies-consent input {
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	margin-top: 0.1rem;
}

.comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

.comment-form .required {
	color: #a30000;
}

/* ==========================================================================
   Gravity Forms: size only
   Keeps GF's default (Orbital) styling and scales it to match the body text via its
   own CSS variables. GF also writes per-form values on an ID selector (#gform_wrapper_N),
   which no class selector can outrank, hence !important on these custom properties.
   ========================================================================== */

.gform_wrapper.gform-theme.gform-theme--framework {
	--gf-font-size-primary: 1.1875rem !important;
	--gf-font-size-secondary: 1.1875rem !important;
	--gf-font-size-tertiary: 1rem !important;
	--gf-line-height-primary: 1.5 !important;
	--gf-line-height-secondary: 1.4 !important;
	--gf-line-height-tertiary: 1.45 !important;

	/* Controls: 48px tall (up from 38px) so the larger text has room. */
	--gf-ctrl-size-sm: 2.75rem !important;
	--gf-ctrl-size-md: 3rem !important;
	--gf-ctrl-size-lg: 3.5rem !important;
	--gf-ctrl-size-xl: 4rem !important;
	--gf-ctrl-size: 3rem !important;

	--gf-ctrl-label-font-size-req: 1rem !important;
	--gf-ctrl-btn-size: 3rem !important;
	--gf-ctrl-btn-font-size: 1.1875rem !important;
	--gf-ctrl-btn-padding-x: 1.5rem !important;
	--gf-ctrl-file-btn-font-size: 1rem !important;
	--gf-field-gap-y: 1.25rem !important;
}

/* ==========================================================================
   Connect panel (above footer)
   ========================================================================== */

.connect {
	padding-block: 3rem;
	background: var(--green);
	color: var(--ink);
}

.connect__title {
	max-width: 36rem;
	font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
	font-weight: 800;
}

.connect__text {
	max-width: 40rem;
}

.connect__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 1rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.connect__link {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 0.75rem;
	align-items: center;
	height: 100%;
	padding: 1rem 1.25rem;
	color: #fff;
	text-decoration: none;
	background: var(--ink);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
}

.connect__link .icon {
	grid-row: span 2;
	width: 2rem;
	height: 2rem;
	color: var(--yellow);
}

.connect__label {
	font-size: 1.2rem;
	font-weight: 800;
}

.connect__blurb {
	font-size: 0.95rem;
}

.connect__link:hover {
	color: var(--ink);
	background: var(--yellow);
}



.connect__link:hover .icon {
	color: var(--ink);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	--focus: var(--yellow);
	padding-block: 2.5rem;
	color: #fff;
	background: var(--ink);
}

.site-footer a {
	color: #fff;
}

.site-footer a:hover {
	color: var(--yellow);
}

.site-footer__inner {
	display: grid;
	gap: 2rem;
}

.site-footer__main {
	display: grid;
	gap: 1.5rem;
	align-content: start;
}

/* Right-hand widget area */

.footer-widgets {
	display: grid;
	gap: 1.5rem;
	align-content: start;
}

.footer-widgets .widget > :last-child {
	margin-bottom: 0;
}

.widget-title {
	margin-bottom: 0.5rem;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--green);
}

.footer-widgets ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-widgets li + li {
	margin-top: 0.25rem;
}

.footer-widgets a {
	display: inline-block;
	padding-block: 0.2rem;
}

.wordmark {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	margin: 0;
	line-height: 1;
}

.wordmark__top {
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wordmark__bottom {
	font-family: var(--font-stencil);
	font-size: 2.25rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--green);
}

.footer-social,
.footer-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-social a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	font-weight: 700;
}

.footer-social .icon {
	width: 1.4rem;
	height: 1.4rem;
	color: var(--green);
}

.footer-email {
	margin: 0;
	font-size: 1.1rem;
	overflow-wrap: anywhere;
}

.footer-email a {
	font-weight: 700;
}

.footer-nav a {
	display: inline-block;
	padding-block: 0.5rem;
}

.copyright {
	margin: 0;
	font-size: 0.95rem;
}

@media (min-width: 48em) {
	.site-footer__inner--has-widgets {
		grid-template-columns: 1fr 1fr;
		gap: 2rem 4rem;
	}

	.footer-widgets {
		justify-self: end;
		width: min(100%, 26rem);
	}

	.copyright {
		grid-column: 1 / -1;
		padding-top: 1.25rem;
		border-top: 1px solid #555;
	}
}

/* ==========================================================================
   User preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media (forced-colors: active) {
	.btn,
	.card,
	.menu-toggle,
	.search-toggle {
		border: 2px solid ButtonText;
	}
}
