:root {
	--vk-font: 'IBM Plex Sans', Arial, Helvetica, sans-serif;
	--vk-transition: 0.2s ease-in-out;
	--vk-section-pad-y: 75px;
	--vk-row-gap: 60px;
	--vk-accent: #daa520;
	--vk-accent-hover: #c69519;
}

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

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote) {
	margin: 0;
}

/* Ритм задаёт нижний отступ, поэтому у последнего элемента потока его нет:
   удалили или переставили элемент — зазор секции не вырос. */
.slider__content > :last-child,
.categories__inner > :last-child,
.card__content > :last-child,
.about__content > :last-child,
.feature__body > :last-child,
.showcase__content > :last-child,
.split__content > :last-child,
.promo__content > :last-child,
.products__inner > :last-child,
.product > :last-child,
.site-footer__inner > :last-child,
.site-footer__col > :last-child {
	margin-bottom: 0;
}

/* Сдвиг блоков до появления при прокрутке не должен давать горизонтальный скролл.
   clip вместо hidden: не создаёт контейнер прокрутки и не ломает sticky.
   Нужны оба селектора: на одном корне Chrome оставляет прокрутку. */
html,
body {
	overflow-x: clip;
}

/* Переход по ссылке-якорю прокручивает страницу плавно; тем, кто просил
   меньше движения в системе, страница по-прежнему прыгает сразу. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	font-family: var(--vk-font);
	background: #ffffff;
	color: #111111;
}

/* Текст сайта набран светлым начертанием, а браузерное «жирнее» отсчитывается
   от него и даёт всего 400 — выделения в тексте пропадают. Задаём вес явно. */
b,
strong {
	font-weight: 700;
}

.icon-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 12px 20px;
	background: #ffffff;
	color: #000000;
	font-size: 14px;
	text-decoration: none;
}

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

/* Кнопка */

.button {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 30px;
	border: 0;
	border-radius: 20px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color var(--vk-transition), color var(--vk-transition);
}

.button--light {
	background: #ffffff;
	color: #000000;
}

.button--light:hover {
	background: #e8e8e8;
	color: #111111;
}

.button--accent {
	min-height: 60px;
	padding: 8px 60px;
	border-radius: 8px;
	font-size: 16px;
	color: #ffffff;
	background: var(--vk-accent);
}

.button--accent:hover {
	background: var(--vk-accent-hover);
	color: #ffffff;
}

.button--outline {
	min-height: 45px;
	padding: 8px 30px;
	border: 1px solid #222222;
	border-radius: 3px;
	color: #222222;
	background: transparent;
}

.button--outline:hover {
	color: #ffffff;
	background: #222222;
}

.button--dark {
	color: #ffffff;
	background: #000000;
}

.button--dark:hover {
	background: #2b2b2b;
}

.button--muted {
	color: #000000;
	background: #e0e0e0;
}

.button--muted:hover {
	background: #cfcfcf;
}

/* Тёмный текст на цветной кнопке: на золотом фоне контраст 9,4:1 против 2,2:1 у белого */
.button--ink {
	color: #000000;
}

.button--ink:hover {
	color: #000000;
}


/* Ссылка-стрелка: текст без плашки, стрелка уезжает вправо при наведении */

.textlink {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.55;
	color: var(--vk-accent);
	text-decoration: none;
}

.textlink::after {
	content: "→";
	transition: transform var(--vk-transition);
}

.textlink:hover {
	color: var(--vk-accent-hover);
}

.textlink:hover::after {
	transform: translateX(4px);
}

/* Появление при прокрутке */

.is-animated {
	opacity: 0;
	transition-property: opacity, transform;
	transition-duration: 1s;
	transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}

.is-animated[data-animate="fade"] {
	transform: none;
}

.is-animated[data-animate="right"] {
	transform: translateX(-100px);
}

.is-animated[data-animate="left"] {
	transform: translateX(100px);
}

.is-animated[data-animate="down"] {
	transform: translateY(-100px);
}

.is-animated[data-animate="up"] {
	transform: translateY(100px);
}

.is-animated[data-animate="zoom"] {
	transform: scale(0.8);
}

.is-animated.is-visible {
	opacity: 1;
	transform: none;
}

/* Раскладка блоков редактора. Обычно эти правила приходят вместе с общими
   стилями движка, но их снимает оптимизатор сайта — без них галереи и колонки
   выстраивались в столбик. Промежуток отдаём через :where(), чтобы настройки
   самого блока оставались главнее. */
:where(.is-layout-flex) {
	gap: 0.5em;
}

.is-layout-flex {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

:where(.is-layout-grid) {
	gap: 0.5em;
}

.is-layout-grid {
	display: grid;
}

/* Выравнивание, заданное в редакторе, приходит теми же снятыми стилями. */
.has-text-align-center {
	text-align: center;
}

.has-text-align-left {
	text-align: left;
}

.has-text-align-right {
	text-align: right;
}

/* Media */

@media (max-width: 639px) {
	:root {
		--vk-section-pad-y: 50px;
	}

	.button--accent {
		min-height: 50px;
		padding: 8px 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.is-animated {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
