:root {
    /* Deep Space Dark Theme (Spaceship/Linear Inspired) */
    --bg-dark: #02040a;
    --bg-panel: rgba(13, 17, 23, 0.7);
    --bg-card: rgba(22, 27, 34, 0.5);
    
    /* Brand Colors */
    --primary: #1e2a78;
    --primary-glow: rgba(30, 42, 120, 0.5);
    --secondary: #00b4a0;
    --secondary-glow: rgba(0, 180, 160, 0.5);
    
    /* Text */
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --text-dim: #484f58;
    
    /* Premium Gradients (Stripe Inspired) */
    --gradient-Stripe: linear-gradient(104deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-text: linear-gradient(to right, #00b4a0, #3b82f6);
    --gradient-border: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.01) 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    
    /* Layout */
    --container-width: 1280px;
    --nav-height: 80px;
    
    /* Transitions */
    --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-fast: 0.2s var(--ease-smooth);
    --transition-base: 0.3s var(--ease-smooth);
    --transition-slow: 0.6s var(--ease-smooth);
}

/* =========================================
   Reset & Typography
   ========================================= */
* {
    margin: 0; padding: 0; box-sizing: border-box;
}

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

body {
    /* Using a fallback but recommending Inter/Satoshi style sans-serif */
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none; /* Hide default for custom trailing cursor */
}

a { text-decoration: none; color: inherit; transition: var(--transition-base); cursor: none;}
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: none; font-family: inherit; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--glass-highlight); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* =========================================
   Custom Cursor Glow Trail
   ========================================= */
#cursor-dot, #cursor-glow {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
#cursor-dot {
    width: 6px; height: 6px;
    background: var(--text-main);
    transition: width 0.2s, height 0.2s;
}
#cursor-glow {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(0, 180, 160, 0.15) 0%, transparent 60%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    transition-timing-function: ease-out;
}
/* When hovering over interactables */
body.hovering #cursor-dot {
    width: 0; height: 0;
}
body.hovering #cursor-glow {
    width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

/* =========================================
   Global Background & Meshes
   ========================================= */
.mesh-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
/* Gradient Orbs for Mesh */
.mesh-orb {
    position: absolute;
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.5;
    animation: drift 20s infinite alternate ease-in-out;
}
.mesh-orb-1 {
    top: -20%; left: -10%; width: 50vw; height: 50vw;
    background: var(--primary-glow);
}
.mesh-orb-2 {
    bottom: -20%; right: -10%; width: 60vw; height: 60vw;
    background: var(--secondary-glow);
    animation-delay: -5s;
}
.mesh-orb-3 {
    top: 40%; left: 60%; width: 40vw; height: 40vw;
    background: rgba(79, 70, 229, 0.2); /* Indigo */
    animation-delay: -10s;
}

/* Subtle Grid overlay for that developer/SaaS feel */
.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* =========================================
   Global Animated Preloader
   ========================================= */
#global-preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--bg-dark);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}
#global-preloader.fade-out {
    opacity: 0; visibility: hidden; pointer-events: none;
}
.preloader-text {
    font-size: 2rem;
    font-weight: 300; /* Skinny font weight */
    letter-spacing: 4px;
    text-transform: uppercase;
    /* Glass wipe effect gradient */
    background: linear-gradient(120deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.1) 40%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.1) 60%, rgba(255,255,255,0.1) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: glassWipe 2.5s linear infinite;
}
@media (max-width: 768px) {
    .preloader-text { font-size: 1.2rem; letter-spacing: 2px; text-align: center; padding: 0 20px; }
}
@keyframes glassWipe {
    from { background-position: 200% center; }
    to { background-position: -200% center; }
}

/* =========================================
   Client Logo Marquee
   ========================================= */
.client-marquee {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 15, 26, 0.5); /* Slight dark tint */
    /* Fades the edges into transparency so logos don't clip harshly */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    display: flex;
}
.client-track {
    display: flex;
    gap: 80px;
    width: max-content;
    padding-right: 80px;
    animation: scrollMarquee 25s linear infinite;
}
.client-track:hover {
    animation-play-state: paused;
}
.client-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: color 0.3s ease;
    cursor: default;
}
.client-logo:hover {
    color: var(--secondary);
}

/* Re-using scrollMarquee keyframes from Testimonials (assuming it's defined: 0% to -50%) */

/* =========================================
   Layout Utilities
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}
.section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}
.section-full { min-height: 100vh; }
.pt-160 { padding-top: 160px; }
.pb-32 { padding-bottom: 32px; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Text Utilities */
.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}
.text-gradient-stripe {
    background: var(--gradient-Stripe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}
.title-xl { font-size: 4.5rem; letter-spacing: -0.03em; }
.title-lg { font-size: 3.5rem; letter-spacing: -0.02em; }
.title-md { font-size: 2.5rem; margin-bottom: 1rem; }
.subtitle { font-size: 1.25rem; color: var(--text-muted); font-weight: 400; max-width: 600px; }
.text-sm { font-size: 0.875rem; color: var(--text-muted); }

/* =========================================
   SpaceShip/Linear inspired UI Components
   ========================================= */

/* Glowing Pill / Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 180, 160, 0.1);
}
.badge-dot {
    width: 6px; height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary);
    animation: pulse 2s infinite;
}

/* Advanced Glass Cards with Glow Borders */
.saas-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
    overflow: hidden;
    z-index: 1;
}
/* Hover Glow Effect via pseudo-element */
.saas-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}
.saas-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 40px rgba(0, 180, 160, 0.05);
}
.saas-card:hover::before {
    opacity: 1;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    border: none;
    outline: none;
}
.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark);
}
.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}
.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-stripe {
    background: var(--gradient-Stripe);
    color: white;
}
/* Shimmer effect for buttons */
.btn-stripe::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}
.btn-stripe:hover::after {
    left: 150%;
}
.btn-stripe:hover {
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

/* Form Inputs */
.input-glass {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-base);
}
.input-glass::placeholder { color: var(--text-dim); }
.input-glass:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(0, 180, 160, 0.1);
}

/* =========================================
   Global Header / Navigation
   ========================================= */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition-base);
    border-bottom: 1px solid transparent;
}
.header.scrolled {
    background: rgba(2, 4, 10, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; }
.logo span { color: var(--secondary); }
.nav { display: flex; gap: 40px; }
.nav-link {
    font-size: 0.95rem; font-weight: 500; color: var(--text-muted);
}
.nav-link:hover, .nav-link.active { color: var(--text-main); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    z-index: 1001;
}
.mobile-menu-btn span {
    width: 24px; height: 2px;
    background: var(--text-main);
    transition: var(--transition-base);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 40px;
    background: rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}
/* Fancy bottom glow */
.footer::before {
    content: '';
    position: absolute;
    bottom: -100px; left: 50%; transform: translateX(-50%);
    width: 60%; height: 200px;
    background: radial-gradient(ellipse at bottom, rgba(30, 42, 120, 0.3) 0%, transparent 70%);
    pointer-events: none;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-col h4 { margin-bottom: 24px; font-size: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-muted); font-size: 0.95rem; }
.footer-col a:hover { color: var(--secondary); }
.footer-bottom {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* =========================================
   Animations (GSAP/Framer equivalents)
   ========================================= */

/* Scroll Reveal Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-revealed {
    opacity: 1 !important;
    transform: translate(0) scale(1) !important;
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Parallax elements */
.parallax-el {
    transition: transform 0.1s linear;
}

/* Keyframes */
@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(5%, -5%) rotate(5deg) scale(1.05); }
    66% { transform: translate(-5%, 5%) rotate(-5deg) scale(0.95); }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 180, 160, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 180, 160, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 180, 160, 0); }
}
@keyframes floatY {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* =========================================
   Responsive Global Rules
   ========================================= */
@media (max-width: 1024px) {
    .title-xl { font-size: 3.5rem; }
    .title-lg { font-size: 3rem; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
    body { cursor: auto; /* disable custom cursor on touch */ }
    #cursor-dot, #cursor-glow { display: none; }
    
    .nav {
        position: fixed;
        top: var(--nav-height); left: 0;
        width: 100%; height: calc(100vh - var(--nav-height));
        background: rgba(2, 4, 10, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        backdrop-filter: blur(20px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-base);
    }
    .nav.nav-open {
        opacity: 1; pointer-events: all;
    }
    .nav-link { font-size: 1.5rem; }
    .mobile-menu-btn { display: flex; }
    
    /* Reveal animations instantly on mobile for better UX */
    .reveal-up, .reveal-scale, .reveal-left, .reveal-right {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .title-xl { font-size: 2.5rem; }
    .title-lg { font-size: 2.2rem; }
    
    .flex.justify-center.gap-4 {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .section { padding: 80px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}
