@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest-cyrillic-900.woff2") format("woff2");
  font-weight: 900;
  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("/assets/fonts/onest-latin-900.woff2") format("woff2");
  font-weight: 900;
  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;
}

:root {
  --c-black: #000000;
  --c-white: #FFFFFF;
  --c-lime: #DFFF00;
  --c-pink: #FF2DA8;
  --c-gray: #F2F2F2;
  --c-error: #C4007A; /* ошибки форм: тёмный розовый, контраст на белом >= 5:1 */

  /* фон карточек = цвет края обложки *-card-m.webp (медиана по кромке), чтобы не было шва */
  --case-bg-canele: #EBE7E4;
  --case-bg-plug: #F9F3EE;
  --case-bg-issue: #F9F5F2;
  --case-bg-rano: #F9F5F0;
  --case-bg-levenus: #FBF9F7;
  --case-bg-osnova: #F9F3EE;
  --case-bg-kitchens: #F8F2ED;
  --case-bg-yard: #F8F2ED;

  /* Нейтральные серые (текст и линии). Тонированные подложки карточек (#F9F9F8 и т. п.) остаются в секциях. */
  --c-text: #222222;        /* тёмный текст, ближе к чёрному */
  --c-text-muted: #555555;  /* основной вторичный текст */
  --c-text-subtle: #767676; /* подписи, плейсхолдеры (контраст на белом >= 4.5:1) */
  --c-text-faint: #949494;  /* декоративные подписи и тонкие линии */
  --c-line: #DDDDDD;        /* разделители, рамки */

  /* Шрифт заголовков: Onest 900 (self-hosted, см. @font-face выше). Только редакционные заголовки; UI, карточки, цены, формы — Inter. */
  --font-display: "Onest", "Inter", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --weight-body: 400;     /* основной текст */
  --weight-ui: 600;       /* кнопки, навигация, UI (Inter SemiBold по брендбуку) */
  --weight-display: 900;  /* заголовки */

  --content-max: 1440px;
  --header-h: 112px;
  /* единая сетка страницы: левый край контента у всех блоков = (ширина окна − до 1440px)/2 + --page-gutter */
  --page-gutter: 56px;
}

html {
  scrollbar-gutter: stable;
  font-optical-sizing: auto;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@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;
  }
}

@media (min-width: 901px) and (max-width: 1279px) { :root { --page-gutter: calc(100vw * 56 / 1280); } }
@media (min-width: 761px) and (max-width: 900px) { :root { --page-gutter: 32px; } }
@media (max-width: 760px) { :root { --page-gutter: 26px; } }
@media (max-width: 365px) { :root { --page-gutter: 20px; } }

/* контейнер страницы: по центру, до --content-max, боковые поля --page-gutter; фон/декор секции может выходить за него */
.container {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

section[id] { scroll-margin-top: var(--header-h); }

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

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-black);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  line-height: 1.4;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.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;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.6em;
  border: 0;
  border-radius: 999px;
  background: var(--c-pink);
  color: var(--c-white);
  font-family: var(--font-body);
  font-weight: var(--weight-ui);
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--c-pink);
  outline-offset: 3px;
}

/* компактная шапка: <= 900px (тот же порог в layout.css и header.js) */
@media (max-width: 900px) {
  :root { --header-h: 92px; }
}
