/* Manrope и JetBrains Mono (SIL Open Font License), локальные копии */
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(../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 600;font-display:swap;src:url(../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 600;font-display:swap;src:url(../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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url(../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:'Manrope';font-style:normal;font-weight:300 800;font-display:swap;src:url(../fonts/manrope-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:'Manrope';font-style:normal;font-weight:300 800;font-display:swap;src:url(../fonts/manrope-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Manrope';font-style:normal;font-weight:300 800;font-display:swap;src:url(../fonts/manrope-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Manrope';font-style:normal;font-weight:300 800;font-display:swap;src:url(../fonts/manrope-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}

/* ---------- Tokens ----------
   Две темы: светлая (тёплая бумага) и тёмная (тёплый графит). data-theme ставит boot.js до отрисовки. */
:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --bg-2: #efede7;
  --bg-3: #e6e3db;
  --fg: #1c1b17;
  --fg-2: #5f5d56;
  --fg-3: #8d8a82; /* подписи и крупный текст */
  --line: rgba(28, 27, 23, .09);
  --line-2: rgba(28, 27, 23, .16);
  --accent: #0066cc;
  --ok: #1e9e52;
  --glass: rgba(247, 246, 242, .74);
  --seg-pill: #fff;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 32px 70px -28px rgba(60, 40, 10, .32);
  --win: #fbfaf8;
  --win-bar: #f1efea;
  --fig-t: var(--bg);
  --fig-r: #ece9e2;
  --fig-s: #e2ded4;
  --fig-line: rgba(28, 27, 23, .5);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --nav-h: 64px;
  --section: clamp(104px, 13vw, 200px);
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11100e;
  --bg-2: #1a1916;
  --bg-3: #24231f;
  --fg: #edece8;
  --fg-2: #a4a29b;
  --fg-3: #75736c;
  --line: rgba(237, 236, 232, .08);
  --line-2: rgba(237, 236, 232, .15);
  --accent: #4ca3ff;
  --ok: #3ccf7c;
  --glass: rgba(17, 16, 14, .72);
  --seg-pill: #2d2c28;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 36px 80px -30px rgba(0, 0, 0, .85);
  --win: #161513;
  --win-bar: #1e1d1a;
  --fig-r: #1c1b18;
  --fig-s: #26251f;
  --fig-line: rgba(237, 236, 232, .4);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  scrollbar-gutter: stable;
}
html.smooth { scroll-behavior: auto; }
[tabindex="-1"]:focus { outline: none; }
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.003em;
  overflow-x: clip;
}
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, figure, dl, dd { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-weight: 500; }
ol, ul { list-style: none; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 400;
  padding: 10px 18px; border-radius: 999px; background: var(--fg); color: var(--bg);
  transform: translateY(-200%); transition: transform .4s var(--ease);
}
.skip:focus { transform: none; }

/* смена темы без View Transitions — короткий переход цветов */
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease, stroke .4s ease !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  background: var(--glass); border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: border-color .3s ease;
}
.nav.is-scrolled { border-color: var(--line); }
.nav__inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; font-size: 15px; justify-self: start; }
.logo__mark {
  width: 25px; height: 21px; background: currentColor; flex: none;
  -webkit-mask: url(../logo-mark.png) center / contain no-repeat; mask: url(../logo-mark.png) center / contain no-repeat;
  transition: transform .6s var(--ease);
}
.logo:hover .logo__mark { transform: rotate(-8deg); }

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 6px 13px; border-radius: 999px; font-size: 14px; color: var(--fg-2);
  transition: color .2s ease, background-color .2s ease;
}
.nav__links a:hover { color: var(--fg); background: var(--bg-2); }
.nav__links a.is-active { color: var(--fg); }

.nav__right { display: flex; align-items: center; gap: 8px; justify-self: end; }

/* сегментированный переключатель в духе Apple: язык, тема */
.seg { position: relative; display: inline-flex; padding: 2px; border-radius: 999px; background: var(--bg-2); }
.seg button {
  position: relative; z-index: 1; height: 28px; min-width: 34px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--fg-3); transition: color .25s ease;
}
.seg button:hover, .seg button[aria-pressed="true"] { color: var(--fg); }
.seg__pill {
  position: absolute; top: 2px; left: 0; height: 28px; width: 34px; border-radius: 999px; background: var(--seg-pill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 .5px var(--line);
  transform: translateX(var(--x, 2px)); transition: transform .45s var(--ease), width .45s var(--ease);
}
.seg--icons button { width: 32px; min-width: 0; padding: 0; display: grid; place-items: center; }
.seg--icons svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--fg-2);
  transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .3s var(--ease);
}
.icon-btn:hover:not([aria-disabled="true"]) { background: var(--bg-2); color: var(--fg); }
.icon-btn:active:not([aria-disabled="true"]) { transform: scale(.92); }
.icon-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle svg { width: 18px; height: 18px; transition: transform .6s var(--ease), opacity .3s ease; }
.theme-toggle { position: relative; }
.theme-toggle svg { position: absolute; }
[data-theme="light"] .theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }

.burger { display: none; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-2); position: relative; transition: transform .3s var(--ease); }
.burger:active { transform: scale(.92); }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; border-radius: 2px; background: var(--fg); transition: transform .45s var(--ease); }
.burger span:first-child { transform: translateY(-3px); }
.burger span:last-child { transform: translateY(3px); }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--nav-h) + 24px) var(--pad) 12vh;
  opacity: 0; transition: opacity .35s ease;
}
.menu.is-open { opacity: 1; }
.menu__links { display: flex; flex-direction: column; }
.menu__links a {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(30px, min(9vw, 7vh), 48px); font-weight: 500; letter-spacing: -.035em; line-height: 1.1;
  opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.menu.is-open .menu__links a { opacity: 1; transform: none; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: .05s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: .1s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: .15s; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: -.01em;
  white-space: nowrap; transition: background-color .25s ease, color .25s ease, transform .25s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--primary:hover { background: color-mix(in srgb, var(--fg) 84%, var(--bg)); }
.btn--soft { background: var(--bg-2); color: var(--fg); }
.btn--soft:hover { background: var(--bg-3); }
.btn--sm { height: 34px; padding: 0 15px; font-size: 14px; }
.btn__arrow { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn:hover .btn__arrow--down { transform: translateY(2px); }
.btn .ext, .link .ext { width: 11px; height: 11px; flex: none; transition: transform .35s var(--ease); }
.btn:hover .ext, .link:hover .ext { transform: translate(2px, -2px); }

.link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 16px; font-weight: 500; }
.link:hover span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Art: «живая» картина под окнами ----------
   Пять мягких пятен цвета медленно дрейфуют, сверху — шум, похожий на мазки и холст. */
.art {
  --a-base: #e8dfd2;
  --a1: rgba(243, 166, 120, .85);
  --a2: rgba(146, 182, 226, .9);
  --a3: rgba(184, 206, 162, .85);
  --a4: rgba(232, 188, 210, .8);
  --a5: rgba(251, 242, 226, .95);
  --a-grain: .55;
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg);
  background-color: var(--a-base);
}
.art--dusk {
  --a-base: #e6e0ea;
  --a1: rgba(190, 170, 234, .85);
  --a2: rgba(246, 184, 146, .85);
  --a3: rgba(156, 198, 232, .85);
  --a4: rgba(244, 222, 160, .8);
  --a5: rgba(250, 246, 240, .9);
}
[data-theme="dark"] .art {
  --a-base: #181512;
  --a1: rgba(196, 92, 42, .5);
  --a2: rgba(50, 92, 172, .5);
  --a3: rgba(62, 112, 80, .42);
  --a4: rgba(128, 60, 118, .42);
  --a5: rgba(38, 32, 26, .7);
  --a-grain: .4;
}
[data-theme="dark"] .art--dusk {
  --a-base: #15131a;
  --a1: rgba(108, 78, 196, .5);
  --a2: rgba(204, 98, 58, .42);
  --a3: rgba(38, 112, 154, .45);
  --a4: rgba(156, 124, 46, .32);
  --a5: rgba(30, 26, 36, .7);
}
.art::before {
  content: ""; position: absolute; inset: -25%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 42% at 18% 22%, var(--a1), transparent 70%),
    radial-gradient(40% 46% at 84% 16%, var(--a2), transparent 70%),
    radial-gradient(44% 40% at 76% 86%, var(--a3), transparent 70%),
    radial-gradient(40% 44% at 16% 84%, var(--a4), transparent 70%),
    radial-gradient(34% 32% at 52% 50%, var(--a5), transparent 72%);
  animation: art-drift 40s var(--ease-io) infinite alternate;
}
.art--dusk::before {
  background:
    radial-gradient(40% 44% at 80% 24%, var(--a1), transparent 70%),
    radial-gradient(42% 46% at 14% 20%, var(--a2), transparent 70%),
    radial-gradient(44% 42% at 24% 88%, var(--a3), transparent 70%),
    radial-gradient(40% 40% at 86% 86%, var(--a4), transparent 70%),
    radial-gradient(36% 34% at 50% 52%, var(--a5), transparent 72%);
  animation-duration: 46s;
}
.art::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--a-grain); mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .012' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size: 240px 240px, 100% 100%;
}
@keyframes art-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3%, -2%, 0) rotate(6deg) scale(1.07); }
  100% { transform: translate3d(-3%, 2%, 0) rotate(-5deg) scale(1.02); }
}
.art .btn--soft { background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.art .btn--soft:hover { background: color-mix(in srgb, var(--bg) 82%, transparent); }

/* окно браузера */
.window {
  position: relative; border-radius: 12px; overflow: hidden; background: var(--win);
  box-shadow: var(--shadow), 0 0 0 .5px var(--line-2);
  transform-origin: 50% 0; transform: rotateX(var(--rx, 0deg)) scale(var(--sc, 1)); will-change: transform;
}
.window__bar {
  height: 38px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 14px;
  background: var(--win-bar); border-bottom: 1px solid var(--line);
}
.window__dots { display: flex; gap: 7px; }
.window__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); transition: background-color .3s; }
.window:hover .window__dots i:nth-child(1) { background: #ff5f57; }
.window:hover .window__dots i:nth-child(2) { background: #febc2e; transition-delay: .05s; }
.window:hover .window__dots i:nth-child(3) { background: #28c840; transition-delay: .1s; }
.window__url {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 14px; border-radius: 7px; background: var(--bg-2);
  font-size: 12px; color: var(--fg-2);
}
.window__url svg { width: 10px; height: 10px; opacity: .6; }
.window__media { position: relative; aspect-ratio: 16 / 10; background: #0b1030; }
.window__media video, .window__media img { width: 100%; height: 100%; object-fit: cover; }
.window__link { position: absolute; inset: 0; z-index: 1; }
.window__link:focus-visible { outline-offset: -4px; border-radius: 0 0 12px 12px; }
.window__toggle {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(12, 12, 14, .5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: .85; transition: opacity .25s, background-color .25s, transform .3s var(--ease);
}
.window__toggle:hover, .window__toggle:focus-visible { opacity: 1; background: rgba(12, 12, 14, .75); }
.window__toggle:active { transform: scale(.9); }
.window__toggle svg { width: 11px; height: 11px; }
.window__toggle[data-state="playing"] .i-play, .window__toggle[data-state="paused"] .i-pause { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--nav-h) + clamp(64px, 14vh, 156px)); padding-bottom: clamp(56px, 9vh, 96px); }
.hero__meta { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: clamp(24px, 3.4vh, 36px); font-size: 14px; color: var(--fg-2); }
.status { display: inline-flex; align-items: center; gap: 9px; height: 30px; padding: 0 13px 0 11px; border-radius: 999px; background: var(--bg-2); color: var(--fg); font-weight: 500; }
.status i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }

.hero__title { font-size: clamp(40px, 6.2vw, 86px); line-height: 1.03; letter-spacing: -.045em; margin-left: -.04em; }
.line { display: block; }
.hero__title .line:last-child, .contact__title .line:last-child { color: var(--fg-3); }
.hero__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px 64px; flex-wrap: wrap; margin-top: clamp(32px, 5vh, 56px); }
.hero__lead { max-width: 36em; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.55; color: var(--fg-2); }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* появление первого экрана */
.js .hero__meta, .js .hero__bottom { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js .hero__bottom { transition-delay: .45s; }
.js .hero__title .line > span { display: block; opacity: 0; transform: translateY(22px); filter: blur(10px); transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 120ms); }
.ready .hero__meta, .ready .hero__bottom { opacity: 1; transform: none; }
.ready .hero__title .line > span { opacity: 1; transform: none; filter: none; }

/* ---------- Sections ---------- */
.section { padding-top: var(--section); }
.work { padding-top: 0; }

.eyebrow { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; font-size: 14px; color: var(--fg-2); }
.eyebrow--center { justify-content: center; }
.eyebrow__num { font-family: var(--mono); font-size: 12px; color: var(--fg-3); }

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.split__title { font-size: clamp(32px, 4.3vw, 58px); line-height: 1.06; letter-spacing: -.042em; max-width: 14ch; }
.split__text { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--fg-2); max-width: 30em; }

/* появление при прокрутке */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .settled { transition-delay: 0s; }

.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Work / case ---------- */
.projects { display: flex; flex-direction: column; gap: var(--section); }
.case__stage { perspective: 1800px; padding: clamp(20px, 6vw, 88px) clamp(14px, 6vw, 88px) 0; }
.case__stage .window { max-width: 1000px; margin-inline: auto; border-radius: 12px 12px 0 0; }
.case__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px 64px; margin-top: clamp(48px, 6vw, 88px); }
.case__title { font-size: clamp(44px, 6vw, 80px); line-height: 1; letter-spacing: -.05em; margin-left: -.04em; }
.case__kicker { margin-top: 14px; font-size: clamp(17px, 1.4vw, 19px); color: var(--fg-2); }
.case__summary { font-size: clamp(18px, 1.65vw, 22px); line-height: 1.5; letter-spacing: -.012em; color: var(--fg-2); }
.case__links { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-top: 28px; }

.specs {
  display: grid; grid-template-columns: 1.35fr .55fr .8fr 1.05fr 1.35fr; gap: 24px 32px;
  margin-top: clamp(48px, 6vw, 80px); padding-top: 24px; border-top: 1px solid var(--line);
}
.spec dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-3); }
.spec dt .ico { width: 15px; height: 15px; }
.spec dd { margin-top: 8px; font-size: 15px; line-height: 1.45; }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 40px; margin-top: clamp(56px, 7vw, 104px); }
.feature__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--bg-2); color: var(--fg); margin-bottom: 20px; }
.feature__icon .ico { width: 20px; height: 20px; }
.feature h4 { font-size: 16px; letter-spacing: -.01em; }
.feature p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--fg-2); }

/* лента экранов: выходит за колонку до краёв окна */
.rail { margin-top: clamp(64px, 8vw, 112px); }
.rail__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.rail__title { font-size: 15px; color: var(--fg-2); }
.rail__controls { display: flex; align-items: center; gap: 4px; }
.rail__bar { width: 88px; height: 2px; border-radius: 2px; background: var(--line-2); position: relative; overflow: hidden; margin-right: 10px; }
.rail__bar span { position: absolute; inset: 0; border-radius: inherit; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--rp, .2)); transition: transform .25s var(--ease); }
.rail__controls .icon-btn { width: 36px; height: 36px; background: var(--bg-2); }
.rail__controls .icon-btn:hover:not([aria-disabled="true"]) { background: var(--bg-3); }
.rail__track {
  --edge: max(var(--pad), calc((100vw - var(--max)) / 2));
  --rh: clamp(200px, 24vw, 340px);
  display: flex; align-items: flex-start; gap: 16px; overflow-x: auto; overflow-y: hidden;
  margin: -8px calc(50% - 50vw) 0; padding: 12px var(--edge) 8px; scroll-padding-inline: var(--edge); /* запас сверху: карточка приподнимается при наведении */
  overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.rail__track.is-dragging .tile { pointer-events: none; }
.rail__item { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; gap: 14px; }
.js .rail__item[data-reveal] { transform: none; } /* внутри ленты — только проявление: сдвиг вниз дал бы ленте вертикальную прокрутку */
.tile {
  position: relative; display: block; width: min(calc(var(--rh) * var(--ar)), calc(100vw - 2 * var(--pad)));
  aspect-ratio: var(--ar); border-radius: var(--r-md); overflow: hidden; background: var(--bg-2);
  box-shadow: 0 0 0 .5px var(--line-2); transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 0 0 .5px var(--line-2), 0 24px 40px -24px rgba(40, 30, 10, .35); }
.tile:active { transform: scale(.985); }
.tile:focus-visible { outline-offset: 3px; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .9s var(--ease); }
.tile:hover img { transform: scale(1.03); }
.tile--phone {
  aspect-ratio: auto; width: calc(var(--rh) * .62); height: var(--rh); display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; padding: 20px;
}
.tile--phone img { width: auto; height: 100%; aspect-ratio: var(--ar); border-radius: 20px; box-shadow: 0 0 0 .5px var(--line-2); object-fit: cover; }
.tile--phone:hover img { transform: translateY(-4px); }
.rail__item figcaption { display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--fg-2); }
.rail__item figcaption .mono { color: var(--fg-3); font-size: 11px; }

.work__more { display: flex; align-items: center; gap: 10px; margin-top: clamp(48px, 6vw, 72px); font-size: 14px; color: var(--fg-3); }
.work__plus { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-2); color: var(--fg-2); font-size: 14px; line-height: 1; }

/* ---------- Stack (сетка как логотипы клиентов) ---------- */
.stack__title { text-align: center; font-size: 15px; font-weight: 400; color: var(--fg-2); margin-bottom: 28px; }
.stack__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stack__grid li {
  display: grid; place-items: center; height: 88px; padding: 0 12px; border-radius: var(--r-md); background: var(--bg-2);
  font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--fg-2); text-align: center;
  transition: color .25s ease, background-color .25s ease;
}
.stack__grid li:hover { color: var(--fg); background: var(--bg-3); }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 300px;
  padding: clamp(24px, 3vw, 40px); border-radius: var(--r-lg); background: var(--bg-2);
  transition: background-color .3s ease;
}
.service:hover { background: var(--bg-3); }
.service__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--bg); color: var(--fg); margin-bottom: auto; transition: transform .5s var(--ease); }
.service:hover .service__icon { transform: translateY(-3px); }
.service__num { position: absolute; top: clamp(24px, 3vw, 40px); right: clamp(24px, 3vw, 40px); font-family: var(--mono); font-size: 12px; color: var(--fg-3); }
.service h3 { margin-top: 40px; font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -.025em; line-height: 1.2; }
.service p { color: var(--fg-2); font-size: 16px; max-width: 32em; }
.service__tags { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--fg-3); }

/* ---------- About ---------- */
.about__statement { font-size: clamp(30px, 4.6vw, 62px); line-height: 1.1; letter-spacing: -.042em; max-width: 19ch; }
.about__statement .hw { color: var(--line-2); transition: color .5s ease; }
.about__statement .hw.on { color: var(--fg); }
.about__text { max-width: 33em; margin: clamp(32px, 4vw, 56px) 0 0 auto; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; color: var(--fg-2); }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: clamp(72px, 9vw, 136px); }
.principle__fig { position: relative; display: grid; place-items: center; height: clamp(220px, 21vw, 280px); border-top: 1px solid var(--line); padding-top: 36px; }
.principle__label { position: absolute; top: 14px; left: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--fg-3); }
.principle h3 { margin-top: 28px; font-size: 17px; letter-spacing: -.01em; }
.principle p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--fg-2); max-width: 26em; }

.fig { width: auto; height: 100%; max-height: 190px; max-width: 100%; overflow: visible; }
.fig path {
  fill: none; stroke: var(--fig-line); stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke;
  transition: opacity .6s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 11ms + 150ms);
}
.fig .t { fill: var(--fig-t); }
.fig .r { fill: var(--fig-r); }
.fig .s { fill: var(--fig-s); }
.fig .ta { fill: var(--fig-t); stroke: var(--accent); }
.fig .a { stroke: var(--accent); }
.fig .d, .fig .di { stroke-dasharray: 3 3; }
/* иллюстрация собирается слоями снизу вверх */
.js .fig path { opacity: 0; transform: translateY(-10px); }
.js .in .fig path, .js .fig.in path { opacity: 1; transform: none; }

/* ---------- Contact ---------- */
.contact__panel { padding: clamp(80px, 12vw, 168px) var(--pad); text-align: center; }
.contact__inner { max-width: 760px; margin-inline: auto; }
.contact__title { font-size: clamp(44px, 7.2vw, 100px); line-height: 1.02; letter-spacing: -.05em; }
.contact__text { max-width: 30em; margin: 24px auto 0; font-size: clamp(17px, 1.4vw, 19px); color: var(--fg-2); }
.contact__actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 36px; }

/* ---------- Footer ---------- */
.footer { margin-top: var(--section); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__made { margin-top: 14px; color: var(--fg-3); }
.footer__col h3 { font-size: 14px; margin-bottom: 12px; }
.footer__col a { display: block; width: fit-content; padding: 4px 0; color: var(--fg-2); transition: color .2s ease; }
.footer__col a:hover { color: var(--fg); }
.footer__ext { color: var(--fg-3); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; color: var(--fg-3); }
.footer__controls { display: flex; align-items: center; gap: 20px; }
.footer__top { color: var(--fg-2); transition: color .2s ease; }
.footer__top:hover { color: var(--fg); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 160; padding: 11px 18px; border-radius: 999px;
  background: var(--fg); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translate(-50%, 16px); pointer-events: none;
  transition: transform .5s var(--ease), opacity .3s, visibility 0s .5s;
}
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: transform .5s var(--ease), opacity .3s, visibility 0s; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 170; display: grid; place-items: center; padding: 72px 92px 56px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  opacity: 0; transition: opacity .3s ease; touch-action: pan-y pinch-zoom;
}
.lightbox.is-open { opacity: 1; }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 100%; max-height: 100%; }
.lightbox__figure img {
  max-width: min(100%, 1600px); max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); width: auto; height: auto;
  border-radius: var(--r-md); box-shadow: var(--shadow), 0 0 0 .5px var(--line-2); object-fit: contain;
  transform: scale(.96) translateY(10px); transition: transform .5s var(--ease), opacity .25s;
}
.lightbox.is-open .lightbox__figure img { transform: none; }
.lightbox__figure figcaption { display: flex; gap: 12px; align-items: baseline; color: var(--fg-2); font-size: 14px; }
.lightbox__count { font-family: var(--mono); font-size: 12px; color: var(--fg-3); }
.lightbox__close, .lightbox__nav {
  position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-2); color: var(--fg);
  display: grid; place-items: center; transition: background-color .2s, transform .3s var(--ease);
}
.lightbox__close svg, .lightbox__nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__nav { top: 50%; margin-top: -22px; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--bg-3); }
.lightbox__close:active, .lightbox__nav:active { transform: scale(.92); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stack__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .principles { gap: 32px; }
}
@media (max-width: 860px) {
  :root { --nav-h: 58px; }
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__links, .nav__cta { display: none; }
  .burger { display: block; }
  .split, .case__intro { grid-template-columns: 1fr; align-items: start; }
  .services__grid { grid-template-columns: 1fr; }
  .service { min-height: 0; }
  .principles { grid-template-columns: 1fr; gap: 56px; }
  .principle__fig { height: 240px; }
  .about__text { margin-left: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .lightbox { padding: 64px 12px 100px; }
  .lightbox__nav { top: auto; bottom: 24px; margin: 0; }
  .lightbox__prev { left: calc(50% - 54px); }
  .lightbox__next { right: calc(50% - 54px); }
}
@media (max-width: 600px) {
  :root { --r-lg: 16px; --r-md: 12px; }
  .hero { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 48px; }
  .hero__title { font-size: clamp(34px, 10vw, 52px); }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1 1 auto; }
  .features { grid-template-columns: 1fr; gap: 32px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stack__grid li { height: 64px; font-size: 14px; }
  .case__stage { padding: 18px 14px 0; }
  .window__bar { height: 30px; grid-template-columns: auto 1fr; gap: 10px; padding: 0 10px; }
  .window__bar > span:last-child { display: none; }
  .window__dots { gap: 5px; }
  .window__dots i { width: 8px; height: 8px; }
  .window__url { height: 20px; font-size: 11px; justify-self: center; }
  .rail__bar { display: none; }
  .contact__actions .btn { flex: 1 1 auto; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .logo__text { display: none; }
}

/* ---------- Reduced motion (html.reduce) ----------
   Убираем только сильное движение: наклон окна и дрейф картины. Мягкие появления остаются. */
.reduce { scroll-behavior: auto; }
.reduce .window { transform: none; }
.reduce .art::before { animation: none; }

/* ---------- Touch: эффекты наведения не залипают после нажатия ---------- */
@media (hover: none) {
  .tile:hover, .tile:hover img, .tile--phone:hover img, .service:hover .service__icon,
  .btn:hover .btn__arrow, .btn:hover .ext, .link:hover .ext, .logo:hover .logo__mark { transform: none; }
  .tile:hover { box-shadow: 0 0 0 .5px var(--line-2); }
  .service:hover { background: var(--bg-2); }
  .stack__grid li:hover { color: var(--fg-2); background: var(--bg-2); }
  .nav__links a:hover { background: none; }
}
