/* ========================================
   DEG Interior - Animations & Keyframes
   ======================================== */

/* ========== Loading Animations ========== */
@keyframes logoZoomIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes ringPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }
    20% {
        width: 30%;
    }
    50% {
        width: 60%;
    }
    80% {
        width: 85%;
    }
    100% {
        width: 100%;
    }
}

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

/* ========== Hero Animations ========== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ========== Scroll-Triggered Animations ========== */
.fade-in-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s var(--transition-smooth), 
                transform 0.8s var(--transition-smooth);
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s var(--transition-smooth), 
                transform 0.8s var(--transition-smooth);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s var(--transition-smooth), 
                transform 0.8s var(--transition-smooth);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s var(--transition-smooth), 
                transform 0.8s var(--transition-smooth);
}

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

/* Staggered Animation Delays */
.fade-in-up:nth-child(1) { transition-delay: 0.1s; }
.fade-in-up:nth-child(2) { transition-delay: 0.2s; }
.fade-in-up:nth-child(3) { transition-delay: 0.3s; }
.fade-in-up:nth-child(4) { transition-delay: 0.4s; }
.fade-in-up:nth-child(5) { transition-delay: 0.5s; }
.fade-in-up:nth-child(6) { transition-delay: 0.6s; }

/* ========== Hover Effects ========== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer-effect {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.3) 50%, 
        transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* ========== Gold Sweep Effect ========== */
@keyframes goldSweep {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(200%) rotate(45deg);
    }
}

.gold-sweep {
    position: relative;
    overflow: hidden;
}

.gold-sweep::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.5) 50%, 
        transparent 100%);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s var(--transition-smooth);
}

.gold-sweep:hover::after {
    animation: goldSweep 0.8s ease-out;
}

/* ========== Parallax Depth ========== */
.parallax-slow {
    transition: transform 0.3s ease-out;
}

.parallax-medium {
    transition: transform 0.2s ease-out;
}

.parallax-fast {
    transition: transform 0.1s ease-out;
}

/* ========== Portfolio Grid Animations ========== */
@keyframes portfolioItemFade {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.portfolio-item {
    animation: portfolioItemFade 0.6s var(--transition-smooth) both;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.15s; }
.portfolio-item:nth-child(3) { animation-delay: 0.2s; }
.portfolio-item:nth-child(4) { animation-delay: 0.25s; }
.portfolio-item:nth-child(5) { animation-delay: 0.3s; }
.portfolio-item:nth-child(6) { animation-delay: 0.35s; }
.portfolio-item:nth-child(7) { animation-delay: 0.4s; }
.portfolio-item:nth-child(8) { animation-delay: 0.45s; }

/* ========== Modal Animations ========== */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.portfolio-modal:not(.hidden) {
    animation: modalFadeIn 0.3s ease-out;
}

.portfolio-modal:not(.hidden) .modal-content {
    animation: modalSlideIn 0.4s var(--transition-smooth);
}

/* ========== Form Animations ========== */
@keyframes formLineFocus {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line,
.form-group select:focus ~ .form-line {
    background: var(--color-gold);
    animation: formLineFocus 0.3s var(--transition-smooth);
}

/* ========== Success/Error Messages ========== */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message:not(.hidden) {
    animation: messageSlideIn 0.4s var(--transition-smooth);
}

/* ========== Number Counter Animation ========== */
@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat-number {
    animation: countUp 0.6s var(--transition-smooth) both;
}

/* ========== Pulse Effect ========== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* ========== Rotate Effect ========== */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate-animation {
    animation: rotate 20s linear infinite;
}

/* ========== Float Effect ========== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* ========== Glow Pulse ========== */
@keyframes glowPulseEffect {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

.glow-pulse {
    animation: glowPulseEffect 2s ease-in-out infinite;
}

/* ========== Text Reveal ========== */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    clip-path: inset(0 100% 0 0);
    animation: textReveal 0.8s var(--transition-smooth) forwards;
}

/* ========== Border Draw ========== */
@keyframes borderDraw {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* ========== Ripple Effect ========== */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.5);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* ========== Performance Optimizations ========== */
.will-animate {
    will-change: transform, opacity;
}

/* Force GPU acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}