/*
 * Section wrapper is transparent — bg/text come from the wrapping block's
 * tone variation (selected via the Styles panel; theme.json paints via
 * styles/blocks/tone-*.json) or, for the default, the body's root colours.
 */
.solutions-list {
	padding-block: var(--wp--preset--spacing--section);
	padding-inline: var(--wp--preset--spacing--stack);
}

.solutions-list__intro,
.solutions-list__featured,
.solutions-list__grid {
	max-width: 1340px;
	margin-inline: auto;
}

.solutions-list__intro {
	max-width: 760px;
	margin-bottom: var(--wp--preset--spacing--flow-lg);
}

.solutions-list__heading {
	margin: 0.75rem 0 1.25rem;
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.035em;
}

.solutions-list__intro-body {
	margin: 0;
	font-size: clamp(1rem, 1.05rem + 0.2vw, 1.15rem);
	line-height: 1.65;
	font-weight: 300;
	color: var(--text-muted);
}

/* --- Featured card ---
 * Background + text come from the resolved tone class (or the --light variant).
 * Tone CSS vars (--accent, --text-muted, --hairline) are already re-scoped by
 * tokens.css for each is-style-tone-* class, so internal accents adapt
 * automatically across tones.
 */
.solutions-list__featured {
	position: relative;
	border-radius: 8px;
	padding: clamp(2.25rem, 5vw, 4rem);
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
	overflow: hidden;
	isolation: isolate;
	/* Live coords for the cursor-following accent glow; defaults park it off-screen. */
	--mx: -50%;
	--my: -50%;
}

.solutions-list__featured.is-style-tone-deep-green {
	background: var(--wp--preset--color--deep-green);
	color: var(--wp--preset--color--off-white);
}

.solutions-list__featured.is-style-tone-burgundy {
	background: var(--wp--preset--color--burgundy);
	color: var(--wp--preset--color--off-white);
}

.solutions-list__featured.is-style-tone-cyan-pale {
	background: var(--wp--preset--color--cyan-pale);
	color: var(--wp--preset--color--deep-green);
}

.solutions-list__featured.is-style-tone-lime {
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--deep-green);
}

.solutions-list__featured.is-style-tone-coral {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--deep-green);
}

.solutions-list__featured--light {
	/* Reset CSS vars so we don't inherit a dark-tone wrapper's overrides
	   (e.g. off-white text-muted bleeding into a light card). */
	--accent: var(--wp--preset--color--coral-ink);
	--text-muted: var(--color-ink-muted);
	--text-faint: rgba(0, 51, 48, 0.55);
	--hairline: var(--color-hairline);
	background: var(--wp--preset--color--off-white);
	color: var(--wp--preset--color--deep-green);
	border: 1px solid var(--hairline);
}

/* Featured-card heading colour. The wrapping block's tone (applied via
   theme.json) paints h1–h6 directly with higher specificity than colour
   inheritance, so we override per featured-tone here. The `a` selector
   forces the title link too (its `color: inherit` rule needs a heading
   colour to inherit from). */
.solutions-list__featured.is-style-tone-deep-green .solutions-list__featured-title,
.solutions-list__featured.is-style-tone-deep-green .solutions-list__featured-title a,
.solutions-list__featured.is-style-tone-burgundy .solutions-list__featured-title,
.solutions-list__featured.is-style-tone-burgundy .solutions-list__featured-title a {
	color: var(--wp--preset--color--off-white);
}

.solutions-list__featured.is-style-tone-cyan-pale .solutions-list__featured-title,
.solutions-list__featured.is-style-tone-cyan-pale .solutions-list__featured-title a,
.solutions-list__featured.is-style-tone-lime .solutions-list__featured-title,
.solutions-list__featured.is-style-tone-lime .solutions-list__featured-title a,
.solutions-list__featured.is-style-tone-coral .solutions-list__featured-title,
.solutions-list__featured.is-style-tone-coral .solutions-list__featured-title a,
.solutions-list__featured--light .solutions-list__featured-title,
.solutions-list__featured--light .solutions-list__featured-title a {
	color: var(--wp--preset--color--deep-green);
}

/* Soft cursor-tracking accent — visible only on hover. Tints with the tone. */
.solutions-list__featured::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		560px circle at var(--mx) var(--my),
		color-mix(in srgb, var(--accent) 22%, transparent),
		transparent 55%
	);
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
	z-index: 0;
}

.solutions-list__featured:hover::before,
.solutions-list__featured:focus-within::before {
	opacity: 1;
}

.solutions-list__featured-inner,
.solutions-list__featured-meta {
	position: relative;
	z-index: 1;
}

.solutions-list__featured-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: clamp(1.5rem, 3vw, 3rem);
	align-items: stretch;
}

/* When the featured page has a WP featured image, give the image equal weight. */
.solutions-list__featured.has-image .solutions-list__featured-inner {
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
}

.solutions-list__featured-media {
	margin: 0;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	box-shadow: 0 18px 60px -30px rgba(0, 0, 0, 0.45);
	position: relative;
}

.solutions-list__featured-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.solutions-list__featured:hover .solutions-list__featured-img,
.solutions-list__featured:focus-within .solutions-list__featured-img {
	transform: scale(1.03);
}

/* Subtle vignette overlay so the image stays grounded in the deep-green card. */
.solutions-list__featured-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(0, 51, 48, 0.35) 100%);
	pointer-events: none;
}

.solutions-list__featured-copy {
	max-width: 56ch;
}

.solutions-list__card-eyebrow,
.solutions-list__featured .is-style-eyebrow-rule {
	margin: 0;
}

/* --- Type chip (Platform / Service) --- */
.solutions-list__type {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.25rem 0.55rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.14em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--wp--preset--color--digital-cyan-ink);
	background: transparent;
}

/* In a toned section the chip text/border ride on --accent (which tokens.css
   re-scopes per tone). Featured-card override below sets the same. */
:where(.is-style-tone-deep-green, .is-style-tone-burgundy, .is-style-tone-cyan-pale, .is-style-tone-lime, .is-style-tone-coral) .solutions-list__type {
	color: var(--accent);
}

.solutions-list__type--platform::before {
	content: "";
	width: 0.4em;
	height: 0.4em;
	border-radius: 999px;
	background: currentColor;
}

.solutions-list__featured .solutions-list__type,
.solutions-list__featured .solutions-list__card-cat {
	color: var(--accent);
}

.solutions-list__featured .solutions-list__num {
	color: currentColor;
}

/* Light variant uses the design system's standard ink-accent rather than the
   tonal --accent, which pairs better against the off-white panel. */
.solutions-list__featured--light .solutions-list__type,
.solutions-list__featured--light .solutions-list__card-cat {
	color: var(--wp--preset--color--digital-cyan-ink);
}

.solutions-list__featured-title {
	margin: 1.5rem 0 0;
	font-size: clamp(2.25rem, 5vw, 3.75rem);
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.035em;
}

.solutions-list__featured-title a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(to right, currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.35s ease;
}

.solutions-list__featured-title a:hover,
.solutions-list__featured-title a:focus-visible {
	background-size: 100% 1px;
}

.solutions-list__featured-title em {
	font-style: normal;
	color: var(--accent);
}

.solutions-list__featured--light .solutions-list__featured-title em {
	color: var(--wp--preset--color--digital-cyan-ink);
}

.solutions-list__featured-lede {
	margin: 1.5rem 0 0;
	max-width: 50ch;
	font-size: clamp(1.05rem, 1.1rem + 0.2vw, 1.2rem);
	font-weight: 300;
	line-height: 1.55;
	color: var(--text-muted);
}

.solutions-list__featured-cta {
	margin-top: 2.25rem;
}

.solutions-list__featured-meta {
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	min-width: 6ch;
	border-left: 1px solid var(--hairline);
	padding-left: clamp(1.25rem, 2.5vw, 2.25rem);
}

.solutions-list__featured-mark {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(3.5rem, 8vw, 6rem);
	font-weight: 400;
	letter-spacing: -0.04em;
	line-height: 0.9;
	color: var(--accent);
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.solutions-list__featured--light .solutions-list__featured-mark {
	color: var(--wp--preset--color--digital-cyan-ink);
}

.solutions-list__featured:hover .solutions-list__featured-mark,
.solutions-list__featured:focus-within .solutions-list__featured-mark {
	transform: translateY(-0.2rem) rotate(-2deg);
}

@media (max-width: 720px) {
	.solutions-list__featured-inner,
	.solutions-list__featured.has-image .solutions-list__featured-inner {
		grid-template-columns: 1fr;
	}

	.solutions-list__featured-meta {
		display: none;
	}

	.solutions-list__featured-media {
		aspect-ratio: 16 / 10;
		order: -1;
		margin-bottom: 0.5rem;
	}
}

/* --- Grid cards --- */
.solutions-list__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 2vw, 1.75rem);
}

@media (max-width: 960px) {
	.solutions-list__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
	.solutions-list__grid { grid-template-columns: 1fr; }
}

.solutions-list__card {
	position: relative;
	border: 1px solid var(--hairline);
	border-radius: 6px;
	background: transparent;
	transition: border-color 0.4s ease,
	            box-shadow 0.4s ease,
	            transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.solutions-list__card:hover,
.solutions-list__card:focus-within {
	border-color: currentColor;
	/* Inset shadow layers a hover wash on top of any panel background
	   without replacing it, so toned grid cards keep their colour. */
	box-shadow: inset 0 0 0 100vh color-mix(in srgb, currentColor 5%, transparent);
	transform: translateY(-2px);
}

/* Tone-painted grid cards (per the "Grid card tone" ACF field). The
   is-style-tone-* class re-scopes --accent / --text-muted / --hairline
   via tokens.css; we just paint background + text colour here. */
.solutions-list__card.is-style-tone-deep-green {
	background: var(--wp--preset--color--deep-green);
	color: var(--wp--preset--color--off-white);
}

.solutions-list__card.is-style-tone-burgundy {
	background: var(--wp--preset--color--burgundy);
	color: var(--wp--preset--color--off-white);
}

.solutions-list__card.is-style-tone-cyan-pale {
	background: var(--wp--preset--color--cyan-pale);
	color: var(--wp--preset--color--deep-green);
}

.solutions-list__card.is-style-tone-lime {
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--deep-green);
}

.solutions-list__card.is-style-tone-coral {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--deep-green);
}

.solutions-list__card--light {
	/* Reset CSS vars locally so a light card inside a dark wrapper doesn't
	   inherit the wrapper's muted/hairline values (which are tuned for a
	   dark panel and would be invisible on off-white). */
	--accent: var(--wp--preset--color--coral-ink);
	--text-muted: var(--color-ink-muted);
	--text-faint: rgba(0, 51, 48, 0.55);
	--hairline: var(--color-hairline);
	background: var(--wp--preset--color--off-white);
	color: var(--wp--preset--color--deep-green);
}

@media (prefers-reduced-motion: reduce) {
	.solutions-list__card {
		opacity: 1;
		transform: none;
	}
}

/* The whole card is a single anchor; the wrapping <a> must NOT pick up
   theme.json's variation link colour (or its hover/visited variants) —
   otherwise the num + chip + "Explore" all read as link colour and we
   lose the card text. Chained selector beats theme.json's link rule. */
.solutions-list__card .solutions-list__card-link,
.solutions-list__card .solutions-list__card-link:hover,
.solutions-list__card .solutions-list__card-link:focus-visible,
.solutions-list__card .solutions-list__card-link:visited {
	color: inherit;
	text-decoration: none;
}

.solutions-list__card-link {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: clamp(1.5rem, 2.5vw, 2.25rem);
	height: 100%;
}

.solutions-list__card-head {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
	/* Children override their own colour — no fallback needed. */
}

.solutions-list__num {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.35rem;
	font-weight: 400;
	letter-spacing: -0.02em;
	color: currentColor;
	text-transform: none;
}

.solutions-list__card-cat {
	color: var(--wp--preset--color--digital-cyan-ink);
}

:where(.is-style-tone-deep-green, .is-style-tone-burgundy, .is-style-tone-cyan-pale, .is-style-tone-lime, .is-style-tone-coral) .solutions-list__card-cat {
	color: var(--accent);
}

.solutions-list__card-title {
	margin: 0;
	font-size: clamp(1.5rem, 2vw, 1.85rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

/* When the section is toned, theme.json paints h1–h6 from the WRAPPER tone
   (off-white on burgundy/deep-green). If a grid card is in a contrasting
   tone (e.g. cyan-pale card inside burgundy section), the text-fallback
   title disappears. Override per grid-card tone with higher specificity. */
.solutions-list__card.is-style-tone-deep-green .solutions-list__card-title,
.solutions-list__card.is-style-tone-burgundy   .solutions-list__card-title {
	color: var(--wp--preset--color--off-white);
}

.solutions-list__card.is-style-tone-cyan-pale .solutions-list__card-title,
.solutions-list__card.is-style-tone-lime      .solutions-list__card-title,
.solutions-list__card.is-style-tone-coral     .solutions-list__card-title,
.solutions-list__card--light                  .solutions-list__card-title {
	color: var(--wp--preset--color--deep-green);
}

.solutions-list__card-one {
	margin: 0;
	font-size: 1rem;
	line-height: 1.55;
	font-weight: 300;
	color: var(--text-muted);
	flex-grow: 1;
}

.solutions-list__card-one em {
	font-style: normal;
	color: var(--wp--preset--color--digital-cyan-ink);
}

:where(.is-style-tone-deep-green, .is-style-tone-burgundy, .is-style-tone-cyan-pale, .is-style-tone-lime, .is-style-tone-coral) .solutions-list__card-one em {
	color: var(--accent);
}

.solutions-list__card-more {
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid var(--hairline);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: currentColor;
}

.solutions-list__card-more span[aria-hidden] {
	display: inline-block;
	margin-left: 0.2em;
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.solutions-list__card-link:hover .solutions-list__card-more,
.solutions-list__card-link:focus-visible .solutions-list__card-more {
	color: var(--wp--preset--color--digital-cyan-ink);
}

:where(.is-style-tone-deep-green, .is-style-tone-burgundy, .is-style-tone-cyan-pale, .is-style-tone-lime, .is-style-tone-coral) .solutions-list__card-link:hover .solutions-list__card-more,
:where(.is-style-tone-deep-green, .is-style-tone-burgundy, .is-style-tone-cyan-pale, .is-style-tone-lime, .is-style-tone-coral) .solutions-list__card-link:focus-visible .solutions-list__card-more {
	color: var(--accent);
}

.solutions-list__card-link:hover .solutions-list__card-more span[aria-hidden],
.solutions-list__card-link:focus-visible .solutions-list__card-more span[aria-hidden] {
	transform: translateX(0.35rem);
}

/* Featured CTA — same arrow slide. */
.solutions-list__featured-cta .wp-block-button__link::after {
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.solutions-list__featured:hover .solutions-list__featured-cta .wp-block-button__link::after,
.solutions-list__featured:focus-within .solutions-list__featured-cta .wp-block-button__link::after {
	transform: translateX(0.35rem);
}

.solutions-list__empty {
	max-width: 1340px;
	margin: 0 auto;
	padding: 2rem;
	border: 1px dashed var(--hairline);
	font-size: 0.95rem;
	color: rgba(0, 51, 48, 0.7);
}

/* Sub-brand wordmark stamps. -----------------------------------------------
   Fill is baked into the inline SVG via the variant arg (dark = #0a0a0a,
   light = #fff). No `color:` override needed here — the SVG carries its
   own ink. Keeping things explicit so editors don't get surprises. */

.solutions-list__brandmark {
	display: block;
	margin: 0;
	line-height: 0;
}

.solutions-list__brandmark-svg {
	display: block;
	width: auto;
	max-width: 100%;
}

/* Grid card — the wordmark is the title (sits in <h3>), so the chip strip
   above acts as the eyebrow and the wordmark dominates the card. */
.solutions-list__card-title--brand {
	display: block;
	margin: 0.85rem 0 1rem;
	font-size: 0;
	line-height: 0;
}

.solutions-list__card-title--brand .solutions-list__brandmark-svg {
	display: block;
	width: auto;
	height: 2.65rem;
	max-width: 17.6rem;
}

@media (max-width: 720px) {
	.solutions-list__card-title--brand .solutions-list__brandmark-svg {
		height: 2.05rem;
		max-width: 14.3rem;
	}
}

/* Featured card — wordmark in the copy column when there's an image
   alongside; sits big and proud above the chip strip. */
.solutions-list__brandmark--featured {
	margin-bottom: 1.75rem;
}

.solutions-list__brandmark--featured .solutions-list__brandmark-svg {
	height: 3.3rem;
	max-width: 24.2rem;
}

/* Featured card without image — large wordmark fills the meta aside. */
.solutions-list__featured-mark--brand {
	display: block;
	width: 100%;
}

.solutions-list__featured-mark--brand .solutions-list__brandmark-svg {
	height: auto;
	width: 100%;
	max-width: 28.6rem;
}

@media (max-width: 720px) {
	.solutions-list__brandmark--card .solutions-list__brandmark-svg {
		height: 1.65rem;
		max-width: 12.1rem;
	}
	.solutions-list__brandmark--featured .solutions-list__brandmark-svg {
		height: 2.5rem;
		max-width: 17.6rem;
	}
}
