/* ============ G-SYSTEMs — монохромный техно-стиль, v2 ============ */

:root {
  --bg: #070707;
  --panel: #0e0e0e;
  --panel-2: #141414;
  --line: #262626;
  --line-strong: #454545;
  --text: #ececec;
  --muted: #9c9c9c;
  --white: #ffffff;
  --accent: #5aa7d8;
  --accent-dim: rgba(90, 167, 216, 0.35);
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sans: Inter, "Segoe UI", system-ui, Arial, sans-serif;
  --display: "Space Grotesk", Inter, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* блокировка прокрутки под открытым мобильным меню */
body.menu-open { overflow: hidden; }

::selection { background: var(--white); color: var(--bg); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* лёгкое зерно поверх всего сайта */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* полоса прогресса чтения */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 210;
}

/* ============ ДОСТУПНОСТЬ ============ */

/* ссылка «к содержанию» — видна только при фокусе с клавиатуры */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 400;
  padding: 10px 18px;
  background: var(--white);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: top 0.25s ease;
}
.skip-link:focus-visible { top: 12px; }

/* видимый фокус для клавиатуры, без рамки для мыши */
:focus-visible {
  outline: 1.5px solid var(--white);
  outline-offset: 3px;
}
a.btn:focus-visible, button:focus-visible, a.lang:focus-visible {
  outline-offset: 2px;
}

/* ============ ШАПКА ============ */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 48px);
  background: rgba(7, 7, 7, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s, padding 0.4s;
}

.header.scrolled {
  background: rgba(7, 7, 7, 0.88);
  border-bottom-color: var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--white);
  transition: transform 0.4s;
}

.brand:hover .brand-mark { transform: rotate(-6deg); }

.brand-name {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 15px;
  color: var(--white);
}

.brand-s { opacity: 0.5; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 34px);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.nav a {
  position: relative;
  padding: 6px 2px;
  color: var(--muted);
  transition: color 0.25s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}

.nav a:hover, .nav a.active { color: var(--white); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left; }

.nav .nav-cta {
  color: var(--bg);
  background: var(--white);
  padding: 9px 18px;
  font-weight: 600;
}
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { color: var(--bg); background: #cfcfcf; }

.nav .lang {
  border: 1px solid var(--line-strong);
  padding: 6px 11px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.nav .lang::after { display: none; }
.nav .lang:hover { color: var(--white); border-color: var(--white); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 220;
}
.burger span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ ГЕРОЙ ============ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

/* дублирующиеся слои технофона */
.layer {
  position: absolute;
  inset: -6%;
  background: url("assets/bg.webp") center / cover no-repeat;
  will-change: transform;
}

.layer-1 { opacity: 0.85; }

.layer-2 {
  transform: scaleX(-1);
  opacity: 0.3;
  mix-blend-mode: screen;
  animation: drift-a 26s ease-in-out infinite alternate;
}

.layer-3 {
  opacity: 0.18;
  mix-blend-mode: screen;
  filter: blur(3px);
  animation: drift-b 38s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: scaleX(-1) translate(0, 0) scale(1); }
  to   { transform: scaleX(-1) translate(2.5%, -2%) scale(1.06); }
}

@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.04); }
  to   { transform: translate(-2.5%, 2%) scale(1.12); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* «живая сеть» — фоновая анимация в герое */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.13) 2px 4px
  );
  pointer-events: none;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(0,0,0,0.88) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 130px clamp(16px, 4vw, 48px) 90px;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 20px;
  animation: fade-up 0.8s 0.1s both;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(46px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.02;
  color: var(--white);
  animation: fade-up 0.8s 0.25s both;
}

.hero-sub {
  margin-top: 24px;
  max-width: 500px;
  font-size: clamp(15px, 1.6vw, 17.5px);
  color: var(--muted);
  animation: fade-up 0.8s 0.4s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
  animation: fade-up 0.8s 0.55s both;
}

.hero-stats {
  display: flex;
  gap: clamp(20px, 4vw, 52px);
  margin-top: 52px;
  animation: fade-up 0.8s 0.7s both;
}

.stat {
  font-family: var(--mono);
  border-left: 1px solid var(--line-strong);
  padding-left: 14px;
}
.stat b { display: block; font-size: 21px; color: var(--white); }
.stat span { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ АНИМИРОВАННАЯ МИКРОСХЕМА ============ */

.hero-visual {
  animation: fade-up 1s 0.5s both, visual-float 7s 1.6s ease-in-out infinite alternate;
}

@keyframes visual-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-14px); }
}

.circuit {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  overflow: visible;
}

.circuit .orbit {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  stroke-dasharray: 0.012 0.02;
  transform-origin: 240px 240px;
}

.circuit .orbit-1 { animation: orbit-spin 70s linear infinite; }
.circuit .orbit-2 {
  stroke: rgba(255, 255, 255, 0.08);
  animation: orbit-spin 45s linear infinite reverse;
}

@keyframes orbit-spin { to { transform: rotate(360deg); } }

.circuit .trace {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: trace-draw 1.6s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.circuit .trace:nth-of-type(odd) { animation-delay: 0.9s; }
.circuit .trace:nth-of-type(even) { animation-delay: 1.3s; }

@keyframes trace-draw { to { stroke-dashoffset: 0; } }

/* импульсы, бегущие по дорожкам */
.circuit .signal {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0.1 0.9;
  stroke-dashoffset: 1.1;
  opacity: 0.9;
}

.circuit .s1 { animation: signal-run 2.6s 2.2s linear infinite; }
.circuit .s2 { animation: signal-run 3.4s 3.1s linear infinite; }
.circuit .s3 { animation: signal-run 2.9s 2.6s linear infinite; }
.circuit .s4 { animation: signal-run 3.8s 4s linear infinite; }

@keyframes signal-run {
  0%   { stroke-dashoffset: 1.1; }
  60%, 100% { stroke-dashoffset: -0.1; }
}

.circuit .node {
  fill: var(--bg);
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.5;
  opacity: 0;
  animation: node-in 0.5s 2s forwards;
}

.circuit .n1, .circuit .n4, .circuit .n9 {
  animation: node-in 0.5s 2s forwards, node-pulse 3s 3s ease-in-out infinite;
}

@keyframes node-in { to { opacity: 1; } }

@keyframes node-pulse {
  0%, 100% { stroke: rgba(255, 255, 255, 0.7); r: 4; }
  50% { stroke: var(--accent); r: 5.5; }
}

/* плавный наклон микросхемы за курсором */
.circuit { transition: transform 0.25s ease-out; will-change: transform; }

.circuit .chip {
  fill: #0a0a0a;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.12));
}

.circuit .chip-inner {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.circuit .chip-g {
  font-family: var(--display);
  font-size: 68px;
  font-weight: 700;
  letter-spacing: 0.02em;
  fill: var(--white);
  animation: chip-flicker 6s 3s steps(1) infinite;
}

@keyframes chip-flicker {
  0%, 92%, 96%, 100% { opacity: 1; }
  93%, 95% { opacity: 0.35; }
}

.circuit .corner {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1.5;
}

/* ============ ГЛИТЧ-ЗАГОЛОВОК ============ */

.glitch { position: relative; display: inline-block; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--white);
  pointer-events: none;
}

.glitch::before {
  text-shadow: -2px 0 rgba(255, 255, 255, 0.55);
  clip-path: inset(30% 0 40% 0);
  animation: glitch-a 3.2s infinite linear alternate-reverse;
}

.glitch::after {
  text-shadow: 2px 0 rgba(160, 160, 160, 0.6);
  clip-path: inset(60% 0 15% 0);
  animation: glitch-b 2.7s infinite linear alternate-reverse;
}

@keyframes glitch-a {
  0%   { clip-path: inset(12% 0 82% 0); transform: translateX(-3px); }
  20%  { clip-path: inset(54% 0 30% 0); transform: translateX(3px); }
  40%  { clip-path: inset(80% 0 5% 0);  transform: translateX(-2px); }
  60%  { clip-path: inset(30% 0 58% 0); transform: translateX(1px); }
  80%  { clip-path: inset(66% 0 12% 0); transform: translateX(-4px); }
  100% { clip-path: inset(8% 0 76% 0);  transform: translateX(2px); }
}

@keyframes glitch-b {
  0%   { clip-path: inset(70% 0 10% 0); transform: translateX(3px); }
  25%  { clip-path: inset(20% 0 66% 0); transform: translateX(-3px); }
  50%  { clip-path: inset(46% 0 40% 0); transform: translateX(2px); }
  75%  { clip-path: inset(88% 0 2% 0);  transform: translateX(-1px); }
  100% { clip-path: inset(34% 0 52% 0); transform: translateX(4px); }
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  z-index: 1;
}

.scroll-hint span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  background: var(--muted);
  border-radius: 2px;
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ БЕГУЩАЯ СТРОКА ============ */

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #0a0a0a;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 44px;
  width: max-content;
  padding: 15px 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  animation: ticker-move 30s linear infinite;
}

.ticker-track span { white-space: nowrap; }
.ticker-track i { font-style: normal; color: #3d3d3d; }

.ticker:hover .ticker-track { animation-play-state: paused; }

/* сдвиг -50% «спотыкается» о межэлементный отступ 44px (половина = 22px),
   поэтому точный бесшовный цикл — это -50% минус пол-отступа */
@keyframes ticker-move { to { transform: translateX(calc(-50% - 22px)); } }

/* ============ СЕКЦИИ ============ */

.section {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px);
}

.section-head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 640px; }

.section-tag {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 12px;
}

/* белые номера секций «// 01 — ...» */
.section-tag .tag-num {
  color: var(--white);
  font-weight: 700;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
  line-height: 1.1;
}

.section-lead {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15.5px;
}

/* ============ КАРТОЧКИ УСЛУГ ============ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}
.card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--white);
  background: #0b0b0b;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.card-icon svg { width: 23px; height: 23px; }
.card:hover .card-icon {
  border-color: rgba(90, 167, 216, 0.55);
  color: var(--accent);
  box-shadow: 0 0 18px rgba(90, 167, 216, 0.16);
}

.card-num {
  font-family: var(--mono);
  font-size: 13px;
  color: #4a4a4a;
  letter-spacing: 0.2em;
  transition: color 0.35s;
}

/* строка-домен в карточках кейсов */
.case-domain {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: #8a8a8a;
  padding-top: 4px;
}
.card:hover .card-num { color: var(--white); }

.card h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
}

.card p { font-size: 14.5px; color: var(--muted); flex-grow: 1; }

.card-tags {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #8a8a8a;
}

/* ============ ГЛИТЧ-РАЗДЕЛИТЕЛИ ============ */

.glitch-divider {
  height: 84px;
  background: url("assets/glitch.webp") center / 100% auto repeat-x;
  filter: invert(1) contrast(1.6) brightness(0.72);
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: divider-slide 34s linear infinite;
}

.glitch-divider.flip { transform: scaleY(-1); }

@keyframes divider-slide {
  from { background-position-x: 0; }
  to   { background-position-x: 1000px; }
}

/* ============ ТЕРМИНАЛ ============ */

.terminal-wrap {
  position: relative;
  padding: clamp(18px, 4vw, 44px);
  background: url("assets/hud.webp") center / cover no-repeat;
  border: 1px solid var(--line);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.terminal-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,7,7,0.25), rgba(7,7,7,0.55));
  pointer-events: none;
}

.terminal {
  position: relative;
  background: #050505;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 70px rgba(90, 167, 216, 0.06);
}

/* CRT-сканлайны поверх терминала */
.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(255, 255, 255, 0.02) 3px 4px
  );
  pointer-events: none;
  border-radius: inherit;
}

.terminal.shake { animation: term-shake 0.18s linear; }

@keyframes term-shake {
  25% { transform: translate(1.5px, -1px); }
  50% { transform: translate(-1.5px, 1px); }
  75% { transform: translate(1px, 1.5px); }
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1a1a1a, #101010);
  border-bottom: 1px solid #262626;
}

.t-dot { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3a; }
.t-dot:first-child { background: #e6e6e6; }
.t-dot:nth-child(2) { background: #8f8f8f; }

.terminal-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #dcdcdc;
}

.terminal-body {
  padding: 22px clamp(14px, 3vw, 28px) 26px;
  min-height: 430px;
  font-family: var(--mono);
  font-size: clamp(12.5px, 1.5vw, 14.5px);
  color: #e8e8e8;
}

.t-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3.5px 0;
  white-space: pre-wrap;
}

.t-ok {
  color: var(--white);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s, transform 0.25s;
  flex-shrink: 0;
}

.t-ok.on { opacity: 1; transform: translateX(0); }

.t-progress { padding: 10px 0 2px; letter-spacing: 0.04em; color: #cfcfcf; }

.t-complete {
  margin-top: 12px;
  padding: 3.5px 0;
  letter-spacing: 0.3em;
  border-bottom: 1px solid #4a4a4a;
  display: inline-block;
  color: var(--white);
}

.t-prompt { margin-top: 18px; display: flex; align-items: center; flex-wrap: wrap; }
.t-prompt .path { color: #9a9a9a; margin-right: 10px; }

.t-caret {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  background: var(--white);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink { 50% { opacity: 0; } }

.t-out { color: #9a9a9a; }
.t-out a {
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: border-color 0.25s;
}
.t-out a:hover { border-color: var(--white); }

/* ============ ФОРМА ЗАЯВКИ ============ */

.lead-form {
  max-width: 640px;
  margin: clamp(28px, 5vw, 44px) auto 0;
  text-align: left;
  display: grid;
  gap: 14px;
}

.lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lf-field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #707070;
  margin-bottom: 7px;
}

.lf-field input,
.lf-field textarea {
  width: 100%;
  background: #0b0b0b;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.lf-field input::placeholder,
.lf-field textarea::placeholder { color: #555; }
.lf-field input:focus,
.lf-field textarea:focus {
  outline: none;
  border-color: rgba(90, 167, 216, 0.6);
  box-shadow: 0 0 0 3px rgba(90, 167, 216, 0.12);
}

.lead-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.lead-actions .btn { justify-content: center; }

.lf-note {
  font-family: var(--mono);
  font-size: 12px;
  color: #707070;
}

/* ============ КОНТАКТЫ ============ */

.contacts { text-align: center; }

.contacts .section-head {
  max-width: none;
}

.contacts .section-lead {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(640px, 100%);
  margin: 0 auto;
}

.contact-actions .btn { justify-content: center; }

.contact-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 64px);
  margin-top: clamp(36px, 6vw, 60px);
  padding-top: clamp(24px, 4vw, 36px);
  border-top: 1px solid var(--line);
}

.ci { font-family: var(--mono); text-align: left; }

.ci-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #707070;
  margin-bottom: 6px;
}

.ci-value { font-size: 14.5px; color: var(--text); }
a.ci-value { border-bottom: 1px solid var(--line-strong); transition: border-color 0.25s; }
a.ci-value:hover { border-color: var(--white); }

/* ============ КНОПКИ ============ */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 13px 24px;
  border: 1px solid var(--white);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}

/* блик, пробегающий по кнопке */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.btn:hover::before { transform: translateX(130%); }

.btn svg { width: 15px; height: 15px; transition: transform 0.25s; }
.btn:hover svg { transform: translateX(4px); }

.btn-solid { background: var(--white); color: var(--bg); }
.btn-solid:hover {
  background: var(--bg);
  color: var(--white);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.btn-ghost { background: transparent; color: var(--white); border-color: var(--line-strong); }
.btn-ghost:hover {
  border-color: var(--white);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-lg { padding: 16px 32px; font-size: 15px; }

/* ============ ПОДВАЛ ============ */

.footer {
  border-top: 1px solid var(--line);
  background: #0a0a0a;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 52px) clamp(16px, 4vw, 48px);
}

.footer-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--white);
}

.footer-brand-block p {
  margin-top: 10px;
  max-width: 320px;
  font-size: 14px;
  color: var(--muted);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: clamp(28px, 4vw, 64px);
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-nav-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6e6e6e;
  margin-bottom: 4px;
}

.footer-nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.25s;
  width: fit-content;
}
.footer-nav a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  color: #5c5c5c;
}

/* ============ УСЛУГИ: 6 КАРТОЧЕК 3×2 ============ */

.cards.six { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ============ АРХИТЕКТУРА: ПОТОК ДАННЫХ ============ */

.flow {
  display: flex;
  align-items: stretch;
}

.flow-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  padding: 28px 16px;
  transition: border-color 0.35s, transform 0.35s;
}

.flow-node:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.flow-node:hover .flow-icon {
  border-color: rgba(90, 167, 216, 0.55);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(90, 167, 216, 0.14);
}

.flow-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--white);
  background: #0b0b0b;
  margin-bottom: 6px;
}
.flow-icon svg { width: 26px; height: 26px; }

.flow-node b {
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--white);
}

.flow-node span {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.flow-link {
  position: relative;
  width: clamp(20px, 4vw, 60px);
  align-self: center;
  height: 1px;
  background: var(--line-strong);
  flex-shrink: 0;
}

.flow-link i {
  position: absolute;
  top: -2.5px;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: packet-run 2.2s linear infinite;
}

.flow-link:nth-of-type(4) i { animation-delay: 0.7s; }
.flow-link:nth-of-type(6) i { animation-delay: 1.4s; }

@keyframes packet-run {
  0%   { left: 0; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

/* ============ ПОЧЕМУ МЫ ============ */

.why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: clamp(36px, 6vw, 56px);
}

.why-item {
  border-left: 2px solid var(--line-strong);
  padding: 4px 0 4px 18px;
  transition: border-color 0.35s;
}

.why-item:hover { border-left-color: var(--accent); }

.why-item b {
  display: block;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}

.why-item span { font-size: 13.5px; color: var(--muted); }

/* ============ О КОМПАНИИ ============ */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.about-text p {
  color: var(--muted);
  font-size: 15.5px;
  margin-bottom: 16px;
  max-width: 640px;
}

.about-text b { color: var(--white); font-weight: 600; }

.about-facts {
  display: grid;
  gap: 14px;
}

.fact {
  font-family: var(--mono);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 18px;
  transition: border-color 0.35s, transform 0.35s;
}

.fact:hover {
  border-color: rgba(90, 167, 216, 0.5);
  transform: translateX(4px);
}

.fact b { display: block; font-size: 24px; color: var(--white); }
.fact span { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }

.partners { margin-top: clamp(36px, 6vw, 56px); display: grid; gap: 26px; }

.partners-label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: #5c5c5c;
  margin-bottom: 12px;
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip-tag {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #0b0b0b;
  padding: 8px 16px;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: default;
}

.chip-tag:hover {
  color: var(--white);
  border-color: rgba(90, 167, 216, 0.55);
  box-shadow: 0 0 16px rgba(90, 167, 216, 0.14);
}

/* ============ ИЛЛЮСТРАЦИИ КЕЙСОВ ============ */

.case-illus {
  border: 1px solid var(--line);
  background: #0a0a0a;
  margin-bottom: 18px;
  overflow: hidden;
  transition: border-color 0.35s;
}

.card:hover .case-illus { border-color: var(--line-strong); }

.case-illus svg { display: block; width: 100%; height: auto; }

.illus-stroke { stroke: rgba(255, 255, 255, 0.55); fill: none; stroke-width: 1.6; stroke-linecap: round; }
.illus-faint  { stroke: rgba(255, 255, 255, 0.16); fill: none; stroke-width: 1.2; }
.illus-accent { fill: var(--accent); }
.illus-accent-line { stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; }
.illus-text { fill: var(--white); font-family: var(--mono); font-weight: 700; }
.illus-pulse { animation: illus-blink 2.2s ease-in-out infinite; }

@keyframes illus-blink { 50% { opacity: 0.25; } }

.case-more {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--white);
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.25s, transform 0.25s;
}

.case-more:hover { border-color: var(--white); transform: translateX(4px); }

/* ============ СТРАНИЦА ПОДРОБНЫХ КЕЙСОВ ============ */

.page-top { padding-top: 150px; }

.header-simple .nav {
  position: static;
  transform: none;
  flex-direction: row;
  background: none;
  backdrop-filter: none;
  font-size: 13px;
}

.case-article {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(36px, 6vw, 60px) 0;
  border-top: 1px solid var(--line);
}

.case-article:first-of-type { border-top: none; padding-top: 0; }

.case-side .case-domain { margin: 14px 0 12px; display: block; }

.case-stack { gap: 8px; }
.case-stack .chip-tag { font-size: 12px; padding: 6px 12px; }

.case-body h3 {
  font-family: var(--display);
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 600;
  color: var(--white);
}

.case-body h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #707070;
  margin: 20px 0 6px;
}

.case-body h4::before { content: "// "; color: var(--accent); }

.case-body p { color: var(--muted); font-size: 15px; max-width: 640px; }

.case-cta { margin-top: clamp(32px, 5vw, 48px); text-align: center; }

/* ============ ФОНЫ СЕКЦИЙ ============ */

.section-bg { position: relative; }

.section-bg::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--sbg) center / cover no-repeat;
  opacity: 0.13;
  filter: brightness(0.85);
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  pointer-events: none;
  z-index: -1;
}

.bg-services   { --sbg: url("assets/bg-services.webp"); }
.bg-monitoring { --sbg: url("assets/bg-monitoring.webp"); }
.bg-cases      { --sbg: url("assets/bg-cases.webp"); }
.bg-about      { --sbg: url("assets/bg-about.webp"); }

/* ============ КОМАНДА ============ */

.team-wrap { margin-top: clamp(36px, 6vw, 56px); }

.team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.team-card {
  margin: 0;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  overflow: hidden;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}

.team-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: filter 0.5s, transform 0.5s;
}

.team-card:hover .team-photo img {
  filter: grayscale(0.15) contrast(1.02);
  transform: scale(1.045);
}

.team-card figcaption { padding: 12px 14px 14px; }

.team-card b {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.team-card span {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ============ ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ ============ */

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(7px);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
  transition-delay: var(--d, 0s);
}

.reveal.visible { opacity: 1; transform: none; filter: blur(0); }

/* без JavaScript весь контент виден сразу (скрытие включается классом .js) */
.no-js .reveal { opacity: 1; transform: none; filter: none; }

/* ============ КУРСОР-ПРИЦЕЛ (десктоп) ============ */

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  pointer-events: none;
  z-index: 500;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width 0.25s, height 0.25s, margin 0.25s, opacity 0.35s, border-color 0.25s;
  will-change: transform;
}

.cursor-ring.on { opacity: 1; }

.cursor-ring.hover {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-color: var(--white);
}

/* ============ UI-СЛОЙ: палитра, boot, «наверх», CTA, статус ============ */

/* кнопка Ctrl K / ⌘K в шапке */
.pal-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.pal-btn:hover { color: var(--white); border-color: var(--line-strong); }

/* boot-заставка (показывается один раз за сессию, создаётся из JS) */
#boot {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.35s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-box {
  width: min(340px, 84vw);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  color: #8a8a8a;
}
.boot-line {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.boot-line.on { opacity: 1; transform: none; }
.boot-line b { color: var(--white); }
.boot-bar {
  margin-top: 12px;
  height: 3px;
  background: #151515;
  overflow: hidden;
}
.boot-bar span {
  display: block;
  height: 100%;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) { #boot { display: none; } }

/* палитра Ctrl+K */
.pal-overlay {
  position: fixed;
  inset: 0;
  z-index: 330;
  background: rgba(4, 4, 4, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.pal-overlay.open { opacity: 1; pointer-events: auto; }

.pal-box {
  width: min(640px, 100%);
  background: #0c0c0c;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.2s ease;
}
.pal-overlay.open .pal-box { transform: none; }

.pal-input {
  width: 100%;
  background: #0a0a0a;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--white);
  font-family: var(--mono);
  font-size: 15px;
  padding: 16px 18px;
  outline: none;
  caret-color: var(--accent);
}
.pal-input::placeholder { color: #555; }

.pal-list { max-height: 46vh; overflow-y: auto; padding: 8px; }

.pal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 11px 12px;
  cursor: pointer;
}
.pal-item.active {
  background: #141414;
  border-left-color: var(--accent);
  color: var(--white);
}
.pal-hint {
  flex-shrink: 0;
  color: #707070;
  font-size: 11.5px;
  letter-spacing: 0.06em;
}
.pal-empty {
  display: none;
  padding: 18px;
  color: #707070;
  font-family: var(--mono);
  font-size: 13px;
}

.pal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: #707070;
  font-family: var(--mono);
  font-size: 11.5px;
}
.pal-foot kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #9c9c9c;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
}

/* прокрутка заблокирована под палитрой */
body.palette-open { overflow: hidden; }

/* кнопка «наверх» */
#toTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  color: #bdbdbd;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, border-color 0.25s, color 0.25s;
}
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { border-color: rgba(90, 167, 216, 0.6); color: var(--white); }
#toTop svg { width: 18px; height: 18px; }

/* мобильная CTA-плашка Telegram */
#ctaBar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 150;
  transform: translate(-50%, 130%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#ctaBar.show { transform: translate(-50%, 0); }
.cta-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 12px 22px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.cta-pill svg { width: 15px; height: 15px; }
@media (min-width: 721px) { #ctaBar { display: none; } }

/* статус в подвале: ● online · 21:34:05 */
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: #8a8a8a;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(90, 167, 216, 0.8);
  animation: status-pulse 2.4s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* прорисовка логотипа при загрузке страницы */
.brand-mark rect,
.brand-mark path {
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
  animation: logo-draw 0.7s ease-out 0.15s forwards;
}
.brand-mark circle,
.brand-mark text {
  opacity: 0;
  animation: logo-fade 0.4s ease 0.55s forwards;
}
@keyframes logo-draw { to { stroke-dashoffset: 0; } }
@keyframes logo-fade { to { opacity: 1; } }

/* ============ СТРАНИЦА 404 ============ */

.nf-wrap {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 150px clamp(16px, 4vw, 48px) 70px;
}
.nf-inner { width: min(760px, 100%); margin: 0 auto; }
.nf-code {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(96px, 24vw, 190px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-top: 6px;
}
.nf-title {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 600;
  color: var(--white);
  margin-top: 18px;
}
.nf-lead {
  margin-top: 12px;
  max-width: 520px;
  font-size: 15.5px;
  color: var(--muted);
}
.nf-term { max-width: 560px; margin-top: clamp(28px, 5vw, 44px); }
.nf-term .terminal-body { min-height: 0; }
.nf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 40px);
}

/* ============ АДАПТИВ ============ */

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 120px;
  }
  .hero-visual { order: -1; max-width: 300px; margin: 0 auto; }
  .hero-stats { margin-top: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-facts { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .burger { display: flex; }

  /* backdrop-filter делает шапку containing block для fixed-меню —
     на телефонах отключаем его, иначе меню рисуется внутри шапки */
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(7, 7, 7, 0.94);
  }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    background: rgba(5, 5, 5, 0.96);
    backdrop-filter: blur(10px);
    font-size: 17px;
    transform: translateY(-100%);
    /* закрытое меню невидимо и недоступно клавиатуре/скринридерам */
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.4s;
  }

  .nav.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
  }

  /* страницы кейсов: бургера нет, навигация остаётся строкой,
     а не превращается в скрытый полноэкранный оверлей */
  .header-simple { flex-wrap: wrap; row-gap: 10px; }
  .header-simple .nav {
    position: static;
    inset: auto;
    transform: none;
    visibility: visible;
    flex-direction: row;
    justify-content: flex-end;
    flex: 1 1 100%;
    width: 100%;
    gap: 12px;
    background: none;
    backdrop-filter: none;
    font-size: 13px;
  }
  .header-simple .nav .nav-cta { padding: 8px 14px; }

  .hero-visual { max-width: 250px; }
  .hero-stats { flex-wrap: wrap; gap: 18px; }
  .about-facts { grid-template-columns: 1fr; }
  .brand-name { font-size: 11px; }
  .case-article { grid-template-columns: 1fr; }
  .page-top { padding-top: 120px; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: 1fr; }
  /* производительность на телефонах: оставляем один слой фона */
  .layer-2, .layer-3 { display: none; }
  .flow { flex-direction: column; }
  .flow-link {
    width: 1px;
    height: 28px;
    align-self: center;
  }
  .flow-link i {
    top: 0;
    left: -2.5px;
    animation-name: packet-run-v;
  }
  @keyframes packet-run-v {
    0%   { top: 0; opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { top: calc(100% - 6px); opacity: 0; }
  }
  .terminal-body { min-height: 350px; }
  .glitch-divider { height: 54px; }
  .lead-row { grid-template-columns: 1fr; }
  .lead-actions, .contact-actions { grid-template-columns: 1fr; }
  .hero-particles { opacity: 0.4; }
  .contact-info { flex-direction: column; align-items: center; gap: 22px; }
  .ci { text-align: center; }
  .footer-top { flex-direction: column; }
  /* UI-слой на мобильных */
  .nav .pal-btn { font-size: 15px; padding: 12px 18px; margin-top: 14px; }
  .header-simple .nav .pal-btn { display: none; }
  #toTop { right: 14px; bottom: 84px; }
  .footer-bottom { justify-content: center; }
}

/* уважаем системную настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-particles { display: none; }
  .circuit .trace { stroke-dashoffset: 0; }
  .circuit .node { opacity: 1; }
  /* глитч-слои без анимации дают двоящийся текст — убираем их */
  .glitch::before, .glitch::after { display: none; }
  .cursor-ring { display: none; }
}
