@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600&family=Poppins:wght@400;500&display=swap');

body {
  margin: 0;
  height: 100vh;
  background: radial-gradient(circle at center, #0a0f18 30%, #000 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  font-family: 'Poppins', sans-serif;
  color: white;
}

/* Partículas iniciales */
.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.piece {
  position: absolute;
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, #00baff, #005bff);
  border-radius: 3px;
  opacity: 0;
  animation: flyIn 3s ease-out forwards;
}
.piece1 { top: 20%; left: -10%; animation-delay: 0.2s; }
.piece2 { top: 50%; left: 110%; animation-delay: 0.4s; }
.piece3 { top: -10%; left: 40%; animation-delay: 0.6s; }
.piece4 { top: 110%; left: 70%; animation-delay: 0.8s; }
.piece5 { top: 90%; left: -5%; animation-delay: 1s; }
.piece6 { top: 0%; left: 85%; animation-delay: 1.2s; }
.piece7 { top: 30%; left: 50%; animation-delay: 1.4s; }
.piece8 { top: 60%; left: 20%; animation-delay: 1.6s; }

@keyframes flyIn {
  0% { opacity: 0; transform: translate(0,0) scale(0.5); }
  50% { opacity: 1; transform: translate(50vw, 50vh) scale(1.5); }
  100% { opacity: 0; transform: translate(0,0) scale(0); }
}

/* Logo animado */
.logo {
  opacity: 0;
  animation: fadeIn 1s ease forwards 3s;
  text-align: center;
}

.sw-logo {
  width: 300px;
  height: 150px;
  stroke: #00baff;
  stroke-width: 8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: shake 0.4s ease-in-out 4.5s 2;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes shake {
  0%,100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, 3px); }
}

/* Texto */
.tagline {
  margin-top: 20px;
  opacity: 0;
  font-size: 1rem;
  letter-spacing: 0.03em;
  animation: fadeInText 2s ease forwards 5.5s;
}
@keyframes fadeInText {
  to { opacity: 1; transform: translateY(0); }
}

/* === CUBO 3D FLOTANTE === */
.cube {
  position: absolute;
  width: 100px;
  height: 100px;
  transform-style: preserve-3d;
  opacity: 0;
  transform: scale(0);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.cube.show {
  opacity: 1;
  transform: scale(1);
  animation: rotateCube 15s linear infinite, floatCube 12s ease-in-out infinite alternate;
}

/* Caras del cubo */
.face {
  position: absolute;
  width: 100px;
  height: 100px;
  background: linear-gradient(145deg, #005bff, #00baff);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(255,255,255,0.7);
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(0,180,255,0.5);
}

/* Posiciones */
.front  { transform: translateZ(50px); }
.back   { transform: rotateY(180deg) translateZ(50px); }
.right  { transform: rotateY(90deg) translateZ(50px); }
.left   { transform: rotateY(-90deg) translateZ(50px); }
.top    { transform: rotateX(90deg) translateZ(50px); }
.bottom { transform: rotateX(-90deg) translateZ(50px); }

/* Rotación continua */
@keyframes rotateCube {
  0% { transform: rotateX(-20deg) rotateY(0deg); }
  50% { transform: rotateX(25deg) rotateY(180deg); }
  100% { transform: rotateX(-20deg) rotateY(360deg); }
}

/* Movimiento flotante y rebote por la pantalla */
@keyframes floatCube {
  0%   { transform: translate(-35vw, -25vh) scale(1) rotateX(-10deg) rotateY(30deg); }
  25%  { transform: translate(30vw, -15vh) scale(1.1) rotateX(10deg) rotateY(120deg); }
  50%  { transform: translate(25vw, 20vh) scale(1) rotateX(20deg) rotateY(200deg); }
  75%  { transform: translate(-25vw, 25vh) scale(1.1) rotateX(-10deg) rotateY(300deg); }
  100% { transform: translate(-35vw, -25vh) scale(1) rotateX(-20deg) rotateY(360deg); }
}

/* Agitación (shake) */
.cube.shake {
  animation: shakeCube 0.5s;
}
@keyframes shakeCube {
  0% { transform: rotateX(10deg) rotateY(10deg); }
  25% { transform: rotateX(-10deg) rotateY(-10deg); }
  50% { transform: rotateX(10deg) rotateY(-10deg); }
  75% { transform: rotateX(-10deg) rotateY(10deg); }
  100% { transform: rotateX(0deg) rotateY(0deg); }
}

/* Adaptable a mobile */
@media (max-width: 768px) {
  .sw-logo { width: 200px; height: 100px; }
  .cube { width: 80px; height: 80px; }
  .face { font-size: 1.2rem; }
}

/* === FOOTER FIJO === */
footer {
  position: fixed;
  bottom: 15px;
  width: 100%;
  text-align: center;
  z-index: 50;
}
.contact-link {
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Efecto celeste principal */
.contact-link.glow {
    animation: glowEffect 2s ease-in-out infinite;
}

@keyframes glowEffect {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 186, 255, 0.5),
                     0 0 10px rgba(0, 186, 255, 0.3),
                     0 0 15px rgba(0, 186, 255, 0.1);
        color: #ffffff;
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 186, 255, 0.8),
                     0 0 30px rgba(0, 186, 255, 0.6),
                     0 0 40px rgba(0, 186, 255, 0.4),
                     0 0 60px rgba(0, 150, 255, 0.3);
        color: #b3e0ff;
    }
}

/* Versión alternativa más sutil en celeste */
.contact-link.glow-subtle {
    animation: subtleGlow 3s ease-in-out infinite;
}

@keyframes subtleGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 186, 255, 0.3);
        color: #ffffff;
    }
    50% {
        text-shadow: 0 0 15px rgba(0, 186, 255, 0.7),
                     0 0 25px rgba(0, 150, 255, 0.4),
                     0 0 35px rgba(100, 200, 255, 0.2);
        color: #e6f7ff;
    }
}

/* Efecto neón celeste más intenso */
.contact-link.neon {
    animation: neonGlow 1.5s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from {
        text-shadow: 0 0 10px #fff,
                     0 0 20px #fff,
                     0 0 30px #00baff,
                     0 0 40px #00baff,
                     0 0 70px #0080ff;
        color: #ffffff;
    }
    to {
        text-shadow: 0 0 5px #fff,
                     0 0 10px #4dfaff,
                     0 0 15px #4dfaff,
                     0 0 20px #00baff,
                     0 0 35px #0080ff;
        color: #e6f7ff;
    }
}

/* Efecto de pulso celeste */
.contact-link.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(0, 186, 255, 0.5);
        color: #ffffff;
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(0, 186, 255, 0.8),
                     0 0 30px rgba(0, 150, 255, 0.6),
                     0 0 40px rgba(100, 200, 255, 0.4);
        color: #b3e0ff;
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(0, 186, 255, 0.5);
        color: #ffffff;
    }
}

/* Mantener el hover que ya tienes */
.contact-link:hover {
    opacity: 1;
    text-shadow: 0 0 8px #00baff;
}
