/*
Theme Name: ITDF
Theme URI: https://itdfinternational.org/
Author: Bedford+Co.
Author URI: https://bedfordandco.net/
Description: Block theme for the Integrated Tribal Development Foundation (ITDF). Bold contrast design shared with its sister site: Montserrat headlines, Inter body, Navy accent.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.4.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: itdf
*/

/* Shared CSS, loaded on the front end and in the block editor. Mobile first.
   Colours, sizes and spacing come from theme.json presets only. */

/* ---------- Page frame ---------- */

/* Sections stack edge to edge; each section sets its own padding. */
body .wp-site-blocks > *,
.wp-block-post-content.itdf-sections > * {
	margin-block-start: 0;
}

[id] {
	scroll-margin-top: 120px;
}

:where(a, button, summary, input, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

:where(.is-style-section-navy, .is-style-section-ink, .wp-block-cover, .itdf-header .wp-block-navigation__responsive-container.is-menu-open) :focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* ---------- Gold bar (brand divider) ---------- */

.wp-block-separator.is-style-gold-bar {
	width: 64px;
	max-width: 64px;
	height: 3px;
	border: 0;
	opacity: 1;
	margin-inline: 0;
}

.wp-block-separator.is-style-gold-bar.itdf-bar--small {
	width: 40px;
	max-width: 40px;
}

/* ---------- Eyebrow labels ---------- */

.is-style-eyebrow {
	color: var(--wp--preset--color--primary);
}

:where(.is-style-section-navy, .is-style-section-ink, .wp-block-cover) .is-style-eyebrow {
	color: var(--wp--preset--color--base);
}

/* ---------- Header ---------- */

.itdf-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--surface);
}

/* Below 600px the admin bar scrolls away with the page. */
.admin-bar .itdf-header {
	top: 0;
}

.itdf-header .wp-block-site-logo img,
.itdf-footer .wp-block-site-logo img {
	width: 64px;
	height: auto;
	/* The seal is a circle on a white square: show only the circle. */
	border-radius: 50%;
}

/* The full menu needs about 1000px: keep the menu button up to there (core switches at 600px). */
@media (max-width: 1023px) {
	.itdf-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.itdf-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

.itdf-header .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 8px;
}

.itdf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: var(--wp--preset--spacing--48);
}

/* The desktop menu is right-aligned; the open overlay reads better left-aligned. */
.itdf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.itdf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,
.itdf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
	align-items: flex-start;
	justify-content: flex-start;
	text-align: left;
}

.itdf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--medium);
}


/* ---------- Buttons ---------- */

/* One button size everywhere: theme.json padding and type (core shrinks the padding on outline buttons), plus a shared minimum width. */
.wp-block-button .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link {
	min-width: 16rem;
	padding: 16px 32px;
	text-align: center;
}

/* Outline buttons fill with navy on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* The header has no room for the shared width: same height and type, width set by the label. */
.itdf-header .itdf-header__donate .wp-block-button__link {
	min-width: 0;
}

/* Intro text in a wide column keeps a readable line length. */
.itdf-intro > p,
.itdf-split p,
.itdf-hero p {
	max-width: 62ch;
}

/* ---------- Heroes ---------- */

.itdf-hero .wp-block-cover__inner-container {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

/* Full-width covers use the page gutter, so their text lines up with the sections around them
   (core covers only pad 1em). */
.wp-block-cover.itdf-hero,
.wp-block-cover.itdf-priorities {
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

.wp-block-cover.itdf-priorities .wp-block-cover__inner-container {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

/* Core drops the inner container's margins when a content position is set (e.g. bottom left):
   keep it on the wide column so hero titles line up with the sections below at every width. */
.wp-block-cover.itdf-hero.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,
.wp-block-cover.itdf-priorities.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container {
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}

.itdf-hero h1 {
	max-width: 16ch;
}

.itdf-hero--statement h1 {
	max-width: 24ch;
}

.itdf-hero p {
	max-width: 60ch;
}

/* Inner-page hero titles run 20% larger than the H1 preset; on phones they stop at 12vw
   so long single words ("Cooperative") still fit the screen. */
.itdf-page-hero h1,
.itdf-type-hero h1 {
	font-size: min(calc(var(--wp--preset--font-size--xx-large) * 1.2), 12vw);
}

/* Photo heroes on inner pages: title sits at the bottom of the photo. */
.itdf-page-hero.wp-block-cover {
	align-items: flex-end;
}

.itdf-type-hero p {
	color: var(--wp--preset--color--base);
}

@media (prefers-reduced-motion: reduce) {
	.itdf-hero .wp-block-cover__video-background {
		display: none;
	}
}

/* ---------- Cards ---------- */

/* Whole-card links: the heading link stretches over the card. */
.itdf-card {
	position: relative;
}

.itdf-card .wp-block-heading a,
.itdf-card .itdf-card__link a {
	text-decoration: none;
}

.itdf-card .wp-block-heading a::after,
.itdf-card .itdf-card__link a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Image link cards on the home page. */
.itdf-card.wp-block-cover {
	padding: var(--wp--preset--spacing--32);
	overflow: hidden;
}

/* The cover's inner container is positioned, which would confine the stretched link to the text:
   oversize the link area and let the card clip it, so the whole photo is clickable. */
.itdf-card.wp-block-cover .wp-block-heading a::after {
	inset: -100vmax;
}

/* ---------- Ruled lists (prices, aims) ---------- */

.wp-block-list.itdf-ruled {
	list-style: none;
	padding-left: 0;
	border-bottom: 2px solid currentColor;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
}

.wp-block-list.itdf-ruled li {
	margin: 0;
	padding-block: var(--wp--preset--spacing--16);
	border-top: 2px solid currentColor;
}

.wp-block-list.itdf-ruled--large {
	font-size: var(--wp--preset--font-size--medium);
}

/* ---------- Contact details ---------- */

.itdf-contact-item {
	padding-top: var(--wp--preset--spacing--24);
	border-top: 2px solid var(--wp--preset--color--contrast);
	overflow-wrap: anywhere;
}

/* ---------- Edge-to-edge gallery ---------- */

.wp-block-gallery.itdf-gallery-edge {
	margin-bottom: 0;
}

/* ---------- Stats ---------- */

.itdf-stat {
	text-align: center;
}

.itdf-stat .itdf-stat__number {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.02em;
	/* Equal-width digits so the count-up does not jitter. */
	font-variant-numeric: tabular-nums;
}

/* ---------- Blog ---------- */

.itdf-post-card .wp-block-post-title a:hover {
	text-decoration: underline;
}

.itdf-post-card .wp-block-post-featured-image {
	overflow: hidden;
}

.itdf-post-card .wp-block-post-featured-image img {
	transition: transform 0.3s ease;
}

.itdf-post-card:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
	.itdf-post-card .wp-block-post-featured-image img {
		transition: none;
	}

	.itdf-post-card:hover .wp-block-post-featured-image img {
		transform: none;
	}
}

.wp-block-query-pagination a {
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	padding: 4px 10px;
}

.itdf-single__content img {
	height: auto;
}

/* ---------- Statement hero ---------- */

.itdf-statement-hero h1 {
	max-width: 15ch;
}

.itdf-statement-hero .itdf-statement-hero__lead,
.itdf-statement-hero .itdf-statement-hero__tail {
	color: var(--wp--preset--color--base);
	max-width: none;
}

.itdf-statement {
	letter-spacing: -0.02em;
}

/* ---------- Edge-to-edge strips and panels ---------- */

.itdf-strip .wp-block-image,
.itdf-panels .wp-block-cover,
.itdf-panel-split .wp-block-cover {
	margin: 0;
}

.itdf-strip .wp-block-image img {
	width: 100%;
}

.itdf-panels .wp-block-heading a,
.itdf-portrait .wp-block-heading a {
	text-decoration: none;
}

.itdf-panel-split {
	margin-block: 0;
}

.itdf-panel-split > .itdf-panel-media {
	display: flex;
}

/* The text panel's outer edge lines up with the wide column on large screens. */
.itdf-panel-split > .itdf-panel-text {
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

@media (min-width: 782px) {
	.itdf-panel-split > .itdf-panel-text {
		padding-left: max(var(--wp--preset--spacing--64), calc((100vw - var(--wp--style--global--wide-size)) / 2));
		padding-right: var(--wp--preset--spacing--64);
	}

	.itdf-panel-split--reverse > .itdf-panel-text {
		padding-left: var(--wp--preset--spacing--64);
		padding-right: max(var(--wp--preset--spacing--64), calc((100vw - var(--wp--style--global--wide-size)) / 2));
	}
}

.itdf-panel-split .itdf-panel-photo {
	flex: 1;
	min-height: 360px;
}

/* ---------- Action rows ---------- */

.itdf-rows {
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}

.itdf-row {
	position: relative;
	padding-block: var(--wp--preset--spacing--32);
	padding-inline: var(--wp--preset--spacing--16);
	border-top: 2px solid var(--wp--preset--color--contrast);
	transition: background-color 0.15s ease;
}

.itdf-row .itdf-row__title {
	flex: 1 1 100%;
}

.itdf-row .itdf-row__title a {
	text-decoration: none;
}

.itdf-row .itdf-row__text {
	flex: 1 1 0;
}

.itdf-row--link .itdf-row__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* A row with only a title (link lists such as giving options and job openings). */
.itdf-row--solo .itdf-row__title {
	flex: 1 1 auto;
}

.itdf-row--icon .itdf-row__icon {
	flex: 0 0 auto;
	margin: 0;
}

.itdf-row--icon .itdf-row__icon img {
	width: 56px;
	height: 56px;
	object-fit: contain;
}

/* Links inside the supporting line stay clickable above the row link. */
.itdf-row .itdf-row__text a {
	position: relative;
	z-index: 1;
}

.itdf-row--link::after {
	content: "\2192";
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
	line-height: 1;
	transition: transform 0.15s ease;
}

.itdf-row--link:hover,
.itdf-row--link:focus-within {
	background-color: var(--wp--preset--color--surface);
}

.itdf-row--link:hover::after,
.itdf-row--link:focus-within::after {
	transform: translateX(6px);
	color: var(--wp--preset--color--highlight);
}

/* The hovered row's title picks up the button blue too. */
.itdf-row--link:hover .itdf-row__title a,
.itdf-row--link:focus-within .itdf-row__title a {
	color: var(--wp--preset--color--highlight);
}

/* ---------- Action cards ---------- */

.itdf-action-card .wp-block-heading a {
	text-decoration: none;
}

.itdf-action-card p a {
	position: relative;
	z-index: 2;
}

/* ---------- Stories: feature and rows ---------- */

.itdf-feature .wp-block-post-title a::after,
.itdf-story-row .wp-block-post-title a::after,
.itdf-post-card .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.itdf-feature .wp-block-post-terms,
.itdf-story-row .wp-block-post-terms,
.itdf-post-card .wp-block-post-terms {
	position: relative;
	z-index: 2;
}

.itdf-story-rows > li + li {
	margin-top: 0;
}

.itdf-story-row {
	padding-block: var(--wp--preset--spacing--32);
	border-top: 2px solid var(--wp--preset--color--contrast);
}

.itdf-feature .wp-block-post-title a:hover,
.itdf-story-row .wp-block-post-title a:hover {
	text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
	.itdf-video-band .wp-block-cover__video-background {
		display: none;
	}

	.itdf-row,
	.itdf-row--link::after {
		transition: none;
	}
}

@media (min-width: 782px) {
	.itdf-row {
		flex-wrap: nowrap;
	}

	.itdf-row .itdf-row__title {
		flex: 0 0 32%;
	}

	.itdf-row--solo .itdf-row__title {
		flex: 1 1 auto;
	}

	.itdf-sticky {
		position: sticky;
		top: 140px;
		align-self: flex-start;
	}
}

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

.itdf-footer .wp-block-site-logo img {
	width: 112px;
}

.itdf-footer .wp-block-navigation a:hover,
.itdf-footer a:hover {
	color: var(--wp--preset--color--base);
	text-decoration: underline;
}

.itdf-footer__legal a {
	text-decoration: none;
	font-weight: 700;
}

/* ---------- Tablet and up ---------- */

@media (min-width: 600px) {
	.admin-bar .itdf-header {
		top: 46px;
	}
}

@media (min-width: 783px) {
	.admin-bar .itdf-header {
		top: 32px;
	}
}

@media (min-width: 1024px) {
	.itdf-header .wp-block-site-logo img {
		width: 72px;
	}
}

/* Columns stack below 782px (core); give stacked image/text splits room. */
@media (max-width: 781px) {
	.itdf-split .wp-block-column + .wp-block-column {
		margin-top: var(--wp--preset--spacing--16);
	}

	/* Portrait split photos would fill the screen once stacked: crop them shorter. */
	.itdf-split .wp-block-image img {
		max-height: 560px;
	}
}

/* Very small phones: let an oversized single word in a heading wrap instead of pushing the page sideways. */
@media (max-width: 359px) {
	.wp-block-heading {
		overflow-wrap: break-word;
		hyphens: auto;
	}
}

/* ==========================================================================
   ITDF sections
   ========================================================================== */

/* ---------- Team cards ---------- */

.itdf-team-card .wp-block-image img {
	width: 100%;
}

.itdf-team-card .wp-block-heading {
	text-transform: uppercase;
}

/* ---------- Numbered steps (The Process, team types, project sectors) ---------- */

.itdf-steps {
	counter-reset: itdf-step;
}

.itdf-step {
	counter-increment: itdf-step;
	padding-block: var(--wp--preset--spacing--48);
	border-top: 2px solid var(--wp--preset--color--contrast);
}

.itdf-step:last-child {
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}

.itdf-step .itdf-step__body::before {
	content: counter(itdf-step, decimal-leading-zero);
	display: block;
	margin-bottom: var(--wp--preset--spacing--16);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 900;
	line-height: 1;
}

.itdf-step .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

:where(.is-style-section-navy, .is-style-section-ink) .itdf-step {
	border-color: var(--wp--preset--color--base);
}

:where(.is-style-section-navy, .is-style-section-ink) .itdf-step .itdf-step__body::before {
	color: var(--wp--preset--color--base);
}

/* ---------- Jump links (programme shortcuts) ---------- */

.itdf-jump a {
	display: block;
	padding-block: var(--wp--preset--spacing--16);
	border-top: 2px solid currentColor;
	text-decoration: none;
}

.itdf-jump a:hover,
.itdf-jump a:focus-visible {
	color: currentColor;
	text-decoration: underline;
}

/* ---------- Price rows (What We Do) ---------- */

.itdf-row--price .itdf-row__thumb {
	flex: 0 0 auto;
	margin: 0;
}

.itdf-row--price .itdf-row__thumb img {
	width: 96px;
	height: 96px;
	object-fit: cover;
}

.itdf-row--price .itdf-row__price {
	flex: 0 0 auto;
	margin-left: auto;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 900;
	white-space: nowrap;
}

.itdf-total {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
}

@media (max-width: 599px) {
	.itdf-row--price .itdf-row__thumb img {
		width: 64px;
		height: 64px;
	}

	.itdf-row--price .itdf-row__price {
		flex-basis: 100%;
		margin-left: 0;
		white-space: normal;
	}
}

/* ---------- Coffee lot cards (Green Bean Buyers) ---------- */

/* Each card is colour-coded by processing method, as on the original site:
   a coloured header with white text over a cream body. */
.itdf-lot {
	--itdf-lot-color: var(--wp--preset--color--primary);
	overflow: hidden;
	border: 1px solid #D9CFBF;
	border-radius: 8px;
	background: #FFFDF9;
}

.itdf-lot--honey { --itdf-lot-color: #B15E18; }
.itdf-lot--natural { --itdf-lot-color: #567F49; }
.itdf-lot--anaerobic { --itdf-lot-color: #4A5E32; }
.itdf-lot--washed { --itdf-lot-color: #3A6C8A; }

.itdf-lot > .itdf-lot__head {
	background: var(--itdf-lot-color);
	color: var(--wp--preset--color--base);
}

.itdf-lot > .itdf-lot__head > * {
	margin: 0;
	color: inherit;
}

.itdf-lot > .itdf-lot__body {
	flex: 1;
}

/* The request link sits at the foot of every card, above a thin rule. */
.itdf-lot > .itdf-lot__body > .itdf-lot__request {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--16);
	border-top: 1px solid #D9CFBF;
}

.itdf-lot .itdf-lot__status,
.itdf-lot .itdf-lot__status.is-limited {
	font-style: italic;
	color: var(--wp--preset--color--base);
	opacity: 0.95;
}

.itdf-facts > * {
	margin: 0;
}

.itdf-facts .is-style-eyebrow {
	color: var(--wp--preset--color--secondary);
}

.itdf-lot .itdf-lot__request a {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 800;
	text-decoration: none;
}

.itdf-lot .itdf-lot__request a:hover {
	text-decoration: underline;
}

/* ---------- Partner logos (light artwork, shown on a dark band) ---------- */

.itdf-logos .wp-block-image {
	margin: 0;
}

.itdf-logos .wp-block-image img {
	width: 100%;
	max-height: 120px;
	object-fit: contain;
}

.itdf-logos .wp-block-image a:hover img,
.itdf-logos .wp-block-image a:focus-visible img {
	opacity: 0.8;
}

/* ---------- FAQ accordions ---------- */

.itdf-faq .wp-block-details {
	border-top: 2px solid var(--wp--preset--color--contrast);
	padding-block: var(--wp--preset--spacing--24);
}

.itdf-faq .wp-block-details:last-child {
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}

.itdf-faq summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: 1.35;
}

.itdf-faq summary:hover {
	color: var(--wp--preset--color--primary);
}

.itdf-faq .wp-block-details > :not(summary) {
	margin-top: var(--wp--preset--spacing--16);
}

/* ---------- Downloads (Forms & Applications) ---------- */

.itdf-download {
	padding-block: var(--wp--preset--spacing--32);
	border-top: 2px solid var(--wp--preset--color--contrast);
}

.itdf-download:last-child {
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}

.itdf-download .wp-block-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--16);
	margin: 0;
}

.itdf-download .wp-block-file .wp-block-file__button {
	margin: 0;
	padding: 10px 20px;
	border-radius: 0;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.itdf-download .wp-block-file .wp-block-file__button:hover,
.itdf-download .wp-block-file .wp-block-file__button:focus-visible {
	background: var(--wp--preset--color--primary);
}

/* Placeholders the client still has to supply: visible to reviewers, easy to find. */
.itdf-placeholder {
	padding: var(--wp--preset--spacing--16) var(--wp--preset--spacing--24);
	border: 2px dashed var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary);
	font-weight: 600;
}

/* ---------- Timeline (Team Resources) ---------- */

.itdf-timeline > .wp-block-group {
	padding-top: var(--wp--preset--spacing--24);
	border-top: 3px solid var(--wp--preset--color--accent);
}

/* ---------- Embedded forms (Elfsight) ---------- */

.itdf-embed {
	min-height: 200px;
}

/* ---------- Video ---------- */

.itdf-video video {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--contrast);
}

@media (min-width: 782px) {
	.itdf-step--reverse {
		flex-direction: row-reverse;
	}
}

@media (prefers-reduced-motion: reduce) {
	.itdf-step .wp-block-image img {
		transition: none;
	}
}

/* ---------- Link lists (priorities, programme shortcuts) ---------- */

.wp-block-list.itdf-jump {
	list-style: none;
	padding-left: 0;
	border-bottom: 2px solid currentColor;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wp-block-list.itdf-jump li {
	margin: 0;
}

/* The arrow is joined to the last word with a no-break space, so it never drops to a line of its own. */
.itdf-jump a::after {
	content: "\00a0\2192";
}

/* Programme shortcuts (What We Do): each label stays on one line with its arrow; the row wraps as a whole. */
.wp-block-list.itdf-jump--row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--wp--preset--spacing--32);
	border-bottom: 0;
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-list.itdf-jump--row li {
	flex: 1 1 auto;
}

.wp-block-list.itdf-jump--row a {
	display: flex;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--16);
	white-space: nowrap;
}

.wp-block-list.itdf-jump--row a::after {
	content: "\2192";
}

/* ---------- Price rows: the item name takes the free width ---------- */

.itdf-row--price .itdf-row__title {
	flex: 1 1 0;
	min-width: 12rem;
}

/* ---------- Figures without a count-up ---------- */

.itdf-stat .itdf-stat__figure {
	margin: 0;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.02em;
}

.itdf-stat--left {
	text-align: left;
}

/* ---------- Nested checklist (Team Resources) ---------- */

.wp-block-list.itdf-checklist > li {
	margin-bottom: var(--wp--preset--spacing--24);
	font-weight: 700;
}

.wp-block-list.itdf-checklist li li {
	font-weight: 400;
}

/* ---------- Photo strip ---------- */

.itdf-strip .wp-block-image {
	margin: 0;
}

.itdf-strip .wp-block-image img {
	width: 100%;
	height: 100%;
}

/* ---------- Parallax photos ---------- */

/* Visitors who ask for less motion get the photo scrolling with the page. */
@media (prefers-reduced-motion: reduce) {
	.wp-block-cover .wp-block-cover__image-background.has-parallax {
		background-attachment: scroll;
	}
}

/* ---------- About cards (Home) ---------- */

.itdf-panels .wp-block-cover {
	margin: 0;
	height: 100%;
}


/* ---------- Client feedback 11.17.26 ---------- */

/* Home hero: the line under the title is larger, so the jump from title to text is smaller. */
.itdf-statement-hero .itdf-statement-hero__lead.has-lead-font-size {
	/* the preset class sets its size with !important */
	font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem) !important;
}

/* Top-of-page photos and video show in full colour. The flat tint is replaced by a gradient
   that only darkens the area behind the text. */
.wp-block-cover.itdf-hero > .wp-block-cover__background.has-background-dim {
	opacity: 1 !important;
	background-color: transparent !important;
}

.wp-block-cover.itdf-page-hero > .wp-block-cover__background {
	background-image: linear-gradient(to top, rgb(20 20 20 / 0.75) 0%, rgb(20 20 20 / 0.35) 40%, rgb(20 20 20 / 0) 70%) !important;
}

.wp-block-cover.itdf-statement-hero > .wp-block-cover__background {
	background-image: linear-gradient(to right, rgb(20 20 20 / 0.7) 0%, rgb(20 20 20 / 0.35) 50%, rgb(20 20 20 / 0.05) 85%) !important;
}

.wp-block-cover.itdf-hero h1,
.wp-block-cover.itdf-hero p {
	text-shadow: 0 2px 16px rgb(0 0 0 / 0.45);
}

/* Banner above the home hero (The Catalyst). */
.itdf-banner p {
	margin: 0;
}

.itdf-banner a {
	text-decoration: none;
}

.itdf-banner a:hover,
.itdf-banner a:focus-visible {
	text-decoration: underline;
}

/* Team types and project sectors: a row of pictures instead of numbered steps. */
.itdf-steps--row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--32);
}

.itdf-steps--row .itdf-step.wp-block-columns,
.itdf-steps--row .itdf-step--reverse.wp-block-columns {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch !important;
	gap: var(--wp--preset--spacing--16);
	padding-block: 0;
	border: 0;
}

.itdf-steps--row .itdf-step > .wp-block-column {
	flex-basis: auto !important;
	width: 100%;
}

.itdf-steps--row .itdf-step .itdf-step__body::before {
	content: none;
}

@media (max-width: 1080px) {
	.itdf-steps--row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: var(--wp--preset--spacing--48);
	}
}

@media (max-width: 600px) {
	.itdf-steps--row {
		grid-template-columns: minmax(0, 1fr);
	}
}


/* ---------- Client feedback 11.28.26: gold replaced by navy; gold backgrounds are faint wheat ---------- */

/* On navy, ink and photo backgrounds the accent (now navy) would disappear: use white. */
:where(.is-style-section-navy, .is-style-section-ink, .wp-block-cover) .wp-block-separator.is-style-gold-bar {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--base);
}

:where(.is-style-section-navy, .is-style-section-ink, .wp-block-cover) .has-accent-color {
	color: var(--wp--preset--color--base) !important;
}

/* Filled buttons on photos: Lake Blue with white text, so they stand out without an outline. */
.wp-block-cover .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background-color: var(--wp--preset--color--highlight);
	border-color: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--base);
}

.wp-block-cover .wp-block-button > .wp-block-button__link:hover,
.wp-block-cover .wp-block-button > .wp-block-button__link:focus-visible,
:where(.is-style-section-navy, .is-style-section-ink) .wp-block-button.is-style-outline > .wp-block-button__link:hover,
:where(.is-style-section-navy, .is-style-section-ink) .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

/* The section links turn white on hover: show the change with the underline instead. */
:where(.is-style-section-navy, .is-style-section-ink, .is-style-section-gold) a:not(.wp-element-button):hover {
	text-decoration: underline;
}

/* Photo + text panels: the text panel fills the photo's full height (its content stays centred). */
.itdf-panel-split > .itdf-panel-text.is-vertically-aligned-center {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Long text that lines up with the wide column's left edge but keeps a comfortable reading width. */
.itdf-measure > * {
	max-width: 760px;
}

/* More Stories under a post lists posts from the same category only (see functions.php);
   the whole band is hidden when there are none, e.g. the first post in The Catalyst. */
.itdf-more-stories:not(:has(.wp-block-post-template)) {
	display: none;
}
