/* ===========================================
   动画样式库 - 暖色商务风
   柔和、温暖、专业的动效设计
   =========================================== */

/* 基础设置 */
[data-animate] {
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-animate].animated {
    opacity: 1;
}

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

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===========================================
   淡入动画
   =========================================== */

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

[data-animate="fade-in"] {
    animation: fadeIn 0.4s ease-out forwards;
}

[data-animate="fade-in"].animated {
    opacity: 1;
}

/* ===========================================
   滑入动画
   =========================================== */

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

[data-animate="slide-up"] {
    transform: translateY(30px);
}

[data-animate="slide-up"].animated {
    animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

[data-animate="slide-down"] {
    transform: translateY(-30px);
}

[data-animate="slide-down"].animated {
    animation: slideDown 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[data-animate="slide-right"] {
    transform: translateX(-30px);
}

[data-animate="slide-right"].animated {
    animation: slideRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[data-animate="slide-left"] {
    transform: translateX(30px);
}

[data-animate="slide-left"].animated {
    animation: slideLeft 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===========================================
   缩放动画
   =========================================== */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

[data-animate="scale-in"] {
    transform: scale(0.92);
}

[data-animate="scale-in"].animated {
    animation: scaleIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===========================================
   卡片悬停 - 暖色
   =========================================== */

.card-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   按钮悬停
   =========================================== */

.button-hover-effect {
    transition: all 0.3s ease;
}

.button-hover-effect:hover {
    transform: translateY(-1px);
}

/* ===========================================
   下划线展开 - 暖色
   =========================================== */

.underline-expand {
    position: relative;
    display: inline-block;
}

.underline-expand::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color, #F59E0B);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.underline-expand.animated::after {
    width: 100%;
}

/* ===========================================
   输入框聚焦 - 暖色
   =========================================== */

.input-focus-effect {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-focus-effect:focus {
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    outline: none;
}

/* ===========================================
   延迟效果
   =========================================== */

[data-delay="100"] { animation-delay: 0.08s; }
[data-delay="200"] { animation-delay: 0.16s; }
[data-delay="300"] { animation-delay: 0.24s; }
[data-delay="400"] { animation-delay: 0.32s; }
[data-delay="500"] { animation-delay: 0.4s; }
[data-delay="600"] { animation-delay: 0.48s; }
[data-delay="700"] { animation-delay: 0.56s; }
[data-delay="800"] { animation-delay: 0.64s; }

/* ===========================================
   波浪式显示
   =========================================== */

.stagger-animation:nth-child(1) { animation-delay: 0s; }
.stagger-animation:nth-child(2) { animation-delay: 0.06s; }
.stagger-animation:nth-child(3) { animation-delay: 0.12s; }
.stagger-animation:nth-child(4) { animation-delay: 0.18s; }
.stagger-animation:nth-child(5) { animation-delay: 0.24s; }
.stagger-animation:nth-child(6) { animation-delay: 0.3s; }
.stagger-animation:nth-child(7) { animation-delay: 0.36s; }
.stagger-animation:nth-child(8) { animation-delay: 0.42s; }
.stagger-animation:nth-child(9) { animation-delay: 0.48s; }
.stagger-animation:nth-child(10) { animation-delay: 0.54s; }
.stagger-animation:nth-child(11) { animation-delay: 0.6s; }
.stagger-animation:nth-child(12) { animation-delay: 0.66s; }

/* ===========================================
   数字递增动画
   =========================================== */

.counter-animation {
    transition: all 0.4s ease;
}

/* ===========================================
   性能优化
   =========================================== */

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

.animation-complete {
    will-change: auto;
}
