/* ================================
   IMMERSIVE ENHANCEMENTS
   Custom cursor, parallax, 3D depth, micro-interactions
   ================================ */

/* ================================
   1. WHALE-THEMED CUSTOM CURSOR
   ================================ */

/* Custom cursor disabled - using default cursor */
@media (min-width: 1024px) {
    body {
        cursor: auto;
    }

    /* Allow text selection cursor on text */
    p, h1, h2, h3, h4, h5, h6, span, li, a {
        cursor: auto;
    }

    /* Show default cursor on inputs */
    input, textarea, select {
        cursor: auto;
    }

    /* Main whale cursor - simple solid silhouette - DISABLED */
    .custom-cursor {
        display: none; /* Custom cursor disabled */
        position: fixed;
        top: 0;
        left: 0;
        width: 48px;
        height: 32px;
        pointer-events: none;
        z-index: 9999;
        transform: translate3d(0, 0, 0); /* GPU acceleration - updated by JS */
        will-change: transform;
        backface-visibility: hidden; /* Prevent flicker */
        opacity: 1; /* Visible by default */
        transition: opacity 0.2s ease,
                    width 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                    height 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    }

    /* Whale SVG container - simple shadow for depth */
    .custom-cursor svg {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        transition: filter 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    }

    /* Center dot - DISABLED */
    .custom-cursor-dot {
        display: none; /* Custom cursor disabled */
        position: fixed;
        top: 0;
        left: 0;
        width: 6px;
        height: 6px;
        background: linear-gradient(135deg, var(--aqua), var(--teal));
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        transform: translate3d(0, 0, 0); /* GPU acceleration - updated by JS */
        backface-visibility: hidden; /* Prevent flicker */
        box-shadow: 0 0 10px rgba(5, 191, 219, 0.6),
                    0 0 20px rgba(5, 191, 219, 0.3);
        will-change: transform;
        transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    }

    /* Whale trail particles - smaller whales following behind - DISABLED */
    .cursor-whale-trail {
        display: none; /* Custom cursor disabled */
        position: fixed;
        top: 0;
        left: 0;
        width: 36px;
        height: 24px;
        pointer-events: none;
        z-index: 9998;
        transform: translate3d(0, 0, 0); /* GPU acceleration - updated by JS */
        backface-visibility: hidden; /* Prevent flicker */
        will-change: transform, opacity;
    }

    .cursor-whale-trail svg {
        width: 100%;
        height: 100%;
        opacity: 0.6;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    }

    /* Click ripple effect (whale splash) */
    .cursor-ripple {
        position: fixed;
        border-radius: 50%;
        border: 2px solid var(--aqua);
        pointer-events: none;
        z-index: 9997;
        transform: translate(-50%, -50%);
        animation: whale-splash-ripple 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    }

    @keyframes whale-splash-ripple {
        0% {
            width: 20px;
            height: 20px;
            opacity: 1;
            border-width: 3px;
        }
        50% {
            border-color: var(--teal);
            border-width: 2px;
        }
        100% {
            width: 80px;
            height: 80px;
            opacity: 0;
            border-width: 1px;
            border-color: var(--deep-ocean);
        }
    }

    /* Secondary ripple (double splash effect) */
    .cursor-ripple-secondary {
        animation: whale-splash-secondary 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    }

    @keyframes whale-splash-secondary {
        0% {
            width: 20px;
            height: 20px;
            opacity: 0.6;
            border-width: 2px;
        }
        50% {
            border-color: var(--aqua);
        }
        100% {
            width: 100px;
            height: 100px;
            opacity: 0;
            border-width: 1px;
        }
    }

    /* Hover state - expand whale slightly */
    body.cursor-hover .custom-cursor {
        width: 54px;
        height: 36px;
    }

    body.cursor-hover .custom-cursor svg {
        filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
    }

    body.cursor-hover .custom-cursor-dot {
        width: 8px;
        height: 8px;
        background: linear-gradient(135deg, var(--coral), var(--aqua));
        box-shadow: 0 0 12px rgba(255, 107, 53, 0.6),
                    0 0 20px rgba(5, 191, 219, 0.3);
    }

    /* Click state - compress whale */
    body.cursor-click .custom-cursor {
        width: 44px;
        height: 30px;
    }

    body.cursor-click .custom-cursor svg {
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    }

    body.cursor-click .custom-cursor-dot {
        width: 4px;
        height: 4px;
        box-shadow: 0 0 8px rgba(5, 191, 219, 0.7);
    }

    /* Floating bubble particles around cursor (simple bubbles) - DISABLED */
    .cursor-whale-particle {
        display: none; /* Custom cursor disabled */
        position: fixed;
        top: 0;
        left: 0;
        width: 10px;
        height: 10px;
        pointer-events: none;
        z-index: 9997;
        transform: translate3d(0, 0, 0); /* GPU acceleration - updated by JS */
        backface-visibility: hidden; /* Prevent flicker */
        opacity: 0;
        will-change: transform, opacity;
    }

    .cursor-whale-particle svg {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    }

    /* Show bubble particles on hover */
    body.cursor-hover .cursor-whale-particle {
        opacity: 0.8;
        animation: bubble-float 1.8s ease-in-out infinite;
    }

    @keyframes bubble-float {
        0%, 100% {
            transform: translate(-50%, -50%) translateY(0) scale(1);
            opacity: 0.8;
        }
        50% {
            transform: translate(-50%, -50%) translateY(-12px) scale(0.9);
            opacity: 0.6;
        }
    }
}

/* ================================
   2. PARALLAX DEPTH LAYERS
   ================================ */

.parallax-container {
    position: relative;
    overflow: hidden;
}

/* Enhanced ocean background with multiple parallax layers */
.ocean-background {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.wave,
.gradient-orb {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Parallax scrolling for sections */
.section {
    position: relative;
    transform-style: preserve-3d;
}

/* Add depth to floating cards */
.floating-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 3D tilt effect on card hover */
@media (min-width: 1024px) {
    .floating-card {
        transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                    box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .floating-card:hover {
        transform-style: preserve-3d;
    }
}

/* ================================
   3. ENHANCED MICRO-INTERACTIONS
   ================================ */

/* Ripple effect on button click */
.btn {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Magnetic button effect */
@media (min-width: 1024px) {
    .btn-magnetic {
        /* Disabled - use standard button hover */
    }
}

/* Enhanced service card interactions */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(5, 191, 219, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Add shine effect on portfolio items */
.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.portfolio-image:hover::after {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* ================================
   4. 3D DEPTH & LAYERING
   ================================ */

/* Add depth to section headers */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: attr(data-text);
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: -1;
    color: var(--aqua);
    opacity: 0.1;
    pointer-events: none;
}

/* 3D card stacking effect */
.process-step {
    position: relative;
    transform-style: preserve-3d;
}

.process-step::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, var(--teal), var(--aqua));
    opacity: 0.1;
    border-radius: var(--radius-xl);
    z-index: -1;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.process-step:hover::before {
    top: 15px;
    left: 15px;
    opacity: 0.15;
}

/* Floating animation with parallax */
@keyframes float-parallax {
    0%, 100% {
        transform: translateY(0) translateZ(0);
    }
    50% {
        transform: translateY(-20px) translateZ(20px);
    }
}

.badge {
    animation: float-parallax 3s ease-in-out infinite;
}

.badge:nth-child(1) { animation-delay: 0s; }
.badge:nth-child(2) { animation-delay: 0.3s; }
.badge:nth-child(3) { animation-delay: 0.6s; }

/* ================================
   5. SMOOTH SECTION TRANSITIONS
   ================================ */

/* Add reveal animations on scroll with stagger */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth section background transitions */
.section {
    position: relative;
    transition: background-color 0.6s ease;
}

/* Add gradient overlay on section transitions */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 1)
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.section:first-of-type::before,
.cta-section::before {
    opacity: 0;
    display: none;
}

/* Enhanced scroll indicator with pulsing effect */
.scroll-indicator {
    animation: pulse-and-bounce 2s ease-in-out infinite;
}

@keyframes pulse-and-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.8;
    }
    25% {
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(15px);
        opacity: 0.6;
    }
    75% {
        opacity: 1;
    }
}

/* ================================
   6. HOVER GLOW EFFECTS
   ================================ */

/* Add glow to interactive elements */
.nav-link:hover {
    text-shadow: 0 0 20px rgba(5, 191, 219, 0.3);
}

/* Enhanced button glow - REMOVED for clean flat design */

/* ================================
   7. SMOOTH LOGO ANIMATION
   ================================ */

.logo-icon path,
.logo-icon circle {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.logo:hover .logo-icon circle:first-child {
    opacity: 0.4;
    transform: scale(1.1);
}

.logo:hover .logo-icon path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draw-wave 1s ease-in-out forwards;
}

@keyframes draw-wave {
    to {
        stroke-dashoffset: 0;
    }
}

/* ================================
   8. ENHANCED PORTFOLIO HOVER
   ================================ */

.portfolio-item {
    position: relative;
    transform-style: preserve-3d;
}

@media (min-width: 1024px) {
    .portfolio-image {
        transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .portfolio-item:hover .portfolio-image {
        transform: translateZ(30px) scale(1.02);
    }
}

.portfolio-overlay {
    backdrop-filter: blur(10px);
}

.portfolio-overlay h3 {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
}

.portfolio-overlay p {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.15s;
}

.portfolio-overlay .btn {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.2s;
}

.portfolio-image:hover .portfolio-overlay h3,
.portfolio-image:hover .portfolio-overlay p,
.portfolio-image:hover .portfolio-overlay .btn {
    transform: translateY(0);
}

/* ================================
   9. ENHANCED FOOTER WAVE
   ================================ */

.footer {
    position: relative;
}

.footer::before {
    animation: gentle-wave-enhanced 20s ease-in-out infinite;
}

@keyframes gentle-wave-enhanced {
    0%, 100% {
        transform: translateY(-100%) translateX(0) scaleY(1);
    }
    33% {
        transform: translateY(-100%) translateX(-2%) scaleY(1.05);
    }
    66% {
        transform: translateY(-100%) translateX(2%) scaleY(0.95);
    }
}

/* ================================
   10. PERFORMANCE OPTIMIZATIONS
   ================================ */

/* GPU acceleration for animated elements */
.floating-card,
.service-card,
.portfolio-item,
.process-step,
.btn {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Remove will-change after animation */
.floating-card:not(:hover),
.service-card:not(:hover),
.portfolio-item:not(:hover),
.process-step:not(:hover) {
    will-change: auto;
}

/* ================================
   ACCESSIBILITY - REDUCED MOTION
   ================================ */

@media (prefers-reduced-motion: reduce) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }

    body {
        cursor: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .parallax-container,
    .wave,
    .gradient-orb {
        transform: none !important;
    }
}
