*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  background-color: #08090c;
  background-image:
    linear-gradient(165deg, #0b0d11 0%, #090a0e 45%, #060708 100%),
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(59, 130, 246, 0.1) 0%, transparent 45%),
    radial-gradient(ellipse 50% 50% at 50% 95%, rgba(34, 211, 238, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Нейтральный фон: мелкие «частицы» (точки), без цветных пятен и без сетки-квадратов */
body::before {
  content: '';
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.75;
  background-image: radial-gradient(
    circle at center,
    rgba(98, 243, 255, 0.5) 1.5px,
    transparent 1.5px
  );
  background-size: 48px 48px;
  animation: bgParticleFloat 25s linear infinite;
}

body::after {
  content: '';
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
  background-image: radial-gradient(
    circle at center,
    rgba(139, 92, 246, 0.45) 1.2px,
    transparent 1.2px
  );
  background-size: 72px 72px;
  background-position: 36px 36px;
  animation: bgParticleFloat2 30s linear infinite reverse;
}

/* Лёгкое затемнение по краям — глубина без цветного неона */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    ellipse 130% 100% at 50% 0%,
    transparent 0%,
    rgba(0, 0, 0, 0.5) 65%,
    rgba(0, 0, 0, 0.75) 100%
  );
  animation: vignettePulse 6s ease-in-out infinite;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Логотип бренда: фиксированный слот в шапке и футере */
.logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 0;
  height: auto;
  transition: color var(--transition-fast);
}

.brand-name {
  font-size: 1.06rem;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo-slot {
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.logo-empty {
  opacity: 1;
  border: 1px dashed rgba(98, 243, 255, 0.45);
  background-color: rgba(98, 243, 255, 0.12);
}

.logo-loaded {
  opacity: 1;
  border: 1px solid transparent;
  background-color: transparent;
}

.logo:hover {
  color: var(--primary);
}

.has-webgrid .web-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(98, 243, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 243, 255, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 0%, transparent 70%);
  animation: webGridPulse 12s ease-in-out infinite;
}

@keyframes bgParticleFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(25px, -35px) rotate(90deg); }
  50% { transform: translate(-15px, -60px) rotate(180deg); }
  75% { transform: translate(-40px, -25px) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes bgParticleFloat2 {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-30px, -45px) rotate(120deg); }
  66% { transform: translate(40px, -20px) rotate(240deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes vignettePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes webGridPulse {
  0%,
  100% {
    opacity: 0.05;
  }
  50% {
    opacity: 0.08;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

input,
textarea,
button {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(98, 243, 255, 0.85);
  outline-offset: 4px;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background-color var(--transition-base);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #041019;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 12px 40px rgba(28, 227, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 16px 50px rgba(28, 227, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
  border-color: var(--surface-border-strong);
  background: var(--surface-strong);
}

.btn-lg {
  min-height: 64px;
  padding: 0 36px;
  font-size: 1.1rem;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Shimmer effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.shimmer:hover::before {
  left: 100%;
}

/* Spinner */
.spinner {
  animation: spin 1s linear infinite;
  width: 20px;
  height: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.section-title,
.hero-title,
.modal-title,
.service-title,
.about-card-title {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(98, 243, 255, 0.08);
  border: 1px solid rgba(98, 243, 255, 0.2);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-subtitle,
.hero-subtitle,
.modal-subtitle,
.service-desc,
.about-card-text,
.review-text {
  color: var(--text-muted);
  max-width: 600px;
}

.section-header .section-subtitle {
  margin: 16px auto 0;
}

.fade-in {
  opacity: 0;
  transition: opacity 1.2s ease-out;
  will-change: opacity;
}

.fade-in.visible {
  opacity: 1;
}

.fade-in-left {
  /* Kept as compatibility marker; pure fade has no directional shift. */
}

.fade-in-right {
  /* Kept as compatibility marker; pure fade has no directional shift. */
}

.fade-in-bottom {
  /* Kept as compatibility marker; pure fade has no directional shift. */
}

.fade-in-scale {
  /* Kept as compatibility marker; pure fade has no scale effect. */
}

.service-card,
.about-card,
.review-card,
.stat-card,
.step-card {
  position: relative;
  background: rgba(17, 33, 56, 0.6);
  border: 1px solid rgba(98, 243, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-content {
  position: relative;
  background: rgba(17, 33, 56, 0.95);
  border: 1px solid rgba(98, 243, 255, 0.2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-neon {
  display: inline-block;
  filter: drop-shadow(0 0 8px rgba(98, 243, 255, 0.28));
  text-shadow: 0 0 6px rgba(98, 243, 255, 0.22), 0 0 18px rgba(98, 243, 255, 0.12);
  animation: hero-neon-pulse 2.8s ease-in-out infinite;
}

.section-title-neon {
  display: block;
  text-align: center;
  filter: drop-shadow(0 0 6px rgba(98, 243, 255, 0.22));
  text-shadow: 0 0 4px rgba(98, 243, 255, 0.18), 0 0 12px rgba(98, 243, 255, 0.1);
  animation: section-neon-pulse 3.2s ease-in-out infinite;
}

@keyframes hero-neon-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(98, 243, 255, 0.2));
    opacity: 0.98;
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(98, 243, 255, 0.35));
    opacity: 1;
  }
}

@keyframes section-neon-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 6px rgba(98, 243, 255, 0.16));
    opacity: 0.985;
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(98, 243, 255, 0.24));
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .fade-in {
    opacity: 1;
  }

  .hero-title-neon {
    animation: none !important;
    filter: none;
    text-shadow: none;
  }

  .section-title-neon {
    animation: none !important;
    filter: none;
    text-shadow: none;
  }
