/* BHOP-IX Inc. — стили сайта
   Цвета: тёмная тема по умолчанию, светлая — по системной настройке.
   Акценты: янтарь (индикатор активности порта) и мята (линк поднят). */

:root {
  --bg: #0d0f12;
  --bg-2: #12151a;
  --surface: #171b21;
  --surface-2: #1e232b;
  --line: #2b313a;
  --line-2: #3a424d;
  --ink: #eceff2;
  --muted: #a0a8b3;
  --amber: #ffb547;
  --amber-ink: #ffc56e;
  --mint: #5ce0b8;
  --mint-ink: #6fe7c3;
  --on-accent: #0d0f12;
  --hole: #07080a;
  --shadow: 0 30px 60px -30px rgb(0 0 0 / .6);

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef1f4;
    --bg-2: #e5e9ee;
    --surface: #ffffff;
    --surface-2: #f5f7f9;
    --line: #d3d9e0;
    --line-2: #b9c1cb;
    --ink: #12161b;
    --muted: #4b5460;
    --amber: #f29a12;
    --amber-ink: #8f4c00;
    --mint: #12b386;
    --mint-ink: #006d51;
    --on-accent: #ffffff;
    --hole: #2a3038;
    --shadow: 0 30px 60px -34px rgb(20 30 45 / .35);
    color-scheme: light;
  }
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
.sprite { position: absolute; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--f-mono); font-stretch: 87.5%; letter-spacing: 0; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--amber); color: var(--on-accent);
  border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- типографика ---------- */
.h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 52px);
  letter-spacing: -.02em;
  line-height: 1.08;
  text-wrap: balance;
}
.h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.01em; }
.h4 { font-family: var(--f-body); font-weight: 650; font-size: 19px; }
.kicker {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--amber-ink); margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.eyebrow, .tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}

.led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-2); flex: none;
}
.led--on { background: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 22%, transparent); }

/* ---------- кнопки ---------- */
.btn {
  --b: var(--line-2);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--b); border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 16px;
  background: transparent; color: var(--ink);
  transition: transform .25s var(--ease-spring), background-color .2s, border-color .2s, color .2s;
}
.btn span { transition: transform .25s var(--ease-spring); }
.btn:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn:hover span { transform: translateX(4px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--solid { background: var(--amber); border-color: var(--amber); color: #14110a; }
.btn--solid:hover { background: var(--amber-ink); border-color: var(--amber-ink); }
@media (prefers-color-scheme: light) {
  .btn--solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
  .btn--solid:hover { background: #000; border-color: #000; }
}

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 28px; height: 28px; color: var(--amber); fill: var(--ink); }
.brand__name { font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand__inc { font-family: var(--f-mono); font-weight: 400; font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 15px; color: var(--muted);
  padding: 8px 12px; border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav .nav__contact { color: var(--ink); border: 1px solid var(--line-2); }
@media (max-width: 760px) {
  .nav a:not(.nav__contact) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(92svh, 860px);
  display: grid; align-items: center;
  padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 8vw, 110px);
  isolation: isolate;
  overflow: hidden;
}
.hero__net {
  position: absolute; inset: 0 0 0 34%;
  z-index: -1;
}
.hero__net canvas { width: 100%; height: 100%; }
.hero__net::after {
  /* мягкий переход к тексту */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 30%), linear-gradient(0deg, var(--bg) 0%, transparent 22%);
  pointer-events: none;
}
.hero__in { display: grid; gap: 26px; justify-items: start; }
.hero__title {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .1em .3em;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(64px, 13vw, 184px);
  line-height: .9;
  letter-spacing: -.045em;
  margin-top: 6px;
}
.hero__word { position: relative; }
.hero__inc {
  font-family: var(--f-mono); font-weight: 400; font-stretch: 87.5%;
  font-size: clamp(16px, 1.6vw, 22px); letter-spacing: 0; color: var(--amber-ink);
}
.hero__lead {
  max-width: 30ch;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.35;
  text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero__meta { font-size: 12px; color: var(--muted); letter-spacing: .04em; }

/* стартовая сборка hero */
@media (prefers-reduced-motion: no-preference) {
  .hero__in > * { animation: hero-in .9s var(--ease-out) both; }
  .hero__in > :nth-child(2) { animation-delay: .08s; }
  .hero__in > :nth-child(3) { animation-delay: .18s; }
  .hero__in > :nth-child(4) { animation-delay: .26s; }
  .hero__in > :nth-child(5) { animation-delay: .34s; }
  .hero__net { animation: fade-in 1.4s .1s ease both; }
  @keyframes hero-in { from { opacity: 0; transform: translateY(28px); } }
  @keyframes fade-in { from { opacity: 0; } }

  @supports (animation-timeline: scroll()) {
    /* параллакс: сеть уходит медленнее текста */
    .hero__net canvas {
      animation: parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
    @keyframes parallax { to { transform: translateY(22vh) scale(1.04); opacity: .4; } }
  }
}

@media (max-width: 860px) {
  .hero { min-height: auto; align-items: end; padding-top: 0; }
  .hero__net { position: relative; inset: auto; height: 300px; margin: 0 0 -40px; }
  .hero__net::after { background: linear-gradient(0deg, var(--bg) 0%, transparent 40%); }
  .hero { display: block; }
}

/* ---------- секции ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; }

/* появление при прокрутке */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    @keyframes reveal { from { opacity: 0; transform: translateY(40px) scale(.98); } }
  }
  /* запасной вариант: класс .io-reveal ставит скрипт, если view() не поддерживается */
  .io-reveal .reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
  .io-reveal .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- о компании ---------- */
.about { border-top: 1px solid var(--line); }
.about__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.about__head { position: sticky; top: 110px; }
.about__text { margin-top: 24px; color: var(--muted); font-size: 19px; max-width: 46ch; }
.principles { display: grid; gap: 0; }
.principle {
  position: relative;
  padding: 26px 0 26px 34px;
  border-top: 1px solid var(--line);
}
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle h3 { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin-bottom: 8px; }
.principle p { color: var(--muted); }
.principle__led {
  position: absolute; left: 4px; top: 34px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 18%, transparent);
  transition: transform .3s var(--ease-spring), background-color .2s;
}
.principle:hover .principle__led { transform: scale(1.4); background: var(--amber); }
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__head { position: static; }
}

/* ---------- флагман ---------- */
.flag { background: var(--bg-2); border-block: 1px solid var(--line); }
.flag__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 80px); }
.flag__title { font-size: clamp(56px, 9vw, 128px); font-weight: 800; letter-spacing: -.045em; line-height: .9; }
.flag__lead { margin-top: 22px; font-size: clamp(18px, 1.8vw, 22px); color: var(--muted); max-width: 52ch; }

.steps { display: grid; gap: clamp(28px, 5vw, 56px); counter-reset: step; }
.step { display: grid; gap: 22px; }
.step__no { font-size: 12px; color: var(--amber-ink); letter-spacing: .06em; margin-bottom: 10px; }
.step__text p:not(.step__no) { color: var(--muted); margin-top: 12px; max-width: 46ch; }

.scene {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(10px, 2vw, 22px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.scene svg { width: 100%; height: auto; overflow: visible; }

.flag__stage { display: none; }

/* липкая сцена на широком экране (включает скрипт классом .has-stage) */
@media (min-width: 980px) {
  .has-stage .flag__body {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
  }
  .has-stage .flag__stage {
    display: grid; gap: 18px;
    position: sticky; top: calc(50vh - 260px);
    order: 2;
  }
  .has-stage .steps { order: 1; gap: 0; }
  .has-stage .step { min-height: 72vh; align-content: center; padding-block: 8vh; }
  .has-stage .step .scene { display: none; }
  .has-stage .step__text { opacity: .35; transition: opacity .4s ease; }
  .has-stage .step.is-current .step__text { opacity: 1; }
  .has-stage .step:first-child { min-height: 56vh; padding-top: 0; }
  .has-stage .step:last-child { min-height: 70vh; }
}
.stage__screen { position: relative; aspect-ratio: 320 / 214; }
.stage__screen .scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity .45s ease, transform .6s var(--ease-out);
  pointer-events: none;
}
.stage__screen .scene svg { max-height: 100%; }
.stage__screen .scene.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* патч-панель: 11 модулей = 11 портов */
.panel {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 18px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.panel__ears { width: 8px; height: 30px; border-radius: 4px; border: 1px solid var(--line-2); }
.panel__ports { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; grid-column: 2; }
.panel__label { position: absolute; left: 44px; bottom: 8px; font-size: 10px; color: var(--muted); }
.pp {
  position: relative; display: grid; place-items: center;
  height: 34px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  text-decoration: none;
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10px; color: var(--muted);
  transition: border-color .2s, color .2s, transform .25s var(--ease-spring);
}
.pp::before {
  content: ""; position: absolute; top: 4px; right: 4px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-2);
  transition: background-color .25s, box-shadow .25s;
}
.pp:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--ink); }
.pp.is-on { color: var(--ink); border-color: var(--amber); }
.pp.is-on::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.pp.is-done::before { background: var(--mint); }
.pp__tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  translate: -50% 4px; opacity: 0; pointer-events: none;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap;
  background: var(--ink); color: var(--bg); font-size: 11px;
  transition: opacity .2s, translate .2s;
}
.pp:hover .pp__tip, .pp:focus-visible .pp__tip { opacity: 1; translate: -50% 0; }

/* ---------- палитра иллюстраций ---------- */
.s-surface { fill: var(--surface-2); }
.s-stroke { stroke: var(--line-2); stroke-width: 1.5; }
.s-hole { fill: var(--hole); }
.s-panel { fill: var(--bg-2); stroke: var(--line); stroke-width: 1.5; }
.s-card { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.2; }
.s-card--amber { stroke: var(--amber); }
.s-cap { font: 500 9.5px var(--f-mono); fill: var(--muted); }
.s-cap--ink { fill: var(--ink); }
.s-cap--mint { fill: var(--mint-ink); }
.s-cap--on { fill: #14110a; font-weight: 600; }
.s-leds circle { fill: var(--line-2); }
.s-leds circle.on { fill: var(--mint); }
.s-led-mint { fill: var(--mint); }
.s-led-amber { fill: var(--amber); }
.s-ring { fill: none; stroke: var(--mint); stroke-width: 1.5; opacity: 0; }
.s-grid path { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; fill: none; }
.s-axis { stroke: var(--line-2); stroke-width: 1.5; fill: none; }
.s-area { fill: color-mix(in srgb, var(--mint) 16%, transparent); }
.s-line-mint { fill: none; stroke: var(--mint); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.s-line-ink { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.s-thin { stroke-width: 1.6; }
.s-bgfill { fill: var(--surface); }
.a-chart-cover { transform: scaleX(0); }
.a-port-blink { opacity: 0; }
.s-bar { fill: var(--line-2); }
.s-dot-amber { fill: var(--amber); }
.s-dot-ink { fill: var(--muted); }
.s-ring-amber { fill: none; stroke: var(--amber); stroke-width: 2; opacity: .5; }
.s-dash { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 4 6; }
.s-node { fill: var(--surface-2); stroke: var(--ink); stroke-width: 2; }
.s-node--mint { stroke: var(--mint); fill: color-mix(in srgb, var(--mint) 20%, var(--surface-2)); }
.s-node--amber { stroke: var(--amber); fill: color-mix(in srgb, var(--amber) 22%, var(--surface-2)); }
.s-hop { fill: var(--amber); }
.s-links path { fill: none; stroke: var(--line-2); stroke-width: 2; }
.s-cursor { fill: var(--ink); stroke: var(--bg); stroke-width: 1; }
.s-quiet { fill: color-mix(in srgb, var(--mint) 14%, transparent); stroke: var(--mint); stroke-dasharray: 4 4; }
.s-bars rect { fill: var(--line-2); }
.s-bars rect.q { fill: var(--mint); }
.s-avatar { fill: color-mix(in srgb, var(--mint) 40%, var(--surface)); }
.s-avatar--amber { fill: color-mix(in srgb, var(--amber) 50%, var(--surface)); }
.s-track { fill: var(--line); }
.s-fill { fill: var(--mint); }
.s-fill--amber { fill: var(--amber); }
.s-bubble-me { fill: var(--amber); }
.s-road { stroke: var(--line-2); stroke-width: 28; }
.s-far { fill: color-mix(in srgb, var(--line) 60%, transparent); }
.s-lane { stroke: var(--bg); stroke-width: 2; stroke-dasharray: 18 14; fill: none; }
.s-lane--far { stroke: var(--line-2); stroke-dasharray: 6 8; }
.s-car { fill: var(--amber); }
.s-car-top { fill: color-mix(in srgb, var(--amber) 60%, var(--ink)); }
.s-wheel { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.s-speed { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.s-tv { fill: var(--hole); stroke: var(--line-2); stroke-width: 2; }
.s-screen { fill: #141922; }
.s-stand { fill: none; stroke: var(--line-2); stroke-width: 3; stroke-linejoin: round; }
.s-tiles rect { fill: #262e3a; }
.s-tiles rect:nth-child(1) { fill: #2f3a48; }
.s-focus { fill: none; stroke: var(--amber); stroke-width: 3; }
.s-phone { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.s-pad { fill: var(--surface-2); stroke: var(--line-2); }
.s-finger { fill: color-mix(in srgb, var(--amber) 55%, transparent); stroke: var(--amber); stroke-width: 1.5; }
.s-arrow { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-movie { fill: var(--amber); }
.s-qr-dots { fill: var(--ink); }
.s-petals circle { fill: none; stroke: var(--amber); stroke-width: 3; }
.tv__art .s-cap--ink { fill: #dfe5ec; }

/* ---------- анимации сцен ----------
   По умолчанию (без движения) показано конечное состояние.
   Анимации включаются, только когда движение разрешено, и идут, пока сцена на экране (.is-live). */
@media (prefers-reduced-motion: no-preference) {
  .scene * { animation-play-state: paused; }
  .scene.is-live * { animation-play-state: running; }

  /* порт: мигает янтарём, затем зелёный */
  .a-port-blink { animation: port-blink 4s steps(1) infinite; }
  .a-port-up { animation: port-up 4s ease infinite; }
  .a-port-ring { transform-box: fill-box; transform-origin: center; animation: port-ring 4s ease-out infinite; }
  .a-port-tag { animation: port-tag 4s ease infinite; }
  @keyframes port-blink { 0%,10%,20%,30%,40% { opacity: 1 } 5%,15%,25%,35% { opacity: 0 } 45%,100% { opacity: 0 } }
  @keyframes port-up { 0%,44% { opacity: 0 } 48%,100% { opacity: 1 } }
  @keyframes port-ring { 0%,44% { opacity: 0; transform: scale(.4) } 50% { opacity: .9 } 70%,100% { opacity: 0; transform: scale(1.4) } }
  @keyframes port-tag { 0%,46% { opacity: 0; transform: translateY(4px) } 54%,92% { opacity: 1; transform: none } 100% { opacity: 0 } }

  /* график дорисовывается */
  .a-chart-cover { transform-box: fill-box; transform-origin: right center; animation: cover 5s var(--ease-out) infinite; }
  .a-report { animation: pop-in 5s var(--ease-out) infinite; }
  @keyframes cover { 0% { transform: scaleX(1) } 55%,92% { transform: scaleX(0) } 100% { transform: scaleX(0) } }
  @keyframes pop-in { 0%,55% { opacity: 0; transform: translateY(8px) } 65%,92% { opacity: 1; transform: none } 100% { opacity: 0 } }

  /* тревога вспыхивает и гаснет */
  .a-alarm-ring { transform-box: fill-box; transform-origin: center; animation: alarm 1.4s ease-out infinite; }
  .a-alarm-card { animation: alarm-card 4.2s var(--ease-out) infinite; }
  @keyframes alarm { 0% { transform: scale(.4); opacity: 1 } 100% { transform: scale(1.8); opacity: 0 } }
  @keyframes alarm-card { 0%,10% { opacity: 0; transform: translateX(24px) } 22%,72% { opacity: 1; transform: none } 86%,100% { opacity: 0; transform: none } }

  /* маршрут: узлы по очереди */
  .a-hop { transform-box: fill-box; transform-origin: center; animation: hop 3.6s var(--ease-spring) infinite; animation-delay: calc(var(--i) * .35s); }
  @keyframes hop { 0%,4% { opacity: 0; transform: scale(0) } 14%,80% { opacity: 1; transform: scale(1) } 92%,100% { opacity: 0; transform: scale(1) } }

  /* карта: узлы появляются, один двигается */
  .a-nodes circle { transform-box: fill-box; transform-origin: center; animation: node-in 5s var(--ease-spring) infinite; animation-delay: calc(var(--i) * .12s); }
  .a-links { animation: links-in 5s ease infinite; }
  .a-drag { animation: drag 5s var(--ease-out) infinite; }
  @keyframes node-in { 0% { transform: scale(0) } 12%,100% { transform: scale(1) } }
  @keyframes links-in { 0%,10% { opacity: 0 } 25%,100% { opacity: 1 } }
  @keyframes drag { 0%,35% { transform: translate(30px, 18px); opacity: 0 } 45% { opacity: 1; transform: translate(30px, 18px) } 70%,100% { transform: none; opacity: 1 } }

  /* работы: тихое окно и список */
  .a-quiet { animation: fade-pulse 4s ease infinite; }
  .a-affect { animation: pop-in 4s var(--ease-out) infinite; }
  @keyframes fade-pulse { 0%,20% { opacity: 0 } 35%,100% { opacity: 1 } }

  /* кабинет: полосы растут */
  .a-fill { transform-box: fill-box; transform-origin: left center; animation: grow 3.6s var(--ease-out) infinite; animation-delay: calc(var(--i) * .15s); }
  @keyframes grow { 0% { transform: scaleX(0) } 40%,100% { transform: scaleX(1) } }

  /* лента выезжает */
  .a-feed { animation: feed 4.5s var(--ease-out) infinite; animation-delay: calc(var(--i) * .25s); }
  @keyframes feed { 0% { opacity: 0; transform: translateY(26px) } 18%,85% { opacity: 1; transform: none } 100% { opacity: 0; transform: translateY(-6px) } }

  /* ассистент печатает и отвечает */
  .a-ask { animation: ask 5s var(--ease-out) infinite; }
  .a-typing { animation: typing 5s ease infinite; }
  .a-typing circle { animation: dot .9s ease-in-out infinite; animation-delay: calc(var(--i) * .15s); }
  .a-answer { animation: answer 5s var(--ease-out) infinite; }
  @keyframes ask { 0% { opacity: 0; transform: translateY(10px) } 10%,92% { opacity: 1; transform: none } 100% { opacity: 0 } }
  @keyframes typing { 0%,14% { opacity: 0 } 18%,36% { opacity: 1 } 40%,100% { opacity: 0 } }
  @keyframes dot { 0%,100% { opacity: .3 } 50% { opacity: 1 } }
  @keyframes answer { 0%,38% { opacity: 0; transform: translateY(10px) } 46%,92% { opacity: 1; transform: none } 100% { opacity: 0 } }

  /* машинка проносится */
  .a-car { animation: car 2.6s cubic-bezier(.5, 0, .3, 1) infinite; }
  .a-lane { animation: lane .5s linear infinite; }
  @keyframes car { 0% { transform: translateX(-80px) } 100% { transform: translateX(400px) } }
  @keyframes lane { to { stroke-dashoffset: -32 } }

  /* везде: синхронная точка */
  .a-sync { transform-box: fill-box; transform-origin: center; animation: sync 2s ease-in-out infinite; }
  @keyframes sync { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.6); opacity: .5 } }

  /* TV: палец свайпает, рамка переходит */
  .a-finger { animation: finger 6s var(--ease-out) infinite; }
  .a-arrow { animation: arrow 6s ease infinite; }
  .a-focus { animation: focus 6s var(--ease-spring) infinite; }
  @keyframes finger {
    0%,8% { transform: none; opacity: 0 } 10% { opacity: 1 } 24% { transform: translateX(50px); opacity: 1 } 28% { opacity: 0; transform: translateX(50px) }
    33% { transform: none; opacity: 0 } 36% { opacity: 1 } 50% { transform: translateX(50px); opacity: 1 } 54% { opacity: 0; transform: translateX(50px) }
    59% { transform: none; opacity: 0 } 62% { opacity: 1 } 76% { transform: translateX(50px); opacity: 1 } 80%,100% { opacity: 0; transform: translateX(50px) }
  }
  @keyframes arrow { 0%,8% { opacity: .2 } 16% { opacity: 1 } 26% { opacity: .2 } 36% { opacity: .2 } 42% { opacity: 1 } 52% { opacity: .2 } 62% { opacity: .2 } 68% { opacity: 1 } 78%,100% { opacity: .2 } }
  @keyframes focus { 0%,20% { transform: none } 26%,46% { transform: translateX(82px) } 52%,72% { transform: translateX(164px) } 78%,92% { transform: translateX(246px) } 100% { transform: none } }
}

/* сцены чуть откликаются на курсор (переменные ставит скрипт) */
[data-tilt] svg { transition: transform .5s var(--ease-out); transform: translate(calc(var(--mx, 0) * 6px), calc(var(--my, 0) * 6px)); }
.scene { transition: border-color .3s; }
.scene:hover { border-color: var(--line-2); }

/* ---------- проекты ---------- */
.projects header { margin-bottom: clamp(40px, 6vw, 72px); }
.tv {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.tv__title { font-size: clamp(36px, 5vw, 64px); font-weight: 700; margin: 14px 0 20px; }
.tv__lead { font-size: clamp(18px, 1.7vw, 21px); max-width: 44ch; }
.tv__list { margin: 30px 0 0; display: grid; gap: 0; }
.tv__list div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.tv__list dt { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--amber-ink); padding-top: 4px; }
.tv__list dd { margin: 0; color: var(--muted); }
.tv__art { padding: clamp(12px, 2.4vw, 28px); }
@media (max-width: 900px) {
  .tv { grid-template-columns: 1fr; }
  .tv__list div { grid-template-columns: 1fr; gap: 4px; }
}

.more { margin-top: clamp(72px, 10vw, 130px); }
.more__title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.more__list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.more__item {
  display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  padding: 28px 28px 28px 0; position: relative;
  border-bottom: 1px solid var(--line);
}
.more__item + .more__item { padding-left: 28px; border-left: 1px solid var(--line); }
.more__item p { color: var(--muted); margin-top: 6px; }
.more__item .more__plat { grid-column: 2; font-size: 11px; color: var(--muted); margin-top: 6px; }
.more__icon { width: 64px; height: 64px; transition: transform .4s var(--ease-spring); }
.more__item:hover .more__icon { transform: rotate(-8deg) scale(1.06); }
@media (max-width: 760px) {
  .more__list { grid-template-columns: 1fr; }
  .more__item, .more__item + .more__item { padding: 24px 0; border-left: 0; grid-template-columns: 48px 1fr; gap: 16px; }
  .more__icon { width: 48px; height: 48px; }
}

/* ---------- путь ---------- */
.path { border-top: 1px solid var(--line); }
.path__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 110px); }
.path__grid > header { position: sticky; top: 110px; align-self: start; }
.path__lead { margin-top: 20px; color: var(--muted); max-width: 36ch; }
.trace { position: relative; }
.trace::before {
  content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px;
  width: 2px; background: repeating-linear-gradient(var(--line-2) 0 6px, transparent 6px 12px);
}
.hop { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 24px; padding: 18px 0; }
.hop__no {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--mint);
  font-size: 13px; color: var(--ink);
  transition: transform .3s var(--ease-spring), background-color .2s;
}
.hop:hover .hop__no { transform: scale(1.12); background: color-mix(in srgb, var(--mint) 18%, var(--bg)); }
.hop h3 { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin-top: 8px; }
.hop p { color: var(--muted); margin-top: 6px; }
.hop--next .hop__no { border-style: dashed; border-color: var(--line-2); color: var(--muted); }
.hop--next p { margin-top: 12px; }
@media (max-width: 860px) {
  .path__grid { grid-template-columns: 1fr; }
  .path__grid > header { position: static; }
}

/* ---------- контакт и подвал ---------- */
.contact { border-top: 1px solid var(--line); text-align: left; }
.contact__mail { margin-top: 24px; }
.contact__mail a {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(26px, 6vw, 72px); letter-spacing: -.03em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--amber), var(--amber)) 0 100% / 0 3px no-repeat;
  transition: background-size .4s var(--ease-out), color .2s;
}
.contact__mail a:hover { background-size: 100% 3px; color: var(--amber-ink); }
.contact__note { margin-top: 18px; color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.foot__in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--ink); text-underline-offset: 3px; }
.foot a:hover { color: var(--amber-ink); }

/* ---------- страница конфиденциальности ---------- */
.doc { padding: clamp(56px, 9vw, 120px) 0; }
.doc__in { max-width: 720px; }
.doc h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(32px, 5vw, 56px); letter-spacing: -.03em; margin-bottom: 28px; }
.doc h2 { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; margin-top: 10px; }
.doc a { color: var(--ink); }
.back { display: inline-flex; margin-bottom: 36px; font-size: 15px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }

/* ---------- телефон: упрощаем сцены ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero__net { height: 240px; }
  .scene { border-radius: 14px; }
  .a-lane, .a-typing circle, .a-sync { animation: none !important; }
}

/* ---------- без движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-tilt] svg { transform: none; }
  .s-ring { opacity: 0; }
  .a-typing { opacity: 0; }
}
