/*
Theme Name: Rooted In
Theme URI: https://rootedininc.org/
Author: Gibsonworks, LLC
Author URI: https://bekee.com/
Description: Block theme for Rooted In Inc. Brand colors and type live in theme.json; the 2025 look is a style variation.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 0.2.6
License: GPL-2.0-or-later
Text Domain: rooted-in
*/

/* Visible keyboard focus everywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--dark-green);
	outline-offset: 3px;
}
.has-dark-green-background-color :where(a, button, input):focus-visible,
.site-footer :where(a, button, input):focus-visible {
	outline-color: var(--wp--preset--color--marigold);
}

/* Skip link. */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--dark-green);
	font-weight: 700;
	padding: 0.75rem 1rem;
	z-index: 100000;
}

/* Cards and stat tiles share the style variation's corner radius. */
.is-style-ri-card,
.ri-stat {
	border-radius: var(--wp--custom--card-radius);
	overflow: hidden;
}
.ri-stat .ri-stat__number {
	font-family: var(--wp--custom--heading-font);
	font-weight: var(--wp--custom--heading-weight);
	line-height: 1;
	color: var(--wp--preset--color--black);
}

/* Images inside cards follow the card corners. */
.is-style-ri-card .wp-block-image img { border-radius: 0; }

/* Bigger Donate button in the header. */
.ri-donate .wp-block-button__link {
	font-size: 1.125rem;
	padding: 0.9rem 1.75rem;
}

/* Outline buttons keep readable colors. */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--dark-green);
	border: 2px solid currentColor;
	padding: 1rem 2rem;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus {
	background: var(--wp--preset--color--dark-green);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--dark-green);
}

/* Footer on dark green: white text and links. */
.site-footer a { color: var(--wp--preset--color--white); }
.site-footer .ri-logo-grid img {
	background: var(--wp--preset--color--white);
	padding: 0.5rem;
	border-radius: 4px;
	object-fit: contain;
	height: 64px;
	width: 100%;
}

/* Partner logos on a light section. */
.ri-logo-grid figure { margin: 0; }
.ri-logo-grid img { height: 72px; width: 100%; object-fit: contain; }
/* Twelve logos: six over six on wide screens (the Candid seal is in the footer); three on a tablet, two on a phone. */
.ri-logo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
@media (max-width: 900px) {
	.ri-logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) { .ri-logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* Square logos look small next to wide ones at the same height, so they are 20% taller. */
.ri-logo-grid { align-items: center; }
.ri-logo-grid .ri-logo-square img { height: 86px; }

/* Newsletter form (Mailchimp classic embed). */
.ri-signup form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.ri-signup .ri-field { display: flex; flex-direction: column; flex: 1 1 12rem; }
.ri-signup label { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.25rem; }
.ri-signup input[type="email"],
.ri-signup input[type="text"] {
	font: inherit;
	padding: 0.7rem 0.85rem;
	border: 2px solid var(--wp--preset--color--dark-green);
	border-radius: 4px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black);
}
.ri-signup .ri-hidden { position: absolute; left: -5000px; }
.ri-signup button {
	font-family: var(--wp--custom--heading-font);
	font-weight: 700;
	font-size: 1.0625rem;
	text-transform: var(--wp--custom--heading-transform);
	background: var(--wp--preset--color--button-orange);
	color: var(--wp--preset--color--white);
	border: 0;
	border-radius: var(--wp--custom--button-radius);
	padding: 0.85rem 1.5rem;
	cursor: pointer;
}
.ri-signup button:hover,
.ri-signup button:focus { background: var(--wp--preset--color--dark-green); color: var(--wp--preset--color--white); }

/* Step numbers in the model pattern. */
.ri-step__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	background: var(--wp--preset--color--marigold);
	color: var(--wp--preset--color--black);
	font-family: var(--wp--custom--heading-font);
	font-weight: 800;
	font-size: 1.375rem;
}
/* The step heading sits beside its number; the text below spans both. */
.wp-block-column:has(> .ri-step__number),
.ri-about-values__item:has(> .ri-step__number) {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 0.85rem;
	align-items: center;
	align-content: start;
}
.wp-block-column:has(> .ri-step__number) > *,
.ri-about-values__item:has(> .ri-step__number) > * { margin-block: 0; }
.wp-block-column:has(> .ri-step__number) > :not(.ri-step__number):not(h3),
.ri-about-values__item:has(> .ri-step__number) > :not(.ri-step__number):not(h3) { grid-column: 1 / -1; margin-top: 1rem; }

/* Header: Donate stays on one line. */
.ri-donate .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) {
	.site-header .wp-block-site-logo img { width: 150px; height: auto; }
	.site-header .wp-block-group > .wp-block-group { gap: 0.5rem; }
	.ri-donate .wp-block-button__link { font-size: 1rem; padding: 0.7rem 1.1rem; }
}

/* A list without bullets, for link lists. */
.ri-plain-list { list-style: none; }

/* The logo is one color, so the footer shows it in white on dark green. */
.site-footer .wp-block-site-logo img { filter: brightness(0) invert(1); }

/* Header sits above the first section with a soft shadow. */
.site-header {
	position: relative;
	z-index: 10;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}
@media (max-width: 600px) {
	.site-header { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
}

/* Mission section: a large pale beet behind two overlapping round photos. */
/* On a computer the beet may run past the bottom of the section into the space above the next one, so it is never cut off. */
.ri-together { position: relative; z-index: 1; }
.ri-together::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: -4rem;
	top: 1rem;
	width: 616px;
	height: 780px;
	background: url("assets/images/beet-shape.svg") no-repeat left top / contain;
	pointer-events: none;
}
.ri-circles { position: relative; }
.ri-circles .ri-circle-1 { width: 78%; margin: 0; }
.ri-circles .ri-circle-2 {
	width: 52%;
	margin: -30% 0 0 auto;
	position: relative;
}
.ri-circles .ri-circle-2 img { border: 8px solid var(--wp--preset--color--white); }
@media (max-width: 781px) {
	.ri-together { overflow: hidden; }
	.ri-together::before { left: 50%; top: 0; width: auto; height: 60%; aspect-ratio: 600 / 760; transform: translateX(-50%); }
}

/* Full-width sections touch: no gap between colored bands. */
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* Round photos: always square and fully round. */
.ri-circles .wp-block-image img {
	aspect-ratio: 1 / 1;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: 50% !important;
}

/* Filled buttons carry a border in their own color, so they match outline buttons in size. */
.wp-element-button,
.wp-block-button__link,
.ri-signup button { border: 2px solid transparent; }

/* Sign-up button sits on its own line, under the email field. */
.ri-signup .ri-submit { flex: 1 1 100%; display: flex; justify-content: flex-end; }

/* Hero: centered headline, intro, and Donate button over three facts on white cards, with two round photos that bridge the gaps between them. */
.ri-hero-gap h1 { font-size: clamp(2.5rem, 4.6vw, 4rem); line-height: 1.05; margin: 0; }
.ri-hero-gap__intro > p { max-width: 40rem; margin-inline: auto !important; }
.ri-gap { display: grid; grid-template-columns: 1fr 60px 1fr 60px 1fr; align-items: stretch; }
.ri-gap > * { margin-block: 0 !important; }
.ri-gap__side { padding: 1.5rem calc(1.75rem + 45px); border-radius: var(--wp--custom--card-radius); box-shadow: 0 8px 30px rgba(56, 82, 74, 0.12); }
.ri-gap__side:first-child { padding-left: 1.75rem; }
.ri-gap__side:last-child { padding-right: 1.75rem; }
.ri-gap__number { font-size: 2.5rem; font-weight: 800; line-height: 1; margin: 0; color: var(--wp--preset--color--dark-green); white-space: nowrap; }
.ri-gap__text { font-size: 1rem; font-weight: 600; line-height: 1.4; margin-top: 0.75rem !important; }
.ri-gap__side .has-small-font-size { font-size: 0.8rem !important; margin-top: 0.75rem !important; }
.ri-gap__bridge { align-self: center; justify-self: center; margin: 0 -45px !important; position: relative; z-index: 2; width: 140px; }
.ri-gap__bridge img { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; border: 8px solid var(--wp--preset--color--pale-blue); display: block; }
@media (max-width: 1100px) {
	.ri-gap { grid-template-columns: 1fr; row-gap: 1.5rem; max-width: 560px; margin-inline: auto !important; }
	.ri-gap__side, .ri-gap__side:first-child, .ri-gap__side:last-child { padding: var(--wp--preset--spacing--40); }
	.ri-gap__side:not(:first-child) { padding-top: calc(var(--wp--preset--spacing--40) + 40px); }
	.ri-gap__side:not(:last-child) { padding-bottom: calc(var(--wp--preset--spacing--40) + 40px); }
	.ri-gap__bridge { margin: -60px auto !important; width: 120px; }
	.ri-gap__bridge img { width: 120px; height: 120px; }
}

/* Contact form (Fluent Forms). The Send button matches the site's buttons; fields match the newsletter fields. */
/* Fluent colors its button from --fluentform-primary with a stronger selector, so set the variable. */
.fluentform { --fluentform-primary: var(--wp--preset--color--button-orange); }
.fluentform .ff-el-form-control {
	font: inherit;
	padding: 0.7rem 0.85rem;
	border: 2px solid var(--wp--preset--color--dark-green);
	border-radius: 4px;
	color: var(--wp--preset--color--black);
}
.fluentform .ff-el-form-control:focus { outline: 3px solid var(--wp--preset--color--dark-green); outline-offset: 3px; }
.fluentform .ff-el-input--label label { font-weight: 600; }
.fluentform .ff-el-is-error .text-danger { font-size: var(--wp--preset--font-size--small); margin-top: 0.375rem; }
.fluentform .ff-btn-submit.ff-btn {
	font-family: var(--wp--custom--heading-font);
	font-weight: 700;
	font-size: 1.0625rem;
	text-transform: var(--wp--custom--heading-transform);
	background: var(--wp--preset--color--button-orange);
	color: var(--wp--preset--color--white);
	border: 2px solid transparent;
	border-radius: var(--wp--custom--button-radius);
	padding: 0.85rem 1.5rem;
	opacity: 1;
}
.fluentform .ff-btn-submit.ff-btn:hover,
.fluentform .ff-btn-submit.ff-btn:focus { background: var(--wp--preset--color--dark-green); color: var(--wp--preset--color--white); }
/* The Send button sits at the right edge of the form. Fluent sets the wrapper to ff-text-left. */
.fluentform .ff_submit_btn_wrapper.ff-text-left { text-align: right; }
.fluentform .ff-message-success { background: transparent; border: 2px solid var(--wp--preset--color--dark-green); box-shadow: none; }

/* Headings that must not leave one word alone on the last line: every centered heading, plus any heading with ri-balance. */
.ri-balance,
.wp-block-heading.has-text-align-center { text-wrap: balance; }

/* A heading beside a photo: its capitals line up with the top of the photo. */
.ri-trim-top { text-box: trim-start cap alphabetic; }

/* Filled buttons on dark green: the dark green hover would hide the button, so it turns white instead. */
.has-dark-green-background-color .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.has-dark-green-background-color .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--dark-green);
}

/* Sections that line up with wide sections: content spans the wide width; paragraphs keep a readable length from the left edge.
   WordPress centers constrained children with !important margins, so the paragraph margins need !important too. */
.ri-left > * { max-width: var(--wp--style--global--wide-size); }
.ri-left > p { max-width: var(--wp--style--global--wide-size); margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important; margin-right: auto !important; }

/* News category menu matches the site's form fields. */
.wp-block-categories-dropdown { margin-top: var(--wp--preset--spacing--40); }
.wp-block-categories-dropdown label { display: block; font-weight: 600; margin-bottom: 0.375rem; }
.wp-block-categories-dropdown select {
	font: inherit;
	padding: 0.7rem 2.5rem 0.7rem 0.85rem;
	border: 2px solid var(--wp--preset--color--dark-green);
	border-radius: 4px;
	color: var(--wp--preset--color--black);
	background-color: var(--wp--preset--color--white);
	min-width: 16rem;
}
.wp-block-categories-dropdown select:focus { outline: 3px solid var(--wp--preset--color--dark-green); outline-offset: 3px; }

/* About: vision as a statement on dark green with the mission under it, values with step circles, people as cards. */
.ri-about-statement { font-size: var(--wp--preset--font-size--x-large); line-height: 1.3; text-wrap: balance; max-width: 900px; margin-inline: auto; }
.ri-about-mission-wrap { margin-top: var(--wp--preset--spacing--50); padding-top: var(--wp--preset--spacing--40); border-top: 1px solid rgba(255,255,255,0.35); max-width: 760px; margin-inline: auto; }
.ri-about-mission { margin: 0; }
/* Values wrap three to a row on desktop; a short last row is centered. */
.ri-about-values { --ri-about-gap: var(--wp--preset--spacing--50); margin-top: var(--wp--preset--spacing--50); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ri-about-gap); }
.ri-about-values > * { flex: 0 0 calc((100% - 2 * var(--ri-about-gap)) / 3); }
@media (max-width: 1000px) { .ri-about-values > * { flex-basis: calc((100% - var(--ri-about-gap)) / 2); } }
@media (max-width: 600px) { .ri-about-values > * { flex-basis: 100%; } }
.ri-about-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--wp--preset--spacing--40); margin-block: var(--wp--preset--spacing--50); }
/* Grid items line up: the flow layout margin on later children is not wanted in a grid. */
.ri-about-people > *, .ri-about-values > * { margin-block-start: 0; }
.ri-about-person { padding: var(--wp--preset--spacing--40); color: var(--wp--preset--color--black); }
.ri-about-person h3 { color: var(--wp--preset--color--dark-green) !important; margin: 0; }
.ri-about-role { margin: 0.25rem 0 0; }

/* Our Work: each program shows its model steps as numbered eyebrows above the heading. */
.ri-program__steps { gap: 0.6rem 1.25rem; align-items: center; margin-bottom: 0.75rem; }
.ri-program__steps > p { margin: 0 !important; }
.ri-program__steps .ri-step__number { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.ri-program__step { font-family: var(--wp--custom--heading-font); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--wp--preset--font-size--small); }
/* Program photos fill the height of the text beside them; on phones they keep a 4:3 shape. */
.ri-program .wp-block-column:has(> .wp-block-image) { display: flex; }
.ri-program .wp-block-image { margin: 0; flex: 1; }
.ri-program .wp-block-image img { height: 100%; width: 100%; aspect-ratio: auto !important; object-fit: cover; }
@media (max-width: 781px) { .ri-program .wp-block-image img { aspect-ratio: 4/3 !important; height: auto; } }
/* Impact: the totals since 2023 lead; the shorter periods are smaller outlined cards. */
.ri-impact .wp-block-columns:not(:first-of-type) .ri-stat { background: transparent !important; color: var(--wp--preset--color--white) !important; border: 2px solid rgba(255,255,255,0.45); }
.ri-impact .wp-block-columns:not(:first-of-type) .ri-stat * { color: var(--wp--preset--color--white) !important; }
.ri-impact .wp-block-columns:not(:first-of-type) .ri-stat__number { font-size: var(--wp--preset--font-size--x-large) !important; }
.ri-impact h3 { margin-top: var(--wp--preset--spacing--50); }

/* Small uppercase label above a heading. Dark green on light backgrounds, marigold on dark green. */
.ri-eyebrow { font-family: var(--wp--custom--heading-font); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--wp--preset--font-size--small); margin-bottom: 0.5rem; color: var(--wp--preset--color--dark-green); }
.has-dark-green-background-color .ri-eyebrow { color: var(--wp--preset--color--marigold); }
/* Get Involved: Thrivent as an outlined strip with its button on the right. */
.ri-thrivent { margin-top: var(--wp--preset--spacing--60) !important; padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); border: 1px solid rgba(255,255,255,0.35); border-radius: 6px; }
.ri-thrivent .wp-block-columns { align-items: center !important; margin: 0; }
.ri-thrivent .wp-block-column { align-self: center; }
.ri-thrivent h3 { margin-top: 0; }
.ri-thrivent .wp-block-column > p:last-child { margin-bottom: 0; }
.ri-thrivent .wp-block-buttons { justify-content: flex-end; }
@media (max-width: 781px) { .ri-thrivent .wp-block-buttons { justify-content: flex-start; } }
/* Get Involved: volunteer roles in one row, then the volunteer count beside the call to act. */
.ri-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--wp--preset--spacing--40); }
.ri-roles > * { margin-block-start: 0; }
.ri-volunteer-count, .ri-volunteer-ready { padding: var(--wp--preset--spacing--40); border-radius: 6px; height: 100%; }
.ri-volunteer-count { display: flex; align-items: center; color: var(--wp--preset--color--black); }
/* The count reads as a promo: big type with the same space on every side. */
.ri-volunteer-count p { margin: 0; font-size: var(--wp--preset--font-size--x-large) !important; line-height: 1.25; }
.ri-volunteer-ready h3 { margin-top: 0; }
#volunteer h3#volunteer-roles { margin-top: var(--wp--preset--spacing--50); }

/* News and archives: three columns of cards; the title sits in a colored band over the bottom of the photo, as on the 2025 site. */
.ri-news-filter { text-align: center; padding-bottom: var(--wp--preset--spacing--40); border-bottom: 1px solid rgba(56, 82, 74, 0.25); }
.ri-news-filter select { min-width: 16rem; padding: 0.5rem 0.75rem; }
.ri-news .wp-block-post-template { gap: var(--wp--preset--spacing--40); margin-top: var(--wp--preset--spacing--50); }
.ri-news-card { position: relative; display: flex; flex-direction: column; height: 100%; }
.ri-news-card .wp-block-post-featured-image { margin: 0; background: var(--wp--preset--color--mist); }
.ri-news-card .wp-block-post-featured-image img { border-radius: 0; }
/* A post with no photo keeps the card's shape. */
.ri-news-card:not(:has(.wp-block-post-featured-image))::before { content: ""; display: block; aspect-ratio: 4/3; background: var(--wp--preset--color--mist); }
.ri-news-card__title {
	margin: -3.5rem 1.25rem 0 0 !important;
	position: relative;
	padding: 1rem 1.25rem;
	font-size: 1.0625rem !important;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	background: var(--wp--preset--color--dark-green);
}
.ri-news-card__title a { color: var(--wp--preset--color--white); text-decoration: none; }
/* The whole card is the link. */
.ri-news-card__title a::after { content: ""; position: absolute; inset: -100vh -1.25rem 0 0; }
.ri-news-card { overflow: hidden; }
.ri-news-card__title a:hover, .ri-news-card__title a:focus-visible { text-decoration: underline; }
.ri-news-card:has(a:focus-visible) { outline: 3px solid var(--wp--preset--color--dark-green); outline-offset: 3px; }
.ri-news-card a:focus-visible { outline: none; }
/* The bands rotate through four brand colors. Light bands take black text. */
.ri-news li:nth-child(4n+2) .ri-news-card__title { background: var(--wp--preset--color--light-green); }
.ri-news li:nth-child(4n+3) .ri-news-card__title { background: var(--wp--preset--color--button-orange); }
.ri-news li:nth-child(4n+4) .ri-news-card__title { background: var(--wp--preset--color--light-blue); }
.ri-news li:nth-child(4n+2) .ri-news-card__title a,
.ri-news li:nth-child(4n+4) .ri-news-card__title a { color: var(--wp--preset--color--black); }
.ri-news .wp-block-query-pagination { margin-top: var(--wp--preset--spacing--50); }
.ri-news-back { margin-top: var(--wp--preset--spacing--50); font-weight: 600; }

/* The four-color line from the annual report: sage, light blue, coral, marigold. */
:root {
	--ri-colorline: linear-gradient(90deg,
		var(--wp--preset--color--light-green) 0 25%,
		var(--wp--preset--color--light-blue) 25% 50%,
		var(--wp--preset--color--coral) 50% 75%,
		var(--wp--preset--color--marigold) 75% 100%);
}
/* Full width under the header and above the footer. */
.site-header::after,
.site-footer::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 6px;
	background: var(--ri-colorline);
	pointer-events: none;
}
.site-header::after { bottom: -6px; }
.site-footer { position: relative; }
.site-footer::before { top: 0; }
/* A short version under each section heading in page content. */
.wp-block-post-content h2.wp-block-heading:not(.ri-no-line)::after {
	content: "";
	display: block;
	width: 72px;
	height: 5px;
	margin-top: 0.75rem;
	background: var(--ri-colorline);
	border-radius: 2px;
}
.wp-block-post-content h2.wp-block-heading.has-text-align-center::after { margin-inline: auto; }

/* Larger buttons for the main calls to action. */
.ri-btn-lg .wp-block-button__link { font-size: 1.25rem; padding: 1.15rem 2.5rem; }
@media (max-width: 600px) { .ri-btn-lg .wp-block-button__link { font-size: 1.125rem; padding: 1rem 1.75rem; } }

/* Dark green buttons for actions that are not the main one on a section. */
.ri-btn-green .wp-block-button__link { background: var(--wp--preset--color--dark-green); color: var(--wp--preset--color--white); }
.ri-btn-green .wp-block-button__link:hover,
.ri-btn-green .wp-block-button__link:focus { background: #24372f; color: var(--wp--preset--color--white); }

/* Match banner at the top of the homepage. */
/* The block's own layout setting decides one line or stacked on wide screens (pin 42), so Selena can change it
   in the editor: Group > Layout. One line now: the sentence on the left, the button at the far right.
   Below 782px the sentence always stacks over a centered button. */
.ri-match-banner__text { margin: 0; font-size: var(--wp--preset--font-size--medium); }
.ri-match-banner .wp-block-buttons { flex-shrink: 0; }
@media (max-width: 781px) {
	.ri-match-banner .alignwide { flex-direction: column; gap: 0.75rem; }
	.ri-match-banner__text { text-align: center; }
}
.ri-match-banner .wp-block-button__link { padding: 0.6rem 1.4rem; font-size: 1rem; }

/* Hero with two facts: two equal cards, larger numbers, no photos between them. */
.ri-gap.ri-gap--two { grid-template-columns: 1fr 1fr; gap: var(--wp--preset--spacing--40); max-width: 1000px; margin-inline: auto !important; }
.ri-gap--two .ri-gap__side,
.ri-gap--two .ri-gap__side:first-child,
.ri-gap--two .ri-gap__side:last-child { padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); }
.ri-gap--two .ri-gap__number { font-size: clamp(2.75rem, 5vw, 3.75rem); }
.ri-gap--two .ri-gap__text { font-size: var(--wp--preset--font-size--large); }
@media (max-width: 781px) { .ri-gap.ri-gap--two { grid-template-columns: 1fr; max-width: 560px; } }

/* Campaign card: dark green with a marigold match panel. */
.ri-campaign { border-radius: 12px; max-width: 960px; margin-inline: auto !important; }
.ri-campaign h2 { margin-top: 0.25rem; }
.ri-campaign__sub { font-weight: 700; margin-top: 0.75rem !important; }
.ri-campaign__match { border-radius: 8px; margin-block: var(--wp--preset--spacing--40) !important; }
.ri-campaign__match > * { margin-block: 0 !important; }
.ri-campaign__amount { font-family: var(--wp--custom--heading-font); font-weight: 800; font-size: var(--wp--preset--font-size--xx-large); line-height: 1.1; text-transform: uppercase; }

/* Ways you can help: white cards on cream, each with a colored icon circle. */
.ri-help-card {
	position: relative;
	border: 1px solid #dfe6e1;
	border-radius: 10px;
	padding-top: calc(var(--wp--preset--spacing--40) + 120px) !important;
	--ri-icon-bg: var(--wp--preset--color--dark-green);
	--ri-icon-fg: var(--wp--preset--color--white);
}
.ri-help-card::before,
.ri-help-card::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); }
/* Icon circles at the size in Selena's mockup: a 100px circle with a 60px icon. */
.ri-help-card::before { top: var(--wp--preset--spacing--40); width: 100px; height: 100px; border-radius: 50%; background: var(--ri-icon-bg); }
.ri-help-card::after {
	top: calc(var(--wp--preset--spacing--40) + 20px);
	width: 60px;
	height: 60px;
	background: var(--ri-icon-fg);
	-webkit-mask: var(--ri-icon) center / contain no-repeat;
	mask: var(--ri-icon) center / contain no-repeat;
}
.ri-help-card h3 { margin: 0; }
.ri-help-card--volunteer { --ri-icon: url("assets/images/icons/help-volunteer.svg"); }
.ri-help-card--donate { --ri-icon: url("assets/images/icons/help-donate.svg"); --ri-icon-bg: var(--wp--preset--color--marigold); }
.ri-help-card--partner { --ri-icon: url("assets/images/icons/help-partner.svg"); --ri-icon-bg: var(--wp--preset--color--button-orange); }
.ri-help-card--food { --ri-icon: url("assets/images/icons/help-food.svg"); --ri-icon-bg: var(--wp--preset--color--light-green); }
.ri-help-card .wp-block-button__link { font-size: 1rem; padding: 0.85rem 1.25rem; white-space: nowrap; }
/* The four cards sit side by side, so Give Today is dark green like the others here (Bekee, 2026-11-23). */
.ri-help-card .wp-block-button__link { background: var(--wp--preset--color--dark-green); color: var(--wp--preset--color--white); }
.ri-help-card .wp-block-button__link:hover,
.ri-help-card .wp-block-button__link:focus { background: #24372f; color: var(--wp--preset--color--white); }

/* About: the vision reads like the mission, not as a bold headline (pin 17). */
.ri-about-statement:not([class*="-font-size"]) { font-size: var(--wp--preset--font-size--large) !important; }
.ri-about-statement { font-weight: 400 !important; line-height: 1.45; max-width: 760px; color: var(--wp--preset--color--white) !important; }
.ri-about-statement.wp-block-heading::after { display: none !important; }

/* About: values as five dark green icons in a row on white, no cards (pin 18). */
.ri-about-values { --ri-about-gap: var(--wp--preset--spacing--40); }
.ri-about-values > .ri-value { flex: 1 1 0; min-width: 170px; text-align: center; }
.ri-value::before {
	content: "";
	display: block;
	width: 48px;
	height: 48px;
	margin: 0 auto 0.75rem;
	background: var(--wp--preset--color--dark-green);
	-webkit-mask: var(--ri-icon) center / contain no-repeat;
	mask: var(--ri-icon) center / contain no-repeat;
}
.ri-value h3 { margin: 0 0 0.5rem; }
.ri-value p { margin: 0; }
.ri-value--community { --ri-icon: url("assets/images/icons/community.svg"); }
.ri-value--compassion { --ri-icon: url("assets/images/icons/compassion.svg"); }
.ri-value--empowerment { --ri-icon: url("assets/images/icons/empowerment.svg"); }
.ri-value--equity { --ri-icon: url("assets/images/icons/equity.svg"); }
.ri-value--resilience { --ri-icon: url("assets/images/icons/resilience.svg"); }
@media (max-width: 1000px) { .ri-about-values > .ri-value { flex: 0 0 calc((100% - 2 * var(--ri-about-gap)) / 3); } }
@media (max-width: 600px) { .ri-about-values > .ri-value { flex: 0 0 100%; } }

/* About: square headshots, all the same size and crop (pins 19 and 21). */
.ri-about-person { padding: 0 0 var(--wp--preset--spacing--40); text-align: center; }
.ri-about-person .ri-about-photo { margin: 0 0 var(--wp--preset--spacing--30); }
.ri-about-person .ri-about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 25%; border-radius: 0; }
.ri-about-person h3, .ri-about-person .ri-about-role { padding-inline: var(--wp--preset--spacing--30); }

/* Our Work: programs on white with a thin divider between them (doc 3). */
.ri-program--divided { border-top: 1px solid rgba(56, 82, 74, 0.2); }
.ri-program--divided { padding-top: var(--wp--preset--spacing--60) !important; }

/* Impact in Action: four cards for the latest month, each with an icon (pin 29). */
.ri-stat--icon::before {
	content: "";
	display: block;
	width: 32px;
	height: 32px;
	background: var(--wp--preset--color--dark-green);
	-webkit-mask: var(--ri-icon) center / contain no-repeat;
	mask: var(--ri-icon) center / contain no-repeat;
}
.ri-stat--pounds { --ri-icon: url("assets/images/icons/leaf.svg"); }
.ri-stat--meals { --ri-icon: url("assets/images/icons/utensils.svg"); }
.ri-stat--volunteers { --ri-icon: url("assets/images/icons/volunteer.svg"); }
.ri-stat--hours { --ri-icon: url("assets/images/icons/clock.svg"); }
.ri-impact__month .ri-stat { color: var(--wp--preset--color--black) !important; }
.ri-impact__month .ri-stat * { color: var(--wp--preset--color--black) !important; }
.ri-impact__note { max-width: 760px; margin: var(--wp--preset--spacing--50) auto 0 !important; }
@media (min-width: 782px) and (max-width: 1100px) { .ri-impact__month { flex-wrap: wrap !important; } .ri-impact__month > .wp-block-column { flex-basis: calc(50% - 1rem) !important; } }
/* Program photos: one size and crop for all three (doc 3). Replaces the fill-the-height rule. */
.ri-program .wp-block-column:has(> .wp-block-image) { display: block; align-self: center; }
.ri-program .wp-block-image img { aspect-ratio: 4 / 3 !important; height: auto; width: 100%; object-fit: cover; }
.ri-program > .wp-block-columns { align-items: center; }
.ri-left > h1 { text-wrap: balance; max-width: none; margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important; margin-right: 0 !important; }
.ri-left > blockquote { max-width: 760px !important; margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important; margin-right: auto !important; }

/* Get Involved: the match line as a marigold callout (doc 6). */
.ri-match-callout { display: inline-block; padding: 0.5rem 1rem; border-radius: 6px; }
/* It looks like a button, so the whole box is the link to the donation form. */
.ri-match-callout:has(> a) { padding: 0; }
.ri-match-callout > a { display: block; padding: 0.5rem 1rem; border-radius: 6px; color: inherit; text-decoration: none; }
.ri-match-callout > a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.ri-match-callout > a:focus-visible { outline: 3px solid var(--wp--preset--color--dark-green); outline-offset: 3px; }

/* Get Involved: volunteer roles, two by two, each with a dark green icon; no cards (pin 34). */
#volunteer .ri-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60); margin-top: var(--wp--preset--spacing--50); }
@media (max-width: 700px) { #volunteer .ri-roles { grid-template-columns: 1fr; } }
.ri-role::before {
	content: "";
	display: block;
	width: 40px;
	height: 40px;
	margin-bottom: 0.75rem;
	background: var(--wp--preset--color--dark-green);
	-webkit-mask: var(--ri-icon) center / contain no-repeat;
	mask: var(--ri-icon) center / contain no-repeat;
}
.ri-role h3 { margin: 0 0 0.4rem; }
.ri-role p { margin: 0.4rem 0 0; }
.ri-role--kitchen { --ri-icon: url("assets/images/icons/kitchen.svg"); }
.ri-role--glean { --ri-icon: url("assets/images/icons/leaf.svg"); }
.ri-role--community { --ri-icon: url("assets/images/icons/volunteer.svg"); }
.ri-role--professional { --ri-icon: url("assets/images/icons/briefcase.svg"); }

/* Knead Tech panel under the roles. */
.ri-knead { border-radius: 12px; margin-top: var(--wp--preset--spacing--60) !important; }
.ri-knead h3 { margin-top: 0; }
.ri-knead > p { max-width: 760px; }
/* The phone drawing from Selena's mockup: decorative, a CSS background, so screen readers skip it. Right side on wide screens, under the button on phones. */
.ri-knead { position: relative; }
.ri-knead::after {
	content: "";
	display: block;
	width: 170px;
	height: 227px;
	margin: var(--wp--preset--spacing--40) auto 0;
	background: url("assets/images/knead-phone.svg") center / contain no-repeat;
}
@media (min-width: 901px) {
	.ri-knead { padding-right: calc(var(--wp--preset--spacing--50) + 260px) !important; min-height: 300px; }
	.ri-knead::after { position: absolute; right: var(--wp--preset--spacing--50); top: 50%; transform: translateY(-50%); margin: 0; width: 210px; height: 280px; }
}

/* A volunteer's words, then the one call to act. */
.ri-testimonial { margin-top: var(--wp--preset--spacing--60) !important; }
.ri-volunteer-ready { margin-top: var(--wp--preset--spacing--50) !important; padding: 0; }

/* Partnership cards: two equal cards, icon on the left (pin 33). */
.ri-partner-cards { max-width: 1000px; margin-inline: auto !important; }
.ri-help-card--left { align-items: flex-start !important; padding-top: calc(var(--wp--preset--spacing--40) + 76px) !important; }
.ri-help-card--left::before { left: var(--wp--preset--spacing--40); transform: none; width: 60px; height: 60px; }
.ri-help-card--left::after { left: calc(var(--wp--preset--spacing--40) + 15px); transform: none; top: calc(var(--wp--preset--spacing--40) + 15px); width: 30px; height: 30px; }

/* Contact: larger fields and button, a taller message box, less empty space (doc 4). */
.fluentform .ff-el-form-control { min-height: 48px; font-size: 1.0625rem; }
.fluentform textarea.ff-el-form-control { min-height: 200px; }
.fluentform .ff-el-group { margin-bottom: 1.25rem; }
.fluentform .ff-btn-submit.ff-btn { font-size: 1.25rem; padding: 1.1rem 2.5rem; }
.ri-signup input[type="email"], .ri-signup input[type="text"] { min-height: 48px; }
.ri-contact h2 { margin-top: 0; }
.ri-contact .wp-block-column > h3 { margin-top: var(--wp--preset--spacing--40); }

/* News & Stories: cards with photo, date, title, excerpt, and Read Story (doc 5). Replaces the colored title bands. */
.ri-news-filter { text-align: left; padding-bottom: 0; border-bottom: 0; margin-top: var(--wp--preset--spacing--50) !important; }
.ri-news-filter select, .wp-block-categories-dropdown.ri-news-filter select { min-width: 0; width: 240px; max-width: 100%; }
.ri-news .wp-block-post-template { margin-top: var(--wp--preset--spacing--40); gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); }
.ri-news-card { overflow: visible; background: var(--wp--preset--color--white); border: 1px solid #dfe6e1; border-radius: 8px; }
.ri-news-card .wp-block-post-featured-image { border-radius: 8px 8px 0 0; overflow: hidden; }
.ri-news-card__body { padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40) var(--wp--preset--spacing--40); border-top: 5px solid var(--wp--preset--color--light-green); display: flex; flex-direction: column; flex: 1; }
.ri-news li:nth-child(4n+2) .ri-news-card__body { border-top-color: var(--wp--preset--color--light-blue); }
.ri-news li:nth-child(4n+3) .ri-news-card__body { border-top-color: var(--wp--preset--color--coral); }
.ri-news li:nth-child(4n+4) .ri-news-card__body { border-top-color: var(--wp--preset--color--marigold); }
.ri-news-card__body > * { margin-block: 0; }
.ri-news-card__date { font-size: var(--wp--preset--font-size--small); color: #4a5a53; }
.ri-news .ri-news-card__title,
.ri-news li .ri-news-card__title { margin: 0.4rem 0 0 !important; padding: 0; background: none !important; font-size: var(--wp--preset--font-size--large) !important; text-transform: none; letter-spacing: 0; line-height: 1.25; }
.ri-news li .ri-news-card__title a { color: var(--wp--preset--color--dark-green) !important; text-decoration: none; }
.ri-news-card__title a::after { content: none; }
.ri-news-card__title a:hover, .ri-news-card__title a:focus-visible { text-decoration: underline; }
.ri-news-card:has(a:focus-visible) { outline: none; }
.ri-news-card a:focus-visible { outline: 3px solid var(--wp--preset--color--dark-green); outline-offset: 3px; }
.ri-news-card__excerpt { margin-top: 0.6rem !important; display: flex; flex-direction: column; flex: 1; }
.ri-news-card__excerpt .wp-block-post-excerpt__excerpt { margin: 0; }
.ri-news-card__excerpt .wp-block-post-excerpt__more-text { margin-top: auto; padding-top: 0.75rem; font-weight: 700; }
.ri-news-card__excerpt .wp-block-post-excerpt__more-link { color: var(--wp--preset--color--dark-green); }

/* The model as a bridge: surplus food on the left, four numbered steps across the deck, community tables on the right (pins 8 and 23). */
.ri-bridge {
	--ri-num: 56px;
	display: grid;
	grid-template-columns: 1.15fr repeat(4, 1fr) 1.15fr;
	gap: var(--wp--preset--spacing--30);
	position: relative;
	text-align: center;
}
.ri-bridge > * { margin-block: 0 !important; position: relative; }
/* The deck: one line through the centers of the number circles. */
.ri-bridge::before {
	content: "";
	position: absolute;
	left: 6%;
	right: 6%;
	top: calc(var(--ri-num) / 2 - 3px);
	height: 6px;
	border-radius: 3px;
	background: var(--wp--preset--color--dark-green);
}
.ri-bridge__num {
	width: var(--ri-num);
	height: var(--ri-num);
	margin: 0 auto 0.75rem !important;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-family: var(--wp--custom--heading-font);
	font-weight: 800;
	font-size: 1.5rem;
	color: var(--wp--preset--color--black);
	border: 4px solid var(--wp--preset--color--white);
	position: relative;
}
.ri-bridge__step--1 .ri-bridge__num { background: var(--wp--preset--color--light-green); }
.ri-bridge__step--2 .ri-bridge__num { background: var(--wp--preset--color--light-blue); }
.ri-bridge__step--3 .ri-bridge__num { background: var(--wp--preset--color--button-orange); color: var(--wp--preset--color--white); }
.ri-bridge__step--4 .ri-bridge__num { background: var(--wp--preset--color--marigold); }
/* The two ends: an icon on a pale circle in place of a number. */
.ri-bridge__end::before {
	content: "";
	display: block;
	width: var(--ri-num);
	height: var(--ri-num);
	margin: 0 auto 0.75rem;
	border-radius: 50%;
	border: 4px solid var(--wp--preset--color--white);
	background: var(--wp--preset--color--mist);
	position: relative;
}
.ri-bridge__end::after {
	content: "";
	position: absolute;
	top: calc(var(--ri-num) / 2 - 14px);
	left: calc(50% - 14px);
	width: 28px;
	height: 28px;
	background: var(--wp--preset--color--dark-green);
	-webkit-mask: var(--ri-icon) center / contain no-repeat;
	mask: var(--ri-icon) center / contain no-repeat;
}
.ri-bridge__end--start { --ri-icon: url("assets/images/icons/store.svg"); }
.ri-bridge__end--finish { --ri-icon: url("assets/images/icons/utensils.svg"); }
.ri-bridge h3 { font-size: var(--wp--preset--font-size--large); margin: 0 0 0.25rem; }
.ri-bridge p:not(.ri-bridge__num) { margin: 0; line-height: 1.4; }
/* Wide screens: a drawn bridge under the deck. The drawings are CSS backgrounds with no words, so screen readers skip them and the steps stay real text.
   Heights: the deck sits 60px down; the drawing under it is 110px; the text starts 16px below that. */
@media (min-width: 901px) {
	.ri-bridge::before {
		left: 0;
		right: 0;
		top: 60px;
		height: 110px;
		border-radius: 0;
		background: url("assets/images/bridge-band.svg") 0 0 / 100% 100% no-repeat;
	}
	.ri-bridge__step { padding-top: 36px; }
	.ri-bridge__num { margin: 0 auto 86px !important; }
	.ri-bridge__end::before {
		width: 100%;
		max-width: 140px;
		height: 64px;
		margin: 0 auto 122px;
		border: 0;
		border-radius: 0;
		background: var(--ri-art) center bottom / contain no-repeat;
	}
	.ri-bridge__end::after { display: none; }
	.ri-bridge__end--start { --ri-art: url("assets/images/bridge-start.svg"); }
	.ri-bridge__end--finish { --ri-art: url("assets/images/bridge-table.svg"); }
}
/* Phones and narrow tablets: the bridge runs top to bottom. */
@media (max-width: 900px) {
	/* A small drawing of the whole bridge opens the list; the line of steps starts below it. */
	.ri-bridge::after {
		content: "";
		order: -1;
		height: 96px;
		background: url("assets/images/bridge-phone.svg") center / contain no-repeat;
	}
	.ri-bridge::before { top: calc(96px + var(--wp--preset--spacing--40) + 6px) !important; }
	.ri-bridge { grid-template-columns: 1fr; gap: var(--wp--preset--spacing--40); text-align: left; max-width: 460px; margin-inline: auto !important; }
	.ri-bridge::before { left: calc(var(--ri-num) / 2 - 3px); right: auto; top: 6px; bottom: 6px; width: 6px; height: auto; }
	.ri-bridge > * { display: grid; grid-template-columns: var(--ri-num) 1fr; column-gap: 1rem; align-items: start; }
	.ri-bridge > * > * { grid-column: 2; }
	.ri-bridge__num, .ri-bridge__end::before { grid-column: 1 !important; grid-row: 1 / span 2; margin: 0 !important; }
	.ri-bridge__end::after { left: calc(var(--ri-num) / 2 - 14px); }
	.ri-bridge h3 { margin-top: 0.75rem; }
}

/* Candid seal in the footer, under the tagline. */
.site-footer .ri-footer-seal { margin-top: var(--wp--preset--spacing--30); }

/* Get Involved giving section on mist instead of dark green (pin 38): the Thrivent strip becomes a white card. */
.ri-give .ri-thrivent { background: var(--wp--preset--color--white); border-color: rgba(56, 82, 74, 0.2); }

/* Volunteer roles (pins 44 and 51): each role ends with a full-width button, aligned across the row. */
/* Pin 57: each card shares the grid's rows (icon, heading, text, button, note), so buttons side by side line up even when one card has a note under its button. */
#volunteer .ri-role { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
#volunteer .ri-role > * { margin-block-start: 0; }
#volunteer .ri-role__action { margin-top: 0 !important; padding-top: var(--wp--preset--spacing--30); align-self: end; }
#volunteer .ri-role__note { margin-top: 0.4rem; color: #4a4a4a; }
#volunteer .ri-role .wp-block-button__link { width: 100%; }
.ri-roles-rule { margin-block: var(--wp--preset--spacing--50) !important; border: 0; border-top: 1px solid rgba(56, 82, 74, 0.2); }
.ri-volunteer-start { border-radius: 6px; }
.ri-volunteer-start h3 { margin-top: 0; }
.ri-volunteer-start > p:last-child { margin-bottom: 0; }
.ri-btn-outline-orange .wp-block-button__link { color: var(--wp--preset--color--button-orange); padding: 0.6rem 1.2rem; }
.ri-btn-outline-orange .wp-block-button__link:hover,
.ri-btn-outline-orange .wp-block-button__link:focus { background: var(--wp--preset--color--button-orange); border-color: var(--wp--preset--color--button-orange); color: var(--wp--preset--color--white); }

/* About: the Our Vision and Our Mission labels one size up (pins 39 and 40). */
.has-dark-green-background-color:has(.ri-about-statement) .ri-eyebrow { font-size: var(--wp--preset--font-size--large); letter-spacing: 0.1em; }

/* Our Work: the Glean Team photo is portrait, so it shows square instead of 4:3 (pin 41). */
@media (min-width: 782px) { #the-glean-team .wp-block-image img { aspect-ratio: 1 / 1 !important; object-position: 50% 35%; } }

/* Homepage headline on two lines (pin 47): wider than the 880px intro, so "Into Community Nourishment" fits on one line. */
@media (min-width: 900px) {
	.ri-hero-gap > .ri-hero-gap__intro { max-width: 1240px !important; }
	.ri-hero-gap__intro > h1 { max-width: none !important; font-size: clamp(2.5rem, 4.2vw, 4rem); }
}
/* Only while the block has no font size of its own (statement) or keeps its default Large (mission), so a size Selena picks in the editor wins. */
.has-dark-green-background-color .ri-about-statement:not([class*="-font-size"]) { font-size: var(--wp--preset--font-size--x-large) !important; line-height: 1.3; }
.has-dark-green-background-color .ri-about-mission.has-large-font-size { font-size: clamp(1.25rem, 1.8vw, 1.5rem) !important; line-height: 1.5; }
@media (max-width: 899px) { .ri-hero-gap__intro > h1 br { display: none; } }
