/* ==========================================================================
   WayUp - Presentation Index Styles
   ========================================================================== */

/* ==========================================================================
   V2.1 Design Tokens
   ========================================================================== */
:root {
    /* Primary - Electric Purple */
    --primary-400: #c084fc;
    --primary-500: #a855f7;
    --primary-600: #9333ea;

    /* Secondary - Deep Indigo */
    --secondary-500: #6366f1;
    --secondary-600: #4f46e5;

    /* Accent Colors */
    --accent-cyan: #22d3ee;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;

    /* Backgrounds */
    --bg-primary: #09090b;
    --bg-secondary: #18181b;
    --bg-tertiary: #27272a;

    /* Surfaces */
    --surface-glass: rgba(255, 255, 255, 0.03);
    --surface-glass-hover: rgba(255, 255, 255, 0.06);
    --surface-card: rgba(39, 39, 42, 0.5);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;

    /* Gradients */
    --gradient-text: linear-gradient(135deg, var(--primary-400) 0%, var(--accent-cyan) 100%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Radius */
    --radius-sm: 0.5rem;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ==========================================================================
   Background Effects
   ========================================================================== */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.bg-gradient-blur.purple {
    width: 600px;
    height: 600px;
    background: var(--primary-600);
    top: -200px;
    left: 10%;
    animation-delay: 0s;
}

.bg-gradient-blur.blue {
    width: 500px;
    height: 500px;
    background: var(--secondary-600);
    top: 20%;
    right: -100px;
    animation-delay: -5s;
}

.bg-gradient-blur.cyan {
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    bottom: 10%;
    left: 20%;
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.bg-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

canvas#bgCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
    position: fixed;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - var(--space-8));
    max-width: 1200px;
    z-index: 100;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: var(--space-3) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.nav.scrolled {
    background: rgba(9, 9, 11, 0.9);
    border-color: var(--border-default);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.nav-logo img {
    height: 32px;
    width: auto;
}

.nav-logo img.logo-invert {
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    gap: var(--space-8);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumb-separator {
    color: var(--text-tertiary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--surface-glass);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-back:hover {
    background: var(--surface-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.nav-back svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-6);
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-400);
    margin-bottom: var(--space-6);
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-400);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    color: var(--text-primary);
    max-width: 650px;
    margin: 0 auto var(--space-8);
    line-height: 1.8;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    margin-bottom: var(--space-8);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-2);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-500) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5);
}

.btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.btn:hover svg {
    transform: translateX(4px);
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-tertiary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--primary-500) 0%, transparent 100%);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ==========================================================================
   Categories Section
   ========================================================================== */
.categories-section {
    position: relative;
    padding: var(--space-16) var(--space-6);
    z-index: 1;
}

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

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.section-header p {
    color: var(--text-primary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    position: relative;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    opacity: 0;
    filter: blur(25px);
    transition: opacity 0.4s ease;
    z-index: -1;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-strong);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(168, 85, 247, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(39, 39, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.category-card:hover::before {
    opacity: 0.5;
}

.category-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-400);
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 1;
    color: var(--text-primary);
}

.category-card > p {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

.presentation-list {
    list-style: none;
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-4);
    position: relative;
    z-index: 1;
}

.presentation-list li {
    padding: var(--space-2) 0;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: color 0.2s ease;
}

.category-card:hover .presentation-list li {
    color: var(--text-primary);
}

.presentation-list li::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--primary-500);
    border-radius: 50%;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.category-card:hover .presentation-list li::before {
    opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    position: relative;
    padding: var(--space-8) var(--space-6);
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    z-index: 1;
}

.footer p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

[data-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-stagger].visible > *:nth-child(1) { transition-delay: 0.1s; }
[data-stagger].visible > *:nth-child(2) { transition-delay: 0.2s; }
[data-stagger].visible > *:nth-child(3) { transition-delay: 0.3s; }
[data-stagger].visible > *:nth-child(4) { transition-delay: 0.4s; }
[data-stagger].visible > *:nth-child(5) { transition-delay: 0.5s; }

[data-stagger].visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-stats {
        gap: var(--space-6);
    }

    .stat-value {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }
}
