/* ========================================
   VANGUARD IA - Estilos Principales
   Tema: Tecnológico y Futurista
   ======================================== */

/* --- Variables CSS --- */
:root {
    /* Colores principales */
    --color-bg-primary: #030014;
    --color-bg-secondary: #0a0a1a;
    --color-bg-tertiary: #12122a;

    /* Colores de acento */
    --color-primary: #7c3aed;
    --color-primary-light: #8b5cf6;
    --color-secondary: #06b6d4;
    --color-accent: #f472b6;

    /* Colores de texto */
    --color-text-primary: #ffffff;
    --color-text-secondary: #a5b4fc;
    --color-text-muted: #6b7280;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #f472b6 0%, #7c3aed 100%);
    --gradient-text: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #06b6d4 100%);
    --gradient-glow: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);

    /* Efectos de neón */
    --neon-purple: 0 0 10px rgba(124, 58, 237, 0.5), 0 0 20px rgba(124, 58, 237, 0.3), 0 0 30px rgba(124, 58, 237, 0.1);
    --neon-cyan: 0 0 10px rgba(6, 182, 212, 0.5), 0 0 20px rgba(6, 182, 212, 0.3), 0 0 30px rgba(6, 182, 212, 0.1);
    --neon-pink: 0 0 10px rgba(244, 114, 182, 0.5), 0 0 20px rgba(244, 114, 182, 0.3), 0 0 30px rgba(244, 114, 182, 0.1);

    /* Tipografía */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;

    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Espaciado */
    --container-max: 1400px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* Cursor personalizado */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    border: 2px solid var(--color-secondary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease;
}

a:hover ~ .cursor,
button:hover ~ .cursor {
    transform: scale(1.5);
}

/* Fondo animado */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animation .grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

.bg-animation .particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(124, 58, 237, 0.5) 1px, transparent 1px),
        radial-gradient(circle, rgba(6, 182, 212, 0.3) 1px, transparent 1px),
        radial-gradient(circle, rgba(244, 114, 182, 0.3) 1px, transparent 1px);
    background-size: 200px 200px, 300px 300px, 150px 150px;
    background-position: 0 0, 40px 60px, 80px 20px;
    animation: particlesFloat 30s linear infinite;
}

@keyframes particlesFloat {
    0% { background-position: 0 0, 40px 60px, 80px 20px; }
    100% { background-position: 200px 200px, 340px 260px, 280px 220px; }
}

/* --- Contenedor --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navegación --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(3, 0, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    transition: var(--transition-base);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(3, 0, 20, 0.95);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-image {
    height: 3rem;
    width: auto;
    max-width: 11rem;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-accent {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--color-text-secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: var(--transition-base);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--color-text-primary);
    transition: var(--transition-base);
}

/* --- Botones --- */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-text-primary);
    box-shadow: var(--neon-purple);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.6), 0 0 40px rgba(124, 58, 237, 0.4);
}

.btn-primary .btn-arrow {
    width: 20px;
    height: 20px;
    transition: var(--transition-base);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 2px solid rgba(124, 58, 237, 0.5);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    background: rgba(124, 58, 237, 0.1);
}

.btn-glow {
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: var(--neon-purple); }
    50% { box-shadow: 0 0 30px rgba(124, 58, 237, 0.8), 0 0 60px rgba(124, 58, 237, 0.4); }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-secondary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Hero Visual - AI Brain Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-brain {
    position: relative;
    width: 300px;
    height: 300px;
}

.brain-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    box-shadow: var(--neon-purple), var(--neon-cyan);
    animation: corePulse 3s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.brain-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-radius: 50%;
}

.ring-1 {
    width: 140px;
    height: 140px;
    border-color: rgba(124, 58, 237, 0.5);
    border-top-color: var(--color-secondary);
    animation: spin 8s linear infinite;
}

.ring-2 {
    width: 200px;
    height: 200px;
    border-color: rgba(6, 182, 212, 0.3);
    border-bottom-color: var(--color-accent);
    animation: spin 12s linear infinite reverse;
}

.ring-3 {
    width: 260px;
    height: 260px;
    border-color: rgba(244, 114, 182, 0.2);
    border-left-color: var(--color-primary);
    animation: spin 15s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.brain-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--color-secondary) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: particlesRotate 20s linear infinite;
    opacity: 0.3;
}

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

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-secondary);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 0.3; }
}

/* --- Tagline Section --- */
.tagline-section {
    padding: 6rem 0;
    background: var(--color-bg-secondary);
    position: relative;
    overflow: hidden;
}

.tagline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}

.tagline-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.tagline-image {
    display: flex;
    justify-content: center;
}

.tagline-profile-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    border: 2px solid rgba(124, 58, 237, 0.3);
    box-shadow: var(--neon-purple);
}

.image-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/5;
    background: var(--gradient-glow);
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

.image-placeholder svg {
    width: 80px;
    height: 80px;
    color: var(--color-text-muted);
}

.placeholder-text {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.tagline-text {
    text-align: left;
}

.tagline-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tagline-description {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
}

.tagline-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* --- Services Preview --- */
.services-preview {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--color-bg-secondary);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: var(--transition-base);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    opacity: 0;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: var(--neon-purple);
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-card.featured {
    border-color: var(--color-primary);
    box-shadow: var(--neon-purple);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: var(--gradient-primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 30px;
    height: 30px;
    color: var(--color-secondary);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card-description {
    color: var(--color-text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
}

.card-link svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-base);
}

.card-link:hover {
    gap: 1rem;
}

.services-cta {
    text-align: center;
    margin-top: 4rem;
}

/* --- CTA Section --- */
.cta-section {
    padding: 6rem 0;
    position: relative;
}

.cta-content {
    background: var(--color-bg-tertiary);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 30px;
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.cta-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* --- Footer --- */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand .logo-image {
    height: 2.6rem;
    max-width: 9rem;
}

.footer-tagline {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-secondary);
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-primary);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-column a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--color-text-muted);
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .tagline-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tagline-text {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .tagline-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}
