/* Critical CSS - Inlined for faster first paint */
/* Contains only essential above-the-fold styles */

:root {
    /* Essential color variables */
    --color-bg: hsl(210, 40%, 98%);
    --color-surface: hsl(0, 0%, 100%);
    --color-text: hsl(213, 27%, 15%);
    --color-text-muted: hsl(215, 16%, 47%);
    --color-border: hsl(214, 32%, 91%);
    
    /* Primary colors */
    --primary-h: 217;
    --primary-s: 91%;
    --primary-l: 60%;
    
    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Gradients */
    --gradient-start: hsl(280, 100%, 70%);
    --gradient-mid: hsl(220, 100%, 60%);
    --gradient-end: hsl(175, 100%, 50%);
}

/* Dark mode essentials */
[data-theme="dark"] {
    --color-bg: hsl(222, 47%, 11%);
    --color-surface: hsl(220, 26%, 14%);
    --color-text: hsl(210, 40%, 98%);
    --color-text-muted: hsl(215, 20%, 65%);
    --color-border: hsl(217, 33%, 17%);
    --glass-bg: rgba(30, 41, 59, 0.8);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    z-index: -2;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Navbar critical styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

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

.navbar__logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: linear-gradient(135deg, hsl(var(--primary-h), var(--primary-s), var(--primary-l)), hsl(280, 100%, 70%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero critical styles */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, hsl(var(--primary-h), var(--primary-s), var(--primary-l)), hsl(280, 100%, 70%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out;
}

.hero__subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero__btn {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.hero__btn--primary {
    background: linear-gradient(135deg, hsl(var(--primary-h), var(--primary-s), var(--primary-l)), hsl(280, 100%, 70%));
    color: white;
    box-shadow: 0 4px 15px 0 rgba(31, 38, 135, 0.2);
}

.hero__btn--secondary {
    background: var(--glass-bg);
    color: var(--color-text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

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

/* Hide elements until loaded */
.features-section,
.timeline,
.cta-section,
.footer {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Responsive critical */
@media (max-width: 768px) {
    .navbar__container {
        padding: 1rem;
    }
    
    .hero {
        padding: 5rem 1rem 3rem;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .hero__subtitle {
        font-size: 1rem;
    }
    
    .hero__cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero__btn {
        width: 100%;
        max-width: 300px;
    }
}