/* ==========================================================================
   vscxml Shared Styles
   Unified design system for landing page and documentation
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
    /* Colors */
    --color-bg: #070708;
    --color-bg-elevated: rgba(255, 255, 255, 0.03);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-hover: rgba(59, 130, 246, 0.5);
    --color-text: #e5e7eb;
    --color-text-muted: #9ca3af;
    --color-accent: #3b82f6;
    --color-accent-glow: rgba(59, 130, 246, 0.25);

    /* Grid */
    --grid-size: 64px;
    --grid-color: rgba(255, 255, 255, 0.025);

    /* Spacing */
    --nav-height: 56px;
}

/* --------------------------------------------------------------------------
   Base Styles & Beautiful Background
   -------------------------------------------------------------------------- */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* The magic background layer */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;

    /* Layered background: gradients + grid */
    background:
        /* Primary glow - blue from top center */
        radial-gradient(
            ellipse 80% 50% at 50% -5%,
            rgba(59, 130, 246, 0.25) 0%,
            transparent 50%
        ),
        /* Secondary glow - purple accent from top right */
        radial-gradient(
            ellipse 60% 40% at 85% 5%,
            rgba(139, 92, 246, 0.08) 0%,
            transparent 45%
        ),
        /* Tertiary glow - subtle cyan from left */
        radial-gradient(
            ellipse 50% 60% at 10% 20%,
            rgba(34, 211, 238, 0.05) 0%,
            transparent 40%
        ),
        /* Quaternary glow - soft magenta from bottom right */
        radial-gradient(
            ellipse 70% 50% at 90% 95%,
            rgba(236, 72, 153, 0.04) 0%,
            transparent 50%
        ),
        /* Quinary glow - warm orange from bottom left */
        radial-gradient(
            ellipse 60% 40% at 15% 90%,
            rgba(251, 191, 36, 0.03) 0%,
            transparent 45%
        ),

        /* Grid pattern - vertical lines */
        repeating-linear-gradient(
            90deg,
            var(--grid-color) 0px,
            var(--grid-color) 1px,
            transparent 1px,
            transparent var(--grid-size)
        ),
        /* Grid pattern - horizontal lines */
        repeating-linear-gradient(
            0deg,
            var(--grid-color) 0px,
            var(--grid-color) 1px,
            transparent 1px,
            transparent var(--grid-size)
        ),
        /* Base color */
        var(--color-bg);
}

/* Subtle vignette effect for depth */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(
        ellipse 100% 100% at 50% 50%,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.font-mono,
code,
pre,
.vscxml-brand {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.vscxml-brand {
    font-weight: 800;
    letter-spacing: -0.05em;
}

.hero-gradient {
    background: linear-gradient(to bottom, #ffffff 0%, #ffffff 40%, #6b7280 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Glass Effects
   -------------------------------------------------------------------------- */

.glass-nav {
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-sidebar {
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 30px -10px rgba(59, 130, 246, 0.15);
}

/* --------------------------------------------------------------------------
   Glow Effects
   -------------------------------------------------------------------------- */

.glow-blue {
    box-shadow:
        0 0 60px -10px rgba(59, 130, 246, 0.25),
        0 0 30px -5px rgba(59, 130, 246, 0.15);
}

.glow-purple {
    box-shadow:
        0 0 60px -10px rgba(139, 92, 246, 0.25),
        0 0 30px -5px rgba(139, 92, 246, 0.15);
}

/* --------------------------------------------------------------------------
   Buttons & Links
   -------------------------------------------------------------------------- */

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 0 30px -5px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 0 40px -5px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */

.text-gradient-blue {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.border-glow {
    position: relative;
}

.border-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Responsive Grid Background Adjustment
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    :root {
        --grid-size: 48px;
    }
}

@media (max-width: 480px) {
    :root {
        --grid-size: 32px;
    }
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */

@media print {
    body::before,
    body::after {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .glass-nav,
    .glass-sidebar {
        display: none !important;
    }
}
