/*
 * sections.css — the page BANDS.
 *
 * Everything that is a section of a page rather than part of the site frame:
 * the hero, the quote band, program cards, the impact band, "What's happening",
 * the student story, the donation bands, and the About timeline.
 *
 * Split out of the block theme's single 1,137-line style.css so that the frame
 * (chrome.css) and the bands (this file) can be reasoned about separately. The
 * rules themselves are ported unchanged — the class names are the contract
 * between these bands and the patterns that emit them, and every one of those
 * patterns is now editable content in the database.
 *
 * Loads THIRD, after chrome.css. See inc/enqueue.php for why the order is
 * expressed as a dependency chain rather than as call order.
 */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.bb-hero__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--display);
	font-weight: 500;
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--forest);
	margin: 0;
}

.bb-hero__title-em {
	font-style: italic;
	font-weight: 400;
}

/* --------------------------------------------------------------------------
   Quote band
   -------------------------------------------------------------------------- */

.bb-quote-band__quote {
	margin: 0;
	position: relative;
	padding-inline-start: 2.2rem;
}

.bb-quote-band__quote p {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp( 1.5rem, 3.2vw, 2.35rem );
	font-style: italic;
	line-height: 1.28;
	margin: 0;
}

.bb-quote-band__glyph,
.bb-c2g__glyph {
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: -0.15em;
	font-family: var(--wp--preset--font-family--display);
	font-size: 3rem;
	line-height: 1;
	color: var(--wp--preset--color--terracotta-on-dark);
}

/* --------------------------------------------------------------------------
   Program cards
   -------------------------------------------------------------------------- */

.bb-program-card {
	position: relative;
}

.bb-program-card__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.bb-program-card__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-top: -1.5rem;
	margin-inline-start: 0.5rem;
	position: relative;
	border-radius: 50%;
	background: var(--wp--preset--color--sage);
	/* Sage is 2.23:1 on cream — decorative only. The forest stroke carries the
	   icon's meaning, and every card also has a text title. */
	color: var(--wp--preset--color--forest);
}

.bb-program-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	color: var(--wp--preset--color--forest);
	margin: 0.75rem 0 0.5rem;
}

.bb-program-card__text {
	font-size: var(--wp--preset--font-size--small);
	margin: 0 0 0.9rem;
}

.bb-program-card__more a,
.bb-feature-card__more a,
.bb-event-list__all a {
	color: var(--wp--preset--color--terracotta-text);
	text-decoration: none;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}

.bb-program-card__more a:hover,
.bb-feature-card__more a:hover,
.bb-event-list__all a:hover {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Impact band
   -------------------------------------------------------------------------- */

.bb-impact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp( 1.5rem, 4vw, 3rem );
}

.bb-impact__heading {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	margin: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.1;
	position: relative;
	padding-bottom: 0.4em;
}

.bb-impact__heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 2em;
	height: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--gold);
}

.bb-impact__list {
	display: flex;
	flex-wrap: wrap;
	flex: 1;
	margin: 0;
	gap: 0;
}

/* flex-basis 0 rather than 10rem: with a 10rem basis the four stats need
   ~680px before padding and wrap to a second row at the design's own 856px
   width, which breaks the single-rule-separated band the mockup shows. */
.bb-impact__item {
	flex: 1 1 0;
	min-width: 0;
	padding-inline: clamp( 0.5rem, 1.5vw, 1.25rem );
	text-align: center;
	border-inline-start: 1px solid rgba( 201, 162, 39, 0.4 );
}

.bb-impact__item:first-child {
	border-inline-start: 0;
}

.bb-impact__icon {
	display: block;
	color: var(--wp--preset--color--gold);
	margin-bottom: 0.4rem;
}

.bb-impact__icon svg {
	margin-inline: auto;
}

.bb-impact__figure {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp( 1.6rem, 3.4vw, 2.35rem );
	font-weight: 600;
	line-height: 1.1;
}

.bb-impact__label {
	margin: 0.3rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.4;
	opacity: 0.9;
}

/* --------------------------------------------------------------------------
   What's happening
   -------------------------------------------------------------------------- */

.bb-feature-card {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
}

.bb-feature-card__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.bb-feature-card__body {
	position: relative;
	margin: -3.5rem 1rem 0;
	padding: 1.25rem 1.4rem;
	background: var(--wp--preset--color--base);
	border-radius: 6px 26px 6px 26px;
}

.bb-feature-card__date {
	color: var(--wp--preset--color--terracotta-text);
	margin: 0 0 0.35rem;
}

.bb-feature-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	color: var(--wp--preset--color--forest);
	margin: 0 0 0.4rem;
}

.bb-feature-card__text {
	font-size: var(--wp--preset--font-size--small);
	margin: 0 0 0.8rem;
}

.bb-event-list {
	list-style: none;
	margin: 0;
	padding: 1.5rem;
	background: var(--wp--preset--color--base-alt);
	border-radius: 6px 26px 6px 26px;
}

.bb-event-list__item + .bb-event-list__item {
	border-top: 1px solid rgba( 42, 42, 36, 0.15 );
}

/* 7rem, not 5.5rem: "ANNOUNCEMENT" is a single long word and the eyebrow's
   uppercase letter-spacing makes it wider still, so a narrower track split it
   across lines mid-word. */
.bb-event-list__link {
	display: grid;
	grid-template-columns: 7rem 1fr auto;
	align-items: center;
	gap: 0.75rem;
	padding-block: 0.9rem;
	text-decoration: none;
	color: inherit;
}

.bb-event-list__link:hover .bb-event-list__title,
.bb-event-list__link:focus .bb-event-list__title {
	text-decoration: underline;
}

.bb-event-list__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.bb-event-list__kind {
	color: var(--wp--preset--color--terracotta-text);
	/* "ANNOUNCEMENT" is one long word and the eyebrow's uppercase tracking
	   widens it further, so the inherited break-word split it mid-word. */
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
	font-size: 0.65rem;
	line-height: 1.3;
}

.bb-event-list__date {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--forest);
	line-height: 1.1;
}

.bb-event-list__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--forest);
	line-height: 1.25;
}

.bb-event-list__arrow {
	color: var(--wp--preset--color--terracotta-text);
}

.bb-event-list__all {
	margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   Student story
   -------------------------------------------------------------------------- */

.bb-student-story {
	margin: 1.5rem 0 0;
}

.bb-student-story__quote {
	margin: 0;
	border: 0;
	padding: 0;
}

.bb-student-story__quote p {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp( 1.35rem, 2.6vw, 1.85rem );
	font-style: italic;
	font-weight: 500;
	line-height: 1.3;
	color: var(--wp--preset--color--forest);
	margin: 0;
}

.bb-student-story__context {
	font-size: var(--wp--preset--font-size--small);
	margin: 1rem 0 0.5rem;
}

.bb-student-story__cite {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--forest);
}

/* --------------------------------------------------------------------------
   Donation bands
   -------------------------------------------------------------------------- */

.bb-donate-band__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp( 1.9rem, 4vw, 2.9rem );
	font-weight: 500;
	line-height: 1.1;
	margin: 0;
}

.bb-donate-band__title em {
	display: block;
	font-style: italic;
	font-weight: 400;
}

.bb-give {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	aspect-ratio: 1;
	max-width: 12rem;
	margin-inline: auto;
	padding: 1.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--terracotta-text);
	text-decoration: none;
	text-align: center;
}

.bb-give:hover,
.bb-give:focus {
	background: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--terracotta-text);
}

.bb-give__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
}

.bb-give__sub {
	font-size: var(--wp--preset--font-size--x-small);
}

.bb-heart-mark {
	display: block;
	color: var(--wp--preset--color--base);
}

/* --------------------------------------------------------------------------
   About: timeline, archival photo, C2G panel
   -------------------------------------------------------------------------- */

.bb-timeline {
	list-style: none;
	margin: 1.75rem 0 0;
	padding: 0;
	position: relative;
}

.bb-timeline::before {
	content: "";
	position: absolute;
	inset-inline-start: 4px;
	inset-block: 0.5rem 1rem;
	width: 2px;
	background: rgba( 143, 69, 41, 0.35 );
}

.bb-timeline__item {
	position: relative;
	display: grid;
	grid-template-columns: 3.6rem 1fr;
	gap: 0.75rem;
	padding-inline-start: 1.5rem;
	padding-block: 0.5rem;
}

.bb-timeline__item::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 1rem;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wp--preset--color--terracotta-text);
}

.bb-timeline__year {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	color: var(--wp--preset--color--forest);
	line-height: 1.3;
}

.bb-timeline__text {
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5;
}

.bb-archival {
	margin: 0;
	padding: 0.7rem 0.7rem 1.8rem;
	background: #f3ece0;
	box-shadow: 0 3px 14px rgba( 42, 42, 36, 0.18 );
	transform: rotate( -1.5deg );
}

.bb-archival img {
	display: block;
	width: 100%;
	height: auto;
	filter: sepia( 0.35 ) contrast( 1.02 );
}

.bb-c2g {
	position: relative;
	padding: clamp( 1.75rem, 4vw, 3rem );
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--base);
}

.bb-c2g__lead {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp( 1.35rem, 2.8vw, 1.95rem );
	font-style: italic;
	line-height: 1.25;
	margin: 0 0 1.5rem;
	position: relative;
	padding-inline-start: 2rem;
}

.bb-c2g__lead::after {
	content: "";
	display: block;
	width: 2.5rem;
	height: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--terracotta-on-dark);
	margin-top: 0.9rem;
}

.bb-c2g__sub {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	margin: 0;
	padding-inline-start: 2rem;
	opacity: 0.92;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media ( max-width: 781px ) {
	.bb-impact {
		flex-direction: column;
		align-items: flex-start;
	}

	.bb-impact__item {
		border-inline-start: 0;
		border-block-start: 1px solid rgba( 201, 162, 39, 0.4 );
		text-align: start;
		padding-block: 1rem;
		padding-inline: 0;
		flex-basis: 100%;
	}

	.bb-impact__item:first-child {
		border-block-start: 0;
	}

	.bb-impact__icon svg {
		margin-inline: 0;
	}

	.bb-event-list__link {
		grid-template-columns: 4.5rem 1fr auto;
	}

	.bb-archival {
		max-width: 16rem;
		margin-inline: auto;
	}
}

/* --------------------------------------------------------------------------
   Donate page — components
   --------------------------------------------------------------------------
   The bands themselves (backgrounds, waves, the two-column grid) live in
   art-direction.css, next to the home page's donation band whose wave tokens
   they reuse. What is here is the type-and-surface layer: the designation
   tiles, the giving cards, and the frame around the embedded form.

   ONE RULE GOVERNS ALL OF IT: nothing here can style the donation form. It is a
   cross-origin iframe inside a shadow root, so every selector below stops at
   its edge. We style the room, not the furniture Givebutter puts in it. */

/* The designation tiles.
   auto-fit rather than a fixed column count: this list sits in a column that is
   ~440px at 900px wide and ~700px at 1200px, so a fixed grid would either strand
   whitespace at the top of the range or crush the blurbs at the bottom. */
.bb-fund-list {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat( auto-fit, minmax( 14rem, 1fr ) );
}

.bb-fund {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	height: 100%;
	box-sizing: border-box;
	padding: 1rem 1.1rem;
	border: 1px solid rgba( 57, 62, 46, 0.18 );
	border-radius: 10px;
	background-color: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.bb-fund:hover,
.bb-fund:focus-visible {
	border-color: var(--wp--preset--color--terracotta-text);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/*
 * Selected state. NOT COLOUR ALONE (WCAG 1.4.1): the ring thickens from 1px to
 * 2px and a filled marker appears before the name, so the state survives a
 * monochrome rendering and a colour-blind reader.
 */
.bb-fund[aria-pressed="true"] {
	border-color: var(--wp--preset--color--terracotta-text);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--terracotta-text);
	background-color: var(--wp--preset--color--base);
}

.bb-fund[aria-pressed="true"] .bb-fund__name::before {
	content: "";
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-inline-end: 0.45rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--terracotta-text);
	vertical-align: middle;
}

.bb-fund__name {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--forest);
}

.bb-fund__blurb {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

/*
 * Once assets/js/donate.js locks the tiles — which it does the moment focus
 * enters the form — they stop being controls and become labels. They keep their
 * href and their focusability on purpose: a dead link a keyboard user can still
 * reach is worse than a working one, and the href reloads the page with the
 * fund preselected, which is a legitimate thing to want.
 */
.bb-donate-give__note {
	display: none;
	font-size: var(--wp--preset--font-size--small);
	margin-block-start: 1rem;
	padding-inline-start: 0.9rem;
	border-inline-start: 2px solid var(--wp--preset--color--terracotta);
}

[data-bb-locked] .bb-donate-give__note {
	display: block;
}

[data-bb-locked] .bb-fund {
	opacity: 0.72;
}

/* The frame around the embed.
   A plain radius, and no `overflow: hidden`: the iframe resizes itself as the
   donor works — expanding for "give in honor", for validation errors, for the
   monthly toggle — and anything that clips it clips a payment field. This is
   also why it carries no --bb-clip-* mask like every other card in the theme. */
.bb-donate-form {
	background-color: var(--wp--preset--color--base-alt);
	border: 1px solid rgba( 57, 62, 46, 0.14 );
	border-radius: 14px;
	padding: clamp( 1rem, 2.5vw, 1.5rem );
	box-sizing: border-box;
}

/* 440px is the campaign's own embed_max_width, which the widget applies once its
   config request lands. Stated here too so the card is the right size from the
   first paint rather than reflowing under the donor mid-decision. */
.bb-donate-form__embed {
	display: block;
	width: 100%;
	max-width: 27.5rem;
	margin-inline: auto;
	min-height: 32rem;
}

.bb-donate-form__trust {
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.6;
	margin: 1rem 0 0;
	text-align: center;
}

/* A tall iframe is a wall for keyboard users: without this, reaching the
   check-by-mail card below means tabbing through an entire payment form. */
.bb-donate-give__skip {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset( 50% );
	white-space: nowrap;
}

.bb-donate-give__skip:focus {
	position: static;
	display: inline-block;
	width: auto;
	height: auto;
	clip-path: none;
	margin-block-start: 1rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* Other ways to give. */
.bb-give-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	line-height: 1.15;
	color: var(--wp--preset--color--forest);
	margin: 0 0 0.75rem;
}

.bb-give-card__subtitle {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	color: var(--wp--preset--color--forest);
	margin: 1.25rem 0 0.5rem;
}

.bb-give-card__text {
	margin: 0 0 1rem;
}

/* The address is the single most consequential string on this page — a donor
   copies it onto an envelope. Monospace-adjacent treatment: generous line
   height, no justification, and large enough to read across a room. */
.bb-give-card__address {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	line-height: 1.35;
	color: var(--wp--preset--color--forest);
	margin: 0 0 1rem;
}

.bb-give-card__note {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
	margin: 0;
}

.bb-box-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 11rem, 1fr ) );
	gap: 0.3rem 1rem;
	font-size: var(--wp--preset--font-size--small);
}

.bb-box-list li::before {
	content: "";
	display: inline-block;
	width: 0.3rem;
	height: 0.3rem;
	margin-inline-end: 0.5rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--terracotta);
	vertical-align: middle;
}

.bb-donate-other__where {
	margin-block-start: clamp( 2rem, 5vw, 3rem );
	max-width: 44rem;
}

.bb-donate-other__legal {
	margin-block-start: clamp( 2rem, 5vw, 3rem );
	padding-block-start: 1.25rem;
	border-block-start: 1px solid rgba( 57, 62, 46, 0.18 );
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.7;
	max-width: 44rem;
}
