/* LomitoLabs Landing Page - Estilos Optimizados */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset y base optimizados */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2C3E50;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Optimización para mejor rendimiento */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reducir repaints en animaciones */
.hero-image,
.code-element {
    will-change: transform;
}

/* Header optimizado */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(44, 62, 80, 0.1);
    transition: background-color 0.3s ease;
    contain: layout style;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #2C3E50;
}

.logo-lab {
    color: #4ECDC4;
    font-weight: 600;
}

.logo-dot {
    color: #FF6B6B;
    margin: 0 4px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #2C3E50;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #4ECDC4;
}

.cta-button {
    background: linear-gradient(135deg, #FF6B6B, #ff8a80);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Hero Section optimizado */
.hero {
    background: linear-gradient(135deg, #2C3E50 0%, #34495e 50%, #4ECDC4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    contain: layout style;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, #ffffff 2px, transparent 2px),
        radial-gradient(circle at 80% 50%, #ffffff 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B6B, #ff8a80);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #4ECDC4;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
}

/* Optimización de animaciones para mejor rendimiento */
@keyframes float {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg); 
    }
    50% { 
        transform: translate3d(0, -20px, 0) rotate(1deg); 
    }
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.code-element {
    position: absolute;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: fadeFloat 8s ease-in-out infinite;
}

.code-1 { 
    top: 20%; 
    left: 10%; 
    animation-delay: 0s; 
}

.code-2 { 
    top: 70%; 
    right: 10%; 
    animation-delay: 3s; 
}

.code-3 { 
    top: 40%; 
    right: 20%; 
    animation-delay: 6s; 
}

@keyframes fadeFloat {
    0%, 100% { 
        opacity: 0.3; 
        transform: translate3d(0, 0, 0); 
    }
    50% { 
        opacity: 0.7; 
        transform: translate3d(0, -10px, 0); 
    }
}

/* Reducir animaciones para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .hero-image,
    .code-element {
        animation: none;
    }
    
    .btn-primary:hover,
    .btn-secondary:hover,
    .cta-button:hover {
        transform: none;
    }
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: #f8f9fb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2C3E50;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #7F8C8D;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    contain: layout style;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transform: rotate(-10deg);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2C3E50;
}

.service-description {
    color: #7F8C8D;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #5D6D7E;
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: #2ECC71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.about-visual {
    position: relative;
    text-align: center;
}

/* Technology Section optimizada */
.technology {
    padding: 6rem 0;
    background: #f8f9fb;
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.tech-category {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.1);
    transition: transform 0.3s ease;
    contain: layout style;
}

.tech-category:hover {
    transform: translateY(-5px);
}

.tech-category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.tech-category-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    border-radius: 2px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.tech-badge {
    background: linear-gradient(135deg, #4ECDC4, #45B7D1);
    color: white;
    padding: 0.8rem 0.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-height: 80px;
    justify-content: center;
    contain: layout style;
}

.tech-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

.tech-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Optimización de filtros para iconos */
.tech-badge:not(.no-filter) .tech-icon {
    filter: brightness(0) invert(1);
}

/* Iconos que se ven mejor sin filtro */
.tech-badge.no-filter .tech-icon {
    filter: none;
}

/* Colores diferentes por categoría - optimizado */
.tech-category:nth-child(1) .tech-badge {
    background: linear-gradient(135deg, #FF6B6B, #ff8a80);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.tech-category:nth-child(1) .tech-badge:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.tech-category:nth-child(2) .tech-badge {
    background: linear-gradient(135deg, #4ECDC4, #45B7D1);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.tech-category:nth-child(2) .tech-badge:hover {
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

.tech-category:nth-child(3) .tech-badge {
    background: linear-gradient(135deg, #45B7D1, #3498db);
    box-shadow: 0 4px 15px rgba(69, 183, 209, 0.3);
}

.tech-category:nth-child(3) .tech-badge:hover {
    box-shadow: 0 8px 25px rgba(69, 183, 209, 0.4);
}

.tech-category:nth-child(4) .tech-badge {
    background: linear-gradient(135deg, #2C3E50, #34495e);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.tech-category:nth-child(4) .tech-badge:hover {
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.4);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    padding: 6rem 0;
    text-align: center;
    color: white;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.cta-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #2C3E50;
    transition: all 0.3s ease;
}

.cta-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.cta-textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #2C3E50;
    resize: vertical;
    min-height: 100px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.cta-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.cta-submit {
    background: #2C3E50;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    align-self: center;
    min-width: 200px;
}

.cta-submit:hover {
    background: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.3);
}

.cta-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-status {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.form-status.success {
    background: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.form-status.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.form-status.loading {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Footer */
.footer {
    background: #2C3E50;
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #4ECDC4;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: #4ECDC4;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive optimizado */
@media (max-width: 768px) {
    .nav {
        padding: 0 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-form {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .cta-submit {
        min-width: 100%;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .service-card,
    .tech-category {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.8rem 1.5rem;
        width: 100%;
        text-align: center;
    }
}

/* Optimizaciones adicionales para Core Web Vitals */

/* Mejorar FID - Reducir tareas largas de JavaScript */
.tech-badge,
.service-card {
    contain: layout style;
}

/* Optimizar CLS - Prevenir layout shifts */
.hero-image {
    aspect-ratio: 4/3;
    object-fit: cover;
}

.tech-icon {
    display: block;
    width: 24px;
    height: 24px;
}

/* Mejorar LCP - Optimizar recursos críticos */
.hero {
    contain: layout style;
}

/* Preload hint para navegadores */
@media (min-width: 769px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Optimización de memoria para animaciones */
@media (prefers-reduced-motion: no-preference) {
    .hero-image {
        will-change: transform;
    }
    
    .code-element {
        will-change: transform, opacity;
    }
}

/* Clean up will-change después de las animaciones */
.hero-image:hover,
.code-element:hover {
    will-change: auto;
}

/* Optimización de renderizado para scroll */
.header {
    transform: translate3d(0, 0, 0);
}

/* Optimización de fuentes */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyeMZs.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Lazy loading para imágenes fuera de viewport */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}