@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@700;800&display=swap');

:root {
    /* Fondos */
    --bg-primary: #000000;
    --bg-secondary: #09090B;
    --bg-tertiary: #18181B;

    /* Acento Primario: Azul Eléctrico (#3B82F6) */
    --primary-50: #EFF6FF;
    --primary-100: #DBEAFE;
    --primary-200: #BFDBFE;
    --primary-300: #93C5FD;
    --primary-400: #60A5FA;
    --primary-500: #3B82F6;
    --primary-600: #2563EB;
    --primary-700: #1D4ED8;
    --primary-800: #1E40AF;
    --primary-900: #1E3A8A;
    --primary-rgb: 59, 130, 246;

    /* 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 {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-500);
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mt-4 {
    margin-top: 4rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

/* Effects */
.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);
}

.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);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
@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%;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flex-gap-pulse {
    0% {
        gap: 1rem;
    }

    50% {
        gap: 1.5rem;
    }

    100% {
        gap: 1rem;
    }
}

/* 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);
    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;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
}

.nav-logo img {
    height: 48px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-400);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border: none;
    text-align: center;
}

.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;
    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);
}

.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;
    border: 1px solid var(--primary-500);
    color: var(--primary-400);
}

.btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
    transform: translateY(-2px);
}

/* Background Particles */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-400);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-500);
    animation: float-particle 15s infinite ease-in-out;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: radial-gradient(ellipse at top, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-label {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 100px;
    color: var(--primary-300);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-200) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-visual {
    position: relative;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
    display: flex;
    justify-content: center;
}

.sphere {
    width: 450px;
    height: 450px;
    position: relative;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.sphere img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow:
        0 0 60px rgba(var(--primary-rgb), 0.3),
        0 0 120px rgba(var(--primary-rgb), 0.2);
}

/* Logos Section Carousel */
.social-proof {
    padding: 4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.logos-carousel {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    margin-top: 4rem;
    width: 100%;
    /* Efecto de fade en los bordes para que parezca que desaparecen/aparecen */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logos-track {
    display: inline-flex;
    align-items: center;
    gap: 4rem;
    /* espacio entre logos */
    animation: scroll-carousel 40s linear infinite;
    padding-left: 2rem;
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 2rem));
    }

    /* Desplaza la mitad exacta */
}

.logos-track:hover {
    animation-play-state: paused;
}

.logo-item {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
    transition: opacity 0.3s;
    height: 50px;
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.logo-item img {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
}

.logo-item:hover {
    opacity: 1;
}

/* Services Flip Cards */
.services-section {
    padding: 8rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.service-card-flip {
    background-color: transparent;
    width: 100%;
    height: 400px;
    perspective: 1000px;
}

.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-secondary);
}

.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;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    text-align: left;
}

.service-title-front {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.service-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    text-align: center;
}

.service-title-back {
    color: var(--primary-400);
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.feature-tag {
    display: inline-block;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: var(--primary-200);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    margin: 4px;
}

/* Portfolio / Showcase grid */
.showcase-section {
    padding: 6rem 0;
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.05) 0%, transparent 70%);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.metric-card {
    text-align: center;
}

.metric-number {
    font-size: 3rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--primary-500);
    font-weight: 800;
}

.metric-label {
    color: var(--text-secondary);
}

/* Contact Form Section */
.contact-section {
    padding: 8rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' 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 1rem center;
    background-size: 1em;
}

.form-control option {
    margin: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* Submitting State */
.btn-primary.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-400);
}

/* Utility Animations */
.animate-in {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden-scroll {
    opacity: 0;
    transform: translateY(30px);
}

/* Responsive */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta a {
        width: 100%;
        margin-bottom: 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .sphere {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}