/* =========================================================
   Ростехнопоиск — стиль в духе Vaulk (тёмная тема + изумруд)
   ========================================================= */

:root {
  --bg:          #0B0C0B;
  --bg-2:        #0E100F;
  --surface:     #121613;
  --surface-2:   #171C18;
  --border:      rgba(255, 255, 255, 0.08);
  --border-2:    rgba(255, 255, 255, 0.14);
  --text:        #F1F4F0;
  --muted:       #99A39B;
  --muted-2:     #6E776F;
  --accent:      #10B981;
  --accent-2:    #34D399;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --accent-glow: rgba(16, 185, 129, 0.30);

  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-body);

  --container: 1180px;
  --radius:    18px;
  --radius-sm: 12px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: #04130D; }

/* ---------- Зернистый оверлей ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Кастомный курсор ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none;
  width: 28px; height: 28px; border: 1.5px solid var(--accent);
  border-radius: 50%; transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease),
              background .25s var(--ease), opacity .3s var(--ease);
  opacity: 0; will-change: transform;
}
.cursor.is-active { width: 54px; height: 54px; background: var(--accent-soft); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Контейнер ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Типографика ---------- */
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.74rem; font-weight: 600; color: var(--accent-2);
  margin-bottom: 18px;
}
.accent { color: var(--accent); }

.section__title {
  font-family: var(--font-display);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.section__lead { color: var(--muted); max-width: 580px; margin-top: 18px; font-size: 1.05rem; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 15px 30px; border-radius: 100px; position: relative;
  transition: transform .3s var(--ease), background .3s var(--ease),
              color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent); color: #04130D;
  box-shadow: 0 8px 30px -8px var(--accent-glow);
}
.btn--primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 14px 40px -10px var(--accent-glow); }
.btn--ghost { border: 1px solid var(--border-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }
.btn--sm { padding: 11px 20px; font-size: 0.9rem; }
.btn--block { width: 100%; padding: 17px; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Шапка ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: padding .3s var(--ease), background .3s var(--ease),
            border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  padding: 12px 0; background: rgba(11, 12, 11, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }

.logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.logo__mark { display: inline-flex; color: var(--accent); }
.logo__text { color: var(--text); }

.nav { display: flex; align-items: center; gap: 32px; }
.nav__link { font-size: 0.96rem; color: var(--muted); position: relative; transition: color .25s var(--ease); }
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }
.nav__cta { color: #04130D; }

/* Бургер */
.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 140px 0 80px; overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; max-width: 900px; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 5.6rem); line-height: 1.02; letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero__lead { color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 620px; margin-bottom: 38px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 34px; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted-2); font-size: 0.95rem; }
.hero__phone { color: var(--text); font-family: var(--font-display); font-weight: 600; transition: color .25s var(--ease); }
.hero__phone:hover { color: var(--accent-2); }
.hero__meta-sep { color: var(--accent); }

/* Свечение и сетка фона */
.hero__glow { position: absolute; border-radius: 50%; filter: blur(110px); z-index: 1; opacity: .5; }
.hero__glow--1 { width: 560px; height: 560px; background: var(--accent); top: -160px; right: -120px; opacity: .22; animation: float 14s ease-in-out infinite; }
.hero__glow--2 { width: 420px; height: 420px; background: #0e7a55; bottom: -160px; left: -100px; opacity: .18; animation: float 18s ease-in-out infinite reverse; }
.hero__grid {
  position: absolute; inset: 0; z-index: 0; opacity: .5;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 35% 35%, #000 0%, transparent 70%);
          mask-image: radial-gradient(circle at 35% 35%, #000 0%, transparent 70%);
}
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 30px); } }

/* ---------- Бегущая строка ---------- */
.marquee {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg-2); overflow: hidden; padding: 18px 0;
}
.marquee__track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  font-family: var(--font-display); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.92rem; color: var(--muted);
  animation: marquee 38s linear infinite;
}
.marquee__track span:nth-child(even) { color: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { margin-bottom: 60px; }

/* ---------- Карточки услуг (раскрывающиеся) ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); position: relative; overflow: hidden;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 60%);
  transition: opacity .4s var(--ease);
}
.card:hover { border-color: var(--border-2); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card.is-open { border-color: var(--accent); }

/* Шапка карточки = кнопка-аккордеон */
.card__head {
  display: flex; align-items: flex-start; gap: 18px; width: 100%;
  text-align: left; padding: 26px 28px; position: relative; z-index: 1;
}
.card__icon {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2);
  transition: transform .4s var(--ease);
}
.card__icon svg { width: 26px; height: 26px; }
.card:hover .card__icon { transform: scale(1.08) rotate(-4deg); }
.card__heading { flex: 1; min-width: 0; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.26rem; margin-bottom: 7px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card__text { color: var(--muted); font-size: 0.96rem; }
.card__badge {
  font-family: var(--font-body); font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: #04130D; background: var(--accent); padding: 2px 8px; border-radius: 100px;
}
.card__chevron {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-2); color: var(--muted); margin-top: 4px;
  transition: transform .4s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.card__chevron svg { width: 18px; height: 18px; }
.card:hover .card__chevron { color: var(--accent-2); border-color: var(--accent); }
.card.is-open .card__chevron { transform: rotate(180deg); color: var(--accent-2); border-color: var(--accent); }

/* Раскрывающаяся панель (плавно через grid-rows) */
.card__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); position: relative; z-index: 1; }
.card.is-open .card__panel { grid-template-rows: 1fr; }
.card__panel-inner { overflow: hidden; min-height: 0; }
.card__list { padding: 4px 28px 28px 98px; display: grid; gap: 11px; }
.card__list li { position: relative; color: var(--text); font-size: 0.95rem; padding-left: 22px; }
.card__list li::before {
  content: ''; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px;
  border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}

/* Акцентная карточка (AI) */
.card--accent { border-color: rgba(16, 185, 129, 0.35); background: linear-gradient(180deg, rgba(16, 185, 129, 0.07), var(--surface)); }
.card--accent .card__icon { background: rgba(16, 185, 129, 0.2); }

/* Широкая карточка на всю ширину (Автоматизация, 1С) — список в 2 колонки */
.card--wide { grid-column: 1 / -1; }
.card--wide .card__list { grid-template-columns: repeat(2, 1fr); column-gap: 34px; }

/* ---------- Наши клиенты ---------- */
.clients { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.client {
  display: grid; place-items: center; min-height: 128px; padding: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.client:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.client img { width: 100%; max-width: 196px; height: auto; opacity: .74; transition: opacity .35s var(--ease); }
.client:hover img { opacity: 1; }

/* ---------- Подход / преимущества ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--bg-2); padding: 38px; transition: background .35s var(--ease); }
.feature:hover { background: var(--surface); }
.feature__num { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; }
.feature__title { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; margin: 14px 0 12px; }
.feature__text { color: var(--muted); }

/* Цифры */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 60px; text-align: center; }
.stat { padding: 22px; }
.stat__num { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.3rem); color: var(--text); line-height: 1; letter-spacing: -0.02em; }
.stat__num::after { content: attr(data-rendered-suffix); }
.stat__label { display: block; margin-top: 12px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Этапы ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 28px 24px; position: relative; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.step:hover { transform: translateY(-5px); border-color: var(--accent); }
.step__num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent-2); font-family: var(--font-display); font-weight: 700; margin-bottom: 20px; }
.step__title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; margin-bottom: 10px; }
.step__text { color: var(--muted); font-size: 0.93rem; }

/* ---------- Контакты / форма ---------- */
.section--contact { background: var(--bg-2); border-top: 1px solid var(--border); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact__list { margin-top: 40px; display: grid; gap: 22px; }
.contact__list li { display: flex; flex-direction: column; gap: 4px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.contact__label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-2); }
.contact__value { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; transition: color .25s var(--ease); }
a.contact__value:hover { color: var(--accent-2); }

.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.field__label i { color: var(--accent); font-style: normal; }
.field__input {
  width: 100%; background: var(--bg); border: 1px solid var(--border-2); color: var(--text);
  border-radius: var(--radius-sm); padding: 14px 16px; font-family: var(--font-body); font-size: 1rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field__input::placeholder { color: var(--muted-2); }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field__input--area { resize: vertical; min-height: 110px; }
.field__input.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.consent { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 22px; font-size: 0.86rem; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.consent a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }

.form__status { margin-top: 16px; font-size: 0.92rem; min-height: 1.2em; text-align: center; }
.form__status.is-ok { color: var(--accent-2); }
.form__status.is-error { color: #f87171; }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--border); padding: 60px 0 34px; background: var(--bg); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: center; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.footer__brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.footer__brand .logo__mark { color: var(--accent); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__nav a { color: var(--muted); font-size: 0.94rem; transition: color .25s var(--ease); }
.footer__nav a:hover { color: var(--accent-2); }
.footer__contacts { display: flex; flex-direction: column; gap: 6px; text-align: right; font-family: var(--font-display); font-weight: 600; }
.footer__contacts a { transition: color .25s var(--ease); }
.footer__contacts a:hover { color: var(--accent-2); }
.footer__address { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 26px; color: var(--muted-2); font-size: 0.86rem; }

/* ---------- Анимация появления ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.cards .reveal:nth-child(2) { transition-delay: .06s; }
.cards .reveal:nth-child(3) { transition-delay: .12s; }
.cards .reveal:nth-child(4) { transition-delay: .18s; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .clients { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .card--wide .card__list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px;
    background: var(--bg-2); border-left: 1px solid var(--border); padding: 40px;
    transform: translateX(100%); transition: transform .4s var(--ease); z-index: 90;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__link { font-size: 1.2rem; }
  .burger { display: flex; z-index: 95; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__contacts { text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards, .features, .steps, .stats { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .form { padding: 24px; }
  .container { padding: 0 18px; }
  .card__head { padding: 22px; gap: 14px; }
  .card__list { padding: 0 22px 24px 22px; }
}

/* ---------- Доступность ---------- */
@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; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =========================================================
   V2 — «AI-ядро»: кинематографический апгрейд
   ========================================================= */

/* ---------- Тонкий скроллбар ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1d2620; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3830; }

/* ---------- Прогресс прокрутки ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200;
  background: linear-gradient(90deg, var(--accent), #6EE7B7);
  transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 12px var(--accent-glow);
  pointer-events: none;
}

/* ---------- Boot-экран «инициализация AI» ---------- */
.boot {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
}
.boot--done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot--off { display: none; }
.boot__inner { width: min(320px, 80vw); text-align: center; }
.boot__logo { display: inline-flex; color: var(--accent); margin-bottom: 26px; animation: bootPulse 1.2s ease-in-out infinite; filter: drop-shadow(0 0 14px var(--accent-glow)); }
@keyframes bootPulse { 0%, 100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.boot__bar { height: 2px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.boot__fill {
  display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), #6EE7B7);
  box-shadow: 0 0 14px var(--accent-glow);
}
.boot__line {
  display: flex; justify-content: space-between; gap: 14px; margin-top: 12px;
  font-family: var(--font-display); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2);
}
#boot-pct { color: var(--accent-2); }

/* ---------- Курсор: ведущая точка ---------- */
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2);
  transform: translate(-50%, -50%); opacity: 0;
  box-shadow: 0 0 10px var(--accent-glow);
}
@media (hover: none), (pointer: coarse) { .cursor-dot { display: none; } }

/* ---------- Canvas «AI-ядра» в hero ---------- */
.hero__canvas {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, rgba(0,0,0,.28) 36%, #000 60%);
          mask-image: linear-gradient(90deg, transparent 2%, rgba(0,0,0,.28) 36%, #000 60%);
}
@media (max-width: 959px) {
  .hero__canvas {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 97%);
            mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 97%);
  }
}

/* ---------- Статус-пилюля в hero ---------- */
.hero__status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 100px; margin-bottom: 22px;
  border: 1px solid rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .07);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-display); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2);
}
.hero__status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
  animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); }
  70%  { box-shadow: 0 0 0 11px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ---------- Акцент в заголовке: живой градиент ---------- */
.accent {
  background: linear-gradient(100deg, #6EE7B7 0%, var(--accent) 45%, #0ea472 70%, #6EE7B7 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 5s linear infinite;
  filter: drop-shadow(0 0 22px rgba(16, 185, 129, .40));
}
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: -220% 0; } }

/* ---------- Печатающая AI-строка ---------- */
.typeline {
  display: flex; align-items: center; gap: 10px; margin: -14px 0 34px;
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  font-size: .95rem; color: var(--muted); min-height: 1.5em;
}
.typeline__prompt { color: var(--accent-2); font-weight: 700; text-shadow: 0 0 12px var(--accent-glow); }
.typeline__caret {
  width: 9px; height: 1.15em; flex-shrink: 0; background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }

/* ---------- Плавающие чипы вокруг ядра ---------- */
.hero__chips { position: absolute; inset: 0; z-index: 1; pointer-events: none; display: none; }
@media (min-width: 1180px) { .hero__chips { display: block; } }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 100px;
  background: rgba(13, 19, 15, .55); border: 1px solid rgba(110, 231, 183, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-display); font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: #C9F5E4; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  animation: chipFloat 7s ease-in-out infinite;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.chip--1 { top: 21%; right: 31%; animation-delay: 0s; }
.chip--2 { top: 34%; right: 5%;  animation-delay: -2.2s; }
.chip--3 { top: 69%; right: 29%; animation-delay: -4.1s; }
.chip--4 { top: 76%; right: 8%;  animation-delay: -5.6s; }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Активный пункт меню (scrollspy) ---------- */
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { width: 100%; }

/* ---------- Кнопка: блик при наведении ---------- */
.btn--primary { overflow: hidden; }
.btn--primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease); pointer-events: none;
}
.btn--primary:hover::after { left: 130%; }

/* ---------- Карточки: 3D-наклон + глубокая тень ---------- */
.card {
  transition: border-color .4s var(--ease), background .4s var(--ease),
              transform .35s var(--ease), box-shadow .4s var(--ease);
}
.card:hover {
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8),
              0 0 44px -18px var(--accent-glow);
}

/* ---------- Линия между этапами ---------- */
@media (min-width: 1025px) {
  .steps { position: relative; }
  .steps::before {
    content: ''; position: absolute; left: 30px; right: 30px; top: 49px; height: 2px;
    background: linear-gradient(90deg, var(--accent), rgba(52, 211, 153, .3));
    box-shadow: 0 0 14px var(--accent-glow);
    transform: scaleX(0); transform-origin: 0 50%;
    transition: transform 1.4s var(--ease) .2s;
  }
  .steps.is-line::before { transform: scaleX(1); }
  .step { z-index: 1; }
}

/* ---------- Фоновые свечения секций ---------- */
#services::before,
.section--contact::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  width: 720px; height: 720px; border-radius: 50%; filter: blur(130px);
  background: radial-gradient(circle, rgba(16, 185, 129, .10), transparent 65%);
}
#services::before { top: -200px; right: -220px; }
.section--contact::before { bottom: -260px; left: -240px; }
.section > .container { position: relative; z-index: 1; }

/* ---------- Цифры: стеклянные карточки со свечением ---------- */
.stats { gap: 18px; }
.stat {
  padding: 30px 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 185, 129, .05), rgba(16, 185, 129, 0) 55%), var(--surface);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.stat:hover { transform: translateY(-4px); border-color: rgba(16, 185, 129, .4); }
.stat__num { color: var(--accent-2); text-shadow: 0 0 30px rgba(16, 185, 129, .35); }

/* ---------- Клиенты: блик по логотипу ---------- */
.client { position: relative; overflow: hidden; }
.client::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(110, 231, 183, .08), transparent);
  transform: skewX(-18deg); transition: left .7s var(--ease); pointer-events: none;
}
.client:hover::after { left: 140%; }

/* ---------- Форма: свечение при фокусе ---------- */
.form { transition: border-color .4s var(--ease), box-shadow .4s var(--ease); }
.form:focus-within {
  border-color: rgba(16, 185, 129, .45);
  box-shadow: 0 0 70px -28px var(--accent-glow);
}

/* ---------- Бегущая строка: растворение по краям + пауза ---------- */
.marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* =========================================================
   V2.1 — исправления по итогам ревизии
   ========================================================= */

/* Reveal через анимацию: не конфликтует с transition карточек,
   формы и клиентов (hover-эффекты и tilt остаются быстрыми) */
.reveal.is-visible { animation: revealIn .7s var(--ease) backwards; }
@keyframes revealIn {
  from { opacity: 0; transform: translateY(28px); }
}
.cards .reveal.is-visible:nth-child(2) { animation-delay: .06s; }
.cards .reveal.is-visible:nth-child(3) { animation-delay: .12s; }
.cards .reveal.is-visible:nth-child(4) { animation-delay: .18s; }

/* Boot: CSS-страховка — оверлей исчезает сам через 4 с,
   даже если JS не загрузился */
.boot { animation: bootFailsafe .5s ease 4s forwards; }
@keyframes bootFailsafe {
  to { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .boot { display: none; }
}

/* Firefox: тёмный скроллбар и системные элементы в тёмной схеме */
html { color-scheme: dark; scrollbar-color: #232d27 #0B0C0B; }

/* Печатающая строка: не переносится и не дёргает макет */
.typeline { max-width: 100%; }
.typeline__text { white-space: nowrap; overflow: hidden; min-width: 0; flex: 0 1 auto; }

/* Мобильные: пилюля и строка ужимаются, а не переносятся */
@media (max-width: 560px) {
  .hero__status {
    font-size: .66rem; letter-spacing: .07em;
    padding: 7px 13px; gap: 8px;
    flex-wrap: wrap; justify-content: center; text-align: center;
    line-height: 1.7; border-radius: 22px;
  }
  .typeline { font-size: .82rem; gap: 8px; }
}

/* =========================================================
   V3 — Стили для внутренних SEO-страниц услуг
   (хлебные крошки, под-hero, текст, FAQ, теги)
   ========================================================= */

/* Хлебные крошки */
.crumbs { padding: 96px 0 0; }
.crumbs__list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: .82rem; color: var(--muted-2); }
.crumbs__list a { color: var(--muted); transition: color .2s var(--ease); }
.crumbs__list a:hover { color: var(--accent-2); }
.crumbs__sep { opacity: .5; }
.crumbs__list [aria-current="page"] { color: var(--muted); }

/* Под-hero страницы услуги */
.subhero { position: relative; padding: 30px 0 56px; overflow: hidden; }
.subhero .eyebrow { margin-bottom: 16px; }
.subhero__title { font-family: var(--font-display); font-weight: 700;
  line-height: 1.06; letter-spacing: -0.02em; font-size: clamp(2rem, 5.2vw, 3.4rem);
  max-width: 16ch; }
.subhero__lead { color: var(--muted); max-width: 640px; margin-top: 20px; font-size: 1.1rem; }
.subhero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.subhero__glow { position: absolute; top: -120px; right: -80px; width: 460px; height: 460px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(20px); opacity: .5; pointer-events: none; z-index: -1; }

/* Теги-пилюли (технологии/направления) */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tag { font-family: var(--font-display); font-size: .82rem; font-weight: 500;
  padding: 8px 15px; border: 1px solid var(--border-2); border-radius: 22px;
  color: var(--text); background: var(--surface); }

/* Текстовые блоки (проза) */
.prose { max-width: 780px; color: var(--muted); font-size: 1.06rem; }
.prose > * + * { margin-top: 18px; }
.prose h2 { color: var(--text); font-family: var(--font-display); letter-spacing: -0.01em;
  font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 8px; }
.prose h3 { color: var(--text); font-family: var(--font-display); font-size: 1.2rem; margin-top: 26px; }
.prose ul { display: grid; gap: 12px; margin-top: 6px; }
.prose ul li { position: relative; padding-left: 28px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow); }
.prose strong { color: var(--text); font-weight: 600; }

/* FAQ-аккордеон */
.faq { max-width: 820px; display: grid; gap: 12px; }
.faq__item { border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden; }
.faq__q { width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; text-align: left; padding: 20px 22px; font-family: var(--font-display);
  font-weight: 600; font-size: 1.06rem; color: var(--text); }
.faq__q::after { content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2);
  transform: rotate(45deg); transition: transform .3s var(--ease); margin-top: -4px; }
.faq__item.is-open .faq__q::after { transform: rotate(-135deg); margin-top: 4px; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq__a-inner { padding: 0 22px 22px; color: var(--muted); }
.faq__item.is-open .faq__a { max-height: 480px; }

/* Внутренняя перелинковка (другие услуги) */
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.linkcard { display: block; padding: 20px 22px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .25s var(--ease), transform .25s var(--ease); }
.linkcard:hover { border-color: var(--accent); transform: translateY(-3px); }
.linkcard__title { font-family: var(--font-display); font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.linkcard__title::after { content: "→"; color: var(--accent-2); }
.linkcard__text { color: var(--muted); font-size: .92rem; margin-top: 8px; }

/* Финальный CTA-блок */
.cta-band { text-align: center; }
.cta-band .section__title { margin: 0 auto; }
.cta-band .section__lead { margin: 18px auto 30px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

@media (max-width: 560px) {
  .crumbs { padding-top: 84px; }
  .subhero { padding-top: 20px; }
}

/* Ссылка «Подробнее» внутри карточки услуги */
.card__more { display: inline-flex; margin-top: 16px; font-family: var(--font-display);
  font-weight: 600; font-size: .92rem; color: var(--accent-2);
  transition: color .2s var(--ease), transform .2s var(--ease); }
.card__more:hover { color: var(--accent); transform: translateX(3px); }

/* Несколько ссылок «Подробнее» в одной карточке */
.card__links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; }
.card__links .card__more { margin-top: 0; }

/* =========================================================
   V4 — новый логотип (растровый знак «R» с нейросетью)
   ========================================================= */
.logo__mark img, .boot__logo img { display: block; border-radius: 50%; }
.logo__mark img { width: 26px; height: 26px; }
.footer__brand .logo__mark img { width: 22px; height: 22px; }
.boot__logo img { width: 42px; height: 42px; }
