/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables - Paleta carlosmillan.dev */
:root {
  --color-bg-dark: #0a1628;
  --color-bg-medium: #0f2847;
  --color-primary-cyan: #00d4ff;
  --color-primary-light: #5ce1ff;
  --color-white: #ffffff;
  --color-white-soft: rgba(255, 255, 255, 0.9);
  --color-white-muted: rgba(255, 255, 255, 0.6);

  --gradient-main: linear-gradient(
    135deg,
    #0a1628 0%,
    #0f2847 30%,
    #1a5a7a 70%,
    #00b4d8 100%
  );
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
  --glow-intense:
    0 0 30px rgba(0, 212, 255, 0.8), 0 0 60px rgba(0, 212, 255, 0.4);

  --font-logo: "Orbitron", sans-serif;
  --font-body: "Inter", sans-serif;

  --logo-size: clamp(2rem, 6vw, 4rem);
  --subtitle-size: clamp(1rem, 2.5vw, 1.5rem);
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--color-white);
  background: var(--gradient-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* Cyber Grid */
.cyber-grid {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background:
    linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom center;
  z-index: -1;
  opacity: 0.6;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.7) 0%,
    rgba(15, 40, 71, 0.5) 50%,
    rgba(10, 22, 40, 0.8) 100%
  );
  z-index: -1;
}

/* Patrón binario - Blanco con opacidad para resaltar sobre fondo azul */
.binary-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.binary-pattern span {
  position: absolute;
  white-space: nowrap;
  animation: floatBinary 25s linear infinite;
}

.binary-pattern span:nth-child(1) {
  top: 8%;
  left: -100%;
}
.binary-pattern span:nth-child(2) {
  top: 25%;
  left: -100%;
  animation-delay: 5s;
}
.binary-pattern span:nth-child(3) {
  top: 42%;
  left: -100%;
  animation-delay: 10s;
}
.binary-pattern span:nth-child(4) {
  top: 58%;
  left: -100%;
  animation-delay: 15s;
}
.binary-pattern span:nth-child(5) {
  top: 75%;
  left: -100%;
  animation-delay: 20s;
}
.binary-pattern span:nth-child(6) {
  top: 92%;
  left: -100%;
  animation-delay: 12s;
}

@keyframes floatBinary {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(100vw + 100%));
  }
}

/* Contenido principal */
.content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  text-align: center;
  z-index: 1;
}

.content-wrapper {
  max-width: 900px;
  width: 100%;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
}

.logo {
  font-family: var(--font-logo);
  font-size: var(--logo-size);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.logo-name {
  color: var(--color-white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-dot,
.logo-dev {
  color: var(--color-primary-cyan);
  text-shadow:
    0 0 10px rgba(0, 212, 255, 0.8),
    0 0 20px rgba(0, 212, 255, 0.5);
}

/* Robot */
.robot-icon {
  position: relative;
  width: 70px;
  height: 60px;
  animation: floatRobot 3s ease-in-out infinite;
}

.robot-head {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 38px;
  background: linear-gradient(
    180deg,
    var(--color-primary-light) 0%,
    var(--color-primary-cyan) 100%
  );
  border-radius: 10px;
  box-shadow: var(--glow-cyan);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.robot-eye {
  width: 8px;
  height: 8px;
  background: var(--color-bg-dark);
  border-radius: 50%;
}

.robot-mouth {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 6px;
  background: var(--color-primary-cyan);
  border-radius: 0 0 6px 6px;
  box-shadow: var(--glow-cyan);
}

.robot-antenna {
  position: absolute;
  top: 0;
  width: 3px;
  height: 16px;
  background: var(--color-primary-cyan);
  box-shadow: var(--glow-cyan);
}

.robot-antenna::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--color-primary-light);
  border-radius: 50%;
  box-shadow: var(--glow-intense);
}

.robot-antenna.left {
  left: 12px;
}
.robot-antenna.right {
  right: 12px;
}

@keyframes floatRobot {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Línea decorativa */
.glow-line {
  width: 120px;
  height: 3px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  border-radius: 2px;
  box-shadow: var(--glow-cyan);
  animation: expandLine 1s ease-out 0.3s forwards;
  transform: scaleX(0);
}

@keyframes expandLine {
  to {
    transform: scaleX(1);
  }
}

/* ============================================
   VIDEO CENTRADO - ELEMENTO PRINCIPAL
   ============================================ */
.video-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 2rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(0, 212, 255, 0.4),
    0 0 80px rgba(0, 212, 255, 0.2),
    0 25px 50px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(0, 212, 255, 0.4);
  animation: fadeInUp 1s ease-out 0.2s forwards;
  opacity: 0;
}

.main-video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Textos */
.subtitle {
  font-family: var(--font-logo);
  font-size: var(--subtitle-size);
  font-weight: 500;
  color: var(--color-white-soft);
  margin-bottom: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease-out 0.4s forwards;
  opacity: 0;
}

.description {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 300;
  color: var(--color-white-muted);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.6s forwards;
  opacity: 0;
}

/* Badge */
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  font-family: var(--font-logo);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary-cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease-out 0.8s forwards;
  opacity: 0;
  transition: all 0.3s ease;
}

.coming-soon-badge:hover {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: var(--glow-cyan);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary-cyan);
  border-radius: 50%;
  box-shadow: var(--glow-cyan);
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

/* Destellos */
.sparkle {
  position: fixed;
  font-size: 1.2rem;
  color: var(--color-primary-light);
  text-shadow: var(--glow-cyan);
  z-index: 2;
  pointer-events: none;
  animation: sparkleAnim 3s ease-in-out infinite;
}

.sparkle-1 {
  bottom: 15%;
  right: 10%;
}
.sparkle-2 {
  top: 20%;
  left: 8%;
  animation-delay: 1.5s;
}

@keyframes sparkleAnim {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(180deg);
  }
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem;
  text-align: center;
  z-index: 1;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.9), transparent);
  animation: fadeIn 1s ease-out 1s forwards;
  opacity: 0;
}

.footer p {
  font-size: 0.75rem;
  color: var(--color-white-muted);
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive */
@media screen and (max-width: 768px) {
  .logo-container {
    flex-direction: column;
    gap: 1rem;
  }
  .video-container {
    max-width: 90%;
    border-radius: 12px;
  }
  .robot-icon {
    width: 55px;
    height: 50px;
  }
  .robot-head {
    width: 40px;
    height: 30px;
  }
  .cyber-grid {
    background-size: 40px 40px;
  }
}

@media screen and (max-width: 480px) {
  .content {
    padding: 1.5rem;
  }
  .coming-soon-badge {
    padding: 10px 20px;
    font-size: 0.75rem;
  }
  .sparkle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
