:root {
  --brand: #f4f4f5;
  --dark: #0e1016;
  --bg: #14161c;
  --surface: #1c1f28;
  --line: #2e3340;
  --muted: #9aa0ad;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: #f0f1f3;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

/* Мобильное меню в стиле приложения */
.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.35rem;
  border: 0;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}
.nav-burger-lines {
  display: flex;
  width: 1.15rem;
  flex-direction: column;
  gap: 0.28rem;
}
.nav-burger-lines span {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
body.nav-open .nav-burger-lines span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
body.nav-open .nav-burger-lines span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-burger-lines span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-app-nav {
  position: fixed;
  inset: 0;
  z-index: 80;
  background:
    radial-gradient(ellipse 70% 40% at 80% 0%, rgba(255,255,255,0.06), transparent 55%),
    #0e1016;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
.mobile-app-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-app-nav[hidden] {
  display: block !important;
}
.mobile-app-nav-inner {
  display: flex;
  height: 100%;
  min-height: 100dvh;
  flex-direction: column;
  padding:
    max(0.85rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  transform: translateY(12px);
  transition: transform 0.28s ease;
}
.mobile-app-nav.is-open .mobile-app-nav-inner {
  transform: translateY(0);
}
.mobile-app-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-app-nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.mobile-app-nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-app-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.35rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #f4f4f5;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}
.mobile-app-nav-list a:active {
  background: rgba(255, 255, 255, 0.08);
}
.mobile-app-nav-list .chev {
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.35rem;
  font-weight: 400;
}
.mobile-app-nav-foot {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-app-nav-cta {
  width: 100%;
  min-height: 3.25rem;
  border-radius: 1rem;
  font-size: 0.8125rem;
}
.mobile-app-nav-phone {
  display: block;
  margin-top: 0.9rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.mobile-app-nav-messengers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.mobile-app-nav-messengers a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}

@media (min-width: 768px) {
  .mobile-app-nav {
    display: none !important;
  }
}

.mesh-hero,
.bw-hero {
  background:
    radial-gradient(ellipse 50% 40% at 70% 45%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(255,255,255,0.025), transparent 55%),
    #14161c;
}

.constellation {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.28) 1px, transparent 1.5px),
    radial-gradient(circle at 60% 20%, rgba(255,255,255,0.2) 1px, transparent 1.5px),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,0.24) 1px, transparent 1.5px),
    radial-gradient(circle at 35% 75%, rgba(255,255,255,0.16) 1px, transparent 1.5px),
    radial-gradient(circle at 75% 35%, rgba(255,255,255,0.18) 1px, transparent 1.5px),
    linear-gradient(135deg, transparent 48%, rgba(255,255,255,0.04) 49.5%, transparent 51%),
    linear-gradient(200deg, transparent 45%, rgba(255,255,255,0.03) 49%, transparent 53%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 180px 180px, 220px 220px;
}

.grain { position: relative; }
.grain::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.25rem;
  background: #f4f4f5;
  color: #0e1016;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.4rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  border: 1px solid rgba(255,255,255,0.28);
  color: #f0f1f3;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.85rem 1.4rem;
  transition: background 0.2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.laptop-frame {
  position: relative;
  width: min(100%, 560px);
  margin-inline: auto;
  aspect-ratio: 16 / 10;
  border: 2px solid #3a4050;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, #242833, #14161c);
  box-shadow: 0 30px 80px rgba(8, 10, 16, 0.45);
  overflow: hidden;
}
.laptop-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 70%;
  height: 10px;
  border-radius: 0 0 8px 8px;
  background: #2a2f3a;
}
.laptop-screen {
  position: absolute;
  inset: 10px 10px 18px;
  border-radius: 6px;
  background: #0e1016;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem;
}
.tech-pill {
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0f1f3;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up 0.7s ease-out both; }
.animate-delay-1 { animation-delay: 0.12s; }
.animate-delay-2 { animation-delay: 0.24s; }
.animate-delay-3 { animation-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .animate-fade-up { animation: none; }
  html { scroll-behavior: auto; }
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.calc-range {
  -webkit-appearance: none;
  appearance: none;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #f4f4f5 0%,
    #f4f4f5 var(--progress, 10%),
    #2e3340 var(--progress, 10%),
    #2e3340 100%
  );
  outline: none;
}
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #f4f4f5;
  border: 2px solid #0e1016;
  cursor: pointer;
  box-shadow: 0 0 0 1px #f4f4f5;
}
.calc-range::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #f4f4f5;
  border: 2px solid #0e1016;
  cursor: pointer;
}

.field {
  width: 100%;
  border-radius: 0.35rem;
  border: 1px solid #2e3340;
  background: #161922;
  color: #f0f1f3;
  padding: 0.75rem 1rem;
  outline: none;
}
.field:focus {
  border-color: #c8ccd6;
}
.field::placeholder { color: #6f7585; }

.section-rule {
  border-top: 1px solid rgba(255,255,255,0.28);
}

/* Скрытый honeypot от спам-ботов */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Виджет чата */
.chat-widget {
  position: fixed;
  right: max(0.9rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  pointer-events: none;
}
.chat-widget > * {
  pointer-events: auto;
}
.chat-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: #f4f4f5;
  color: #0e1016;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.chat-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
}
.chat-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.chat-toggle-icon {
  display: inline-flex;
  color: #0e1016;
}
.chat-toggle-dot {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 2px #f4f4f5;
}
.chat-widget[data-open="true"] .chat-toggle-dot {
  display: none;
}
.chat-panel {
  width: min(20.5rem, calc(100vw - 1.8rem));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: #1c1f28;
  color: #f0f1f3;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  padding: 1rem 1rem 1.05rem;
  transform-origin: bottom right;
  animation: chat-panel-in 0.22s ease;
}
.chat-panel[hidden] {
  display: none !important;
}
@keyframes chat-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.chat-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.chat-panel-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.chat-panel-title {
  margin: 0.3rem 0 0;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}
.chat-close {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.chat-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.chat-panel-text {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
}
.chat-panel-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}
.chat-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.55rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.chat-action:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.chat-action-wa {
  background: #25d366;
  color: #062814;
}
.chat-action-tg {
  background: #2aabee;
  color: #041018;
}

@media (max-width: 640px) {
  .chat-widget {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
  .chat-toggle-label {
    display: none;
  }
  .chat-toggle {
    width: 3.15rem;
    height: 3.15rem;
    min-height: 3.15rem;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
  }
  .chat-toggle-dot {
    top: 0.45rem;
    right: 0.45rem;
  }
  .chat-panel {
    width: min(19.5rem, calc(100vw - 1.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-panel,
  .chat-toggle {
    animation: none;
    transition: none;
  }
}

/* Наши клиенты — бесконечная лента */
.partners-section {
  overflow: hidden;
}
.partners-marquee {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partners-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  align-items: center;
  padding: 0.5rem 0;
  animation: partners-scroll 42s linear infinite;
  will-change: transform;
}
.partners-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 9.5rem;
  height: 4.25rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
}
.partners-item img {
  max-width: 100%;
  max-height: 2.6rem;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.15) contrast(0.95);
  opacity: 0.72;
  transition: filter 0.25s ease, opacity 0.25s ease;
  user-select: none;
  pointer-events: none;
}

/* Цвет только на десктопе при наведении */
@media (hover: hover) and (min-width: 768px) {
  .partners-item:hover img {
    filter: none;
    opacity: 1;
  }
}

@media (max-width: 767px) {
  .partners-track {
    gap: 1.25rem;
    animation-duration: 32s;
  }
  .partners-item {
    width: 7.5rem;
    height: 3.6rem;
    padding: 0.45rem 0.65rem;
  }
  .partners-item img {
    max-height: 2.1rem;
    filter: grayscale(1) brightness(1.15);
    opacity: 0.7;
  }
}

@keyframes partners-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .partners-track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    justify-content: center;
    padding-inline: 1rem;
  }
  .partners-marquee {
    width: 100%;
    margin-left: 0;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .partners-item[aria-hidden="true"] {
    display: none;
  }
}
