/* ===== STAGE — общая база для всех вариантов ===== */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic-wght.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2");
  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 {
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-feature-settings: "ss01" 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
/* Цифры одной высоты и ширины везде: цены, даты, пробег, время, номера (Manrope — прописные цифры
   по умолчанию, tnum поддерживается). !important — чтобы шорткат font: у полей и подписей SVG не сбрасывал */
body, body * { font-variant-numeric: lining-nums tabular-nums !important; }
button { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 16px; border-radius: 10px;
  background: #fff; color: #000; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* Видимый фокус: двойное кольцо читается и на тёмном, и на светлом */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgb(127 127 127 / 0.35);
}

/* Только один вариант виден за раз */
.variant[hidden] { display: none !important; }

/* ===== Логотип: тот же PNG, без перерисовки ===== */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img {
  height: 30px; width: auto;
}
/* Тот же PNG служит маской по яркости: белый знак остаётся, тёмный фон исходника уходит.
   Пиксели логотипа не перерисовываются. Резерв — режим наложения. */
.logo img, .logo-mask {
  mix-blend-mode: screen;
}
@supports (mask-mode: luminance) {
  .logo img, .logo-mask {
    mix-blend-mode: normal;
    mask-image: url("../assets/stage-logo.png");
    mask-mode: luminance;
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
  }
}
.logo--on-light img {
  filter: invert(1);
  mix-blend-mode: multiply;
}
@supports (mask-mode: luminance) {
  .logo--on-light img { mix-blend-mode: normal; }
}

/* ===== Появление при скролле (общий механизм) ===== */
.reveal { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* Плавное появление варианта после переключения */
/* только при переключении: при первой загрузке контент виден сразу (важно для LCP) */
html.is-switching .variant { animation: variant-in .5s var(--ease-out) both; }
@keyframes variant-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .variant { animation: none; }
}
