/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue: #4285f4;
    --red: #ea4335;
    --yellow: #fbbc04;
    --green: #34a853;
    --purple: #9b72cb;
    --dark: #202124;
    --gray-100: #f8f9fa;
    --gray-200: #f1f3f4;
    --gray-300: #e8eaed;
    --gray-500: #9aa0a6;
    --gray-700: #5f6368;
    --gray-900: #3c4043;
    --font-primary: 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.6;
    background: #fff;
    overflow-x: hidden;
}

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

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

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-300);
    transition: var(--transition);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--dark);
}

.logo-icon {
    display: block;
    flex-shrink: 0;
    width: auto;
    height: auto;
    max-height: 34px;
    object-fit: contain;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blue);
    transition: var(--transition);
}

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

.nav-cta {
    background: var(--blue);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-cta:hover {
    background: #1a73e8;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* Nav Right Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Language Switcher Dropdown */
.nav-lang {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
    user-select: none;
}

.nav-lang:hover {
    background: var(--gray-100);
    color: var(--blue);
}

.nav-lang svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.nav-lang-current {
    font-weight: 600;
    color: var(--gray-800);
}

.nav-lang-chevron {
    width: 12px;
    height: 12px;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.nav-lang.open .nav-lang-chevron {
    transform: rotate(180deg);
}

.nav-lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--gray-300);
    min-width: 160px;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-lang.open .nav-lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.nav-lang-item:hover {
    background: var(--gray-100);
    color: var(--blue);
}

.nav-lang-item.active {
    color: var(--blue);
    font-weight: 600;
    background: rgba(26, 115, 232, 0.06);
}

.nav-lang-item-flag {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.nav-lang-item-label {
    flex: 1;
}

.nav-lang-item-check {
    width: 14px;
    height: 14px;
    opacity: 0;
    flex-shrink: 0;
}

.nav-lang-item.active .nav-lang-item-check {
    opacity: 1;
}

/* Login Button */
.nav-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--blue);
    color: white;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.nav-login:hover {
    background: #1a73e8;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.nav-login svg {
    width: 14px;
    height: 14px;
}

/* User Avatar (after login) */
.nav-user {
    display: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.nav-user.loggedIn {
    display: flex;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #6c5ce7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    transition: var(--transition);
    border: 2px solid transparent;
}

.nav-avatar:hover {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.nav-username {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-800);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Dropdown */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--gray-300);
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.nav-user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-dropdown a,
.nav-user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.82rem;
    color: var(--gray-700);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.nav-user-dropdown a:hover,
.nav-user-dropdown button:hover {
    background: var(--gray-100);
    color: var(--blue);
}

.nav-user-dropdown svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 24px 60px;
    background: linear-gradient(180deg, #fff 0%, var(--gray-100) 100%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--blue), var(--purple), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray-700);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-btn {
    display: inline-block;
    background: var(--blue);
    color: white;
    padding: 14px 32px;
    border-radius: 28px;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.3);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.4);
}

.hero-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    pointer-events: none;
}

.orbit-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    transform: translate(-50%, -50%);
    opacity: 0.5;
}

.orbit-1 { width: 300px; height: 300px; }
.orbit-2 { width: 480px; height: 480px; }
.orbit-3 { width: 650px; height: 650px; }

.orbit-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    animation: orbit-rotate 20s linear infinite;
}

.dot-1 {
    background: var(--blue);
    animation-duration: 15s;
    transform-origin: -140px 0;
}

.dot-2 {
    background: var(--red);
    animation-duration: 22s;
    transform-origin: -230px 0;
    animation-delay: -5s;
}

.dot-3 {
    background: var(--green);
    animation-duration: 28s;
    transform-origin: -315px 0;
    animation-delay: -10s;
}

.dot-4 {
    background: var(--yellow);
    animation-duration: 18s;
    transform-origin: 180px 0;
    animation-delay: -8s;
}

@keyframes orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Featured Section ===== */
.featured-section {
    padding: 80px 0;
    background: #fff;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: linear-gradient(135deg, #f0f4ff, #fef7ff);
    border-radius: var(--radius-xl);
    padding: 60px;
    border: 1px solid var(--gray-300);
}

.featured-badge {
    display: inline-block;
    background: var(--blue);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.featured-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.featured-desc {
    font-size: 1.05rem;
    color: var(--gray-700);
    margin-bottom: 24px;
    line-height: 1.7;
}

.featured-list {
    list-style: none;
    margin-bottom: 32px;
}

.featured-list li {
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    color: var(--gray-900);
    font-size: 0.95rem;
}

.featured-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    opacity: 0.7;
}

.btn-primary {
    display: inline-block;
    background: var(--blue);
    color: white;
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #1a73e8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-block;
    border: 2px solid var(--gray-300);
    color: var(--dark);
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
    transform: translateY(-1px);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1rem;
}

/* Featured Visual */
.featured-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vlstream-graphic {
    position: relative;
    width: 300px;
    height: 250px;
}

.ai-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 12px;
}

.node-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.node-tl { top: 0; left: 0; }
.node-tr { top: 0; right: 0; }
.node-bl { bottom: 0; left: 0; }
.node-br { bottom: 0; right: 0; }

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ===== Products Section ===== */
.products-section {
    padding: 100px 0;
    background: var(--gray-100);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-700);
}

.product-category {
    margin-bottom: 60px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    border: 1px solid var(--gray-300);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.product-card:hover::before {
    opacity: 1;
}

.product-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.product-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-card p {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.product-tag {
    display: inline-block;
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-highlight {
    border-color: rgba(66, 133, 244, 0.2);
    background: linear-gradient(180deg, #fff, #f8faff);
}

/* ===== Stats Section ===== */
.stats-section {
    padding: 80px 0;
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 24px;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #1a1f36, #2d1b69);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 40px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary {
    background: white;
    color: var(--dark);
}

.cta-buttons .btn-primary:hover {
    background: var(--gray-100);
}

.cta-buttons .btn-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.cta-buttons .btn-secondary:hover {
    border-color: white;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-300);
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.footer-brand span {
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-tagline {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-top: 4px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h5 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--gray-700);
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--gray-300);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--gray-500);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--blue);
}

/* ===== Spanish (es) Layout Overrides ===== */
[lang="es"] .nav-cta { padding: 8px 24px; }
[lang="es"] .nav-login { padding: 7px 22px; }
[lang="es"] .nav-username { max-width: 120px; }
[lang="es"] .nav-lang-dropdown { min-width: 180px; }
[lang="es"] .btn-primary { padding: 12px 34px; }
[lang="es"] .btn-secondary { padding: 12px 34px; }
[lang="es"] .btn-large { padding: 16px 42px; }
[lang="es"] .hero-btn { padding: 14px 38px; }
[lang="es"] .product-tag { white-space: normal; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .featured-card {
        grid-template-columns: 1fr;
        padding: 40px;
    }

    .featured-visual {
        display: none;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-lang {
        font-size: 0.75rem;
        padding: 4px 6px;
    }

    .nav-lang-dropdown {
        right: -10px;
    }

    .nav-username {
        display: none;
    }

    .nav-login {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    .nav-right {
        gap: 10px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 120px 24px 80px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-visual {
        width: 400px;
        height: 400px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2,
    .featured-content h2,
    .cta-content h2 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease-out both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

/* Scroll-triggered animations (applied via JS) */
.animate-in {
    animation: fadeInUp 0.6s ease-out both;
}
