/* ============================================================
   style.css - Crece Credito Official Website
   Modern fintech design with optimized performance
   Primary color: #3D7CE1
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ----- CSS Variables ----- */
:root {
    --primary: #3D7CE1;
    --primary-dark: #2B5FC7;
    --primary-light: #7AA5FF;
    --primary-soft: rgba(61, 124, 225, 0.08);
    --primary-glow: rgba(61, 124, 225, 0.25);
    --accent: #00C2BA;
    --bg: #F5F9FF;
    --bg-card: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text-primary: #0A1A2F;
    --text-secondary: #2D4059;
    --text-tertiary: #5F6F8C;
    --border-light: #E2EAF5;
    --shadow-sm: 0 8px 20px -8px rgba(61, 124, 225, 0.12);
    --shadow-md: 0 15px 30px -12px rgba(61, 124, 225, 0.2);
    --shadow-lg: 0 30px 50px -20px rgba(61, 124, 225, 0.3);
    --transition: 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* ----- Base & Lightweight Tech Background ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    /* Force hardware acceleration */
    transform: translateZ(0);
}

/* Static subtle grid (no animation, very light) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(0deg, rgba(61, 124, 225, 0.02) 0px, rgba(61, 124, 225, 0.02) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(61, 124, 225, 0.02) 0px, rgba(61, 124, 225, 0.02) 1px, transparent 1px, transparent 40px);
    pointer-events: none;
    z-index: -1;
}

/* Two glowing orbs with very slow opacity animation (no movement) */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(61, 124, 225, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 194, 186, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: glowPulse 12s ease-in-out infinite;
    transform: translateZ(0);
    will-change: opacity;
}

/* Only opacity changes, very cheap */
@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ----- Typography ----- */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

h2 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* ----- Navigation (glass) ----- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(61, 124, 225, 0.15);
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
    transform: translateZ(0);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-sm);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-wrapper {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.logo-wrapper:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

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

/* Language switcher integrated */
.lang-switcher {
    display: flex;
    background: white;
    border-radius: 40px;
    padding: 4px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.lang-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px var(--primary-glow);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: white;
    border-top: 1px solid var(--border-light);
    padding: 1rem 2rem;
}

.mobile-menu a {
    display: block;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.2s;
}

.mobile-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
    background: transparent;
    transform: translateZ(0);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 25px -8px var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -10px var(--primary);
}

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

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

/* ----- Hero section (clean, no counters) ----- */
.hero-section {
    padding: 8rem 2rem 4rem;
    max-width: 1280px;
    margin: 0 auto;
}

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

.hero-badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(61, 124, 225, 0.2);
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 1.5rem 0 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: soft-float 6s ease-in-out infinite;
    transform: translateZ(0);
    will-change: transform;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

/* ----- Stats Wall (独立数据墙) ----- */
.stats-wall {
    background: white;
    border-radius: 60px 60px 0 0;
    padding: 4rem 2rem;
    margin-top: -2rem;
    box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, 0.05);
}

.stats-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 32px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ----- Features Section ----- */
.features-section {
    max-width: 1280px;
    margin: 5rem auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(61, 124, 225, 0.2);
}

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

.feature-card {
    background: white;
    border-radius: 32px;
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-light);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: height 0.4s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-card:hover::before {
    height: 100%;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-soft);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 2rem;
    transition: background 0.3s, color 0.3s;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ----- App Preview Section (5 screenshots) ----- */
.app-preview-section {
    background: white;
    padding: 5rem 2rem;
}

.preview-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.screenshots-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    justify-items: center;
}

.app-screenshot {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 9/19;
    border-radius: 32px;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.app-screenshot:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 30px 40px -15px var(--primary);
    border-color: var(--primary);
}

.app-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ----- Company Section (简洁) ----- */
.company-section {
    max-width: 1280px;
    margin: 5rem auto;
    padding: 0 2rem;
}

.company-card {
    background: white;
    border-radius: 48px;
    padding: 4rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 4rem;
}

.company-content {
    flex: 1;
}

.company-content h2 {
    margin-bottom: 1.5rem;
}

.company-content p {
    color: var(--text-tertiary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.company-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.company-stat {
    text-align: left;
}

.company-stat .stat-number {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
}

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

.company-image {
    flex: 0 0 200px;
    height: 200px;
    background: var(--primary-soft);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--primary-light);
}

.company-image i {
    font-size: 5rem;
    color: var(--primary);
}

/* ----- Footer ----- */
.footer {
    background: white;
    border-top: 1px solid var(--border-light);
    padding: 4rem 2rem 2rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-address {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-email {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

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

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

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

.footer-links li {
    margin-bottom: 0.75rem;
}

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

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

.footer-bottom {
    max-width: 1280px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

    .mobile-menu.active {
        display: block;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

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

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

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

    .company-card {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
    }

    .company-stats {
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

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

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

    .company-stats {
        flex-direction: column;
        align-items: center;
    }
}

/* ----- Utility container for consistent width ----- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}