/* ==========================================================================
   Н-ИНФО — база: reset, типографика, фокус, утилиты
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: var(--lh-normal);
	letter-spacing: var(--tracking-tight);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-synthesis-weight: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

h1,
h2,
h3,
h4 {
	font-weight: 700;
	line-height: var(--lh-tight);
	letter-spacing: -0.02em;
	text-wrap: balance;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

a {
	color: inherit;
	text-decoration: none;
}

img,
picture,
svg,
video {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}

button {
	border: 0;
	background: none;
	cursor: pointer;
	padding: 0;
}

address {
	font-style: normal;
}

/* Цены, метраж, температура, даты — единая ширина цифр. */
time,
.num,
[data-num] {
	font-variant-numeric: tabular-nums;
	font-feature-settings: 'tnum' 1;
}

/* --- Фокус ---------------------------------------------------------------
   Заменяет outline:0 на полях поиска в текущем шаблоне: там фокус
   вырезан без замены, что нарушает WCAG 2.4.7.
   ------------------------------------------------------------------------ */

:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
	border-radius: var(--r-xs);
}

.field:focus-within {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

.field:focus-within :focus-visible {
	outline: none;
}

/* --- Skip link ---------------------------------------------------------- */

.skip-link {
	position: fixed;
	top: var(--sp-2);
	left: 50%;
	z-index: var(--z-toast);
	padding: var(--sp-3) var(--sp-5);
	border-radius: var(--r-full);
	background: var(--text);
	color: var(--bg);
	font-size: var(--fs-sm);
	font-weight: 600;
	box-shadow: var(--shadow-3);
	transform: translate(-50%, calc(-100% - var(--sp-4)));
	transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus-visible {
	transform: translate(-50%, 0);
}

/* --- Утилиты ------------------------------------------------------------ */

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Обрезка по строкам вместо min-height, который в текущем шаблоне
   ломает выравнивание цен на трёхстрочных заголовках. */
.clamp-1,
.clamp-2,
.clamp-3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.clamp-1 {
	-webkit-line-clamp: 1;
	line-clamp: 1;
}

.clamp-2 {
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.clamp-3 {
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.icon {
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.icon--sm {
	width: 16px;
	height: 16px;
	stroke-width: 2;
}

.icon--lg {
	width: 24px;
	height: 24px;
	stroke-width: 1.6;
}

.icon--xl {
	width: 32px;
	height: 32px;
	stroke-width: 1.5;
}

/* Иконки-плашки, которые заливаются, а не обводятся. */
.icon--filled {
	fill: currentColor;
	stroke: none;
}

.eyebrow {
	display: block;
	color: var(--brand-text);
	font-size: var(--fs-xs);
	font-weight: 700;
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.sheet-scroll-lock {
	overflow: hidden;
}

/* --- Моция -------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
