/* =====================================================
   Estilos base para Tecknia Landing Page
   Color base #011b37 – Estética futurista
====================================================== */

:root {
  --bg-main: #000233;
  --bg-secondary: #000122;
  --text: #e6eaf3;
  --accent: #43e6a5;
  --grid-color: rgba(67, 230, 165, 0.03);
  --grid-line: 1px solid var(--grid-color);
  --tech-color: #1698b0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  color: var(--text);
}

body {
  background: var(--bg-main);
  overflow-x: hidden;
}

/* Canvas WebGL ocupa fondo */
#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1; /* detrás del contenido */
}

section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 8vw;
  position: relative;
}

/* ===== Navegación ===== */
nav {
  position: fixed;
  top: 1.5rem;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

/* Contenedor del logo */
.logo-container {
  background-color: rgba(0, 2, 51, 0.3);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(22, 152, 176, 0.15);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  text-decoration: none;
  flex-shrink: 0; /* Evita que el logo se encoja */
}

.logo-container:hover {
  border-color: rgba(22, 152, 176, 0.3);
  background-color: rgba(0, 2, 51, 0.5);
}

/* Logo */
.logo {
  height: 30px;
  width: auto;
  display: block;
  filter: brightness(1.05) contrast(1.05);
}

/* Enlaces de navegación */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem; /* Espacio reducido para un menú más compacto */
}

.nav-link-login {
  padding: 10px 20px;
  border: 1px solid var(--tech-color);
  background-color: transparent;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.nav-link-login:hover,
.nav-link-login.active {
  background-color: transparent; /* Asegura que no haya fondo sólido */
  color: #FFFFFF; /* Hace el texto completamente blanco y brillante */
  border-color: rgba(22, 152, 176, 0.9); /* Borde más visible */
  box-shadow: 0 0 25px rgba(22, 152, 176, 0.7); /* Brillo más intenso */
}

/* Elimina el subrayado heredado */
.nav-link-login::after {
  display: none;
}

/* Efecto de barrido de luz */
.nav-link-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  transform: skewX(-25deg);
  transition: left 0.6s ease;
}

.nav-link-login:hover::before {
  left: 125%;
}
.nav-link {
  font-size: 0.9rem; /* Tamaño de fuente reducido */
  font-weight: 600;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.5px;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 1;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

#inicio {
  padding-top: 8rem; /* Espacio para la barra de navegación fija */
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 4rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 0.95;
  font-weight: 800;
}
.hero p {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  max-width: 50ch;
}
/* Contenedor de botones tecnológicos */
.tech-buttons {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Botón principal CTA */
.cta {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 1px solid var(--tech-color);
  background: rgba(22, 152, 176, 0.1);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta:hover {
  background: rgba(22, 152, 176, 0.2);
  box-shadow: 0 0 15px rgba(22, 152, 176, 0.4);
}

.button-glow {
  position: absolute;
  top: 0;
  left: -50%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(22, 152, 176, 0.3), transparent);
  transform: skewX(-25deg);
  animation: button-glow 3s infinite;
}

@keyframes button-glow {
  0% { left: -50%; }
  100% { left: 150%; }
}

.hero-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

/* ===== Secciones genéricas ===== */
.section-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  margin-top: 5rem;
  margin-bottom: 1rem;
  text-align: center;
}
.section-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  max-width: 65ch;
  margin: 0 auto 3rem;
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.feature {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: blur(4px);
  transition: transform 0.3s;
}
.feature:hover {
  transform: translateY(-6px);
}
.feature h3 {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}
.feature p {
  font-size: 0.95rem;
  line-height: 1.4;
  opacity: 0.85;
}

/* ===== Footer ===== */
footer {
  padding: 4rem 8vw 6rem;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== Animaciones tecnológicas sutiles ===== */
/* Botón de acceso tecnológico */
.tech-access-button {
  display: flex;
  align-items: center;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, #1698b0 0%, #0d7a8c 100%);
  border: 1px solid rgba(67, 230, 181, 0.3);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(22, 152, 176, 0.3);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  z-index: 1;
}

.tech-access-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(22, 152, 176, 0.5);
  border-color: rgba(67, 230, 181, 0.6);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.tech-access-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1ab1cc 0%, #0e8da3 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.tech-access-button:hover::before {
  opacity: 1;
}

.tech-access-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.tech-access-button:hover::after {
  left: 100%;
}

/* Esquinas del botón de acceso */
.tech-access-button::before, .tech-access-button::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--tech-color);
  border-style: solid;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.tech-access-button::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.tech-access-button::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.tech-access-button:hover::before, .tech-access-button:hover::after {
  width: 12px;
  height: 12px;
  opacity: 1;
}

/* Indicador de acceso */
.access-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #43e6b5;
  border-radius: 50%;
  box-shadow: 0 0 5px 2px rgba(67, 230, 181, 0.5);
  animation: pulse 1.5s infinite ease-in-out;
}

.access-text {
  position: relative;
  z-index: 1;
}

.access-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--tech-color);
  border-top: 2px solid var(--tech-color);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.tech-access-button:hover .access-icon {
  right: 12px;
  opacity: 1;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 152, 176, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(22, 152, 176, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 152, 176, 0);
  }
}

/* Botón de detección animado */
.detection-button {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background-color: rgba(22, 152, 176, 0.1);
  border: 1px solid rgba(22, 152, 176, 0.3);
  color: var(--tech-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-right: 15px;
}

/* Esquinas del botón de detección */
.detection-button::before, .detection-button::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--tech-color);
  border-style: solid;
  opacity: 0.7;
}

.detection-button::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.detection-button::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

/* Animación pulsante sutil para el botón */
@keyframes buttonPulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 152, 176, 0.2); }
  70% { box-shadow: 0 0 0 6px rgba(22, 152, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 152, 176, 0); }
}

.detection-button {
  animation: buttonPulse 2s infinite;
}

/* Estilos adicionales para la sección de funcionalidades */
.features-section {
    position: relative;
    padding: 100px 0;
    background-color: var(--dark-blue-bg);
}

/* Clase de utilidad para espaciado superior */
.section-spacer {
    margin-top: 100px;
}

/* Efecto de escaneo sutil para la imagen */
.hero-img {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(22, 152, 176, 0.2);
  box-shadow: 0 0 15px rgba(0, 5, 51, 0.3);
}

.hero-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(22, 152, 176, 0.1), transparent);
  animation: imgScan 4s infinite;
}

@keyframes imgScan {
  0% { left: -30%; }
  100% { left: 130%; }
}

/* Indicador de estado */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--tech-color);
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  animation: blink 3s infinite;
}

@keyframes blink {
  0% { opacity: 0.3; }
  50% { opacity: 0.9; }
  100% { opacity: 0.3; }
}

/* ===== Nuevo Footer Profesional ===== */
.enhanced-footer {
  background-color: var(--bg-secondary);
  padding: 3rem 8vw 2.5rem; /* Reducido para menor altura */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  /* Columnas con distribución mejorada para equilibrio visual */
  grid-template-columns: 1.75fr 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
  text-align: left;
  padding-bottom: 0rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0rem;
}

.footer-logo-img {
  max-height: 45px;
  margin-bottom: 1rem;
}

.footer-logo-area p {
  opacity: 0.7;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #16b098;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-contact-area p {
  margin: 0.5rem 0;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-contact {
  color: #16b098;
  font-size: 1.1rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: #16b098;
  color: var(--bg-primary);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 15px rgba(22, 176, 152, 0.2);
  border-color: #16b098;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.6;
}

/* Media queries para responsividad del footer */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .footer-logo-area, .footer-contact-area, .footer-social-area {
    align-items: center;
  }
  .footer-logo-area p {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-contact-area p {
    justify-content: center;
  }
  .social-icons {
    justify-content: center;
  }
}

/* Media queries para responsividad */
@media (max-width: 768px) {
  .nav-link-login {
    display: none; /* Oculta el botón en la barra de nav móvil */
  }

  nav {
    top: 1rem;
    gap: 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero {
    gap: 2rem;
  }
  
  .cta {
    padding: 0.8rem 2rem;
  }
}
