/* 
    Tecnomac - Hoja de Estilos Principal
    Diseño Estético Premium y Tecnológico
*/

/* ----------------------------------------------------
   1. Variables de Diseño y Configuración General
------------------------------------------------------- */
:root {
    /* Colores HSL adaptados para alta armonía visual */
    --bg-base: #070913;
    --bg-darker: #04050a;
    
    --neon-blue: #00f2fe;
    --neon-purple: #9d4edd;
    --neon-green: #39ff14;
    
    --text-primary: #f8f9fa;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    /* Efecto Glassmorphism */
    --glass-bg: rgba(13, 20, 38, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-focus: rgba(0, 242, 254, 0.3);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    --gradient-text: linear-gradient(120deg, #ffffff 30%, var(--neon-blue) 100%);
    --gradient-glow: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(157, 78, 221, 0.05) 50%, rgba(0, 0, 0, 0) 100%);

    /* Transiciones */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Canvas de partículas detrás de todo */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: all; /* Permite interaccionar con el cursor */
}

/* ----------------------------------------------------
   2. Estructura de Contenedores e Interfaz
------------------------------------------------------- */
.app-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ----------------------------------------------------
   3. Encabezado / Logo y Branding
------------------------------------------------------- */
.main-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.logo-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.4));
    transition: var(--transition-smooth);
    cursor: pointer;
}

.brand-logo:hover {
    transform: scale(1.08) rotate(2deg);
}

.logo-glow {
    position: absolute;
    width: 110%;
    height: 110%;
    background: var(--gradient-glow);
    border-radius: 50%;
    z-index: 1;
    animation: pulseGlow 4s infinite alternate;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-name {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.corporate-name {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--text-secondary);
    text-transform: uppercase;
    opacity: 0.9;
}

/* ----------------------------------------------------
   4. Paneles con Efecto Glassmorphism (Vidrio)
------------------------------------------------------- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: rgba(0, 242, 254, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 254, 0.05);
}

/* ----------------------------------------------------
   5. Sección Hero (En Construcción)
------------------------------------------------------- */
.hero-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 100px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-blue);
    animation: flashDot 1.8s infinite alternate;
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--neon-blue);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 720px;
    background: linear-gradient(135deg, #ffffff 50%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 650px;
}

/* ----------------------------------------------------
   6. Cuenta Regresiva Futurista (Countdown)
------------------------------------------------------- */
.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 12px 0;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.countdown-val {
    font-size: 3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #ffffff 0%, var(--neon-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.25));
}

.countdown-divider {
    font-size: 2.5rem;
    font-weight: 300;
    color: rgba(0, 242, 254, 0.35);
    margin-bottom: 20px;
    animation: pulseDivider 1s infinite alternate;
}

.countdown-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Barra de progreso de lanzamiento */
.progress-bar-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.progress-bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* ----------------------------------------------------
   7. Grid Interactivo de Dos Columnas
------------------------------------------------------- */
.interactive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.action-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.card-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ----------------------------------------------------
   8. Formulario de Suscripción
------------------------------------------------------- */
.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.email-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 400;
    outline: none;
    transition: var(--transition-fast);
}

.email-input:focus {
    border-color: var(--neon-blue);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.email-input:focus + .input-icon {
    color: var(--neon-blue);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Spinner animado */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.hidden {
    display: none !important;
}

/* Mensajes de feedback */
.form-feedback {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: 10px;
    line-height: 1.4;
    animation: slideInDown 0.3s ease;
}

.form-feedback.success {
    background: rgba(57, 255, 20, 0.06);
    border: 1px solid rgba(57, 255, 20, 0.2);
    color: #55ff44;
}

.form-feedback.error {
    background: rgba(255, 76, 76, 0.06);
    border: 1px solid rgba(255, 76, 76, 0.2);
    color: #ff5e5e;
}

/* ----------------------------------------------------
   9. Encuesta Interactiva (Poll)
------------------------------------------------------- */
.services-poll {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poll-option {
    width: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    overflow: hidden;
    outline: none;
    transition: var(--transition-fast);
}

.poll-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.option-name {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.option-percentage {
    position: relative;
    z-index: 2;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
    pointer-events: none;
}

/* Relleno de porcentaje en la barra */
.option-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.08) 0%, rgba(157, 78, 221, 0.08) 100%);
    border-right: 2px solid rgba(0, 242, 254, 0.25);
    z-index: 1;
    width: 0;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estado de votación realizada */
.poll-option.selected {
    border-color: var(--neon-blue);
    background: rgba(0, 242, 254, 0.03);
    color: #ffffff;
}

.poll-option.selected .option-percentage {
    color: var(--neon-blue);
    font-size: 0.95rem;
}

.poll-option.selected .option-bar {
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.15) 0%, rgba(157, 78, 221, 0.15) 100%);
    border-right-color: var(--neon-blue);
}

.poll-option.disabled {
    pointer-events: none;
}

.poll-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

/* ----------------------------------------------------
   10. Pie de Página y Enlaces de Contacto
------------------------------------------------------- */
.main-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-top: 10px;
}

.footer-msg {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.whatsapp-btn {
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.25);
    color: #25d366;
}

.whatsapp-btn:hover {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.email-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.email-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.contact-icon {
    width: 20px;
    height: 20px;
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ----------------------------------------------------
   11. Animaciones CSS
------------------------------------------------------- */

/* Animación de entrada de elementos */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up-delayed-1 {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.animate-slide-up-delayed-2 {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

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

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animaciones de micro-detalles */
@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes flashDot {
    0% {
        opacity: 0.4;
        box-shadow: 0 0 4px var(--neon-blue);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 14px var(--neon-blue), 0 0 24px var(--neon-blue);
    }
}

@keyframes pulseDivider {
    0% { opacity: 0.3; }
    100% { opacity: 0.85; }
}

/* ----------------------------------------------------
   12. Media Queries (Responsive Design)
------------------------------------------------------- */

@media (max-width: 900px) {
    .interactive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .brand-name {
        font-size: 2.4rem;
    }
    
    .countdown-val {
        font-size: 2.5rem;
    }
    
    .countdown-divider {
        font-size: 2rem;
    }
    
    .glass-panel {
        padding: 28px;
    }
}

@media (max-width: 500px) {
    .app-container {
        padding: 24px 16px;
        gap: 24px;
    }
    
    .brand-name {
        font-size: 2rem;
    }
    
    .corporate-name {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
    }
    
    .logo-wrapper {
        width: 76px;
        height: 76px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .countdown-container {
        gap: 8px;
    }
    
    .countdown-item {
        min-width: 60px;
    }
    
    .countdown-val {
        font-size: 1.9rem;
    }
    
    .countdown-divider {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .countdown-label {
        font-size: 0.65rem;
        letter-spacing: 0.08em;
    }
    
    .contact-btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-links {
        gap: 10px;
    }
}
