/*
 * Combined advanced reset:
 * - Josh W. Comeau — https://www.joshwcomeau.com/css/custom-css-reset/
 * - Andy Bell — prefers-reduced-motion
 *
 * Медиазапросы — в конце файла.
 */

/* 1. Box-sizing */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
	margin: 0;
}

body {
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* 3. Media defaults */
img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

/* 4. Form controls */
input,
button,
textarea,
select {
	font-family: var(--font-family-base, 'Albert Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
	font-size: 1rem;
	line-height: 1.5;
}

/* 5. Text overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

p {
	text-wrap: pretty;
}

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

/* 6. SPA root (опционально) */
#root,
#__next {
	isolation: isolate;
}

/* --- Медиа: в конце --- */
@media (prefers-reduced-motion: no-preference) {
	html {
		interpolate-size: allow-keywords;
	}
}

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

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