/**
 * custom.css — project component styles.
 *
 * Empty in the starter. Add component CSS here (or per-section files in
 * assets/css/) as patterns are built. Remember the hard-constraints:
 * no font-size, no margin-for-spacing, no gap — those live in theme.json
 * tokens and block attributes.
 */

/* ===== Protomiq components below ===== */

/* Every button in the current design ends in a ↗ that nudges on hover. Pure decoration: no editor control exists for it. */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
}
.wp-block-button__link::after {
	content: "↗";
	margin-inline-start: 28px;
	transition: transform 0.25s;
}
.wp-block-button__link:hover::after,
.wp-block-button__link:focus-visible::after {
	transform: translate(2px, -2px);
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link::after {
		transition: none;
	}
}

/* ===== Home (batch 1b) ===== */

/* Hero — two dot layers over the hero-glow gradient, each faded by a radial mask (decoration, no block). */
.protomiq-hero,
.protomiq-page-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}
.protomiq-hero::before,
.protomiq-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}
.protomiq-hero::before {
	background: radial-gradient(circle, color-mix(in srgb, var(--wp--preset--color--primary) 24%, transparent) 1.15px, transparent 1.45px) 0 0 / 23px 23px;
	mask-image: radial-gradient(at 84% 36%, #000 0%, rgba(0, 0, 0, 0.65) 26%, transparent 64%);
}
.protomiq-hero::after {
	background: radial-gradient(circle, color-mix(in srgb, var(--wp--preset--color--secondary) 35%, transparent) 1.6px, transparent 1.9px) 0 0 / 46px 46px;
	mask-image: radial-gradient(at 76% 90%, #000 0%, transparent 49%);
}

/* Bullet lists with teal dots (experience panels, IQ explainer). core/list has no blockGap support (M12), so item spacing lives here. */
.protomiq-dot-list {
	list-style: none;
	padding-inline-start: 0;
	display: flex;
	flex-direction: column;
	row-gap: 8px; /* lint-allow: core/list has no blockGap support (linter M12) */
	margin-block-end: 0; /* UA reset — defeats browser <ul> bottom margin */
}
.protomiq-dot-list > li {
	display: flex;
	column-gap: 10px; /* lint-allow: dot + text inside a list item, no block */
}
.protomiq-dot-list > li::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	margin-top: 0.55em; /* lint-allow: optical alignment of the dot with the first text line */
	border-radius: 50%;
	background: var(--wp--preset--color--secondary);
}
.protomiq-dot-list--grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 24px; /* lint-allow: core/list has no blockGap support (linter M12) */
}
.protomiq-dot-list--grid > li {
	align-items: center;
}
.protomiq-dot-list--grid > li::before {
	width: 5px;
	height: 5px;
	margin-top: 0; /* lint-allow: grid variant centres the dot instead */
	background: var(--wp--preset--color--accent);
}

/* "Learn more →" links and the text-link button style share one arrow icon. */
.protomiq-more a,
.wp-block-button.is-style-protomiq-link .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	column-gap: 8px; /* lint-allow: text + arrow inside a link, no block */
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}
.protomiq-more a::after,
.wp-block-button.is-style-protomiq-link .wp-block-button__link::after {
	content: "";
	width: 18px;
	height: 18px;
	margin-inline-start: 0;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M5 12h14M13 5l7 7-7 7'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M5 12h14M13 5l7 7-7 7'/></svg>") center / contain no-repeat;
	transition: transform 0.3s;
}
.protomiq-more a:hover::after,
.protomiq-more a:focus-visible::after,
.wp-block-button.is-style-protomiq-link .wp-block-button__link:hover::after,
.wp-block-button.is-style-protomiq-link .wp-block-button__link:focus-visible::after {
	transform: translateX(4px);
}
.wp-block-button.is-style-protomiq-link .wp-block-button__link:hover,
.wp-block-button.is-style-protomiq-link .wp-block-button__link:focus-visible {
	background: transparent;
	color: var(--wp--preset--color--primary);
}

/* Logo marquee — marquee.js clones the logos once and adds .is-running; the track then slides half its width. */
.protomiq-marquee {
	position: relative;
	overflow: hidden;
}
.protomiq-marquee-track {
	width: max-content;
	padding-inline-end: 72px; /* the gap between the last logo and the first clone */
}
.protomiq-marquee-track img {
	width: auto;
	height: 34px;
}
.protomiq-marquee.is-running .protomiq-marquee-track {
	animation: protomiq-marquee 46s linear infinite;
}
.protomiq-marquee:hover .protomiq-marquee-track,
.protomiq-marquee.is-paused .protomiq-marquee-track {
	animation-play-state: paused;
}
@keyframes protomiq-marquee {
	to { transform: translateX(-50%); }
}
.protomiq-marquee-toggle {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-end: 0;
	translate: 0 -50%;
	padding: 6px 12px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary);
	font: inherit;
	cursor: pointer;
}
.protomiq-marquee-toggle:not(:focus-visible) {
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden;
	white-space: nowrap;
}
.protomiq-marquee-toggle:focus-visible {
	outline: 3px solid var(--wp--preset--color--secondary);
	outline-offset: 2px;
}

/* Quote logo tile. */
.protomiq-logo-tile {
	flex-shrink: 0; /* the quote's long text would otherwise squeeze the fixed-width tile */
	overflow: hidden;
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent);
}
.protomiq-logo-tile img {
	width: 100%;
	height: 100%;
}
@media (max-width: 900px) {
	/* Stacked above the quote: in a vertical row flexSize sets height, so the tile's width is set here. */
	.protomiq-logo-tile {
		width: 150px;
	}
}

/* Experience tabs — xp-tabs.js adds .is-tabs: labels in a 300px column, the open panel beside them.
   Without JS (and in the editor) every panel shows stacked under its label. ≤900px: each panel opens under its label. */
.protomiq-xp-tab {
	transition: color 0.3s;
}
.protomiq-xp.is-tabs .protomiq-xp-tab {
	padding-block: 18px;
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
}
.protomiq-xp.is-tabs .protomiq-xp-item:last-child .protomiq-xp-tab {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.protomiq-xp.is-tabs .protomiq-xp-tab.is-active,
.protomiq-xp.is-tabs .protomiq-xp-tab:hover {
	color: var(--wp--preset--color--accent);
}
.protomiq-xp-tab button {
	all: unset;
	display: block;
	width: 100%;
	cursor: pointer;
}
.protomiq-xp-tab button:focus-visible,
.protomiq-faq-list summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--secondary);
	outline-offset: 4px;
	border-radius: 4px;
}
.protomiq-xp-panel[hidden] {
	display: none !important;
}
.protomiq-xp-media {
	flex-shrink: 0; /* keeps its 55% beside the panel text */
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 22px;
	background: var(--wp--preset--color--primary);
}
.protomiq-xp-media video,
.protomiq-product-video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.protomiq-xp-media {
	position: relative;
}

/* Pause/play button on each experience video (xp-tabs.js). Two bars = playing, triangle = paused. */
.protomiq-video-toggle {
	position: absolute;
	inset-block-start: 14px; /* top corner: the recordings have their own navy toolbar along the bottom */
	inset-inline-end: 14px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--primary) 80%, transparent);
	color: var(--wp--preset--color--white);
	cursor: pointer;
	transition: background-color 0.2s;
}
.protomiq-video-toggle:hover {
	background: var(--wp--preset--color--primary);
}
.protomiq-video-toggle:focus-visible,
.protomiq-video-sound-button:focus-visible,
.protomiq-link-card:focus-within {
	outline: 3px solid var(--wp--preset--color--secondary);
	outline-offset: 3px;
}
.protomiq-video-toggle::before {
	content: "";
	width: 12px;
	height: 14px;
	border-inline: 4px solid currentColor;
}
.protomiq-video-toggle.is-paused::before {
	width: 0;
	height: 0;
	border-block: 8px solid transparent;
	border-inline-start: 13px solid currentColor;
	border-inline-end: 0;
	transform: translateX(2px);
}
@media (min-width: 901px) {
	.protomiq-xp.is-tabs {
		display: grid;
		grid-template-columns: 300px minmax(0, 1fr);
		column-gap: 56px; /* lint-allow: grid built from display:contents items — no single block owns this gap */
	}
	.protomiq-xp.is-tabs > .protomiq-xp-item {
		display: contents;
	}
	.protomiq-xp.is-tabs .protomiq-xp-tab {
		grid-column: 1;
		display: flex; /* rows stretch to share the panel's height; labels stay centred in them */
		align-items: center;
	}
	.protomiq-xp.is-tabs .protomiq-xp-panel {
		grid-column: 2;
		grid-row: 1 / span 6;
		align-self: start;
	}
}

/* Blog cards — posts with no featured image get the "protomiq." placeholder tile (as on /resources). */
.protomiq-news-card .wp-block-post-featured-image {
	overflow: hidden;
}
.protomiq-news-card .wp-block-post-title a {
	text-decoration: none;
}
.protomiq-news-card:not(:has(.wp-block-post-featured-image))::before,
.protomiq-listing-card:not(:has(.wp-block-post-featured-image))::before {
	content: "protomiq.";
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 18px;
	background:
		radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--wp--preset--color--secondary) 22%, transparent), transparent 60%),
		radial-gradient(color-mix(in srgb, var(--wp--preset--color--primary) 15%, transparent) 1px, transparent 1px) 0 0 / 16px 16px,
		var(--wp--preset--color--ice);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 40px; /* lint-allow: generated placeholder tile, no block carries it */
	letter-spacing: -0.04em;
}

/* CTA band — dot texture over the cta-glow gradient, faded top and bottom (decoration, no block). */
.protomiq-cta {
	position: relative;
	isolation: isolate;
}
.protomiq-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(color-mix(in srgb, var(--wp--preset--color--white) 14%, transparent) 1px, transparent 1.2px) 0 0 / 22px 22px;
	mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
}

@media (prefers-reduced-motion: reduce) {
	.protomiq-marquee.is-running .protomiq-marquee-track {
		animation: none;
	}
	.protomiq-xp-tab,
	.protomiq-more a::after,
	.wp-block-button.is-style-protomiq-link .wp-block-button__link::after {
		transition: none;
	}
}

/* ===== Product pages (batch 2) ===== */

/* Looping demo videos with the shared pause/play button (video-toggle.js). */
.protomiq-autoplay {
	position: relative;
}
.protomiq-product-video {
	flex-shrink: 0; /* keeps its column beside the hero text */
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--ice);
}

/* Step story — step-story.js adds .is-pinned above 900px: a sticky frame (built from the step images)
   beside steps that are each one screen tall. Below that, each step shows its own image. */
.protomiq-story.is-pinned {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	column-gap: 56px; /* lint-allow: two-column story built by JS around the step blocks — no block owns this gap */
}
.protomiq-story-visual {
	display: none;
}
.protomiq-story.is-pinned .protomiq-story-visual {
	grid-column: 1;
	grid-row: 1 / span 3;
	position: sticky;
	top: 121px; /* desktop header height */
	display: grid;
	place-items: center;
	height: calc(100vh - 121px);
}
.protomiq-story.is-pinned > .protomiq-step {
	grid-column: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: calc(100vh - 121px);
	margin-block-start: 0; /* lint-allow: grid rows replace the stacked blockGap while pinned */
}
.protomiq-story.is-pinned .protomiq-step-image {
	position: absolute; /* abspos: visually hidden, alt text still read in step order */
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}
@media (max-width: 1050px) {
	/* The header collapses to 77px at 1050px and below. */
	.protomiq-story.is-pinned .protomiq-story-visual {
		top: 77px;
		height: calc(100vh - 77px);
	}
	.protomiq-story.is-pinned > .protomiq-step {
		min-height: calc(100vh - 77px);
	}
}
.protomiq-story-frame {
	position: relative;
	width: min(710px, 100%);
	aspect-ratio: 1;
}
.protomiq-story-shot {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.5s ease;
}
.protomiq-story-shot.is-active {
	opacity: 1;
}
.protomiq-story-shot img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* FAQ — question on the left, round "+" marker on the right that turns into "×" when open (as the old site). */
.protomiq-faq-list summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	column-gap: 24px; /* lint-allow: summary is non-block markup inside core/details */
	list-style: none;
	cursor: pointer;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--lead); /* lint-allow: core/details has no separate summary font size */
	line-height: 1.5;
	letter-spacing: -0.02em;
}
.protomiq-faq-list summary::-webkit-details-marker {
	display: none;
}
.protomiq-faq-list summary::after {
	content: "+";
	flex: none;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 50%;
	font-weight: 400;
	transition: transform 0.25s;
}
.protomiq-faq-list details[open] > summary::after {
	transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
	.protomiq-story-shot,
	.protomiq-faq-list summary::after {
		transition: none;
	}
}

/* ===== Challenge pages (batch 3) ===== */

/* Photo hero — Andy's challenge card sits tilted over the photo, hanging off its lower-left edge. */
.protomiq-photo-hero-media {
	position: relative;
	flex-shrink: 0; /* keeps its column beside the headline */
}
.protomiq-hero-photo img {
	width: 100%;
	height: clamp(380px, 39vw, 570px);
}
.protomiq-hero-card {
	position: absolute; /* abspos overlay on the photo */
	left: -10%;
	top: 29%;
	width: 50%;
	margin-block: 0; /* abspos — anchored by top, not by blockGap */
	transform: rotate(3deg);
	transform-origin: left center;
	z-index: 2;
}
.protomiq-hero-card img {
	width: 100%;
	height: auto;
}
@media (max-width: 650px) {
	.protomiq-hero-photo img {
		height: 350px;
	}
	.protomiq-hero-card {
		left: -3%;
		top: auto;
		bottom: -14%;
		width: 58%;
	}
}

/* Product link cards — the title link is stretched over the whole card (one link, one tab stop). */
.protomiq-icon-tile {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--wp--preset--color--secondary) 14%, var(--wp--preset--color--white));
}
.protomiq-link-card {
	position: relative;
	transition: border-color 0.2s, background-color 0.2s;
}
.protomiq-link-card h2 a,
.protomiq-link-card h3 a,
.protomiq-link-cell h3 a {
	color: inherit;
	text-decoration: none;
}
.protomiq-link-card h2 a::after,
.protomiq-link-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.protomiq-link-card:hover {
	border-color: var(--wp--preset--color--accent) !important;
	background-color: color-mix(in srgb, var(--wp--preset--color--secondary) 6%, var(--wp--preset--color--white)) !important;
}
.protomiq-link-card h2 a:focus-visible,
.protomiq-link-card h3 a:focus-visible {
	outline: none;
}
.protomiq-card-more {
	display: flex;
	justify-content: space-between;
	margin-top: auto !important; /* lint-allow: pins "Learn More" to the bottom of equal-height cards */
}
.protomiq-card-more::after {
	content: "↗";
}

/* Related challenges — ruled link cells. */
.protomiq-link-cell h3 a:hover,
.protomiq-link-cell h3 a:focus-visible {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Quote band on navy — citation in the footer text colours (cite is non-block markup). */
.protomiq-quote-band cite {
	color: var(--wp--preset--color--footer-text);
}
.protomiq-quote-band cite strong {
	color: var(--wp--preset--color--white);
}

@media (prefers-reduced-motion: reduce) {
	.protomiq-link-card {
		transition: none;
	}
}

/* Challenge headlines balance their lines, as on the old pages. */
.protomiq-photo-hero h1,
.protomiq-statement h2,
.protomiq-product-cards h2,
.protomiq-link-row h2 {
	text-wrap: balance;
}

/* The IQ card's 12px top/bottom breathing room belongs to the IQ sections, not the challenge solution row. */
.protomiq-solution .aiq {
	padding-block: 0;
}

/* Page hero (index pages) — 30px dot grid over the page-hero-glow gradient (decoration, no block); box rules shared with .protomiq-hero. */
.protomiq-page-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent) 1px, transparent 1px) 0 0 / 30px 30px;
}
.protomiq-page-hero h1 {
	text-wrap: balance;
}

/* Challenge photo cards — the photo is clipped to the card's rounded corners. */
.protomiq-photo-card {
	overflow: hidden;
}

/* ===== Platform + company pages (batch 4) ===== */

/* Stack hero — text | media (spans both rows) / lede + button. One column at 900px and below,
   where auto-placement puts the media between the headline and the lede. */
@media (min-width: 901px) {
	.protomiq-stack-hero-grid {
		grid-template-columns: minmax(0, 598fr) minmax(0, 670fr) !important;
		column-gap: 56px; /* lint-allow: grid rows touch, columns are 56px apart — blockGap is one value for both axes */
	}
}
.protomiq-stack-hero-media {
	align-self: center;
	overflow: hidden;
	background: var(--wp--preset--color--primary);
}
.protomiq-stack-hero-media video {
	width: 100%;
}

/* "Turn sound on" pill on explainer videos (video-sound.js), as on staging. */
.protomiq-video-sound {
	position: relative;
}
.protomiq-video-sound-button {
	position: absolute;
	inset-block-start: 20px;
	inset-inline-end: 20px;
	z-index: 2;
	padding: 12px 18px;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--white) 53%, transparent);
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--sm); /* lint-allow: script-built button, not block markup */
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
}
.protomiq-video-sound-button:hover {
	background: var(--wp--preset--color--primary-hover);
}
.protomiq-video-sound-button[hidden] {
	display: none;
}

/* Hero dot texture (Platform, as on staging): teal glow top right, a 25px dot grid fading in from the left, and a
   brighter dot layer that shows around the pointer (hero-dots.js sets --pointer-x / --pointer-y). Decorative. */
.protomiq-hero-dots {
	position: relative;
	isolation: isolate;
	background: radial-gradient(ellipse at 95% 18%, color-mix(in srgb, var(--wp--preset--color--secondary) 13%, transparent), transparent 60%);
}
.protomiq-hero-dots::before,
.protomiq-hero-dots::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-size: 25px 25px;
}
.protomiq-hero-dots::before {
	background-image: radial-gradient(circle, color-mix(in srgb, var(--wp--preset--color--accent) 23%, transparent) 1.5px, transparent 2px);
	mask-image: linear-gradient(90deg, transparent 35%, #000 100%); /* lint-allow: mask alpha, not a colour */
}
.protomiq-hero-dots::after {
	background-image: radial-gradient(circle, color-mix(in srgb, var(--wp--preset--color--accent) 31%, transparent) 3px, transparent 3.5px);
	mask-image: radial-gradient(circle 100px at var(--pointer-x, 90%) var(--pointer-y, 20%), #000, transparent); /* lint-allow: mask alpha */
	opacity: 0;
	transition: opacity 0.25s;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.protomiq-hero-dots:hover::after {
		opacity: 1;
	}
}

/* Experience tabs, "Compact tabs" block style: 260px tab column. */
@media (min-width: 901px) {
	.protomiq-xp.is-tabs.is-style-protomiq-tabs-compact {
		grid-template-columns: 260px minmax(0, 1fr);
	}
}

/* CTA band, "CTA light" style — no dot texture on white. */
.protomiq-cta.is-style-protomiq-cta-light::before {
	content: none;
}
.protomiq-cta.is-style-protomiq-cta-light {
	border-top: 1px solid var(--wp--preset--color--line); /* staging: hairline above the light join band */
}

/* Our Story hero photo fills its column at the old 608 × 571 proportion. */
.protomiq-photo-col {
	flex-shrink: 0; /* keeps its column beside the hero text */
}
.protomiq-cover-photo img {
	width: 100%;
	aspect-ratio: 608 / 571;
	max-height: 571px; /* its 1440 size: wider screens crop it wider instead of taller (staging: 830×554 at 1920) */
}

/* Card grid sections stop growing past staging's width (batch 10): the listing and team sections' content (pills,
   heading, grid, pagination) narrows to 1472px, centred, so cards stay ~470px (team photos ~349px) on big screens.
   Same as 1440 and below; the hero above keeps the full width, as on staging. */
@media (min-width: 1500px) {
	.protomiq-listing,
	.protomiq-team,
	.protomiq-card-grid {
		--wp--style--global--content-size: 1472px;
	}
}
/* Feature image beside an IQ section (AutoBio, Value Watch, Service Offers): stops at 640px, centred in its column,
   as on staging (no change at 1440, where the column is 630). */
.protomiq-iq .wp-block-image {
	max-width: 640px;
	margin-inline: auto;
}

/* Name cards — the lead word (PRO / TOMOS / IQ) sits on its own line in the display face. */
.protomiq-name-card strong {
	display: block;
	margin-bottom: 6px; /* lint-allow: inline <strong> inside one paragraph block — no block margin control */
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xl); /* lint-allow: inline <strong> has no fontSize attribute */
	line-height: 1.5;
}

/* Careers mosaic — tall photo left, two small top right, one wide under them. */
@media (min-width: 651px) {
	.protomiq-mosaic {
		grid-template-columns: 3fr 2fr 2fr !important;
		align-items: start;
	}
}

/* Team photos sit on a pale backing while they load. */
.protomiq-person .wp-block-post-featured-image img {
	background: var(--wp--preset--color--mist);
}

/* Conversion pages — form card beside an aside (product list or hero text). */
.protomiq-form-aside,
.protomiq-plist h3 {
	flex-shrink: 0; /* keeps the fixed column and the 150px product name from being squeezed */
}
.protomiq-price-card .wp-block-buttons {
	margin-top: auto !important; /* lint-allow: pins "Learn more" to the bottom of equal-height price cards */
}
.protomiq-login-card::before {
	content: "↗";
	position: absolute;
	right: 26px;
	bottom: 22px;
	color: var(--wp--preset--color--accent);
}

/* Listings — topic filter pills (protomiq/term-filter). */
.protomiq-term-filter ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px; /* lint-allow: pill list rendered by render.php, no block gap */
	margin: 0;
	padding: 0;
	list-style: none;
}
.protomiq-term-filter a {
	display: inline-block;
	padding: 11px 20px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 50px;
	line-height: 1.2;
	font-size: var(--wp--preset--font-size--sm); /* lint-allow: pills are render.php markup, not blocks */
	font-weight: 500;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	transition: border-color 0.2s, background-color 0.2s;
}
.protomiq-term-filter a:hover,
.protomiq-term-filter a:focus-visible {
	border-color: var(--wp--preset--color--primary);
}
.protomiq-term-filter a[aria-current="page"] {
	border-color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* Listing card — image (or the fallback panel) over a padded body; the title link covers the card. */
.protomiq-listing-card {
	overflow: hidden;
}
.protomiq-listing-card:not(:has(.wp-block-post-featured-image))::before {
	aspect-ratio: 1.55;
	border: 0;
	border-radius: 0;
	background-color: var(--wp--preset--color--mist);
}
.protomiq-card-read::after {
	content: " ↗";
}

/* Listing pagination — plain links as on the old site; current page unlinked. */
.protomiq-pagination {
	margin-top: 42px !important; /* lint-allow: query-pagination has no margin support; overrides the query's flow gap */
}
.protomiq-pagination .page-numbers,
.protomiq-pagination a {
	padding: 8px;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}
.protomiq-pagination .page-numbers.current {
	font-weight: 700;
}
.protomiq-pagination a:hover,
.protomiq-pagination a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Single posts / case studies — imported article headings carry no fontSize, so h2 steps down from the section size. */
.protomiq-single-content h2:not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--title); /* lint-allow: imported post-content headings have no fontSize attribute */
}
.protomiq-single-content h4:not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--md-lg); /* lint-allow: imported post-content headings have no fontSize attribute */
	line-height: 1.02;
}
.protomiq-single-content {
	overflow-wrap: break-word; /* long URLs in legal text */
}
.protomiq-single-content :where(ul, ol):not([class*="-font-size"]) > li {
	font-size: var(--wp--preset--font-size--md); /* lint-allow: imported article lists (old site 16 / 1.5) have no fontSize attribute */
}
.protomiq-single-content li {
	line-height: 1.5;
}
.protomiq-single-content :where(ul, ol) {
	padding-inline-start: 1.3em; /* old site indent (20.8px at 16px) — nested legal lists stay readable on phones */
}
.protomiq-single-content li + li,
.protomiq-single-content li > :where(ul, ol) {
	margin-top: 1em; /* lint-allow: list-item spacing inside imported legal / article text (old site 1em) */
}
.protomiq-single-content :where(h2, h3, h4) {
	margin-top: 1.6em; /* lint-allow: article rhythm for imported post content (old site 1.6em above headings) */
}

/* Text page template (legal pages) — prose rhythm between blocks, as `.single` gets in global.css. */
.page-template-page-text .entry-content > * + *:not(.alignfull) {
	margin-block-start: var(--wp--style--block-gap); /* lint-allow: prose rhythm for the Text page template (global.css zeroes top-level margins for section pages) */
	margin-block-end: 0;
}

/* Highlighted words in headlines and stat suffixes (batch 11, brand): a Deep Navy → Teal gradient instead of solid
   teal, running continuously across the whole highlight (an inline box slices one background across its lines).
   Only the light-background highlight (accent); highlights on navy bands use secondary and stay solid teal. The
   teal end (#00C7C3) is below 3:1 on white — Mike's call (Oct 28). Forced colours fall back to plain text. */
:is(h1, h2, h3, h4) mark.has-accent-color,
.protomiq-count mark.has-accent-color {
	background-image: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
@media (forced-colors: active) {
	:is(h1, h2, h3, h4) mark.has-accent-color,
	.protomiq-count mark.has-accent-color {
		background-image: none;
		-webkit-text-fill-color: currentColor;
	}
}

/* Heading line-wrapping — matches the old site: section h2s balance their lines; CTA bands, Home's process row, card
   titles, article text and the challenge pages' card / FAQ / related sections wrap normally. H1s balance on the
   challenge heroes, index / listing heroes and single pages; Home's hero uses "pretty". */
main h2 {
	text-wrap: balance;
}
.protomiq-cta h2,
.protomiq-process h2,
.protomiq-form-card h2,
.protomiq-listing-card h2,
.protomiq-event-card h2,
.protomiq-team h2,
.protomiq-single-content h2,
main:has(.protomiq-photo-hero) :is(.protomiq-product-cards, .protomiq-faq, .protomiq-link-row) h2 {
	text-wrap: wrap;
}
.protomiq-photo-hero h1,
.protomiq-page-hero h1,
main h1.wp-block-post-title {
	text-wrap: balance;
}
.protomiq-hero h1 {
	text-wrap: pretty;
}

/* ===== Motion (batch 8) ===== */

/* Page-to-page cross-fade (cross-document View Transitions; browsers without it navigate normally). Header and footer
   keep their own names so they hold still while the content fades. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}
	::view-transition-old(root),
	::view-transition-new(root) {
		animation-duration: 0.25s;
	}
	header.wp-block-template-part {
		view-transition-name: protomiq-header;
	}
	footer.wp-block-template-part {
		view-transition-name: protomiq-footer;
	}
}

/* Card hover — lift + deeper shadow on link cards, a slight image zoom on cards with photos. Pointer devices only
   (no stuck states on touch); keyboard focus inside a card gets the same treatment. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.protomiq-link-card,
	.protomiq-price-card {
		transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s, background-color 0.2s;
	}
	.protomiq-link-card:is(:hover, :focus-within),
	.protomiq-price-card:is(:hover, :focus-within) {
		transform: translateY(-4px);
		box-shadow: 0 16px 36px color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent) !important; /* lint-allow: cards carry the card shadow inline from the block */
	}
	.protomiq-listing-card .wp-block-post-featured-image,
	.protomiq-link-card .wp-block-image,
	.protomiq-news-card .wp-block-post-featured-image,
	.protomiq-person .wp-block-post-featured-image {
		overflow: hidden;
	}
	.protomiq-listing-card img,
	.protomiq-link-card .wp-block-image img,
	.protomiq-news-card .wp-block-post-featured-image img,
	.protomiq-person .wp-block-post-featured-image img {
		transition: transform 0.4s ease;
	}
	.protomiq-listing-card:is(:hover, :focus-within) img,
	.protomiq-link-card:is(:hover, :focus-within) .wp-block-image img,
	.protomiq-news-card:is(:hover, :focus-within) .wp-block-post-featured-image img,
	.protomiq-person:hover .wp-block-post-featured-image img {
		transform: scale(1.03);
	}
}

/* Pricing — matches the live page (Sam, Nov 23): light hero gradient; navy form card with a teal glow at its foot (the
   HubSpot form's labels are white, so it needs the dark card); 3 × 2 navy product tiles. */
.protomiq-pricing-hero {
	position: relative;
	background: linear-gradient(var(--wp--preset--color--mist) 0%, var(--wp--preset--color--white) 39%);
}
/* Live's animated dot cluster, bottom left behind the hero text (decorative; the SVG stops blinking under reduced motion). */
.protomiq-pricing-hero::before {
	content: "";
	position: absolute;
	top: 594px;
	left: -119px;
	width: 505px;
	height: 505px;
	background: url("../images/dot-cluster-animated.svg") no-repeat center / contain;
	pointer-events: none;
}
.protomiq-pricing-hero > * {
	position: relative;
}
@media (max-width: 900px) {
	.protomiq-pricing-hero::before {
		display: none;
	}
}
.protomiq-pricing-form {
	background-image: radial-gradient(550px 320px at 50% 100%, var(--wp--preset--color--secondary) 0%, color-mix(in srgb, var(--wp--preset--color--secondary) 35%, transparent) 40%, transparent 70%);
	box-shadow: 0 30px 90px -10px color-mix(in srgb, var(--wp--preset--color--primary) 35%, transparent);
}
.protomiq-pricing-form a {
	color: inherit;
	text-decoration: underline;
}
