:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #eff6ff;
    --accent-blue: #06b6d4;
    --dark-blue: #1e3a8a;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --white: #ffffff;
    --white-gradient: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --subtle-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-900: #111827;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--white-gradient);
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    animation: slideInLeft 1s ease-out;
    transition: all 0.3s ease;
}

.nav-brand h1:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(30, 64, 175, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: slideInRight 1s ease-out;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

.cta-button {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
}

/* Keyframe Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-15deg); }
    20% { transform: rotateZ(10deg); }
    25% { transform: rotateZ(-10deg); }
    30% { transform: rotateZ(6deg); }
    35% { transform: rotateZ(-4deg); }
    40%, 100% { transform: rotateZ(0); }
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: pulse 6s ease-in-out infinite;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    margin-bottom: 4rem;
    animation: slideInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInUp 1s ease-out 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 0.6s both;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 35px rgba(30, 64, 175, 0.4);
    animation: glow 2s ease-in-out infinite;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary.large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    animation: slideInRight 1s ease-out 0.8s both;
}

.dashboard-preview {
    background: var(--white-gradient);
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    animation: float 6s ease-in-out infinite, fadeInScale 1s ease-out 0.8s both;
}

.chart-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--secondary-blue), var(--accent-blue));
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.chart-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg viewBox="0 0 400 200" xmlns="http://www.w3.org/2000/svg"><path d="M0,150 Q100,100 200,120 T400,80" stroke="white" stroke-width="3" fill="none" opacity="0.7"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

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

.metric-card {
    text-align: center;
    padding: 1rem;
    background: var(--subtle-gradient);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--white-gradient);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    opacity: 0;
    animation: slideInUp 1s ease-out 0.2s forwards;
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background: var(--white-gradient);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease-out forwards;
}

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

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    animation: bounce 1s ease-in-out;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    animation: wiggle 1s ease-in-out;
    transform: scale(1.1);
}

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

/* Analytics Section */
.analytics-section {
    padding: 6rem 0;
    background: var(--light-blue);
    position: relative;
    overflow: hidden;
}

.analytics-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

.analytics-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.analytics-text h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: slideInLeft 1s ease-out 0.3s forwards;
}

.analytics-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    opacity: 0;
    animation: slideInLeft 1s ease-out 0.5s forwards;
}

.analytics-features {
    list-style: none;
    opacity: 0;
    animation: slideInLeft 1s ease-out 0.7s forwards;
}

.analytics-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 2rem;
}

.analytics-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-blue);
    font-weight: bold;
}

.data-visualization {
    background: var(--white-gradient);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: slideInRight 1s ease-out 0.4s forwards, float 8s ease-in-out 2s infinite;
}

.chart-container {
    height: 250px;
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 0.5rem;
    overflow: hidden;
}

.chart-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transform: translateY(-50%);
    opacity: 0.8;
}

.chart-points {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.chart-points::before,
.chart-points::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.chart-points::before {
    left: 25%;
}

.chart-points::after {
    right: 25%;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--primary-blue);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.05) 50%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.cta-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: slideInUp 1s ease-out 0.2s forwards;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideInUp 1s ease-out 0.4s forwards;
}

.cta-content p.animate-complete {
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: var(--white);
    color: var(--primary-blue);
}

.cta-section .btn-primary:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--secondary-blue);
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-column h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--dark-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(30, 64, 175, 0.4);
    animation: pulse 1s ease-in-out infinite;
}

.scroll-to-top svg {
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* Enhanced Mobile Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* Loading Animation */
@keyframes skeleton {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite linear;
}

/* Enhanced Touch Interactions */
@media (hover: none) and (pointer: coarse) {
    .btn-primary, .btn-secondary, .cta-button {
        min-height: 48px;
        min-width: 48px;
    }
    
    .feature-card {
        transition: transform 0.2s ease;
    }
    
    .feature-card:active {
        transform: scale(0.98);
    }
    
    .nav-links a {
        padding: 0.75rem;
        margin: 0.25rem;
    }
}

/* Performance Optimizations */
.hero, .features, .analytics-section, .cta-section {
    will-change: auto;
}

.dashboard-preview, .feature-card, .data-visualization {
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Micro-interactions */
.metric-card {
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.analytics-features li {
    transition: all 0.3s ease;
}

.analytics-features li:hover {
    transform: translateX(10px);
    color: var(--primary-blue);
}

.analytics-features li:hover::before {
    color: var(--accent-blue);
    transform: scale(1.2);
}

/* Enhanced Focus States for Accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.cta-button:focus,
.scroll-to-top:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.nav-links a:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white-gradient);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 1rem 1rem;
        gap: 1rem;
        animation: slideInUp 0.3s ease-out;
    }
    
    .nav-links.mobile-open {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        position: relative;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .analytics-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .dashboard-preview {
        max-width: 100%;
        margin: 0;
    }
    
    .chart-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .dashboard-preview {
        margin: 0 1rem;
    }
}