:root {
    /* Sistema de colores: Azul Eléctrico - Tech/Startup */
    --primary-rgb: 59, 130, 246;
    
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;     /* Hover states */
    --primary-500: #3b82f6;     /* BASE: Azul Eléctrico */
    --primary-600: #2563eb;     /* Active/Deep */
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    --bg-primary: #000000;
    --bg-secondary: #09090B;
    --bg-tertiary: #18181B;

    --text-primary: #FFFFFF;
    --text-secondary: #E4E4E7;
    --text-tertiary: #A1A1AA;
    --text-quaternary: #71717A;

    --success: #22C55E;
    --info: #3B82F6;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Typografía */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Tipografía Básica */
h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

h1.hero-title {
    font-size: clamp(3rem, 5vw, 4.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h1.hero-title span {
    background: linear-gradient(135deg, var(--primary-300), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(var(--primary-rgb), 0.3));
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-tertiary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px auto;
}

.text-left { text-align: left; margin-left: 0; }
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }

/* Contenedores Principales */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    height: 48px;
    width: 48px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    bottom: -4px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.mobile-link {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Botones */
.btn-primary {
    background: linear-gradient(
        135deg,
        var(--primary-600) 0%,
        var(--primary-500) 30%,
        var(--primary-400) 60%,
        var(--primary-500) 100%
    );
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    color: #ffffff;
    font-weight: 600;
    font-family: var(--font-body);
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    box-shadow: 
        0 0 0 1px rgba(var(--primary-rgb), 0.5),
        0 4px 24px rgba(var(--primary-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.125rem;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
    box-shadow: 
        0 0 0 2px rgba(var(--primary-rgb), 0.8),
        0 8px 40px rgba(var(--primary-rgb), 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(var(--primary-rgb), 0.5);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 20px rgba(var(--primary-rgb), 0.0);
}

.btn-outline:hover {
    border-color: var(--primary-500);
    box-shadow: inset 0 0 20px rgba(var(--primary-rgb), 0.2);
    background: rgba(var(--primary-rgb), 0.05);
}

/* Components Reutilizables */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(var(--primary-rgb), 0.08) 0%,
        rgba(var(--primary-rgb), 0.04) 50%,
        rgba(var(--primary-rgb), 0.08) 100%
    );
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 25px 50px -12px rgba(var(--primary-rgb), 0.35);
    transform: translateY(-4px);
}

.glow-primary {
    filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.6))
            drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.4))
            drop-shadow(0 0 60px rgba(var(--primary-rgb), 0.3));
}

/* Efectos Background / Partículas */
.particles-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-300);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(var(--primary-rgb), 0.8);
    opacity: 0.4;
    animation: float-particle 20s infinite ease-in-out;
}

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

.hero-bg-gradient {
    position: absolute;
    top: -20%; left: -10%;
    width: 60%; height: 60%;
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 90%;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.label-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-300);
    margin-bottom: 24px;
}

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

.sphere {
    width: clamp(300px, 40vw, 450px);
    height: clamp(300px, 40vw, 450px);
    position: relative;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.sphere-inner {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--primary-rgb), 0.2) 100%);
    border-radius: 50%;
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    box-shadow: 
        0 0 60px rgba(var(--primary-rgb), 0.4),
        0 0 120px rgba(var(--primary-rgb), 0.3),
        inset 0 0 60px rgba(var(--primary-rgb), 0.2);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

/* Social Proof Metrics */
.social-proof {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    padding: 40px 0;
    position: relative;
    z-index: 2;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.metric-number {
    font-size: 2.5rem;
    color: var(--primary-400);
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Flip Cards Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.service-card-flip {
    perspective: 1000px;
    height: 400px;
    cursor: pointer;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* En Desktop se flipea al hover */
@media (hover: hover) and (pointer: fine) {
    .service-card-flip:hover .service-card-inner {
        transform: rotateY(180deg);
    }
}
.service-card-flip.flipped .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.service-card-front {
    background-color: var(--bg-tertiary);
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card-flip:hover .service-image {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 40px 24px 24px;
    text-align: left;
}

.service-title-front {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.service-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px;
    background: var(--bg-secondary); /* Fallback */
}

.service-title-back {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--primary-300);
}

.service-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.feature-tag {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary-100);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Features Dashboard (Mockup) */
.features-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.features-list li {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-icon {
    color: var(--primary-400);
    background: rgba(var(--primary-rgb), 0.15);
    border-radius: 50%;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.terminal-mockup {
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #1e293b;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.terminal-header {
    background: #1e293b;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.terminal-title {
    margin-left: auto;
    color: #94a3b8;
    margin-right: auto;
}

.terminal-body {
    padding: 24px;
    color: #e2e8f0;
    line-height: 1.8;
}

.terminal-body .prompt {
    color: var(--primary-400);
    margin-right: 8px;
}

.terminal-body .output {
    color: #94a3b8;
    margin-bottom: 12px;
}
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Final CTA / Contact Form */
.final-cta {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.cta-gradient-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(var(--primary-rgb), 0.2) 0%, var(--bg-primary) 70%);
    z-index: 0;
}

.final-cta .container { position: relative; z-index: 1; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--text-quaternary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
    background: rgba(var(--primary-rgb), 0.1);
}

.form-control:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}
select.form-control option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.w-100 {
    width: 100%;
}

.pulse-animation {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    background: var(--bg-secondary);
    padding: 64px 0 24px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    width: 32px; height: 32px;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-quaternary);
    font-size: 0.875rem;
}

.footer-social a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 16px;
    font-weight: 600;
}

/* Animaciones y Clases Auxiliares */
.animated-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animated-element.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
    75% { transform: translateY(-30px) rotate(1deg); }
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    25% { transform: translate(100px, -100px); opacity: 0.8; }
    50% { transform: translate(-50px, -200px); opacity: 0.6; }
    75% { transform: translate(-100px, -100px); opacity: 0.8; }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 0 0 1px rgba(var(--primary-rgb), 0.5),
            0 4px 24px rgba(var(--primary-rgb), 0.4),
            0 0 60px rgba(var(--primary-rgb), 0.3);
    }
    50% {
        box-shadow: 
            0 0 0 2px rgba(var(--primary-rgb), 0.8),
            0 8px 40px rgba(var(--primary-rgb), 0.6),
            0 0 80px rgba(var(--primary-rgb), 0.5);
    }
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    background-color: #128C7E;
    animation: none;
}

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

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .contact-info.text-left {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-btn svg {
        width: 28px;
        height: 28px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-cta-group {
        justify-content: center;
    }
    .hero-subtitle {
        margin: 0 auto 32px auto;
    }
    .nav-links, .nav-cta {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .features-wrapper {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    /* Reducir particulas en mobile */
    .particle:nth-child(n+20) {
        display: none;
    }
}
