/* 标题字符动画 */
.title-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: char-reveal 0.6s ease forwards;
}

.title-char:nth-child(1) { animation-delay: 0.1s; }
.title-char:nth-child(2) { animation-delay: 0.15s; }
.title-char:nth-child(3) { animation-delay: 0.2s; }
.title-char:nth-child(4) { animation-delay: 0.25s; }
.title-char:nth-child(5) { animation-delay: 0.3s; }
.title-char:nth-child(6) { animation-delay: 0.35s; }
.title-char:nth-child(7) { animation-delay: 0.4s; }
.title-char:nth-child(8) { animation-delay: 0.45s; }
.title-char:nth-child(9) { animation-delay: 0.5s; }
.title-char:nth-child(10) { animation-delay: 0.55s; }
.title-char:nth-child(11) { animation-delay: 0.6s; }
.title-char:nth-child(12) { animation-delay: 0.65s; }
.title-char:nth-child(13) { animation-delay: 0.7s; }
.title-char:nth-child(14) { animation-delay: 0.75s; }
.title-char:nth-child(15) { animation-delay: 0.8s; }
.title-char:nth-child(16) { animation-delay: 0.85s; }
.title-char:nth-child(17) { animation-delay: 0.9s; }
.title-char:nth-child(18) { animation-delay: 0.95s; }

@keyframes char-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 副标题渐入 */
.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fade-up 0.8s ease forwards;
    animation-delay: 1s;
}

/* 按钮渐入 */
.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: fade-up 0.8s ease forwards;
    animation-delay: 1.2s;
}

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

/* 区块标题动画 */
.section-title {
    opacity: 0;
    transform: translateY(30px);
}

.section-title.animate {
    animation: section-reveal 0.8s ease forwards;
}

@keyframes section-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片入场动画 */
.capability-card,
.case-card,
.service-card,
.case-detail-card {
    opacity: 0;
    transform: translateY(40px);
}

.capability-card.animate,
.case-card.animate,
.service-card.animate,
.case-detail-card.animate {
    animation: card-reveal 0.6s ease forwards;
}

@keyframes card-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 延迟类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* 浮动动画 */
.float {
    animation: float 6s ease-in-out infinite;
}

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

/* 脉冲光效 */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(201, 169, 98, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(201, 169, 98, 0.6);
    }
}

/* 渐变边框动画 */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #c9a962, #2d8f7b, #c9a962, #2d8f7b);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: gradient-rotate 3s linear infinite;
}

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

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #c9a962;
    white-space: nowrap;
    animation: typing 3s steps(30) forwards, blink 0.8s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* 数字递增动画 */
.counter {
    display: inline-block;
}

/* 视差滚动效果 */
.parallax-element {
    will-change: transform;
}

/* 鼠标跟随光效 */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* 波纹效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

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

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* 悬停放大 */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* 悬停发光 */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(201, 169, 98, 0.4);
}

/* 滚动指示器 */
.scroll-indicator {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #c9a962;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes scroll-dot {
    0%, 100% {
        top: 8px;
        opacity: 1;
    }
    50% {
        top: 30px;
        opacity: 0.3;
    }
}

/* 分割线动画 */
.divider-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a962, transparent);
    transform: scaleX(0);
    animation: line-expand 1s ease forwards;
}

@keyframes line-expand {
    to {
        transform: scaleX(1);
    }
}

/* 图标旋转 */
.icon-spin {
    animation: icon-spin 1s linear infinite;
}

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

/* 淡入淡出 */
.fade-in {
    animation: fade-in 0.5s ease forwards;
}

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

.fade-out {
    animation: fade-out 0.5s ease forwards;
}

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

/* 滑入动画 */
.slide-in-left {
    animation: slide-in-left 0.6s ease forwards;
}

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

.slide-in-right {
    animation: slide-in-right 0.6s ease forwards;
}

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

.slide-in-up {
    animation: slide-in-up 0.6s ease forwards;
}

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

/* 缩放动画 */
.scale-in {
    animation: scale-in 0.5s ease forwards;
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 弹跳动画 */
.bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes bounce-in {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 晃动动画 */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* 闪烁动画 */
.blink-animation {
    animation: blink-animation 1s step-end infinite;
}

@keyframes blink-animation {
    50% {
        opacity: 0;
    }
}

/* 进度条动画 */
.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a962, #2d8f7b);
    transform: scaleX(0);
    transform-origin: left;
    animation: progress-fill 1.5s ease forwards;
}

@keyframes progress-fill {
    to {
        transform: scaleX(1);
    }
}

/* 粒子飘动 */
.particle-float {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #c9a962;
    border-radius: 50%;
    animation: particle-float 10s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 霓虹效果 */
.neon-text {
    text-shadow: 
        0 0 5px #c9a962,
        0 0 10px #c9a962,
        0 0 20px #c9a962,
        0 0 40px #c9a962;
}

.neon-border {
    box-shadow: 
        0 0 5px #c9a962,
        0 0 10px #c9a962,
        inset 0 0 5px #c9a962,
        inset 0 0 10px #c9a962;
}

/* 玻璃态效果 */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 磨砂玻璃 */
.frosted-glass {
    background: rgba(18, 18, 26, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 毛玻璃卡片 */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* 动态渐变背景 */
.animated-gradient {
    background: linear-gradient(-45deg, #0a0a0f, #1a1a25, #12121a, #0a0a0f);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

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