/* Variables de Color e Identidad */
:root {
    --primary-color: #050505; /* Negro Abismo absoluto */
    --accent-color: #8B5CF6;  /* Púrpura Eléctrico */
    --bg-light: #F4F4F5;      /* Gris perla neutro (sin azul) */
    --text-dark: #171717;     /* Carbón puro para lectura */
    --text-light: #FFFFFF;    /* Blanco puro para máximo contraste */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Smooth Scrolling Nativo */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

/* Header & Nav */
header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #EAEAEA;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
}

/* Glow Effect en Corchetes */
.brackets {
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent-color);
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.4);
}

.logo-text {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 2rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn-contacto {
    background-color: var(--primary-color);
    color: #FFFFFF !important;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
}

.btn-contacto:hover {
    background-color: var(--text-dark);
}

section {
    padding: 5rem 5%;
    text-align: center;
}

h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2rem;
}

/* Hero Section con Grid Arquitectónico */
#hero {
    background-color: var(--primary-color);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-light);
    padding: 8rem 5%;
    min-height: 400px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

#hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    min-height: 60px; /* Evita saltos de diseño mientras se escribe */
}

/* Efecto Terminal Cursor */
.typing-cursor::after {
    content: '|';
    color: var(--accent-color);
    animation: blinkCursor 0.8s step-end infinite;
    margin-left: 5px;
}

@keyframes blinkCursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

#hero p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Grid de Servicios */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: #FFFFFF;
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 31, 63, 0.1);
}

.card h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Stack Tecnológico */
.seccion-stack {
    background-color: #FFFFFF;
    border-top: 1px solid #EAEAEA;
}

.tech-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.tech-tag {
    padding: 0.8rem 1.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: default;
}

.tech-tag:hover {
    background-color: var(--primary-color);
    color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 31, 63, 0.2);
}

/* Confidencialidad */
.seccion-oscura {
    background-color: #E9ECEF;
}

.nda-box {
    max-width: 800px;
    margin: 0 auto;
    background: #FFFFFF;
    padding: 3rem;
    border-left: 5px solid var(--primary-color);
    border-radius: 4px;
    text-align: left;
}

.nda-box h2 {
    margin-bottom: 1rem;
}

/* Contacto y Enlaces */
.contacto-info {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.correo-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.correo-link:hover {
    color: var(--accent-color);
    border-color: var(--primary-color);
}

/* Botón Flotante Volver Arriba */
.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-scroll-top:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer Legal */
footer {
    background-color: var(--primary-color);
    color: #A0AAB2;
    padding: 3rem 5%;
    text-align: center;
    font-size: 0.9rem;
    border-top: 5px solid var(--accent-color);
}

.footer-legal p {
    margin-bottom: 0.5rem;
}

.legal-name {
    color: var(--text-light);
    font-size: 1rem;
}

.footer-links {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 1rem;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    #hero h1 {
        font-size: 2rem;
    }
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links a {
        margin: 0 0.5rem;
    }
    .btn-scroll-top {
        bottom: 20px;
        right: 20px;
    }
}