/*
 * ATS base: reset, document, typography styles, grounds, utilities.
 * Colour, type and spacing values come only from theme.json custom properties.
 * Media query widths are the two breakpoints the architecture fixes: 900 and 640.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--wp--preset--color--surface-page);
	color: var(--wp--preset--color--text-body);
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--type--body--line-height);
	font-weight: var(--wp--custom--type--body--weight);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: anywhere;
}

body.is-menu-open {
	overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure,
blockquote {
	margin: 0;
}

ul,
ol {
	padding: 0;
	list-style: none;
}

img,
picture,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--wp--preset--color--action-link);
	text-underline-offset: 0.15em;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	margin: 0;
}

button {
	cursor: pointer;
}

summary {
	list-style: none;
}

summary::-webkit-details-marker {
	display: none;
}

:focus {
	outline: none;
}

/* Focus ring: 3px ink with a 2px offset everywhere except the primary button. */
:focus-visible {
	outline: var(--wp--custom--focus--ring) solid var(--wp--preset--color--border-focus);
	outline-offset: var(--wp--custom--focus--offset);
	border-radius: var(--wp--custom--radius--button);
}

.is-ground-dark :focus-visible,
.is-ground-navy :focus-visible,
.is-ground-footer :focus-visible {
	outline-color: var(--wp--preset--color--border-focus-on-dark);
}

/* Skip link */
.ats-skip-link {
	position: absolute;
	top: var(--wp--preset--spacing--8);
	left: var(--wp--preset--spacing--8);
	z-index: 1000;
	padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--surface-card);
	color: var(--wp--preset--color--text-strong);
	font-weight: var(--wp--custom--type--weight-semibold);
	border-radius: var(--wp--custom--radius--button);
	transform: translateY(-200%);
}

.ats-skip-link:focus {
	transform: none;
}

.ats-main:focus {
	outline: none;
}

/* ---------------------------------------------------------------------
 * Type styles, mirroring the Figma ATS/Display and ATS/Text sets
 * ------------------------------------------------------------------ */

.ats-h1,
.ats-h2,
.ats-h3,
.ats-h4,
.ats-h5,
.ats-h6,
.ats-stat__figure,
.ats-step__number {
	text-wrap: balance;
	font-family: var(--wp--preset--font-family--display);
	color: var(--wp--preset--color--text-strong);
	text-wrap: balance;
}

.ats-h1 {
	font-size: var(--wp--preset--font-size--heading-1);
	line-height: var(--wp--custom--type--heading-1--line-height);
	letter-spacing: var(--wp--custom--type--heading-1--letter-spacing);
	font-weight: var(--wp--custom--type--heading-1--weight);
}

.ats-h2 {
	font-size: var(--wp--preset--font-size--heading-2);
	line-height: var(--wp--custom--type--heading-2--line-height);
	letter-spacing: var(--wp--custom--type--heading-2--letter-spacing);
	font-weight: var(--wp--custom--type--heading-2--weight);
}

.ats-h3 {
	font-size: var(--wp--preset--font-size--heading-3);
	line-height: var(--wp--custom--type--heading-3--line-height);
	letter-spacing: var(--wp--custom--type--heading-3--letter-spacing);
	font-weight: var(--wp--custom--type--heading-3--weight);
}

.ats-h4 {
	font-size: var(--wp--preset--font-size--heading-4);
	line-height: var(--wp--custom--type--heading-4--line-height);
	letter-spacing: var(--wp--custom--type--heading-4--letter-spacing);
	font-weight: var(--wp--custom--type--heading-4--weight);
}

.ats-h5 {
	font-size: var(--wp--preset--font-size--heading-5);
	line-height: var(--wp--custom--type--heading-5--line-height);
	letter-spacing: var(--wp--custom--type--heading-5--letter-spacing);
	font-weight: var(--wp--custom--type--heading-5--weight);
}

.ats-h6 {
	font-size: var(--wp--preset--font-size--heading-6);
	line-height: var(--wp--custom--type--heading-6--line-height);
	letter-spacing: var(--wp--custom--type--heading-6--letter-spacing);
	font-weight: var(--wp--custom--type--heading-6--weight);
}

.ats-lead {
	font-size: var(--wp--preset--font-size--lead);
	line-height: var(--wp--custom--type--lead--line-height);
	font-weight: var(--wp--custom--type--lead--weight);
}

.ats-body {
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--type--body--line-height);
}

.ats-small {
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--type--small--line-height);
}

.ats-small-strong {
	font-size: var(--wp--preset--font-size--small);
	line-height: var(--wp--custom--type--small-strong--line-height);
	font-weight: var(--wp--custom--type--small-strong--weight);
	color: var(--wp--preset--color--text-strong);
}

.ats-label {
	font-size: var(--wp--preset--font-size--label);
	line-height: var(--wp--custom--type--label--line-height);
	font-weight: var(--wp--custom--type--label--weight);
	color: var(--wp--preset--color--text-strong);
}

/* Prose: stacked paragraphs in the content column. */
.ats-prose > * + * {
	margin-top: var(--wp--preset--spacing--20);
}

.ats-prose p {
	max-width: var(--wp--custom--layout--measure);
}

.ats-measure {
	max-width: var(--wp--custom--layout--measure);
}

/* ---------------------------------------------------------------------
 * Grounds. Tone first, then whitespace, then a hairline.
 * ------------------------------------------------------------------ */

.is-ground-page {
	background: var(--wp--preset--color--surface-page);
}

.is-ground-tint {
	background: var(--wp--preset--color--surface-tint);
}

.is-ground-wash {
	background: var(--wp--preset--color--surface-wash);
}

.is-ground-dark {
	background: var(--wp--preset--color--surface-dark);
}

.is-ground-navy {
	background: var(--wp--preset--color--surface-navy);
}

.is-ground-footer {
	background: var(--wp--preset--color--surface-footer);
}

.is-ground-dark,
.is-ground-navy,
.is-ground-footer {
	color: var(--wp--preset--color--text-on-dark-body);
}

.is-ground-dark .ats-h1,
.is-ground-dark .ats-h2,
.is-ground-dark .ats-h3,
.is-ground-dark .ats-h4,
.is-ground-dark .ats-h5,
.is-ground-dark .ats-h6,
.is-ground-navy .ats-h1,
.is-ground-navy .ats-h2,
.is-ground-navy .ats-h3,
.is-ground-navy .ats-h4,
.is-ground-footer .ats-h1,
.is-ground-footer .ats-h2,
.is-ground-footer .ats-h3,
.is-ground-footer .ats-h4,
.is-ground-dark .ats-small-strong,
.is-ground-dark .ats-label {
	color: var(--wp--preset--color--text-on-dark-strong);
}

.is-ground-dark a,
.is-ground-navy a,
.is-ground-footer a {
	color: var(--wp--preset--color--action-link-on-dark);
}

/* ---------------------------------------------------------------------
 * Utilities
 * ------------------------------------------------------------------ */

.ats-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

[hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------------
 * Motion and print
 * ------------------------------------------------------------------ */

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

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	body {
		background: var(--wp--preset--color--surface-card);
		color: var(--wp--preset--color--text-strong);
	}

	.ats-skip-link,
	.ats-utility,
	.ats-menu,
	.ats-nav__cta,
	.ats-hero__media,
	.ats-hero__scrim,
	.ats-band__media,
	.ats-band__scrim,
	.ats-faq__media,
	.ats-faq__scrim,
	.ats-button,
	.ats-form__actions {
		display: none !important;
	}

	.is-ground-dark,
	.is-ground-navy,
	.is-ground-footer,
	.is-ground-tint,
	.is-ground-wash {
		background: var(--wp--preset--color--surface-card) !important;
		color: var(--wp--preset--color--text-strong) !important;
	}

	.is-ground-dark .ats-h1,
	.is-ground-dark .ats-h2,
	.is-ground-dark .ats-h3,
	.is-ground-dark .ats-h4,
	.is-ground-footer .ats-h4,
	.is-ground-dark a,
	.is-ground-footer a {
		color: var(--wp--preset--color--text-strong) !important;
	}

	.ats-faq-row__panel[hidden] {
		display: block !important;
	}

	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: var(--wp--preset--font-size--small);
	}

	.ats-section {
		break-inside: avoid;
	}
}
