:root {
  --bg: #0a0a0f;
  --bg-soft: #12121b;
  --card: #15151f;
  --card-border: #24243200;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8e8f0;
  --muted: #9a9ab0;
  --accent: #7c5cff;
  --accent-2: #00e5ff;
  --accent-3: #ff4d8a;
  --glow: rgba(124, 92, 255, 0.45);
  --radius: 18px;
  --maxw: 1080px;
}

* { 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;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- фоновые эффекты ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 0%, black, transparent 70%);
  z-index: -2;
  opacity: 0.5;
}
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}
.bg-glow--1 {
  width: 520px; height: 520px;
  background: var(--accent);
  top: -160px; left: -120px;
}
.bg-glow--2 {
  width: 460px; height: 460px;
  background: var(--accent-2);
  top: 30%; right: -160px;
}

/* ---------- навигация ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(10px);
}
.nav__logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -1px;
}
.nav__logo span { color: var(--accent-2); }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

/* ---------- общие секции ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 80px 0 20px; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}
.section__num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-2);
  font-size: 15px;
  font-weight: 600;
}
.section__title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -1px;
}

/* ---------- герой ---------- */
.hero { padding: 70px 0 30px; text-align: center; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 26px;
}
.hero__badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2ee6a0;
  box-shadow: 0 0 10px #2ee6a0;
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero__title {
  font-size: clamp(40px, 8vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -2.5px;
  margin-bottom: 16px;
}
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__role {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero__bio {
  max-width: 600px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 17px;
}
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 44px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.25s;
}
.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 30px var(--glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px var(--glow); }
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

.stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
}
.stack li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s;
}
.stack li:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- обо мне ---------- */
.about {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.about p { color: var(--muted); font-size: 17px; }
.about__facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.about__facts li {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 15px;
  color: var(--muted);
}
.about__facts b { color: var(--text); font-weight: 800; }

/* ---------- проекты ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card__body { text-align: left; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 92, 255, 0.25);
}
.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 0%, #1d1d2e, #0c0c14 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}
.card__media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.card__placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}
.card__media.is-empty img { display: none; }
.card__media.is-empty .card__placeholder { display: flex; }

.card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__tagrow { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--line);
}
.tag--accent {
  background: rgba(124, 92, 255, 0.15);
  color: #b6a6ff;
  border-color: rgba(124, 92, 255, 0.4);
}
.card__title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.card__desc { color: var(--muted); font-size: 15px; }
.card__why { color: var(--muted); font-size: 14px; }
.card__why b, .card__desc b { color: var(--text); }
.card code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-2);
  padding: 1px 6px;
  border-radius: 5px;
}
.card__links { display: flex; gap: 18px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s;
}
.link:hover { opacity: 0.7; }

/* ---------- лендинги (галерея) ---------- */
.section__lead { text-align: center; color: var(--muted); font-size: 16px; margin: -20px 0 28px; }

.gallery { position: relative; }
.gallery__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.gallery__track::-webkit-scrollbar { height: 8px; }
.gallery__track::-webkit-scrollbar-thumb { background: rgba(124, 92, 255, 0.5); border-radius: 10px; }
.gallery__track::-webkit-scrollbar-track { background: transparent; }

.landing {
  flex: 0 0 340px;
  max-width: 340px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.landing:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 255, 0.2);
}
.landing__media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1a1a28, #0e0e16);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.landing__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 4s ease;
}
.landing:hover .landing__media img { transform: translateY(calc(-100% + 212px)); }
.landing__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}
.landing__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.landing__title { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; }
.landing__desc { color: var(--muted); font-size: 14px; }
.landing__link { color: var(--accent-2); font-weight: 600; font-size: 14px; margin-top: 4px; }

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 20, 30, 0.85);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.gallery__nav:hover { border-color: var(--accent-2); color: var(--accent-2); }
.gallery__nav--prev { left: -8px; }
.gallery__nav--next { right: -8px; }
@media (max-width: 760px) {
  .gallery__nav { display: none; }
  .landing { flex-basis: 80vw; max-width: 80vw; }
}

/* ---------- услуги ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}
.svc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.svc:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.svc__icon {
  font-size: 30px;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.svc__title { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.svc__desc { color: var(--muted); font-size: 15px; flex: 1; }
.svc__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.svc__price {
  font-weight: 800; font-size: 15px;
  color: #b6a6ff;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.4);
  border-radius: 8px; padding: 5px 12px;
}
.svc__term {
  font-size: 14px; color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 12px;
}
.svc__cta {
  margin-top: 6px;
  color: var(--accent-2); text-decoration: none;
  font-weight: 700; font-size: 14px;
  transition: opacity 0.2s;
}
.svc__cta:hover { opacity: 0.7; }

/* ---------- отзывы ---------- */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto;
}
.review {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.review__text {
  color: var(--text); font-size: 15px; line-height: 1.6;
  margin: 0; flex: 1;
}
.review__text::before { content: "“"; color: var(--accent); font-size: 28px; font-weight: 800; margin-right: 2px; }
.review__who { display: flex; align-items: center; gap: 12px; }
.review__avatar {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 800; font-size: 18px; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.review__id { display: flex; flex-direction: column; }
.review__id b { font-size: 15px; }
.review__id i { font-style: normal; font-size: 13px; color: var(--muted); }

/* ---------- контакты + форма заявки ---------- */
.contact__lead { color: var(--muted); font-size: 18px; margin-bottom: 24px; text-align: center; }
.contact-wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  align-items: start;
}
.lead {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.lead__title { font-size: 20px; font-weight: 800; }
.lead__sub { color: var(--muted); font-size: 14px; margin-top: -4px; margin-bottom: 4px; }
.lead__input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.lead__input:focus { outline: none; border-color: var(--accent); }
textarea.lead__input { resize: vertical; min-height: 96px; }
.lead__btn { justify-content: center; margin-top: 4px; border: none; cursor: pointer; }
.lead__status { font-size: 14px; min-height: 18px; }
.lead__status.ok { color: #2ee6a0; }
.lead__status.err { color: var(--accent-3); }
.contact-side { display: flex; flex-direction: column; gap: 12px; }
.contact-side__lbl { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.contact-side .socials { justify-content: flex-start; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}
.social:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.15);
}
.social__ico { font-size: 18px; }

/* ---------- анимированный фон ---------- */
.bg-glow--1 { animation: floatGlow1 16s ease-in-out infinite; }
.bg-glow--2 { animation: floatGlow2 20s ease-in-out infinite; }
@keyframes floatGlow1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(80px, 60px) scale(1.18); opacity: 0.65; }
}
@keyframes floatGlow2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(-90px, 40px) scale(1.22); opacity: 0.62; }
}

/* ---------- печатающаяся роль ---------- */
.hero__typed {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text);
  font-weight: 600;
  margin-top: -8px;
  margin-bottom: 4px;
}
.typed { color: var(--accent-2); }
.typed-caret {
  display: inline-block;
  color: var(--accent-2);
  font-weight: 400;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- бегущая строка ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 16px 0;
  margin: 10px 0 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: inline-flex; align-items: center; gap: 0; animation: marquee 28s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.5px;
  padding: 0 22px;
  color: var(--text);
}
.marquee__sep { color: var(--accent); font-size: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- цифры (count-up) ---------- */
.statsband { max-width: var(--maxw); margin: 0 auto; padding: 50px 24px; }
.statsband__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: linear-gradient(135deg, rgba(124,92,255,0.12), rgba(0,229,255,0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 24px;
}
.statnum { text-align: center; }
.statnum__v {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.statnum__l { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- калькулятор ---------- */
.calc {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
}
.calc__panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.calc__label {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin-bottom: 12px;
}
.calc__label:not(:first-child) { margin-top: 24px; }
.calc__types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc__chip {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.calc__chip:hover { border-color: var(--accent-2); }
.calc__chip.on {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.18);
  color: #c7b9ff;
}
.calc__options { display: flex; flex-direction: column; gap: 8px; }
.calc__opt {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.18s;
}
.calc__opt:hover { border-color: var(--accent-2); }
.calc__opt.on { border-color: var(--accent); background: rgba(124, 92, 255, 0.12); }
.calc__opt .box {
  width: 20px; height: 20px; flex: 0 0 20px;
  border: 1px solid var(--line); border-radius: 6px;
  display: grid; place-items: center; font-size: 13px; color: transparent;
}
.calc__opt.on .box { background: var(--accent); border-color: var(--accent); color: #fff; }
.calc__opt .add { margin-left: auto; color: var(--muted); font-size: 13px; }
.calc__result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex; flex-direction: column; gap: 8px;
  align-self: start;
  position: sticky; top: 90px;
}
.calc__rlabel { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.calc__price {
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.calc__term { color: var(--muted); font-size: 15px; }
.calc__cta { justify-content: center; margin-top: 10px; border: none; cursor: pointer; }
.calc__note { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- FAQ (аккордеон) ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.faq__item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq__item.open { border-color: rgba(124, 92, 255, 0.5); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.faq__icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent-2);
  transition: transform 0.3s, background 0.2s;
}
.faq__item.open .faq__icon { transform: rotate(45deg); background: rgba(124, 92, 255, 0.18); }
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq__a-inner {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- плавающая кнопка Telegram ---------- */
.tg-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; text-decoration: none;
  font-weight: 700; font-size: 15px;
  padding: 13px 20px;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.45);
  animation: tgPop 0.5s ease both 1s;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tg-float:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 16px 40px rgba(124, 92, 255, 0.55); }
.tg-float__ico { font-size: 18px; }
@keyframes tgPop { from { transform: translateY(30px) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- ИИ-чат ---------- */
.ai-chat { position: fixed; left: 22px; bottom: 22px; z-index: 91; }
.ai-chat__fab {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; border: none; cursor: pointer;
  font-weight: 700; font-size: 15px; font-family: inherit;
  padding: 13px 20px; border-radius: 100px;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.45);
  animation: tgPop 0.5s ease both 1.2s;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.ai-chat__fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 16px 40px rgba(124, 92, 255, 0.55); }
.ai-chat__fab-ico { font-size: 18px; }
.ai-chat.open .ai-chat__fab { opacity: 0; pointer-events: none; transform: scale(0.85); }

.ai-chat__panel {
  position: absolute; left: 0; bottom: 0;
  width: min(360px, 88vw);
  max-height: 520px;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transform-origin: bottom left;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.ai-chat.open .ai-chat__panel { opacity: 1; transform: none; pointer-events: auto; }

.ai-chat__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: 14px;
}
.ai-chat__head-title { display: inline-flex; align-items: center; gap: 8px; }
.ai-chat__dot { width: 8px; height: 8px; border-radius: 50%; background: #2ee6a0; box-shadow: 0 0 8px #2ee6a0; }
.ai-chat__close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 16px; width: 28px; height: 28px; border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.ai-chat__close:hover { color: var(--text); background: var(--bg-soft); }

.ai-chat__body {
  flex: 1; overflow-y: auto; min-height: 160px; max-height: 340px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.ai-chat__msg {
  max-width: 88%; padding: 10px 13px; border-radius: 13px;
  font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.ai-chat__msg--bot { align-self: flex-start; background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-chat__msg--user { align-self: flex-end; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; border-bottom-right-radius: 4px; }
.ai-chat__msg--err { align-self: flex-start; background: rgba(255, 77, 138, 0.12); border: 1px solid rgba(255, 77, 138, 0.35); color: #ffb3cb; }

.ai-chat__typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 13px; border-bottom-left-radius: 4px; }
.ai-chat__typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: aiTyping 1.1s infinite; }
.ai-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTyping { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.ai-chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ai-chat__input {
  flex: 1; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.ai-chat__input:focus { outline: none; border-color: var(--accent); }
.ai-chat__send {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; font-size: 15px;
  display: grid; place-items: center; transition: transform 0.15s;
}
.ai-chat__send:hover { transform: scale(1.06); }
.ai-chat__send:disabled { opacity: 0.5; cursor: default; transform: none; }

@media (max-width: 620px) {
  .ai-chat { left: 12px; bottom: 12px; }
  .ai-chat__fab-txt { display: none; }
  .ai-chat__fab { padding: 14px; }
  .ai-chat__panel { width: 92vw; }
}

/* ---------- футер ---------- */
.footer {
  max-width: var(--maxw);
  margin: 60px auto 0;
  padding: 30px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- адаптив ---------- */
@media (max-width: 920px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
  .statsband__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .calc__types { grid-template-columns: 1fr; }
  .tg-float__txt { display: none; }
  .tg-float { padding: 14px; }
  .nav__links { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
  .nav__links a { font-size: 14px; }
  .projects { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .about__facts { grid-template-columns: 1fr; }
}

/* появление при скролле */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
