:root {
  --bg: #0a0b0f;
  --bg-alt: #0f1117;
  --card: #14161f;
  --card-hover: #181b26;
  --line: #232634;
  --text: #eef0f5;
  --muted: #9aa0b0;
  --brand: #6c5cff;
  --brand-2: #00d4ff;
  --radius: 18px;
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 15px;
  cursor: pointer; border: none; transition: transform .2s, box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 8px 30px rgba(108, 92, 255, .35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(108, 92, 255, .5); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--card); border-color: var(--brand); }
.btn--full { width: 100%; }

/* Шапка */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 11, 15, .8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-size: 18px;
}
.logo__text span { color: var(--brand-2); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav__cta {
  color: #fff !important; background: var(--card); border: 1px solid var(--line);
  padding: 9px 18px; border-radius: 999px;
}
.nav__cta:hover { border-color: var(--brand); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* Hero */
.hero { position: relative; padding: 160px 0 90px; text-align: center; overflow: hidden; }
.hero__glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px; pointer-events: none;
  background: radial-gradient(circle, rgba(108,92,255,.28), transparent 60%);
  filter: blur(20px);
}
.hero__inner { position: relative; z-index: 1; }
.hero__badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); margin-bottom: 28px; font-weight: 600;
}
.hero__badge::first-letter { color: #28d17c; }
.hero__title { font-size: clamp(36px, 6vw, 68px); line-height: 1.05; font-weight: 800; letter-spacing: -1.5px; }
.grad { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__sub { max-width: 620px; margin: 26px auto 0; color: var(--muted); font-size: 18px; }
.hero__actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 60px; justify-content: center; margin-top: 70px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-size: 44px; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { color: var(--muted); font-size: 14px; }

/* Секции */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.eyebrow { color: var(--brand-2); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.section__title { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -1px; margin-top: 12px; }
.section__lead { color: var(--muted); margin-top: 16px; font-size: 17px; }

/* Услуги */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; transition: transform .25s, border-color .25s, background .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--brand); background: var(--card-hover); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(108,92,255,.2), rgba(0,212,255,.2));
  color: var(--brand-2);
}
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* Портфолио */
.portfolio { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.portfolio .work { grid-column: span 2; }
/* центрируем нижнюю пару под тремя верхними */
.portfolio .work:nth-child(4) { grid-column: 2 / span 2; }
.portfolio .work:nth-child(5) { grid-column: 4 / span 2; }
.work {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, border-color .25s;
}
.work:hover { transform: translateY(-6px); border-color: var(--brand); }
.work__img { aspect-ratio: 16 / 11; overflow: hidden; background: var(--bg-alt); }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.work:hover .work__img img { transform: scale(1.05); }
.work__meta { padding: 20px 22px 24px; }
.work__tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--brand-2); text-transform: uppercase; letter-spacing: .5px; }
.work__meta h3 { font-size: 18px; margin-top: 8px; }

/* Процесс */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; position: relative; transition: transform .25s, border-color .25s, background .25s, box-shadow .25s; }
.step:hover { transform: translateY(-6px); border-color: var(--brand); background: var(--card-hover); box-shadow: 0 14px 40px rgba(108, 92, 255, .18); }
.step:hover .step__num { color: var(--brand); }
.step__num { font-size: 40px; font-weight: 800; color: rgba(108,92,255,.35); }
.step h3 { font-size: 19px; margin: 8px 0 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* О нас */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.about__text .section__title { margin-bottom: 20px; }
.about__text p { color: var(--muted); margin-bottom: 16px; font-size: 17px; }
.about__text .btn { margin-top: 14px; }
.about__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.mini__num { font-size: 38px; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mini span:last-child { color: var(--muted); font-size: 14px; }

/* CTA */
.cta { padding-bottom: 120px; }
.cta__box {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 28px; padding: 60px; text-align: center; overflow: hidden;
  max-width: 720px; margin: 0 auto;
}
.cta__glow { position: absolute; top: -150px; left: 50%; transform: translateX(-50%); width: 500px; height: 400px; background: radial-gradient(circle, rgba(108,92,255,.25), transparent 60%); pointer-events: none; }
.cta__box h2 { position: relative; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -1px; }
.cta__box > p { position: relative; color: var(--muted); margin-top: 14px; font-size: 17px; }
.contacts { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 38px auto 0; max-width: 560px; }
.contact {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 26px 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.contact:hover { transform: translateY(-5px); border-color: var(--brand); box-shadow: 0 14px 36px rgba(108, 92, 255, .2); }
.contact__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: #fff;
}
.contact--tg .contact__icon { background: linear-gradient(135deg, #2aabee, #229ed9); }
.contact--wa .contact__icon { background: linear-gradient(135deg, #25d366, #128c7e); }
.contact--mail .contact__icon { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.contact__body { display: flex; flex-direction: column; gap: 2px; }
.contact__label { font-size: 13px; color: var(--muted); }
.contact__value { font-weight: 700; font-size: 15px; word-break: break-word; }
.cta__note { position: relative; color: var(--muted); font-size: 14px; margin-top: 28px; }

/* Футер */
.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer__copy { color: var(--muted); font-size: 14px; }

/* Анимация появления */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* Адаптив */
@media (max-width: 900px) {
  .services, .portfolio, .steps { grid-template-columns: repeat(2, 1fr); }
  .portfolio .work,
  .portfolio .work:nth-child(4),
  .portfolio .work:nth-child(5) { grid-column: auto; }
  .about { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--line);
    padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height .35s, padding .35s;
  }
  .nav.open { max-height: 400px; padding: 16px 24px 24px; }
  .nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__cta { text-align: center; margin-top: 10px; border-bottom: none !important; }
  .burger { display: flex; }
  .hero__stats { gap: 36px; }
  .cta__box { padding: 40px 24px; }
}
@media (max-width: 540px) {
  .services, .portfolio, .steps { grid-template-columns: 1fr; }
  .about__cards { grid-template-columns: 1fr 1fr; }
}
