/**
 * fw-brand.css — WCAC design layer.
 *
 * Every value here was read off the live site (wcac.org.uk) in a real browser
 * on 2026-11-17, at 390, 640, 768, 1024, 1150, 1200, 1440 and 1920, or taken
 * from the old theme's own stylesheet where the rendered value came from it.
 * Colours come from the --fw-* variables only; the hex lives in theme.json and
 * fw-overrides.css.
 *
 * ---------------------------------------------------------------------------
 * The responsive model (phase 3 of the lift)
 * ---------------------------------------------------------------------------
 *
 * The live site is Foundation 6 with fixed pixel type. Nothing scales with the
 * viewport: root 16px, body 14/21, h1 30/45, h2 22/33, h3 20/30, h4 18/27 at
 * every width. The only size that changes is the slider heading (45/56 above
 * 640, 28/34 below), which belongs to the slider block, not here.
 *
 * Content column: a 1360px container with 15px gutters, so text runs 1330px
 * wide at most and viewport minus 30px below that. theme.json carries this as
 * contentSize 1330px plus 15px root padding.
 *
 * Breakpoints, all from the live CSS:
 *   640  (40em)  contact bar appears; split bands go two-up
 *   1024 (64em)  "Our Charity" cards go three-up
 *   1150         full menu replaces the burger (the old theme's own break)
 *   900          below this the old menu items get a dark teal fill; the
 *                footer menu keeps that treatment
 */

:root {
	/* Mobile drawer takes over below 1150, matching the old theme. The JS reads
	   this; the media queries below move with it. */
	--fw-oc-breakpoint: 1149px;

	--fw-section-py: 48px;

	--fw-header-inner-max-width: 1360px;
	--fw-header-inner-padding: 0 15px;
	--fw-nav-gap: 0;

	--fw-menu-btn-width: 44px;
	--fw-menu-btn-height: 44px;
	--fw-menu-btn-gap: 6px;
	--fw-menu-btn-bar-width: 28px;
	--fw-menu-btn-bar-height: 4px;

	/* fw-chrome.css loads after this file and sets `.fw-footer { padding:
	   var(--fw-footer-padding, 0) }`, so the footer's padding has to come in
	   through the token, not a rule. */
	--fw-footer-padding: 48px 0 0;
	--fw-footer-inner-max-width: 1360px;
	--fw-footer-inner-padding: 0 15px;
	--fw-footer-inner-gap: 30px;

	--fw-oc-bar-padding: 16px 15px;
	--fw-oc-link-padding: 11.2px 16px;

	/* Buttons inside blocks: the old `.button` was .75rem 3rem. */
	--fw-wp-block-button-link-padding: 12px 48px;

	/* Home hero: 2:1, as the old 3000x1500 slides. */
	--fw-hero-min-height: 0;

	/* "Our Charity" cards band. */
	--fw-content-cards-padding: 48px 0 0;
	--fw-content-cards-padding-inline: 15px;
	--fw-content-cards-title-margin: 18.26px auto 48px;
	--fw-content-cards-title-max-width: 1330px;
	--fw-content-cards-inner-max-width: 1330px;
	--fw-content-cards-inner-margin: 0 auto;
	--fw-content-cards-inner-gap: 0 30px;
}

/* ---- Base ----------------------------------------------------------- */

body {
	margin: 0;
}

p {
	margin: 1em 0;
}

/* Heading margins as live (the browser defaults Foundation left alone).
   theme.json sets them too, but WordPress's constrained layout rule
   `:root :where(.is-layout-constrained) > *` outranks an element selector and
   replaces them with the 1em block gap, which put h2s 4px low. Margins
   collapse, so a p after an h2 sits 18.26px below it, as on live. */
.entry-content > h1 { margin-block: 0.67em; }
.entry-content > h2 { margin-block: 0.83em; }
.entry-content > h3 { margin-block: 1em; }
.entry-content > h4 { margin-block: 1.33em; }

/* Inner pages: the old template's 3rem band above and below the content.
   The last child keeps its 1em bottom margin, which the constrained layout
   would otherwise zero, so the gap to the footer is 48 + 14 as live. */
.wcac-page {
	padding-block: 48px;
}

/* The title is the first child, and core's `.is-layout-constrained >
   :first-child` zeroes its top margin; live keeps 0.67em above it. */
.entry-content.wcac-page > h1.wcac-page__title {
	margin-block: 0.67em;
}

.wcac-page > :last-child {
	margin-block-end: 1em;
}

/* ---- Contact bar ---------------------------------------------------- */

.wcac-topbar {
	background: var(--fw-secondary);
	color: var(--fw-white);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	padding: 8px 0;
}

.wcac-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	column-gap: 30px;
	max-width: 1360px;
	margin-inline: auto;
	padding-inline: 15px;
}

.wcac-topbar__group {
	display: flex;
	flex-wrap: wrap;
	column-gap: 30px;
}

.wcac-topbar a {
	color: inherit;
	text-decoration: none;
}

.wcac-topbar a:hover,
.wcac-topbar a:focus {
	text-decoration: underline;
}

.wcac-topbar .bi {
	margin-right: 0.25em;
}

@media (max-width: 639px) {
	.wcac-topbar { display: none; }
}

/* ---- Menu bar ------------------------------------------------------- */

.wcac-menubar {
	background: var(--fw-primary);
	padding: 32px 0;
}

.fw-logo-link {
	display: block;
	flex: none;
}

.fw-logo {
	display: block;
	width: 250px;
	height: auto;
}

.fw-nav a {
	display: inline-block;
	padding: 16px 15px;
	font-family: var(--wp--preset--font-family--nav);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 700;
	line-height: 1.5;
	color: var(--fw-white);
	text-decoration: none;
}

.fw-nav a:hover,
.fw-nav a:focus {
	background: var(--fw-accent);
	color: var(--fw-white);
	text-decoration: none;
}

.fw-menu-btn {
	color: var(--fw-white);
}

@media (max-width: 1149px) {
	#fw-primary-nav,
	.fw-header__nav { display: none; }

	/* Live's burger glyph ends 32px from the edge (15px gutter + 17px
	   margin). This button is 44px with the bars centred, so 9px of margin
	   puts the bars in the same place. Scoped to .fw-header because
	   fw-offcanvas.css loads later and zeroes the margin. */
	.fw-header .fw-menu-btn {
		margin-right: 9px;
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	body.fw-oc-open .fw-menu-btn {
		opacity: 0;
		pointer-events: none;
	}
}

/* ---- Mobile drawer -------------------------------------------------- */

.fw-oc {
	background: var(--fw-white);
}

.fw-oc__overlay {
	background: rgb(var(--fw-secondary-rgb) / 0.6);
}

.fw-oc__bar {
	background: var(--fw-primary);
}

.fw-oc__bar img {
	max-height: 60px;
}

.fw-oc__close {
	background: none;
	border: 0;
	color: var(--fw-white);
	font-size: 32px;
	line-height: 1;
}

.fw-oc__link,
.fw-oc__drill,
.fw-oc__back {
	background: var(--fw-accent);
	border: 0;
	color: var(--fw-white);
	font-family: var(--wp--preset--font-family--nav);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
}

.fw-oc__item + .fw-oc__item {
	border-top: 1px solid var(--fw-primary);
}

/* ---- Footer --------------------------------------------------------- */

.fw-footer {
	background: var(--fw-primary);
	color: var(--fw-white);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.5;
}

/* Between 640 and 1149 the columns wrap into rows. Live has 30px between
   columns (Foundation's gutter) but nothing between rows, and the gap token
   sets both, so the row gap is zeroed here. */
.fw-footer .fw-footer__inner {
	align-items: flex-start;
	row-gap: 0;
}

.fw-footer a {
	color: var(--fw-white);
	text-decoration: none;
}

.fw-footer a:hover,
.fw-footer a:focus {
	text-decoration: underline;
}

.wcac-footer__brand img {
	display: block;
	width: 250px;
	height: auto;
}

/* Teal on teal, as on the live site: the old theme gave these a
   `txt-yellow` class that was never styled, so they render in the heading
   colour and cannot be seen. Kept for parity; flagged in the lift notes. */
.wcac-footer__heading {
	margin: 0 0 16px;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	line-height: 1.5;
	color: var(--fw-primary);
}

/* Two equal columns, filled top to bottom, as the old `column-count: 2`
   with its default 1em gap did. Four rows suits the current eight-item menu;
   change it if the menu grows. */
.fw-footer .fw-footer__menu {
	display: grid;
	grid-auto-flow: column;
	grid-template-columns: repeat(2, 1fr);
	grid-template-rows: repeat(4, auto);
	column-gap: 14px;
	margin: 0 0 14px;
}

.fw-footer__menu li {
	padding: 5px 0;
}

.wcac-footer__contact ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wcac-footer__contact li {
	display: flex;
	align-items: center;
	margin: 15px 0;
}

.wcac-footer__contact .bi {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-right: 20px;
	border: 1px solid var(--fw-white);
	border-radius: 999px;
	font-size: 14px;
}

.wcac-footer__badge img {
	display: block;
	width: 200px;
	height: auto;
}

.wcac-copyright {
	margin-top: 48px;
	padding: 16px 0;
	background: var(--fw-secondary);
	text-align: center;
}

.wcac-copyright small {
	display: block;
	font-size: 80%;
}

@media (max-width: 900px) {
	/* Inline, as live: the fill pads the text without changing the row
	   height, so rows stay 31px apart and the fills overlap slightly. */
	.fw-footer__menu a {
		display: inline;
		padding: 11.2px 16px;
		background: var(--fw-accent);
	}
}

@media (max-width: 639px) {
	.fw-footer .fw-footer__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.fw-footer .fw-footer__menu {
		grid-template-columns: 1fr 1fr;
		column-gap: 14px;
	}
}

/* =========================================================================
   Blocks (phase 4 of the lift). Home page bands, read off live's #slider,
   #content, #page_links and #contact_form.
   ========================================================================= */

/* ---- Home hero: the old Slick slider -------------------------------- */

.fw-hero {
	aspect-ratio: 2 / 1;
}

.fw-hero .fw-hero__img {
	left: 0;
	width: 100%;
	object-position: center;
}

/* Editor canvas: the starter draws each slide as a CSS background with no
   size, so the photo tiled. Cover it, as the front end's <img> does. */
.fw-hero--editor-native .fw-hero__slide {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Text sits on the 1360 container's 15px gutter, vertically centred. */
.fw-hero .fw-hero__content {
	padding-inline: max(15px, calc((100% - 1360px) / 2 + 15px));
	color: var(--fw-white);
	transition: opacity 0.5s ease;
}

.fw-hero .fw-hero__content :is(h1, h2) {
	max-width: 50%;
	margin: 0 0 16px;
	font-size: var(--wp--preset--font-size--display);
	line-height: 56px;
	color: var(--fw-white);
	text-shadow: 0 0 5px rgb(0 0 0 / 0.75);
}

.fw-hero .fw-hero__content p {
	margin: 0;
	font-size: var(--wp--preset--font-size--lead);
	line-height: 30px;
	color: var(--fw-white);
	text-shadow: 0 0 5px rgb(0 0 0 / 0.75);
}

/* Only the first slide carries text on live; the second is the picture
   alone. The hero's text is shared, so it fades out off slide one. */
.fw-hero:has(.fw-hero__slide.is-active:not([data-slide="0"])) .fw-hero__content > :not(.fw-hero__dots) {
	opacity: 0;
	transition: opacity 0.5s ease;
}

.fw-hero .fw-hero__content > :not(.fw-hero__dots) {
	transition: opacity 0.5s ease;
}

/* Dots: bottom right of the 1360 container, 15px circles, half opacity. */
.fw-hero .fw-hero__dots {
	position: absolute;
	left: 40px;
	right: 25px;
	bottom: 30px;
	max-width: 1360px;
	justify-content: flex-end;
	gap: 15px;
	margin: 0;
	padding-right: 10px;
}

.fw-hero .fw-hero__dot {
	width: 15px;
	height: 15px;
	border: 0;
	border-radius: 50%;
	background: var(--fw-white);
	opacity: 0.5;
}

.fw-hero .fw-hero__dot.is-active {
	opacity: 1;
}

@media (max-width: 639px) {
	.fw-hero .fw-hero__content :is(h1, h2) {
		max-width: 100%;
		font-size: 28px;
		line-height: 34px;
	}

	.fw-hero .fw-hero__content p {
		font-size: 16px;
		line-height: 22px;
	}

	.fw-hero .fw-hero__dots { display: none; }
}

/* ---- Split: welcome band and "Get in Touch" ------------------------- */

.wp-block-framework-split.fw-split {
	padding: 0;
}

.fw-split .fw-split__inner {
	gap: 0;
	align-items: center;
}

/* Live's `.half-img`: a fixed height per breakpoint, cropped to fill. */
.fw-split .fw-split__media {
	aspect-ratio: auto;
	height: 535px;
}

.fw-split .fw-split__content {
	padding: 48px;
}

.fw-split .fw-split__content h1 { margin: 0.67em 0; }
.fw-split .fw-split__content h2 { margin: 0.83em 0; }
.fw-split .fw-split__content p,
.fw-split .fw-split__content p:last-of-type { margin: 1em 0; }

/* Get in Touch: a centred heading, and side padding of 5% of the PAGE width
   as #contact_form had. Percentages resolve against the pane, which is half
   the page when two-up, so 10% there and 5% once stacked. */
.fw-split--image-form .fw-split__content {
	padding: 48px 10%;
}

@media (max-width: 639px) {
	.fw-split--image-form .fw-split__content { padding: 48px 5%; }
}

.fw-split--image-form .fw-split__content h2 {
	margin-bottom: 48px;
	text-align: center;
}

@media (max-width: 1023px) {
	.fw-split .fw-split__media { height: 635px; }
}

/* Two-up from 640, as live; the starter stacks at 768. */
@media (min-width: 640px) and (max-width: 768px) {
	.fw-split .fw-split__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 639px) {
	.fw-split .fw-split__inner { grid-template-columns: 1fr; }
	.fw-split .fw-split__media { height: 335px; }
}

/* ---- Home page bands sit flush, as live ---------------------------- */

/* The constrained layout puts a 1em block gap above every block; live's
   full-width bands touch. */
.entry-content > .alignfull {
	margin-block: 0;
}

/* ---- Forms (Forminator, design "none"): shared look, home layout ---- */

.wcac-form .forminator-label,
.wcac-form .forminator-description {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.wcac-form .forminator-hidden {
	display: none;
}

/* Spacing as live, where CF7 wrapped the fields in <p>s inside flex cells:
   14px of paragraph margin above the fields and before the button that
   cannot collapse, 16px under each field, and no Forminator row margin. */
.wcac-form {
	padding-block: 14px;
}

/* !important: Forminator's own row rule sets the margin with a longer
   selector and wins otherwise, even with design "none". Vertical only: its
   negative side margins offset the column gutters and must stay. */
.wcac-form .forminator-row {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.wcac-form .forminator-row-last {
	padding-top: 14px;
}

@media (max-width: 1023px) {
	.wcac-form .forminator-row:has(.forminator-field-textarea) { padding-top: 14px; }
}

.wcac-form .forminator-input,
.wcac-form .forminator-textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	margin: 0 0 16px;
	padding: 8px;
	border: 1px solid var(--fw-grey);
	border-radius: 0;
	box-shadow: none;
	background: var(--fw-bg-grey);
	color: var(--fw-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
}

.wcac-form .forminator-textarea {
	height: 170px;
	resize: vertical;
}

.wcac-form .forminator-button-submit {
	padding: 12px 48px;
	border: 0;
	border-radius: 0;
	background: var(--fw-primary);
	color: var(--fw-white);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--body);
	line-height: normal;
	cursor: pointer;
	transition: background 0.5s;
}

.wcac-form .forminator-button-submit:hover,
.wcac-form .forminator-button-submit:focus {
	background: var(--fw-highlight);
}

/* Two columns from 1024, as live: the three inputs stacked on the left, the
   enquiry box beside them, the button under it. `!important` because
   Forminator writes display:none inline until its script runs. */
@media (min-width: 1024px) {
	.wcac-form .forminator-custom-form {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		column-gap: 30px;
		align-items: start;
	}

	.wcac-form .forminator-response-message { grid-column: 1 / -1; }
	.wcac-form .forminator-row { grid-column: 1; }
	.wcac-form .forminator-row:has(.forminator-field-textarea) { grid-column: 2; grid-row: 2 / span 3; }
	/* Right-aligned, 72px in: live's button shared its cell with CF7's
	   hidden spinner (24px wide, 24px margin each side). 57 here because
	   Forminator's 15px column padding supplies the rest. */
	.wcac-form .forminator-row-last { grid-column: 2; justify-self: end; margin-right: 57px !important; }
}

/* ---- Contact page form (framework/form) ----------------------------- */

/* As live's CF7 on /contact/: a taller enquiry box (258px), the fields
   centred against it, and the pair capped at ~1000px and pushed right. */
.fw-form {
	padding-top: 62px;
}

.wcac-page > .fw-form:last-child {
	margin-block-end: 0;
}

.fw-form .forminator-textarea {
	height: 258px;
}

@media (max-width: 1023px) {
	.fw-form .forminator-row:has(.forminator-field-textarea) { padding-top: 62px; }
}

@media (min-width: 1024px) {
	.fw-form {
		padding-top: 14px;
	}

	.fw-form .forminator-custom-form {
		max-width: 998px;
		margin-left: auto;
		grid-template-rows: auto 110px 62px 102px auto;
	}

	.fw-form .forminator-row:has(.forminator-field-name) { padding-top: 48px; }
	.fw-form .forminator-row-last { padding-top: 22px; }
}

/* ---- Inner pages ---------------------------------------------------- */

/* Superscripts that do not open up the line, as live's normalize.css: the
   History page's "2nd" otherwise made its paragraph 4px taller. */
sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }

/* The old theme's link utilities, still in the page content. */
.text-compBlue { color: var(--fw-primary) !important; }
.text { font-size: 16px; }

/* "Download ... Form": the old template floated this right of the title.
   page.php lifts a buttons block with this class above the H1. It wraps on
   small screens; live's would not, and ran off the left of a phone. */
.wcac-page > .wcac-download {
	float: right;
	max-width: 100%;
	margin-right: max(0px, calc((100% - 1330px) / 2)) !important;
	margin-left: 15px !important;
}

.wcac-download .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	font-weight: 700;
	line-height: 25px;
	text-decoration: none;
}

.wcac-download .wp-block-button__link::before {
	content: "\f30a";
	flex: none;
	margin-right: 20px;
	font-family: bootstrap-icons;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
}

/* ---- Gallery -------------------------------------------------------- */

/* Live's gallery template: no 48px band, four columns of 3:2 crops with
   30px gaps, two columns below 640. Core's gallery CSS is dequeued with
   wp-block-library, so the grid is set here. */
.wcac-page:has(> .wp-block-gallery) {
	padding-block: 0;
}

.wcac-page > .wp-block-gallery:last-child {
	margin-block-end: 30px;
}

/* .entry-content prefix: the gallery also carries is-layout-flex, and core's
   `body .is-layout-flex { display: flex }` outranks a single class. */
.entry-content .wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	margin: 0;
	padding: 0;
}

/* !important: core's gallery CSS sizes each image with
   `figure.wp-block-image:not(#individual-image)`, an ID-weight selector
   meant for its own flex layout, which no class rule can outrank. */
.entry-content .wp-block-gallery .wp-block-image {
	display: block;
	width: 100% !important;
	margin: 0 !important;
}

.entry-content .wp-block-gallery .wp-block-image img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	aspect-ratio: 310 / 205;
	object-fit: cover;
}

@media (max-width: 639px) {
	.entry-content .wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Content cards: "Our Charity" ----------------------------------- */

/* The band: the old theme's background photo under a 95% light grey veil,
   on teal. Set by class (wcac-charity-band on the block). */
.wcac-charity-band {
	position: relative;
	background: var(--fw-primary) url(../img/charity-band.jpg) 0 0 / cover no-repeat;
}

.wcac-charity-band::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgb(var(--fw-light-grey-rgb) / 0.95);
}

.wcac-charity-band > * {
	position: relative;
}

.fw-content-cards .fw-content-cards__inner {
	flex-direction: row;
	justify-content: center;
}

/* Descendant, not child: in the editor the cards sit inside InnerBlocks'
   own wrappers, and a child selector left the title positioned against the
   band instead of the card. */
.fw-content-cards .fw-content-card {
	position: relative;
	flex: 0 0 100%;
	margin-bottom: 48px;
	padding-bottom: 64px;
	text-align: center;
}

@media (min-width: 640px) {
	.fw-content-cards .fw-content-card { flex-basis: calc((100% - 30px) / 2); }
}

@media (min-width: 1024px) {
	.fw-content-cards .fw-content-card { flex-basis: calc((100% - 60px) / 3); }
}

.fw-content-card .fw-content-card__image img {
	display: block;
	width: 250px;
	height: 250px;
	margin: 0 auto;
	border-radius: 50%;
	object-fit: cover;
}

/* Title over the middle of the circle. */
.fw-content-card .fw-content-card__body h3 {
	position: absolute;
	top: 125px;
	left: 50%;
	z-index: 1;
	margin: 0;
	transform: translate(-50%, -50%);
	white-space: nowrap;
	color: var(--fw-white);
	text-shadow: 0 0 5px rgb(0 0 0 / 0.75);
	pointer-events: none;
}

/* Editor: InnerBlocks' layout wrapper is position:relative, which made the
   title measure its 125px from the text instead of the card. */
.fw-content-card .fw-content-card__body .block-editor-block-list__layout {
	position: static;
}

.fw-content-card .fw-content-card__body p,
.fw-content-card .fw-content-card__body p:last-child {
	margin: 1em 0;
}

/* Button pinned to the bottom of the card, so all three line up. */
.fw-content-card .fw-content-card__link {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	padding: 12px 48px;
	background: var(--fw-primary);
	color: var(--fw-white);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.5;
	white-space: nowrap;
	text-decoration: none;
	transition: background 0.5s;
}

.fw-content-card .fw-content-card__link:hover,
.fw-content-card .fw-content-card__link:focus {
	background: var(--fw-highlight);
	color: var(--fw-white);
	text-decoration: none;
}

@media (max-width: 639px) {
	.fw-content-card .fw-content-card__image img { width: 200px; height: 200px; }
	.fw-content-card .fw-content-card__body h3 { top: 100px; }
}
