/**
 * Enhanced Parallax Effects - CSS
 * Modern & Creative Parallax Transitions
 */

/* Base Parallax Elements - Hardware Acceleration */
[data-parallax-depth],
[data-parallax-rotate],
[data-gsap-parallax],
[data-parallax-layer],
[data-3d-layer],
[data-mouse-speed] {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

/* Smooth Transitions */
[data-parallax-depth] {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-magnetic],
[data-mouse-speed] {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-tilt] {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

/* 3D Parallax Container */
[data-parallax-3d] {
    perspective: 1000px;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

[data-3d-layer] {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

/* Parallax Container */
[data-parallax-container] {
    position: relative;
    overflow: hidden;
}

/* Reveal Effects */
.parallax-reveal-init {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Enhanced Parallax Background */
.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Smooth Parallax */
[data-parallax-smooth] {
    transition: transform 0.1s ease-out;
}

/* Mouse Parallax Container */
[data-mouse-parallax] {
    position: relative;
    overflow: hidden;
}

/* Horizontal Scroll */
[data-horizontal-scroll] {
    display: flex;
    flex-wrap: nowrap;
    position: relative;
    overflow: hidden;
}

[data-horizontal-item] {
    flex-shrink: 0;
    will-change: transform;
}

/* Depth Layers */
.parallax-layer-1 {
    z-index: 1;
}

.parallax-layer-2 {
    z-index: 2;
}

.parallax-layer-3 {
    z-index: 3;
}

.parallax-layer-4 {
    z-index: 4;
}

.parallax-layer-5 {
    z-index: 5;
}

/* Advanced Reveal Animations */
[data-gsap-reveal="fade"] {
    opacity: 0;
}

[data-gsap-reveal="slide-left"],
[data-gsap-reveal="slide-right"] {
    opacity: 0;
}

[data-gsap-reveal="scale"] {
    opacity: 0;
    transform: scale(0.8);
}

[data-gsap-reveal="rotate"] {
    opacity: 0;
    transform: rotate(45deg) scale(0.8);
}

[data-gsap-reveal="flip"] {
    opacity: 0;
    transform: rotateY(90deg);
    transform-style: preserve-3d;
}

/* Parallax Section Enhancements */
.parallax.section {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.parallax.section .parallax-background {
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* Smooth Scroll Enhancement */
.parallax-smooth-scroll {
    scroll-behavior: smooth;
}

/* Improved Background Attachment */
.parallax-fixed-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Layered Parallax */
.parallax-layers-wrapper {
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.parallax-layers-wrapper .parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* Magnetic Effect Enhancement */
[data-magnetic] {
    cursor: pointer;
    display: inline-block;
}

[data-magnetic]:hover {
    z-index: 10;
}

/* Tilt Effect Enhancement */
[data-tilt] {
    display: block;
    transform-origin: center center;
}

/* Performance Optimizations */
.parallax-performance-mode [data-parallax-depth],
.parallax-performance-mode [data-parallax-rotate],
.parallax-performance-mode [data-gsap-parallax] {
    transition: none;
}

/* Scroll Indicator for Parallax Sections */
.parallax-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Gradient Overlays for Parallax */
.parallax-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.parallax-gradient-overlay.gradient-top {
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.parallax-gradient-overlay.gradient-bottom {
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
}

/* Blur Effect on Parallax */
.parallax-blur-effect {
    filter: blur(0px);
    transition: filter 0.3s ease;
}

.parallax-blur-effect.blurred {
    filter: blur(5px);
}

/* Zoom on Scroll Effect */
.parallax-zoom-scroll {
    transform: scale(1);
    transition: transform 0.3s ease;
}

/* Mobile Optimizations */
@media (max-width: 991px) {
    [data-parallax-3d],
    [data-mouse-parallax],
    [data-tilt] {
        pointer-events: auto;
    }
    
    .parallax-fixed-bg {
        background-attachment: scroll;
    }
    
    [data-parallax-depth] {
        transform: none !important;
    }
    
    /* Disable complex effects on mobile for performance */
    .mobile-disable-parallax [data-parallax-rotate],
    .mobile-disable-parallax [data-parallax-smooth] {
        transform: none !important;
    }
}

/* High Performance Mode */
@media (prefers-reduced-motion: reduce) {
    [data-parallax-depth],
    [data-parallax-rotate],
    [data-parallax-smooth],
    [data-gsap-parallax],
    [data-magnetic],
    [data-tilt] {
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Parallax Content Layers */
.parallax-content {
    position: relative;
    z-index: 10;
}

.parallax-content-foreground {
    position: relative;
    z-index: 20;
}

.parallax-content-background {
    position: absolute;
    z-index: 1;
}

/* Creative Parallax Shapes */
.parallax-shape {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

.parallax-shape.circle {
    border-radius: 50%;
}

.parallax-shape.triangle {
    width: 0;
    height: 0;
    border-style: solid;
}

/* NOVA Cosmic Theme Shapes */
.parallax-shape.shape-ocean {
    background: radial-gradient(circle at 30% 30%, #63CEEF 0%, #36a8e5 60%, rgba(0,2,32,0.6) 100%);
    box-shadow: 0 10px 40px rgba(54, 168, 229, 0.35);
}

.parallax-shape.shape-gold {
    background: radial-gradient(circle at 70% 30%, #E0C767 0%, #D2AF26 50%, rgba(0,2,32,0.6) 100%);
    box-shadow: 0 10px 40px rgba(210, 175, 38, 0.35);
}

.parallax-shape.shape-deep {
    background: radial-gradient(circle at 50% 50%, #3d8ebd 0%, #13385b 55%, #001637 100%);
    box-shadow: 0 10px 40px rgba(19, 56, 91, 0.4);
}

.parallax-shape.shape-cyan {
    background: radial-gradient(circle at 30% 70%, #aad1dd 0%, #63CEEF 45%, rgba(0,22,55,0.6) 100%);
    box-shadow: 0 10px 40px rgba(99, 206, 239, 0.3);
}

/* Triangle variants using borders (transparent sides) */
.parallax-shape.triangle.shape-gold {
    width: 0; height: 0; background: transparent !important; box-shadow: none;
    border-width: 0 32px 56px 32px;
    border-color: transparent transparent #D2AF26 transparent;
    filter: drop-shadow(0 10px 20px rgba(210,175,38,0.3));
}

.parallax-shape.triangle.shape-ocean {
    width: 0; height: 0; background: transparent !important; box-shadow: none;
    border-width: 0 28px 48px 28px;
    border-color: transparent transparent #36a8e5 transparent;
    filter: drop-shadow(0 10px 20px rgba(54,168,229,0.3));
}

/* Suggested sizes */
.shape-xs { width: 12px; height: 12px; }
.shape-sm { width: 28px; height: 28px; }
.shape-md { width: 56px; height: 56px; }
.shape-lg { width: 96px; height: 96px; }
.shape-xl { width: 160px; height: 160px; }

/* Position helpers */
.shape-top-left { top: 6%; left: 6%; }
.shape-top-right { top: 8%; right: 8%; }
.shape-bottom-left { bottom: 8%; left: 8%; }
.shape-bottom-right { bottom: 10%; right: 10%; }
.shape-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Opacity Animation */
.parallax-fade-in-out {
    animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* Rotation Animation */
.parallax-rotate-continuous {
    animation: rotateContinuous 20s linear infinite;
}

@keyframes rotateContinuous {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Scale Pulse Animation */
.parallax-pulse {
    animation: scalePulse 2s ease-in-out infinite;
}

/* Float variants */
.parallax-float-slow {
    animation-duration: 9s;
}

.parallax-float-fast {
    animation-duration: 4.5s;
}

@keyframes scalePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Floating Animation */
.parallax-float {
    animation: float 6s ease-in-out infinite;
}

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

/* Enhanced Transform Transitions */
.parallax-transform-smooth {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.parallax-transform-elastic {
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.parallax-transform-bounce {
    transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* NOVA Hero Fullscreen Parallax */
.nova-parallax-hero {
    min-height: 100vh;
    position: relative;
}

.nova-hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

.nova-parallax-hero .scrollable-parallax-wrapper > * {
    position: relative;
    z-index: 2;
}

.nova-hero-copy {
    position: relative;
    z-index: 3;
    color: #fff;
}

.nova-hero-title {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    margin: 0;
    position: relative;
}

.nova-hero-subhead {
    font-family: 'Spongition', 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 2.2vw, 2rem);
    line-height: 1.4;
    max-width: 840px;
    margin: 0 auto;
    color: #fff;
    text-shadow: none;
    opacity: 0;
    animation: heroSubFade 1s ease 0.25s forwards;
}

@keyframes heroSubFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.nova-hero-cta {
    padding: 0.9rem 2.6rem;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    box-shadow: 0 20px 40px rgba(54, 168, 229, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 1 !important;
    display: inline-flex !important;
}

.nova-hero-cta:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 24px 48px rgba(99, 206, 239, 0.45);
}

@media (max-width: 991px) {
    .nova-parallax-hero {
        min-height: 90vh;
    }
    .nova-hero-title {
        font-size: clamp(2.8rem, 11vw, 5rem);
    }
    .nova-hero-subhead {
        font-size: clamp(1rem, 3vw, 1.6rem);
    }
}
