/* animations.css - Erweiterte Version mit Portfolio Details */

/* ===================================
   KEYFRAME ANIMATIONS
   =================================== */

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes subtle-zoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

@keyframes scroll-line {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 40px;
        opacity: 1;
    }
    100% {
        height: 40px;
        opacity: 0;
    }
}

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

@keyframes drone-float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) translateY(-15px) rotate(3deg);
    }
    50% {
        transform: translate(-50%, -50%) translateY(0) rotate(0deg);
    }
    75% {
        transform: translate(-50%, -50%) translateY(15px) rotate(-3deg);
    }
}

@keyframes realistic-aperture-close {
    0% {
        transform: translate(-50%, -50%) scale(40) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 40px rgba(0, 0, 0, 0.8)) blur(0px);
    }
    70% {
        transform: translate(-50%, -50%) scale(3) rotate(45deg);
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.6)) blur(0px);
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(90deg);
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.4)) blur(2px);
    }
}

@keyframes realistic-blade-close {
    0% {
        opacity: 0;
        transform: rotate(var(--rotate, 0deg)) scale(0.5) translateX(-50%);
    }
    20% {
        opacity: 0.7;
    }
    40% {
        opacity: 1;
        transform: rotate(var(--rotate, 0deg)) scale(0.8) translateX(-10%);
    }
    70% {
        opacity: 1;
        transform: rotate(var(--rotate, 0deg)) scale(1) translateX(0);
    }
    100% {
        opacity: 1;
        transform: rotate(var(--rotate, 0deg)) scale(1.05) translateX(2%);
    }
}

@keyframes blade-shine {
    0%, 40% {
        opacity: 0;
    }
    60% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 123, 255, 0.6);
    }
}

@keyframes parallax-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(0) translateX(10px);
    }
    75% {
        transform: translateY(10px) translateX(5px);
    }
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow:
                0 0 10px rgba(0, 229, 255, 0.5),
                0 0 20px rgba(0, 229, 255, 0.3),
                0 0 30px rgba(0, 229, 255, 0.2);
    }
    50% {
        text-shadow:
                0 0 20px rgba(0, 229, 255, 0.8),
                0 0 30px rgba(0, 229, 255, 0.5),
                0 0 40px rgba(0, 229, 255, 0.3),
                0 0 50px rgba(0, 229, 255, 0.2);
    }
}

@keyframes neon-border-glow {
    0%, 100% {
        box-shadow:
                0 0 5px rgba(0, 229, 255, 0.3),
                0 0 10px rgba(0, 229, 255, 0.2),
                inset 0 0 5px rgba(0, 229, 255, 0.1);
    }
    50% {
        box-shadow:
                0 0 10px rgba(0, 229, 255, 0.6),
                0 0 20px rgba(0, 229, 255, 0.4),
                inset 0 0 10px rgba(0, 229, 255, 0.2);
    }
}

@keyframes text-reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes image-reveal {
    from {
        opacity: 0;
        transform: scale(0.9);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

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

/* ===================================
   PORTFOLIO DETAIL ANIMATIONS
   =================================== */

@keyframes project-detail-reveal {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

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

@keyframes badge-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.3);
    }
}

@keyframes spec-item-slide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes highlight-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    }
}

@keyframes video-play-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===================================
   ANIMATION CLASSES
   =================================== */

.fade-in {
    opacity: 0;
    animation: fade-in 0.8s ease-out forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.fade-in-view {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-view.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   PROJECT DETAIL ANIMATIONS
   =================================== */

.project-detail {
    opacity: 0;
    animation: project-detail-reveal 0.8s ease-out forwards;
}

.project-detail:nth-child(1) {
    animation-delay: 0.1s;
}

.project-detail:nth-child(2) {
    animation-delay: 0.2s;
}

.project-detail:nth-child(3) {
    animation-delay: 0.3s;
}

.project-detail:nth-child(4) {
    animation-delay: 0.4s;
}

/* Project Badge Animation */
.project-badge {
    animation: badge-bounce 2s ease-in-out infinite,
    badge-glow 2s ease-in-out infinite;
}

.project-badge:hover {
    animation-play-state: paused;
    transform: scale(1.1) rotate(-2deg);
    transition: transform 0.3s ease;
}

/* Project Category Animation */
.project-category {
    transition: all 0.3s ease;
}

.project-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 104, 190, 0.3);
}

/* Project Media Hover */
.project-media {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-media::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent
    );
    transition: left 0.5s ease;
    z-index: 1;
}

.project-media:hover::before {
    left: 100%;
}

.project-media:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* Video Play Animation */
.project-video {
    transition: all 0.3s ease;
}

.project-video:hover {
    box-shadow: 0 0 30px rgba(30, 104, 190, 0.3);
}

/* Spec Items Stagger Animation */
.spec-item {
    opacity: 0;
    animation: spec-item-slide 0.6s ease-out forwards;
}

.spec-item:nth-child(1) {
    animation-delay: 0.1s;
}

.spec-item:nth-child(2) {
    animation-delay: 0.2s;
}

.spec-item:nth-child(3) {
    animation-delay: 0.3s;
}

.spec-item svg {
    transition: transform 0.3s ease, color 0.3s ease;
}

.spec-item:hover svg {
    transform: scale(1.2) rotate(5deg);
    color: var(--accent-hover);
}

/* Highlights Animation */
.project-highlights li {
    opacity: 0;
    animation: highlight-fade 0.5s ease-out forwards;
}

.project-highlights li:nth-child(1) { animation-delay: 0.1s; }
.project-highlights li:nth-child(2) { animation-delay: 0.15s; }
.project-highlights li:nth-child(3) { animation-delay: 0.2s; }
.project-highlights li:nth-child(4) { animation-delay: 0.25s; }
.project-highlights li:nth-child(5) { animation-delay: 0.3s; }
.project-highlights li:nth-child(6) { animation-delay: 0.35s; }

.project-highlights li::before {
    transition: all 0.3s ease;
}

.project-highlights li:hover::before {
    transform: scale(1.5);
    background: var(--accent-hover);
    box-shadow: 0 0 10px var(--accent-primary);
}

/* Project Link Hover Effects */
.project-link {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
    );
    transition: left 0.6s ease;
}

.project-link:hover::before {
    left: 100%;
}

.project-link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(30, 104, 190, 0.5);
}

.project-link:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.project-link svg {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.project-link:hover svg {
    transform: translate(5px, -5px) rotate(10deg);
}

/* Testimonial Animation */
.project-testimonial {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-testimonial::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            135deg,
            transparent 0%,
            rgba(30, 104, 190, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-testimonial:hover::after {
    opacity: 1;
}

.project-testimonial svg {
    animation: float 3s ease-in-out infinite;
}

/* Section Badge Hover */
.section-badge {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(30, 104, 190, 0.2);
}

.section-badge svg {
    transition: transform 0.3s ease;
}

.section-badge:hover svg {
    transform: rotate(10deg) scale(1.1);
}

/* ===================================
   PORTFOLIO GRID ANIMATIONS
   =================================== */

.portfolio-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.portfolio-card:hover {
    transform: translateY(-10px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .card-image img {
    transform: scale(1.1);
}

.portfolio-card .card-overlay {
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
    backdrop-filter: blur(10px);
}

.card-play-btn {
    transition: all 0.3s ease;
    animation: video-play-pulse 2s ease-in-out infinite;
}

.card-play-btn:hover {
    transform: scale(1.2);
    animation-play-state: paused;
}

/* ===================================
   DARK MODE SPECIFIC ANIMATIONS
   =================================== */

body.dark-mode .project-detail {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .project-detail:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(30, 104, 190, 0.2);
}

body.dark-mode .project-badge {
    animation: badge-bounce 2s ease-in-out infinite,
    badge-glow 2s ease-in-out infinite,
    neon-border-glow 3s ease-in-out infinite;
}

body.dark-mode .section-badge:hover {
    box-shadow: 0 10px 30px rgba(77, 182, 249, 0.4),
    0 0 20px rgba(77, 182, 249, 0.2);
}

body.dark-mode .project-link {
    box-shadow: 0 4px 15px rgba(30, 104, 190, 0.5);
}

body.dark-mode .project-link:hover {
    box-shadow: 0 8px 30px rgba(30, 104, 190, 0.7),
    0 0 40px rgba(77, 182, 249, 0.3);
}

body.dark-mode .project-highlights li::before {
    box-shadow: 0 0 8px var(--accent-primary);
}

body.dark-mode .spec-item svg:hover {
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

body.dark-mode .mobile-menu-link:hover {
    animation: neon-pulse 2s ease-in-out infinite;
}

body.dark-mode .theme-toggle:hover {
    box-shadow: 0 0 20px rgba(77, 182, 249, 0.3);
}

/* ===================================
   PARALLAX & SCROLL EFFECTS
   =================================== */

.parallax-image {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* Parallax Scroll Reveal */
[data-scroll-reveal] {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

[data-scroll-reveal="fade"] {
    transform: none;
}

[data-scroll-reveal="slide-left"] {
    transform: translateX(-50px);
}

[data-scroll-reveal="slide-right"] {
    transform: translateX(50px);
}

[data-scroll-reveal="zoom"] {
    transform: scale(0.9);
}

/* ===================================
   STAGGER ANIMATIONS
   =================================== */

/* Hero Stagger */
.hero-badge {
    animation: fade-in-up 0.8s ease-out 0.2s both;
}

.hero-title {
    animation: fade-in-up 0.8s ease-out 0.4s both;
}

.hero-subtitle {
    animation: fade-in-up 0.8s ease-out 0.6s both;
}

.hero-cta {
    animation: fade-in-up 0.8s ease-out 0.8s both;
}

/* Process Timeline Animation */
.process-step {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.process-step.visible {
    opacity: 1;
    transform: translateX(0);
}

.process-step:nth-child(1).visible { transition-delay: 0.1s; }
.process-step:nth-child(2).visible { transition-delay: 0.2s; }
.process-step:nth-child(3).visible { transition-delay: 0.3s; }
.process-step:nth-child(4).visible { transition-delay: 0.4s; }
.process-step:nth-child(5).visible { transition-delay: 0.5s; }

/* Step Icon Pulse on Hover */
.step-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.5);
}

/* Special Services Hover Effects */
.special-item {
    transition: transform 0.4s ease;
}

.special-item:hover {
    transform: translateY(-5px);
}

.special-content {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.special-item.visible .special-content {
    transform: translateY(0);
    opacity: 1;
}

/* Portfolio Showcase Stagger */
.showcase-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.showcase-item.visible {
    opacity: 1;
    transform: scale(1);
}

.showcase-item:nth-child(1).visible { transition-delay: 0.1s; }
.showcase-item:nth-child(2).visible { transition-delay: 0.2s; }
.showcase-item:nth-child(3).visible { transition-delay: 0.3s; }
.showcase-item:nth-child(4).visible { transition-delay: 0.4s; }

/* Stats Counter Animation */
.stat-number {
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.8s ease;
}

.stat-item.visible .stat-number {
    transform: scale(1);
    opacity: 1;
}

.stat-item:nth-child(1) .stat-number { transition-delay: 0.1s; }
.stat-item:nth-child(2) .stat-number { transition-delay: 0.2s; }
.stat-item:nth-child(3) .stat-number { transition-delay: 0.3s; }

/* ===================================
   HOVER EFFECTS
   =================================== */

/* Partner Section Animations */
.partner-badge {
    animation: float 3s ease-in-out infinite;
}

/* Button Ripple Effect */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s, opacity 0.6s;
    opacity: 0;
}

.cta-button:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: 0s;
}

/* Intro Section Stagger */
.intro-text {
    animation-delay: 0.2s;
}

.intro-image-wrapper {
    animation-delay: 0.4s;
}

/* Text Gradient Animation */
.gradient-text {
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

/* Loading States */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--accent-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: icon-rotate 0.8s linear infinite;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Image Zoom on Hover */
.zoom-on-hover {
    overflow: hidden;
}

.zoom-on-hover img {
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.zoom-on-hover:hover img {
    transform: scale(1.1);
}

/* ===================================
   SKELETON LOADING
   =================================== */

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(
            90deg,
            var(--bg-secondary) 0%,
            var(--border-color) 20%,
            var(--bg-secondary) 40%,
            var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ===================================
   PERFORMANCE OPTIMIZATION
   =================================== */

.will-animate {
    will-change: transform, opacity;
}

/* Smooth Scrolling Enhancement */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ===================================
   REDUCED MOTION SUPPORT
   =================================== */

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

    .hero-video {
        animation: none;
    }

    .scroll-line {
        animation: none;
    }

    .project-badge {
        animation: none;
    }

    .section-badge:hover {
        transform: none;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}