/**
 * Shared section styles from the design (design/html/site/assets/site.css):
 * eyebrow rule, gradient highlight in headings, page hero, cards, the CTA
 * panel and arrow links. Loaded with core/group, which every page uses.
 */

/* stylelint-disable no-descending-specificity --
 * Hover/breakpoint overrides deliberately follow their base rules. */

/* ---------- Eyebrow (design: .eyebrow) ---------- */

.is-style-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
}

.is-style-eyebrow.has-text-align-center {
	justify-content: center;
}

.is-style-eyebrow::before {
	content: "";
	flex: none;
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--gradient--brand);
}

/* Category links inside an eyebrow stay label-coloured. */
.wp-block-post-terms.is-style-eyebrow a {
	color: inherit;
	text-decoration: none;
}

/* ---------- Gradient word (design: .gradient-word) ----------
 * Highlight text in a heading with the "Blue" colour to get the brand
 * gradient used across the design. */
:is(h1, h2, h3, .ac-home-hero__title) mark.has-blue-color {
	background: var(--wp--preset--gradient--brand);
	background-clip: text;
	-webkit-background-clip: text;

	/* .has-blue-color sets color with !important; the fill colour wins
	 * without !important and still falls back to blue where unsupported. */
	-webkit-text-fill-color: transparent;
}

/* ---------- Page hero (design: .page-hero) ---------- */

.ac-page-hero {
	border-bottom: 1px solid var(--wp--preset--color--line);
	overflow: hidden;
	text-align: center;
}

.ac-page-hero .wp-block-heading,
.ac-page-hero .wp-block-post-title,
.ac-page-hero .wp-block-query-title {
	margin-block: 21px 23px;
	letter-spacing: -0.075em;
	line-height: 1.08;
}

.ac-page-hero .ac-page-hero__intro {
	max-width: 690px;
	margin-inline: auto;
	line-height: 1.85;
}

/* Long titles (single posts) use the section-heading size, not display. */
.ac-page-hero--post .wp-block-post-title {
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.12;
}

.ac-page-hero__meta {
	justify-content: center;
	gap: 8px 16px;
}

/* ---------- Cards (group style "card"; design: .card) ---------- */

.wp-block-group.is-style-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	transition: transform 0.2s, box-shadow 0.2s;
}

.wp-block-group.is-style-card:hover {
	box-shadow: var(--wp--preset--shadow--card);
	transform: translateY(-3px);
}

/* Cards in a query grid fill their row, so "Read article" lines up. */
.wp-block-post-template > li > .wp-block-group.is-style-card {
	height: 100%;
}

.wp-block-group.is-style-card .wp-block-post-title {
	margin: 8px 0 0;
}

.wp-block-group.is-style-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.wp-block-group.is-style-card .wp-block-post-excerpt__excerpt {
	margin: 0;
	line-height: 1.78;
}

.wp-block-group.is-style-card > .wp-block-read-more,
.wp-block-group.is-style-card > :last-child.ac-arrow-link {
	margin-top: auto;
}

/* Case study cards: a "Case study" label like the testimonials' "Client
 * story" (the design's .case-illustration was an empty tile with a ◇ that
 * read as a placeholder; user-approved consistency pass 2026-11-10). */
.ac-case-card::before {
	content: "Case study" / "";
	display: block;
	margin-bottom: 14px;
	color: var(--wp--preset--color--label);
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: var(--wp--custom--font-weight--heading);
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

/* Testimonial cards: quote mark, quote, client name. */
.ac-testimonial-card::before {
	content: "“" / "";
	color: var(--wp--preset--color--blue);
	font-size: 48px;
	font-weight: var(--wp--custom--font-weight--heading);
	line-height: 0.8;
}

.ac-testimonial-card .wp-block-post-excerpt__excerpt {
	line-height: 1.75;
}

.ac-testimonial-card .wp-block-post-title {
	margin-top: auto;
	padding-top: 12px;
	color: var(--wp--preset--color--label);
}

/* ---------- Arrow link (design: .small-link) ---------- */

.ac-arrow-link,
.wp-block-read-more.ac-arrow-link {
	color: var(--wp--preset--color--blue);
	font-size: var(--wp--preset--font-size--base);
	font-weight: var(--wp--custom--font-weight--label);
	text-decoration: none;
}

/* The arrow is glued to the last word with a no-break space, so a wrapping
 * link never leaves it alone on a line; it stays inline and slides on hover
 * with `left` (style.css), which works on inline boxes. */
.ac-arrow-link::after {
	content: "\00a0→" / "";
	position: relative;
	left: 0;
}

/* Design site.css .small-link:hover (homepage and cloud page override). */
.ac-arrow-link:has(> a:hover),
.ac-arrow-link a:hover,
.wp-block-read-more.ac-arrow-link:hover {
	color: var(--wp--custom--hover--small-link);
}

/* ---------- CTA panel (design: .cta-panel) ---------- */

.ac-cta-panel {
	text-align: center;
}

.ac-cta-panel .wp-block-heading {
	margin-block: 15px;
	letter-spacing: -0.07em;
}

.ac-cta-panel .ac-cta-panel__text {
	max-width: 660px;
	margin: 0 auto 24px;
	line-height: 1.75;
}

/* ---------- Query pagination ---------- */

.ac-pagination {
	gap: 8px;
	margin-top: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: var(--wp--custom--font-weight--label);
}

.ac-pagination a,
.ac-pagination .page-numbers {
	padding: 8px 12px;
	border-radius: var(--wp--preset--border-radius--sm);
	color: var(--wp--preset--color--body);
	text-decoration: none;
}

.ac-pagination .page-numbers.current {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--blue);
}

@media (prefers-reduced-motion: reduce) {

	.wp-block-group.is-style-card {
		transition: none;
	}
}

/* ==========================================================================
 * Site-wide consistency pass (user: "implement the similar for other pages",
 * 2026-11-10; mapping.md).
 * ========================================================================== */

/* Services hub: seven cards; the last one sits centred instead of alone at
 * the left of its row (three columns from 901px, two from 601px). */
@media (min-width: 901px) {

	.wp-block-group.ac-services-hub__grid:not(.ac-directory__grid).is-layout-grid > :last-child:nth-child(3n+1) {
		grid-column: 2;
	}
}

@media (min-width: 601px) and (max-width: 900px) {

	.wp-block-group.ac-services-hub__grid:not(.ac-directory__grid).is-layout-grid > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
		justify-self: center;
		width: calc(50% - 9px);
	}
}

/* Contact cards: left-aligned like every other card; values one size down
 * so the email address fits on one line. */
.wp-block-group.is-style-card.ac-contact-card {
	align-items: flex-start;
}

.wp-block-group.ac-contact-card .has-text-align-center {
	text-align: left;
}

.wp-block-group.ac-contact-card .ac-contact-card__value {
	font-size: var(--wp--preset--font-size--large);
}

/* About hero tagline: ink, not link blue (it isn't a link). */
.ac-page-hero .ac-about-tagline {
	color: var(--wp--preset--color--ink);
}

/* Post cards (blog, categories, search, case studies): the primary category
 * only, so labels stay on one line and titles line up across a row. */
.wp-block-post-template .wp-block-post-terms a:not(:first-of-type),
.wp-block-post-template .wp-block-post-terms__separator {
	display: none;
}

/* Post cards: the featured image runs edge to edge across the top of the card
 * at the images' own shape (851x445), so nothing is cropped. Posts without
 * one start with their category, as before (an empty panel read as a
 * placeholder). */
.ac-posts-grid .wp-block-group.is-style-card > .ac-post-card__image {
	margin: calc(-1 * var(--wp--preset--spacing--40)) calc(-1 * var(--wp--preset--spacing--40)) 8px;
	overflow: hidden;
	border-radius: var(--wp--preset--border-radius--lg) var(--wp--preset--border-radius--lg) 0 0;
	background: var(--wp--preset--gradient--tint);
}

.ac-posts-grid .ac-post-card__image img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ac-posts-grid .wp-block-group.is-style-card:hover .ac-post-card__image img {
	transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {

	.ac-posts-grid .ac-post-card__image img {
		transition: none;
	}

	.ac-posts-grid .wp-block-group.is-style-card:hover .ac-post-card__image img {
		transform: none;
	}
}

/* Blog articles: in-article headings below the article title, sized like the
 * service pages' long-form text (H2 39px, H3 24px, H4 20px). FAQ
 * questions (Rank Math FAQ block, rendered as the accordion) are left to
 * the accordion's own styles. */
.single-post .wp-block-post-content h2:not([class*="-font-size"], .rank-math-question) {
	margin-top: 1.6em;
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.2;
}

.single-post .wp-block-post-content h3:not([class*="-font-size"], .rank-math-question) {
	margin-top: 1.4em;
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: var(--wp--custom--letter-spacing--snug);
}

.single-post .wp-block-post-content h4:not([class*="-font-size"], .rank-math-question) {
	font-size: var(--wp--preset--font-size--large);
}

/* ── Single post (templates/single.html), redesign 2026-11-10 ─────────
 * Header: breadcrumbs, title, author · date · reading time, left-aligned
 * on the article's grid. Body: article + sticky sidebar (table of
 * contents, expert card) from 1024px; below that one column, the
 * in-article contents and a bottom help bar. */

.ac-post-hero .wp-block-breadcrumbs {
	margin: 0 0 18px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.ac-post-hero .wp-block-breadcrumbs a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.ac-post-hero .wp-block-breadcrumbs a:hover,
.ac-post-hero .wp-block-breadcrumbs a:focus-visible {
	color: var(--wp--preset--color--blue);
	text-decoration: underline;
}

.ac-post-hero .ac-post-hero__title {
	max-width: 880px;
	margin: 0;
	letter-spacing: var(--wp--custom--letter-spacing--tight);
	line-height: 1.15;
	text-wrap: balance;
}

.wp-block-group.ac-post-hero__meta {
	gap: 6px 0;
	margin-top: 22px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* "By Name · October 9, 2026 · 20 min read" */
/* "Summarize this blog post with" links (AI summary block, Inline style) at
 * the bottom of the hero. */
.ac-post-hero .ac-post-hero__ai {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--wp--preset--color--line-blue);
}

.ac-post-hero__meta > * + *::before {
	content: "·" / "";
	margin-inline: 10px;
	color: var(--wp--preset--color--muted);
}

.ac-post-hero .ac-post-hero__author::before {
	content: "By ";
}

.ac-post-hero .ac-post-hero__author a {
	color: var(--wp--preset--color--ink);
	font-weight: var(--wp--custom--font-weight--label);
	text-decoration: none;
}

.ac-post-hero .ac-post-hero__author a:hover,
.ac-post-hero .ac-post-hero__author a:focus-visible {
	color: var(--wp--preset--color--blue);
}

/* Core prints "20 minutes": read as "20 minutes to read". */
.ac-post-hero .ac-post-hero__read::after {
	content: " to read";
}

/* Article column. */
.ac-post-layout .ac-post-layout__image {
	margin: 0 0 36px;
}

.ac-post-layout .ac-post-layout__image img {
	width: 100%;
	height: auto;
}

.ac-post-layout .ac-post-layout__content > * {
	max-width: 100%;
}

/* Sidebar card: blue gradient, white text, two stacked actions. */
.wp-block-group.ac-expert-card {
	padding: 24px 22px 20px;
	border-radius: var(--wp--preset--border-radius--lg);
	background: var(--wp--preset--gradient--brand);
	box-shadow: var(--wp--preset--shadow--button);
	color: var(--wp--preset--color--white);
}

.ac-expert-card .ac-expert-card__eyebrow {
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: var(--wp--custom--font-weight--heading);
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

.ac-expert-card .ac-expert-card__title {
	margin: 6px 0 8px;
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: var(--wp--custom--letter-spacing--snug);
	line-height: 1.2;
}

.ac-expert-card .ac-expert-card__text {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.92);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

.wp-block-buttons.ac-expert-card__actions {
	gap: 10px;
}

.ac-expert-card .ac-expert-card__call .wp-block-button__link {
	background: var(--wp--preset--color--white);
	box-shadow: none;
	color: var(--wp--preset--color--blue);
}

.ac-expert-card .ac-expert-card__form .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.75);
	background: transparent;
	color: var(--wp--preset--color--white);
}

.ac-expert-card .ac-expert-card__form .wp-block-button__link:hover,
.ac-expert-card .ac-expert-card__form .wp-block-button__link:focus-visible {
	border-color: var(--wp--preset--color--white);
	background: rgba(255, 255, 255, 0.12);
}

.ac-expert-card .ac-expert-card__note {
	margin: 12px 0 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: var(--wp--preset--font-size--tiny);
	text-align: center;
}

/* Callback panel: the form's note in small print. */
.wp-block-accountsconfidant-modal .ac-contact-panel__note {
	margin: 18px 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.55;
}

/* Phones: author on its own line, then date · reading time. */
@media (max-width: 600px) {

	.ac-post-hero .ac-post-hero__author {
		flex-basis: 100%;
	}

	.ac-post-hero .ac-post-hero__date::before {
		content: none;
	}
}

/* Bottom help bar: phones and tablets only. */
.wp-block-group.ac-post-bar {
	display: none;
}

@media (min-width: 1024px) {

	.wp-block-group.ac-post-layout__grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 48px;
		align-items: start;
	}

	.wp-block-group.ac-post-layout__grid > * {
		margin-block: 0;
	}

	/* The sidebar stays in view; its contents list scrolls inside it. */
	.wp-block-group.ac-post-layout__aside {
		position: sticky;
		top: 24px;
		display: flex;
		flex-direction: column;
		gap: 18px;
		max-height: calc(100vh - 48px);
	}

	.ac-post-layout__aside .wp-block-accountsconfidant-post-toc {
		flex: 0 1 auto;
	}

	.ac-post-layout__aside .ac-expert-card {
		flex: none;
		margin-block: 0;
	}

	/* The sidebar replaces the in-article contents on wide screens. */
	.ac-post-layout__grid:has(.wp-block-accountsconfidant-post-toc) .ac-post-layout__content .ac-toc {
		display: none;
	}
}

/* Header and body are 1300px wide, like the site header. On wide
 * screens the extra width goes to the sidebar and the gap, so the
 * article stays near a comfortable reading measure (~870px). */
@media (min-width: 1280px) {

	.wp-block-group.ac-post-layout__grid {
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: 72px;
	}
}

@media (max-width: 1023px) {

	.ac-post-layout__aside .wp-block-accountsconfidant-post-toc {
		display: none;
	}

	.wp-block-group.ac-post-layout__aside {
		margin-top: 40px;
	}

	.wp-block-group.ac-post-bar {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 90;
		display: block;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--wp--preset--color--line);
		background: rgba(255, 255, 255, 0.96);
		box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
		backdrop-filter: blur(8px);
	}

	.wp-block-buttons.ac-post-bar__actions {
		gap: 8px;
	}

	.ac-post-bar .wp-block-button {
		flex: 1 1 0;
	}

	.ac-post-bar .wp-block-button__link {
		width: 100%;
		min-height: 44px;
		padding: 10px 8px;
		font-size: var(--wp--preset--font-size--x-small);
	}

	/* Room for the bar under the footer. */
	.single-post .wp-site-blocks {
		padding-bottom: 72px;
	}
}
