/* -----------------------------------------
   DESIGN SYSTEM & BASE STYLES (DARK THEME)
   ----------------------------------------- */

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

/* CSS Variables (Root) */
:root {
    --font-primary: 'Inter', sans-serif;

    /* Deep Space Purple Theme */
    --color-bg: #09041a; 
    --color-bg-secondary: rgba(22, 10, 51, 0.7);
    --color-border: rgba(139, 92, 246, 0.2);
    --color-text-primary: #fcfcfd;
    --color-text-secondary: #d1d5db;
    --color-text-tertiary: #9ca3af;
    --color-primary: #8b5cf6; /* Vibrant Purple */
    --color-primary-glow: rgba(139, 92, 246, 0.5);
    --color-primary-hover: #a78bfa;
    --color-accent: #3b82f6; /* Blue Accent */
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Typography */
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-4xl: 2.5rem;
    --text-6xl: 4rem;

    /* Border Radius */
    --rounded-md: 0.5rem;
    --rounded-xl: 1.5rem;

    /* Shadows & Glass */
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    --glass-bg: rgba(17, 10, 39, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    color: var(--color-text-secondary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    color: var(--color-text-primary);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h4 { font-size: var(--text-xl); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Glassmorphism Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--rounded-xl);
    box-shadow: var(--shadow-lg);
}

.glass-nav {
    background: rgba(9, 4, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

/* -----------------------------------------
   ANIMATIONS
   ----------------------------------------- */

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

.fade-in-section {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Delay for staggering animations */
.fade-in-section:nth-child(2) { animation-delay: 0.2s; }
.fade-in-section:nth-child(3) { animation-delay: 0.4s; }
.fade-in-section:nth-child(4) { animation-delay: 0.6s; }


/* -----------------------------------------
   LAYOUT & GRID
   ----------------------------------------- */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
    overflow: hidden; /* Contains elements for animations */
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }


/* -----------------------------------------
   COMPONENTS
   ----------------------------------------- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    border-radius: var(--rounded-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--color-primary-glow);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.btn-lg {
    font-size: var(--text-lg);
    padding: 1rem 2.2rem;
    border-radius: 0.75rem;
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--rounded-xl);
    padding: var(--space-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Header */
.main-header {
    background: rgba(9, 4, 26, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    text-decoration: none;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: var(--space-xl);
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Footer */
.main-footer {
    background: #060211;
    border-top: 1px solid var(--glass-border);
    padding: var(--space-4xl) 0 var(--space-2xl);
    color: var(--color-text-tertiary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-3xl);
}

.footer-column h5 {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
}

.footer-bottom {
    margin-top: var(--space-4xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.85rem;
}

/* -----------------------------------------
   PAGE-SPECIFIC STYLES
   ----------------------------------------- */

/* Hero Section */
.hero-section {
    padding: var(--space-4xl) 0 var(--space-4xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    background: linear-gradient(to bottom, #fff 40%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-lg);
}

.hero-content .subheadline {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 650px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.6;
}

.hero-actions {
    margin-top: var(--space-xl);
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.hero-video-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: var(--space-4xl) auto 0;
    border-radius: var(--rounded-xl);
    padding: 8px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(59, 130, 246, 0.5));
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.2);
}

.hero-video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--color-bg);
}

.hero-video {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: screen;
}

#hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Section Header Styles */
.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--color-text-tertiary);
    max-width: 600px;
    margin: 0 auto;
}

/* General Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-tertiary { color: var(--color-text-tertiary); }

.bg-bg-secondary {
    background-color: rgba(255, 255, 255, 0.02);
}

.font-semibold { font-weight: 600; }

.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }
.mb-6 { margin-bottom: var(--space-2xl); }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }

ul { list-style: none; }


/* -----------------------------------------
   RESPONSIVE DESIGN
   ----------------------------------------- */

@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }

    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .hero-section {
        text-align: left;
    }

    .hero-content {
        margin-bottom: var(--space-2xl);
    }
}