::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #101a22; 
}
::-webkit-scrollbar-thumb {
    background: #233948; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2b9dee; 
}

.btn-glow {
    transition: box-shadow 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 15px rgba(43, 157, 238, 0.4);
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes reverse-spin {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-spin-slower {
    animation: spin-slow 30s linear infinite;
}

.animate-reverse-spin-slow {
    animation: reverse-spin 25s linear infinite;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ========================= */
/* Infinite Scrolling Marquee */
/* ========================= */
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-container {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: marquee-scroll 20s linear infinite;
    gap: 0;
}

.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 24px;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.marquee-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.marquee-separator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(43, 157, 238, 0.3);
    flex-shrink: 0;
    margin: 0 12px;
}

@media (max-width: 767px) {
    .marquee-track {
        animation-duration: 14s;
    }
    .marquee-item {
        padding: 6px 16px;
        gap: 8px;
    }
    .marquee-separator {
        width: 4px;
        height: 4px;
        margin: 0 8px;
    }
}

/* ====================== */
/* Work Section - Desktop  */
/* ====================== */
.work-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(43, 157, 238, 0.15), 0 0 0 1px rgba(43, 157, 238, 0.2);
}

/* =============================== */
/* Work Section - Mobile Stacking  */
/* =============================== */
@media (max-width: 767px) {
    .work-stack-container {
        display: flex;
        flex-direction: column;
        gap: 0;
        /* Extra bottom padding so last card can scroll into view fully */
        padding-bottom: 40vh;
    }

    .work-stack-card {
        position: sticky;
        /* Each card sticks a bit lower so it peeks behind the next */
        top: calc(70px + var(--card-index) * 12px);
        z-index: calc(var(--card-index) + 1);
        margin-bottom: 30px;
        transition: transform 0.3s ease;
    }

    .work-stack-card-inner {
        transition: box-shadow 0.4s ease, transform 0.4s ease;
    }

    /* Slight scale-down on earlier cards to give depth illusion */
    .work-stack-card:not(:last-child) .work-stack-card-inner {
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(43, 157, 238, 0.08);
    }

    .work-stack-card:last-child .work-stack-card-inner {
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(43, 157, 238, 0.12);
    }
}

/* ========================= */
/* FAQ Accordion              */
/* ========================= */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    opacity: 1;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: #2b9dee;
}

.faq-toggle {
    background: none;
    border: none;
    outline: none;
}

.faq-toggle:focus-visible {
    outline: 2px solid #2b9dee;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================= */
/* About Section              */
/* ========================= */
.about-section {
    padding: 100px 20px;
    background: #0b1220;
    color: #e5e7eb;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
}

.about-section-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.about-text {
    font-size: 18px;
    line-height: 1.7;
    color: #9ca3af;
    margin-bottom: 20px;
    max-width: 750px;
}

.about-highlight {
    font-size: 18px;
    margin: 30px 0;
    font-weight: 500;
    background: linear-gradient(90deg, #60a5fa, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trust-points {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
    color: #d1d5db;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.trust-item:hover {
    border-color: rgba(43, 157, 238, 0.3);
    background: rgba(43, 157, 238, 0.08);
    transform: translateY(-2px);
}

.trust-icon {
    font-size: 18px;
    color: #60a5fa;
}

/* About section responsive */
@media (max-width: 767px) {
    .about-section {
        padding: 60px 16px;
    }

    .about-section-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .about-text {
        font-size: 15px;
        line-height: 1.6;
    }

    .about-highlight {
        font-size: 16px;
        margin: 20px 0;
    }

    .trust-points {
        flex-direction: column;
        gap: 12px;
    }

    .trust-item {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* ============================================= */
/* Scroll Animation System                        */
/* ============================================= */

/* --- Base: Fade In Up --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Fade In Down --- */
.fade-in-down {
    opacity: 0;
    transform: translateY(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-down.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Fade In Left --- */
.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Fade In Right --- */
.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Scale In --- */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Blur In --- */
.blur-in {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.blur-in.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- Stagger delay utility classes (used by JS) --- */
.stagger-delay-1 { transition-delay: 0.1s !important; }
.stagger-delay-2 { transition-delay: 0.2s !important; }
.stagger-delay-3 { transition-delay: 0.3s !important; }
.stagger-delay-4 { transition-delay: 0.4s !important; }
.stagger-delay-5 { transition-delay: 0.5s !important; }
.stagger-delay-6 { transition-delay: 0.6s !important; }
.stagger-delay-7 { transition-delay: 0.7s !important; }
.stagger-delay-8 { transition-delay: 0.8s !important; }

/* --- Respect prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .fade-in-down,
    .fade-in-left,
    .fade-in-right,
    .scale-in,
    .blur-in {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}
