/* ================================================
   CyberNytronX - Three.js Styles
   Lusion.co-inspired Design System
   ================================================ */

/* Three.js Canvas */
#threejs-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Section animations (Lusion.co style fade-in) */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Page transition overlay (Lusion.co style) */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1628 0%, #030712 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.page-transition-overlay::before {
    content: '';
    width: 50px;
    height: 50px;
    border: 3px solid #00d4ff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.page-transition-overlay.fade-out {
    opacity: 0;
}

.page-transition-overlay.fade-in {
    opacity: 1;
    pointer-events: all;
}

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

/* Enhanced hero section with 3D effect */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Parallax container */
[data-parallax] {
    will-change: transform;
}

/* Smooth card hover effects (Lusion.co inspired) */
.pathway-card,
.tool-preview-card,
.content-card,
.testimonial-card,
.leader-card,
.award-card,
.culture-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.pathway-card:hover,
.tool-preview-card:hover,
.content-card:hover,
.testimonial-card:hover,
.leader-card:hover,
.award-card:hover,
.culture-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.2);
}

/* Smooth button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Magnetic cursor effect areas */
.interactive-area {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced scroll indicator */
.scroll-indicator,
.scroll-hint {
    animation: float 2s ease-in-out infinite;
}

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

/* Glowing text effect */
.gradient-text,
.highlight {
    position: relative;
    background: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced timeline animations */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    transform: translateX(50px);
}

.timeline-item:nth-child(even).visible {
    transform: translateX(0);
}

/* Smooth image reveals */
img,
.hero-visual,
.code-window {
    opacity: 0;
    transform: scale(0.95);
    animation: imageReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes imageReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom cursor (optional - Lusion.co has this) */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #00d4ff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.2s ease, opacity 0.2s ease;
    mix-blend-mode: difference;
}

.custom-cursor.cursor-hover {
    transform: scale(1.5);
    background: rgba(0, 212, 255, 0.2);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #threejs-canvas {
        display: none;
    }
}

/* Performance optimizations */
.pathway-card,
.tool-preview-card,
.content-card,
.testimonial-card,
.leader-card {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Loading state */
body.loading {
    overflow: hidden;
}

/* Enhanced focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 4px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Smooth navigation transitions */
.site-header {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #threejs-canvas {
        opacity: 0.5; /* Reduce intensity on mobile for performance */
    }

    .section-animate {
        transform: translateY(20px);
    }

    .pathway-card:hover,
    .tool-preview-card:hover,
    .content-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

/* High performance mode for slower devices */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    #threejs-canvas {
        filter: blur(2px); /* Reduce render cost on mobile */
    }
}
