/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
   :root {
    --primary: #0084FF;
    --primary-dark: #0066CC;
    --primary-light: #E5F3FF;
    --accent: #FF6B00;
    --accent-light: #FFF0E5;
    --text-main: #111827;
    --text-muted: #6B7280;
    --bg-main: #FFFFFF;
    --bg-alt: #F9FAFB;
    --border: #E5E7EB;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 40px -20px rgba(0, 132, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    border: 3px solid var(--bg-alt); /* Creates padding inside the track */
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Splash Screen Animation
   ========================================================================== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-content {
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

.splash-route {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

#route-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

#route-marker {
    opacity: 0;
}

.splash-logo {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 10vw, 4.5rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -2px;
    opacity: 0;
    transform: translateY(20px);
}

/* Typography Aesthetics */
.brand-gradient {
    background: linear-gradient(135deg, var(--primary), #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.brand-dot {
    color: var(--accent);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 15px 5%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
}

.logo-text {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.language-switch {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.language-switch:hover {
    background: rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 8px 16px -4px rgba(0, 132, 255, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -4px rgba(0, 132, 255, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
}

.btn-secondary:hover {
    color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Store Badge Custom Button */
.store-badge {
    background: linear-gradient(135deg, #FF6B00, #FF3D00); /* Brand Orange Gradient */
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    border-radius: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 24px -5px rgba(255, 80, 0, 0.45);
    border: 1px solid rgba(255,255,255,0.15);
}

.store-badge:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 32px -5px rgba(255, 80, 0, 0.55);
    border-color: rgba(255,255,255,0.25);
}

.store-badge i {
    font-size: 2.2rem;
    color: #fff;
}

.store-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.store-text span {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.store-text strong {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding: 180px 5% 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* Removed overflow:hidden to prevent clipping the 3D map */
}

.hero-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(0, 132, 255, 0.2), rgba(255, 107, 0, 0.1));
}

.blob-2 {
    bottom: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(0, 132, 255, 0.1), rgba(0, 255, 200, 0.1));
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-main);
    letter-spacing: -1.5px;
}

.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: var(--accent-light);
    z-index: -1;
    border-radius: 6px;
    transform: rotate(-2deg);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

/* Social Proof */
.social-proof {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatars {
    display: flex;
}

.avatars img, .avatar-more {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid white;
    margin-left: -15px;
}

.avatars img:first-child {
    margin-left: 0;
}

.avatar-more {
    background-color: var(--bg-alt);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

.social-proof p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Hero Visual & Mockup */
.hero-visual {
    position: relative;
}

.mockup-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Removed transform-style:preserve-3d and perspective — they created a 3D
       stacking context that broke z-index of the floating cards */
}

.mockup-glow {
    position: absolute;
    width: 80%;
    height: 80%;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: 0;
}

.main-mockup {
    position: relative;
    width: 380px; /* Increased base size */
    max-width: 90vw; /* Scales properly on small screens and never exceeds 90% */
    height: auto;
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    z-index: 1;
    /* 3D tilt lives only on the image itself, not propagated to stacking context */
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Hover 3D en JS lo manipulará, pero agregamos clase base */
.main-mockup:hover {
    box-shadow: var(--shadow-hover);
}

/* Floating Cards Parallax */
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    /* Explicit isolation so these always paint above the mockup image */
    z-index: 10;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.5);
    animation: float 6s ease-in-out infinite;
}

.metric-card {
    bottom: 20%;
    left: -30px;
    animation-delay: 0s;
}

.metric-card .icon-box {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.metric-card strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-main);
}

.metric-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.feature-card {
    top: 25%;
    right: -20px;
    padding: 12px 20px;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    animation-delay: -3s;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   Trusted By
   ========================================================================== */
.trusted-by {
    text-align: center;
    padding: 0 5% 80px;
}

.trusted-by p {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.company-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: filter 0.3s, opacity 0.3s;
}

.company-logos:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ==========================================================================
   Features Section (Scroll Snap Target 2)
   ========================================================================== */
.features-section {
    min-height: 100vh;
    padding: 120px 5% 60px;
    background-color: var(--bg-alt);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.features-header {
    max-width: 700px;
    margin-bottom: 60px;
}

.features-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.feature-box {
    background: var(--bg-main);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    text-align: left;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 132, 255, 0.15);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin-bottom: 24px;
}

.feature-box h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.feature-box p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* ==========================================================================
   Legal Pages (Terms, Privacy, Cookies)
   ========================================================================== */
.legal-page {
    background-color: var(--bg-main);
}
.legal-navbar {
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: none;
    background: transparent;
    padding: 20px 5%;
}
.legal-content {
    max-width: 800px;
    margin: 60px auto 100px;
    padding: 0 5%;
    font-family: var(--font-body);
    line-height: 1.8;
}
.legal-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
    color: var(--text-main);
}
.legal-content .last-updated {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 50px;
    font-weight: 500;
}
.legal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 15px;
    color: var(--text-main);
}
.legal-content p, .legal-content li {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #4a5568;
}
.legal-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}
.legal-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: transparent;
    color: var(--text-main);
    padding: 60px 5% 40px;
    margin-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.footer-route-icon {
    width: 60px;
    height: auto;
    margin-bottom: 2px;
}

.footer-logo-text {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.08);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text {
        margin: 0 auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-proof {
        justify-content: center;
    }

    .main-mockup {
        transform: none;
    }
    
    .metric-card {
        left: 5%;
    }
    
    .feature-card {
        right: 5%;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px;
    }
    
    /* Configuración Navbar Mobile */
    .navbar {
        flex-wrap: wrap; /* Permite que el menú caiga abajo */
    }
    .navbar.mobile-open {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .nav-links, .nav-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        margin-top: 20px;
        gap: 20px;
    }
    
    .navbar.mobile-open .nav-links, 
    .navbar.mobile-open .nav-actions {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .hero {
        padding: 140px 5% 50px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .features-section {
        padding: 80px 5% 40px;
    }

    .features-header h2 {
        font-size: 2.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-box {
        padding: 30px 20px;
    }
    
    .company-logos {
        gap: 15px;
        flex-direction: column;
    }
    
    .floating-card {
        transform: scale(0.8); /* Reducimos el tamaño relativo de las tarjetas flotantes en celular */
        transform-origin: center;
        animation: float-mobile 6s ease-in-out infinite;
        z-index: 10; /* Mantener siempre sobre el mockup en mobile */
    }
    
    .metric-card {
        left: 0;
        bottom: 10%;
    }
    
    .feature-card {
        right: 0;
        top: 15%;
    }

    /* Ajustes Footer Móvil */
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@keyframes float-mobile {
    0% { transform: scale(0.8) translateY(0px); }
    50% { transform: scale(0.8) translateY(-10px); }
    100% { transform: scale(0.8) translateY(0px); }
}
