/* Optimized CSS - Spring Atlas */
/* Modern CSS with performance and accessibility focus */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Modern CSS Variables */
:root {
    /* Color System - WCAG AA Compliant */
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-900: #1e3a8a;

    --color-neutral-50: #f8fafc;
    --color-neutral-100: #f1f5f9;
    --color-neutral-200: #e2e8f0;
    --color-neutral-300: #cbd5e1;
    --color-neutral-400: #94a3b8;
    --color-neutral-500: #64748b;
    --color-neutral-600: #475569;
    --color-neutral-700: #334155;
    --color-neutral-800: #1e293b;
    --color-neutral-900: #0f172a;

    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #06b6d4;

    /* Typography Scale */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --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;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius-base: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* Container */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
}

/* Base HTML Elements */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-neutral-900);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary-600);
    color: white;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-neutral-200);
}

.nav-container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    gap: var(--space-4);
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 2.5rem;
    width: auto;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger-line {
    width: 1.5rem;
    height: 2px;
    background: var(--color-neutral-700);
    margin: 2px 0;
    transition: all var(--transition-fast);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    color: var(--color-neutral-700);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-primary-600);
    background: var(--color-primary-50);
    outline: 2px solid transparent;
}

.nav-link:focus-visible {
    outline: 2px solid var(--color-primary-600);
    outline-offset: 2px;
}

.nav-link-primary {
    background: var(--color-primary-600);
    color: white;
}

.nav-link-primary:hover,
.nav-link-primary:focus {
    background: var(--color-primary-700);
    color: white;
}

.nav-link-secondary {
    background: transparent;
    border: 1px solid var(--color-neutral-300);
}

.nav-link-secondary:hover,
.nav-link-secondary:focus {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-400);
}

.nav-divider {
    width: 1px;
    height: 1.5rem;
    background: var(--color-neutral-300);
    margin: 0 var(--space-2);
}

.beta-badge {
    margin-left: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--color-warning);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-20) var(--space-6);
    background: linear-gradient(135deg, var(--color-neutral-50) 0%, var(--color-primary-50) 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 20rem;
    height: 20rem;
    background: var(--color-primary-500);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 15rem;
    height: 15rem;
    background: var(--color-purple-500);
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 12rem;
    height: 12rem;
    background: var(--color-cyan-500);
    bottom: 20%;
    left: 60%;
    animation-delay: 4s;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: var(--container-lg);
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-neutral-700);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(10px);
}

.hero-animation {
    margin-bottom: var(--space-8);
}

.animation-wrapper {
    position: relative;
    display: inline-block;
}

#atlasAnimation {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.animation-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-primary-500), var(--color-purple-500), var(--color-cyan-500));
    border-radius: var(--radius-lg);
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
}

.hero-heading {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--color-neutral-900);
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-purple-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

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

.typewriter-text {
    position: relative;
}

.typewriter-text::after {
    content: '|';
    position: absolute;
    right: -0.1em;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-text {
    font-size: var(--font-size-xl);
    color: var(--color-neutral-600);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    align-items: center;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.hero-button-primary {
    background: var(--color-primary-600);
    color: white;
    box-shadow: var(--shadow-lg);
}

.hero-button-primary:hover,
.hero-button-primary:focus {
    background: var(--color-primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.hero-button-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-neutral-700);
    border-color: var(--color-neutral-300);
}

.hero-button-secondary:hover,
.hero-button-secondary:focus {
    background: white;
    border-color: var(--color-neutral-400);
    transform: translateY(-1px);
}

.hero-button-large {
    padding: var(--space-5) var(--space-10);
    font-size: var(--font-size-lg);
}

/* Features Section */
.hero-features {
    margin-top: var(--space-32);
    max-width: var(--container-2xl);
    width: 100%;
}

.features-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.features-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-bottom: var(--space-4);
}

.features-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-neutral-600);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-20);
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-neutral-300);
}

.feature-icon-wrapper {
    width: 4rem;
    height: 4rem;
    background: var(--color-primary-100);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    color: var(--color-primary-600);
}

.feature-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-neutral-900);
    margin-bottom: var(--space-3);
}

.feature-description {
    font-size: var(--font-size-base);
    color: var(--color-neutral-600);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.feature-tags {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.tag {
    padding: var(--space-1) var(--space-3);
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Final CTA */
.hero-cta-final {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-purple-600));
    border-radius: var(--radius-2xl);
    padding: var(--space-16);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-cta-final::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cta-final-content {
    position: relative;
    z-index: 1;
}

.cta-final-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.cta-final-text {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-8);
    opacity: 0.9;
}

.hero-cta-final .hero-button {
    background: white;
    color: var(--color-primary-600);
}

.hero-cta-final .hero-button:hover,
.hero-cta-final .hero-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: var(--color-neutral-900);
    color: white;
    padding: var(--space-12) var(--space-6);
    margin-top: var(--space-20);
}

.footer-content {
    max-width: var(--container-xl);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-nav {
    display: flex;
    gap: var(--space-6);
}

.footer-nav a {
    color: var(--color-neutral-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: white;
}

/* Utility Classes */
.nav-hidden {
    display: none !important;
}

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

/* Reduced Motion Support */
@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;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--space-4);
    }

    .burger-menu {
        display: flex;
    }

    .nav-actions {
        position: fixed;
        top: 4rem;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--color-neutral-200);
        flex-direction: column;
        gap: 0;
        padding: var(--space-4);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-actions.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-divider {
        display: none;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
        padding: var(--space-3) 0;
    }

    .hero {
        padding: var(--space-16) var(--space-4);
    }

    .hero-heading {
        font-size: var(--font-size-4xl);
    }

    .hero-text {
        font-size: var(--font-size-lg);
    }

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

    .hero-button {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        flex-direction: column;
        gap: var(--space-3);
    }
}