/* ============================================
   UI/UX CREATIVE ENHANCEMENTS
   ============================================ */

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(124, 58, 237, 0.2);
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7C3AED 0%, #22D3EE 100%);
    width: 0%;
    transition: width 0.1s ease;
}

/* Floating Action Button (Back to Top) */
.fab-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: all var(--transition-base);
    z-index: 999;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.fab-back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.fab-back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.6);
}

.fab-back-to-top svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Product Card Enhancements */
.scroll-step {
    position: relative;
    padding-left: 2rem;
}

.scroll-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-accent) 100%);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.scroll-step.active::before {
    opacity: 1;
}

/* Animated Section Numbers */
.story-label {
    position: relative;
    display: inline-block;
}

.story-label::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.6s ease;
}

.story-section.visible .story-label::before {
    width: 100%;
}

/* Interactive Video Play Button Overlay */
.story-video-wrapper {
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(124, 58, 237, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.story-video:not([autoplay])+.video-play-overlay {
    opacity: 1;
    pointer-events: all;
}

.video-play-overlay:hover {
    background: rgba(34, 211, 238, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Breadcrumb Trail */
.breadcrumb-trail {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breadcrumb-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.breadcrumb-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.breadcrumb-dot:hover::after {
    opacity: 1;
}

.breadcrumb-dot.active {
    background: var(--color-secondary);
    width: 16px;
    height: 16px;
}

.breadcrumb-dot.active::after {
    color: var(--color-secondary);
    font-weight: 600;
}

/* Tooltip Enhancement */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(28, 28, 43, 0.95);
    color: var(--color-text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Particle Background Effect */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-secondary);
    border-radius: 50%;
    animation: float-particle 20s infinite;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Micro-interactions for Cards */
.team-card-story,
.float-card,
.feature-box {
    position: relative;
    overflow: hidden;
}

/* Ensure social links are always clickable above pseudo-element overlays */
.team-social-links {
    position: relative;
    z-index: 2;
}

.team-info {
    position: relative;
    z-index: 2;
}

.social-icon-link {
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.team-card-story::before,
.float-card::before,
.feature-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            rgba(124, 58, 237, 0.1) 90deg,
            transparent 180deg);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.team-card-story:hover::before,
.float-card:hover::before,
.feature-box:hover::before {
    opacity: 1;
    animation: rotate 3s linear infinite;
}

/* Loading Skeleton for Images */
.team-avatar-story,
.story-video {
    position: relative;
    background: linear-gradient(90deg,
            rgba(124, 58, 237, 0.1) 0%,
            rgba(34, 211, 238, 0.1) 50%,
            rgba(124, 58, 237, 0.1) 100%);
    background-size: 200% 100%;
}

.team-avatar-story:not([src]),
.story-video:not([src]) {
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Glassmorphism Enhancement */
.glass-morphism {
    background: rgba(28, 28, 43, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Smooth Section Separator */
.section-separator {
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(124, 58, 237, 0.5) 50%,
            transparent 100%);
    margin: var(--spacing-md) 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .breadcrumb-trail {
        display: none;
    }

    .fab-back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .scroll-progress {
        height: 2px;
    }
}

/* Accessibility: Focus Styles */
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7C3AED 0%, #22D3EE 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #22D3EE 0%, #7C3AED 100%);
}

/* Text Selection */
::selection {
    background: rgba(124, 58, 237, 0.3);
    color: var(--color-text-primary);
}

::-moz-selection {
    background: rgba(124, 58, 237, 0.3);
    color: var(--color-text-primary);
}