:root {
    --bg-color: #030303;
    --surface-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    /* Vibrant Indigo */
    --accent-glow: rgba(99, 102, 241, 0.15);
    --border-color: rgba(255, 255, 255, 0.08);
    --transition-smooth: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile tap highlight */
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind content, ahead of base bg */
    pointer-events: none;
    /* Let clicks pass through, but we can still track mouse in JS */
}

/* Noise Overlay - Adds texture/life */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Background Ambient Pulse - "Alive" feel */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03), transparent 60%);
    z-index: -1;
    animation: ambient-pulse 10s infinite ease-in-out;
}

@keyframes ambient-pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Utilities */
.accent-text {
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 300;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 600;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 18px 36px;
    border-radius: 100px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--border-color);
}

.btn-text {
    padding: 0;
    color: var(--text-primary);
    font-size: 16px;
}

.btn-text .arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.btn-text:hover .arrow {
    transform: translateX(10px);
}

/* Cursor Customization */
.cursor {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s ease;
}

/* Preloader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 10px;
    display: block;
    margin-bottom: 20px;
    opacity: 0;
}

.loader-bar-container {
    width: 200px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: #fff;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

nav.scrolled {
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
    /* Space for navbar */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: #000;
}

.gradient-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vw;
    height: 120vh;
    background: radial-gradient(circle at center,
            rgba(99, 102, 241, 0.15) 0%,
            rgba(99, 102, 241, 0.05) 30%,
            rgba(0, 0, 0, 0) 70%);
    filter: blur(80px);
    z-index: -1;
    animation: drift 20s infinite alternate ease-in-out;
}

@keyframes drift {
    0% {
        transform: translate(-55%, -55%) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-45%, -50%) rotate(5deg) scale(1.1);
    }

    100% {
        transform: translate(-50%, -45%) rotate(-5deg) scale(1);
    }
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(48px, 10vw, 120px);
    line-height: 1.05;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: clamp(18px, 2.2vw, 22px);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-primary);
    animation: scroll-anim 2s infinite cubic-bezier(0.77, 0, 0.175, 1);
}

@keyframes scroll-anim {
    0% {
        transform: translateY(-100%);
    }

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

/* Work Section */
.work {
    padding: 120px 0;
    overflow: hidden;
    position: relative;
    background: var(--bg-color);
}

.work-slider-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0 60px;
    /* Space for shadow/interaction */
    cursor: grab;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Hide scrollbar */
.work-slider-container::-webkit-scrollbar {
    display: none;
}

.work-slider-container:active {
    cursor: grabbing;
}

.work-slider {
    display: flex;
    gap: 60px;
    padding: 0 max(40px, calc((100vw - 1400px) / 2));
    /* Center starting point */
    width: max-content;
}

.work-card {
    display: block;
    width: 450px;
    flex-shrink: 0;
    text-decoration: none;
    position: relative;
    /* Group for hover effects */
}

.work-image-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    /* Standard screenshot ratio */
    background: #000;
    /* Dark background to frame contained images */
    overflow: hidden;
    margin-bottom: 25px;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.work-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Shows full image */
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 1;
    /* Keep fully visible for clarity */
}

.work-card:hover .work-image-wrapper img {
    transform: scale(1.02);
}

.work-info h3 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.work-info p {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .work-slider {
        gap: 30px;
        padding: 0 30px;
    }

    .work-card {
        width: 300px;
    }

    .work-image-wrapper {
        margin-bottom: 15px;
    }

    .work-info h3 {
        font-size: 22px;
    }
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--surface-color);
}

.services-wrapper {
    display: flex;
    gap: 100px;
}

.services-left {
    flex: 1;
    position: sticky;
    top: 150px;
    height: fit-content;
}

.services-left h2 {
    font-size: clamp(32px, 5vw, 60px);
    margin-bottom: 30px;
    line-height: 1.1;
}

.services-left p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 400px;
}

.services-right {
    flex: 1.5;
}

/* Service Items */
.service-item {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-item::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.04), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.service-item:hover::before,
.service-item.active::before {
    opacity: 1;
}

.service-item:first-child {
    border-top: 1px solid var(--border-color);
}

.service-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    padding-left: 20px;
}

.service-item.active {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.03);
    padding-left: 20px;
}

.service-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Aligns title and button */
    position: relative;
    z-index: 1;
}

.service-item h3 {
    font-size: 32px;
    margin-bottom: 0;
    flex: 1;
    transition: color 0.3s ease;
}

.service-item:hover h3,
.service-item.active h3 {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    color: #fff;
}

.service-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-left: 20px;
}

.service-item:hover .service-toggle,
.service-item.active .service-toggle {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: rotate(90deg);
}

.service-item.active .service-toggle {
    transform: rotate(135deg);
    /* Make it look like an X when open */
}

.service-item>p {
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 0;
    margin-top: 15px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.service-item.active>p {
    margin-bottom: 20px;
}

/* Service Details (Hidden by default) */
.service-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    position: relative;
    z-index: 1;
}

.service-item.active .service-details {
    max-height: 500px;
    /* Arbitrary large height for animation */
    opacity: 1;
}

.service-details ul {
    list-style: none;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
    margin-top: 10px;
}

.service-details li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
    font-size: 16px;
    transition: var(--transition-smooth);
}

.service-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.service-details li:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.service-details li:hover::before {
    width: 12px;
}

/* About Section */
.about {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 100px;
    align-items: center;
}

.about-image {
    position: relative;
    aspect-ratio: 4/5;
    background: var(--surface-color);
    overflow: hidden;
    max-width: 400px;
    border-radius: 35px;
    /* Reduced specific size */
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    font-size: clamp(32px, 5vw, 60px);
    margin-bottom: 30px;
}

.about-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.about-stats {
    display: flex;
    gap: 60px;
    margin-top: 50px;
}

.stat-value {
    display: block;
    font-size: 48px;
    font-family: var(--font-heading);
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-card {
    background: var(--surface-color);
    padding: 60px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    border-radius: 4px;
}

.contact-info h2 {
    font-size: 50px;
    margin-bottom: 15px;
}

.contact-info p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-details a {
    font-size: 24px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-details a:hover {
    color: var(--text-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--text-primary);
}

/* Footer */
footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 32px;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: 5px;
}

.footer-socials {
    display: flex;
    gap: 30px;
}

.footer-socials a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-content {
        max-width: 90%;
    }

    .services-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .services-left {
        position: relative;
        top: 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        margin: 0 auto;
    }

    .contact-card {
        grid-template-columns: 1fr;
        padding: 40px 30px;
        gap: 40px;
    }
}

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

    .hero h1 {
        font-size: 60px;
    }

    .work-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .work-card.large {
        grid-column: auto;
    }

    .service-item h3 {
        font-size: 28px;
    }

    .contact-info h2 {
        font-size: 40px;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }
}
