:root {
    --bg-color: #080818;
    --text-main: #f0f0f5;
    --text-muted: #94a3b8;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #06b6d4;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden; /* evita scroll horizontal en móvil */
}

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

/* Background Effects */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    top: 40%;
    right: -200px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* z-index: 2 so it floats above sections with z-index:2, but
       still behind hero-content (z-index:3). On mobile, fixed
       elements are in the root stacking context, not inside .hero,
       so particles correctly overlay the hero bg-wrapper. */
    z-index: 2;
}

.particle {
    position: absolute;
    background-color: rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: drift linear infinite;
}

@keyframes drift {
    from { transform: translateY(100vh); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    to { transform: translateY(-10vh); opacity: 0; }
}

/* Typography & Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 800;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(8, 8, 24, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

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

.btn-login {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    /* isolation creates a new stacking context so z-index values
       are scoped here — prevents bg-wrapper from going below body bg on mobile */
    isolation: isolate;
}

/* Hero background image + gradient overlay (behind particles) */
.hero-bg-wrapper {
    position: absolute;
    inset: 0;
    /* z-index: 0 instead of -1: stays inside hero's stacking context,
       visible on all mobile browsers (iOS Safari / Android Chrome) */
    z-index: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    transition: opacity .3s;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 3;  /* Above bg-wrapper(0) + particles(1) */
}

/* Non-hero sections rise above fixed particles */
.stats-section, .features-section, .steps-section,
.roles-section, .cta-section, footer {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.btn-outline {
    padding: 1rem 2rem;
}

.w-100 { width: 100%; }

/* Stats */
.stats-section {
    padding: 4rem 0;
}

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

.stat-card {
    text-align: center;
    padding: 2.5rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Features */
.features-section {
    padding: 6rem 0;
}

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

.feature-card {
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4), inset 0 0 20px rgba(139,92,246,0.1);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.icon-wrapper svg {
    width: 30px;
    height: 30px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
}

.feature-card p {
    color: var(--text-muted);
}

/* How it works */
.steps-section {
    padding: 6rem 0;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    position: relative;
}

.step {
    text-align: center;
}

.step-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(34,211,238,0.2));
    border: 1px solid var(--glass-border);
    color: #fff;
}

.step h3 { margin-bottom: 1rem; }
.step p { color: var(--text-muted); }

/* Roles */
.roles-section {
    padding: 6rem 0;
}

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

.role-card {
    padding: 2rem;
}

.role-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.role-card ul {
    list-style: none;
    color: var(--text-muted);
}

.role-card li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.role-card li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--secondary);
}

/* CTA & Contact */
.cta-section {
    padding: 6rem 0;
}

.cta-banner {
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(8,8,24,0.4));
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
}
.whatsapp-btn:hover {
    background: #128C7E;
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.6);
}

.glass-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
}

.glass-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0,0,0,0.4);
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--glass-border);
    padding: 1.5rem 0;
    margin-top: 4rem;
}

.landing-footer .footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.landing-footer .footer-bottom a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.landing-footer .footer-bottom a:hover {
    color: #fff;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .stats-grid, .steps-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .cta-banner {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    /* Hamburger: posicionado absolutamente en la esquina derecha del navbar */
    .hamburger {
        display: flex !important;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        z-index: 1100;
        padding: 8px;
        cursor: pointer;
        flex-direction: column;
        gap: 6px;
        background: rgba(139, 92, 246, 0.15);
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.15);
    }

    .hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
    }

    /* El navbar necesita position:relative para que absolute funcione */
    .navbar {
        position: fixed;
    }

    /* El nav-container necesita position:relative */
    .nav-container {
        position: relative;
        padding-right: 60px; /* espacio para el hamburger */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background: rgba(8,8,24,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        padding: 2rem;
        z-index: 1050;
    }

    .nav-links.active { right: 0; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
    
    .hero h1 { font-size: 2.5rem; }
    .hero-ctas { flex-direction: column; }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}
