/* Home page patterns. Tokens only. */

:root {
	--xa-px: var(--wp--custom--section-pad-x);
}

/* Patterns own their spacing: neutralise flow-layout margins inside them. */
:is(.xa-hero, .xa-hprocess, .xa-hquote, .xa-hcta) :where(.is-layout-flow, .is-layout-constrained) > *,
:is(.xa-hero, .xa-hprocess, .xa-hquote, .xa-hcta).is-layout-flow > * {
	margin-block: 0;
}

.xa-kicker {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--accent);
}

/* ---------- Hero ---------- */
@keyframes xa-float {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-14px);
	}
}

@keyframes xa-cue {
	0% {
		transform: translateY(0);
		opacity: 1;
	}

	70% {
		transform: translateY(14px);
		opacity: 0;
	}

	100% {
		opacity: 0;
	}
}

.xa-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 100vh;
	min-height: 100svh;
	padding: 140px var(--xa-px) 56px;
	overflow: hidden;
	isolation: isolate;
}

/* Glow, dot grid and grain layers. */
.xa-hero::before,
.xa-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.xa-hero::before {
	background:
		radial-gradient(at 12% 18%, var(--wp--preset--color--accent-soft) 0, transparent 50%),
		radial-gradient(at 88% 8%, var(--wp--preset--color--coral-soft) 0, transparent 42%),
		radial-gradient(at 72% 92%, var(--wp--preset--color--accent-mist) 0, transparent 48%);
}

.xa-hero::after {
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
		radial-gradient(var(--wp--preset--color--line-strong) 1.1px, transparent 1.3px);
	background-size: 180px 180px, 22px 22px;
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
	mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
	opacity: 0.7;
	mix-blend-mode: multiply;
}

.xa-hero__badges {
	position: absolute;
	right: clamp(20px, 8vw, 140px);
	top: 22%;
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: flex-end;
	pointer-events: none;
}

.xa-hero__badge {
	margin: 0;
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 12px 16px;
	border-radius: 14px;
	background: color-mix(in srgb, var(--wp--preset--color--surface) 70%, transparent);
	border: 1px solid var(--wp--preset--color--line);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 12px 32px color-mix(in srgb, var(--wp--preset--color--ink) 8%, transparent);
	font-size: 14px;
	font-weight: 600;
	animation: xa-fade-up 0.9s 0.9s both, xa-float 7s 1.8s ease-in-out infinite;
}

.xa-hero__badge--cited {
	position: relative;
}

.xa-hero__badge--cited::before {
	content: "";
	width: 22px;
	height: 22px;
	flex: none;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
}

.xa-hero__badge--cited::after {
	content: "";
	position: absolute;
	left: 20px;
	top: 50%;
	width: 14px;
	height: 14px;
	margin-top: -7px;
	background: var(--wp--preset--color--white);
	-webkit-mask: url("../icons/check.svg") center / contain no-repeat;
	mask: url("../icons/check.svg") center / contain no-repeat;
}

.xa-hero__badge--metric {
	align-items: baseline;
	margin-right: 60px;
	font-size: 13px;
	font-weight: 400;
	color: var(--wp--preset--color--muted);
	animation-delay: 1.05s, 2s;
	animation-duration: 0.9s, 8s;
}

.xa-hero__badge--metric strong {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.04em;
	color: var(--wp--preset--color--accent);
}

.xa-hero__badge--pill {
	padding: 10px 14px;
	border: 0;
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--ink);
	box-shadow: none;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	animation-delay: 1.2s, 2.2s;
	animation-duration: 0.9s, 6s;
}

.xa-hero__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
}

.xa-hero__kicker {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--muted);
	animation: xa-fade-up 0.8s 0.1s both;
}

.xa-hero__title {
	margin: 0;
	font-size: clamp(56px, 10.5vw, 176px);
	font-weight: 700;
	letter-spacing: -0.055em;
	line-height: 0.9;
}

.xa-hero__row {
	display: flex;
	gap: 40px;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	width: 100%;
	animation: xa-fade-up 0.9s 0.7s both;
}

.xa-hero__lede {
	margin: 0;
	max-width: 520px;
	font-size: clamp(17px, 1.5vw, 21px);
	line-height: 1.55;
	color: var(--wp--preset--color--body);
	text-wrap: pretty;
}

.xa-hero__ctas {
	gap: 12px;
}

.xa-hero__cue {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	color: var(--wp--preset--color--muted);
	animation: xa-fade-up 0.8s 1.2s both;
}

.xa-hero__cue::before {
	content: "";
	width: 22px;
	height: 34px;
	box-sizing: border-box;
	border: 1.5px solid var(--wp--preset--color--muted);
	border-radius: 12px;
	background: linear-gradient(var(--wp--preset--color--muted), var(--wp--preset--color--muted)) center 6px / 3px 7px no-repeat;
}

@media (max-width: 760px) {
	.xa-hero__badges {
		top: 96px;
		right: var(--xa-px);
		transform: scale(0.85);
		transform-origin: top right;
	}

	.xa-hero__badge--metric,
	.xa-hero__badge--cited {
		display: none;
	}
}

/* ---------- Process ---------- */
.xa-hprocess {
	padding: 0 var(--xa-px) clamp(80px, 10vw, 140px);
}

.xa-hprocess__inner {
	display: flex;
	flex-direction: column;
	gap: 48px;
	max-width: 1440px;
	margin: 0 auto;
}

.xa-hprocess__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	flex-wrap: wrap;
}

.xa-hprocess__titles {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.xa-hprocess__title {
	margin: 0;
	font-size: clamp(44px, 6vw, 96px);
	letter-spacing: -0.05em;
	line-height: 0.95;
}

.xa-hprocess__lede {
	margin: 0;
	max-width: 420px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

.xa-hprocess__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 16px;
}

.xa-hstep {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-height: 320px;
	padding: 32px;
	border-radius: var(--wp--custom--radius--card-2);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	transition: transform 0.45s var(--wp--custom--ease--out), box-shadow 0.45s, border-color 0.3s;
}

.xa-hstep:hover {
	transform: translateY(-8px);
	box-shadow: 0 24px 48px color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent);
	border-color: var(--wp--preset--color--accent);
}

.xa-hstep__meta {
	display: flex;
	justify-content: space-between;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	color: var(--wp--preset--color--muted);
}

.xa-hstep__meta p {
	margin: 0;
}

.xa-hstep__name {
	margin: auto 0 0;
	font-size: 34px;
	letter-spacing: -0.04em;
	line-height: 1.1;
}

.xa-hstep__desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
	text-wrap: pretty;
}

/* ---------- Testimonial ---------- */
.xa-hquote {
	padding: 0 var(--xa-px) clamp(80px, 10vw, 140px);
}

.xa-hquote__card {
	display: flex;
	flex-direction: column;
	gap: 40px;
	max-width: 1440px;
	margin: 0 auto;
	padding: clamp(48px, 7vw, 110px);
	border-radius: var(--wp--custom--radius--band);
	background-color: var(--wp--preset--color--dark-deep);
	color: var(--wp--preset--color--dark-ink);
}

.xa-hquote__card::before {
	content: "\201C";
	height: 0.45em;
	font-size: clamp(80px, 9vw, 140px);
	font-weight: 800;
	line-height: 0.5;
	color: var(--wp--preset--color--accent-bright);
}

.xa-hquote__text {
	margin: 0;
	max-width: 1100px;
	font-size: clamp(28px, 3.6vw, 56px);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.15;
	text-wrap: pretty;
}

.xa-hquote__who {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-height: 56px;
	padding-left: 72px;
}

.xa-hquote__who::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 56px;
	height: 56px;
	margin-top: -28px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--dark-bubble);
	background-image: repeating-linear-gradient(135deg, var(--wp--preset--color--dark-line) 0 1px, transparent 1px 8px);
}

.xa-hquote__name {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
}

.xa-hquote__role {
	margin: 0;
	font-size: 14px;
	color: var(--wp--preset--color--dark-muted);
}

/* ---------- Closing CTA ---------- */
.xa-hcta {
	position: relative;
	padding: clamp(100px, 14vw, 200px) var(--xa-px);
	overflow: hidden;
	text-align: center;
	isolation: isolate;
}

.xa-hcta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(ellipse at 50% 100%, var(--wp--preset--color--accent-mist) 0, transparent 60%),
		radial-gradient(at 85% 20%, var(--wp--preset--color--coral-soft) 0, transparent 40%);
	pointer-events: none;
}

.xa-hcta__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 36px;
	max-width: 1100px;
	margin: 0 auto;
}

.xa-hcta__title {
	margin: 0;
	font-size: clamp(56px, 9vw, 160px);
	letter-spacing: -0.055em;
	line-height: 0.9;
}

.xa-hcta__lede {
	margin: 0;
	max-width: 560px;
	font-size: clamp(17px, 1.4vw, 20px);
	line-height: 1.55;
	color: var(--wp--preset--color--body);
}

.xa-hcta__ctas {
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	align-items: center;
}
