/**
 * Базовый сброс и типографика. Минимальный современный ресет + приведение
 * стандартных HTML-элементов к единому виду.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-main);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--gap-md);
	font-weight: 500;
	line-height: 1.3;
	color: var(--color-accent);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
	margin: 0 0 var(--gap-md);
}

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

a:hover,
a:focus-visible {
	color: var(--color-accent);
}

ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

button {
	font-family: inherit;
	cursor: pointer;
}

input,
textarea,
select {
	font-family: inherit;
	font-size: inherit;
}

table {
	border-collapse: collapse;
	width: 100%;
}

/* Доступность: явный фокус для клавиатурной навигации */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* Скрытие для скринридеров, но не для клавиатурной навигации (пропустить к содержимому) */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--color-accent);
	color: var(--color-white);
	padding: 12px 20px;
	z-index: 10000;
	transition: top var(--transition-fast);
}

.skip-link:focus {
	top: 0;
}
