/* ============ Shard VPN — общие стили ============ */

:root {
  --ink: #050814;
  --graphite: #4f5452;
  --royal: #2a5ea8;
  --sky: #9ccbe8;
  --ice: #e8ecf0;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.8, 0.24, 1);

  --btn: #2a5ea8;
  --btn-hover: #3570c0;
  --radius: 24px;
  --radius-sm: 14px;
  --wrap: 1200px;
  --pad: 32px;
  --header-h: 72px;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050814;
  --bg-alt: #070c1b;
  --surface: #0b1226;
  --surface-2: #111a31;
  --surface-3: #18233f;
  --line: rgba(156, 203, 232, 0.12);
  --line-strong: rgba(156, 203, 232, 0.24);
  --text: #e8ecf0;
  --muted: #a3afc2;
  --faint: #76839a;
  --link: #9ccbe8;
  --accent-soft: rgba(59, 125, 219, 0.16);
  --grad: linear-gradient(105deg, #b9dcf2 0%, #6aa6ea 45%, #3a74cf 100%);
  --panel-grad: linear-gradient(135deg, #1f4d93 0%, #2a5ea8 45%, #3f86d6 100%);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(156, 203, 232, 0.16);
  --spot-color: rgba(156, 203, 232, 0.14);
  --header-bg: rgba(5, 8, 20, 0.74);
  --danger: #ff8080;
  --success: #62d6a0;
  --globe-front: #a9d4ef;
  --globe-back: #2a5ea8;
  --globe-glow: rgba(42, 94, 168, 0.5);
  --globe-node: #ffffff;
  --globe-disc-a: rgba(42, 94, 168, 0.3);
  --globe-disc-b: rgba(42, 94, 168, 0.06);
  --pin-a: #b9dcf2;
  --pin-b: #2a5ea8;
  --pin-ring: #ffffff;
  --pin-shadow: rgba(0, 0, 0, 0.55);
  --chip-bg: rgba(11, 18, 38, 0.9);
  --chip-text: #e8ecf0;
  --card-shadow: none;
  --waves-near: #b9dcf2;
  --waves-far: #2a5ea8;
  --waves-glow: rgba(42, 94, 168, 0.45);
  --aurora-a: rgba(42, 94, 168, 0.24);
  --aurora-b: rgba(91, 155, 232, 0.12);
  --aurora-c: rgba(31, 77, 147, 0.22);
  --dot-c: rgba(156, 203, 232, 0.13);
  --grid-line: rgba(156, 203, 232, 0.07);
  --band-bg: rgba(11, 18, 38, 0.55);
  --halftone-c: rgba(156, 203, 232, 0.2);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #edf1f6;
  --bg-alt: #e3e9f0;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --surface-3: #e8eef5;
  --line: rgba(16, 38, 76, 0.09);
  --line-strong: rgba(16, 38, 76, 0.18);
  --card-shadow: 0 1px 2px rgba(16, 38, 76, 0.05), 0 12px 32px rgba(16, 38, 76, 0.07);
  --text: #050814;
  --muted: #4f5452;
  --faint: #737c84;
  --link: #2a5ea8;
  --accent-soft: rgba(42, 94, 168, 0.1);
  --grad: linear-gradient(105deg, #1f4d93 0%, #2a5ea8 45%, #4f95d8 100%);
  --panel-grad: linear-gradient(135deg, #1f4d93 0%, #2a5ea8 50%, #4b92d6 100%);
  --shadow: 0 20px 50px rgba(5, 8, 20, 0.1);
  --shadow-hover: 0 28px 60px rgba(5, 8, 20, 0.14), 0 0 0 1px rgba(42, 94, 168, 0.12);
  --spot-color: rgba(42, 94, 168, 0.08);
  --header-bg: rgba(237, 241, 246, 0.82);
  --danger: #c23b3b;
  --success: #1d8556;
  --globe-front: #2a5ea8;
  --globe-back: #7fb1dc;
  --globe-glow: rgba(110, 165, 220, 0.28);
  --globe-node: #050814;
  --globe-disc-a: rgba(255, 255, 255, 0.95);
  --globe-disc-b: rgba(170, 205, 236, 0.55);
  --pin-a: #4f95d8;
  --pin-b: #1f4d93;
  --pin-ring: #ffffff;
  --pin-shadow: rgba(16, 38, 76, 0.35);
  --chip-bg: rgba(255, 255, 255, 0.96);
  --chip-text: #050814;
  --waves-near: #1f4d93;
  --waves-far: #9ccbe8;
  --waves-glow: rgba(156, 203, 232, 0.4);
  --aurora-a: rgba(156, 203, 232, 0.55);
  --aurora-b: rgba(42, 94, 168, 0.12);
  --aurora-c: rgba(170, 205, 236, 0.5);
  --dot-c: rgba(42, 94, 168, 0.13);
  --grid-line: rgba(42, 94, 168, 0.08);
  --band-bg: rgba(255, 255, 255, 0.55);
  --halftone-c: rgba(42, 94, 168, 0.16);
}

/* Светлая тема: карточки с мягкой тенью, «призрачные» кнопки читаемы поверх видео */
.card, .qa, .feat, .plan, .net-list li, .pf, .fact, .flow li, .rate-table, .plans-common, .product-switch { box-shadow: var(--card-shadow); }
[data-theme="light"] .btn-ghost { background: rgba(255, 255, 255, 0.72); }
[data-theme="light"] .btn-ghost:hover { background: #ffffff; }

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

/* Инерционная прокрутка (Lenis, только мышь/тачпад) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Плавный переход между страницами */
@view-transition { navigation: auto; types: page; }
html:active-view-transition-type(page)::view-transition-old(root) { animation: vt-out 0.28s var(--ease-soft) both; }
html:active-view-transition-type(page)::view-transition-new(root) { animation: vt-in 0.42s var(--ease-soft) both; }
::view-transition-group(root) { animation-duration: 0.4s; }
.header { view-transition-name: site-header; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: transparent; /* фон несёт html — так за body видны фоновые «сияния» */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
img, svg, canvas, video { display: block; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Типографика ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
}
.kicker::before { content: ""; width: 20px; height: 1.5px; background: currentColor; }

.h1 {
  font-family: var(--display);
  font-size: clamp(34px, 5.2vw, 70px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); }
.muted { color: var(--muted); }

/* Набор: заголовки без «висячих» слов, абзацы без одиноких слов в последней строке */
.h1, .h2, .h3, h1, h2, h3 { text-wrap: balance; }
p, li, dd, .lead { text-wrap: pretty; }
.h1, .h2 { font-feature-settings: "kern" 1; }
.lead, p { hanging-punctuation: first; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease, color 0.3s ease, opacity 0.3s ease, scale 0.25s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { scale: 0.97; }
.btn-primary {
  background: var(--btn);
  color: #fff;
  box-shadow: 0 8px 24px rgba(42, 94, 168, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  background: var(--btn-hover);
  box-shadow: 0 12px 32px rgba(42, 94, 168, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--link); }
.btn-white { background: #fff; color: #0b1a33; }
.btn-white:hover { background: #e8f1fb; }
.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  transition: background 0.3s ease, border-color 0.3s ease, scale 0.25s var(--ease);
}
.icon-btn:hover { background: var(--accent-soft); border-color: var(--link); }
.icon-btn:active { scale: 0.92; }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle svg { animation: icon-in 0.5s var(--ease) both; }
@keyframes icon-in { from { opacity: 0; transform: rotate(-90deg) scale(0.6); } }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.header.is-solid,
.page-sub .header {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo svg { width: 32px; height: 32px; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--link);
  transform: translateX(-50%);
}

.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.burger { display: none; position: relative; z-index: 70; }
.burger span {
  display: block;
  width: 16px;
  height: 1.6px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.burger { align-content: center; gap: 4px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

.drawer, .scrim { display: none; }

/* ---------- Секции ---------- */
.section { position: relative; padding: 112px 0; }
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}
.sec-head .h2 { margin-top: 16px; max-width: 700px; }
.sec-head > p { max-width: 400px; color: var(--muted); }
.sec-head--center { flex-direction: column; align-items: center; text-align: center; }
.sec-head--center > p { max-width: 560px; }

.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---------- FAQ (details) ---------- */
.qa-list { display: flex; flex-direction: column; gap: 10px; }
.qa {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 0.2s ease;
}
.qa[open] { border-color: var(--line-strong); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.qa summary::-webkit-details-marker { display: none; }
.qa-ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--link);
  transition: transform 0.3s var(--ease), background 0.3s ease, color 0.3s ease;
}
.qa-ic svg { width: 12px; height: 12px; }
.qa[open] .qa-ic { transform: rotate(45deg); background: var(--btn); color: #fff; }
.qa-body { overflow: hidden; padding: 0 22px 22px; color: var(--muted); max-width: 720px; }
.qa-body p + p, .qa-body ul { margin-top: 10px; }
.qa-body a, .footer-about p a { color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .qa::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete;
  }
  .qa[open]::details-content { block-size: auto; }
}

/* ---------- Формы ---------- */
.field { display: grid; gap: 8px; }
.field > label, .field-label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.field-label .opt { text-transform: none; letter-spacing: 0; font-family: var(--font); font-weight: 500; }
.input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 15.5px;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 4px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 0; font-size: 13.5px; color: var(--danger); }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--btn); flex: none; }
.check-row a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.form-msg { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.form-msg--error { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.form-msg--ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }

/* ---------- Уведомления ---------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14.5px;
  font-weight: 500;
  animation: toast-in 0.35s var(--ease) both;
}
.toast--error { color: var(--danger); }
.toast--ok { color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 36px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-about p { margin-top: 14px; max-width: 300px; font-size: 14px; color: var(--muted); }
.footer-col h3 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: 14.5px; color: var(--muted); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--faint);
}

/* ---------- Появление ---------- */
/* Только opacity и transform — их считает видеокарта; blur на крупном тексте поверх видео дёргался */
html.reveal-on .reveal {
  transition:
    opacity 0.9s var(--ease-soft) var(--rd, 0s),
    transform 1.1s var(--ease) var(--rd, 0s);
}
html.reveal-on .reveal:not(.in-view) { opacity: 0; transform: translate3d(0, 18px, 0); will-change: opacity, transform; }

.rise { animation: rise 1s var(--ease) var(--d, 0.1s) both; will-change: opacity, transform; }
.rise.risen { animation: none; will-change: auto; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }

/* Видео проявляется, когда реально пошло воспроизведение (site.js ставит .is-playing) */
video[data-fade] { opacity: 0; transition: opacity 0.9s var(--ease-soft); }
video[data-fade].is-playing { opacity: 1; }

/* ---------- Отклик на курсор ---------- */
/* Класс .tilt ставит site.js. Наклон и блик рисуются через inline-стили и переменные --mx/--my/--spot. */
html.js .tilt {
  position: relative;
  transition-property: opacity, transform, filter, scale, border-color, box-shadow, background-color;
  transition-duration: 1.1s, 1.1s, 1.1s, 0.3s, 0.35s, 0.45s, 0.35s;
  transition-timing-function: var(--ease-soft);
  transition-delay: var(--rd, 0s), var(--rd, 0s), var(--rd, 0s), 0s, 0s, 0s, 0s;
}
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--spot-color), transparent 62%);
  opacity: var(--spot, 0);
  pointer-events: none;
}
.tilt--on-color { --spot-color: rgba(255, 255, 255, 0.16); }
.tilt.is-hover { box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
.tilt--on-color.is-hover { border-color: transparent; }
.tilt.is-press { scale: 0.98; }
/* Слои внутри карточки смещаются сильнее — эффект глубины */
.tilt [data-depth] { translate: calc(var(--px, 0) * var(--depth, 6px)) calc(var(--py, 0) * var(--depth, 6px)); }

/* ---------- Адаптив: общее ---------- */
@media (max-width: 960px) {
  :root { --pad: 20px; --header-h: 64px; }
  .nav, .header-tools .hide-mobile { display: none; }
  .burger { display: grid; }

  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(5, 8, 20, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .drawer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(86vw, 360px);
    padding: calc(var(--header-h) + 16px) 20px max(24px, env(safe-area-inset-bottom));
    border-left: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
    overflow-y: auto;
  }
  .drawer a.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
  }
  .drawer a.drawer-link:hover { background: var(--accent-soft); }
  .drawer a.drawer-link svg { width: 16px; height: 16px; color: var(--faint); }
  .drawer-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 20px; }
  body.menu-open { overflow: hidden; }
  /* Шапка поверх меню — чтобы крестик закрытия был виден */
  body.menu-open .header {
    z-index: 65;
    background: var(--header-bg);
    border-bottom-color: var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
  }
  body.menu-open .scrim { opacity: 1; visibility: visible; }
  body.menu-open .drawer { transform: none; visibility: visible; }

  .section { padding: 80px 0; }
  .sec-head { flex-direction: column; align-items: flex-start; margin-bottom: 32px; }
  .sec-head--center { align-items: center; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
  .footer-col h3 { font-size: 12px; }
  .footer-col ul { gap: 0; }
  .footer-col a { display: inline-block; padding: 9px 0; font-size: 15px; }
  .footer-bottom a { display: inline-block; padding: 8px 0; }
}

@media (max-width: 560px) {
  .lead { font-size: 16.5px; }
  .card { padding: 22px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal, .rise { opacity: 1 !important; transform: none !important; filter: none !important; }
  .tilt::after { display: none; }
}

/* ============ Фон: «сияния», узоры, ленты, шапки страниц ============ */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute;
  display: block;
  width: 64vmax;
  height: 64vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--aurora-a), transparent);
  animation: aurora-drift 40s ease-in-out infinite alternate;
  will-change: transform;
}
.aurora i:nth-child(1) { left: -18vmax; top: -16vmax; }
.aurora i:nth-child(2) { right: -24vmax; top: 18vh; background: radial-gradient(closest-side, var(--aurora-b), transparent); animation-duration: 52s; animation-delay: -14s; }
.aurora i:nth-child(3) { left: 18vw; bottom: -34vmax; background: radial-gradient(closest-side, var(--aurora-c), transparent); animation-duration: 60s; animation-delay: -30s; }
@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(9vmax, 7vmax, 0) scale(1.18); }
  100% { transform: translate3d(-7vmax, 12vmax, 0) scale(0.92); }
}

/* Секция с узором из точек, растворяющимся к краям */
.section--dots { isolation: isolate; }
.section--dots::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dot-c) 1.1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 25%, transparent 78%);
}
/* Полупрозрачная лента поперёк страницы */
.band { background: linear-gradient(180deg, transparent 0, var(--band-bg) 16%, var(--band-bg) 84%, transparent 100%); }

/* Шапка внутренних страниц */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + 84px) 0 76px; }
.page-hero-bg {
  position: absolute;
  inset: -24px;
  z-index: -1;
  translate: calc(var(--hx, 0) * -12px) calc(var(--hy, 0) * -8px);
}
.page-hero-bg canvas { display: block; width: 100%; height: 100%; color: var(--halftone-c); }
/* низ шапки растворяется через маски узоров, без сплошной заливки — «сияния» видны насквозь */
.page-hero .h1 { max-width: 880px; margin-top: 18px; font-size: clamp(32px, 4.8vw, 62px); }
.page-hero .lead { max-width: 34em; margin-top: 20px; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.55; color: color-mix(in srgb, var(--text) 78%, transparent); }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.crumbs a { color: var(--link); }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Варианты фона шапки */
.page-hero--grid .page-hero-bg {
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 72% 20%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 90% at 72% 20%, #000 15%, transparent 72%);
  animation: grid-pan 30s linear infinite;
}
@keyframes grid-pan { to { background-position: 56px 56px, 56px 56px; } }
.page-hero--grid::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 4%;
  top: -140px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--aurora-a), transparent);
  pointer-events: none;
}
.page-hero--dots .page-hero-bg {
  background-image: radial-gradient(var(--dot-c) 1.3px, transparent 1.8px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse 65% 85% at 78% 30%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 65% 85% at 78% 30%, #000 10%, transparent 70%);
  animation: dots-pan 45s linear infinite;
}
@keyframes dots-pan { to { background-position: 180px 90px; } }
.page-hero--glow .page-hero-bg {
  background:
    radial-gradient(closest-side, var(--aurora-a), transparent) 78% 0 / 680px 680px no-repeat,
    repeating-radial-gradient(circle at 78% 6%, transparent 0 46px, var(--grid-line) 46px 47.5px);
  -webkit-mask-image: radial-gradient(ellipse 60% 95% at 78% 6%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 95% at 78% 6%, #000 20%, transparent 70%);
}
.page-hero--waves .page-hero-bg {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 35%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 35%, #000 70%, transparent 100%);
}

@media (max-width: 960px) {
  .page-hero { padding: calc(var(--header-h) + 52px) 0 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora i, .page-hero-bg { animation: none !important; }
}
/* Первая секция сразу после шапки страницы — без двойного отступа */
.page-hero + .section { padding-top: 16px; }

/* ---------- Кнопка поддержки ---------- */
.support-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 52px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--btn);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 10px 30px rgba(5, 8, 20, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: background 0.2s ease, gap 0.3s var(--ease), padding 0.3s var(--ease), transform 0.2s ease;
}
.support-fab svg { width: 22px; height: 22px; flex: none; }
.support-fab span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.35s var(--ease); }
.support-fab:hover, .support-fab:focus-visible { background: var(--btn-hover); gap: 8px; padding: 0 20px 0 16px; }
.support-fab:hover span, .support-fab:focus-visible span { max-width: 120px; }
.support-fab:active { transform: scale(0.96); }
[data-theme="light"] .support-fab { box-shadow: 0 10px 28px rgba(16, 38, 76, 0.22); }
.menu-open .support-fab { opacity: 0; pointer-events: none; }
@media (max-width: 560px) { .support-fab { height: 48px; padding: 0 13px; } }
@media print { .support-fab { display: none; } }

/* ---------- Вход и регистрация в шапке: заметнее ---------- */
.btn-login, .btn-cab { gap: 7px; }
.btn-login svg, .btn-cab svg { width: 17px; height: 17px; flex: none; }
.btn-login { border-color: color-mix(in srgb, var(--link) 55%, transparent); color: var(--text); }
.btn-login:hover { border-color: var(--link); background: var(--accent-soft); }
.btn-glow { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 6px 22px color-mix(in srgb, var(--btn) 55%, transparent); }
.btn-glow:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset, 0 8px 28px color-mix(in srgb, var(--btn) 70%, transparent); }
.show-mobile { display: none; }
@media (max-width: 960px) {
  /* на телефоне и планшете — «Войти» синей кнопкой рядом с меню */
  .header-tools .btn-login { background: var(--btn); border-color: var(--btn); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--btn) 45%, transparent); }
  .header-tools .btn-cab .hide-mobile { display: none; }
  .header-tools .btn-cab .show-mobile { display: inline; }
}
@media (max-width: 400px) {
  .header .logo span { display: none; }
  .header-tools { gap: 8px; }
}
.header-tools .btn-login, .header-tools .btn-glow, .header-tools .btn-cab { height: 40px; padding: 0 18px; font-size: 14.5px; }
@media (max-width: 400px) { .header-tools .btn-login, .header-tools .btn-cab { padding: 0 14px; } }

/* ---------- Появление при входе ---------- */
/* Заголовки появляются по словам (site.js делит текст на .w); голубая часть — одним куском */
.split .w {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.38em, 0);
  transition: opacity 0.9s var(--ease-soft) var(--wd, 0s), transform 1.15s var(--ease) var(--wd, 0s);
  will-change: opacity, transform;
}
.split.words-on .w, html.reveal-on .split.in-view .w { opacity: 1; transform: none; }
html.reveal-on .reveal.split:not(.in-view) { opacity: 1; transform: none; }
/* Шапка мягко опускается — только на первой странице за визит */
@keyframes intro-down { from { opacity: 0; transform: translate3d(0, -14px, 0); } to { opacity: 1; transform: none; } }
html.intro .header-inner { animation: intro-down 1s var(--ease) 0.12s both; }
/* Фон шапки страницы проявляется медленно, из чуть большего масштаба */
@keyframes intro-media { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }
.page-hero-bg, .p-hero-dots { animation: intro-fade 1.6s var(--ease-soft) both; }
@media (prefers-reduced-motion: reduce) {
  .split .w { opacity: 1; transform: none; transition: none; }
  html.intro .header-inner, .page-hero-bg, .p-hero-dots { animation: none; }
}

/* ---------- Вход на сайт: круговое раскрытие ----------
   html.intro ставит скрипт в <head> на первой странице визита: до отрисовки страницу закрывает заслонка
   цвета фона, site.js рисует поверх canvas с расширяющимся кругом и убирает заслонку.
   Если скрипт не отработал — заслонка сама исчезает через 2,5 с. */
html.intro body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: radial-gradient(circle at 50% 50%, #0e2350, #03050c 75%);
  pointer-events: none;
  animation: intro-safety 0.4s ease 2.5s forwards;
}
html.intro.intro-run body::before { display: none; }
html[data-theme="light"].intro body::before { background: radial-gradient(circle at 50% 50%, #f7fbff, #c9def5 75%); }
@keyframes intro-safety { to { opacity: 0; visibility: hidden; } }
.intro-veil { position: fixed; inset: 0; z-index: 9999; width: 100%; height: 100%; pointer-events: none; }
/* Пока круг раскрывается, остальное появление чуть ждёт */
html.intro .rise { animation-delay: calc(var(--d, 0.1s) + 0.6s); }
html.intro .header-inner { animation-delay: 0.75s; }
:root { --ribbon-a: #b9dcf2; --ribbon-b: #2a5ea8; }
[data-theme="light"] { --ribbon-a: #4f95d8; --ribbon-b: #1f4d93; }
.intro-mark { position: fixed; left: 50%; top: 50%; z-index: 10000; width: 76px; height: 76px; opacity: 0; transform: translate(-50%, -50%) scale(0.82); pointer-events: none; will-change: transform, opacity; filter: drop-shadow(0 0 22px rgba(90, 160, 235, 0.45)); }
.intro-mark svg { width: 100%; height: 100%; display: block; }
