/*
 * Scoped DIR UI foundations.
 *
 * There are intentionally no unscoped element selectors in this file. Until a
 * view adds .dir-ui, these rules cannot alter the existing public website.
 */
.dir-ui,
.dir-ui *,
.dir-ui *::before,
.dir-ui *::after {
	box-sizing: border-box;
}

.dir-ui {
	color: var(--dir-ui-color-text);
	font-family: var(--dir-ui-font-body);
	font-size: var(--dir-ui-font-size-400);
	font-synthesis: none;
	line-height: var(--dir-ui-line-height-body);
	text-rendering: optimizelegibility;
}

.dir-ui :where(h1, h2, h3, h4, h5, h6) {
	margin-block: 0;
	color: inherit;
	font-family: var(--dir-ui-font-heading);
	font-weight: var(--dir-ui-font-weight-bold);
	letter-spacing: var(--dir-ui-letter-spacing-tight);
	line-height: var(--dir-ui-line-height-heading);
}

.dir-ui :where(p, ul, ol, dl, blockquote, figure) {
	margin-block: 0;
}

.dir-ui :where(a) {
	color: inherit;
	text-underline-offset: 0.18em;
}

.dir-ui :where(button, input, select, textarea) {
	color: inherit;
	font: inherit;
}

.dir-ui :where(img, svg) {
	display: block;
	max-width: 100%;
}

.dir-ui :where(:focus-visible) {
	outline: 3px solid var(--dir-ui-color-focus);
	outline-offset: 3px;
}

.dir-ui-container {
	width: min(
		calc(100% - (var(--dir-ui-container-padding) * 2)),
		var(--dir-ui-container-max)
	);
	margin-inline: auto;
}

.dir-ui-section {
	padding-block: clamp(var(--dir-ui-space-16), 8vw, var(--dir-ui-space-32));
}

@media (prefers-reduced-motion: reduce) {
	.dir-ui,
	.dir-ui *,
	.dir-ui *::before,
	.dir-ui *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
