/* ==================== 3. 배경 애니메이션 (Living Background) ==================== */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 그라데이션 오버레이 */
.animated-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-dark);
    z-index: 2;
}

/* 배경 이미지 */
.animated-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    animation: backgroundPulse 20s ease-in-out infinite;
    transition: transform 0.1s ease-out;
    /* Parallax smoothness */
}

/* Glow 효과 (플로팅) */
.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 40%;
    background: radial-gradient(circle, rgba(54, 226, 123, 0.15), transparent 70%);
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

/* ==================== 4. 애니메이션 정의 ==================== */
@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealText {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Scroll Reveal 유틸리티 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* 텍스트 리빌 효과 */
.text-reveal {
    animation: revealText 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* 스태거 딜레이 (순차적 애니메이션) */
.stagger-delay-1 {
    transition-delay: 0.1s;
    animation-delay: 0.1s;
}

.stagger-delay-2 {
    transition-delay: 0.2s;
    animation-delay: 0.2s;
}

.stagger-delay-3 {
    transition-delay: 0.3s;
    animation-delay: 0.3s;
}

.stagger-delay-4 {
    transition-delay: 0.4s;
    animation-delay: 0.4s;
}

.stagger-delay-5 {
    transition-delay: 0.5s;
    animation-delay: 0.5s;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ==================== 9. 마우스 효과 (Magic) ==================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

.custom-cursor.active {
    width: 50px;
    height: 50px;
    background-color: rgba(54, 226, 123, 0.1);
    border-color: transparent;
}

/* 마그네틱 버튼 */
.magnetic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s linear;
}