/* ═══════════════════════════════════════════════════════
   panflow — design-05 «Linear» : тёмный техно-SaaS
   ═══════════════════════════════════════════════════════ */

/* Шрифты локально, без Google Fonts. unicode-range скопирован как есть
   из ответа fonts.googleapis.com/css2 — не редактировать вручную. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary: #5e6ad2;
  --primary-bright: #7170ff;
  --primary-press: #4c56b8;
  --primary-tint: #a3a2ff;
  --accent-cyan: #4ea7fc;
  --on-primary: #fff;
  /* rgb channel triplets — от них считаются свечения и авроры.
     Акцент один, indigo: под него сделаны фавикон, монограмма и og-картинка.
     Переключателя тем больше нет, атрибута data-theme в разметке тоже. */
  --primary-rgb: 94, 106, 210;
  --primary-bright-rgb: 113, 112, 255;
  --accent-cyan-rgb: 78, 167, 252;
  --ink: #f7f8f8;
  --ink-soft: #d0d6e0;
  --body: #8a8f98;
  --mute: #62666d;
  --hairline: #23252a;
  --hairline-bright: #34353a;
  --hairline-tr: rgba(255, 255, 255, 0.08);
  --canvas: #08090a;
  --canvas-raised: #0f1011;
  --canvas-panel: #16171a;
  --canvas-overlay: #1c1d20;
  --aurora-violet: rgba(var(--primary-bright-rgb), 0.35);
  --aurora-indigo: rgba(var(--primary-rgb), 0.25);
  --aurora-cyan: rgba(var(--accent-cyan-rgb), 0.18);
  --success: #4cb782;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 14px;
  --r-2xl: 18px;
  --container: 1064px;
}

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

html {  }

body {
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--primary); color: var(--on-primary); }

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

h1, h2, h3 {
  color: var(--ink);
  font-weight: 510;
  font-variation-settings: "wght" 510;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 510;
  font-variation-settings: "wght" 510;
  letter-spacing: -0.15px;
  white-space: nowrap;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 8px 30px rgba(var(--primary-rgb), 0.28);
}
.btn--primary:hover {
  background: var(--primary-bright);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 12px 40px rgba(var(--primary-bright-rgb), 0.4);
}
.btn--ghost {
  background: var(--canvas-overlay);
  color: var(--ink);
  border: 1px solid var(--hairline-bright);
}
.btn--ghost:hover { border-color: var(--mute); transform: translateY(-1px); }
.btn--ink { background: var(--ink); color: var(--canvas); }
.btn--ink:hover { background: #fff; }
.btn--sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 50px; padding: 0 28px; }

/* ─── Nav ─── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.nav.is-scrolled {
  background: rgba(8, 9, 10, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom-color: var(--hairline-tr);
}
.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 510;
  font-variation-settings: "wght" 510;
  font-size: 16px;
  letter-spacing: 0.08em;
}
.nav__logo-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 25%, var(--primary-bright), var(--primary) 55%, var(--primary-press));
  box-shadow: 0 0 14px rgba(var(--primary-bright-rgb), 0.55);
}
/* Монограмма: строчная «p» тем же Inter, что и слово рядом.
   translateY компенсирует выносной элемент — без сдвига буква висит ниже центра.
   Цвет — var(--on-primary): на светлых темах (Графит, Золото, Лайм) белый неразличим. */
.nav__logo-mark::before {
  content: "p";
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  font-variation-settings: "wght" 600;
  line-height: 1;
  letter-spacing: 0;
  color: var(--on-primary);
  transform: translateY(-3px);
}
.nav__links {
  display: flex;
  gap: 6px;
  margin-inline: auto;
}
.nav__links a {
  color: var(--body);
  font-size: 14px;
  font-weight: 510;
  font-variation-settings: "wght" 510;
  letter-spacing: -0.14px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__links a:hover { color: var(--ink); background: var(--hairline-tr); }

/* Якорь ведёт к самому верху секции, а фиксированная шапка его закрывает —
   отступ прокрутки поднимает точку остановки на высоту шапки плюс воздух.
   Только десктоп: ниже 700px шапка уходит в поток и уже ничего не перекрывает,
   с этим правилом там секции проматывались бы мимо начала. */
@media (min-width: 701px) {
  html { scroll-padding-top: 80px; }
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: 168px 0 96px;
  overflow: clip;
}
.hero__orbs { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
.orb--violet {
  width: 560px; height: 560px;
  left: 50%; top: -220px;
  margin-left: -280px;
  background: radial-gradient(circle, var(--aurora-violet), transparent 65%);
  animation: orbFloatA 14s ease-in-out infinite;
}
.orb--indigo {
  width: 440px; height: 440px;
  left: 12%; top: 60px;
  background: radial-gradient(circle, var(--aurora-indigo), transparent 65%);
  animation: orbFloatB 18s ease-in-out infinite;
}
.orb--cyan {
  width: 400px; height: 400px;
  right: 8%; top: 140px;
  background: radial-gradient(circle, var(--aurora-cyan), transparent 65%);
  animation: orbFloatC 16s ease-in-out infinite;
}
@keyframes orbFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, 36px, 0) scale(1.06); }
}
@keyframes orbFloatB {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(48px, -30px, 0); }
}
@keyframes orbFloatC {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-44px, 34px, 0); }
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline-tr) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-tr) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.16;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 32%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 32%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--hairline-bright);
  background: var(--canvas-overlay);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 510;
  font-variation-settings: "wght" 510;
  transition: border-color 0.18s ease;
}
.pill:hover { border-color: var(--primary); }
.pill__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(76, 183, 130, 0.8);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.pill__arrow { color: var(--primary-bright); }

.hero__title {
  margin-top: 28px;
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.05;
  letter-spacing: clamp(-2.7px, -0.04em, -1.3px);
}
.hero__title-accent {
  background: linear-gradient(100deg, var(--primary-bright), var(--primary-tint) 45%, var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin-top: 22px;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.18px;
  color: var(--body);
}
.hero__cta {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Плашек может быть сколько угодно: не сетка на фиксированное число колонок,
   а flex с переносом. Последний ряд растягивается по ширине — пустых ячеек
   не остаётся ни при трёх плашках, ни при пяти. */
.hero__stats {
  margin-top: 84px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--hairline);
  border-radius: var(--r-2xl);
  background: rgba(15, 16, 17, 0.6);
  overflow: hidden;
}
.stat {
  position: relative;
  flex: 1 1 190px;
  min-width: 0;
  padding: 26px 20px;
  text-align: center;
}
/* Разделители — псевдоэлементы на 1px левее и выше плашки. У левого столбца
   и у первого ряда линия уходит за padding-box и её срезает overflow: hidden,
   поэтому лишних линий по краям нет при любом числе плашек и рядов. */
.stat::before,
.stat::after { content: ""; position: absolute; background: var(--hairline); }
.stat::before { left: -1px; top: 0; bottom: 0; width: 1px; }
.stat::after { top: -1px; left: 0; right: 0; height: 1px; }
.stat__num {
  color: var(--ink);
  font-size: 26px;
  font-weight: 510;
  font-variation-settings: "wght" 510;
  letter-spacing: -0.8px;
}
.stat__label { margin-top: 6px; font-size: 13px; color: var(--mute); }

/* ─── Marquee ─── */
.marquee {
  border-block: 1px solid var(--hairline);
  padding: 16px 0;
  overflow: hidden;
  -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;
  gap: 28px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  color: var(--mute);
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* ─── Sections ─── */
.section { --section-pad: 112px; padding: var(--section-pad) 0; position: relative; }
/* Стык двух секций с одинаковым фоном. Там, где фон соседей разный, суммарные
   112 + 112 читаются как граница блоков. Там, где фон одинаковый, те же 224px —
   просто дыра: границы не видно, а пустоты вдвое больше. На таких стыках режем
   padding пополам с каждой стороны, суммарный зазор становится 112px.
   Какие именно секции стыкуются — размечено классами в index.html. */
.section--joint-top { padding-top: calc(var(--section-pad) / 2); }
.section--joint-bottom { padding-bottom: calc(var(--section-pad) / 2); }
.section__head { max-width: 620px; margin-bottom: 56px; }
.eyebrow {
  color: var(--primary-bright);
  font-size: 13px;
  font-weight: 510;
  font-variation-settings: "wght" 510;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.section__title {
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -1.4px;
}
.section__lead { margin-top: 16px; font-size: 17px; line-height: 1.55; }

/* ─── Service cards ─── */
.cards4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  background: var(--canvas-panel);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(var(--primary-bright-rgb), 0.55), transparent 40%, transparent 60%, rgba(var(--accent-cyan-rgb), 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--primary-bright-rgb), 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); }
.card:hover::before, .card:hover::after { opacity: 1; }
/* Превью работы вместо иконки: та же пропорция 16:9, что у карточек портфолио,
   скругление и рамка — как были у иконки. */
.card__shot {
  aspect-ratio: 16 / 9;
  margin-bottom: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline-bright);
  background: var(--canvas-overlay);
  overflow: hidden;
}
.card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}
.card:hover .card__shot img { transform: scale(1.035); }
.card h3 {
  font-size: 18px;
  letter-spacing: -0.36px;
  margin-bottom: 8px;
}
.card p { font-size: 14px; line-height: 1.55; color: var(--body); }

/* ─── Agent / chat ─── */
.section--agent {
  background: var(--canvas-raised);
  border-block: 1px solid var(--hairline);
  overflow: clip;
}
.agent__bloom {
  position: absolute;
  width: 700px; height: 500px;
  right: -160px; top: -120px;
  background: radial-gradient(ellipse, var(--aurora-indigo), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
}
.agent__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.agent__list { list-style: none; margin: 26px 0 32px; }
.agent__list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  color: var(--ink-soft);
  font-size: 15px;
}
.tick {
  color: var(--success);
  font-weight: 510;
  font-variation-settings: "wght" 510;
}

.chatwin {
  border-radius: var(--r-2xl);
  border: 1px solid var(--hairline-tr);
  background: rgba(28, 29, 32, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 70px rgba(0, 0, 0, 0.6), 0 0 80px rgba(var(--primary-rgb), 0.12);
  overflow: hidden;
}
.chatwin__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(15, 16, 17, 0.7);
}
.chatwin__dots { display: flex; gap: 6px; }
.chatwin__dots i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--hairline-bright);
}
.chatwin__dots i:first-child { background: #eb5757; opacity: 0.75; }
.chatwin__dots i:nth-child(2) { background: #f2c94c; opacity: 0.75; }
.chatwin__dots i:nth-child(3) { background: #4cb782; opacity: 0.75; }
.chatwin__title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
}
.chatwin__status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success);
}
.chatwin__status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}
.chatwin__body {
  padding: 20px 16px;
  min-height: 300px;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chatwin__body::-webkit-scrollbar { display: none; }
.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  animation: msgIn 0.3s ease both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg--user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg--agent {
  align-self: flex-start;
  background: var(--canvas-overlay);
  border: 1px solid var(--hairline);
  color: var(--ink-soft);
  border-bottom-left-radius: 4px;
}
.msg--agent .caret {
  display: inline-block;
  width: 7px; height: 15px;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--primary-bright);
  animation: caretBlink 0.8s steps(1) infinite;
}
@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.msg--typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 14px 16px;
  background: var(--canvas-overlay);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.msg--typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mute);
  animation: typingDot 1.1s ease-in-out infinite;
}
.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.chatwin__input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 0 6px 0 14px;
  height: 42px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline-bright);
  background: var(--canvas-raised);
}
.chatwin__placeholder { font-size: 13px; color: var(--mute); }
.chatwin__send {
  margin-left: auto;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}

/* ─── Works ─── */
.works {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.work {
  display: block;
  border-radius: var(--r-2xl);
  border: 1px solid var(--hairline);
  background: var(--canvas-panel);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
a.work:hover {
  transform: translateY(-5px);
  border-color: var(--hairline-bright);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(var(--primary-rgb), 0.1);
}
.work__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas-raised);
}
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}
a.work:hover .work__media img { transform: scale(1.035); }
.work__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
}
.work__meta h3 { font-size: 19px; letter-spacing: -0.4px; margin-bottom: 4px; }
.work__meta p { font-size: 14px; color: var(--body); }
.work__arrow {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline-bright);
  color: var(--ink);
  font-size: 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
a.work:hover .work__arrow {
  background: var(--primary);
  border-color: var(--primary);
  transform: rotate(45deg);
}
/* ─── Process ─── */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 46px; left: 6%; right: 6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-bright-rgb), 0.5) 30%, rgba(var(--accent-cyan-rgb), 0.5) 70%, transparent);
  background-size: 220% 100%;
  animation: lineFlow 5s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes lineFlow { to { background-position: -220% 0; } }
.step {
  position: relative;
  z-index: 1;
  padding: 24px 18px 22px;
  border-radius: var(--r-xl);
  border: 1px solid var(--hairline);
  background: var(--canvas-panel);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.step::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--primary-bright-rgb), 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.step:hover { border-color: rgba(var(--primary-bright-rgb), 0.45); transform: translateY(-4px); }
.step:hover::after { opacity: 1; }
.step__num {
  position: relative;
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--primary-bright);
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid rgba(var(--primary-bright-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.08);
  margin-bottom: 16px;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.step:hover .step__num {
  transform: scale(1.12);
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 5px rgba(var(--primary-bright-rgb), 0.12);
}
.step h3 { font-size: 16px; letter-spacing: -0.3px; margin-bottom: 6px; }
.step p { font-size: 13px; line-height: 1.5; color: var(--body); }

/* ─── Final CTA ─── */
.final { overflow: clip; }
.final__bloom {
  position: absolute;
  left: 50%; bottom: -260px;
  width: 900px; height: 520px;
  margin-left: -450px;
  background:
    radial-gradient(ellipse, var(--aurora-violet), transparent 60%),
    radial-gradient(ellipse 60% 50% at 40% 60%, var(--aurora-cyan), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}
.final__inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.final__title {
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -1.8px;
  line-height: 1.08;
}
.final__lead {
  margin-top: 18px;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.55;
}
.final__cta {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.final__note { margin-top: 22px; font-size: 13px; color: var(--mute); }

/* ─── Founder ─── */
.section--founder {
  background: var(--canvas-raised);
  border-block: 1px solid var(--hairline);
  overflow: clip;
}
.founder__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: center;
}
.founder__photo {
  margin: 0;
  border-radius: var(--r-2xl);
  overflow: hidden;
  border: 1px solid var(--hairline-tr);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(var(--primary-rgb), 0.12);
  aspect-ratio: 4 / 5;
  background: var(--canvas-panel);
}
.founder__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.founder__text .section__title { margin-top: 12px; }
.founder__text .section__lead { margin-top: 16px; max-width: 520px; }
.founder__cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 899px) {
  .founder__inner { grid-template-columns: 1fr; gap: 32px; justify-items: start; }
  .founder__photo { width: min(260px, 70%); }
}
@media (max-width: 700px) {
  .founder__cta .btn { width: 100%; max-width: 340px; }
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0;
}
.footer__legal {
  margin-top: 16px;
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.01em;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__brand {
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
}
/* Ссылка на политику стоит в юр. строке и выглядит как она же: тот же размер,
   тот же цвет. Подчёркивание приглушённое — ссылка должна читаться как ссылка,
   но не перетягивать внимание на себя. */
.footer__legal a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--hairline-bright);
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.footer__legal a:hover { color: var(--ink-soft); text-decoration-color: currentColor; }
.footer__legal-sep { margin-inline: 2px; color: var(--hairline-bright); }
/* Пальцем в 12px строку не попасть — на сенсорных экранах ссылка получает
   вертикальный запас. Десктоп не трогаем: там высота строки не меняется. */
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .footer__legal a { display: inline-block; padding-block: 13px; }   /* 18px строки + 26 = 44 */
  .footer__legal-sep { display: none; }
}

.footer__links { display: flex; gap: 20px; }
.footer__links a {
  font-size: 14px;
  color: var(--body);
  transition: color 0.15s ease;
}
.footer__links a:hover { color: var(--primary-bright); }

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .orb, .marquee__track, .pill__dot, .chatwin__status-dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── Particle network background ─── */
.netcanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}
.hero__content,
.section--agent .agent__grid,
.final__inner { position: relative; z-index: 1; }

/* ═══ Responsive ═══ */
@media (max-width: 1023px) {
  .cards4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 899px) {
  .agent__grid { grid-template-columns: 1fr; gap: 44px; }
  .section { --section-pad: 88px; }
}

@media (max-width: 700px) {
  .nav__links { display: none; }
  /* Шапка уезжает вместе со страницей. iOS Safari во время инерционной прокрутки
     не пересчитывает положение fixed-элементов на каждый кадр: шапка догоняла
     страницу рывками и в эти моменты висела посреди экрана поверх текста и фото.
     В потоке она обычная строка на фоне страницы: фон прозрачный (под ним тот же
     --canvas, что и у body), без размытия — backdrop-filter вне fixed ничего не
     даёт и только греет телефон, — и без нижней линии, иначе на первом экране
     появился бы шов. Класс .is-scrolled скрипт продолжает вешать, он нужен
     десктопу; здесь гасим и его, иначе фон с границей всплывали бы при прокрутке
     прямо в потоке. Специфичность .nav.is-scrolled выше, поэтому селектор двойной.
     relative вместо static — только чтобы работал z-index: первый экран подтянут
     под шапку отрицательным margin (см. .hero ниже), и без z-index свечение орбов
     и сетка частиц рисовались бы поверх логотипа и кнопки. На прокрутку это
     не влияет: relative, в отличие от fixed, едет вместе со страницей. */
  .nav,
  .nav.is-scrolled {
    position: relative;
    z-index: 2;
    background: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .works { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .step { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; }
  .step__num { margin-bottom: 0; margin-top: 2px; }
  .step h3 { grid-column: 2; }
  .step p { grid-column: 2; }
  /* Шапка в потоке отнимает у первого экрана свои 65px (64 + линия) — вернуть их
     отрицательным отступом, а не срезать padding. Срезанный padding опускает
     верхнюю кромку .hero на 65px вниз, а у неё overflow: clip — свечение орба
     обрывается ровно под шапкой и через весь экран идёт заметный шов
     (замерено: #08090a → #141525, скачок 50 из 765 между соседними строками).
     С margin: -65px кромка снова на нуле, первый экран рисуется как раньше,
     а пилюля остаётся на прежних 132px от верха страницы. */
  .hero { margin-top: -65px; padding: 132px 0 72px; }
  .hero__stats { margin-top: 60px; }
  .section { --section-pad: 72px; }
  .section__head { margin-bottom: 40px; }
  .cards4 { grid-template-columns: 1fr; }
  .card__shot { margin-bottom: 18px; }
  .orb--violet { width: 380px; height: 380px; margin-left: -190px; }
  .orb--indigo, .orb--cyan { width: 280px; height: 280px; }
  .chatwin__body { min-height: 260px; }
  .work__meta { padding: 16px 18px; }
  .btn--lg { width: 100%; max-width: 340px; }
}

@media (max-width: 420px) {
  .container { padding-inline: 18px; }
  .stat { padding: 20px 12px; }
  .stat__num { font-size: 21px; }
  .hero__cta .btn { width: 100%; max-width: 340px; }
}

/* ─── Тач-зона: минимум 44px там, где вместо курсора палец ───
   Только для узких экранов и сенсорных устройств — десктопная вёрстка не меняется.
   min-height подрезает height: 34px у .btn--sm, ширину и отступы не трогает. */
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .btn,
  .btn--sm { min-height: 44px; }
  .nav__links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* iOS scroll: избегаем double-scroll / rubber-band при show/hide адресбара (стандарты р.1.5) */
body{touch-action:pan-y;overscroll-behavior-y:none;}

/* ─── Плавающая кнопка Telegram ───
   Занимает место бывшего переключателя тем: тот же угол, тот же отступ.
   Основная тач-цель страницы, поэтому диаметр не опускается ниже 56px.
   На несуществующих адресах кнопку прячет правило экрана 404 ниже —
   оно убирает все прямые дети <body>, кроме самой заглушки. */
.tgfab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.45), 0 2px 10px rgba(0, 0, 0, 0.55);
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.tgfab svg { width: 28px; height: 28px; display: block; }
.tgfab:hover {
  background: var(--primary-bright);
  transform: scale(1.08);
  box-shadow: 0 14px 38px rgba(var(--primary-bright-rgb), 0.55), 0 2px 10px rgba(0, 0, 0, 0.55);
}
.tgfab:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (max-width: 600px) {
  .tgfab { right: 14px; bottom: 14px; width: 56px; height: 56px; }
  .tgfab svg { width: 26px; height: 26px; }
  /* на узком экране кнопка иначе ложится на юр. строку в самом низу страницы */
  .footer { padding-bottom: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .tgfab { transition: none; }
  .tgfab:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════
   Экран 404 для неизвестных путей.
   Атрибут data-page="404" ставит inline-скрипт в начале <body> — до первой
   отрисовки, поэтому главная не успевает мелькнуть.
   ═══════════════════════════════════════════════════════ */
.nf { display: none; }
html[data-page="404"] body > *:not(.nf) { display: none !important; }
html[data-page="404"] .nf {
  display: flex;
  /* заглушка заведомо выше плавающей кнопки Telegram (z-index: 100) */
  position: relative;
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 24px;
  text-align: center;
  background: var(--canvas);
}
.nf__code {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--mute);
}
.nf__title {
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nf__text { color: var(--body); }
.nf__cta { margin-top: 12px; }

/* ═══════════════════════════════════════════════════════
   Юридические страницы — сейчас одна, /privacy/.
   Это документ, а не лендинг: ни частиц, ни орбов, ни появления
   по прокрутке. Всё видно сразу, всё читается с телефона.
   Текстовая колонка — 720px: строка длиннее утомляет глаз,
   а документ читают целиком, а не по диагонали.
   ═══════════════════════════════════════════════════════ */

/* Шапка документа: без меню, без фиксации и стекла. Якорей на странице нет,
   догонять прокрутку нечему, а неподвижная шапка не закрывает текст.
   Селектор из двух классов — чтобы перебить и .nav, и мобильное правило
   .nav, .nav.is-scrolled в медиазапросе 700px. Поведение шапки на главной
   не затрагивается: класс .nav--doc есть только здесь. */
.nav.nav--doc {
  position: static;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
/* Логотип встаёт на левый край текстовой колонки: на документе шапка, текст
   и футер — одна колонка, иначе логотип висит сам по себе левее всего остального. */
.nav--doc .nav__inner { max-width: 768px; }

/* Колонка документа. .container оставляем ради центрирования и боковых полей
   (24px, на 420px — 18px), max-width сужает: 768 − 48 = ровно 720px текста. */
.doc__inner { max-width: 768px; }

.doc { padding: 52px 0 72px; }

.doc__title {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.02em;
}
/* Специфичность выше, чем у .doc__body p ниже, иначе строка редакции
   получила бы размер и цвет основного текста. */
.doc__body .doc__date {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--mute);
}

.doc__body h2 {
  margin-top: 44px;
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
/* 17px и 1.75 — читаемость длинного текста, а не плотность лендинга.
   Цвет светлее --body: серый по тёмному на абзац в пять строк не читается. */
.doc__body p,
.doc__body li {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.doc__body p { margin-top: 14px; }
.doc__body ul { margin-top: 14px; padding-left: 22px; }
.doc__body li { margin-top: 8px; }
.doc__body li::marker { color: var(--mute); }
.doc__body strong {
  color: var(--ink);
  font-weight: 560;
  font-variation-settings: "wght" 560;
}
/* Ссылок в документе всего три, и все — на него же. Подчёркивание оставляем:
   в юридическом тексте ссылка должна читаться как ссылка, а не как акцент.
   overflow-wrap — чтобы длинный адрес переносился, а не растягивал страницу. */
.doc__body a {
  color: var(--primary-tint);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}
.doc__body a:hover { color: var(--primary-bright); }

.doc__back { margin-top: 48px; }

@media (max-width: 700px) {
  .doc { padding: 36px 0 56px; }
  .doc__body h2 { margin-top: 36px; }
  /* Плавающей кнопки Telegram на документе нет — запас под неё не нужен. */
  .doc-page .footer { padding-bottom: 28px; }
}
