/* ==========================================================================
   Виталий Сапрыгин — vsaprygin.ru
   Современный лендинг: glassmorphism, градиенты, анимации, тёмная/светлая тема
   ========================================================================== */

/* ---------- Токены ---------- */
:root {
  --bg: #07080c;
  --bg-2: #0b0d14;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .07);
  --stroke: rgba(255, 255, 255, .1);
  --stroke-2: rgba(255, 255, 255, .18);
  --text: #eef1f8;
  --text-2: #a3abbe;
  --text-3: #7d86a3;

  --brand-1: #7c5cff;
  --brand-2: #00d4ff;
  --brand-3: #ff5c8a;
  --brand-4: #ffb648;
  --grad: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  --grad-warm: linear-gradient(120deg, var(--brand-3), var(--brand-4));
  /* Тёмный градиент — для элементов с белым текстом/иконками поверх (кнопки,
     логотип, галочки, шеврон FAQ). Контраст белого ≥ 4.5:1 (WCAG AA). */
  --grad-ink: linear-gradient(120deg, #6a45ff, #0b7ea6);
  /* Звёзды отзывов: на светлом фоне #ffb648 даёт 1.7:1, поэтому в светлой теме
     подменяем на тёмный янтарь. */
  --stars: #ffb648;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --glow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 60px -20px rgba(124, 92, 255, .45);

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="light"] {
  --bg: #f2f4fb;
  --bg-2: #e9ecf7;
  --surface: rgba(255, 255, 255, .72);
  --surface-2: rgba(255, 255, 255, .92);
  --stroke: rgba(16, 22, 51, .1);
  --stroke-2: rgba(16, 22, 51, .2);
  --text: #101633;
  --text-2: #4a5474;
  --text-3: #5f6782;
  /* В светлой теме яркий градиент (#00d4ff на #f2f4fb = 1.6:1) проваливается
     по контрасту как текст, поэтому тут он темнее. */
  --grad: linear-gradient(120deg, #5b3df5, #0b7ea6);
  --grad-ink: linear-gradient(120deg, #5b3df5, #0b7ea6);
  --stars: #8f5a00;
  --shadow: 0 30px 70px -32px rgba(24, 32, 72, .35);
  --glow: 0 0 0 1px rgba(16, 22, 51, .05), 0 20px 50px -22px rgba(124, 92, 255, .35);
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  min-height: 100dvh;
  transition: background .5s var(--ease), color .5s var(--ease);
}

body::before { /* мягкие фоновые «свечения» */
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 60vw at 82% -10%, color-mix(in oklab, var(--brand-1) 22%, transparent), transparent 60%),
    radial-gradient(50vw 50vw at 0% 30%, color-mix(in oklab, var(--brand-2) 14%, transparent), transparent 60%),
    radial-gradient(40vw 40vw at 50% 110%, color-mix(in oklab, var(--brand-3) 12%, transparent), transparent 60%);
  transition: background .5s var(--ease);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--brand-1); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

/* Зернистая текстура поверх всего */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: overlay;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

/* Прогресс скролла */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 9999;
  background: transparent;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--grad);
  box-shadow: 0 0 18px color-mix(in oklab, var(--brand-2) 70%, transparent);
  transition: width .12s linear;
}

/* Пользовательский курсор (только мышь) */
@media (hover: hover) and (pointer: fine) {
  .cursor { position: fixed; inset: 0; z-index: 9997; pointer-events: none; }
  .cursor__dot, .cursor__ring {
    position: absolute;
    top: 0; left: 0;
    border-radius: 50%;
    translate: -50% -50%;
  }
  .cursor__dot {
    width: 7px; height: 7px;
    background: var(--grad);
    transition: scale .25s var(--ease), opacity .25s;
  }
  .cursor__ring {
    width: 40px; height: 40px;
    border: 1px solid color-mix(in oklab, var(--brand-2) 55%, transparent);
    transition: width .3s var(--ease), height .3s var(--ease),
                background .3s var(--ease), border-color .3s var(--ease);
  }
  body.cursor-hover .cursor__ring {
    width: 70px; height: 70px;
    background: color-mix(in oklab, var(--brand-1) 16%, transparent);
    border-color: color-mix(in oklab, var(--brand-1) 70%, transparent);
  }
  body.cursor-hover .cursor__dot { scale: 0; }
}
@media (hover: none) { .cursor { display: none; } }

.skip-link {
  position: fixed;
  top: -60px; left: 16px;
  z-index: 10000;
  padding: 10px 18px;
  background: var(--brand-1);
  color: #fff;
  border-radius: 10px;
  transition: top .3s;
}
.skip-link:focus { top: 12px; }

/* ---------- Типографика ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.3rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); }
h3 { font-size: 1.22rem; }

.grad-text {
  background: var(--grad);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 8s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.shimmer { position: relative; }
/* Блик едет через translate (композит), а не через background-position —
   latter каждый кадр форсировал перерисовку (PageSpeed). */
.shimmer::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.55) 50%, transparent);
  mix-blend-mode: overlay;
  translate: -120% 0;
  animation: shimmer 4.5s var(--ease) infinite;
}
@keyframes shimmer {
  0% { translate: -120% 0; }
  55%, 100% { translate: 260% 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 34px; height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: var(--surface);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  line-height: 1;
  white-space: nowrap;
  background: var(--btn-bg);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s, background .35s, color .35s;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}
.btn svg { transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:hover { border-color: var(--stroke-2); box-shadow: var(--glow); }
.btn:active { scale: .97; }

.btn--primary {
  background: var(--grad-ink);
  border: 0;
  color: #fff;
  background-size: 180% 180%;
  box-shadow: 0 14px 40px -14px color-mix(in oklab, var(--brand-1) 75%, transparent);
}
.btn--primary:hover {
  animation: gradShift 2.5s ease infinite;
  box-shadow: 0 20px 55px -14px color-mix(in oklab, var(--brand-1) 90%, transparent);
}
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  translate: -120% 0;
  transition: translate .7s var(--ease);
}
.btn--primary:hover::before { translate: 120% 0; }

.btn--glass { background: var(--surface); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { padding: 10px 18px; font-size: .88rem; }
.btn--lg { padding: 17px 32px; font-size: 1.05rem; }
.btn--block { width: 100%; margin-top: 22px; }

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s, translate .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--stroke);
}
.header.is-hidden { translate: 0 -110%; }

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo__mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--grad-ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 10px 26px -10px color-mix(in oklab, var(--brand-1) 90%, transparent);
  transition: rotate .6s var(--ease), scale .3s var(--ease);
}
.logo:hover .logo__mark { rotate: -10deg; scale: 1.06; }
.logo__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
}
.logo__text small {
  font-family: var(--font-body);
  /* 600, а не 500: начертание 500 больше не подгружается (см. link на шрифты),
     браузер подтягивал бы лишний файл ради одной надписи */
  font-weight: 600;
  font-size: .72rem;
  color: var(--text-3);
}

.nav {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}
.nav a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color .3s, background .3s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  scale: 0 1;
  transform-origin: left;
  transition: scale .35s var(--ease);
}
.nav a:hover::after { scale: 1 1; }

.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav + .header__actions { margin-left: 0; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--stroke);
  transition: rotate .5s var(--ease), background .3s, border-color .3s;
}
.theme-toggle:hover { rotate: 25deg; border-color: var(--stroke-2); }
.theme-toggle__icon { font-size: 1.05rem; line-height: 1; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  padding: 0 11px;
}
.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: translate .35s var(--ease), rotate .35s var(--ease), opacity .25s;
}
.burger.is-open span:nth-child(1) { translate: 0 7px; rotate: 45deg; }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { translate: 0 -7px; rotate: -45deg; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 70px) 0 90px;
  overflow: clip;
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .75;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: center;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 1;
  will-change: translate;
  transition: translate .9s var(--ease);
}
.hero__blob--1 {
  width: 480px; height: 480px;
  top: -140px; right: -80px;
  background: color-mix(in oklab, var(--brand-1) 55%, transparent);
  animation: float 13s ease-in-out infinite;
}
.hero__blob--2 {
  width: 400px; height: 400px;
  bottom: -160px; left: -110px;
  background: color-mix(in oklab, var(--brand-2) 40%, transparent);
  animation: float 17s ease-in-out infinite reverse;
}
.hero__blob--3 {
  width: 260px; height: 260px;
  top: 40%; left: 42%;
  background: color-mix(in oklab, var(--brand-3) 28%, transparent);
  animation: float 15s ease-in-out 1.5s infinite;
}
@keyframes float {
  0%, 100% { translate: 0 0; scale: 1; }
  50% { translate: 0 -42px; scale: 1.08; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-2);
}
.badge__pulse {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #2fe07f;
}
/* Пульс через transform/opacity (композитный слой) вместо анимации
   box-shadow, которая каждый кадр вызывала перерисовку (PageSpeed). */
.badge__pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(47, 224, 127, .5);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  70% { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}

.hero__title { margin-bottom: 22px; }
.hero__subtitle {
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 34px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--stroke);
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__stats span { font-size: .87rem; color: var(--text-3); }

/* Окно с кодом */
.hero__visual { position: relative; perspective: 1200px; }
.code-window {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(24, 28, 45, .92), rgba(12, 14, 24, .92));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transform-style: preserve-3d;
}
[data-theme="light"] .code-window {
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(238,241,252,.9));
}
.code-window__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--stroke);
}
.code-window__bar span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.code-window__bar span:nth-child(2) { background: #febc2e; }
.code-window__bar span:nth-child(3) { background: #28c840; }
.code-window__bar em {
  margin-left: 10px;
  font-style: normal;
  font-size: .76rem;
  color: var(--text-3);
  font-family: ui-monospace, monospace;
}
.code-window__body {
  padding: 20px;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: clamp(.72rem, 1.05vw, .84rem);
  line-height: 1.8;
  color: var(--text-2);
  overflow-x: auto;
}
.c-k { color: #c792ea; }
.c-s { color: #c3e88d; }
.c-p { color: #82aaff; }
.c-c { color: #5f6a86; font-style: italic; }

.card-float {
  position: absolute;
  right: -14px; bottom: 26px;
  display: flex;
  flex-direction: column;
  padding: 13px 20px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--stroke-2);
  backdrop-filter: blur(18px);
  box-shadow: var(--glow);
  animation: float 5s ease-in-out infinite;
}
.card-float strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card-float span { font-size: .74rem; color: var(--text-3); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  translate: -50% 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hero__scroll span {
  width: 22px; height: 34px;
  border: 1.5px solid var(--stroke-2);
  border-radius: 999px;
  position: relative;
}
.hero__scroll span::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  translate: -50% 0;
  width: 3px; height: 7px;
  border-radius: 3px;
  background: var(--brand-2);
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot {
  0% { translate: -50% 0; opacity: 0; }
  35% { opacity: 1; }
  100% { translate: -50% 13px; opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid var(--stroke);
  background: color-mix(in oklab, var(--bg-2) 75%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee__track,
/* Вне экрана лента ставится на паузу из JS — мобильные не жгут CPU/battery
   впустую на анимации того, что никто не видит */
.marquee.is-paused .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.marquee__track i {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes marquee {
  to { translate: -50% 0; }
}

/* ---------- Секции ---------- */
.section { padding: clamp(52px, 6vw, 84px) 0; position: relative; }
/* После секции FAQ уже есть нижний отступ — сверху оставляем только его,
   иначе зазор перед CTA складывается из двух padding (≈200px) */
#contact { padding-top: 0; }
.section--alt {
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--bg-2) 88%, transparent) 20%, color-mix(in oklab, var(--bg-2) 88%, transparent) 80%, transparent);
}
.section__head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section__head--left { margin: 0 0 40px; text-align: left; }
.section__lead { color: var(--text-2); margin-top: 16px; font-size: 1.05rem; }
.section__head .btn { margin-top: 24px; }

/* ---------- Сетки и карточки ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(16px);
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s, background .45s;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
}
.card::before { /* световой блик при наведении */
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(300px 200px at var(--mx, 50%) var(--my, 0%),
              color-mix(in oklab, var(--brand-2) 18%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover {
  border-color: var(--stroke-2);
  box-shadow: var(--glow);
  translate: 0 -6px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: .96rem; }

/* Услуги */
.service__icon {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  margin-bottom: 20px;
  border-radius: 18px;
  font-size: 1.6rem;
  background: linear-gradient(140deg, color-mix(in oklab, var(--brand-1) 26%, transparent), color-mix(in oklab, var(--brand-2) 18%, transparent));
  border: 1px solid var(--stroke);
  transition: rotate .6s var(--ease), scale .4s var(--ease);
}
.service:hover .service__icon { rotate: -8deg; scale: 1.1; }

.speed-test {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, color-mix(in oklab, var(--brand-1) 12%, transparent), color-mix(in oklab, var(--brand-2) 8%, transparent));
  border: 1px solid var(--stroke);
}
.speed-test__row { font-size: .84rem; color: var(--text-2); margin-bottom: 8px; }
.speed-test__links { display: flex; flex-wrap: wrap; gap: 14px; }
.speed-test__links a {
  font-size: .84rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity .3s;
}
.speed-test__links a:hover { opacity: .75; }

.ticks { margin-top: 16px; display: grid; gap: 8px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  font-size: .92rem;
  color: var(--text-2);
}
.ticks li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 1px;
  display: grid;
  place-items: center;
  width: 19px; height: 19px;
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 800;
  color: #fff;
  background: var(--grad-ink);
}
.ticks--big li { font-size: .98rem; padding-left: 32px; }
.ticks--big li::before { width: 21px; height: 21px; }

/* Процесс */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
  transition: transform .45s var(--ease), border-color .4s, box-shadow .4s;
}
.step:hover { translate: 0 -8px; border-color: var(--stroke-2); box-shadow: var(--glow); }
.step__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .9;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: .94rem; }
.step::after {
  content: '';
  position: absolute;
  top: 44px; right: -24px;
  width: 24px; height: 2px;
  background: linear-gradient(90deg, var(--stroke-2), transparent);
}
.step:last-child::after { display: none; }

/* Преимущества */
.advantages {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 56px;
  align-items: start;
}
.features { display: grid; gap: 22px; }
.features li {
  display: flex;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--stroke);
  transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.features li:hover { translate: 8px 0; border-color: var(--stroke-2); }
.features h3 { font-size: 1.05rem; margin-bottom: 4px; }
.features p { color: var(--text-2); font-size: .94rem; }
.features__ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 15px;
  font-size: 1.35rem;
  background: linear-gradient(140deg, color-mix(in oklab, var(--brand-1) 24%, transparent), color-mix(in oklab, var(--brand-2) 14%, transparent));
  border: 1px solid var(--stroke);
}

.glass-panel {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.glass-panel h3 { font-size: 1.05rem; margin-bottom: 16px; }
.glass-panel hr { border: 0; border-top: 1px solid var(--stroke); margin: 24px 0; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack span {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.stack span:hover {
  translate: 0 -3px;
  border-color: color-mix(in oklab, var(--brand-2) 60%, transparent);
  background: color-mix(in oklab, var(--brand-2) 14%, transparent);
}

/* Работы */
.work {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--stroke);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .4s;
}
.work:hover { translate: 0 -8px; border-color: var(--stroke-2); box-shadow: var(--glow); }
.work__shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.work__shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 8, 14, .65));
}
.work__shot--1 { background: linear-gradient(135deg, #7c5cff, #2b1b6b); }
.work__shot--2 { background: linear-gradient(135deg, #00d4ff, #0a3d62); }
.work__shot--3 { background: linear-gradient(135deg, #ff5c8a, #6a1b4d); }
.work__mock {
  width: 74%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
  display: grid;
  gap: 8px;
  transition: scale .6s var(--ease), rotate .6s var(--ease);
}
.work:hover .work__mock { scale: 1.06; rotate: -1.2deg; }
.work__mock span {
  display: block;
  height: 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .5);
}
.work__mock span:first-child { width: 45%; height: 13px; background: rgba(255,255,255,.85); }
.work__mock span:last-child { width: 62%; }
.work__meta { padding: 22px 24px 26px; }
.work__meta h3 { margin-bottom: 6px; }
.work__meta p { color: var(--text-2); font-size: .93rem; margin-bottom: 14px; }
.work__link {
  display: inline-block;
  margin-top: 16px;
  font-size: .85rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity .3s;
}
.work:hover .work__link { opacity: .75; }
.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--stroke);
}

/* Отзывы */
.quote blockquote {
  font-size: .97rem;
  color: var(--text-2);
  margin: 12px 0 18px;
  position: relative;
  z-index: 1;
}
.quote__stars {
  color: var(--stars);
  letter-spacing: 3px;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}
.quote figcaption {
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
  position: relative;
  z-index: 1;
}
.quote figcaption strong { font-size: .98rem; }
.quote figcaption span { font-size: .84rem; color: var(--text-3); }

/* Цены */
.price { display: flex; flex-direction: column; }
.price > * { position: relative; z-index: 1; }
.price h3 { font-size: 1.1rem; }
.price__value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin: 14px 0 2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price__note { color: var(--text-3); font-size: .87rem; margin-bottom: 20px; }
.price .ticks { flex: 1; margin-bottom: 12px; }
.price--featured {
  border-color: color-mix(in oklab, var(--brand-1) 55%, transparent);
  background: linear-gradient(170deg, color-mix(in oklab, var(--brand-1) 14%, var(--surface)), var(--surface));
  box-shadow: var(--glow);
}
.price__badge {
  position: absolute;
  top: 18px; right: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #101633;
  background: var(--grad-warm);
  z-index: 2;
}

/* FAQ */
.faq-wrap {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.faq { display: grid; gap: 14px; }
.faq__item {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color .4s, box-shadow .4s;
}
.faq__item[open] { border-color: var(--stroke-2); box-shadow: var(--glow); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  transition: color .3s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--brand-2); }
.faq__chev {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  position: relative;
  transition: rotate .4s var(--ease), background .3s;
}
.faq__chev::before, .faq__chev::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  background: currentColor;
  border-radius: 2px;
}
.faq__chev::before { width: 12px; height: 2px; }
.faq__chev::after { width: 2px; height: 12px; transition: scale .35s var(--ease); }
.faq__item[open] .faq__chev { rotate: 180deg; background: var(--grad-ink); color: #fff; }
.faq__item[open] .faq__chev::after { scale: 0; }
.faq__item p {
  padding: 0 22px 22px;
  color: var(--text-2);
  font-size: .96rem;
  animation: fadeSlide .45s var(--ease);
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CTA и контакты */
.cta {
  position: relative;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 70px);
  border-radius: calc(var(--radius) + 10px);
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(20px);
  overflow: hidden;
  text-align: center;
}
/* Специфичность выше, чем у `.cta > *` (0-2-0 против 0-1-0): иначе то правило
   перекрывало absolute → relative и блок 620×620 вставал в поток (пустота). */
.cta .cta__blob {
  position: absolute;
  z-index: 0;
  width: 620px; height: 620px;
  top: -320px; left: 50%;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--grad);
  filter: blur(120px);
  opacity: .35;
  animation: float 12s ease-in-out infinite;
}
.cta > * { position: relative; z-index: 1; }
.cta__lead { color: var(--text-2); max-width: 54ch; margin: 16px auto 44px; }

.contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.contact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 24px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  text-align: left;
  transition: transform .45s var(--ease), border-color .4s, box-shadow .4s, background .4s;
  will-change: transform;
}
.contact:hover {
  translate: 0 -8px;
  border-color: color-mix(in oklab, var(--brand-2) 55%, transparent);
  box-shadow: var(--glow);
}
.contact__ico { font-size: 1.5rem; margin-bottom: 10px; }
.contact__ico--max {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
}
.contact__ico--max img { width: 28px; height: 28px; object-fit: contain; }
.contact__label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.contact strong { font-size: 1rem; }
.contact em {
  font-style: normal;
  font-size: .85rem;
  font-weight: 700;
  margin-top: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Подвал ---------- */
.footer {
  border-top: 1px solid var(--stroke);
  background: color-mix(in oklab, var(--bg-2) 80%, transparent);
  padding: 64px 0 28px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer__brand p { color: var(--text-2); font-size: .94rem; margin-top: 18px; max-width: 42ch; }
.footer__nav { display: grid; gap: 10px; align-content: start; }
.footer__nav h3 {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.footer__nav a { color: var(--text-2); font-size: .95rem; transition: color .3s, translate .3s var(--ease); }
.footer__nav a:hover { color: var(--text); translate: 5px 0; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
  font-size: .87rem;
  color: var(--text-3);
}
.footer__made { color: var(--text-3); }

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: 1fr; gap: 50px; }
  .hero__visual { max-width: 640px; }
  .advantages { grid-template-columns: 1fr; }
  .glass-panel { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .faq-wrap { grid-template-columns: 1fr; gap: 34px; }
  .contacts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px 26px;
    background: color-mix(in oklab, var(--bg) 94%, transparent);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--stroke);
    translate: 0 -130%;
    opacity: 0;
    transition: translate .45s var(--ease), opacity .35s;
    margin: 0;
  }
  .nav.is-open { translate: 0 0; opacity: 1; }
  .nav a { padding: 13px 16px; font-size: 1.05rem; }
  .nav a::after { display: none; }
  .burger { display: flex; }
  .header__actions .btn--ghost { display: none; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .hero { padding-top: calc(var(--header-h) + 46px); padding-bottom: 66px; }
  .grid--3, .steps, .contacts { grid-template-columns: 1fr; }
  .hero__stats { gap: 26px; }
  .hero__stats strong { font-size: 1.6rem; }
  .hero__scroll { display: none; }
  .header__actions .btn--sm.btn--primary { padding: 10px 14px; font-size: .82rem; }
  .card-float { right: 8px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
}

/* ---------- Оптимизация для мобильных устройств ----------
   На телефонах и планшетах отключаем самые дорогие для GPU эффекты:
   backdrop-filter, большие blur-фильтры, blend-режимы и бесконечные
   repaint-анимации. Именно они дают основную нагрузку при скролле и
   тянут вниз оценку PageSpeed mobile (long tasks, jank, Speed Index).
   Десктоп не затронут — все правила живут только в мобильном брейкпоинте
   и для тач-устройств любого размера. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  /* Зернистая текстура с mix-blend-mode: overlay заставляет браузер
     переблендивать каждый кадр поверх всей страницы */
  .noise { display: none; }

  /* backdrop-filter — самая дорогая операция на мобильном GPU:
     размытие фона под каждым элементом пересчитывается при скролле */
  .btn, .badge, .card, .glass-panel, .code-window, .card-float,
  .faq__item, .work__mock, .cta, .nav,
  .header, .header.is-stuck { backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* Без blur шапке нужна более плотная подложка, иначе текст будет просвечивать */
  .header.is-stuck { background: color-mix(in oklab, var(--bg) 94%, transparent); }

  /* Анимированные blur-блобы: перемещение размытого слоя заставляет
     перерисовывать его каждый кадр — оставляем статичное свечение */
  .hero__blob { animation: none; filter: blur(40px); }
  /* Селектор повторяем с исходной специфичностью (.cta .cta__blob, 0-2-0),
     иначе оверрайд не перебьёт blur(120px) из основного файла */
  .cta .cta__blob { animation: none; filter: blur(80px); opacity: .28; }

  /* Градиентный текст «бегущими» background-position и блик shimmer
     с blend-режимом перерисовывают заголовки бесконечно */
  .grad-text { animation: none; background-position: 50% 50%; }
  .shimmer::after { display: none; }

  /* Композитные слои (will-change) под десятки карточек съедают память
     мобильного GPU и ухудшают скролл на устройствах с 2–3 ГБ RAM */
  .btn, .card, .contact, .hero__blob { will-change: auto; }

  /* Первоначальную отрисовку ограничиваем видимой частью страницы:
     секции ниже fold пропускают layout/paint до приближения к вьюпорту */
  .section { content-visibility: auto; contain-intrinsic-size: auto 900px; }
  .marquee, .footer { content-visibility: auto; contain-intrinsic-size: auto 120px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
