/* ===========================
   Variables CSS - Paleta de Colores
   =========================== */
:root {
    /* Colores principales */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-secondary: #ec4899;
    --color-accent: #f59e0b;
    
    /* Fondos */
    --color-bg: #0f0f0f;
    --color-bg-secondary: #1a1a1a;
    --color-bg-tertiary: #252525;
    
    /* Texto */
    --color-text: #ffffff;
    --color-text-secondary: #a1a1aa;
    
    /* Bordes */
    --color-border: #27272a;
    
    /* Fuentes */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    
    /* Sombras */
    --shadow-small: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-medium: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-large: 0 20px 25px -5px rgb(0 0 0 / 0.3);
    --shadow-glow: 0 0 50px rgba(99, 102, 241, 0.3);
}

/* ===========================
   Reset y Estilos Base
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===========================
   Contenedores
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===========================
   Sección Hero
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    z-index: -1;
}

/* Efecto de partículas animadas en el fondo */
.hero-background::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(circle, rgba(99, 102, 241, 0.15) 1px, transparent 1px),
        radial-gradient(circle, rgba(236, 72, 153, 0.15) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 40px;
    animation: moveParticles 20s linear infinite;
}

@keyframes moveParticles {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1, #ec4899, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 80px rgba(99, 102, 241, 0.5);
}

/* ===========================
   Sección Beneficios
   =========================== */
.benefits {
    padding: 6rem 0;
    background-color: var(--color-bg-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card {
    background-color: var(--color-bg-tertiary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.benefit-card:hover h3 {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.benefit-card p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ===========================
   Sección Servicios
   =========================== */
.services {
    padding: 6rem 0;
    background-color: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-tertiary));
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.service-card p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    color: var(--color-text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* ===========================
   Sección Contacto
   =========================== */
.contact {
    padding: 6rem 0;
    background-color: var(--color-bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-benefit {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

/* Formulario */
.contact-form {
    background-color: var(--color-bg-tertiary);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 80px rgba(99, 102, 241, 0.5);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 3rem 0;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
}

.footer-tagline {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-info p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 968px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero {
        padding: 1rem;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .benefits,
    .services,
    .contact {
        padding: 4rem 0;
    }
    
    .benefits-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .benefit-card,
    .service-card {
        padding: 1.5rem;
    }
}

/* ===========================
   Animaciones de entrada
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Asegurar que los elementos empiecen ocultos */
.benefit-card,
.service-card,
.timeline-item,
.contact-info,
.contact-form {
    opacity: 0;
    transform: translateY(30px);
}

/* Cuando se añade la clase fade-in-up, se animan */
.benefit-card.fade-in-up,
.service-card.fade-in-up,
.timeline-item.fade-in-up,
.contact-info.fade-in-up,
.contact-form.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Sección Proceso de Trabajo
   =========================== */
.process {
    padding: 6rem 0;
    background-color: var(--color-bg);
    position: relative;
    overflow: hidden;
}

.process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent, 
        var(--color-primary) 20%, 
        var(--color-secondary) 50%, 
        var(--color-accent) 80%, 
        transparent
    );
    transform: translateX(-50%);
    opacity: 0.3;
}

.timeline {
    max-width: 900px;
    margin: 4rem auto;
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.timeline-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-tertiary));
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    position: relative;
    z-index: 2;
}

.timeline-content {
    background-color: var(--color-bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--color-primary);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
    transform: translateX(5px);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline-content p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.timeline-connector {
    height: 60px;
    width: 2px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    margin: -2rem auto 0;
    margin-left: 39px;
    opacity: 0.5;
}

/* Animaciones Visuales */
.timeline-visual {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: var(--color-bg-tertiary);
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animación del Formulario */
.form-animation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.form-lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-line {
    height: 8px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    border-radius: 4px;
    animation: fillLine 2s ease-in-out infinite;
}

.form-line:nth-child(1) { width: 120px; }
.form-line:nth-child(2) { width: 150px; animation-delay: 0.3s; }
.form-line:nth-child(3) { width: 100px; animation-delay: 0.6s; }

@keyframes fillLine {
    0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

.send-icon {
    font-size: 2rem;
    animation: sendPulse 2s ease-in-out infinite;
}

@keyframes sendPulse {
    0%, 100% { transform: translateX(0) scale(1); opacity: 1; }
    50% { transform: translateX(10px) scale(1.2); opacity: 0.7; }
}

/* Animación de Reunión */
.meeting-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.meeting-screens {
    display: flex;
    gap: 1rem;
}

.screen {
    width: 60px;
    height: 45px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 8px;
    opacity: 0.7;
    animation: screenBlink 2s ease-in-out infinite;
}

.screen:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes screenBlink {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
}

.handshake {
    font-size: 2.5rem;
    animation: shake 2s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Animación de Desarrollo */
.dev-animation {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.code-lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code-line {
    height: 6px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    border-radius: 3px;
    animation: codeFill 3s ease-in-out infinite;
}

.code-line.short { width: 80px; }
.code-line.medium { width: 120px; animation-delay: 0.5s; }
.code-line.long { width: 150px; animation-delay: 1s; }

@keyframes codeFill {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.gear-icon {
    font-size: 2.5rem;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animación de Éxito */
.success-animation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.rocket {
    font-size: 3rem;
    animation: rocketLaunch 2s ease-in-out infinite;
}

@keyframes rocketLaunch {
    0%, 100% { transform: translateY(0) rotate(-45deg); }
    50% { transform: translateY(-20px) rotate(-45deg); }
}

.success-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #22c55e, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: countUp 2s ease-in-out infinite;
}

@keyframes countUp {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* CTA del Proceso */
.process-cta {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 16px;
    border: 1px solid var(--color-border);
}

.process-highlight {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #ec4899, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive para Proceso */
@media (max-width: 768px) {
    .process::before {
        left: 40px;
    }

    .timeline-item {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .timeline-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .timeline-connector {
        margin-left: 29px;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .form-animation,
    .success-animation {
        flex-direction: column;
        gap: 1rem;
    }

    .success-stats {
        gap: 1rem;
    }

    .process-highlight {
        font-size: 1.1rem;
    }
}