/* ===================================
   SHARED STYLES FOR AUTOIMMUNE HUB
   Purple-Blue Gradient Design System
   =================================== */

/* ===================================
   CSS CUSTOM PROPERTIES
   =================================== */
:root {
    /* Primary Purple Palette */
    --primary-purple-deep: #6B46C1;
    --primary-purple-mid: #7C3AED;
    --primary-purple-light: #8B5CF6;
    
    /* Blue Accents */
    --accent-blue-deep: #2563EB;
    --accent-blue-mid: #3B82F6;
    --accent-blue-light: #60A5FA;
    
    /* Complementary Colors */
    --lavender-soft: #E9D5FF;
    --mint-green: #6EE7B7;
    --coral-warm: #FB923C;
    --indigo-deep: #312E81;
    
    /* Dark Mode Colors */
    --bg-dark-secondary: #1E1B4B;
    --bg-dark-primary: #000000;
    --bg-dark-tertiary: #1E1B4B;
    
    /* Light Mode Colors */
    --bg-light-primary: #ffffff;
    --bg-light-secondary: #F8FAFC;
    --text-light: #dddbe0;
    --text-dark: #1E293B;
    
    /* Gradients */
    --gradient-purple-blue: linear-gradient(135deg, var(--primary-purple-mid) 0%, var(--accent-blue-mid) 100%);
    --gradient-purple-blue-radial: radial-gradient(circle at top right, var(--primary-purple-light), var(--accent-blue-light));
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
    --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(124, 58, 237, 0.1);
    --shadow-md: 0 4px 16px rgba(124, 58, 237, 0.2);
    --shadow-lg: 0 8px 32px rgba(124, 58, 237, 0.3);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.4);
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark-primary);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 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;
    }
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    background: var(--gradient-purple-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
}

a {
    color: var(--accent-blue-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-purple-light);
}

/* ===================================
   LAYOUT UTILITIES
   =================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--lavender-soft);
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
}

/* ===================================
   NAVIGATION
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(30, 27, 75, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    transition: transform var(--transition-medium);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-purple-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: rgba(124, 58, 237, 0.2);
    color: var(--primary-purple-light);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-dark-primary);
        padding: var(--spacing-md);
        transform: translateX(-100%);
        transition: transform var(--transition-medium);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-toggle {
        display: block;
    }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0a0e1a;
    padding: var(--spacing-lg) var(--spacing-md);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(8, 145, 178, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    text-align: center;
    color: var(--text-light);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 7vw, 6rem);
    margin-bottom: var(--spacing-md);
    line-height: 1.05;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #60a5fa 50%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s var(--transition-smooth), shimmer 3s ease-in-out infinite;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    animation: fadeInUp 1s var(--transition-smooth) 0.2s both;
    font-weight: 400;
    line-height: 1.5;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #e2e8f0;
}

.hero-cta {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.4s var(--transition-smooth);
    animation: fadeInUp 1s var(--transition-smooth) 0.4s both, pulse 2s ease-in-out infinite;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.4);
    position: relative;
    overflow: hidden;
}

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

.hero-cta:hover::before {
    left: 100%;
}

.hero-cta:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 10px 60px rgba(37, 99, 235, 0.6);
    }
}

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

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

/* ===================================
   CARD COMPONENTS
   =================================== */
.card {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 1rem;
    padding: var(--spacing-md);
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    will-change: opacity, transform;
}

.card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--bg-dark-tertiary);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid rgba(124, 58, 237, 0.3);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: var(--primary-purple-light);
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: var(--lavender-soft);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--lavender-soft);
    font-size: 0.875rem;
}

.footer-sep {
    padding: 0 0.5em;
}

/* ===================================
   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-visible {
    outline: 2px solid var(--accent-blue-light);
    outline-offset: 2px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .hero {
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}
