:root {
  --bg: #060b24;
  --bg-2: #0a1233;
  --surface: #0e1840;
  --line: rgba(130, 160, 255, .16);
  --line-2: rgba(130, 160, 255, .3);
  --text: #eef2ff;
  --muted: #9ba8d1;
  --accent: #2f8cff;
  --accent-2: #86c8ff;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 11, 36, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #1648c9);
  font-size: 14px; font-weight: 800; letter-spacing: -.04em;
}
.menu { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--muted); }
.menu a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font: inherit; font-weight: 700; font-size: 16px;
  border: 1px solid transparent;
  transition: background .2s, transform .2s, border-color .2s;
}
.btn:hover { background: #4a9dff; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { background: rgba(130, 160, 255, .1); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 14px; border-radius: 12px; }

/* Первый экран */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(760px 460px at 88% 8%, rgba(47, 140, 255, .34), transparent 68%),
    radial-gradient(520px 380px at 4% 100%, rgba(60, 60, 220, .22), transparent 70%),
    linear-gradient(180deg, #080f2e, var(--bg));
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse at 60% 30%, #000 10%, transparent 72%);
  opacity: .55;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: 84px; padding-bottom: 96px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent-2);
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
h1 {
  font-size: clamp(38px, 5.5vw, 66px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 20px 0 22px;
}
h1 em { font-style: normal; color: var(--accent-2); }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 520px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip {
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(130, 160, 255, .07);
  font-size: 14px; font-weight: 600;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.collage { position: relative; padding: 0 0 46px 0; }
.collage .browser { transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); transform-origin: left center; }
.collage .phone {
  position: absolute; right: -6px; bottom: 0;
  width: 31%;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
}

/* Рамки */
.browser {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  background: #0b1230;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(155, 168, 209, .38); }
.browser-bar span {
  margin-left: 10px; padding: 2px 12px;
  border-radius: 6px;
  background: rgba(130, 160, 255, .1);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.phone {
  border: 7px solid #131d48;
  outline: 1px solid var(--line-2);
  border-radius: 30px;
  overflow: hidden;
  background: #0b1230;
  aspect-ratio: 390 / 844;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Секции */
section { padding: 96px 0; }
section.flush { padding-top: 0; }
.sec-head { max-width: 720px; margin-bottom: 52px; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; margin: 16px 0 14px; }
.sec-head p { color: var(--muted); }

/* Проекты */
.case {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 52px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(14, 24, 64, .9), rgba(8, 14, 42, .9));
}
.case + .case { margin-top: 28px; }
.case.flip .case-media { order: 2; }
.case-media { position: relative; min-width: 0; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 12px; }
.with-phones { padding: 0 9% 40px 0; }
.with-phones .phone { position: absolute; bottom: 0; width: 23%; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.with-phones .phone.a { right: 19%; }
.with-phones .phone.b { right: 0; bottom: 22px; }

.case-num { color: var(--accent-2); font-size: 14px; font-weight: 700; letter-spacing: .14em; }
.case-kind {
  display: inline-block; margin-left: 12px; padding: 4px 12px;
  border-radius: 999px;
  background: rgba(47, 140, 255, .16);
  color: var(--accent-2);
  font-size: 13px; font-weight: 600;
}
.case h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 12px; }
.case-text > p { color: var(--muted); }
.done { margin-top: 20px; display: grid; gap: 10px; }
.done li { position: relative; padding-left: 30px; font-size: 16px; }
.done li::before {
  content: '';
  position: absolute; left: 0; top: 5px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(47, 140, 255, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6L13 6.4' fill='none' stroke='%2386c8ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.stack span { padding: 4px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* Макет чата бота */
.chat-wrap { display: grid; justify-items: center; gap: 12px; }
.chat {
  width: min(330px, 100%);
  border: 7px solid #131d48;
  outline: 1px solid var(--line-2);
  border-radius: 30px;
  overflow: hidden;
  background: #0a1130;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}
.chat-top { display: flex; align-items: center; gap: 11px; padding: 14px 16px; background: #101a44; border-bottom: 1px solid var(--line); }
.chat-ava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #37b6ff, #2f6bff); font-weight: 800; font-size: 15px; }
.chat-top b { display: block; font-size: 15px; line-height: 1.2; }
.chat-top small { color: var(--accent-2); font-size: 12px; }
.chat-body { display: grid; gap: 9px; padding: 16px 13px 18px; font-size: 14px; line-height: 1.42; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 15px; }
.msg.me { justify-self: end; background: var(--accent); border-bottom-right-radius: 5px; }
.msg.bot { background: #16224f; border-bottom-left-radius: 5px; }
.msg.bot b { color: var(--accent-2); }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 86%; }
.keys span { padding: 8px 6px; border-radius: 10px; background: rgba(130, 160, 255, .13); border: 1px solid var(--line); text-align: center; font-weight: 600; }
.keys span.ok { background: rgba(60, 200, 130, .2); border-color: rgba(60, 200, 130, .5); }
.note { color: var(--muted); font-size: 13px; }

/* Услуги */
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card svg { width: 30px; height: 30px; color: var(--accent-2); margin-bottom: 18px; }
.card h3 { font-size: 19px; font-weight: 700; line-height: 1.25; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* Этапы */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding-top: 26px; border-top: 2px solid var(--line-2); counter-increment: step; }
.step::before {
  content: '0' counter(step);
  display: block;
  color: var(--accent-2);
  font-size: 14px; font-weight: 700; letter-spacing: .14em;
  margin-bottom: 12px;
}
.step h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* Финал */
.cta {
  text-align: center;
  padding: 64px 28px;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  background:
    radial-gradient(520px 260px at 50% 0%, rgba(47, 140, 255, .34), transparent 70%),
    var(--surface);
}
.cta h2 { margin-top: 0; }
.cta p { color: var(--muted); max-width: 560px; margin: 0 auto; }
footer { padding: 30px 0 46px; color: var(--muted); font-size: 14px; text-align: center; }

/* Появление при прокрутке */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; padding-top: 56px; padding-bottom: 64px; }
  .collage .browser { transform: none; }
  .case { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
  .case.flip .case-media { order: 0; }
  .grid4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section { padding: 72px 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .menu a:not(.btn) { display: none; }
  .brand { font-size: 14px; gap: 10px; white-space: nowrap; }
  .btn.small { white-space: nowrap; padding: 0 14px; }
  .case { padding: 20px; border-radius: 22px; }
  .grid4, .steps { grid-template-columns: 1fr; }
  .steps { gap: 26px; }
  .hero-actions .btn, .case-links .btn { width: 100%; }
  .cta { padding: 44px 20px; }
  section { padding: 58px 0; }
  .sec-head { margin-bottom: 34px; }
}
