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

html, body {
  height: 100%;
  font-family: "Manrope", sans-serif;
  background: #000;
  overflow: hidden;
  color: white;
}

header {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 30px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.logo {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 2px;
}

/* --- Соцсети --- */
.social {
  display: flex;
  align-items: center;
  gap: 24px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
  color: #00ffc8;
  transform: translateY(-2px);
}

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.social-link:hover .icon {
  transform: scale(1.2);
}


.video-bg video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: opacity 0.8s ease;
}

.title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(48px, 15vw, 180px);
  font-weight: 700;
  letter-spacing: 0.1em;
  z-index: 5;
  display: flex;
  gap: 0.15em;
  user-select: none;
  white-space: nowrap;
  text-align: center;
}

.title span {
  cursor: pointer;
  transition: transform 0.4s ease;
}
.title span:hover {
  transform: translateY(-10px);
}

.project-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.6);
  opacity: 0;
  transition: opacity 0.8s ease, filter 1.2s ease, transform 1s ease;
  z-index: 2;
  transform: scale(1.1);
}
.project-bg.active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0px) brightness(0.8);
}
.project-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
}

.project-glow {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: radial-gradient(circle at center, rgba(0,191,165,0.25), rgba(155,89,182,0.25));
  opacity: 0;
  filter: blur(100px);
  transition: opacity 1.5s ease;
}
.project-glow.active {
  opacity: 1;
  animation: glowShift 6s ease-in-out infinite alternate;
}

@keyframes glowShift {
  0% { background: radial-gradient(circle at 30% 70%, rgba(0,191,165,0.3), rgba(155,89,182,0.2)); }
  100% { background: radial-gradient(circle at 70% 30%, rgba(155,89,182,0.3), rgba(0,191,165,0.2)); }
}

/* Название проекта */
.project-title {
  position: fixed;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  font-size: clamp(20px, 2vw, 32px);
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  z-index: 4;
  pointer-events: none;
}
.project-title.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Прелоадер — взрыв с частицами */
.preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #000 0%, #070707 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  overflow: hidden;
  animation: fadeOut 2s ease 3.5s forwards;
}

.dots {
  position: relative;
  display: flex;
  gap: 20px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00ffe0;
  filter: drop-shadow(0 0 8px #00ffe0);
  animation: explode 1.2s ease-in-out infinite;
  transform-origin: center;
  position: relative;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
  background: #00c8ff;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
  background: #b388ff;
}

/* Эффект "взрыва" */
@keyframes explode {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  25% {
    transform: scale(1.8);
    opacity: 1;
  }
  50% {
    transform: scale(2.5);
    opacity: 0.6;
    filter: blur(2px);
  }
  70% {
    transform: scale(3.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.8);
    opacity: 0;
  }
}

/* Частицы */
.dot::before,
.dot::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: inherit;
  border-radius: 50%;
  opacity: 0;
  filter: blur(1px);
  transform: scale(0);
}

.dot::before {
  animation: particles 1.2s ease-out infinite;
}
.dot::after {
  animation: particles2 1.2s ease-out infinite;
}

@keyframes particles {
  0% { opacity: 0; transform: translate(0,0) scale(0.2); }
  40% { opacity: 1; transform: translate(15px,-20px) scale(1.2); }
  80% { opacity: 0.3; transform: translate(40px,-50px) scale(0.6); }
  100% { opacity: 0; transform: translate(60px,-80px) scale(0); }
}

@keyframes particles2 {
  0% { opacity: 0; transform: translate(0,0) scale(0.2); }
  40% { opacity: 1; transform: translate(-20px,25px) scale(1.2); }
  80% { opacity: 0.3; transform: translate(-40px,50px) scale(0.6); }
  100% { opacity: 0; transform: translate(-60px,80px) scale(0); }
}

/* Исчезновение прелоадера */
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}


/* Адаптив */
@media (max-width: 768px) {
  header { padding: 20px 30px; }
  .logo { font-size: 18px; }
  .social a { width: 22px; height: 22px; }
}
