@import url('../fonts/fonts.css');

/* ── Токены ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #07080c;
  --bg-2: #0b0d13;
  --surface: #0f1219;
  --surface-2: #141824;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef0f6;
  --text-2: #a7adbd;
  --text-3: #6f7587;
  --accent: #8b95ff;
  --a1: #6d7cff;
  --a2: #b07cff;
  --a3: #3fe0c5;
  --warm: #ffb86b;
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: rgba(139, 149, 255, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.muted { color: var(--text-3); }

/* зерно поверх всего — убирает «пластиковость» градиентов */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-5%, -10%); } 30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); } 70% { transform: translate(9%, 4%); } 90% { transform: translate(-1%, 7%); }
}

/* курсор-прожектор */
.spot {
  position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; z-index: 0;
  border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle, rgba(124, 135, 255, .10), transparent 62%);
  transform: translate3d(var(--mx, -999px), var(--my, -999px), 0);
}
body.has-pointer .spot { opacity: 1; }

/* ── Прогресс и шапка ───────────────────────────────────────────────────── */
.progress {
  position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 60; transform-origin: 0 50%;
  transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3));
}
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.header.is-solid { background: rgba(7, 8, 12, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -.01em; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  font: 600 13px/1 var(--display); letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 6px 24px -6px rgba(109, 124, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { position: relative; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--text-2); transition: color .25s, background .25s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); margin-left: auto; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 16px; } .burger span:nth-child(2) { top: 24px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ── Кнопки ─────────────────────────────────────────────────────────────── */
.btn {
  --b: rgba(255, 255, 255, .06);
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; letter-spacing: -.005em; white-space: nowrap;
  background: var(--b); border: 1px solid var(--line-2); transition: background .3s, border-color .3s, transform .3s var(--ease);
  will-change: transform;
}
.btn:hover { --b: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg.arr { transform: translate(2px, -2px); }
.btn-primary { color: #0a0b10; background: #f4f5fb; border-color: transparent; }
.btn-primary:hover { background: #fff; border-color: transparent; }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-ghost { background: transparent; }

/* ── Типографика секций ─────────────────────────────────────────────────── */
.section { position: relative; padding: clamp(90px, 13vw, 170px) 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font: 500 12.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.h2 {
  margin: 0; font: 600 clamp(30px, 4.3vw, 60px)/1.06 var(--display); letter-spacing: -.035em;
  text-wrap: balance;
}
.h2 em { font-style: normal; background: linear-gradient(100deg, var(--a1) 10%, var(--a2) 50%, var(--a3) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 40px 60px; align-items: end; margin-bottom: clamp(48px, 7vw, 90px); }
.section-head .lead { margin: 0; }

/* построчное появление заголовков */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.split.in .w > span { transform: none; }

[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal='fade'] { transform: none; }
[data-reveal='scale'] { transform: scale(.94); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; padding: 140px 0 60px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.blob.b1 { width: 52vw; height: 52vw; left: -14vw; top: -18vw; background: radial-gradient(circle at 40% 40%, #4b56ff, transparent 65%); animation: float1 22s ease-in-out infinite; }
.blob.b2 { width: 44vw; height: 44vw; right: -12vw; top: 4vw; background: radial-gradient(circle at 50% 50%, #9a5cff, transparent 65%); animation: float2 26s ease-in-out infinite; opacity: .42; }
.blob.b3 { width: 38vw; height: 38vw; left: 30vw; bottom: -22vw; background: radial-gradient(circle at 50% 50%, #1fc8b0, transparent 65%); animation: float3 30s ease-in-out infinite; opacity: .3; }
@keyframes float1 { 50% { transform: translate(6vw, 5vw) scale(1.08); } }
@keyframes float2 { 50% { transform: translate(-7vw, 6vw) scale(.92); } }
@keyframes float3 { 50% { transform: translate(5vw, -6vw) scale(1.1); } }
.grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center top;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  opacity: .55;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); font-size: 13.5px; color: var(--text-2); margin-bottom: 30px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #3fe08b; box-shadow: 0 0 0 0 rgba(63, 224, 139, .6); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(63, 224, 139, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(63, 224, 139, 0); } }
.hero-title { margin: 0; font: 600 clamp(44px, 6.3vw, 98px)/.98 var(--display); letter-spacing: -.05em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: rise 1.2s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .12s; background: linear-gradient(100deg, #fff 0%, #c9ceff 35%, var(--a2) 70%, var(--a3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes rise { to { transform: none; } }
.hero-role { margin: 28px 0 0; font: 500 clamp(17px, 1.7vw, 21px)/1.4 var(--font); color: var(--text); }
.hero-role b { font-weight: 700; }
.hero-lead { margin: 16px 0 0; max-width: 54ch; color: var(--text-2); font-size: clamp(16px, 1.35vw, 18px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 1.1s var(--ease) forwards; animation-delay: var(--d, .3s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-visual { position: relative; height: clamp(380px, 46vw, 600px); perspective: 1600px; }
.hv-layer { position: absolute; will-change: transform; transition: transform .9s var(--ease); }
.hv-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .4); }
.hv-card img { width: 100%; height: auto; }
.hv-1 { width: 88%; right: -6%; top: 6%; transform: rotate(-2deg); }
.hv-2 { width: 60%; left: -2%; top: 46%; transform: rotate(3deg); }
.hv-3 { width: 25%; right: 2%; top: 38%; }
.hv-3 .hv-card { border-radius: 26px; border-width: 5px; border-color: #1c2030; }
.hv-tag {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: rgba(15, 18, 25, .82); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .9);
}
.hv-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--a3)); }
.hv-tag.t1 { left: 4%; top: 12%; }
.hv-tag.t2 { right: 10%; bottom: 4%; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(50px, 7vw, 90px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.stat { padding: 26px 26px 24px; background: rgba(9, 10, 15, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.stat b { display: block; font: 600 clamp(30px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.04em; }
.stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--text-3), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { top: 110%; } }

/* ── Бегущая строка ─────────────────────────────────────────────────────── */
.marquee { position: relative; border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font: 500 clamp(18px, 2vw, 26px)/1 var(--display); letter-spacing: -.02em; color: var(--text-2); white-space: nowrap; }
.marquee-track span::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--a1), var(--a3)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Обо мне ────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 90px); }
.about-text p { font-size: clamp(18px, 1.8vw, 23px); line-height: 1.55; color: var(--text-2); margin: 0 0 22px; text-wrap: pretty; }
.about-text p strong { color: var(--text); font-weight: 600; }
.principles { display: grid; gap: 14px; }
.card {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  overflow: hidden; isolation: isolate;
}
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(420px circle at var(--cx, 50%) var(--cy, 50%), rgba(139, 149, 255, .14), transparent 60%);
}
.card:hover::before { opacity: 1; }
.principle { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 22px 24px; }
.principle .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); }
.principle .ico svg { width: 22px; height: 22px; stroke: var(--accent); }
.principle h4 { margin: 2px 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.principle p { margin: 0; font-size: 15px; color: var(--text-2); line-height: 1.55; }

/* ── Проекты ────────────────────────────────────────────────────────────── */
.projects-intro { padding-bottom: 0; }
.project { position: relative; padding: clamp(70px, 9vw, 120px) 0; }
.project + .project { border-top: 1px solid var(--line); }
.project::before {
  content: ''; position: absolute; left: 50%; top: 10%; width: 70vw; height: 50vw; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--pc) 16%, transparent), transparent); opacity: .7; filter: blur(30px);
}
.p-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 36px; align-items: start; margin-bottom: clamp(36px, 5vw, 64px); }
.p-num { font: 600 clamp(54px, 7vw, 96px)/.85 var(--display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--pc) 70%, #fff); opacity: .9; }
.p-kicker { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); }
.chip.c { color: color-mix(in srgb, var(--pc) 80%, #fff); border-color: color-mix(in srgb, var(--pc) 40%, transparent); background: color-mix(in srgb, var(--pc) 10%, transparent); }
.chip.c::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pc); }
.p-title { margin: 0; font: 600 clamp(32px, 4.4vw, 58px)/1.04 var(--display); letter-spacing: -.04em; }
.p-desc { margin: 16px 0 0; color: var(--text-2); font-size: clamp(16px, 1.4vw, 19px); max-width: 64ch; text-wrap: pretty; }
.p-links { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; padding-top: 6px; }
.p-links small { font-size: 12.5px; color: var(--text-3); }

.p-body { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(30px, 5vw, 70px); }
.p-steps { padding: 6vh 0 18vh; }
.step { position: relative; padding: 26px 0 26px 30px; opacity: .35; transition: opacity .6s var(--ease); min-height: 34vh; display: flex; flex-direction: column; justify-content: center; }
.step::before { content: ''; position: absolute; left: 0; top: 30px; bottom: 30px; width: 2px; border-radius: 2px; background: var(--line-2); }
.step::after { content: ''; position: absolute; left: 0; top: 30px; width: 2px; height: 0; border-radius: 2px; background: var(--pc); transition: height .8s var(--ease); }
.step.is-active { opacity: 1; }
.step.is-active::after { height: calc(100% - 60px); }
.step .s-idx { font: 500 12px/1 var(--mono); letter-spacing: .12em; color: color-mix(in srgb, var(--pc) 75%, #fff); margin-bottom: 12px; }
.step h4 { margin: 0 0 10px; font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.step p { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.65; }
.step ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.step li { position: relative; padding-left: 18px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.step li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 1.5px; background: var(--pc); }

.p-stage { position: sticky; top: calc(50vh - min(29vw, 330px)); height: fit-content; align-self: start; }
.p-stage-in { position: relative; }
.browser { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: #0d1017; box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .5), 0 0 120px -40px color-mix(in srgb, var(--pc) 45%, transparent); }
.browser-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #11141c; }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2f3d; }
.dots i:nth-child(1) { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.url { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 26px; max-width: 360px; margin: 0 auto; border-radius: 8px; background: rgba(255, 255, 255, .05); font: 500 12px/1 var(--mono); color: var(--text-2); }
.url svg { width: 11px; height: 11px; stroke: #3fe08b; }
.shots { position: relative; aspect-ratio: 16 / 10; background: #0d1017; }
.shots img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transform: scale(1.03); transition: opacity .7s var(--ease), transform 1.2s var(--ease); cursor: zoom-in; }
.shots img.is-on { opacity: 1; transform: none; }
.shots img:not(.is-on) { pointer-events: none; }
.shots.wide { aspect-ratio: 9 / 4; }
.phone {
  position: absolute; right: -4%; bottom: -12%; width: 26%; aspect-ratio: 390 / 844; border-radius: 30px; overflow: hidden;
  border: 6px solid #1a1e2b; background: #000; box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .08);
  transform: translateY(var(--py, 0px)); will-change: transform;
}
.phone.sm { width: 19%; bottom: -20%; right: -3%; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; cursor: zoom-in; }
.stage-caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; font: 500 12.5px/1.4 var(--mono); color: var(--text-3); letter-spacing: .02em; }
.stage-caption b { color: var(--text-2); font-weight: 500; }

.p-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(30px, 4vw, 50px); }
.metric { padding: 22px 22px 20px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.metric b { display: block; font: 600 clamp(24px, 2.4vw, 32px)/1 var(--display); letter-spacing: -.04em; color: color-mix(in srgb, var(--pc) 55%, #fff); }
.metric span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.stack .chip { font-family: var(--mono); font-weight: 500; font-size: 12.5px; }

/* ── Горизонтальная галерея ─────────────────────────────────────────────── */
.hscroll { position: relative; height: 380vh; }
.hscroll-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hscroll-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 40px; }
.hscroll-track { display: flex; gap: 28px; padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); will-change: transform; }
.g-item { flex: none; width: clamp(300px, 46vw, 720px); }
.g-item.tall { width: clamp(150px, 15vw, 240px); }
.g-frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); transition: transform .6s var(--ease); }
.g-item:hover .g-frame { transform: translateY(-6px); }
.g-frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; cursor: zoom-in; }
.g-item.tall .g-frame { border-radius: 26px; border: 5px solid #1a1e2b; }
.g-item.tall .g-frame img { aspect-ratio: 390 / 844; }
.g-cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 14px; color: var(--text-2); }
.g-cap b { color: var(--text); font-weight: 600; }
.g-cap span { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.hscroll-bar { margin-top: 44px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.hscroll-bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--hp, 0)); background: linear-gradient(90deg, var(--a1), var(--a3)); }

/* ── Интеграции (бенто) ─────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bento .card { padding: clamp(24px, 2.6vw, 34px); display: flex; flex-direction: column; }
.b-wide { grid-column: span 4; }
.b-half { grid-column: span 3; }
.b-third { grid-column: span 2; }
.card h3 { margin: 0 0 10px; font: 600 clamp(20px, 2vw, 26px)/1.2 var(--display); letter-spacing: -.03em; }
.card > p, .card .txt { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.6; }
.card .tag { align-self: flex-start; margin-bottom: 18px; }
.list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 15px; color: var(--text-2); line-height: 1.5; }
.list li svg { width: 18px; height: 18px; margin-top: 2px; stroke: var(--a3); }
.list li b { color: var(--text); font-weight: 600; }

/* схема потока Б24 ⇄ Google */
.flow { position: relative; margin-top: 28px; padding: 26px 18px; border-radius: 18px; border: 1px dashed var(--line-2); background: rgba(0, 0, 0, .2); }
.flow-row { display: grid; grid-template-columns: 1fr 60px 1fr 60px 1fr; align-items: center; }
.node { padding: 14px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); text-align: center; }
.node b { display: block; font-size: 14px; font-weight: 700; }
.node span { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.node.n1 { box-shadow: inset 0 0 0 1px rgba(46, 170, 255, .35); }
.node.n2 { box-shadow: inset 0 0 0 1px rgba(176, 124, 255, .45); }
.node.n3 { box-shadow: inset 0 0 0 1px rgba(52, 211, 120, .4); }
.wire { position: relative; height: 26px; }
.wire svg { width: 100%; height: 100%; overflow: visible; }
.wire path { stroke: var(--line-2); stroke-width: 1.5; fill: none; }
.wire .pulse { stroke: url(#gWire); stroke-width: 2; stroke-dasharray: 10 60; animation: dash 1.8s linear infinite; }
.wire .pulse.rev { animation-direction: reverse; }
@keyframes dash { to { stroke-dashoffset: -70; } }
.flow-note { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font: 500 11.5px/1.4 var(--mono); color: var(--text-3); }

/* мини-макет расширения */
.ext { margin-top: 24px; border-radius: 16px; border: 1px solid var(--line-2); background: #f6f7f9; color: #1d2230; overflow: hidden; font-size: 13px; }
.ext-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid #e7e9ef; font-weight: 700; }
.ext-top i { width: 18px; height: 18px; border-radius: 5px; background: #ffdd2d; }
.ext-top small { margin-left: auto; font-weight: 500; color: #7a8193; }
.ext-row { display: grid; grid-template-columns: 30px 1fr auto 30px; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid #eef0f4; }
.ext-row:last-child { border: 0; }
.ext-row .av { width: 30px; height: 30px; border-radius: 50%; background: #e9ecf3; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #5b6275; }
.ext-row .nm { font-weight: 600; } .ext-row .nm small { display: block; font-weight: 500; color: #8a90a0; font-size: 11.5px; }
.ext-row .sum { font-weight: 700; } .ext-row .sum.in { color: #12a150; }
.ext-plus { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #1d2230; color: #fff; font-weight: 700; font-size: 16px; line-height: 1; transition: transform .3s var(--ease), background .3s; }
.ext-row.added .ext-plus { background: #12a150; }
.ext-row.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { background: rgba(18, 161, 80, .16); } 100% { background: transparent; } }

/* ── Инфраструктура ─────────────────────────────────────────────────────── */
.infra { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 70px); align-items: start; }
.diagram { position: sticky; top: 96px; padding: clamp(18px, 2.4vw, 30px); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram text { font-family: var(--font); fill: var(--text); }
.diagram .t-sub { fill: var(--text-3); font-family: var(--mono); font-size: 11px; }
.diagram .box { fill: #121621; stroke: rgba(255, 255, 255, .14); }
.diagram .grp { fill: rgba(255, 255, 255, .015); stroke: rgba(255, 255, 255, .1); stroke-dasharray: 4 6; }
.diagram .ln { stroke: rgba(255, 255, 255, .16); stroke-width: 1.4; fill: none; }
.diagram .ln-a { stroke: url(#gLine); stroke-width: 2; fill: none; stroke-dasharray: 8 46; animation: dash2 2.4s linear infinite; }
@keyframes dash2 { to { stroke-dashoffset: -54; } }
.ops { display: grid; gap: 12px; }
.op { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 22px; }
.op .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(63, 224, 197, .08); border: 1px solid rgba(63, 224, 197, .25); }
.op .ico svg { width: 21px; height: 21px; stroke: var(--a3); }
.op h4 { margin: 0 0 4px; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.op p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }

/* ── Путь (таймлайн) ────────────────────────────────────────────────────── */
.timeline { position: relative; max-width: 920px; margin: 0 auto; }
.tl-line { position: absolute; left: 140px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-line i { position: absolute; inset: 0; transform-origin: 50% 0; transform: scaleY(var(--tp, 0)); background: linear-gradient(var(--a1), var(--a2), var(--a3)); border-radius: 2px; }
.tl-item { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 0 44px; padding: 0 0 46px; }
.tl-date { padding-top: 2px; text-align: right; padding-right: 26px; font: 500 13px/1.4 var(--mono); color: var(--text-3); letter-spacing: .02em; }
.tl-item::before { content: ''; position: absolute; left: 134px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); transition: border-color .5s, box-shadow .5s; }
.tl-item.in::before { border-color: var(--a2); box-shadow: 0 0 0 5px rgba(176, 124, 255, .15); }
.tl-body h4 { margin: 0 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.tl-body p { margin: 0; color: var(--text-2); font-size: 15.5px; }

/* ── Навыки ─────────────────────────────────────────────────────────────── */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skill { padding: 28px; }
.skill h4 { margin: 0 0 6px; font: 600 18px/1.3 var(--display); letter-spacing: -.02em; }
.skill p { margin: 0 0 18px; font-size: 14.5px; color: var(--text-2); }
.skill .stack { margin: 0; }
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.proc { padding: 26px; }
.proc b { display: block; font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: .1em; margin-bottom: 18px; }
.proc h4 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.proc p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.ai-note { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-top: 16px; padding: 24px 28px; }
.ai-note .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(109, 124, 255, .25), rgba(176, 124, 255, .25)); border: 1px solid rgba(176, 124, 255, .35); }
.ai-note .ico svg { width: 24px; height: 24px; stroke: #d9ccff; }
.ai-note p { margin: 0; color: var(--text-2); font-size: 15.5px; }
.ai-note p b { color: var(--text); }

/* ── Контакты ───────────────────────────────────────────────────────────── */
.contact { position: relative; overflow: hidden; text-align: center; padding: clamp(110px, 15vw, 200px) 0; isolation: isolate; }
.contact .blob { opacity: .35; }
.contact-title { margin: 0 auto; max-width: 15ch; font: 600 clamp(40px, 7.4vw, 108px)/1 var(--display); letter-spacing: -.05em; }
.contact-title em { font-style: normal; background: linear-gradient(100deg, var(--a1), var(--a2) 50%, var(--a3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact .lead { margin: 26px auto 0; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 44px; }
.contact-links:empty { display: none; }
.proj-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

.footer { border-top: 1px solid var(--line); padding: 30px 0; font-size: 14px; color: var(--text-3); }
.footer-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ── Лайтбокс ───────────────────────────────────────────────────────────── */
.lb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 4vw; background: rgba(4, 5, 8, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.lb.open { opacity: 1; pointer-events: auto; }
.lb img { max-width: 100%; max-height: 84vh; border-radius: 14px; box-shadow: 0 40px 120px -20px #000; transform: scale(.96); transition: transform .5s var(--ease); }
.lb.open img { transform: none; }
.lb-cap { margin-top: 16px; text-align: center; font-size: 14px; color: var(--text-2); }
.lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); transition: background .25s; }
.lb-btn:hover { background: rgba(255, 255, 255, .12); }
.lb-btn svg { width: 20px; height: 20px; stroke: #fff; }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; margin-top: -25px; }
.lb-next { right: 22px; top: 50%; margin-top: -25px; }

/* ── Адаптив ────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: clamp(300px, 70vw, 520px); margin-top: 20px; }
  .p-body { grid-template-columns: 1fr; }
  .p-stage { position: relative; top: auto; order: -1; margin-bottom: 70px; }
  .p-steps { padding: 0; }
  .step { min-height: 0; opacity: 1; padding: 18px 0 18px 26px; }
  .step::after { height: calc(100% - 60px); }
  .infra, .about-grid { grid-template-columns: 1fr; }
  .diagram { position: relative; top: auto; }
  .b-wide, .b-half { grid-column: span 6; }
  .b-third { grid-column: span 3; }
  .skills { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: block; }
  .header .btn-sm { display: none; }
  body.menu-open .nav {
    display: flex; flex-direction: column; position: fixed; inset: 72px 0 0 0; padding: 30px var(--gutter); gap: 4px; margin: 0;
    background: rgba(7, 8, 12, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  }
  body.menu-open .nav a { font: 600 28px/1.2 var(--display); letter-spacing: -.03em; padding: 14px 0; color: var(--text); background: none; border-bottom: 1px solid var(--line); border-radius: 0; }
  body.menu-open .nav a.is-active::after { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .p-head { grid-template-columns: 1fr; }
  .p-num { font-size: 56px; }
  .p-links { align-items: flex-start; }
  .p-foot { grid-template-columns: 1fr 1fr; }
  .hscroll { height: auto; }
  .hscroll-sticky { position: relative; height: auto; padding: 90px 0; }
  .hscroll-head { flex-direction: column; align-items: flex-start; }
  .hscroll-track { overflow-x: auto; scroll-snap-type: x mandatory; padding-right: var(--gutter); padding-bottom: 10px; transform: none !important; scrollbar-width: none; }
  .hscroll-track::-webkit-scrollbar { display: none; }
  .g-item { width: 82vw; scroll-snap-align: center; }
  .g-item.tall { width: 46vw; }
  .hscroll-bar { display: none; }
  .tl-line { left: 6px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 36px; }
  .tl-item::before { left: 0; }
  .tl-date { text-align: left; padding: 0 0 6px; }
  .flow-row { grid-template-columns: 1fr; gap: 0; }
  .wire { height: 34px; transform: rotate(90deg); width: 34px; margin: 0 auto; }
  .flow-note { flex-direction: column; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 110px; }
  .hv-tag { display: none; }
  .stat { padding: 20px 18px; }
  .b-third { grid-column: span 6; }
  .skills, .process { grid-template-columns: 1fr; }
  .p-foot { grid-template-columns: 1fr 1fr; }
  .metric { padding: 18px; }
  .phone { width: 30%; right: -2%; bottom: -14%; border-width: 4px; border-radius: 20px; }
  .stage-caption { flex-direction: column; gap: 4px; }
  .lb-prev, .lb-next { top: auto; bottom: 22px; margin: 0; }
  .ai-note { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal], .split .w > span, .hero-title .line > span, .fade-up { opacity: 1 !important; transform: none !important; }
  .grain { display: none; }
}
