/* WEBSTYLE remix — сайт-фильм. 2026 */

:root {
  --bg: #07070b;
  --bg-soft: #0d0d14;
  --ink: #f2f4ea;
  --mut: #9aa0a8;
  --acid: #c6ff3e;
  --violet: #9b7bff;
  --rose: #ff7bc1;
  --card: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.1);
  --disp: "Unbounded", system-ui, sans-serif;
  --text: "Manrope", system-ui, sans-serif;
}

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

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

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

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

::selection { background: var(--acid); color: #0a0a0a; }

/* ---------- прогресс ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--acid), var(--violet));
  transform: scaleX(0); transform-origin: left;
}

/* ---------- шапка ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 4vw, 48px);
  mix-blend-mode: difference;
}
.bar__brand { display: flex; align-items: center; gap: 12px; font-family: var(--disp); font-size: 14px; letter-spacing: 0.08em; }
.bar__mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid #fff; border-radius: 12px; font-weight: 600; font-size: 13px;
}
.bar__nav { display: flex; gap: 22px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
.bar__nav a { opacity: 0.85; transition: opacity 0.2s; }
.bar__nav a:hover { opacity: 1; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.15);
  opacity: 0;
  transition: opacity 0.5s linear;
}
.hero__video.is-front { opacity: 1; }
.hero__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(7, 7, 11, 0.2) 0%, rgba(7, 7, 11, 0.75) 70%),
    linear-gradient(180deg, rgba(7, 7, 11, 0.55), rgba(7, 7, 11, 0.35) 45%, rgba(7, 7, 11, 0.9));
}
.hero__body {
  position: relative; z-index: 1;
  padding: 0 clamp(16px, 5vw, 72px);
  max-width: 1440px;
}
.hero__eyebrow {
  font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--mut); margin-bottom: 22px;
}
.hero__title {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(38px, 10.2vw, 168px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.hero__title .ch { display: inline-block; will-change: transform, opacity; }
.hero__title { overflow: hidden; padding-bottom: 0.06em; }
.hero__tag {
  margin-top: 18px;
  font-family: var(--disp); font-weight: 400;
  font-size: clamp(17px, 2.6vw, 30px);
}
.hero__tag em { font-style: normal; color: var(--acid); }
.hero__sub { margin-top: 18px; max-width: 520px; color: var(--mut); }
.hero__hint {
  position: absolute; z-index: 2; left: 50%; bottom: 86px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mut);
  white-space: nowrap;
}
.hero__hint i {
  width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--acid), transparent);
  animation: drip 1.6s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.marquee {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  border-top: 1px solid var(--line);
  background: rgba(7, 7, 11, 0.55); backdrop-filter: blur(8px);
  overflow: hidden; padding: 12px 0;
}
.marquee__track {
  display: flex; width: max-content;
  font-family: var(--disp); font-size: 13px; letter-spacing: 0.22em;
  color: var(--acid);
  animation: slide 22s linear infinite;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- МАНИФЕСТ ---------- */
.manifesto { position: relative; }
.manifesto__stage {
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 0 clamp(16px, 6vw, 80px);
  position: relative;
}
.beat {
  grid-area: 1 / 1;
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(30px, 6vw, 84px);
  line-height: 1.15; text-align: center; max-width: 1100px;
  opacity: 0; transform: translateY(40px) scale(0.96);
  will-change: transform, opacity;
}
.beat em { font-style: normal; color: var(--acid); }
.beat:nth-child(2) em { color: var(--violet); }
.beat:nth-child(3) em { color: var(--rose); }
.manifesto__count {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  font-family: var(--disp); font-size: 13px; letter-spacing: 0.2em; color: var(--mut);
}
.manifesto__count b { color: var(--acid); font-weight: 600; }

/* ---------- УСЛУГИ ---------- */
.services { position: relative; }
.services__pin {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; gap: clamp(28px, 5vh, 64px);
}
.chapter {
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--acid); margin-bottom: 14px;
}
.services__head { padding: 0 clamp(16px, 5vw, 72px); }
.services__head h2, .works-intro h2, .ai h2 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(26px, 4.4vw, 56px); line-height: 1.12;
}
.services__track {
  display: flex; gap: clamp(14px, 2vw, 28px);
  padding: 0 clamp(16px, 5vw, 72px);
  width: max-content; will-change: transform;
}
.svc {
  width: clamp(260px, 34vw, 460px);
  border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(160deg, var(--card), rgba(255, 255, 255, 0.01));
  padding: clamp(22px, 3vw, 40px);
  flex-shrink: 0;
  transition: border-color 0.3s;
}
.svc:hover { border-color: var(--acid); }
.svc__num {
  font-family: var(--disp); font-size: 13px; color: var(--acid); letter-spacing: 0.2em;
}
.svc h3 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(20px, 2.4vw, 30px); margin: 16px 0 12px;
}
.svc p { color: var(--mut); font-size: 15px; }

/* ---------- ПРОЕКТЫ ---------- */
.works-intro {
  min-height: 60svh; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(60px, 12vh, 140px) clamp(16px, 5vw, 72px);
  max-width: 1000px;
}
.works-intro__sub { color: var(--mut); margin-top: 16px; max-width: 480px; }

.case {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(70px, 14vh, 160px) clamp(16px, 5vw, 72px);
  max-width: 1440px; margin: 0 auto;
}
.case__label {
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 16px;
}
.case h3 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(24px, 3.2vw, 42px); line-height: 1.18; margin-bottom: 18px;
}
.case__copy > p { color: var(--mut); max-width: 460px; }
.case__stats {
  list-style: none; display: flex; gap: clamp(18px, 3vw, 40px); margin-top: 30px;
}
.case__stats b {
  display: block; font-family: var(--disp); font-weight: 600;
  font-size: clamp(24px, 3vw, 40px); color: var(--acid);
}
.case__stats span { font-size: 13px; color: var(--mut); }

/* кейс 1 — веер фото */
.nails__fan { position: relative; height: clamp(340px, 46vw, 560px); }
.nails__fan figure {
  position: absolute; width: 62%; aspect-ratio: 3 / 4;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
  will-change: transform;
}
.nails__fan img { width: 100%; height: 100%; object-fit: cover; }
.nails__fan figure:nth-child(1) { left: 4%; top: 6%; z-index: 4; }
.nails__fan figure:nth-child(2) { left: 22%; top: 0; z-index: 3; }
.nails__fan figure:nth-child(3) { left: 38%; top: 8%; z-index: 2; }
.nails__fan figure:nth-child(4) { left: 30%; top: 16%; z-index: 1; }

/* кейс 2 — панель с цифрами */
.corp__board {
  border: 1px solid var(--line); border-radius: 28px;
  background: linear-gradient(150deg, rgba(155, 123, 255, 0.08), rgba(255, 255, 255, 0.02));
  padding: clamp(24px, 3.4vw, 44px);
  display: flex; flex-direction: column; gap: clamp(20px, 2.6vw, 34px);
}
.corp__main span, .corp__cells span {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mut);
}
.corp__main b {
  display: block; font-family: var(--disp); font-weight: 800;
  font-size: clamp(56px, 8vw, 110px); line-height: 1; color: var(--ink);
}
.corp__cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.corp__cells div {
  border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  background: rgba(7, 7, 11, 0.5);
}
.corp__cells b {
  display: block; font-family: var(--disp); font-weight: 600;
  font-size: clamp(20px, 2.6vw, 34px); color: var(--violet); margin-top: 6px;
}
.corp__bars { display: flex; gap: 10px; align-items: flex-end; height: 110px; }
.corp__bars i {
  flex: 1; height: var(--h); border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--acid), rgba(198, 255, 62, 0.15));
  transform-origin: bottom; will-change: transform;
}

/* кейс 3 — товары */
.shop__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 24px); }
.prod {
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--card); will-change: transform, opacity;
  transition: border-color 0.3s, transform 0.3s;
}
.prod:hover { border-color: var(--rose); transform: translateY(-6px); }
.prod img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.prod__meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-size: 14px;
}
.prod__meta b { font-family: var(--disp); font-weight: 600; font-size: 15px; color: var(--rose); }

/* кейс 4 — телефон */
.case--bots .case__visual { display: flex; justify-content: center; }
.phone {
  width: clamp(260px, 26vw, 330px); border-radius: 42px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #101018, #0a0a10);
  padding: 18px 16px 26px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 0 0 6px #05050a;
}
.phone__notch { width: 108px; height: 22px; margin: 0 auto 18px; border-radius: 12px; background: #05050a; }
.phone__chat { display: flex; flex-direction: column; gap: 10px; min-height: 320px; }
.msg {
  max-width: 82%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.45;
  will-change: transform, opacity;
}
.msg--bot { background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); align-self: flex-start; }
.msg--user { background: rgba(155, 123, 255, 0.2); border: 1px solid rgba(155, 123, 255, 0.4); align-self: flex-end; }
.msg--pay {
  align-self: center; text-align: center;
  background: var(--acid); color: #0a0a0a; font-weight: 700;
  border-radius: 999px; padding: 12px 22px;
}

/* ---------- ACID LAB ---------- */
.lab {
  position: relative; overflow: hidden;
  padding: clamp(80px, 14vh, 160px) clamp(16px, 5vw, 72px);
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(155, 123, 255, 0.1), transparent 70%),
    radial-gradient(50% 40% at 15% 90%, rgba(198, 255, 62, 0.07), transparent 70%);
}
.lab__ghost {
  position: absolute; top: 6%; left: 0;
  font-family: var(--disp); font-weight: 800;
  font-size: clamp(90px, 18vw, 260px); line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(198, 255, 62, 0.16);
  pointer-events: none; user-select: none;
  will-change: transform;
}
.lab__head { position: relative; max-width: 760px; }
.lab__head h2 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(26px, 4.4vw, 56px); line-height: 1.12;
}
.lab__head p:last-child { color: var(--mut); margin-top: 16px; max-width: 560px; }
.lab__stage {
  position: relative;
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(10px, 1.6vw, 30px);
  margin-top: clamp(40px, 7vh, 80px);
}
.lab__card {
  width: clamp(140px, 16.5vw, 300px);
  flex-shrink: 0;
  border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  will-change: transform;
}
.lab__card:nth-child(even) { margin-top: clamp(34px, 5vw, 80px); }
.lab--sellers .lab__stage { flex-wrap: wrap; row-gap: clamp(16px, 2.4vw, 40px); }
@media (max-width: 899px) {
  .lab__stage {
    justify-content: flex-start;
    overflow-x: auto; padding-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .lab--sellers .lab__stage { flex-wrap: nowrap; row-gap: 0; }
  .lab__stage::-webkit-scrollbar { display: none; }
  .lab__card { width: min(62vw, 250px); }
  .lab__card:nth-child(even) { margin-top: 28px; }
}
.lab__card video {
  display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
}
.lab__card figcaption {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; font-size: 12px; letter-spacing: 0.06em;
  color: var(--mut);
}
.lab__card figcaption b { color: var(--acid); font-weight: 700; }
.lab__card { position: relative; }
.sound-toggle {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px;
  background: rgba(7, 7, 11, 0.6); backdrop-filter: blur(6px);
  color: var(--ink); font-family: var(--text); font-size: 12px; font-weight: 700;
  padding: 8px 14px; cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.sound-toggle:hover { border-color: var(--acid); }
.sound-toggle.is-on { background: var(--acid); color: #0a0a0a; border-color: var(--acid); }
.lab__badge {
  display: inline-block; margin-top: 14px;
  border: 1px dashed rgba(198, 255, 62, 0.5); border-radius: 999px;
  padding: 8px 16px; font-size: 12px; letter-spacing: 0.08em; color: var(--acid);
}

/* ---------- AI ---------- */
.ai { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.ai__bg { position: absolute; inset: 0; }
.ai__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.ai__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(7, 7, 11, 0.35) 30%, rgba(7, 7, 11, 0.45) 70%, var(--bg) 100%);
}
.ai__bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.ai__body {
  position: relative; z-index: 2;
  padding: clamp(80px, 16vh, 180px) clamp(16px, 5vw, 72px);
  max-width: 900px;
}
.ai__body p:last-child { color: var(--mut); margin-top: 18px; max-width: 560px; }

/* ---------- ФИНАЛ ---------- */
.finale {
  min-height: 100svh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  padding: 100px clamp(16px, 5vw, 72px);
  position: relative; overflow: hidden;
}
.finale::before {
  content: ""; position: absolute; inset: auto -20% -55% -20%; height: 90%;
  background: radial-gradient(50% 60% at 50% 100%, rgba(198, 255, 62, 0.16), transparent 70%);
  pointer-events: none;
}
.finale__lead {
  font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--mut); margin-bottom: 24px;
}
.finale__title {
  font-family: var(--disp); font-weight: 800;
  font-size: clamp(34px, 7vw, 96px); line-height: 1.08;
}
.finale__title em { font-style: normal; color: var(--acid); }
.finale__actions { display: flex; gap: 16px; margin-top: 46px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-block; padding: 16px 32px; border-radius: 999px;
  font-family: var(--disp); font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn--acid { background: var(--acid); color: #0a0a0a; box-shadow: 0 0 0 rgba(198, 255, 62, 0); }
.btn--acid:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(198, 255, 62, 0.35); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); margin-top: 0; }
.btn--ghost:hover { border-color: var(--acid); color: var(--acid); transform: translateY(-3px); }
.case--bots .btn { margin-top: 26px; }

/* ---------- футер ---------- */
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px clamp(16px, 5vw, 72px);
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--mut);
}
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: var(--acid); }

/* ---------- реакция на скролл ----------
   Элементы видимы по умолчанию: анимации задаёт JS (gsap.from).
   Если JS выключен или включён режим «меньше движения» — сайт просто статичен. */
[data-reveal] { will-change: transform, opacity; }
html.no-anim .manifesto__stage { place-items: start center; padding-top: 18vh; padding-bottom: 12vh; height: auto; min-height: 0; }
html.no-anim .beat { grid-area: auto; opacity: 1; transform: none; margin: 22px 0; }
html.no-anim .manifesto__count { display: none; }
html.no-anim .services__track { width: 100%; overflow-x: auto; }

/* ---------- мобильные ---------- */
@media (max-width: 899px) {
  .services__track {
    width: 100%; overflow-x: auto; padding-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .services__track::-webkit-scrollbar { display: none; }
  .svc { width: min(78vw, 340px); }
}

@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; gap: 36px; }
  .case__visual { order: -1; }
  .case--nails .case__visual { order: 0; }
  .nails__fan { height: clamp(300px, 78vw, 420px); }
  .nails__fan figure { width: 58%; }
  .corp__cells { grid-template-columns: 1fr 1fr; }
  .bar__name { display: none; }
  .hero__hint { bottom: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track, .hero__hint i { animation: none; }
}

/* ---------- доводка 23.08.2026 ---------- */
/* шапка: на первом экране эффектная инверсия, дальше - читаемая панель */
.bar.is-scrolled {
  mix-blend-mode: normal;
  background: rgba(8, 8, 11, 0.72);
  backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

/* переход по якорю не прячет заголовок под шапку */
section[id] {
  scroll-margin-top: 92px;
}

/* горизонтальные ленты листаются с прилипанием */
@media (max-width: 899px) {
  .services__track,
  .lab__stage {
    scroll-snap-type: x mandatory;
    scroll-padding-left: clamp(16px, 5vw, 72px);
  }

  .svc,
  .lab__card {
    scroll-snap-align: center;
  }

  .case h2 {
    font-size: clamp(24px, 6.4vw, 34px);
  }
}


/* ============================================================
   ФОН-АТМОСФЕРА: пять слоёв, каждый включается на своей секции
   grid   - музейная hairline-сетка (Structured)
   scan   - терминальные сканлайны и бегущий луч (Neon)
   orbs   - биолюминесцентные глубинные шары (Auros)
   stars  - созвездие частиц (Dala)
   sphere - иридесцентная сфера и кольца (OFF+BRAND.)
   ============================================================ */
.bgfx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bgfx > * {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

body.fx-grid .bgfx__grid,
body.fx-scan .bgfx__scan,
body.fx-orbs .bgfx__orbs,
body.fx-stars .bgfx__stars,
body.fx-sphere .bgfx__sphere,
body.fx-sphere .bgfx__rings {
  opacity: 1;
}

/* --- Structured: тонкая сетка музейного разворота --- */
.bgfx__grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 35%, transparent 78%);
  animation: bgfx-grid-drift 46s linear infinite;
}

@keyframes bgfx-grid-drift {
  to { background-position: 88px 88px, 88px 88px; }
}

/* --- Neon: сканлайны серверной и бегущий луч --- */
.bgfx__scan {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(52, 213, 154, 0.055) 0px,
    rgba(52, 213, 154, 0.055) 1px,
    transparent 1px,
    transparent 4px
  );
}

.bgfx__scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 34vh;
  background: linear-gradient(180deg, transparent, rgba(52, 213, 154, 0.09), transparent);
  animation: bgfx-scan-sweep 7.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes bgfx-scan-sweep {
  0% { transform: translateY(-40vh); }
  100% { transform: translateY(110vh); }
}

/* --- Auros: глубинные светящиеся шары --- */
.bgfx__orbs i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(64px);
}

.bgfx__orbs i:nth-child(1) {
  width: 46vw; height: 46vw;
  top: -8vh; left: -6vw;
  background: radial-gradient(circle at 40% 40%, rgba(1, 74, 70, 0.85), rgba(1, 38, 36, 0) 68%);
  animation: bgfx-orb-a 38s ease-in-out infinite;
}

.bgfx__orbs i:nth-child(2) {
  width: 38vw; height: 38vw;
  right: -6vw; top: 22vh;
  background: radial-gradient(circle at 55% 45%, rgba(122, 63, 118, 0.5), rgba(1, 29, 28, 0) 70%);
  animation: bgfx-orb-b 44s ease-in-out infinite;
}

.bgfx__orbs i:nth-child(3) {
  width: 30vw; height: 30vw;
  left: 34vw; bottom: -12vh;
  background: radial-gradient(circle at 50% 50%, rgba(52, 213, 154, 0.22), rgba(1, 29, 28, 0) 72%);
  animation: bgfx-orb-c 33s ease-in-out infinite;
}

@keyframes bgfx-orb-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, 8vh, 0) scale(1.1); }
}

@keyframes bgfx-orb-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50% { transform: translate3d(-7vw, -6vh, 0) scale(0.95); }
}

@keyframes bgfx-orb-c {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-4vw, -9vh, 0); }
}

/* --- Dala: созвездие частиц --- */
.bgfx__stars {
  width: 100%;
  height: 100%;
}

/* --- OFF+BRAND.: иридесцентная сфера и концентрические кольца --- */
.bgfx__sphere {
  background:
    radial-gradient(38vw 38vw at 72% 38%,
      rgba(255, 214, 92, 0.5) 0%,
      rgba(255, 105, 180, 0.42) 34%,
      rgba(96, 132, 255, 0.34) 62%,
      rgba(7, 7, 11, 0) 78%);
  filter: blur(28px);
  animation: bgfx-sphere-float 40s ease-in-out infinite;
}

@keyframes bgfx-sphere-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-4vw, 5vh, 0) scale(1.08); }
}

.bgfx__rings i {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: bgfx-ring-breathe 18s ease-in-out infinite;
}

.bgfx__rings i:nth-child(1) { width: 42vmax; height: 42vmax; }
.bgfx__rings i:nth-child(2) { width: 62vmax; height: 62vmax; animation-delay: -6s; }
.bgfx__rings i:nth-child(3) { width: 84vmax; height: 84vmax; animation-delay: -12s; }

@keyframes bgfx-ring-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.9; }
}

/* контент всегда над фоном */
.bar, main, .foot, .progress {
  position: relative;
  z-index: 1;
}

.bar { position: fixed; }

@media (prefers-reduced-motion: reduce) {
  .bgfx__grid,
  .bgfx__scan::after,
  .bgfx__orbs i,
  .bgfx__sphere,
  .bgfx__rings i {
    animation: none;
  }
}

@media (max-width: 899px) {
  .bgfx__orbs i { filter: blur(46px); }
  .bgfx__rings { display: none; }
}

/* ============================================================
   ПОРТФОЛИО И ВОЗМОЖНОСТИ
   ============================================================ */
.pf,
.pf-skills {
  position: relative;
  padding: clamp(80px, 14vh, 160px) clamp(16px, 5vw, 72px);
  max-width: 1440px;
  margin: 0 auto;
}

.pf__head {
  max-width: 880px;
}

.pf__lead {
  margin-top: 14px;
  max-width: 640px;
  color: var(--mut);
  line-height: 1.6;
}

.pf__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 38px 0 6px;
}

.pf-stat {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(160deg, var(--card), rgba(255, 255, 255, 0.01));
}

.pf-stat b {
  display: block;
  font-family: var(--disp);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--acid);
}

.pf-stat span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--mut);
  line-height: 1.35;
}

.pf__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 26px;
}

.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  color: var(--mut);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.pf-chip i {
  font-style: normal;
  font-size: 12px;
  opacity: 0.7;
}

.pf-chip:hover {
  color: var(--ink);
  border-color: rgba(198, 255, 62, 0.5);
}

.pf-chip.is-active {
  color: #07070b;
  background: var(--acid);
  border-color: var(--acid);
}

.pf__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.pf-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(160deg, var(--card), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s, transform 0.3s, opacity 0.3s;
}

.pf-card:hover {
  border-color: rgba(198, 255, 62, 0.42);
  transform: translateY(-3px);
}

.pf-card.is-hidden {
  display: none;
}

.pf-card__group {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acid);
}

.pf-card h3 {
  font-family: var(--disp);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.pf-card__text {
  color: var(--mut);
  font-size: 14px;
  line-height: 1.6;
}

.pf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.pf-card__tags span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-family: var(--mono, ui-monospace, "SFMono-Regular", Menlo, monospace);
  font-size: 11px;
  color: var(--mut);
}

.pf-card__meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
}

/* возможности */
.pf-skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.pf-skill {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(160deg, var(--card), rgba(255, 255, 255, 0.012));
}

.pf-skill h3 {
  font-family: var(--disp);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.pf-skill ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-skill li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 12px;
  color: var(--mut);
}

@media (max-width: 899px) {
  .pf__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pf__grid {
    grid-template-columns: 1fr;
  }

  .pf__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .pf__filters::-webkit-scrollbar { display: none; }

  .pf-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

/* возможности: ровная сетка 3x2 на широком экране */
@media (min-width: 1100px) {
  .pf-skills__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============================================================
   ДИНАМИЧЕСКИЕ ЭЛЕМЕНТЫ
   ============================================================ */
/* проволочная сетка с узлами поверх видео в первом экране */
.fx-wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.75;
}

/* число работ, собранное из частиц, и бары-эквалайзер рядом */
.pf__viz {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 30px;
}

.pf__count {
  width: 100%;
  height: 132px;
}

.pf__bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 92px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.pf__bars i {
  flex: 1;
  min-width: 2px;
  height: var(--h, 40%);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--acid), rgba(52, 213, 154, 0.25));
  transform-origin: bottom;
  animation: pf-bar var(--t, 2s) ease-in-out var(--d, 0s) infinite alternate;
}

@keyframes pf-bar {
  from { transform: scaleY(0.45); opacity: 0.55; }
  to { transform: scaleY(1); opacity: 1; }
}

/* секция жидких связей: metaball-шарики */
.fx-liquid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 150px) clamp(16px, 5vw, 72px);
}

.fx-liquid__copy p:not(.chapter) {
  margin-top: 16px;
  max-width: 460px;
  color: var(--mut);
  line-height: 1.6;
}

.fx-liquid__stage {
  position: relative;
  height: clamp(280px, 40vw, 420px);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 30% 20%, rgba(1, 74, 70, 0.55), transparent 70%),
    linear-gradient(160deg, #012624, #011d1c);
}

.fx-metaballs {
  width: 100%;
  height: 100%;
  /* склейка шариков в жидкость: размытие + резкий контраст альфы */
  filter: blur(12px) contrast(28);
  opacity: 0.85;
}

/* сфера из частиц за финальным заголовком */
.finale {
  position: relative;
}

.finale__sphere {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.finale > *:not(.finale__sphere) {
  position: relative;
  z-index: 1;
}

@media (max-width: 899px) {
  .pf__viz {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pf__count { height: 104px; }
  .pf__bars { height: 64px; }

  .fx-liquid {
    grid-template-columns: 1fr;
  }

  .fx-wire { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .pf__bars i { animation: none; }
}

/* жидкая склейка шариков: SVG-фильтр goo вместо blur+contrast */
.fx-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fx-metaballs {
  filter: url(#goo);
  opacity: 0.9;
}

/* финал: сфера из частиц читается поверх приглушённого градиента */
body.fx-sphere .bgfx__sphere {
  opacity: 0.55;
}

.finale__sphere {
  opacity: 0.9;
}

.finale__title,
.finale__lead {
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

/* схема связей: линии и подписи поверх жидких узлов */
.fx-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fx-liquid__stage {
  cursor: crosshair;
}

.fx-liquid__hint {
  position: absolute;
  left: 16px;
  bottom: 12px;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.fx-metaballs {
  position: absolute;
  inset: 0;
}

/* живой лог автоматизаций (приём Neon) */
.fx-term-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 150px) clamp(16px, 5vw, 72px);
}

.fx-term-copy p:not(.chapter) {
  margin-top: 16px;
  max-width: 460px;
  color: var(--mut);
  line-height: 1.6;
}

.fx-term {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0a0a0b;
  overflow: hidden;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.fx-term__head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #151617;
}

.fx-term__head i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #303236;
}

.fx-term__head i:first-child { background: #34d59a; }

.fx-term__head span {
  margin-left: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.fx-term__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 232px;
  padding: 14px 16px;
}

.fx-term__row {
  display: flex;
  gap: 12px;
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 13px;
  color: #c9cbcf;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.6s ease;
}

.fx-term__row.is-new {
  opacity: 0;
  transform: translateY(6px);
  background: rgba(52, 213, 154, 0.14);
}

.fx-term__row i {
  font-style: normal;
  color: #34d59a;
  opacity: 0.75;
}

.fx-term__row:last-child {
  background: rgba(52, 213, 154, 0.08);
  color: #eafff4;
}

/* гигантский wordmark, обрезанный краем экрана (приём Structured) */
.pf {
  overflow: hidden;
}

.pf__wordmark {
  position: absolute;
  top: -0.18em;
  right: -0.08em;
  z-index: 0;
  font-family: var(--disp);
  font-size: clamp(120px, 22vw, 300px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.pf__head,
.pf__filters,
.pf__grid {
  position: relative;
  z-index: 1;
}

/* магнитные кнопки: мягкий возврат на место */
.btn,
.pf-chip {
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    color 0.25s, border-color 0.25s, background 0.25s;
}

@media (max-width: 899px) {
  .fx-term-wrap {
    grid-template-columns: 1fr;
  }

  .fx-term__list {
    min-height: 190px;
  }
}

/* мозг из частиц - главный объект секции Human + AI */
.ai {
  position: relative;
}

.fx-figure {
  position: absolute;
  top: 50%;
  right: 4vw;
  width: min(46vw, 560px);
  height: min(46vw, 560px);
  transform: translateY(-50%);
  z-index: 1;
}

.ai__body {
  position: relative;
  z-index: 2;
}

/* отдельный экран со сферой из частиц */
.fx-orb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 96svh;
  padding: clamp(70px, 12vh, 150px) clamp(16px, 5vw, 72px);
  overflow: hidden;
}

.fx-orb__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.fx-orb__copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: center;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.7);
}

.fx-orb__copy p:not(.chapter) {
  margin-top: 16px;
  color: var(--mut);
  line-height: 1.6;
}

@media (max-width: 899px) {
  .fx-figure {
    position: relative;
    top: auto;
    right: auto;
    width: min(88vw, 420px);
    height: min(88vw, 420px);
    margin: 0 auto 12px;
    transform: none;
  }

  .fx-orb {
    min-height: auto;
  }
}

/* подсветка под сферой данных - глубина, как в оригинале */
.fx-orb::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18vh;
  width: min(90vw, 1100px);
  height: 60vh;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(52, 213, 154, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   СЦЕНА ПЕРЕТЕКАЮЩИХ ЧАСТИЦ
   ============================================================ */
.morph {
  position: relative;
  height: 320svh;
}

.morph__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.morph__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.morph__steps {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  padding: 0 clamp(16px, 5vw, 72px);
  display: grid;
}

.morph__step {
  grid-area: 1 / 1;
  max-width: 420px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.morph__step.is-active {
  opacity: 1;
  transform: none;
}

.morph__step h2 {
  margin: 10px 0 12px;
}

.morph__step p:not(.chapter) {
  color: var(--mut);
  line-height: 1.6;
  text-shadow: 0 4px 20px rgba(7, 7, 11, 0.9);
}

.morph__hint {
  position: absolute;
  right: clamp(16px, 5vw, 72px);
  bottom: 26px;
  z-index: 1;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 899px) {
  .morph {
    height: 280svh;
  }

  .morph__step {
    max-width: 100%;
    text-align: center;
    margin-top: 42svh;
  }

  .morph__hint {
    left: 0;
    right: 0;
    text-align: center;
  }
}

/* финал без второй сферы: только иридесцентный градиент и кольца */
.finale {
  position: relative;
  padding-block: clamp(90px, 16vh, 180px);
}

/* бегущая строка крупная, в размер заголовка первого экрана */
.marquee {
  padding: 6px 0;
  background: rgba(7, 7, 11, 0.42);
}

.marquee__track {
  font-size: clamp(30px, 7.4vw, 122px);
  font-weight: 800;
  letter-spacing: -0.005em;
  line-height: 1.04;
  color: transparent;
  -webkit-text-stroke: 1px rgba(198, 255, 62, 0.55);
  animation-duration: 34s;
}

@media (max-width: 899px) {
  .marquee__track {
    font-size: clamp(26px, 11vw, 64px);
    -webkit-text-stroke-width: 0.8px;
  }
}

/* шапка всегда выше контента, декоративные слои не ловят клики */
.bar {
  z-index: 60;
}

.hero__veil,
.hero__media,
.lab__ghost,
.pf__wordmark,
.bgfx {
  pointer-events: none;
}

/* текст только для поиска и скринридеров */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- частые вопросы ---------- */
.faq {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 150px) clamp(16px, 5vw, 72px);
}

.faq__list {
  display: grid;
  /* min(): на телефоне 320 колонка 340px распирала страницу на 36px вбок */
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 12px;
  margin-top: 34px;
}

.faq__item {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(160deg, var(--card), rgba(255, 255, 255, 0.012));
  transition: border-color 0.25s;
}

.faq__item[open] {
  border-color: rgba(198, 255, 62, 0.4);
}

.faq__item summary {
  padding: 18px 22px;
  font-family: var(--disp);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  color: var(--acid);
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s ease;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--mut);
  line-height: 1.6;
}

/* ссылки на страницы услуг */
.lp-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  color: var(--acid);
  border-bottom: 1px solid rgba(198, 255, 62, 0.35);
}

.foot__services {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px clamp(16px, 5vw, 72px) 0;
  font-size: 14px;
}

.foot__services a {
  color: var(--mut);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot__services a:hover {
  color: var(--acid);
}

/* ===== Меню на телефоне (18.10.2026) =====
   Пять пунктов не помещаются в 390px и наезжали на логотип. На узких экранах -
   кнопка «Меню» с выпадающим списком; без JS ссылки идут второй строкой лентой. */
.bar__menu {
  display: none;
}

@media (max-width: 760px) {
  .bar--menu {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .bar--menu .bar__nav {
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .bar--menu .bar__nav::-webkit-scrollbar {
    display: none;
  }

  .js .bar--menu {
    flex-wrap: nowrap;
  }

  .js .bar__menu {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 9999px;
    background: transparent;
    font: 600 14px/1 var(--text);
    letter-spacing: 0.04em;
    color: #fff;
    cursor: pointer;
  }

  .bar__menu:focus-visible {
    outline: 2px solid var(--acid);
    outline-offset: 2px;
  }

  .bar__menu-icon {
    position: relative;
    width: 16px;
    height: 10px;
  }

  .bar__menu-icon i {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s, top 0.25s;
  }

  .bar__menu-icon i:first-child { top: 1px; }
  .bar__menu-icon i:last-child { top: 7px; }

  .bar.is-open .bar__menu-icon i:first-child { top: 4px; transform: rotate(45deg); }
  .bar.is-open .bar__menu-icon i:last-child { top: 4px; transform: rotate(-45deg); }

  .js .bar--menu .bar__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    width: auto;
    padding: 6px 16px 18px;
    overflow: visible;
    background: rgba(8, 8, 11, 0.97);
    border-bottom: 1px solid var(--line);
    font-size: 18px;
    white-space: normal;
  }

  .js .bar--menu.is-open .bar__nav {
    display: flex;
  }

  .js .bar--menu .bar__nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    opacity: 1;
  }

  .js .bar--menu .bar__nav a:last-child {
    border-bottom: 0;
  }

  /* Открытое меню - на подложке и без режима наложения, иначе цвета инвертируются. */
  .bar.is-open {
    mix-blend-mode: normal;
    background: rgba(8, 8, 11, 0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bar__menu-icon i {
    transition: none;
  }
}

/* ===== Главная v2 (18.10.2026): услуги из каталога, кейсы и AI-лаборатория во вкладках ===== */

/* --- услуги: направления + подборщик --- */
.hs {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 130px) clamp(16px, 5vw, 72px) clamp(40px, 7vh, 80px);
}

.hs__head h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hs__lead {
  max-width: 620px;
  margin-top: 16px;
  color: var(--mut);
}

.hs__sits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}

.hs__sits-label {
  margin-right: 6px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acid);
}

.hs-sit {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  transition: border-color 0.2s, background-color 0.2s;
}

.hs-sit:hover,
.hs-sit:focus-visible {
  border-color: var(--acid);
  background: rgba(198, 255, 62, 0.08);
}

.hs__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.hs-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--card), rgba(255, 255, 255, 0.01));
  transition: border-color 0.25s, transform 0.25s;
}

.hs-card:hover,
.hs-card:focus-visible {
  border-color: rgba(198, 255, 62, 0.55);
  transform: translateY(-3px);
}

.hs-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hs-card__icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--acid);
}

.hs-card__n {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mut);
}

.hs-card h3 {
  font-family: var(--disp);
  font-size: 19px;
  font-weight: 600;
}

.hs-card ul {
  list-style: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mut);
}

.hs-card__more {
  color: var(--acid);
}

.hs__all {
  margin-top: 26px;
}

/* --- вкладки (кейсы и лаборатория) --- */
.tabs__list {
  display: flex;
  gap: 8px;
  margin: 26px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.tabs__list::-webkit-scrollbar {
  display: none;
}

.tabs__tab {
  flex: none;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 7, 11, 0.6);
  font: 600 14px/1 var(--text);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.tabs__tab:hover {
  border-color: rgba(198, 255, 62, 0.55);
}

.tabs__tab[aria-selected="true"] {
  border-color: var(--acid);
  background: var(--acid);
  color: #0a0a0a;
}

.tabs__tab:focus-visible,
.tabs__panel:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.tabs__panel[hidden] {
  display: none !important;
}

/* --- кейсы --- */
.cases {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(50px, 9vh, 110px) clamp(16px, 5vw, 72px) clamp(30px, 6vh, 70px);
}

.cases__head h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.08;
}

.cases__sub {
  margin-top: 12px;
  color: var(--mut);
}

.cases .case {
  max-width: none;
  margin: 0;
  padding: clamp(24px, 4vh, 44px) 0 0;
}

.cases .nails__fan {
  height: clamp(300px, 32vw, 440px);
}

.cases .phone__chat {
  min-height: 280px;
}

/* --- AI-лаборатория --- */
.ailab .lab__head {
  max-width: 820px;
}

.ailab__panel {
  margin-top: 22px;
}

.ailab__text {
  max-width: 680px;
  color: var(--mut);
}

.ailab__panel .lab__stage {
  margin-top: 22px;
}

.ailab__agents {
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(198, 255, 62, 0.4) transparent;
}

.ailab__agents .lab__card,
.ailab__agents .lab__card:nth-child(even) {
  width: clamp(150px, 14vw, 210px);
  margin-top: 0;
}

.ailab__play {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(7, 7, 11, 0.62);
  backdrop-filter: blur(6px);
  font: 700 13px/1 var(--text);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, top 0.25s;
}

.ailab__play:hover,
.ailab__play:focus-visible {
  border-color: var(--acid);
}

.ailab__play:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.ailab__agent.is-playing .ailab__play {
  top: auto;
  bottom: 54px;
  background: var(--acid);
  border-color: var(--acid);
  color: #0a0a0a;
}

.ailab__panel.fx-term-wrap,
.ailab__panel.fx-liquid {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
}

.ailab__morph {
  height: auto;
}

.ailab__morph .morph__sticky {
  position: relative;
  height: clamp(420px, 62vh, 560px);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.ailab__morph .morph__steps {
  padding: 0 clamp(18px, 3vw, 40px);
}

@media (max-width: 899px) {
  .hs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ailab__morph .morph__step {
    margin-top: 0;
    align-self: end;
    padding-bottom: 56px;
  }
}

@media (max-width: 560px) {
  .hs__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hs-card ul {
    display: none;
  }

  .hs-card {
    padding: 16px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-card,
  .tabs__tab,
  .ailab__play {
    transition: none;
  }
}

/* Плотнее: главная сокращена до ~12 экранов (замер 18.10.2026: услуги 1,62 -> цель ~1,2;
   лаборатория 1,69 -> цель ~1,3 экрана на 1366x768) */
.hs {
  padding-top: clamp(50px, 8vh, 90px);
  padding-bottom: clamp(24px, 4vh, 50px);
}

.hs__sits {
  margin-top: 20px;
}

.hs__grid {
  margin-top: 18px;
  gap: 10px;
}

.hs-card {
  gap: 8px;
  padding: 16px 18px;
}

.hs-card h3 {
  font-size: 17px;
}

.hs__all {
  margin-top: 18px;
}

.ailab {
  padding-top: clamp(50px, 9vh, 110px);
  padding-bottom: clamp(40px, 7vh, 90px);
}

.ailab .lab__head h2 {
  font-size: clamp(26px, 3.6vw, 48px);
}

.ailab .lab__head p:last-child {
  margin-top: 12px;
}

.ailab #lab-frames .lab__card {
  width: clamp(130px, 12.5vw, 220px);
}

.ailab #lab-frames .lab__card:nth-child(even) {
  margin-top: 26px;
}

@media (max-width: 720px) {
  .hs__sits {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .hs__sits::-webkit-scrollbar {
    display: none;
  }

  .hs-sit,
  .hs__sits-label {
    flex: none;
  }
}

/* Вкладки без JS: панели идут подряд, кнопки вкладок не нужны. Со скриптом (html.js)
   невыбранные панели скрыты сразу, до того как ui.js проставит им hidden. */
.tabs__list {
  display: none;
}

.js .tabs__list {
  display: flex;
}

.js .tabs__panel--rest {
  display: none;
}

/* «От идеи к деньгам» на телефоне: фигура сверху, текст шага под ней, а не поверх */
@media (max-width: 899px) {
  .ailab__morph .morph__sticky {
    display: flex;
    flex-direction: column;
    height: auto;
    place-items: initial;
  }

  .ailab__morph .morph__canvas {
    position: relative;
    inset: auto;
    flex: none;
    height: clamp(240px, 62vw, 340px);
  }

  .ailab__morph .morph__steps {
    padding: 16px 18px 48px;
  }

  .ailab__morph .morph__step {
    margin-top: 0;
    padding-bottom: 0;
    align-self: start;
    text-align: left;
  }

  .ailab__morph .morph__hint {
    bottom: 16px;
  }
}

/* --- портфолио: свёрнуто до двух рядов, кнопка «Показать все» (только с JS) --- */
@media (min-width: 1100px) {
  .pf__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pf__more {
  display: none;
  margin-top: 20px;
  text-align: center;
}

.js .pf__more {
  display: block;
}

.js .pf__more[hidden] {
  display: none;
}

.js .pf__grid:not(.is-expanded):not(.is-filtered) .pf-card:nth-child(n+7) {
  display: none;
}

@media (max-width: 720px) {
  .js .pf__grid:not(.is-expanded):not(.is-filtered) .pf-card:nth-child(n+5) {
    display: none;
  }
}

/* --- блог на главной: три свежие статьи --- */
.hb {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(50px, 9vh, 110px) clamp(16px, 5vw, 72px) clamp(30px, 5vh, 60px);
}

.hb__head h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.08;
}

.hb__lead {
  max-width: 640px;
  margin-top: 12px;
  color: var(--mut);
}

.hb__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hb-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 0 20px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--card), rgba(255, 255, 255, 0.01));
  transition: border-color 0.25s, transform 0.25s;
}

.hb-card:hover,
.hb-card:focus-visible {
  border-color: rgba(198, 255, 62, 0.55);
  transform: translateY(-3px);
}

.hb-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.hb-card__cover {
  display: block;
  margin: 0 -20px 8px;
  aspect-ratio: 64 / 24;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hb-card__cover svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hb-card__meta {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acid);
}

.hb-card h3 {
  font-family: var(--disp);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.hb-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mut);
}

.hb__all {
  margin-top: 20px;
}

@media (max-width: 899px) {
  .hb__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hb-card p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hb-card {
    transition: none;
  }
}

/* Поля разделов после портфолио: главная укладывается в ~12 экранов (замер 18.10.2026) */
.pf,
.pf-skills {
  padding-top: clamp(56px, 9vh, 110px);
  padding-bottom: clamp(56px, 9vh, 110px);
}

.faq {
  padding-top: clamp(50px, 8vh, 100px);
  padding-bottom: clamp(50px, 8vh, 100px);
}

/* Постеры AI-ведущих - ленивые картинки поверх ролика: в скрытой вкладке не грузятся
   (постер у <video> браузер качает всегда), при воспроизведении уходят. */
.ailab__poster {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* постер уходит, когда ролик реально заиграл (has-frame ставит ui.js по событию playing):
   на медленной сети после нажатия карточка не остаётся пустой */
.ailab__agent.has-frame .ailab__poster {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ailab__poster {
    transition: none;
  }
}
