/* Reanet — общие шрифты и шапка (локально, без CDN в runtime) */

@font-face {
  font-family: "MontserratCustom";
  src: url("/montserrat-v31-cyrillic_latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MontserratCustom";
  src: url("/montserrat-v31-cyrillic_latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Как на reanet.ru (WP uploads): латинский Caveat, не cyrillic-subset */
@font-face {
  font-family: "CaveatCustom";
  src: url("/caveat-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CaveatCustom";
  src: url("/caveat-bold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

html {
  /* Скролл на html: иначе overflow-x на body ломает scrollbar-gutter и ширина «прыгает» */
  scrollbar-gutter: stable;
  overflow-x: clip;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  overflow-x: clip;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 200;
  padding: 10px 16px;
  font-family: "MontserratCustom", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #050508;
  background: #f4f4f6;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.skip-link:focus {
  position: fixed;
  left: var(--page-pad);
  top: max(8px, env(safe-area-inset-top, 0px));
  width: auto;
  height: auto;
  overflow: visible;
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

:root {
  --page-pad: clamp(18px, 4vw, 32px);
  --header-h: 56px;
  --header-pad-bottom: 12px;
  --header-pad-top: max(12px, env(safe-area-inset-top, 0px));
  --site-header-block: calc(var(--header-pad-top) + var(--header-h) + var(--header-pad-bottom));
  --brand-red: #ff0000;
  --logo-size: clamp(28px, 6.5vw, 34px);
  --logo-tracking: 2.2px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-sizing: border-box;
  height: var(--site-header-block);
  min-height: var(--site-header-block);
  padding: var(--header-pad-top) var(--page-pad) var(--header-pad-bottom);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(to bottom, rgba(5, 5, 8, 0.92) 0%, rgba(5, 5, 8, 0.75) 72%, transparent 100%);
  pointer-events: none;
}

.site-header a,
.site-header nav {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  height: var(--header-h);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-word {
  font-family: "CaveatCustom", sans-serif;
  font-size: var(--logo-size);
  font-weight: 600;
  font-style: normal;
  line-height: 1.15;
  letter-spacing: var(--logo-tracking);
  color: #ffffff;
  white-space: nowrap;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.brand-word .r {
  color: var(--brand-red);
}

.nav {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: var(--header-h);
  gap: clamp(10px, 2.5vw, 24px);
  font-family: "MontserratCustom", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav a {
  color: rgba(244, 244, 246, 0.58);
  text-decoration: none;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: #f4f4f6;
}

.nav-cta {
  color: #f4f4f6 !important;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta:hover {
  border-color: rgba(255, 42, 42, 0.45);
  background: rgba(255, 42, 42, 0.1);
}

@media (max-width: 768px) {
  .nav a.nav-hide-mobile {
    display: none;
  }

  .nav {
    gap: clamp(6px, 1.8vw, 12px);
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .nav-cta {
    padding: 7px 11px;
    font-size: 9px;
  }
}

/* Внутренние страницы */
body.inner-page {
  min-height: 100vh;
  font-family: "MontserratCustom", system-ui, sans-serif;
  background: #050508 radial-gradient(ellipse at top, #12121a 0%, #050508 55%);
  color: #f4f4f6;
  padding:
    calc(var(--site-header-block) + 16px)
    var(--page-pad)
    max(32px, env(safe-area-inset-bottom));
}

.inner-page .wrap {
  max-width: 640px;
  margin: 0 auto;
}
