/*
 * Типографика сайта.
 *
 * Источник правды — этот файл. Настройки Kadence в Customizer (theme_mods)
 * остаются в базе, но перекрываются здесь: правки в Customizer на размеры
 * и шрифты больше не действуют.
 *
 * Шрифты локальные, Google Fonts не используется.
 */

/* Onest — variable, веса 400–500, кириллица и латиница отдельными файлами. */
@font-face {
	font-family: 'Onest';
	src: url('fonts/onest-cyrillic.woff2') format('woff2');
	font-weight: 400 500;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Onest';
	src: url('fonts/onest-latin.woff2') format('woff2');
	font-weight: 400 500;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Advent Pro — только логотип. Сабсет: кириллица + базовая пунктуация.
 * Латиницы в названии нет; если появится — подставится системным шрифтом.
 */
@font-face {
	font-family: 'Advent Pro';
	src: url('fonts/advent-pro-700-cyr.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0020-002F, U+0400-045F, U+00AB, U+00BB, U+2013-2014, U+2116;
}

/* Переменные Kadence: заголовки и текст переводим на Onest. */
body {
	--global-body-font-family: 'Onest', sans-serif;
	--global-heading-font-family: 'Onest', sans-serif;
	--global-primary-nav-font-family: 'Onest', sans-serif;
}

body,
:is(.entry-content, .editor-styles-wrapper),
:is(.entry-content, .editor-styles-wrapper) p,
:is(.entry-content, .editor-styles-wrapper) li,
:is(.entry-content, .editor-styles-wrapper) h1,
:is(.entry-content, .editor-styles-wrapper) h2,
:is(.entry-content, .editor-styles-wrapper) h3,
:is(.entry-content, .editor-styles-wrapper) h4,
:is(.entry-content, .editor-styles-wrapper) h5,
:is(.entry-content, .editor-styles-wrapper) h6,
#site-navigation .menu a,
#site-navigation .menu a * {
	font-family: 'Onest', sans-serif !important;
}

/* Логотип. */
.site-branding .site-title,
.site-branding .site-title a {
	font-family: 'Advent Pro', sans-serif !important;
	font-weight: 700;
	font-size: 24px;
	line-height: 1;
}
/* Основной текст. В редакторе канвас — .editor-styles-wrapper. */
body,
:is(.entry-content, .editor-styles-wrapper) p,
:is(.entry-content, .editor-styles-wrapper) li {
	font-size: 16px;
	line-height: 1.5;
}

:is(.entry-content, .editor-styles-wrapper) p {
	max-width: none;
}

/* Заголовки разделов. */
:is(.entry-content, .editor-styles-wrapper) h2 {
	font-size: 24.6px;
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: .045em;
	margin: 0 0 12px;
}

/* Мелкие капс-лейблы. */
:is(.entry-content, .editor-styles-wrapper) h4 {
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .1em;
}

/* Меню. */
#site-navigation .menu > li > a {
	font-size: 13px;
	letter-spacing: -.012em;
	padding-left: 7px;
	padding-right: 7px;
}

/*
 * Плотность главной. Ограничено .home: на внутренних страницах
 * промежутки остаются прежними.
 */
.home .kt-row-column-wrap {
	column-gap: 34px !important;
	row-gap: 20px !important;
}

.home .entry-content h2 {
	border-bottom: 1px solid #e6ded6;
	padding-bottom: 10px;
	margin-bottom: 14px;
}

/* Адаптив. */
@media (max-width: 1024px) {
	:is(.entry-content, .editor-styles-wrapper) h2 {
		font-size: 22px;
	}

	body,
	:is(.entry-content, .editor-styles-wrapper) p,
	:is(.entry-content, .editor-styles-wrapper) li {
		font-size: 15.5px;
	}

	.site-branding .site-title,
	.site-branding .site-title a {
		font-size: 22px;
	}
}

@media (max-width: 767px) {
	:is(.entry-content, .editor-styles-wrapper) h2 {
		font-size: 20px;
	}

	body,
	:is(.entry-content, .editor-styles-wrapper) p,
	:is(.entry-content, .editor-styles-wrapper) li {
		font-size: 15px;
	}

	.site-branding .site-title,
	.site-branding .site-title a {
		font-size: 19px;
		line-height: 1.15;
	}
}
