: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;

    /* Variables RGB para Glow */
    --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;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    position: relative;
}

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

/* Typography Hierarchy */
h1 {
    font-size: 76px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-secondary);
}

.label-top {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-400);
}

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

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-500);
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.4;
    animation: float-particle 20s infinite ease-in-out;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.2;
    }

    25% {
        transform: translate(100px, -100px);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50px, -200px);
        opacity: 0.4;
    }

    75% {
        transform: translate(-100px, -100px);
        opacity: 0.5;
    }
}

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

/* 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-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

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

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

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

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

.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;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-toggle .bar {
    width: 24px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
}

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

/* Buttons */
.btn-primary,
.btn-primary-small {
    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;
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    display: inline-block;
    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);
    cursor: pointer;
}

.btn-primary-small {
    padding: 10px 24px;
    font-size: 14px;
}

.btn-primary:hover,
.btn-primary-small: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 {
    padding: 16px 32px;
    border-radius: 12px;
    border: 1px solid var(--primary-500);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

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

/* Animations */
@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@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 fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-text {
    z-index: 2;
}

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

.glow-text {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 0 10px rgba(var(--primary-rgb), 0.4),
        0 0 20px rgba(var(--primary-rgb), 0.2);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

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

/* Hero 3D Element */
.hero-visual-container {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fade-in-rotate 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

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

.sphere-inner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    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);
}

/* Social Proof */
.social-proof {
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.metric-item {
    padding: 24px;
}

.metric-item h3 {
    font-size: 48px;
    color: var(--primary-500);
    display: inline-block;
}

.metric-item span {
    font-size: 48px;
    color: var(--primary-500);
    font-weight: bold;
}

/* Section Common */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header p {
    max-width: 600px;
    margin: 20px auto 0;
}

/* Servicios (Flip Cards) */
.servicios {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.service-card-flip {
    background-color: transparent;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
    opacity: 0;
    /* Para animación de scroll */
}

.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 {
    transform: rotateY(180deg);
}

.service-card-flip.flipped .service-card-inner {
    transform: rotateY(180deg);
    /* Para mobile */
}

.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%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 20px;
    text-align: left;
}

.service-title-front {
    color: white;
    margin: 0;
}

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

.service-title-back {
    color: var(--primary-400);
    margin-bottom: 16px;
}

.service-description {
    font-size: 15px;
    margin-bottom: 24px;
}

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

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

/* Portfolio & Sobre mi */
.portfolio {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.sobre-mi {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.about-img {
    width: 100%;
    border-radius: 24px;
}

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

.about-content p {
    margin: 20px 0;
}

/* Testimonios */
.testimonios {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.stars {
    color: var(--primary-500);
    font-size: 24px;
    margin-bottom: 16px;
}

/* CTA Final */
.cta-final {
    padding: 100px 24px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-content {
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
}

.cta-content h2 {
    margin-bottom: 16px;
}

.cta-content p {
    margin-bottom: 32px;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 24px 20px;
    background: var(--bg-secondary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 80px;
    margin-bottom: 16px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: white;
}

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

.footer-col a:hover {
    color: var(--primary-500);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Formulario de Contacto */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.form-status {
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    color: var(--success);
}

.form-status.error {
    color: var(--warning);
}

/* Animate In Class */
.animate-in {
    animation: fade-in-up 0.6s forwards;
}

/* Responsive */
@media (max-width: 1023px) {

    .services-grid,
    .portfolio-grid,
    .testimonios-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 56px;
    }
}

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

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

    .hero-content,
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-ctas {
        justify-content: center;
        flex-direction: column;
    }

    .sphere {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }

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

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

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

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 32px;
    }
}