/* main.css - Full styles loaded asynchronously */

/* CSS Variables - already in critical CSS but included for completeness */
:root {
    --primary: #0066FF;
    --secondary: #FF6B35;
    --dark: #0A0E27;
    --darker: #050714;
    --light: #F7F8FA;
    --gray: #6B7280;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --gradient-primary: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
    --gradient-secondary: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --gradient-dark: linear-gradient(180deg, #0A0E27 0%, #050714 100%);
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Screen */
.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    position: relative;
}

.loader-bar {
    position: absolute;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    left: 50%;
    transform-origin: center;
    animation: loader-spin 1.2s linear infinite;
}

.loader-bar:nth-child(2) {
    animation-delay: 0.1s;
    opacity: 0.8;
}

.loader-bar:nth-child(3) {
    animation-delay: 0.2s;
    opacity: 0.6;
}

.loader-bar:nth-child(4) {
    animation-delay: 0.3s;
    opacity: 0.4;
}

@keyframes loader-spin {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

/* Navigation Extended */
nav.scrolled {
    padding: 0.75rem 0;
    background: rgba(5, 7, 20, 0.98);
    box-shadow: var(--shadow-lg);
}

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

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

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

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

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

.nav-cta {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: -0.5rem;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--light);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section Extended */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, var(--primary) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--secondary) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, var(--primary) 0%, transparent 50%);
    animation: hero-bg-animate 20s ease-in-out infinite;
}

@keyframes hero-bg-animate {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, -20px) scale(1.1); }
    66% { transform: translate(20px, -10px) scale(0.9); }
}

.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: inline-block;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.3);
    color: #00D4FF;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: fade-in-up 0.6s ease-out;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fade-in-up 0.6s ease-out 0.2s both;
}

.gradient-text {
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 25%, #FF6B35 75%, #F7931E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    animation: fade-in-up 0.6s ease-out 0.4s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    animation: fade-in-up 0.6s ease-out 0.6s both;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-4px);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fade-in-up 0.6s ease-out 0.8s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    min-height: 48px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    fill: var(--gray);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Story Section */
.story-section {
    padding: 6rem 1.5rem;
    background: linear-gradient(180deg, var(--darker) 0%, var(--dark) 100%);
    position: relative;
    overflow: hidden;
}

.story-container {
    max-width: 1280px;
    margin: 0 auto;
}

.story-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-label {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: #FF6B35;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.story-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.story-card:hover::before {
    left: 100%;
}

.story-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 102, 255, 0.3);
}

.story-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.story-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.story-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* Interactive Comparison Section */
.comparison-section {
    padding: 6rem 1.5rem;
    background: var(--dark);
    position: relative;
}

.comparison-container {
    max-width: 1280px;
    margin: 0 auto;
}

.bank-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.bank-option {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
}

.bank-option.active {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.bank-option:hover {
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}

.comparison-display {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-content {
    max-width: 600px;
    width: 100%;
}

.comparison-amount {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.comparison-description {
    font-size: 1.25rem;
    color: var(--light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.comparison-context {
    color: var(--gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Questions Section */
.questions-section {
    padding: 6rem 1.5rem;
    background: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
    text-align: center;
}

.questions-container {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.question-card:hover {
    border-color: rgba(255, 107, 53, 0.3);
    transform: scale(1.02);
}

.question-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.question-stat {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.6;
}

/* Footer */
footer {
    padding: 4rem 1.5rem 2rem;
    background: var(--darker);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--gray);
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--light);
}

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

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    line-height: 2;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--darker);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s ease;
    }

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

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero {
        min-height: auto;
        padding: 5rem 1rem 3rem;
    }
    
    .hero-content {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
        max-width: 90%;
        margin: 0 auto 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .stat-card {
        min-width: 0;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    body, html {
        overflow-x: hidden;
        max-width: 100%;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    .comparison-display {
        padding: 2rem;
    }

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

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

    .bank-card, .comparison-card {
        padding: 1.5rem;
    }

    body {
        font-size: 16px;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
a:focus,
button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
