/* Единая дизайн-система south.VPN: токены, шрифты, шапка, подвал и базовые компоненты.
   Без inline-стилей и JS-зависимостей (совместимо со строгой CSP и статическим /legal). */

@font-face {
  font-family: Onest;
  src: url('/Onest.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Geologica;
  src: url('/Geologica-v2.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url('/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c0a22;
  --bg-2: #141036;
  --bg-3: #1c1747;
  --surface-1: rgba(255, 255, 255, .042);
  --surface-2: rgba(255, 255, 255, .072);
  --surface-card: rgba(20, 16, 54, .78);
  --surface-glass: rgba(12, 10, 34, .82);
  --line: rgba(230, 224, 255, .15);
  --line-soft: rgba(230, 224, 255, .09);
  --line-hi: rgba(230, 224, 255, .30);
  --line-amb: rgba(255, 168, 86, .52);
  --ink: #f2f0eb;
  --muted: #c6c4d8;
  --faint: #9895b4;
  --amb: #ff9a3d;
  --amb-hi: #ffb870;
  --amb-bg: rgba(255, 154, 61, .13);
  --ok: #7fdca4;
  --ok-bg: rgba(127, 220, 164, .12);
  --bad: #ff8f8f;
  --bad-bg: rgba(255, 143, 143, .12);
  --sans: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --display: Geologica, Onest, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 14px;
  --r-lg: 20px;
  --rb: 10px;
  --pill: 999px;
  --wrap: 1160px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --drop: 0 18px 48px rgba(4, 3, 18, .42);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.58 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sr, .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;
}
.skip {
  position: absolute; left: -10000px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.skip:focus {
  left: 16px; top: 16px; z-index: 99;
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: var(--rb); font-weight: 500; text-decoration: none;
}

:focus-visible { outline: 2px solid var(--amb-hi); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-brand { stroke: none; }

.wrap { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ---------- Единая липкая шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  border-bottom: 1px solid var(--line-soft);
}
.site-header-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 28px;
  min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0;
  font: 600 22px/1 var(--display); letter-spacing: -.04em;
  text-decoration: none; color: var(--ink); flex: none;
}
.brand span { font-weight: 300; color: var(--muted); }
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-right: 9px;
  background: var(--amb); box-shadow: 0 0 12px rgba(255, 154, 61, .75);
  flex: none;
}

.site-nav { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px;
  border-radius: var(--rb); font-size: 14.5px; color: var(--muted);
  text-decoration: none; transition: color .18s var(--ease), background .18s var(--ease);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-1); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--amb-bg); }

.site-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-cab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--rb);
  border: 1px solid var(--line-amb); background: var(--amb-bg);
  color: var(--amb-hi); font: 500 14px/1 var(--sans); text-decoration: none;
  white-space: nowrap; transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn-cab:hover { background: rgba(255, 154, 61, .22); border-color: var(--amb); color: var(--ink); }
.btn-cab[aria-current="page"] { background: var(--amb); color: #16122f; border-color: var(--amb); }

.motion-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 50%;
  width: 36px; height: 36px; color: var(--muted); cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.motion-toggle:hover { border-color: var(--line-hi); color: var(--ink); }

/* Мобильное меню на чистом HTML/CSS (<details>), работает без JS на всех страницах */
.nav-menu { display: none; position: relative; }
.nav-toggle {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--rb);
  background: var(--surface-1); color: var(--ink); cursor: pointer;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle-bars { display: grid; gap: 4.5px; width: 16px; }
.nav-toggle-bars i { display: block; height: 1.8px; border-radius: 2px; background: currentColor; }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 32px));
  background: #17133d; border: 1px solid var(--line-hi); border-radius: var(--r);
  padding: 10px; box-shadow: var(--drop); display: grid; gap: 4px; z-index: 50;
}
.nav-panel a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 15px;
}
.nav-panel a:hover, .nav-panel a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.nav-panel .nav-panel-cta {
  margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.nav-panel .nav-panel-cta a {
  background: var(--amb-bg); border: 1px solid var(--line-amb); color: var(--amb-hi); font-weight: 500; justify-content: center;
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-menu { display: block; }
  .site-header-in { padding: 0 18px; min-height: 60px; }
  .wrap { padding: 0 18px; }
}
@media (max-width: 520px) {
  .btn-cab { min-height: 38px; padding: 0 11px; font-size: 13px; }
  .motion-toggle { display: none; }
  .brand { font-size: 19px; }
  .site-header-in { padding: 0 14px; gap: 8px; }
  .wrap { padding: 0 16px; }
  .site-footer-in { padding: 0 16px; }
}

/* ---------- Кнопки и карточки ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 11px 20px; border: 1px solid rgba(230, 224, 255, .18);
  border-radius: var(--rb); background: var(--surface-1); color: var(--ink);
  font: 500 15px/1.35 var(--sans); text-decoration: none; text-align: center;
  cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease), transform .15s var(--ease), box-shadow .22s var(--ease);
}
.button:hover:not(:disabled) { border-color: var(--line-hi); background: var(--surface-2); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.button-primary {
  background: var(--ink); color: #16122f; border-color: var(--ink); font-weight: 550;
}
.button-primary:hover:not(:disabled) {
  background: #ffffff; border-color: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(255, 154, 61, .68);
}
.button-accent {
  background: var(--amb); color: #16122f; border-color: var(--amb); font-weight: 550;
}
.button-accent:hover:not(:disabled) {
  background: var(--amb-hi); border-color: var(--amb-hi);
  box-shadow: 0 10px 28px -10px rgba(255, 154, 61, .72);
}
.button-outline { background: var(--surface-1); color: var(--ink); border-color: var(--line); }
.button-wide { width: 100%; }
.button:disabled, .button[aria-busy="true"], .disabled, [aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; box-shadow: none; transform: none;
}
.button-danger {
  background: rgba(255, 143, 143, .08);
  border-color: rgba(255, 143, 143, .42);
  color: var(--bad);
}
.button-danger:hover:not(:disabled) { background: var(--bad-bg); border-color: var(--bad); }

.card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  backdrop-filter: blur(12px);
}
.label {
  font: 500 12px/1.2 var(--sans); letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
}
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 14px; }
.small { font-size: 14px; }
.link { color: var(--amb-hi); text-underline-offset: 4px; }
.text-button { border: 0; background: none; color: var(--amb-hi); padding: 8px 0; text-decoration: underline; font: inherit; cursor: pointer; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12.5px/1.2 var(--sans); letter-spacing: .03em;
  padding: 4px 10px; border-radius: var(--pill);
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.tag.on { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--amb-bg); color: var(--amb-hi); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }

.notice {
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border-left: 3px solid var(--amb); background: var(--amb-bg);
  border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px;
}

/* ---------- Единый подвал ---------- */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  color: var(--faint); font-size: 14px;
}
.site-footer-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
}
.site-footer-brand { display: grid; gap: 4px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer-links a {
  display: inline-flex; align-items: center; min-height: 36px;
  color: var(--muted); text-decoration: none;
}
.site-footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.site-footer-meta {
  width: 100%; padding-top: 14px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  font-size: 13px; color: var(--faint);
}
.site-footer-meta a { color: var(--muted); text-underline-offset: 3px; }
@media (max-width: 860px) {
  .site-footer-in { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
