:root {
    --bg: #111111;
    --text: #f5f5f5;
    --card: #1b1b1b;
    --primary: #ff7849;
    --secondary: #a855f7;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.04);
    --nav-bg: rgba(0, 0, 0, .7);
    --grid: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] {
    --bg: #ffffff;
    --text: #111111;
    --card: #f8f8f8;
    --border: rgba(0, 0, 0, 0.08);
    --glass: rgba(0, 0, 0, 0.03);
    --nav-bg: rgba(255, 255, 255, .8);
    --grid: rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: .4s ease;
    overflow-x: hidden;
}

/* Neural Grid */
body::before {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
}

/* Particles */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navbar */
.navbar {
    transition: .4s;
}

.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
}

/* Hero */
.hero {
    position: relative;
    padding: 180px 0;
    overflow: hidden;
}

.hero h1 {
    font-size: 58px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    color: transparent;
}

/* Button */
.btn-primary-custom {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50px;
    padding: 14px 34px;
    font-weight: 600;
    transition: .4s cubic-bezier(.4, 0, .2, 1);
}

.btn-primary-custom:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(168, 85, 247, .3);
}

/* Cards */
.service-card {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    transition: .4s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, .4);
}

/* Dashboard */
.dashboard {
    background: var(--glass);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Footer */
.footer {
    background: #0a0a0a;
    padding: 50px 0;
}

.theme-toggle {
    cursor: pointer;
    font-size: 20px;
    color: var(--primary);
}

.service-card ul li {
    padding: 6px 0;
    transition: .3s;
}

.service-card ul li:hover {
    transform: translateX(6px);
    color: var(--primary);
}

.service-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: .4s cubic-bezier(.4, 0, .2, 1);
}

.service-box:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .3);
    border: 1px solid var(--primary);
}

.icon-box {
    width: 70px;
    height: 70px;
    margin: auto;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* Horizontal Services */
.services-scroll {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 40px 10px;
    scroll-snap-type: x mandatory;
}

.services-scroll::-webkit-scrollbar {
    height: 6px;
}

.services-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.service-horizontal {
    min-width: 320px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    position: relative;
    padding: 40px;
    border-radius: 28px;
    background: var(--card);
    border: 1px solid var(--border);
    transition: .4s;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.service-horizontal:hover {
    transform: translateY(-12px);
}

/* Animated gradient border */
.service-horizontal::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderMove 6s linear infinite;
}

@keyframes borderMove {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

/* Hover reveal */
.service-detail {
    opacity: .6;
    transition: .4s;
}

.service-horizontal:hover .service-detail {
    opacity: 1;
    transform: translateY(-5px);
}

.glow-card {
    padding: 40px;
    border-radius: 30px;
    background: var(--card);
    position: relative;
    overflow: hidden;
    transition: .4s;
}

.glow-card::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    top: -50px;
    right: -50px;
    opacity: .3;
    transition: .5s;
}

.glow-card:hover::after {
    transform: scale(1.4);
    opacity: .5;
}

.glow-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}

.counter {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    color: transparent;
}

/* Animated Gradient Wave Background */
.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, var(--primary), transparent 40%),
        radial-gradient(circle at 70% 70%, var(--secondary), transparent 40%);
    animation: waveMove 15s linear infinite;
    opacity: 0.15;
    z-index: -1;
}

@keyframes waveMove {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.testimonial-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    transition: .4s;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.company-info {
    background: var(--glass);
    border-radius: 30px;
    padding: 50px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 50px 30px;
    transition: .4s;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
    border: 1px solid var(--primary);
}

.price {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    color: transparent;
}

.chatbot-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
    z-index: 999;
}

.chatbot-box {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 320px;
    background: var(--card);
    border-radius: 20px;
    padding: 20px;
    display: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.chatbot-box.active {
    display: block;
}

html {
    scroll-behavior: smooth;
}

/* Page fade in */
body {
    animation: pageFade 1s ease;
}

@keyframes pageFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cursor-glow {
    position: fixed;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary), transparent 60%);
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: .08;
    z-index: 0;
    transform: translate(-50%, -50%);
}

.logo-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.logo-track {
    display: inline-block;
    animation: scrollLogo 35s linear infinite;
}

.logo-track img {
    height: 50px;
    margin: 0 40px;
    opacity: .7;
    transition: .3s;
}

.logo-track img:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scrollLogo {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.parallax-section {
    position: relative;
    padding: 160px 0;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background: radial-gradient(circle at 20% 30%, var(--primary), transparent 40%),
        radial-gradient(circle at 80% 70%, var(--secondary), transparent 40%);
    opacity: .12;
    transform: translateY(0);
    transition: transform .1s linear;
    z-index: -1;
}

.tilt-card {
    perspective: 1000px;
}

.tilt-inner {
    transition: transform .2s ease;
    transform-style: preserve-3d;
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(.4, 0, .2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card);
    padding: 50px;
    display: none;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: .3s;
}

.nav-item:hover .mega-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-column h6 {
    font-weight: 700;
    margin-bottom: 15px;
}

.mega-column a {
    display: block;
    padding: 6px 0;
    opacity: .7;
    text-decoration: none;
    color: var(--text);
    transition: .3s;
}

.mega-column a:hover {
    opacity: 1;
    transform: translateX(6px);
}

#webgl-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 9999;
}

.back-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: .3s;
}

.back-top.show {
    opacity: 1;
}

.service-box {
    position: relative;
    overflow: hidden;
}

.service-box::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary), transparent 60%);
    opacity: 0;
    transition: .4s;
    pointer-events: none;
}

.service-box:hover::before {
    opacity: .25;
}

@media (prefers-reduced-motion: reduce) {

    * {
        animation: none !important;
        transition: none !important;
    }

}

.hero {
    transform: translateY(0);
    transition: transform .2s linear;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: .04;
    pointer-events: none;
    z-index: 999;
}

.magnetic {
    position: relative;
    display: inline-block;
    transition: transform .2s ease;
}

.liquid {
    position: relative;
    overflow: hidden;
}

.liquid::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    background: radial-gradient(circle,
            rgba(255, 120, 73, .6),
            transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width .4s, height .4s;
}

.liquid:hover::after {
    width: 300px;
    height: 300px;
}

.story {
    height: 300vh;
    position: relative;
}

.story-step {
    position: sticky;
    top: 40vh;
    opacity: .2;
    transition: .5s;
    text-align: center;
}

.story-step.active {
    opacity: 1;
    transform: scale(1.1);
}

.hero::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(120px);
    opacity: .25;
    z-index: -1;
}

.service-box::before {
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
}

#loader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #333;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.project-logo img {
    height: 70px;
    width: auto;
    transition: all .4s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .4));
}

.service-box:hover .project-logo img {
    transform: scale(1.1) rotate(-2deg);
}