:root {
    /* Fondos */
    --bg-primary: #000000;
    --bg-secondary: #09090B;
    --bg-tertiary: #18181B;

    /* Acentos - Base #2e3e5c */
    --primary-50:  #f0f2f5;
    --primary-100: #dce1eb;
    --primary-200: #bac5db;
    --primary-300: #8ea0c4;
    --primary-400: #677cae; /* Base + 20% brillo approx */
    --primary-500: #2e3e5c; /* Seleccionado */
    --primary-600: #25324a; /* Base - 10% brillo approx */
    --primary-700: #1f293d; /* Base - 20% */
    --primary-800: #192132;
    --primary-900: #141b27;

    --primary-rgb: 46, 62, 92; /* Para rgba() */

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

    /* Acentos Secundarios */
    --success: #22C55E;
    --info: #3B82F6;
    --warning: #F59E0B;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.text-sm { font-size: 0.875rem; }

/* Tipografía */
h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; line-height: 1.2; margin-bottom: 24px; }
h3 { font-size: 24px; font-weight: 600; line-height: 1.3; margin-bottom: 16px; }

/* Background Gradient & Particles */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at top, rgba(var(--primary-rgb), 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: -2;
}

#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-300);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-400);
    opacity: 0;
    animation: float-particle linear infinite;
}

/* Animations Core */
@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.2; }
    25% { transform: translate(60px, -60px); opacity: 0.6; }
    50% { transform: translate(-30px, -120px); opacity: 0.4; }
    75% { transform: translate(-60px, -60px); opacity: 0.6; }
}

@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%; }
}

@keyframes fade-in-up {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fade-in-rotate {
    0% { opacity: 0; transform: rotate(-10deg) scale(0.9); }
    100% { opacity: 1; transform: rotate(0) scale(1); }
}

/* Components */
.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);
}

.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-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    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);
    display: inline-block;
    cursor: pointer;
}

.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);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    border-color: var(--primary-400);
    background: rgba(var(--primary-rgb), 0.1);
}

.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));
}

.glow-text {
    text-shadow: 
        0 0 10px rgba(var(--primary-rgb), 0.8),
        0 0 20px rgba(var(--primary-rgb), 0.6),
        0 0 40px rgba(var(--primary-rgb), 0.4);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-200) 0%, var(--primary-400) 50%, var(--primary-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 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.2);
    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-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 48px;
    width: auto;
}

.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

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

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

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

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-secondary);
    z-index: 999;
    padding-top: 100px;
}
.mobile-menu.active {
    display: block;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

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

.hero-content {
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-label {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(var(--primary-rgb), 0.15);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 24px 0 40px;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-cta {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: scale-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s forwards;
}

.hero-visual {
    opacity: 0;
    animation: fade-in-rotate 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    display: flex;
    justify-content: center;
}

.sphere {
    width: 400px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.sphere-inner {
    width: 100%;
    height: 100%;
    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);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-image-3d {
    width: 140%;
    height: 140%;
    object-fit: cover;
    opacity: 0.8;
    mix-blend-mode: screen;
}

/* Social Proof */
.social-proof {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-secondary);
}

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

.metrics-grid h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-400);
    margin-bottom: 8px;
}

.metrics-grid p {
    color: var(--text-tertiary);
    font-size: 1rem;
    font-weight: 500;
}

/* Servicios Section */
.services {
    padding: 120px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.25rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Flip Cards */
.service-card-flip {
    background-color: transparent;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
    opacity: 0;
}

.service-card-flip.animate-in {
    animation: fade-in-up 0.6s forwards;
}

.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;
}

.service-card-flip:hover .service-card-inner,
.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.8s ease;
}

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

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

.service-title-front {
    color: #fff;
    margin: 0;
    font-size: 1.5rem;
}

.service-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px;
    text-align: center;
}

.service-title-back {
    color: var(--primary-200);
}

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

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

.feature-tag {
    background: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-100);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    margin-bottom: 24px;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.125rem;
}

.small-card {
    padding: 16px 24px;
    font-weight: 600;
    display: inline-block;
    margin-right: 16px;
    margin-bottom: 16px;
}

/* Testimonials */
.testimonials {
    padding: 120px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.testimonial-card {
    position: relative;
    padding-top: 40px;
}

.quote-icon {
    font-size: 5rem;
    font-family: serif;
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.2;
    line-height: 1;
}

.testimonial-text {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-600);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    border: 2px solid var(--primary-400);
}

/* Final CTA */
.final-cta {
    padding: 140px 0;
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.2) 0%, var(--bg-primary) 70%);
}

.cta-title {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-btn {
    animation: pulse-glow 3s ease-in-out infinite;
    font-size: 1.125rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 30px;
}

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

.footer-logo {
    height: 40px;
    margin-bottom: 24px;
}

.footer-brand p {
    color: var(--text-tertiary);
}

.footer-links h4 {
    color: var(--text-primary);
    margin-bottom: 24px;
}

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

.footer-links li {
    margin-bottom: 12px;
    color: var(--text-tertiary);
}

.footer-links a {
    transition: color 0.3s;
}

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

.copyright {
    text-align: center;
    color: var(--text-quaternary);
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Breakpoints */
@media (min-width: 1440px) {
    .container { max-width: 1400px; }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .services-grid { gap: 20px; }
}

@media (max-width: 1023px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-cta {
        justify-content: center;
    }
    .hero-visual {
        margin-top: 60px;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }
    
    .hero-title { font-size: 2.5rem; }
    .sphere { width: 250px; height: 250px; }
    
    .services-grid, 
    .testimonials-grid,
    .metrics-grid,
    .footer-grid { 
        grid-template-columns: 1fr; 
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .particle:nth-child(n+20) {
        display: none;
    }
}
