/* 
  LiberLink - Design System
  Color: #474ED7 (Royal Indigo)
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500&display=swap');

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

    /* Acento Primario: #474ED7 */
    --primary-50: #EFF0FE;
    --primary-100: #DEE1FD;
    --primary-200: #BDC2FB;
    --primary-300: #9CA3F9;
    --primary-400: #717BF4;
    --primary-500: #474ED7;
    --primary-600: #3941AE;
    --primary-700: #2C3288;
    --primary-800: #1E2362;
    --primary-900: #11143D;
    --primary-rgb: 71, 78, 215;

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

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

    /* Layout */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    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, .display-font {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

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

section {
    padding: 120px 0;
}

/* --- Glassmorphism --- */
.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: var(--transition);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.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);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

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

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    padding: 16px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.nav-logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

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

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

.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 {
    color: var(--text-primary);
}

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

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
}

.hero-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-400);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title span {
    background: linear-gradient(135deg, #fff 30%, var(--primary-400) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

.hero-visual img {
    width: 100%;
    max-width: 600px;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.3));
}

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

.partners-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.partner-logo {
    color: var(--text-quaternary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    opacity: 0.5;
    transition: var(--transition);
}

.partner-logo:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* --- Services (Flip Cards) --- */
.services-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    color: var(--primary-500);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    display: block;
}

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

.service-card-flip {
    perspective: 1000px;
    height: 400px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.service-card-flip:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.service-card-front {
    background: var(--bg-tertiary);
}

.service-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card-flip:hover .service-card-front img {
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.service-title-front {
    font-size: 1.5rem;
    font-weight: 700;
}

.service-card-back {
    transform: rotateY(180deg);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--primary-950) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.service-title-back {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-400);
}

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

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

.feature-tag {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-300);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* --- Showcase --- */
.showcase {
    background: var(--bg-secondary);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 60px;
}

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

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    text-align: center;
    padding: 40px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-500);
    display: block;
}

.stat-label {
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* --- Final CTA --- */
.cta-final {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 60%);
    z-index: 0;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
}

.pulse-button {
    animation: pulse-glow 3s ease-in-out infinite;
    padding: 20px 48px;
    font-size: 1.1rem;
}

/* --- Footer --- */
footer {
    padding: 80px 0 40px;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-brand .nav-logo img {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-500);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-quaternary);
    font-size: 0.9rem;
}

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

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(var(--primary-rgb), 0.4);
    border-radius: 50%;
    animation: float-particle 20s infinite ease-in-out;
}

/* --- Animations --- */
@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 float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    50% { transform: translate(100px, -100px); opacity: 0.8; }
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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


/* --- Contact Section --- */
.contact-section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

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

.contact-info {
    padding-top: 48px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 1.5rem;
    background: rgba(var(--primary-rgb), 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.contact-form {
    padding: clamp(24px, 5vw, 48px);
    max-width: 700px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: clamp(16px, 4vw, 24px);
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 20px;
    color: #fff;
    font-family: inherit;
    transition: var(--transition);
}

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

/* --- Responsive Adjustments (Consolidated) --- */
@media (max-width: 1200px) {
    .container { padding: 0 32px; }
    .hero-title { font-size: 4rem; }
    .contact-grid { gap: 40px; }
}

@media (max-width: 1024px) {
    .container { padding: 0 40px; }
    .hero-title { font-size: 3.5rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-info { text-align: center; padding-top: 0; }
    .contact-form-container { width: 100%; display: flex; justify-content: center; }
    .contact-form { width: 100%; max-width: 600px; }
    .contact-info .section-label { margin: 0 auto 12px; }
    .contact-details { display: flex; justify-content: center; gap: 40px; text-align: left; }
    .showcase-grid { grid-template-columns: 1fr; gap: 40px; }
    .showcase-text { text-align: center; }
    .showcase-visual { height: 350px; width: 100%; }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    .hero { height: auto; min-height: 100vh; padding-top: 140px; padding-bottom: 80px; }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.1rem; }
    
    .navbar { padding: 12px 0; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(20px); }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link { font-size: 1.5rem; font-weight: 700; }

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

    .mobile-menu-toggle span {
        width: 30px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }

    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-cta { display: none; }
    
    .partners-grid { gap: 30px; justify-content: center; }
    .partner-logo { font-size: 1.1rem; }
    
    .form-row { grid-template-columns: 1fr; }
    .contact-form { padding: 30px 20px; }
    .contact-details { flex-direction: column; align-items: center; gap: 24px; }
    
    .stat-number { font-size: 2.8rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .hero-title { font-size: 2.2rem; }
    .btn { width: 100%; padding: 14px 24px; }
    .hero-actions { flex-direction: column; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card-flip { height: 350px; }
    .stat-card { padding: 20px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    
    /* Ensure no horizontal overflow in the showcase section */
    .showcase-visual .glass-card img {
        width: 120% !important;
    }
}
