/**
 * Özdemir Makine - Visual WOW Features CSS
 * Particles, Page Transitions, Typing Effect
 */

/* ==========================================
   1. PARTICLES CANVAS
   ========================================== */
#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================
   2. PAGE TRANSITIONS (DISABLED)
   ========================================== */
/* Page transitions removed for better performance */

/* ==========================================
   3. TYPING EFFECT
   ========================================== */
.typing-wrapper {
    display: inline;
    border-right: 3px solid var(--primary-500);
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

.dynamic-typing {
    display: inline-flex;
    align-items: center;
}

.typing-text {
    display: inline;
    min-width: 5px;
}

.typing-cursor {
    display: inline-block;
    color: var(--primary-500);
    font-weight: 300;
    animation: cursorBlink 0.7s step-end infinite;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================
   4. FLOATING GEOMETRIC SHAPES
   ========================================== */
.floating-shapes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    opacity: 0.08;
    animation: floatGeometric 20s ease-in-out infinite;
}

.floating-shape.circle {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
}

.floating-shape.square {
    border-radius: 15%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: rotate(15deg);
}

.floating-shape.triangle {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 60px solid rgba(16, 185, 129, 0.3);
}

.floating-shape.hexagon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

@keyframes floatGeometric {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }
    75% {
        transform: translate(20px, 30px) rotate(270deg);
    }
}

/* ==========================================
   5. SCROLL PROGRESS INDICATOR
   ========================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-500), #6366f1);
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--primary-500);
}

/* ==========================================
   6. CURSOR TRAIL
   ========================================== */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, var(--primary-400), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    transition: opacity 0.5s, transform 0.5s;
}

.cursor-trail.fade {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
}

/* ==========================================
   7. SMOOTH SECTION ANIMATIONS
   ========================================== */
.section-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-animate.section-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-child {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-child.stagger-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   8. TEXT GRADIENT ANIMATION
   ========================================== */
.gradient-text {
    background: linear-gradient(
        135deg,
        var(--text-primary) 0%,
        var(--primary-500) 25%,
        var(--text-primary) 50%,
        var(--primary-500) 75%,
        var(--text-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ==========================================
   9. GLOW EFFECTS
   ========================================== */
.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-400),
        transparent 30%
    );
    animation: glowRotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-on-hover:hover::before {
    opacity: 1;
}

@keyframes glowRotate {
    100% { transform: rotate(360deg); }
}

/* ==========================================
   10. MORPHING BACKGROUND
   ========================================== */
.morphing-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: morphGradient 15s ease infinite;
    opacity: 0.03;
}

@keyframes morphGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================
   11. RIPPLE EFFECT ON BUTTONS
   ========================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================
   12. SHINE EFFECT
   ========================================== */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.6s;
}

.shine-effect:hover::after {
    transform: rotate(30deg) translateX(100%);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .floating-shapes-container {
        display: none;
    }

    .cursor-trail {
        display: none;
    }

    .transition-logo .logo-text {
        font-size: 2rem;
    }

    .transition-loader {
        width: 150px;
    }

    .scroll-progress {
        height: 2px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .floating-shape,
    .transition-shapes .shape,
    .gradient-text,
    .morphing-bg {
        animation: none;
    }

    .page-exit,
    .page-enter {
        animation: none;
    }

    .section-animate {
        opacity: 1;
        transform: none;
    }

    .stagger-child {
        opacity: 1;
        transform: none;
    }
}

