/* Сброс, сетка и общие утилиты. Токены — в tokens.css. */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--sim-color-bg-page);
	color: var(--sim-color-text-primary);
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.2;
	-webkit-font-smoothing: antialiased;
}

/*
 * Атрибут hidden должен прятать элемент даже там, где мы задали ему display.
 * Иначе вёрстка перебивает его, и скрытые блоки остаются на виду.
 */
[hidden] {
	display: none !important;
}

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

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
}

/* Контейнер контента. Боковые поля не дают прилипнуть к краю на телефоне. */
.sim-container {
	width: 100%;
	max-width: calc(var(--sim-container) + var(--sim-gutter) * 2);
	margin: 0 auto;
	padding-left: var(--sim-gutter);
	padding-right: var(--sim-gutter);
}

/* Вертикальный ритм между секциями страницы. */
.sim-section {
	padding-top: var(--sim-space-40);
	padding-bottom: var(--sim-space-40);
}

@media (min-width: 1200px) {
	.sim-section {
		padding-top: var(--sim-space-section);
		padding-bottom: var(--sim-space-section);
	}
}

/* Видно скринридеру, не видно глазу. */
.sim-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Единый фокус у всех интерактивных элементов. */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
	outline: none;
	box-shadow: var(--sim-focus-ring);
	border-radius: var(--sim-radius-8);
}
