/*
Theme Name: American Tax Services
Theme URI: https://americantaxservices.net/
Author: American Tax Services
Author URI: https://americantaxservices.net/
Description: A light, high-trust block theme for ATS Accounting & Tax Services. Editable in the Site Editor; palette, type scale and spacing are defined once in theme.json.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: american-tax-services
Tags: full-site-editing, block-patterns, block-styles, custom-colors, custom-menu, custom-logo, featured-images, accessibility-ready, one-column, wide-blocks
*/

/*
 * Shared / base styles owned by WP-01 (TECH-018): tokens, base, buttons, the fixed site chrome,
 * inner-page components, the CTA band and the footer. Home sections live in
 * assets/css/home-a.css (hero → advisors) and assets/css/home-b.css (testimonials → insights).
 *
 * The layout reproduces the approved HTML prototype 1:1. Its design tokens are aliased below to
 * the theme.json presets (TECH-002), so the prototype rules can keep their short names.
 *
 * Breakpoints (prototype): 1100px, 860px, 560px.
 */

/* ------------------------------------------------------------------
 * 1. Tokens and base
 * ---------------------------------------------------------------- */

:root {
	--navy-900: var(--wp--preset--color--navy-deep);
	--navy-800: var(--wp--preset--color--navy);
	--navy-700: var(--wp--preset--color--navy-2);
	--blue-600: var(--wp--preset--color--primary);
	--blue-500: var(--wp--preset--color--blue-500);
	--red-600: var(--wp--preset--color--accent);
	--red-700: var(--wp--preset--color--accent-dark);
	--red-400: var(--wp--preset--color--accent-light);
	--sky: var(--wp--preset--color--sky);
	--ink: var(--wp--preset--color--contrast);
	--muted: var(--wp--preset--color--muted);
	--line: var(--wp--preset--color--border);
	--bg-soft: var(--wp--preset--color--surface);
	--white: var(--wp--preset--color--base);
	--radius-lg: var(--wp--preset--border-radius--large);
	--radius: var(--wp--preset--border-radius--medium);
	--radius-sm: var(--wp--preset--border-radius--small);
	--shadow-card: var(--wp--preset--shadow--card);
	--shadow-lift: var(--wp--preset--shadow--card-hover);
	--font-head: var(--wp--preset--font-family--poppins);
	--font-body: var(--wp--preset--font-family--inter);
	--container: min(1200px, calc(100% - 48px));
	--topbar-h: 40px;
	--header-h: 80px;
	--chrome-h: calc(var(--topbar-h) + var(--header-h));
	--admin-bar-h: 0px;
}

.admin-bar {
	--admin-bar-h: 32px;
}

@media (max-width: 782px) {
	.admin-bar {
		--admin-bar-h: 46px;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + var(--admin-bar-h));
	-webkit-text-size-adjust: 100%;
}

/* Lenis (ats-theme.js) drives smooth scrolling when active; native smooth scrolling must be off then. */
html.lenis {
	scroll-behavior: auto;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Never set overflow-x: hidden on html/body (breaks the fixed header) — TECH-008. */
.wp-site-blocks {
	overflow-x: clip;
}

img,
video {
	max-width: 100%;
	height: auto;
}

button,
input,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
}

:focus-visible {
	outline: 3px solid var(--red-400);
	outline-offset: 3px;
	border-radius: 6px;
}

/* Core skip link (block themes) — visible on focus in brand colours. */
.skip-link.screen-reader-text:focus {
	background: var(--blue-600);
	color: #fff;
	border-radius: 8px;
	z-index: 999;
}

/* Full-bleed blocks sit flush: no flow-layout gap between the header, main, the sections and
 * the footer. Raw section markup (Custom HTML blocks) gets no block-gap margins either. */
.wp-site-blocks.wp-site-blocks > *,
.wp-site-blocks > main.wp-block-group > *,
.wp-block-template-part.wp-block-template-part > *,
.site-chrome.site-chrome > *,
.header-inner.header-inner > *,
.nav.nav > *,
.booking.booking > *,
.booking-inner.booking-inner > *,
.booking-form.booking-form > *,
.insights.insights > *,
.insights > .container > .ats-post-list,
.footer.footer > *,
.footer-grid.footer-grid > *,
.footer-brand.footer-brand > *,
.footer-col.footer-col > * {
	margin-block: 0;
}

/* Inner pages start below the fixed chrome; the home hero runs underneath it. */
body:not(.home) .wp-site-blocks > main {
	padding-top: var(--chrome-h);
}

.container {
	width: var(--container);
	max-width: none;
	margin-inline: auto;
}

.section {
	padding: 96px 0;
}

/* ------------------------------------------------------------------
 * 2. Utilities, eyebrow, buttons
 * ---------------------------------------------------------------- */

.ats-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Inline Lucide icons rendered by ats_the_icon() (REQ-026, TECH-023). Colour = currentColor. */
.ats-icon {
	display: block;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: inherit;
}

.ats-flag-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

/* Arrow text links ("View all", "Read more"): trailing Lucide arrow-right as a CSS mask (TECH-024). */
.ats-arrow-link a:not(.wp-element-button),
a.ats-arrow-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: var(--blue-600);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ats-arrow-link a:not(.wp-element-button):hover,
a.ats-arrow-link:hover {
	color: var(--red-600);
}

.ats-arrow-link a::after,
a.ats-arrow-link::after {
	content: "";
	display: inline-block;
	flex: none;
	width: 1.1em;
	height: 1.1em;
	background-color: currentColor;
	-webkit-mask: url(assets/icons/lucide/arrow-right.svg) center/contain no-repeat;
	mask: url(assets/icons/lucide/arrow-right.svg) center/contain no-repeat;
	transition: transform 0.2s ease;
}

.ats-arrow-link a:hover::after,
a.ats-arrow-link:hover::after {
	transform: translateX(3px);
}

.ats-muted {
	color: var(--muted);
}

/* Eyebrow: small red label led by a red triangle (prototype `.eyebrow`). `.ats-eyebrow` is the
 * block-content equivalent used by the page hero, blog and 404 templates. */
.eyebrow,
.ats-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	color: var(--red-600);
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: none;
}

.eyebrow::before,
.ats-eyebrow::before {
	content: "";
	width: 0;
	height: 0;
	border-left: 6px solid currentColor;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
}

.eyebrow-light {
	color: var(--red-400);
}

.ats-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.ats-post-card__category.ats-eyebrow::before,
.wp-block-post-terms.ats-eyebrow::before {
	display: none;
}

/* Prototype sections reset heading margins (h1–h4 { margin: 0 }); spacing comes from siblings. */
section h1,
section h2,
section h3,
section h4 {
	margin: 0;
}

section h2 {
	font-size: clamp(1.9rem, 3.2vw, 2.6rem);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.02em;
	color: var(--navy-800);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 28px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	font-family: var(--font-head);
	font-size: 0.92rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn .ats-icon {
	width: 16px;
	height: 16px;
	transition: transform 0.2s;
}

.btn:hover .ats-icon {
	transform: translateX(3px);
}

.btn-pill { border-radius: 999px; }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 0.84rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--red-600); color: #fff; box-shadow: 0 10px 24px rgba(199, 28, 44, 0.32); }
.btn-primary:hover { background: var(--red-700); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(199, 28, 44, 0.42); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--blue-600); color: #fff; transform: translateY(-2px); }
.btn-dark-outline { background: var(--navy-800); border-color: transparent; color: #fff; }
.btn-dark-outline:hover { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.btn-outline { border-color: var(--navy-800); color: var(--navy-800); background: rgba(255, 255, 255, 0.6); }
.btn-outline:hover { background: var(--navy-800); color: #fff; }

/* Core Button block (page content): the prototype's red pill with its shadow and hover lift. */
.wp-block-button__link.wp-element-button {
	box-shadow: 0 10px 24px rgba(199, 28, 44, 0.32);
	transition: background-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.wp-block-button__link.wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(199, 28, 44, 0.42);
}

.is-style-outline .wp-block-button__link.wp-element-button {
	box-shadow: none;
}

/* ------------------------------------------------------------------
 * 3. Fixed site chrome: top bar + header (TECH-008, REQ-001, AC-002)
 * ---------------------------------------------------------------- */

.ats-site-header {
	position: fixed;
	inset: var(--admin-bar-h) 0 auto;
	z-index: 50;
	width: 100%;
	transform: translateZ(0);
	backface-visibility: hidden;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Scroll states (initHeader() in ats-theme.js): the top bar slides away once the page leaves the
 * top, and the whole chrome hides while scrolling down and returns on scroll up. */
.ats-site-header.is-compact {
	transform: translate3d(0, calc(-1 * var(--topbar-h)), 0);
}

.ats-site-header.is-hidden {
	transform: translate3d(0, -100%, 0);
}

.ats-site-header.is-compact .topbar-inner {
	opacity: 0;
}

.topbar-inner {
	transition: opacity 0.25s;
}

.ats-site-header.is-compact .lang-menu {
	display: none;
}

@media (max-width: 600px) {
	/* The admin bar scrolls away on phones; the chrome then sits at the very top. */
	.admin-bar .ats-site-header {
		top: 0;
	}
}

.topbar {
	height: var(--topbar-h);
	background: var(--navy-900);
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.75rem;
	letter-spacing: 0.01em;
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--topbar-h);
}

.topbar-note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	white-space: nowrap;
}

.topbar-note .ats-icon {
	width: 14px;
	height: 14px;
	color: var(--red-400);
}

.lang-switch {
	position: relative;
	z-index: 60;
	margin-left: auto;
}

.lang-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 28px;
	padding: 2px 8px 2px 6px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-family: var(--font-head);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.2s;
}

.lang-toggle:hover,
.lang-switch.open .lang-toggle {
	background: rgba(255, 255, 255, 0.18);
}

.lang-flag {
	display: block;
	flex-shrink: 0;
	width: 18px;
	height: 12px;
	border-radius: 2px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.lang-caret.ats-icon {
	width: 12px;
	height: 12px;
	transition: transform 0.2s;
}

.lang-switch.open .lang-caret {
	transform: rotate(180deg);
}

/* Without JavaScript the switcher cannot do anything, so it is not shown. */
html.no-js .lang-switch {
	display: none;
}

.lang-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 168px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(7, 29, 51, 0.22);
}

.lang-menu[hidden] {
	display: none;
}

.lang-menu button {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 0.82rem;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
}

.lang-menu button:hover {
	background: var(--bg-soft);
}

.lang-menu button[aria-selected="true"] {
	background: var(--bg-soft);
	color: var(--red-600);
}

.site-header {
	padding: 10px 0;
	color: var(--navy-800);
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	box-shadow: 0 1px 0 rgba(12, 45, 78, 0.06);
	transition: box-shadow 0.25s;
}

.site-header.scrolled {
	box-shadow: 0 8px 24px rgba(12, 45, 78, 0.08);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: 60px;
}

.logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}

.logo img {
	display: block;
	width: auto;
	height: 44px;
}

.logo-tagline {
	margin-left: 14px;
	padding-left: 14px;
	border-left: 1px solid var(--line);
	color: var(--blue-600);
	font-family: var(--font-head);
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Primary navigation: a core Navigation block styled as the prototype's `.nav`. */
.nav {
	display: flex;
	margin-left: auto;
}

.nav .wp-block-navigation,
.nav .wp-block-navigation__container {
	gap: 30px;
}

.nav .wp-block-navigation-item__content {
	position: relative;
	display: block;
	padding: 6px 0;
	color: var(--navy-800);
	font-family: var(--font-body);
	font-size: 0.88rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s;
}

.nav .wp-block-navigation-item__content:hover,
.nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--red-600);
}

.nav .current-menu-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -2px;
	left: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--red-600);
}

.nav .nav-cta {
	display: none;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 14px;
}

.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 12px 11px;
	border: 0;
	border-radius: 10px;
	background: var(--bg-soft);
	cursor: pointer;
}

.menu-toggle span {
	display: block;
	height: 2px;
	margin: 4px 0;
	border-radius: 2px;
	background: var(--navy-800);
	transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* The fixed chrome would cover the editor canvas; it flows normally there. */
.editor-styles-wrapper .ats-site-header,
.block-editor-iframe__body .ats-site-header {
	position: relative;
	inset: auto;
}

@media (max-width: 1100px) {
	.nav .wp-block-navigation,
	.nav .wp-block-navigation__container {
		gap: 20px;
	}

	.header-actions .btn {
		display: none;
	}
}

@media (max-width: 860px) {
	.section {
		padding: 72px 0;
	}

	.menu-toggle {
		display: block;
	}

	.header-actions {
		margin-left: auto;
	}

	/* The dropdown panel only collapses when JS can open it (E-06); without JS it stays a list. */
	html.no-js .menu-toggle {
		display: none;
	}

	html.no-js .header-inner {
		flex-wrap: wrap;
	}

	html.no-js .nav {
		order: 3;
		flex: 1 1 100%;
	}

	/* Mobile menu: a full-width panel attached to the header's lower edge (positioned against
	 * .site-header, so it moves with the animated chrome), items with dividers, the current page
	 * marked in red and a full-width Book Consultation button. The page behind is dimmed and
	 * does not scroll while it is open (html.ats-menu-open, set by initNav()). */
	.site-header {
		position: relative;
	}

	html:not(.no-js) .nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		flex-direction: column;
		max-height: calc(100vh - var(--chrome-h) - var(--admin-bar-h));
		max-height: calc(100dvh - var(--chrome-h) - var(--admin-bar-h));
		margin: 0;
		padding: 8px max(16px, calc((100% - 1200px) / 2)) 24px;
		overflow-y: auto;
		overscroll-behavior: contain;
		border-top: 1px solid var(--line);
		background: #fff;
		box-shadow: 0 24px 40px rgba(12, 45, 78, 0.18);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
	}

	html:not(.no-js) .nav.open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	html.ats-menu-open,
	html.ats-menu-open body {
		overflow: hidden;
	}

	html.ats-menu-open body::after {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 40;
		background: rgba(7, 29, 51, 0.45);
		-webkit-backdrop-filter: blur(2px);
		backdrop-filter: blur(2px);
	}

	.nav .wp-block-navigation,
	.nav .wp-block-navigation__container {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}

	.nav .wp-block-navigation-item {
		border-bottom: 1px solid var(--line);
	}

	.nav .wp-block-navigation-item__content {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 16px 4px;
		font-family: var(--font-head);
		font-size: 1.05rem;
		font-weight: 500;
	}

	/* Trailing chevron on each row; the current page gets a red bar on the left instead. */
	.nav .wp-block-navigation-item__content::before {
		content: "";
		order: 2;
		width: 16px;
		height: 16px;
		background-color: var(--muted);
		-webkit-mask: url(assets/icons/lucide/chevron-right.svg) center/contain no-repeat;
		mask: url(assets/icons/lucide/chevron-right.svg) center/contain no-repeat;
		transition: transform 0.2s, background-color 0.2s;
	}

	.nav .wp-block-navigation-item__content:hover::before {
		background-color: var(--red-600);
		transform: translateX(3px);
	}

	.nav .current-menu-item > .wp-block-navigation-item__content {
		padding-left: 14px;
	}

	.nav .current-menu-item > .wp-block-navigation-item__content::after {
		top: 16px;
		right: auto;
		bottom: 16px;
		left: 0;
		width: 3px;
		height: auto;
	}

	.nav .nav-cta {
		display: inline-flex;
		width: 100%;
		margin-top: 20px;
		min-height: 52px;
	}
}

@media (max-width: 560px) {
	:root {
		--container: calc(100% - 32px);
		--header-h: 64px;
	}

	/* Office hours stay visible on phones, compact, beside the language switcher. */
	.topbar-inner {
		gap: 10px;
	}

	.topbar-note {
		gap: 6px;
		min-width: 0;
		font-size: 0.6875rem;
	}

	.topbar-note > span {
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.logo img {
		height: 34px;
	}

	.logo-tagline {
		margin-left: 10px;
		padding-left: 10px;
		font-size: 0.6rem;
		letter-spacing: 0.1em;
	}
}

@media (max-width: 360px) {
	/* Smallest phones: drop the clock icon so the hours and the language switcher both fit. */
	.topbar-note .ats-icon {
		display: none;
	}
}

/* ------------------------------------------------------------------
 * 4. Sections and grids (REQ-019, REQ-020)
 *
 * Spacing system (one rhythm on every page):
 *   section padding .......... spacing-70 top and bottom
 *   section head → content ... spacing-50
 *   eyebrow → heading ........ spacing-20
 *   heading → intro .......... spacing-30
 *   grid / card gap .......... spacing-40, card padding spacing-40
 * ---------------------------------------------------------------- */

/* Full-bleed blocks sit flush: no flow-layout gap between the header, main, the sections and
 * the footer (the gap showed as white strips between coloured bands). */
.wp-site-blocks > main,
.wp-site-blocks > footer,
main > .alignfull,
.wp-block-post-content > .alignfull,
.wp-block-template-part > .alignfull {
	margin-block: 0;
}

.ats-section {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
}

/* Secondary pages: page.html wraps post content in an .ats-section, and the content mixes intro
 * copy with its own full-width bands. Bands get a clear gap from surrounding copy, sit flush
 * against each other, and a band at the very end doesn't stack on the wrapper's padding. */
.wp-block-post-content > :not(.alignfull) + .alignfull,
.wp-block-post-content > .alignfull + :not(.alignfull) {
	margin-top: var(--wp--preset--spacing--60);
}

.ats-section:has(> .wp-block-post-content > .alignfull:last-child) {
	padding-bottom: 0;
}

.ats-section:has(> .wp-block-post-content > .alignfull:first-child) {
	padding-top: 0;
}

/* Two white sections in a row share one gap instead of doubling it. */
.ats-section:not(.ats-section--surface, .ats-section--navy) + .ats-section:not(.ats-section--surface, .ats-section--navy) {
	padding-top: 0;
}

/* Heading rhythm. Class/element-qualified so it outranks the zero-specificity flow gaps. */
.ats-eyebrow + h1,
.ats-eyebrow + h2,
.ats-eyebrow + .wp-block-heading,
.ats-eyebrow + .wp-block-post-title,
.ats-eyebrow + .wp-block-query-title {
	margin-top: var(--wp--preset--spacing--20);
}

h2.wp-block-heading + p {
	margin-top: var(--wp--preset--spacing--30);
}

h2.wp-block-heading {
	margin-bottom: 0;
}

.ats-section--surface {
	background: var(--wp--preset--color--surface);
}

.ats-section--navy {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--base);
}

/* Photo band (How it works): background photo set on the block, under a Dark Blue scrim so the
 * copy keeps AA contrast, matching the Client Stories cover (70% dim) but a touch deeper. */
.ats-section--photo {
	position: relative;
	isolation: isolate;
	background-size: cover;
	background-position: center;
}

.ats-section--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--navy) 84%, transparent);
}

.ats-section--navy h1,
.ats-section--navy h2,
.ats-section--navy h3,
.ats-section--navy h4,
.ats-section--navy h5,
.ats-section--navy h6 {
	color: var(--wp--preset--color--base);
}

.ats-section--navy .ats-muted {
	color: var(--wp--preset--color--on-navy-muted);
}

.ats-section--navy a:not(.wp-element-button):not(.wp-block-button__link) {
	color: var(--wp--preset--color--base);
}

.ats-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40);
	list-style: none;
	padding-left: 0;
}

/* Beat core layout margin/max-width rules on grid children without !important. */
.ats-grid.ats-grid > * {
	margin: 0;
	min-width: 0;
	max-width: none;
}

.ats-grid--4 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
	.ats-grid--2,
	.ats-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ats-grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ats-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ------------------------------------------------------------------
 * 5. Cards, badges, buttons
 * ---------------------------------------------------------------- */

.ats-card {
	background: var(--wp--preset--color--base);
	border-radius: var(--wp--preset--border-radius--large);
	box-shadow: var(--wp--preset--shadow--card);
	padding: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--contrast);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ats-card:hover,
.ats-card:focus-within {
	box-shadow: var(--wp--preset--shadow--card-hover);
}

.ats-card h2,
.ats-card h3,
.ats-card h4 {
	color: var(--wp--preset--color--primary);
}

.ats-card--image {
	padding: 0;
	display: flex;
	flex-direction: column;
}

.ats-card__media {
	margin: 0;
	flex: none;
}

.ats-card__media img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.ats-card--image > .ats-card__media:first-child,
.ats-card--image > .ats-card__media:first-child img {
	border-start-start-radius: var(--wp--preset--border-radius--large);
	border-start-end-radius: var(--wp--preset--border-radius--large);
}

.ats-card__body {
	padding: var(--wp--preset--spacing--40);
	flex: 1 1 auto;
}

.ats-grid > li > .ats-card,
.ats-grid > .wp-block-post > .ats-card {
	height: 100%;
}

.ats-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0;
	border-radius: var(--wp--preset--border-radius--pill);
	background: var(--wp--preset--color--surface-2);
	color: var(--wp--preset--color--primary);
	flex: none;
}

.ats-icon-badge .ats-icon {
	width: 28px;
	height: 28px;
}

/* Button modifiers (className on core/button). The wrapper carries the class; the link is
 * styled so these beat the theme.json element rules regardless of stylesheet order. */
/* Call-to-action buttons in page content use the `cta` preset (the prototype's red). */
.ats-btn--accent .wp-block-button__link {
	background: var(--wp--preset--color--cta);
	color: var(--wp--preset--color--base);
	border: 0;
}

.ats-btn--accent .wp-block-button__link:hover,
.ats-btn--accent .wp-block-button__link:focus {
	background: var(--wp--preset--color--cta-dark);
	color: var(--wp--preset--color--base);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--cta) 30%, transparent);
}

.ats-btn--outline .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
	border: 2px solid var(--wp--preset--color--primary);
	padding: calc(0.8rem - 2px) calc(1.5rem - 2px);
}

.ats-btn--outline .wp-block-button__link:hover,
.ats-btn--outline .wp-block-button__link:focus {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.ats-btn--ghost-light .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--base);
	border: 2px solid color-mix(in srgb, var(--wp--preset--color--base) 60%, transparent);
	padding: calc(0.8rem - 2px) calc(1.5rem - 2px);
}

.ats-btn--ghost-light .wp-block-button__link:hover,
.ats-btn--ghost-light .wp-block-button__link:focus {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--navy);
	border-color: var(--wp--preset--color--base);
}

/* ------------------------------------------------------------------
 * 6. Page hero (secondary pages, blog, archives) — TECH-021
 *
 * The home hero's language for inner pages: white fading into the soft-blue band, a soft blue
 * glow on the right, red-triangle eyebrow, Poppins title, muted lead. Left-aligned in the
 * container like the prototype's section heads.
 * ---------------------------------------------------------------- */

.ats-page-hero.ats-page-hero {
	position: relative;
	overflow: hidden;
	padding-top: 72px;
	padding-bottom: 64px;
	background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
	text-align: left;
}

.ats-page-hero::after {
	content: "";
	position: absolute;
	right: -160px;
	top: -120px;
	width: 460px;
	height: 460px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(26, 98, 168, 0.12), transparent 70%);
	pointer-events: none;
}

/* Every hero child spans the 1200px container (core's constrained layout would centre them at
 * the 720px content size), so eyebrow, title and lead share one left edge. */
.ats-page-hero.ats-page-hero > * {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: min(1200px, calc(100vw - 48px));
	margin-left: auto;
	margin-right: auto;
}

.ats-page-hero > .ats-eyebrow {
	display: flex;
}

.ats-page-hero.ats-page-hero > * + * {
	margin-top: 0;
}

.ats-page-hero h1,
.ats-page-hero .wp-block-post-title,
.ats-page-hero .wp-block-query-title {
	margin: 0;
	color: var(--navy-800);
	font-size: clamp(2.2rem, 4vw, 3.1rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.ats-page-hero .wp-block-post-terms a {
	text-decoration: none;
}

.ats-page-hero .wp-block-post-date,
.ats-page-hero .ats-post-meta {
	margin-top: 16px;
	color: var(--muted);
}

/* Lead paragraph under the page title: the page excerpt (ats_page_hero_excerpt()). */
.ats-page-hero.ats-page-hero > .ats-page-hero__lead,
.ats-page-hero.ats-page-hero > p:not(.ats-eyebrow),
.ats-page-hero.ats-page-hero > .wp-block-term-description {
	margin-top: 18px;
	color: #3f5068;
	line-height: 1.6;
}

.ats-page-hero__lead p,
.ats-page-hero > p:not(.ats-eyebrow),
.ats-page-hero .wp-block-term-description p {
	max-width: 620px;
	margin: 0;
	font-size: 1.05rem;
}

/* A paragraph directly in the hero (blog heading) keeps the full container width (core's
 * constrained layout centres narrower children with !important margins) and limits its line
 * length with right padding instead, so it stays aligned with the title. */
.ats-page-hero.ats-page-hero > p:not(.ats-eyebrow) {
	max-width: min(1200px, calc(100vw - 48px));
	padding-right: max(0px, calc(100% - 640px));
	font-size: 1.05rem !important;
}

.ats-page-hero.ats-page-hero > .wp-block-search {
	max-width: min(1200px, calc(100vw - 48px));
	margin-top: 24px;
}

.ats-section.ats-page-body {
	padding-top: 64px;
}


/* ------------------------------------------------------------------
 * 6b. Prose: page and post content edited in the block editor (like a blog post).
 * ---------------------------------------------------------------- */

.ats-prose {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--wp--preset--color--contrast);
}

.ats-prose > * {
	margin-top: 0;
	margin-bottom: 0;
}

.ats-prose > * + * {
	margin-top: 1.25rem;
}

.ats-prose > h2 {
	margin-top: 3rem;
	font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
	line-height: 1.25;
}

.ats-prose > h3 {
	margin-top: 2.25rem;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
}

.ats-prose > h2 + *,
.ats-prose > h3 + * {
	margin-top: 0.75rem;
}

.ats-prose > :first-child {
	margin-top: 0;
}

.ats-prose h2[id],
.ats-prose h3[id] {
	scroll-margin-top: 7rem;
}

.ats-prose a:not(.wp-element-button) {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

.ats-prose a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--primary-dark);
	text-decoration-thickness: 2px;
}

.ats-prose ul,
.ats-prose ol {
	padding-left: 1.4rem;
}

.ats-prose li + li {
	margin-top: 0.5rem;
}

.ats-prose li::marker {
	color: var(--wp--preset--color--accent);
}

.ats-prose ol > li::marker {
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--poppins);
	font-weight: 700;
}

.ats-prose ol > li {
	padding-left: 0.25rem;
}

.ats-prose > .wp-block-quote {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--40) var(--wp--preset--spacing--40) calc(var(--wp--preset--spacing--40) + 4px);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 0 var(--wp--preset--border-radius--medium) var(--wp--preset--border-radius--medium) 0;
	background: var(--wp--preset--color--surface);
}

.ats-prose .wp-block-quote p {
	margin: 0;
	font-family: var(--wp--preset--font-family--poppins);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.5;
	color: var(--wp--preset--color--primary);
}

.ats-prose .wp-block-quote cite {
	display: block;
	margin-top: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	color: var(--wp--preset--color--muted);
}

.ats-prose > .wp-block-buttons {
	margin-top: 2rem;
}

.ats-prose img {
	border-radius: var(--wp--preset--border-radius--medium);
}

.ats-prose > hr,
.ats-prose > .wp-block-separator {
	margin-top: 2.5rem;
	margin-bottom: 1.25rem;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--border);
}

.ats-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.ats-prose th,
.ats-prose td {
	padding: 0.625rem 0.75rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: left;
}

/* The consultation form sits in the prose column and spans the full container width. */
.ats-prose .ats-form {
	width: 100%;
	max-width: none;
	margin-top: 1.5rem;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--large);
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--card);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
}

/* ------------------------------------------------------------------
 * 6c. Post card — ONE global component (ats_post_card_markup()), used by the home Resources
 * section and the post-grid pattern (blog index, archives, search).
 * ---------------------------------------------------------------- */

.ats-post-list {
	margin-top: 0;
}

.ats-post-grid.ats-post-grid {
	gap: 26px;
	margin: 0;
	padding: 0;
}

.ats-post-grid > .wp-block-post {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.ats-post-card.ats-post-card {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: var(--shadow-card);
	transition: transform 0.25s, box-shadow 0.25s;
}

.ats-post-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lift);
}

.ats-post-card > * {
	margin: 0;
}

.ats-post-card__media-wrap.ats-post-card__media-wrap {
	position: relative;
	margin: 0;
	overflow: hidden;
}

.ats-post-card__media {
	margin: 0;
}

.ats-post-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 0.5s;
}

.ats-post-card:hover .ats-post-card__media img {
	transform: scale(1.05);
}

/* Category: the prototype's red `.tag` pill over the photo's lower-left corner. */
.ats-post-card__media-wrap > .ats-post-card__category {
	position: absolute;
	left: 16px;
	bottom: 14px;
	z-index: 1;
	margin: 0;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--red-600);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.3;
}

.ats-post-card__category a {
	color: #fff;
	text-decoration: none;
}

.ats-post-card__body.ats-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 22px 24px;
}

.ats-post-card__body.ats-post-card__body > *,
.ats-post-card__media-wrap.ats-post-card__media-wrap > * {
	margin-top: 0;
	margin-bottom: 0;
}

.ats-post-card__title.ats-post-card__title {
	color: var(--navy-800);
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
}

.ats-post-card__title a {
	color: inherit;
	text-decoration: none;
}

.ats-post-card__title a:hover,
.ats-post-card__title a:focus-visible {
	color: var(--blue-600);
}

/* Preview: a two-line excerpt under the title, then the date pinned to the card's foot. */
.ats-post-card__body > .ats-post-card__excerpt {
	margin-top: 8px;
	color: var(--muted);
	font-size: 0.88rem;
	line-height: 1.55;
}

.ats-post-card__excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.ats-post-card__body > .ats-post-card__date {
	display: block;
	margin-top: auto;
	padding-top: 14px;
	color: var(--muted);
	font-size: 0.8rem;
}

.ats-post-card__body > .ats-post-card__date time {
	display: block;
}

.ats-post-list .wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--50);
	font-weight: 600;
}

.ats-post-list__empty {
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--surface);
	border: 1px dashed var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--medium);
}

@media (max-width: 860px) {
	.ats-post-grid.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.ats-post-grid.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Post meta in the hero: "Sep 8, 2026 · Updated Oct 16, 2026 · 4 min read" (freshness signal).
 * Every item sits on one baseline at one size; a middle dot separates them. */
.ats-post-meta.ats-post-meta {
	align-items: baseline;
	gap: 0 0.5rem;
	margin-top: 22px;
	color: var(--muted);
	font-size: 0.88rem;
	line-height: 1.5;
}

.ats-post-meta > *,
.ats-post-meta__updated.ats-post-meta__updated > * {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.ats-post-meta__updated.ats-post-meta__updated {
	align-items: baseline;
	gap: 0.3rem;
}

.ats-post-meta__updated::before,
.ats-post-meta__read::before {
	content: "·";
	margin-right: 0.5rem;
	color: var(--line);
	font-weight: 700;
	color: #a8b4c6;
}

.ats-post-meta__label {
	font-weight: 600;
}

/* Author box under each article (who wrote it, credentials, link to About: trust signal). */
.ats-author-box {
	margin-top: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--40);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 0 var(--wp--preset--border-radius--medium) var(--wp--preset--border-radius--medium) 0;
	background: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--small);
}

.ats-author-box > * {
	margin: 0;
}

.ats-author-box > * + * {
	margin-top: var(--wp--preset--spacing--20);
}

.ats-author-box__title {
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--poppins);
}

/* Page FAQs (core/details in prose): same card look as the home accordion, lighter weight. */
.ats-prose > .wp-block-details {
	margin-top: 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--medium);
	background: var(--wp--preset--color--base);
}

.ats-prose > .wp-block-details > summary {
	padding: 1rem 1.25rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
}

.ats-prose > .wp-block-details > :not(summary) {
	margin: 0;
	padding: 0 1.25rem 1.125rem;
}

.ats-prose > .wp-block-details[open] {
	box-shadow: var(--wp--preset--shadow--card);
}

/* ------------------------------------------------------------------
 * 6d. Single post: readable article layout (templates/single.html)
 * ---------------------------------------------------------------- */

/* Header: the same page hero as every templated inner page (Services, About…): 1200px
 * container, left-aligned title; the excerpt is the lead (same measure as page leads), then the
 * meta line. */
.ats-article-hero .ats-article-hero__lead {
	margin-top: 18px;
	color: #3f5068;
	font-size: 1.05rem;
	line-height: 1.6;
}

.ats-article-hero__lead p {
	max-width: 620px;
	margin: 0;
}

.ats-article-hero .wp-block-post-terms.ats-eyebrow a {
	color: var(--red-600);
}

/* Featured photo: wider than the text, but not the full 1200px grid. */
.ats-single__media.ats-single__media {
	max-width: 1000px;
	margin-bottom: 56px;
}

.ats-single__media img {
	width: 100%;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
}

/* Body: comfortable measure and rhythm for long reading. */
.single .ats-prose {
	font-size: 1.0625rem;
	line-height: 1.8;
}

.single .ats-prose > * {
	max-width: 720px;
}

.single .ats-prose > p.has-large-font-size:first-child {
	color: var(--navy-800);
	font-size: 1.25rem !important;
	line-height: 1.65;
}

.single .ats-prose > h2 {
	margin-top: 3.25rem;
	padding-top: 0.25rem;
	font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
	scroll-margin-top: calc(var(--header-h) + var(--admin-bar-h) + 24px);
}

.single .ats-prose > ul,
.single .ats-prose > ol {
	padding-left: 1.25rem;
}

.single .ats-prose li + li {
	margin-top: 0.6rem;
}

/* Key takeaways: the answer-first summary as a highlighted box (heading + its list). */
.single .ats-prose > h2#key-takeaways {
	margin-top: 2.5rem;
	padding: 24px 28px 4px;
	border: 1px solid var(--line);
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	background: var(--bg-soft);
	color: var(--red-600);
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	letter-spacing: 0;
}

.single .ats-prose > h2#key-takeaways + ul {
	margin-top: 0;
	padding: 14px 28px 24px;
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
	background: var(--bg-soft);
	color: var(--navy-800);
	font-size: 1rem;
	list-style: none;
}

.single .ats-prose > h2#key-takeaways + ul li {
	position: relative;
	padding-left: 34px;
}

/* Lucide check (white) on a small red disc. */
.single .ats-prose > h2#key-takeaways + ul li::before,
.single .ats-prose > h2#key-takeaways + ul li::after {
	content: "";
	position: absolute;
	top: 0.25em;
	left: 0;
	width: 22px;
	height: 22px;
}

.single .ats-prose > h2#key-takeaways + ul li::before {
	border-radius: 50%;
	background: var(--red-600);
}

.single .ats-prose > h2#key-takeaways + ul li::after {
	background: #fff;
	-webkit-mask: url(assets/icons/lucide/check.svg) center / 14px no-repeat;
	mask: url(assets/icons/lucide/check.svg) center / 14px no-repeat;
}

/* The closing disclaimer reads as a footnote. */
.single .ats-prose > p:last-child em,
.single .ats-prose > p em:only-child {
	color: var(--muted);
	font-size: 0.9rem;
}

.single .ats-author-box,
.single .ats-single__nav {
	margin-left: auto;
	margin-right: auto;
	max-width: 720px;
}

/* Byline (patterns/post-byline.php): an editorial sign-off, not a card. Hairline rules above
 * and below, the ATS mark in a soft roundel, name and credentials, a quiet footnote. */
.single .ats-author-box.ats-byline {
	margin-top: 64px;
	padding: 28px 0 24px;
	border: 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.ats-byline > * {
	margin: 0;
}

.ats-byline__who {
	display: flex;
	align-items: center;
	gap: 18px;
}

.ats-byline__mark {
	display: grid;
	flex: none;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--bg-soft);
	box-shadow: inset 0 0 0 1px var(--line);
}

.ats-byline__mark img {
	width: 44px;
	height: auto;
}

.ats-byline__who > div {
	flex: 1;
	min-width: 0;
}

.ats-byline__who p {
	margin: 0;
}

.ats-byline__label {
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ats-byline__name {
	margin-top: 2px;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
}

.ats-byline__meta {
	margin-top: 2px;
	color: var(--muted);
	font-size: 0.88rem;
}

.ats-byline__team {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 0.85rem;
	font-weight: 500;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.ats-byline__team:hover {
	border-color: var(--navy-800);
	background: var(--navy-800);
	color: #fff;
}

.ats-byline__team .ats-icon {
	width: 16px;
	height: 16px;
}

.ats-byline__note {
	margin-top: 18px !important;
	color: var(--muted);
	font-size: 0.82rem;
	line-height: 1.6;
}

@media (max-width: 560px) {
	.ats-byline__who {
		flex-wrap: wrap;
	}

	.ats-byline__team {
		margin-left: 82px;
	}
}

/* Previous / next as two cards. */
.ats-single__nav.ats-single__nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 40px;
	padding-top: 0;
	border-top: 0;
	font-weight: 600;
}

.ats-single__nav .post-navigation-link-previous,
.ats-single__nav .post-navigation-link-next {
	margin: 0;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	font-family: var(--font-head);
	font-size: 0.95rem;
	line-height: 1.4;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ats-single__nav .post-navigation-link-next {
	grid-column: 2;
	text-align: right;
}

.ats-single__nav > :empty {
	display: none;
}

.ats-single__nav .post-navigation-link-previous:hover,
.ats-single__nav .post-navigation-link-next:hover {
	border-color: #cddcef;
	box-shadow: var(--shadow-card);
	transform: translateY(-2px);
}

.ats-single__nav a {
	color: var(--navy-800);
	text-decoration: none;
}

.ats-single__nav a:hover {
	color: var(--red-600);
}

@media (max-width: 560px) {
	.ats-single__nav.ats-single__nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.ats-single__nav .post-navigation-link-next {
		grid-column: 1;
	}

	.single .ats-prose > h2#key-takeaways,
	.single .ats-prose > h2#key-takeaways + ul {
		padding-right: 18px;
	}
}

/* ------------------------------------------------------------------
 * 7. Contact list (footer CTA band, Contact page)
 * ---------------------------------------------------------------- */

.ats-contact-list {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ats-contact-list__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
}

.ats-contact-list__item .wp-block-image,
.ats-contact-list__item figure,
.ats-contact-list__item .ats-contact-list__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: var(--wp--preset--border-radius--medium);
	background: color-mix(in srgb, var(--wp--preset--color--base) 10%, transparent);
}

.ats-contact-list__item .ats-icon {
	width: 22px;
	height: 22px;
}

.ats-contact-list__item p {
	margin: 0;
}

.ats-contact-list a {
	color: inherit;
	text-decoration: none;
	font-weight: 600;
}

.ats-contact-list a:hover,
.ats-contact-list a:focus {
	text-decoration: underline;
}

/* Light surfaces (Contact page) get the badge tint from the palette instead. */
.ats-section:not(.ats-section--navy) .ats-contact-list__item .wp-block-image,
.ats-section:not(.ats-section--navy) .ats-contact-list__item .ats-contact-list__icon,
.ats-contact-list--light .ats-contact-list__item .wp-block-image,
.ats-contact-list--light .ats-contact-list__item .ats-contact-list__icon {
	background: var(--wp--preset--color--surface-2);
}

/* ------------------------------------------------------------------
 * 8. CTA band and footer (REQ-015, AC-015, TECH-019)
 * ---------------------------------------------------------------- */

.cta {
	position: relative;
	padding: 80px 0;
	color: #fff;
	overflow: hidden;
	background: var(--navy-900);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Parallax layer (initParallax() in ats-theme.js moves it; it is static with reduced motion). */
.cta-bg {
	position: absolute;
	inset: -25% 0;
	will-change: transform;
	background:
		linear-gradient(90deg, rgba(7, 29, 51, 0.95) 0%, rgba(12, 45, 78, 0.86) 55%, rgba(12, 45, 78, 0.72) 100%),
		url("assets/images/photos/cta-skyline.webp") center 45% / cover no-repeat;
}

.cta-inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 60px;
	align-items: center;
}

.cta-copy h2 {
	color: #fff;
}

.cta-copy p:not(.eyebrow) {
	max-width: 560px;
	margin: 14px 0 28px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 1rem;
}

.cta-contact {
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	justify-self: end;
}

.cta-contact li,
.cta-contact a {
	display: flex;
	align-items: center;
	gap: 16px;
	color: #fff;
	font-size: 0.98rem;
	text-decoration: none;
}

.cta-contact a:hover {
	color: var(--sky);
}

.cta-contact span {
	display: grid;
	flex: none;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.16);
	transition: background-color 0.2s, border-color 0.2s;
}

.cta-contact a:hover span {
	background: var(--red-600);
	border-color: var(--red-600);
}

.footer {
	padding-top: 70px;
	color: rgba(255, 255, 255, 0.75);
	background: var(--navy-900);
	font-size: 1rem;
}

.footer a:focus-visible,
.cta a:focus-visible {
	outline-color: #fff;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
	gap: 40px;
	padding-bottom: 50px;
}

.logo-footer img {
	height: 64px;
}

.footer-brand.footer-brand > p {
	margin: 16px 0 20px;
	font-size: 0.88rem;
}

.footer .socials.wp-block-social-links {
	gap: 10px;
	margin: 0;
	padding: 0;
}

.footer .socials .wp-social-link {
	margin: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	transition: background-color 0.2s;
}

.footer .socials .wp-social-link:hover {
	background: var(--red-600);
	transform: none;
}

.footer .socials .wp-block-social-link-anchor {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
}

.footer .socials svg {
	width: 16px;
	height: 16px;
}

.footer-col.footer-col > .footer-title {
	margin: 0 0 18px;
	color: #fff;
	font-family: var(--font-head);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
}

.footer-col .wp-block-navigation,
.footer-col .wp-block-navigation__container {
	gap: 0;
	align-items: flex-start;
}

.footer-col .wp-block-navigation-item__content,
.footer-col .ci a {
	display: block;
	margin-bottom: 10px;
	color: rgba(255, 255, 255, 0.75);
	font-family: var(--font-body);
	font-size: 0.87rem;
	font-weight: 400;
	text-decoration: none;
	transition: color 0.2s;
}

.footer-col .ci a {
	margin: 0;
}

.footer-col .wp-block-navigation-item__content:hover,
.footer-col .ci a:hover,
.footer-bottom a:hover {
	color: #fff;
}

.footer-col.footer-col > .ci {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	font-size: 0.87rem;
}

.ci .ats-icon {
	width: 17px;
	height: 17px;
	color: var(--red-400);
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 22px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.8rem;
}

.footer-bottom div {
	display: flex;
	gap: 24px;
}

.footer-bottom a {
	color: inherit;
	text-decoration: none;
}

@media (max-width: 860px) {
	.cta {
		padding: 64px 0;
	}

	.cta-bg {
		background:
			linear-gradient(180deg, rgba(7, 29, 51, 0.88), rgba(7, 29, 51, 0.94)),
			url("assets/images/photos/cta-skyline.webp") center 45% / cover no-repeat;
	}

	.cta-inner {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.cta-contact {
		justify-self: start;
	}

	.cta-contact li,
	.cta-contact a {
		font-size: 0.92rem;
		overflow-wrap: anywhere;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.footer-bottom {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------------
 * 9. 404
 * ---------------------------------------------------------------- */

.ats-404 {
	padding-bottom: 96px;
}

/* Band: the inner-page hero look, with an oversized faint "404" behind the copy. */
.ats-404__band {
	position: relative;
	overflow: hidden;
	padding: 80px 0 72px;
	background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}

.ats-404__band::after {
	content: "";
	position: absolute;
	top: -140px;
	right: -160px;
	width: 520px;
	height: 520px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(26, 98, 168, 0.12), transparent 70%);
	pointer-events: none;
}

.ats-404__inner {
	position: relative;
	z-index: 1;
}

.ats-404__code {
	position: absolute;
	top: -0.18em;
	right: 0;
	z-index: -1;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: clamp(9rem, 22vw, 18rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	opacity: 0.06;
	user-select: none;
}

.ats-404 h1 {
	margin: 0;
	color: var(--navy-800);
	font-size: clamp(2.4rem, 4.6vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.ats-404__lead {
	max-width: 560px;
	margin: 18px 0 0;
	color: #3f5068;
	font-size: 1.05rem;
	line-height: 1.6;
}

.ats-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 30px;
}

.ats-404__search {
	display: flex;
	max-width: 560px;
	margin-top: 32px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--shadow-card);
}

.ats-404__search input {
	flex: 1;
	min-width: 0;
	padding: 0 18px;
	border: 0;
	background: none;
	color: var(--ink);
	font-size: 0.95rem;
	outline: none;
}

.ats-404__search:focus-within {
	border-color: var(--blue-500);
	box-shadow: 0 0 0 4px rgba(26, 98, 168, 0.15);
}

.ats-404__search button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: var(--navy-800);
	color: #fff;
	font-family: var(--font-head);
	font-size: 0.88rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.ats-404__search button:hover {
	background: var(--blue-600);
}

.ats-404__search .ats-icon {
	width: 18px;
	height: 18px;
}

/* Popular pages: compact link cards. */
.ats-404__links {
	padding-top: 56px;
}

.ats-404__links h2 {
	margin: 0 0 20px;
	color: var(--navy-800);
	font-size: 1.25rem;
}

.ats-404__links ul {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ats-404__links li {
	grid-column: span 2;
}

/* Three page cards, then the office cards share the second row. */
.ats-404__links li:nth-child(n + 4) {
	grid-column: span 3;
}

.ats-404__links a {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ats-404__links a:hover {
	border-color: #cddcef;
	box-shadow: var(--shadow-card);
	transform: translateY(-2px);
}

.ats-404__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--wp--preset--color--surface-2);
	color: var(--blue-600);
}

.ats-404__text {
	flex: 1;
	min-width: 0;
}

.ats-404__text strong {
	display: block;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 0.95rem;
	font-weight: 600;
}

.ats-404__text small {
	display: block;
	margin-top: 2px;
	color: var(--muted);
	font-size: 0.82rem;
	line-height: 1.45;
}

.ats-404__go {
	flex: none;
	color: var(--muted);
	transition: transform 0.2s, color 0.2s;
}

.ats-404__links a:hover .ats-404__go {
	color: var(--red-600);
	transform: translateX(3px);
}

@media (max-width: 860px) {
	.ats-404__links ul {
		grid-template-columns: minmax(0, 1fr);
	}

	.ats-404__links li,
	.ats-404__links li:nth-child(n + 4) {
		grid-column: auto;
	}
}

@media (max-width: 560px) {
	.ats-404__band {
		padding: 48px 0;
	}

	.ats-404__search button span {
		display: none;
	}
}

/* ------------------------------------------------------------------
 * 10. Cookie consent banner (inc/consent.php, assets/js/ats-consent.js)
 * ---------------------------------------------------------------- */

.ats-consent {
	position: fixed;
	right: 24px;
	bottom: 24px;
	left: 24px;
	z-index: 60;
	display: flex;
	justify-content: center;
	pointer-events: none;
}

.ats-consent[hidden] {
	display: none;
}

.ats-consent__inner {
	width: min(980px, 100%);
	padding: 22px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: #fff;
	color: var(--ink);
	box-shadow: 0 24px 60px rgba(7, 29, 51, 0.22);
	pointer-events: auto;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s, transform 0.25s;
}

.ats-consent.is-visible .ats-consent__inner {
	opacity: 1;
	transform: none;
}

.ats-consent__title {
	margin: 0 0 6px;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 1rem;
	font-weight: 600;
}

.ats-consent__text {
	margin: 0;
	color: var(--muted);
	font-size: 0.88rem;
	line-height: 1.55;
}

.ats-consent__text a {
	color: var(--blue-600);
	font-weight: 600;
}

.ats-consent__prefs {
	display: grid;
	gap: 10px;
	margin-top: 16px;
}

.ats-consent__prefs[hidden] {
	display: none;
}

.ats-consent__option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--bg-soft);
	cursor: pointer;
}

.ats-consent__option input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--red-600);
}

.ats-consent__option input:disabled {
	cursor: not-allowed;
}

.ats-consent__option strong {
	display: block;
	color: var(--navy-800);
	font-size: 0.88rem;
}

.ats-consent__option small {
	color: var(--muted);
	font-size: 0.8rem;
}

.ats-consent__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}

.ats-consent__btn {
	min-height: 42px;
	padding: 0 20px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font-family: var(--font-head);
	font-size: 0.84rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.ats-consent__btn[hidden] {
	display: none;
}

.ats-consent__btn--primary {
	background: var(--red-600);
	color: #fff;
}

.ats-consent__btn--primary:hover {
	background: var(--red-700);
}

/* Reject carries the same weight as Accept (GDPR: refusing must be as easy as accepting). */
.ats-consent__btn--outline {
	border-color: var(--navy-800);
	background: #fff;
	color: var(--navy-800);
}

.ats-consent__btn--outline:hover {
	background: var(--navy-800);
	color: #fff;
}

.ats-consent__btn--link {
	margin-right: auto;
	padding: 0 4px;
	background: none;
	color: var(--blue-600);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.footer-bottom .footer-link-btn {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.footer-bottom .footer-link-btn:hover {
	color: #fff;
}

@media (max-width: 560px) {
	.ats-consent {
		right: 0;
		bottom: 0;
		left: 0;
	}

	.ats-consent__inner {
		max-height: 85vh;
		overflow-y: auto;
		padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
		border-radius: 20px 20px 0 0;
	}

	.ats-consent__actions .ats-consent__btn--outline,
	.ats-consent__actions .ats-consent__btn--primary {
		flex: 1 1 100%;
	}

	.ats-consent__btn--link {
		margin: 0 auto 0 0;
	}
}

/* ------------------------------------------------------------------
 * 11. Contact page (templates/page-contact.html, patterns/contact-details.php)
 *
 * Two columns: a sticky navy contact card (phone, email, offices, hours from Business Details)
 * beside the editable content (message form, next steps, FAQ). On phones the form comes first.
 * ---------------------------------------------------------------- */

.contact-layout__grid.contact-layout__grid {
	display: grid;
	grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
}

.contact-layout__grid.contact-layout__grid > *,
.contact-layout__aside.contact-layout__aside > * {
	margin: 0;
}

.contact-layout__aside {
	position: sticky;
	top: calc(var(--header-h) + var(--admin-bar-h) + 24px);
}

.contact-card {
	position: relative;
	overflow: hidden;
	padding: 32px 28px;
	border-radius: var(--radius-lg);
	background:
		radial-gradient(circle at 100% 0%, rgba(26, 98, 168, 0.45), transparent 55%),
		var(--navy-900);
	color: #fff;
	box-shadow: 0 24px 48px rgba(7, 29, 51, 0.22);
}

.contact-card .eyebrow {
	margin-bottom: 10px;
}

.contact-card__title.contact-card__title {
	margin: 0;
	color: #fff;
	font-size: 1.6rem;
	line-height: 1.2;
}

.contact-card__lead {
	margin: 10px 0 24px;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.92rem;
	line-height: 1.6;
}

.contact-card__list {
	display: grid;
	gap: 18px;
	margin: 0 0 28px;
	padding: 24px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	list-style: none;
}

.contact-card__list li {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	color: #fff;
	font-size: 0.95rem;
	line-height: 1.5;
}

.contact-card__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--red-400);
}

.contact-card__list small {
	display: block;
	margin-bottom: 2px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.contact-card__list a {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: normal;
}

.contact-card__list a:hover {
	color: var(--sky);
}

.contact-card a:focus-visible {
	outline-color: #fff;
}

/* Main column: the form card spans the column; headings sit tight above their content. */
.contact-layout__main.ats-prose > h2:first-child {
	margin-top: 0;
}

.contact-layout__main.ats-prose > ol {
	display: grid;
	gap: 12px;
	padding: 0;
	list-style: none;
	counter-reset: ats-step;
}

.contact-layout__main.ats-prose > ol > li {
	position: relative;
	margin: 0;
	padding: 16px 18px 16px 64px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-soft);
	counter-increment: ats-step;
}

.contact-layout__main.ats-prose > ol > li::before {
	content: counter(ats-step);
	position: absolute;
	top: 50%;
	left: 18px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--red-600);
	color: #fff;
	font-family: var(--font-head);
	font-size: 0.9rem;
	font-weight: 600;
	transform: translateY(-50%);
}

@media (max-width: 1000px) {
	.contact-layout__grid.contact-layout__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.contact-layout__aside {
		position: static;
		order: 2;
	}

	.contact-card__list {
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	}
}

@media (max-width: 560px) {
	.contact-card {
		padding: 28px 20px;
	}

	.contact-card__list {
		grid-template-columns: minmax(0, 1fr);
	}
}
