/*
 * Inner-page pieces built from core blocks (first used by the Join Our Team pattern, patterns/careers.php).
 * Each piece is a class an editor can add under Advanced → Additional CSS class(es). Token variables only.
 * "body" raises specificity above core's column and image styles, whatever order they load in.
 */

/*
 * Page-level title sizes that aren't presets, on the same fixed 8px steps as the presets (see type-scale.css):
 * inner-page header H1 64 / 48 / 40, and the titled-template H1 (blog, 404, text pages) 56 / 48 / 40.
 */
body {
	--solid-page-h1: 4rem;
	--solid-page-title: 3.5rem;
}

@media (max-width: 1024px) {
	body {
		--solid-page-h1: 3rem;
		--solid-page-title: 3rem;
	}
}

@media (max-width: 600px) {
	body {
		--solid-page-h1: 2.5rem;
		--solid-page-title: 2.5rem;
	}
}

/* Page hero: teal panel with copy and a photo. */
.solid-page-hero {
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--60) var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
	border-radius: var(--wp--custom--radius--lg);
}

.solid-page-hero h1 {
	font-size: var(--solid-page-h1);
	line-height: 1.05;
}

.solid-page-hero p {
	opacity: 0.88;
}

/* Big page title, for a section opener like "Life At SOLID". */
.solid-page-title {
	font-size: var(--solid-page-title);
	line-height: var(--wp--custom--font--line-height--display);
	letter-spacing: var(--wp--custom--font--letter-spacing--display);
}

/* Photos: rounded, cropped to a steady shape whatever the upload's size. */
body .solid-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 20px;
}

body .solid-photo.is-wide img {
	aspect-ratio: 15 / 7;
	border-radius: var(--wp--custom--radius--lg);
}

body .solid-photo.is-fill,
body .solid-photo.is-fill img {
	height: 100%;
	margin: 0;
	aspect-ratio: auto;
	border-radius: 0;
}

/*
 * Cards. Each piece below answers to two names: the class the page patterns use (.solid-card …) and the matching
 * option in the editor's Styles panel (.is-style-card …, registered by the files in /styles). Same look either way.
 */
:is(.solid-card, .is-style-card, .is-style-card-outline, .is-style-card-large) {
	box-sizing: border-box;
	height: 100%;
	padding: var(--wp--preset--spacing--50);
	border-radius: 20px;
}

:is(.solid-card.is-large, .is-style-card-large),
.solid-card.is-quote {
	padding: var(--wp--preset--spacing--60);
	border-radius: var(--wp--custom--radius--lg);
}

:is(.solid-card.is-outline, .is-style-card-outline) {
	border: 1px solid var(--wp--preset--color--line);
	background-color: var(--wp--preset--color--white);
}

.solid-card.is-centered {
	text-align: center;
}

.solid-card.is-split {
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--60) var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
	border-radius: var(--wp--custom--radius--lg);
}

/* Picked from the Styles panel, a card gets the mist background unless the block has its own color. */
:is(.is-style-card, .is-style-card-large):not(.has-background) {
	background-color: var(--wp--preset--color--mist-50);
}

.solid-card-kicker {
	color: var(--wp--preset--color--teal-600);
	font-size: var(--wp--preset--font-size--base);
	font-weight: var(--wp--custom--font--weight--bold);
}

/* The short yellow bar above outlined cards' small headings. */
:is(.solid-card.is-outline, .is-style-card-outline) > .solid-eyebrow::before {
	content: "";
	display: block;
	width: 40px;
	height: 6px;
	margin-bottom: var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--pill);
	background-color: var(--wp--preset--color--yellow-400);
}

.solid-eyebrow {
	color: var(--wp--preset--color--teal-600);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: var(--wp--custom--font--weight--bold);
	letter-spacing: var(--wp--custom--font--letter-spacing--eyebrow);
	text-transform: uppercase;
}

/* Subtitles and statements: 24px at every width. */
.solid-subtitle {
	font-size: 1.5rem;
	line-height: 1.2;
}

.solid-statement {
	font-size: 1.5rem;
	font-weight: var(--wp--custom--font--weight--bold);
	line-height: 1.35;
}

.solid-lede {
	max-width: 56rem;
}

.solid-rule {
	width: 100%;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--line);
	opacity: 1;
}

/* Team quotes */
body .solid-headshot,
body .solid-headshot img {
	flex-shrink: 0;
	margin: 0;
	border-radius: 50%;
}

/* Award logos sit in the same box so the titles line up. */
body .solid-award-logo {
	margin-bottom: var(--wp--preset--spacing--20);
}

/* Full-width teal band with icon tiles (Our Values, SOLID Benefits). */
.solid-band {
	padding-top: var(--wp--preset--spacing--80);
	padding-bottom: var(--wp--preset--spacing--80);
}

body .solid-band .solid-icon-grid.is-three {
	max-width: 960px;
}

body .solid-band .solid-icon-grid + .solid-icon-grid {
	margin-top: var(--wp--preset--spacing--60);
}

body .solid-icon-tile {
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Same tile as the current site's refreshed values band: 72px icon on a 128px rounded square. */
body .solid-icon-tile img {
	box-sizing: content-box;
	width: 72px;
	height: 72px;
	padding: 28px;
	border-radius: var(--wp--custom--radius--lg);
	background-color: rgb(255 255 255 / 0.15);
}

body .solid-icon-tile.is-light img {
	background-color: var(--wp--preset--color--white);
}

.solid-icon-label {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--base);
	font-weight: var(--wp--custom--font--weight--bold);
	letter-spacing: 0;
	line-height: 1.4;
}

/* Teal band with copy on the left and a photo filling the right. */
.solid-photo-band {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--lg);
}

body .solid-photo-band > .wp-block-columns {
	gap: 0;
	margin: 0;
}

body .solid-photo-band__copy {
	padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--60) var(--wp--preset--spacing--80) var(--wp--preset--spacing--70);
}

body .solid-photo-band__media {
	min-height: 320px;
}

/*
 * Inner-page hero: the same Hero block as the homepage (so its background image or video can be replaced in the
 * editor), shorter, with the text centred vertically. Class "is-page" is set on the block in each page pattern.
 */
body .wp-block-solid-hero.is-page {
	align-items: center;
	min-height: clamp(320px, 40vh, 420px);
	padding: var(--wp--preset--spacing--70);
}

body .wp-block-solid-hero.is-page .wp-block-solid-hero__content {
	max-width: 47.5rem;
}

body .wp-block-solid-hero.is-page h1 {
	font-size: var(--solid-page-h1);
	line-height: 1.05;
}

/*
 * Tablets and phones: the text spans the whole hero, so the overlay goes evenly dark instead of fading out on the right
 * (applies to the homepage hero too). The image or video still shows through faintly.
 */
@media (max-width: 1024px) {
	body .wp-block-solid-hero__overlay {
		background: linear-gradient(
			180deg,
			var(--wp--preset--color--ink),
			var(--wp--preset--color--teal-900)
		);
	}
}

/* Phones: keep the heading clear of the Play/Pause button in the top corner. */
@media (max-width: 600px) {
	body .wp-block-solid-hero:has(.wp-block-solid-hero__toggle) .wp-block-solid-hero__content {
		padding-top: 3rem;
	}
}

/* No image or video yet: a soft teal circle on the right, under the gradient, so the panel isn't flat. */
body .wp-block-solid-hero.is-page:not(:has(.wp-block-solid-hero__image, .wp-block-solid-hero__video))::before {
	content: "";
	position: absolute;
	z-index: -2;
	top: -190px;
	right: -140px;
	width: 440px;
	height: 440px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--teal-600);
}

/* Timeline: each paragraph gets a dot on a vertical line; the last dot is yellow ("today"). */
.solid-timeline {
	padding-left: 2.5rem;
}

.solid-timeline > p {
	position: relative;
	margin-block: 0;
}

.solid-timeline > p + p {
	margin-block-start: var(--wp--preset--spacing--50);
}

.solid-timeline > p::before {
	content: "";
	position: absolute;
	top: 0.4em;
	left: -2.5rem;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--teal-900);
}

.solid-timeline > p:last-child::before {
	background-color: var(--wp--preset--color--yellow-400);
}

.solid-timeline > p:not(:last-child)::after {
	content: "";
	position: absolute;
	top: calc(0.4em + 16px);
	bottom: calc(-1 * var(--wp--preset--spacing--50) - 0.4em);
	left: calc(-2.5rem + 7px);
	width: 2px;
	background-color: var(--wp--preset--color--line);
}

/* Full-width photo call to action: the CTA Card block, with the button right under the heading. */
body .wp-block-solid-cta-card.solid-cta-band {
	min-height: 0;
	padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--70);
}

/* A full-width band's heading is a section title, not a card title. */
body .solid-cta-band .wp-block-solid-cta-card__content h2 {
	font-size: var(--wp--preset--font-size--xxl);
}

body .solid-cta-band .wp-block-solid-cta-card__content > .wp-block-buttons {
	margin-block-start: var(--wp--preset--spacing--40);
	padding-block-start: 0;
}

/* Capability rows (What We Do): icon, name and tagline on the left; detail on the right. */
body .wp-block-columns.solid-capability {
	margin-block: 0;
	padding-block: var(--wp--preset--spacing--60);
	border-top: 1px solid var(--wp--preset--color--line);
}

body .solid-icon-chip {
	margin: 0;
}

body .solid-icon-chip img {
	box-sizing: content-box;
	width: 24px;
	height: 24px;
	padding: 16px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--mist-50);
}

:is(.solid-note, .is-style-note) {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--mist-50);
	color: var(--wp--preset--color--muted);
}

:is(.solid-note, .is-style-note) strong {
	color: var(--wp--preset--color--ink);
}

/* Expandable sections (core Details block). */
:is(.solid-details, .is-style-box, .is-style-box-large) {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background-color: var(--wp--preset--color--white);
}

:is(.solid-details, .is-style-box, .is-style-box-large) > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	padding: 0.875rem 1.125rem;
	border-radius: 11px;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font--weight--bold);
	list-style: none;
	cursor: pointer;
}

:is(.solid-details, .is-style-box, .is-style-box-large) > summary::-webkit-details-marker {
	display: none;
}

:is(.solid-details, .is-style-box, .is-style-box-large) > summary::after {
	content: "";
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	margin: -4px 4px 0;
	border-right: 2px solid currentcolor;
	border-bottom: 2px solid currentcolor;
	transform: rotate(45deg);
	transition: transform 0.15s ease;
}

:is(.solid-details, .is-style-box, .is-style-box-large)[open] > summary::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}

:is(.solid-details, .is-style-box, .is-style-box-large) > summary:hover {
	background-color: var(--wp--preset--color--mist-50);
}

:is(.solid-details, .is-style-box, .is-style-box-large) > summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--teal-600);
	outline-offset: 2px;
}

:is(.solid-details, .is-style-box, .is-style-box-large) > :not(summary) {
	margin-inline: 1.125rem;
}

:is(.solid-details, .is-style-box, .is-style-box-large) > summary + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

:is(.solid-details, .is-style-box, .is-style-box-large) > :last-child:not(summary) {
	margin-block-end: 1.125rem;
}

:is(.solid-details, .is-style-box, .is-style-box-large) ul {
	padding-left: 1.25rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--base);
}

:is(.solid-details, .is-style-box, .is-style-box-large) li + li {
	margin-top: 0.625rem;
}

:is(.solid-details, .is-style-box, .is-style-box-large) li strong {
	color: var(--wp--preset--color--ink);
}

:is(.solid-details, .is-style-box, .is-style-box-large) h4 {
	margin-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--teal-600);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: var(--wp--custom--font--letter-spacing--eyebrow);
	text-transform: uppercase;
}

/* Larger variant for whole sections (contract vehicles). */
:is(.solid-details.is-large, .is-style-box-large) > summary {
	padding: 1.25rem 1.5rem;
	font-size: var(--wp--preset--font-size--lg);
	font-weight: var(--wp--custom--font--weight--semibold);
}

:is(.solid-details.is-large, .is-style-box-large)[open] > summary {
	border-bottom: 1px solid var(--wp--preset--color--line);
	border-radius: 11px 11px 0 0;
	background-color: var(--wp--preset--color--mist-50);
}

:is(.solid-details.is-large, .is-style-box-large) > :not(summary) {
	margin-inline: 1.5rem;
}

:is(.solid-details.is-large, .is-style-box-large) > summary + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

:is(.solid-details.is-large, .is-style-box-large) > :last-child:not(summary) {
	margin-block-end: 1.5rem;
}

/* Label-and-value rows inside a section. */
body .solid-facts {
	margin: 0;
	padding: 0;
	list-style: none;
}

body .solid-facts li {
	margin: 0;
	padding-block: 0.75rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* A short list of links, each row ending in an arrow. */
body .solid-link-list {
	margin-top: var(--wp--preset--spacing--40);
	padding: 0.25rem 1.25rem;
	border-radius: var(--wp--custom--radius--md);
	background-color: var(--wp--preset--color--mist-50);
	list-style: none;
	font-size: var(--wp--preset--font-size--base);
	font-weight: var(--wp--custom--font--weight--bold);
}

body .solid-link-list li + li {
	border-top: 1px solid var(--wp--preset--color--line);
}

body .solid-link-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	padding-block: 1rem;
	text-decoration: none;
}

body .solid-link-list a::after {
	content: "→";
	flex-shrink: 0;
}

body .solid-link-list a:hover {
	text-decoration: underline;
}

/* Codes or tags as pills. */
body :is(.solid-chips, .is-style-chips) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-block: var(--wp--preset--spacing--40);
	padding: 0;
	list-style: none;
}

body :is(.solid-chips, .is-style-chips) li {
	margin: 0;
	border: 1px solid var(--wp--preset--color--line);
	padding: 0.625rem 1rem;
	border-radius: var(--wp--custom--radius--sm);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
}

body :is(.solid-chips, .is-style-chips) li strong {
	color: var(--wp--preset--color--ink);
}

/* A section set off by rules above and below. */
body .wp-block-columns.solid-rule-section {
	padding-block: var(--wp--preset--spacing--70);
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Publication cards: the cover sits on the card like a printed report. */
.solid-card.is-publication {
	padding: var(--wp--preset--spacing--40);
}

.solid-card.is-publication a {
	text-decoration: none;
}

.solid-card.is-publication a:hover {
	text-decoration: underline;
}

body .solid-cover {
	margin: 0;
}

body .solid-cover img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--wp--custom--radius--sm);
	box-shadow: 0 8px 24px rgb(27 38 39 / 0.14);
}

/* Client logos: one quiet grey wall. */
/* 24px between 96px logos fits ten across the 1200px wide width. */
body .solid-logo-wall {
	gap: var(--wp--preset--spacing--40);
}

body .solid-logo-wall .wp-block-image {
	margin: 0;
}

body .solid-logo-wall img {
	filter: grayscale(1);
	opacity: 0.85;
}

/* Blog: post cards in lists, and the single post. */
body .solid-post-card .wp-block-post-featured-image {
	margin: 0;
}

body .solid-post-card .wp-block-post-featured-image img {
	border-radius: var(--wp--custom--radius--md);
}

.solid-post-card .wp-block-post-title a {
	text-decoration: none;
}

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

.solid-page-title ~ .wp-block-query {
	margin-top: var(--wp--preset--spacing--50);
}

.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--60);
	font-weight: var(--wp--custom--font--weight--bold);
}

.solid-post-nav {
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font--weight--bold);
}

/* Phones: smaller icon tiles three across (rows of three stay whole), and panels give back some padding. */
@media (max-width: 781px) {
	body .wp-block-columns.solid-icon-grid {
		flex-wrap: wrap !important;
		justify-content: center;
		column-gap: var(--wp--preset--spacing--30);
		row-gap: var(--wp--preset--spacing--50);
	}

	body .wp-block-columns.solid-icon-grid > .wp-block-column {
		flex-basis: calc(33.333% - 0.75rem) !important;
		flex-grow: 0;
	}

	body .solid-icon-tile img {
		width: 44px;
		height: 44px;
		padding: 18px;
		border-radius: 20px;
	}

	.solid-icon-label {
		font-size: var(--wp--preset--font-size--xs);
	}

	/* Stacked columns don't stretch, so the photo needs its own height. */
	body .solid-photo.is-fill img {
		height: 240px;
	}

	body .solid-band .solid-icon-grid + .solid-icon-grid {
		margin-top: var(--wp--preset--spacing--50);
	}

	.solid-page-hero,
	.solid-card.is-split,
	:is(.solid-card.is-large, .is-style-card-large),
	.solid-card.is-quote {
		padding: var(--wp--preset--spacing--40);
	}

	body .solid-photo-band__copy {
		padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
	}

	body .solid-photo-band__media {
		min-height: 240px;
	}

	body .wp-block-solid-hero.is-page,
	body .wp-block-solid-cta-card.solid-cta-band {
		padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
	}

	/* The circle shrinks into the corner so it never sits behind the text. */
	body .wp-block-solid-hero.is-page:not(:has(.wp-block-solid-hero__image, .wp-block-solid-hero__video))::before {
		top: -150px;
		right: -150px;
		width: 240px;
		height: 240px;
	}

	body .wp-block-columns.solid-capability,
	body .wp-block-columns.solid-rule-section {
		padding-block: var(--wp--preset--spacing--50);
	}

	body .solid-logo-wall {
		gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	}

	body .solid-logo-wall img {
		width: 72px !important;
		height: 44px !important;
	}
}
