/* ============================================
   SparkFlow Pro - Modern UI System
   Dark Mode First | Glassmorphism + Neumorphism
   ============================================ */

:root {
    /* Color System */
    --bg-primary: #0a0c10;
    --bg-secondary: #11141c;
    --bg-glass: rgba(18, 22, 32, 0.65);
    --bg-glass-strong: rgba(12, 15, 25, 0.85);

    /* Accent Colors */
    --accent-blue: #2d7aff;
    --accent-blue-glow: rgba(45, 122, 255, 0.4);
    --accent-amber: #ffb347;
    --accent-amber-glow: rgba(255, 179, 71, 0.4);
    --accent-cyan: #00d4ff;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0a0c10 0%, #0f1625 50%, #0a0c10 100%);
    --gradient-card: linear-gradient(135deg, rgba(30, 38, 58, 0.7) 0%, rgba(20, 26, 40, 0.5) 100%);
    --gradient-border: linear-gradient(135deg, rgba(45, 122, 255, 0.3), rgba(255, 179, 71, 0.3));

    /* Effects */
    --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 15px 35px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow-blue: 0 0 30px rgba(45, 122, 255, 0.3);
    --shadow-glow-amber: 0 0 30px rgba(255, 179, 71, 0.3);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== WARNING BAR (Sticky + Pulse) ===== */
.warning-bar {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 1px solid rgba(255, 179, 71, 0.3);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    overflow: hidden;
}

.warning-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 179, 71, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.beta-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    padding: 5px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: pulse-beta 2s infinite;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.5);
    margin-right: 16px;
}

@keyframes pulse-beta {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(255, 71, 87, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.warning-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.warning-text a {
    color: var(--accent-amber);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.warning-text a:hover {
    text-shadow: 0 0 8px rgba(255, 179, 71, 0.5);
}

/* ===== NAVBAR (Glass + Scroll effect) ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(45, 122, 255, 0.2);
    padding: 0.8rem 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-amber));
    transition: width var(--transition-base);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: white;
}

.btn-outline-glow {
    background: transparent;
    border: 1px solid rgba(45, 122, 255, 0.5);
    color: var(--accent-blue);
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-outline-glow:hover {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 0 20px var(--accent-blue-glow);
    border-color: transparent;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ===== HERO + Particle Canvas ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--gradient-hero);
    padding: 120px 0 80px;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    max-width: 500px;
}

.portal-cards {
    flex: 1;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.portal-card {
    flex: 1;
    min-width: 250px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid rgba(45, 122, 255, 0.15);
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: var(--shadow-sm);
}

.portal-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(45, 122, 255, 0.5);
    box-shadow: var(--shadow-glow-blue);
}

.portal-card.client:hover {
    box-shadow: var(--shadow-glow-blue);
}

.portal-card.worker:hover {
    box-shadow: var(--shadow-glow-amber);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.portal-card.client .card-icon {
    color: var(--accent-blue);
}

.portal-card.worker .card-icon {
    color: var(--accent-amber);
}

.portal-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.portal-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.btn-glow {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-glow.client {
    background: linear-gradient(135deg, var(--accent-blue), #1a5cce);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 122, 255, 0.3);
}

.btn-glow.worker {
    background: linear-gradient(135deg, var(--accent-amber), #e69500);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 179, 71, 0.3);
}

.btn-glow:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-glow:active::before {
    width: 300px;
    height: 300px;
}

/* ===== FEATURE SECTION ===== */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.feature-card {
    background: var(--bg-glass-strong);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid rgba(45, 122, 255, 0.1);
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(45, 122, 255, 0.3);
    box-shadow: var(--shadow-glow-blue);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer {
    background: #050608;
    padding: 3rem 0 2rem;
    border-top: 1px solid rgba(45, 122, 255, 0.1);
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .portal-cards {
        flex-direction: column;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scroll reveal base */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}