/* =========================================================
   Портфолио — общие стили для всех страниц
   Цвет страницы задаёт атрибут data-theme: у каждой работы своя палитра.
   ========================================================= */
@view-transition { navigation: auto; }

:root {
  --cobalt: #1f2ee0;
  --paper: #f3f4f6;
  --ink: #0b0d17;

  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --body: "Golos Text", system-ui, sans-serif;
  --gutter: clamp(20px, 4vw, 64px);
  --bar: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="cobalt"] { --bg: #1f2ee0; --fg: #ffffff; --muted: #c9cfff; --line: rgba(255, 255, 255, 0.24); --accent: #ffffff; --on-accent: #1f2ee0; }
[data-theme="paper"]  { --bg: #f3f4f6; --fg: #0b0d17; --muted: #555a6c; --line: rgba(11, 13, 23, 0.14); --accent: #1f2ee0; --on-accent: #ffffff; }
[data-theme="listva"] { --bg: #f1f0f0; --fg: #121212; --muted: #5c5c5c; --line: rgba(18, 18, 18, 0.14); --accent: #b5562b; --on-accent: #ffffff; }
[data-theme="halden"] { --bg: #0b1013; --fg: #ffffff; --muted: rgba(255, 255, 255, 0.68); --line: rgba(255, 255, 255, 0.16); --accent: #7fd6d0; --on-accent: #0b1013; }
[data-theme="vela"]   { --bg: #000000; --fg: #f5f5f7; --muted: #a1a6ad; --line: rgba(245, 245, 247, 0.18); --accent: #f0a06a; --on-accent: #000000; }
[data-theme] { background: var(--bg); color: var(--fg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--cobalt); color: #fff; }
[data-theme="cobalt"] ::selection { background: #fff; color: var(--cobalt); }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Типографика ---------- */
.h-xl, .h-l, .h-m { font-family: var(--display); font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.h-xl { font-size: clamp(2.5rem, 6.6vw, 7rem); line-height: 0.98; letter-spacing: -0.045em; }
.h-l { font-size: clamp(1.9rem, 3.7vw, 3.75rem); line-height: 1.06; }
.h-m { font-size: clamp(1.25rem, 1.7vw, 1.6rem); line-height: 1.2; letter-spacing: -0.02em; }
.lede { font-size: clamp(1.125rem, 1.45vw, 1.375rem); line-height: 1.45; max-width: 46ch; }
.muted { color: var(--muted); }

/* ---------- Кнопки и ссылки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--on-accent); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
[data-theme="cobalt"] .btn::before { background: var(--ink); }
[data-theme="cobalt"] .btn:hover, [data-theme="cobalt"] .btn:focus-visible { color: #fff; }
.btn--line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn--line::before { background: var(--fg); }
.btn--line:hover, .btn--line:focus-visible { color: var(--bg); }
[data-theme="cobalt"] .btn--line::before { background: #fff; }
[data-theme="cobalt"] .btn--line:hover, [data-theme="cobalt"] .btn--line:focus-visible { color: var(--cobalt); }

.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; transition: text-decoration-color 0.2s; }
.link:hover { text-decoration-color: transparent; }

/* ---------- Шапка ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: var(--gutter);
  color: var(--nav-fg, #fff);
  transition: color 0.4s, background-color 0.4s, transform 0.5s var(--ease);
}
html[data-tone="light"] { --nav-fg: #0b0d17; --nav-bg: rgba(243, 244, 246, 0.72); }
html[data-tone="dark"] { --nav-fg: #ffffff; --nav-bg: rgba(8, 10, 16, 0.5); }
html[data-nav="solid"] .nav { background: var(--nav-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
html[data-nav-hidden] .nav { transform: translateY(-100%); }

.nav__name { font-family: var(--display); font-weight: 500; font-size: 0.95rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.nav__works { display: flex; gap: clamp(18px, 2.6vw, 40px); }
.nav__works a { position: relative; display: block; padding: 10px 0; text-decoration: none; font-weight: 500; }
.nav__works a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__works a:hover::after, .nav__works a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; box-shadow: inset 0 0 0 1.5px currentColor;
  text-decoration: none; font-weight: 500; white-space: nowrap;
  transition: background-color 0.3s, color 0.3s;
}
.nav__cta:hover, .nav__cta:focus-visible { background: var(--nav-fg, #fff); color: var(--nav-flip, #1f2ee0); }
html[data-tone="light"] { --nav-flip: #f3f4f6; }
html[data-tone="dark"] { --nav-flip: #0b0d17; }
.nav__burger { display: none; }

.menu { display: none; }

@media (max-width: 820px) {
  :root { --bar: 60px; }
  .nav__works, .nav__cta { display: none; }
  .nav__burger {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
    border-radius: 999px; box-shadow: inset 0 0 0 1.5px currentColor; font-weight: 500;
  }
  .menu {
    position: fixed; inset: 0; z-index: 55;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
    padding: calc(var(--bar) + 24px) var(--gutter) 40px;
    background: var(--cobalt); color: #fff;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.6s var(--ease), visibility 0s 0.6s;
  }
  html[data-menu] .menu { clip-path: inset(0); visibility: visible; transition: clip-path 0.6s var(--ease); }
  html[data-menu] { --nav-fg: #fff; }
  html[data-menu] .nav { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }
  html[data-menu] body { overflow: hidden; }
  .menu a { font-family: var(--display); font-weight: 500; font-size: clamp(1.75rem, 9vw, 2.75rem); letter-spacing: -0.04em; line-height: 1.25; text-decoration: none; }
  .menu a.menu__cta { margin-top: 28px; font-family: var(--body); font-size: 1.0625rem; letter-spacing: 0; }
}

/* ---------- Окно браузера ---------- */
.win {
  --dim: 0;
  position: relative;
  display: block;
  border-radius: clamp(10px, 1.1vw, 16px);
  background: #15171d;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 80px -30px rgba(3, 5, 30, 0.55), 0 14px 30px -18px rgba(3, 5, 30, 0.5);
  text-decoration: none;
  color: #fff;
  overflow: hidden;
}
.win__bar { display: flex; align-items: center; gap: 7px; height: clamp(28px, 2.6vw, 38px); padding: 0 14px; }
.win__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.win__tab { margin-left: 12px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c0d11; }
.win__page { width: 100%; height: auto; will-change: transform; }
.win__frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.win::after { content: ""; position: absolute; inset: 0; background: #05060c; opacity: var(--dim); pointer-events: none; }

/* =========================================================
   Главная: сцена с тремя работами
   ========================================================= */
.stage { position: relative; }

.intro {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: calc(var(--bar) + clamp(24px, 6vh, 72px)) var(--gutter) clamp(28px, 5vh, 56px);
}
.intro__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.intro__title .line > span { display: block; }
.intro__foot { display: grid; gap: 28px; max-width: 34rem; }
.intro__cue { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.intro__cue::before { content: ""; width: 1.5px; height: 36px; background: currentColor; transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Загрузка: строки заголовка выезжают из-под маски */
html.js .intro__title .line > span { transform: translateY(110%); transition: transform 1.1s var(--ease); }
html.js .intro__foot { opacity: 0; transform: translateY(20px); transition: opacity 0.9s 0.5s, transform 0.9s var(--ease) 0.5s; }
html.js .is-ready .intro__title .line > span { transform: none; }
html.js .is-ready .intro__title .line:nth-child(2) > span { transition-delay: 0.08s; }
html.js .is-ready .intro__title .line:nth-child(3) > span { transition-delay: 0.16s; }
html.js .is-ready .intro__title .line:nth-child(4) > span { transition-delay: 0.24s; }
html.js .is-ready .intro__foot { opacity: 1; transform: none; }

.work { position: relative; padding: clamp(64px, 10vh, 120px) var(--gutter); display: grid; gap: 36px; }
.work__copy { display: grid; gap: 20px; align-content: center; max-width: 34rem; }
.work__name { font-family: var(--display); font-weight: 600; font-size: clamp(2.6rem, 5.4vw, 5.5rem); line-height: 1; letter-spacing: -0.05em; }
.work__kind { color: var(--accent); font-weight: 500; }
.work__facts { display: grid; border-top: 1px solid var(--line); }
.work__facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.work__facts dt { color: var(--muted); }
.work__links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 8px; }

.stage:not(.is-pinned) .win { order: -1; }
@media (max-width: 959px) { .stage:not(.is-pinned) .intro { min-height: 86svh; } }

.rail { display: none; }

/* --- Закреплённая сцена: большой экран, движение разрешено --- */
.stage.is-pinned { height: 100vh; overflow: hidden; }
.stage.is-pinned .intro { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.stage.is-pinned .intro__title { max-width: 62vw; }
.stage.is-pinned .intro__foot { max-width: min(34rem, 36vw); margin-bottom: 56px; }
.stage.is-pinned .intro__cue { position: absolute; right: var(--gutter); bottom: clamp(28px, 5vh, 56px); }
/* На неширком окне подсказка наезжала бы на полоску работ */
@media (max-width: 1240px), (max-height: 860px) { .stage.is-pinned .intro__cue { display: none; } }
.stage.is-pinned .work {
  position: absolute;
  inset: 0;
  grid-template-columns: minmax(300px, 0.62fr) 1fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
  padding: calc(var(--bar) + 12px) var(--gutter) 96px;
  background: transparent;
  pointer-events: none;
  perspective: 1800px;
  perspective-origin: calc(50% + var(--mx, 0) * 12%) calc(50% + var(--my, 0) * 12%);
}
.stage.is-pinned .work > * { pointer-events: auto; }
.stage.is-pinned .work:nth-of-type(1) { z-index: 3; }
.stage.is-pinned .work:nth-of-type(2) { z-index: 2; }
.stage.is-pinned .work:nth-of-type(3) { z-index: 1; }
.stage.is-pinned .win {
  justify-self: center;
  width: min(100%, calc((100vh - var(--bar) - 190px) * 1.52));
  translate: 0 120vh;
  transition: translate 1.5s var(--ease);
  will-change: transform;
}
.stage.is-pinned.is-ready .win { translate: 0 0; }
.stage.is-pinned.is-ready .work:nth-of-type(1) .win { transition-delay: 0.25s; }
.stage.is-pinned.is-ready .work:nth-of-type(2) .win { transition-delay: 0.36s; }
.stage.is-pinned.is-ready .work:nth-of-type(3) .win { transition-delay: 0.47s; }

.stage.is-pinned .rail {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(22px, 4vh, 40px);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 16px;
}
.rail button { display: grid; gap: 10px; width: 100%; text-align: left; font-weight: 500; opacity: 0.55; transition: opacity 0.3s; }
.rail button:hover, .rail button[aria-current="true"] { opacity: 1; }
.rail i { position: relative; display: block; height: 2px; background: color-mix(in srgb, currentColor 26%, transparent); overflow: hidden; }
.rail i::after { content: ""; position: absolute; inset: 0; background: currentColor; transform: scaleX(var(--p, 0)); transform-origin: left; }

/* =========================================================
   Главная: сайт в разборе
   ========================================================= */
.layers { position: relative; padding: clamp(88px, 14vh, 168px) 0; overflow: clip; }
.layers__grid { display: grid; gap: clamp(40px, 6vw, 96px); align-items: center; }
.layers__head { display: grid; gap: 20px; margin-bottom: clamp(28px, 4vh, 44px); }
.layers__list li { padding: 16px 0; border-top: 1px solid var(--line); transition: opacity 0.35s; }
.layers__list li:last-child { border-bottom: 1px solid var(--line); }
.layers__list h3 { font-weight: 600; font-size: 1.125rem; }
.layers__list p { color: var(--muted); max-width: 50ch; }
.layers__list .more { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.5s var(--ease); }
.layers__list .more > p { overflow: hidden; padding-top: 4px; }

.stack-box { display: grid; place-items: center; min-height: min(78vw, 640px); }
.stack {
  --w: min(74vw, 560px);
  --u: calc(var(--w) / 100);
  --ex: 1;      /* 0 — собран, 1 — разобран */
  --gap: 11;
  position: relative;
  width: var(--w);
  aspect-ratio: 16 / 10;
  transform: rotateX(calc(var(--ex) * 57deg)) rotateZ(calc(var(--ex) * -36deg));
  transform-style: preserve-3d;
}
.plane {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--u) * 2.4);
  transform: translateZ(calc((var(--i) - 2.5) * var(--gap) * var(--u) * var(--ex)));
  background: rgba(255, 255, 255, calc(var(--ex) * 0.16));
  box-shadow: 0 0 0 1px rgba(31, 46, 224, calc(var(--ex) * 0.34));
  transition: opacity 0.4s;
  overflow: hidden;
  font-family: var(--body);
  color: #121212;
}
.plane--leads { --i: 0; opacity: var(--ex); background: rgba(255, 255, 255, calc(var(--ex) * 0.9)); }
.plane--structure { --i: 1; opacity: var(--ex); background: rgba(255, 255, 255, calc(var(--ex) * 0.7)); }
.plane--visual { --i: 2; background: #f1f0f0; box-shadow: 0 0 0 1px rgba(31, 46, 224, calc(var(--ex) * 0.3)), 0 calc(var(--u) * 5) calc(var(--u) * 10) calc(var(--u) * -5) rgba(11, 13, 23, 0.28); }
.plane--text { --i: 3; }
.plane--ui { --i: 4; }
.plane--motion { --i: 5; overflow: visible; }
.stack[data-active] .plane { opacity: 0.4; }
.stack[data-active="leads"] .plane--leads,
.stack[data-active="structure"] .plane--structure,
.stack[data-active="visual"] .plane--visual,
.stack[data-active="text"] .plane--text,
.stack[data-active="ui"] .plane--ui,
.stack[data-active="motion"] .plane--motion { opacity: 1; box-shadow: 0 0 0 2px #1f2ee0, 0 calc(var(--u) * 4) calc(var(--u) * 8) calc(var(--u) * -4) rgba(31, 46, 224, 0.45); }

.plane svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.plane--motion svg { opacity: var(--ex); }
.pv-word { position: absolute; inset: calc(var(--u) * 3) 0 auto 0; text-align: center; font-weight: 600; font-size: calc(var(--u) * 27); line-height: 1; letter-spacing: -0.05em; color: #fff; }
.pv-branch { position: absolute; left: -3%; top: 9%; width: 106%; max-width: none; }
.pt-h { position: absolute; left: calc(var(--u) * 4); bottom: calc(var(--u) * 7); width: calc(var(--u) * 40); font-weight: 600; font-size: calc(var(--u) * 4.5); line-height: 1.05; letter-spacing: -0.03em; }
.pt-p { position: absolute; left: calc(var(--u) * 48); bottom: calc(var(--u) * 7.4); width: calc(var(--u) * 22); font-size: calc(var(--u) * 1.55); line-height: 1.4; color: #5c5c5c; }
.pu-nav { position: absolute; inset: calc(var(--u) * 3) calc(var(--u) * 4) auto; display: flex; align-items: center; justify-content: space-between; font-size: calc(var(--u) * 1.4); }
.pu-nav b { font-size: calc(var(--u) * 2.1); letter-spacing: -0.03em; }
.pu-nav span { display: flex; gap: calc(var(--u) * 3); }
.pu-nav em { font-style: normal; padding: calc(var(--u) * 0.8) calc(var(--u) * 1.8); border-radius: 99px; box-shadow: inset 0 0 0 1px #121212; }
.pu-btn { position: absolute; left: calc(var(--u) * 4); bottom: calc(var(--u) * 23.5); padding: calc(var(--u) * 0.9) calc(var(--u) * 2.2); border-radius: 99px; background: #121212; color: #fff; font-size: calc(var(--u) * 1.4); }
.pu-stat { position: absolute; bottom: calc(var(--u) * 6); width: calc(var(--u) * 11.5); height: calc(var(--u) * 10); padding: calc(var(--u) * 1.4); border-radius: calc(var(--u) * 1.6); background: #fff; font-weight: 600; font-size: calc(var(--u) * 2.6); letter-spacing: -0.03em; }
.pu-stat { right: calc(var(--u) * 16.5); }
.pu-stat + .pu-stat { right: calc(var(--u) * 4); }
.pm-leaf { position: absolute; width: calc(var(--u) * 7); animation: leaf 5s ease-in-out infinite alternate; }
.pm-leaf:nth-of-type(2) { animation-duration: 6.5s; animation-delay: -2s; }
.pm-leaf:nth-of-type(3) { animation-duration: 5.6s; animation-delay: -3.4s; }
.pm-leaf:nth-of-type(4) { animation-duration: 7.2s; animation-delay: -1.2s; }
@keyframes leaf { from { transform: translate(0, 0) rotate(-14deg); } to { transform: translate(calc(var(--u) * 2.4), calc(var(--u) * 4)) rotate(22deg); } }
.pl-table { position: absolute; inset: calc(var(--u) * 6) calc(var(--u) * 6); display: grid; grid-template-rows: repeat(5, 1fr); gap: calc(var(--u) * 1.2); }
.pl-row { display: grid; grid-template-columns: 1.1fr 1.6fr 1.2fr 0.8fr; gap: calc(var(--u) * 1.6); align-items: center; padding: 0 calc(var(--u) * 2); border-radius: calc(var(--u) * 1.2); background: rgba(31, 46, 224, 0.07); font-size: calc(var(--u) * 1.5); color: #1f2ee0; font-weight: 500; }
.pl-row i { height: calc(var(--u) * 1.3); border-radius: 99px; background: rgba(31, 46, 224, 0.22); }
.pl-row--new { background: #1f2ee0; color: #fff; }
.pl-row--new i { background: rgba(255, 255, 255, 0.55); }

@media (min-width: 960px) {
  .layers__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
  .stack { --w: min(35vw, 540px); }
  .stack-box { min-height: 0; }
  .layers.is-pinned { padding: 0; }
  .layers.is-pinned .layers__grid { min-height: 100vh; padding-block: calc(var(--bar) + 16px) 32px; }
  .layers.is-pinned .layers__list li { opacity: 0.42; }
  .layers.is-pinned .layers__list li.is-on { opacity: 1; }
  .layers.is-pinned .layers__list li:not(.is-on) .more { grid-template-rows: 0fr; }
}

/* =========================================================
   Главная: с чем помогаю
   ========================================================= */
.helps { padding: clamp(88px, 14vh, 168px) 0 clamp(40px, 8vh, 96px); }
.helps__grid { display: grid; gap: clamp(40px, 6vw, 96px); }
.helps__head { display: grid; gap: 20px; align-content: start; }
.asks li { display: grid; gap: 10px; padding: 28px 0; border-top: 1px solid var(--line); }
.asks li:last-child { border-bottom: 1px solid var(--line); }
.asks li > p { color: var(--muted); max-width: 54ch; }
.channels { display: grid; gap: 20px; margin-top: 14px; }
.channels div { padding: 20px 22px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.channels h4 { margin: 0 0 8px; font-size: 1.0625rem; font-weight: 600; }
.channels p { color: var(--muted); font-size: 0.9688rem; }
.asks__note { margin-top: 6px; font-size: 0.9375rem; }
@media (min-width: 620px) { .channels { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .helps__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
  .helps__head { position: sticky; top: calc(var(--bar) + 40px); }
}

/* =========================================================
   Главная: демо Telegram-бота
   ========================================================= */
.botdemo { padding: clamp(88px, 14vh, 160px) 0; }
.botdemo__grid { display: grid; gap: clamp(40px, 6vw, 96px); align-items: start; }
.botdemo__text { display: grid; gap: 22px; align-content: start; }
.botdemo__note { color: var(--muted); max-width: 46ch; }
.botdemo__links { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.botdemo__lead { display: grid; gap: 12px; align-content: start; min-width: 0; }
.botdemo__lead.is-new { animation: lead-in 0.8s var(--ease); }
@keyframes lead-in { from { opacity: 0; transform: translateY(16px); } }
.botdemo__label { color: var(--muted); font-size: 0.9375rem; }
.botdemo__msg { max-width: 30rem; padding: 14px 16px; border-radius: 16px 16px 16px 4px; background: #182533; color: #e9eef3; white-space: pre-wrap; font-size: 0.9375rem; line-height: 1.5; }
.botdemo__sheet { overflow-x: auto; border-radius: 10px; background: #fff; color: #1f2329; }
.botdemo__sheet table { border-collapse: collapse; font-size: 0.8125rem; min-width: 34rem; width: 100%; }
.botdemo__sheet th, .botdemo__sheet td { padding: 8px 10px; border: 1px solid #e1e3e6; text-align: left; white-space: nowrap; }
.botdemo__sheet th { background: #f1f3f4; font-weight: 600; }
.botdemo__sheet td { background: #e6f4ea; }

/* Окно Telegram в тёмной теме */
.tg {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  width: min(100%, 420px);
  height: min(720px, 82svh);
  justify-self: center;
  border-radius: 28px;
  overflow: hidden;
  background: #0e1621;
  color: #e9eef3;
  font-size: 0.9375rem;
  box-shadow: 0 0 0 8px #0b0d17, 0 40px 80px -30px rgba(3, 5, 30, 0.7);
}
.tg__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #17212b; }
.tg__head b { display: block; font-weight: 600; }
.tg__status { display: block; font-size: 0.8125rem; color: #7f91a4; }
.tg__ava { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #7fd6d0; color: #0b1013; font-weight: 600; }
.tg__feed { display: flex; flex-direction: column; gap: 8px; padding: 16px 12px; overflow-y: auto; overscroll-behavior: contain; }
.tg-b { max-width: 86%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; animation: tg-in 0.25s ease-out; }
@keyframes tg-in { from { opacity: 0; transform: translateY(6px); } }
.tg-b--bot { align-self: flex-start; background: #182533; border-bottom-left-radius: 4px; }
.tg-b--me { align-self: flex-end; background: #2b5278; border-bottom-right-radius: 4px; }
.tg-ik { display: grid; gap: 4px; margin: 8px -6px -4px; white-space: normal; }
.tg-ik div { display: flex; gap: 4px; }
.tg-ik button, .tg__keys button {
  flex: 1; min-height: 40px; padding: 6px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); color: #e9eef3; font-size: 0.875rem; line-height: 1.25;
  transition: background-color 0.2s;
}
.tg-ik button:hover, .tg__keys button:hover { background: rgba(255, 255, 255, 0.16); }
.tg__keys { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px; background: #17212b; }
.tg__keys:not(:empty) { padding: 8px 10px; }
.tg__input { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; background: #17212b; border-top: 1px solid #0e1621; }
.tg__input input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; color: #e9eef3; font: inherit; outline: none; }
.tg__input input::placeholder { color: #6c7883; }
.tg__input button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #5eb5f7; }
.tg__input button svg { width: 24px; height: 24px; }
.tg__input:focus-within { box-shadow: inset 0 0 0 2px #5eb5f7; }
.tg__toast { position: absolute; left: 16px; right: 16px; top: 76px; padding: 12px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.85); color: #fff; font-size: 0.875rem; animation: tg-in 0.2s ease-out; }
@media (min-width: 960px) {
  .botdemo__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); grid-template-rows: auto 1fr; row-gap: 40px; }
  .tg { grid-column: 2; grid-row: 1 / span 2; }
  .botdemo__lead { grid-column: 1; grid-row: 2; }
}

/* =========================================================
   Главная: как идёт работа
   ========================================================= */
.process { padding: clamp(88px, 14vh, 168px) 0; border-top: 1px solid var(--line); }
.process__grid { display: grid; gap: clamp(40px, 6vw, 96px); }
.process__head { display: grid; gap: 20px; align-content: start; }
.terms { max-width: 40ch; padding: 20px 22px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.5rem 1fr; gap: 8px 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1.15; color: var(--accent); }
.steps p { color: var(--muted); max-width: 52ch; }
@media (min-width: 960px) {
  .process__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
  .process__head { position: sticky; top: calc(var(--bar) + 40px); }
}

/* ---------- Отзывы ---------- */
.reviews { padding: clamp(88px, 14vh, 168px) 0; border-top: 1px solid var(--line); }
.reviews__grid { display: grid; gap: clamp(40px, 6vw, 96px); }
.reviews__head { display: grid; gap: 20px; align-content: start; }
.quotes li { display: grid; gap: 14px; justify-items: start; padding: 32px 0; border-top: 1px solid var(--line); }
.quotes li:last-child { border-bottom: 1px solid var(--line); }
.quotes blockquote { margin: 0; font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.42; max-width: 34ch; text-wrap: pretty; }
.quotes__by { color: var(--muted); }
.quotes__by strong { color: var(--fg); font-weight: 600; }
@media (min-width: 960px) {
  .reviews__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
  .reviews__head { position: sticky; top: calc(var(--bar) + 40px); }
}

/* ---------- Призыв и подвал ---------- */
.cta { padding: clamp(96px, 18vh, 200px) 0 clamp(72px, 12vh, 140px); }
.cta__in { display: grid; gap: clamp(28px, 5vh, 48px); justify-items: start; }
.cta__in .h-xl { max-width: 15ch; }

.foot { padding: 36px 0 44px; border-top: 1px solid var(--line); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 48px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot__note { flex-basis: 100%; max-width: 62ch; color: var(--muted); font-size: 0.9375rem; }

/* =========================================================
   Страница работы
   ========================================================= */
.case-head { padding: calc(var(--bar) + clamp(48px, 10vh, 120px)) 0 clamp(40px, 7vh, 80px); }
.case-head__in { display: grid; gap: clamp(28px, 5vh, 56px); }
.case-title { font-family: var(--display); font-weight: 600; font-size: clamp(3.4rem, 13.5vw, 14rem); line-height: 0.9; letter-spacing: -0.06em; margin-left: -0.04em; }
.case-title .line { display: block; overflow: hidden; padding: 0.06em 0 0.14em; margin: -0.06em 0 -0.14em; }
.case-title .line > span { display: block; }
html.js .case-title .line > span { transform: translateY(115%); transition: transform 1.2s var(--ease) 0.1s; }
html.js .is-ready .case-title .line > span { transform: none; }
.case-head__row { display: grid; gap: 32px; }
.case-kind { color: var(--accent); font-weight: 500; }
.case-facts { display: grid; border-top: 1px solid var(--line); }
.case-facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.case-facts dt { color: var(--muted); }
@media (min-width: 900px) {
  .case-head__row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(40px, 8vw, 140px); align-items: start; }
}

.demo { padding-bottom: clamp(72px, 12vh, 140px); }
.demo__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 20px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 500; transition: background-color 0.3s, color 0.3s; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.demo__stage { display: grid; justify-items: center; }
.demo__win { width: 100%; transition: width 0.7s var(--ease), border-radius 0.7s var(--ease); }
[data-theme="listva"] .demo__win { box-shadow: 0 0 0 1px rgba(18, 18, 18, 0.1), 0 50px 90px -40px rgba(18, 18, 18, 0.4); }
[data-theme="vela"] .demo__win, [data-theme="halden"] .demo__win { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 50px 100px -40px rgba(0, 0, 0, 0.9); }
.demo__view { position: relative; overflow: hidden; background: #0c0d11; aspect-ratio: 16 / 10; }
.demo__view iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.demo__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity 0.6s; }
.demo__shield {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  width: 100%;
  background: rgba(6, 8, 16, 0.2);
  color: #fff;
  transition: background-color 0.4s, opacity 0.4s;
}
.demo__shield span {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 28px; border-radius: 999px;
  background: #fff; color: #0b0d17; font-weight: 500;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease);
}
.demo__shield span::before { content: ""; width: 0; height: 0; border-left: 11px solid currentColor; border-block: 7px solid transparent; }
.demo__shield:hover span { transform: scale(1.05); }
.demo__win[data-state="live"] .demo__poster { opacity: 0; pointer-events: none; }
.demo__win[data-state="live"] .demo__shield { opacity: 0; pointer-events: none; }
.demo__win[data-state="paused"] .demo__poster { opacity: 0; pointer-events: none; }
.demo__win[data-state="paused"] .demo__shield { background: rgba(6, 8, 16, 0.12); }
.demo__win[data-state="paused"] .demo__shield span { opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.4s var(--ease); }
.demo__win[data-state="paused"] .demo__shield:hover span { opacity: 1; transform: none; }
.demo__win[data-state="paused"] .demo__shield span::before { display: none; }
.demo__win[data-device="phone"] { width: min(100%, 390px); border-radius: 36px; }
.demo__win[data-device="phone"] .win__bar { justify-content: center; }
.demo__win[data-device="phone"] .win__bar i:not(:first-child), .demo__win[data-device="phone"] .win__tab { display: none; }
.demo__win[data-device="phone"] .win__bar i { width: 64px; height: 6px; border-radius: 99px; }
.demo__win[data-device="phone"] .demo__view { aspect-ratio: 390 / 760; }
.demo__hint { margin-top: 18px; color: var(--muted); font-size: 0.9375rem; text-align: center; }

.notes { padding-bottom: clamp(72px, 12vh, 140px); }
.notes__head { max-width: 22ch; margin-bottom: clamp(36px, 6vh, 64px); }
.note { display: grid; gap: 24px; padding: clamp(28px, 5vh, 48px) 0; border-top: 1px solid var(--line); }
.note__text { display: grid; gap: 12px; align-content: start; }
.note__text p { color: var(--muted); max-width: 46ch; }
.note__pic { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.note__pic img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 0.9s var(--ease); }
.note__pic:hover img { transform: scale(1.03); }
@media (min-width: 900px) {
  .note { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); gap: clamp(40px, 8vw, 140px); }
}

.next { display: block; padding: clamp(72px, 14vh, 160px) 0; text-decoration: none; overflow: hidden; }
.next__in { display: grid; gap: 14px; }
.next__name { font-family: var(--display); font-weight: 600; font-size: clamp(3rem, 11vw, 11rem); line-height: 0.95; letter-spacing: -0.06em; transition: transform 0.8s var(--ease); }
.next:hover .next__name { transform: translateX(clamp(12px, 2vw, 32px)); }

/* =========================================================
   Страница «Обсудить сайт»
   ========================================================= */
.brief-head { padding: calc(var(--bar) + clamp(48px, 10vh, 112px)) 0 clamp(36px, 6vh, 64px); }
.brief-head .lede { margin-top: 24px; }
.brief { padding-bottom: clamp(80px, 14vh, 160px); }
.brief__grid { display: grid; gap: clamp(40px, 6vw, 88px); align-items: start; }
.brief form { display: grid; gap: 36px; }
.field { display: grid; gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; padding: 0; margin-bottom: 12px; }
.field > label { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.25s, color 0.25s, box-shadow 0.25s; }
.chips label:hover span { box-shadow: inset 0 0 0 1px var(--fg); }
.chips input:checked + span { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.chips input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 3px; }
.field input[type="text"], .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input[type="text"]:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field-row { display: grid; gap: 24px; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }

.letter { display: grid; gap: 22px; padding: clamp(24px, 3vw, 40px); border-radius: 20px; background: var(--cobalt); color: #fff; }
.letter__text { white-space: pre-wrap; min-height: 12em; font-size: 1.0625rem; line-height: 1.6; }
.letter__text mark { background: none; color: #c9cfff; }
.letter__send { display: flex; flex-wrap: wrap; gap: 10px; }
.letter .btn { background: #fff; color: var(--cobalt); }
.letter .btn::before { background: var(--ink); }
.letter .btn:hover, .letter .btn:focus-visible { color: #fff; }
.letter .btn--line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.letter .btn--line::before { background: #fff; }
.letter .btn--line:hover, .letter .btn--line:focus-visible { color: var(--cobalt); }
.letter__note { color: #c9cfff; font-size: 0.9375rem; min-height: 1.5em; }
.letter__note.is-ok { color: #fff; font-weight: 500; }
.letter__alt { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.24); color: #c9cfff; font-size: 0.9375rem; }
.letter__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.letter__links .link { color: #fff; font: inherit; }
.letter .btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.field__err { min-height: 0; color: #c0261a; font-size: 0.9375rem; }
.field__err:empty { display: none; }
.field input[aria-invalid="true"] { border-color: #c0261a; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (min-width: 960px) {
  .brief__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); }
  .letter { position: sticky; top: calc(var(--bar) + 24px); }
}

/* ---------- Указатель-подсказка над окнами ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90;
  display: grid; place-items: center;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  border-radius: 50%;
  background: #fff; color: #0b0d17;
  font-weight: 500; font-size: 0.9375rem;
  pointer-events: none;
  scale: 0;
  transition: scale 0.45s var(--ease);
}
.cursor.is-on { scale: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  @view-transition { navigation: none; }
}
