/* UWebbz Technology - Foundations.
   Tokens live in theme.json. This layer covers element behaviour the
   theme.json schema can't express. See brand guidelines ch. 03-06, 11. */

html {
	scroll-behavior: smooth;
	scroll-padding-top: 6rem;
}

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

:is(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

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

::selection {
	background: var(--wp--preset--color--primary-100);
	color: var(--wp--preset--color--contrast);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

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

.has-tabular-nums {
	font-variant-numeric: tabular-nums;
}

/* Dark surfaces: Ink, Brand Depth, solid blue. Text flips to white and
   headings follow, so dark sections don't need per-block color overrides. */
.uw-on-dark,
.has-contrast-background-color,
.has-navy-background-color,
.has-primary-background-color,
.has-brand-depth-gradient-background,
.has-primary-dark-gradient-background,
.uw-hero {
	color: var(--wp--preset--color--base);
}

:is(.uw-on-dark, .has-contrast-background-color, .has-navy-background-color, .has-primary-background-color, .has-brand-depth-gradient-background, .has-primary-dark-gradient-background, .uw-hero) :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
}

:is(.uw-on-dark, .has-contrast-background-color, .has-navy-background-color, .has-primary-background-color, .has-brand-depth-gradient-background, .has-primary-dark-gradient-background, .uw-hero) a:not(.wp-block-button__link) {
	color: inherit;
	text-decoration-color: rgba(255, 255, 255, 0.45);
	text-underline-offset: 3px;
}

:is(.uw-on-dark, .has-contrast-background-color, .has-navy-background-color, .has-primary-background-color, .has-brand-depth-gradient-background, .has-primary-dark-gradient-background, .uw-hero) :focus-visible {
	outline-color: var(--wp--preset--color--base);
}

.uw-muted {
	color: var(--wp--preset--color--gray);
}

:is(.uw-on-dark, .has-contrast-background-color, .has-navy-background-color, .has-primary-background-color, .has-brand-depth-gradient-background, .has-primary-dark-gradient-background, .uw-hero) .uw-muted {
	color: rgba(255, 255, 255, 0.78);
}

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

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