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

:root {
    --heading-font: 'Space Grotesk', sans-serif;
    --body-font: 'Inter', sans-serif;
}

/* ========== ESTILOS BASE ========== */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: #ececec;
    background:
        repeating-linear-gradient(to right, #000 0 1px, transparent 2px 200px),
        repeating-linear-gradient(to bottom, #000 0 1px, transparent 2px 200px),
        radial-gradient(circle at 50% 50%, #000, #1d1b34);
    overflow-x: hidden;
}

/* Canvas Partículas */
#dotsCanvas {
    position: fixed;
    top:0; left:0;
    width:100%;
    height:100vh;
    z-index:0;
}

.touch-indicator {
    display: none;
}

/* ========== HEADER MEJORADO CON BORDE AMARILLO ========== */
header {
    position: fixed;
    top: 8px;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 20px;
    padding-bottom: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    width: min(1200px, 95%);
    margin: 0 auto;
    padding: 15px 30px;
    background: rgba(29, 27, 52, 0.8); /* Más opaco para mejor contraste */
    backdrop-filter: blur(15px);
    border-radius: 50px;
    transition: all 0.4s ease;
    border: 1px solid #ffee58; /* Borde amarillo solicitado */
    box-shadow: 0 5px 20px rgba(255, 238, 88, 0.1); /* Sombra sutil para destacar */
}

header img {
    width: 50px;
    transition: transform 0.3s ease;
}

header.scrolled {
    top: 0;
}

header.scrolled .nav-container {
    width: min(1200px, 95%) !important;
    border-radius: 50px !important;
    padding: 15px 30px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

nav ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.logo-item {
    flex: 0 1 auto;
    margin: 0 20px;
}

nav ul li:not(.logo-item) {
    flex: 0 0 auto;
}

nav a {
    color: #eee;
    text-decoration: none;
    font-size: 0.95em;
    padding: 8px 15px;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500; /* Mejor legibilidad */
}

nav a:hover:not(.btn-contacto) {
    background: rgba(255, 238, 88, 0.15); /* Más visible */
    transform: translateY(-2px);
}

.btn-contacto {
    background: #ffee58;
    color: #000 !important;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    margin-left: 15px;
    transition: all 0.3s ease;
    border: 1px solid #ffee58; /* Borde consistente */
}

.btn-contacto:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #ffee58aa;
    background: #fff; /* Cambio de color para feedback */
    color: #1d1b34 !important;
}

/* ========== BANNER MEJORADO ========== */
.banner {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px; /* Más espacio */
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
}

h1 {
    --to: left;
    font-size: 4em;
    font-weight: bold;
    background-image: linear-gradient(to var(--to), #ffee58, #ffee58, #ffee58);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    line-height: 1em;
    margin: 0;
    position: relative;
    z-index: 10;
    text-shadow: 0 0 30px rgba(255, 238, 88, 0.3); /* Efecto brillo */
}

.banner h4 {
    position: relative;
    z-index: 10;
    font-size: 1.1em;
    max-width: 500px;
    margin: 10px auto;
    opacity: 0.9; /* Más legible */
    line-height: 1.6;
    background: rgba(29, 27, 52, 0.5); /* Fondo para mejor contraste */
    padding: 15px 25px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 238, 88, 0.2);
}

.banner button {
    all: unset;
    border: 2px solid #ffee58; /* Borde más visible */
    padding: 12px 28px; /* Más grande */
    border-radius: 25px; /* Más redondeado */
    background: rgba(255, 238, 88, 0.1);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    z-index: 10;
    font-weight: 600;
    font-size: 1.1em;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.banner button:hover {
    background-color: #ffee58;
    color: #000000 !important;
    box-shadow: 0 0 40px #ffee58;
    transform: translateY(-5px);
}

/* Asegurar que el contenido esté por encima del canvas */
header, main, section, footer {
    position: relative;
    z-index: 10;
}

/* ========== RESPONSIVE MEJORADO ========== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 12px 20px;
    }
    
    nav ul {
        gap: 10px;
    }
    
    .logo-item img {
        width: 40px;
    }
}

@media (max-width: 768px) {
    header {
        top: 10px;
        padding: 0 5px;
        padding-bottom: 17px;
    }

    .nav-container {
        width: 95% !important;
        padding: 10px 15px;
    }
    
    nav ul {
        justify-content: space-around;
        gap: 8px;
    }
    
    nav a {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    
    .logo-item {
        margin: 0 10px;
    }
    
    .btn-contacto {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    header.scrolled .nav-container {
        padding: 10px 15px;
    }

    .banner {
        padding-top: 80px;
        padding-bottom: 40px;
    }

    h1 {
        font-size: 2.8em; /* Un poco más grande */
        line-height: 1.1;
        margin-bottom: 15px;
    }

    .banner h4 {
        font-size: 1em;
        line-height: 1.4;
        padding: 12px 20px;
        margin: 0 15px;
    }

    .banner button {
        margin-top: 20px;
        padding: 10px 22px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 8px 10px !important;
        border-radius: 30px !important;
        border-width: 1px; /* Asegurar borde en móvil */
    }
    
    nav ul {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    
    nav ul::-webkit-scrollbar {
        display: none;
    }
    
    .logo-item {
        flex: 0 0 40px;
        margin: 0 5px;
    }
    
    .logo-item img {
        width: 40px !important;
        min-width: 40px;
    }
    
    nav ul li:not(.logo-item) {
        flex: 0 0 auto;
    }
    
    nav a {
        font-size: 0.7em;
        padding: 4px 8px;
        white-space: nowrap;
    }
    
    .btn-contacto {
        padding: 6px 12px;
        font-size: 0.75em;
        margin-left: 0;
    }
    
    /* Orden de elementos */
    nav ul li:nth-child(1) { order: 1; } /* Soluciones */
    nav ul li:nth-child(2) { order: 2; } /* Portafolio */
    .logo-item { order: 3; } /* Logo */
    nav ul li:nth-child(4) { order: 4; } /* Ideas */
    nav ul li:nth-child(5) { order: 5; } /* Contacto */

    .banner {
        padding-top: 70px;
        padding-bottom: 30px;
    }

    h1 {
        font-size: 2.2em; /* Ajustado para móvil */
        word-wrap: break-word;
        padding: 0 10px;
    }
    
    .banner h4 {
        font-size: 0.9em;
        padding: 10px 15px;
        margin: 0 10px;
    }
    
    .banner button {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}

/* Ajustes tipográficos generales */
body {
    line-height: 1.6;
    color: #e0e0e0;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    letter-spacing: -0.03em;
}

::-webkit-scrollbar {
    width: 0;
}

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