/* ========================================
   动画效果
   ======================================== */

/* 滚动渐入 - 多方向 */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* 脉冲 */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* 浮动 */
@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* 滚动点 */
@keyframes scrollDot {
    0% { top: 6px; opacity: 1; }
    100% { top: 16px; opacity: 0; }
}

/* 打字弹跳 */
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* 消息滑入 */
@keyframes slideInMsg {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 面板切换 */
@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 合作伙伴滚动 */
@keyframes scrollPartners {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 粒子闪烁 */
@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

/* 发光脉冲 */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(14, 165, 168, 0.1); }
    50% { box-shadow: 0 0 40px rgba(14, 165, 168, 0.18); }
}

/* 渐变旋转 */
@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== 新增酷炫动画 ===== */

/* Hero背景流动渐变 */
@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 0%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* 文字闪光扫过效果 */
@keyframes textShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* 按钮光泽扫过 */
@keyframes btnShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* 边框流光 */
@keyframes borderFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

/* 悬浮呼吸光圈 */
@keyframes breatheGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 168, 0),
                    0 4px 24px rgba(14, 165, 168, 0.08);
    }
    50% {
        box-shadow: 0 0 30px 4px rgba(14, 165, 168, 0.12),
                    0 8px 40px rgba(14, 165, 168, 0.15);
    }
}

/* 弹性入场 */
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* 波浪 */
@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 涟漪扩散 */
@keyframes ripple {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* 浮动粒子路径 */
@keyframes floatPath {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -20px) rotate(90deg); }
    50% { transform: translate(-5px, -35px) rotate(180deg); }
    75% { transform: translate(-15px, -15px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* 计数器翻转 */
@keyframes countFlip {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ===== Hero增强效果 ===== */

/* Hero流动渐变背景 */
.hero-gradient {
    animation: heroGradientShift 15s ease-in-out infinite;
    background-size: 400% 400%;
}

/* 标题闪光效果 */
.hero-title .gradient-text {
    background: linear-gradient(
        90deg,
        #0ea5a8 0%,
        #38bdf8 30%,
        #2dd4b7 50%,
        #7dd3fc 60%,
        #38bdf8 70%,
        #0ea5a8 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s linear infinite;
}

/* 按钮发光呼吸 + 光泽扫过 */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    animation: btnShine 3s ease-in-out infinite;
}

/* Hero Stats 玻璃拟态升级 */
.hero-stats {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 32px rgba(14, 165, 168, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ===== 卡片增强效果 ===== */

/* 卡片悬浮3D效果（由JS控制transform） */
.card-3d {
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 800px;
}

.card-3d:hover {
    box-shadow:
        0 20px 60px rgba(14, 165, 168, 0.12),
        0 0 40px rgba(14, 165, 168, 0.06);
}

/* 卡片流光边框 */
.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(14, 165, 168, 0.4) 25%,
        rgba(56, 189, 248, 0.6) 50%,
        rgba(45, 212, 183, 0.4) 75%,
        transparent 100%
    );
    background-size: 300% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderFlow 3s linear infinite;
}

.glow-border:hover::before {
    opacity: 1;
}

/* ===== 波浪分隔线 ===== */
.wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider .wave-fill {
    fill: var(--color-bg-secondary);
}

.wave-divider.flip {
    top: -1px;
    bottom: auto;
    transform: rotate(180deg);
}

.wave-divider.flip .wave-fill {
    fill: var(--color-bg);
}

/* ===== 导航栏汉堡动画 ===== */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero 粒子升级 ===== */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.particle-sm {
    width: 3px;
    height: 3px;
    background: rgba(14, 165, 168, 0.4);
    box-shadow: 0 0 6px rgba(14, 165, 168, 0.3);
}

.particle-md {
    width: 4px;
    height: 4px;
    background: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.particle-lg {
    width: 5px;
    height: 5px;
    background: rgba(45, 212, 183, 0.3);
    box-shadow: 0 0 10px rgba(45, 212, 183, 0.2);
}

/* 鼠标跟随光效 */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 168, 0.07) 0%, rgba(56, 189, 248, 0.03) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s;
    will-change: transform;
}

/* ===== 交互涟漪效果 ===== */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect .ripple-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(14, 165, 168, 0.15);
    animation: ripple 0.6s ease-out forwards;
    pointer-events: none;
}

/* ===== 打字机效果 ===== */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-primary);
    white-space: nowrap;
    animation: typewriterCursor 0.8s step-end infinite;
}

@keyframes typewriterCursor {
    0%, 100% { border-color: var(--color-primary); }
    50% { border-color: transparent; }
}

/* ===== 数字翻牌效果 ===== */
.stat-number {
    display: inline-block;
    animation: countFlip 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ===== 磁吸按钮 ===== */
.magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ===== 悬浮Badge动画 ===== */
.hero-badge {
    animation: breatheGlow 3s ease-in-out infinite;
}

/* ===== section bg mesh ===== */
.mesh-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(14, 165, 168, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(45, 212, 183, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ===== 滚动进度条 ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0ea5a8, #38bdf8, #2dd4b7, #7dd3fc);
    background-size: 300% 100%;
    animation: gradientRotate 3s linear infinite;
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(14, 165, 168, 0.5), 0 0 30px rgba(56, 189, 248, 0.3);
}

/* ===== 浮动光球 ===== */
.hero-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.hero-orb.orb-a {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(14, 165, 168, 0.25) 0%, transparent 70%);
    top: 5%;
    left: 10%;
    animation: orbFloat1 20s infinite;
}

.hero-orb.orb-b {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    top: 50%;
    right: 5%;
    animation: orbFloat2 25s infinite;
}

.hero-orb.orb-c {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(45, 212, 183, 0.2) 0%, transparent 70%);
    bottom: 15%;
    left: 30%;
    animation: orbFloat3 18s infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(80px, 40px) scale(1.1); }
    50% { transform: translate(30px, 80px) scale(0.9); }
    75% { transform: translate(-40px, 20px) scale(1.05); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -50px) scale(1.15); }
    66% { transform: translate(40px, 30px) scale(0.85); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(50px, -30px) scale(1.1); }
    40% { transform: translate(-20px, -60px) scale(0.95); }
    60% { transform: translate(-50px, 20px) scale(1.08); }
    80% { transform: translate(30px, 40px) scale(0.92); }
}

/* ===== 动态双层波浪 ===== */
.animated-wave svg {
    width: calc(200% + 1.3px);
    height: 80px;
    animation: waveMove 8s linear infinite;
}

.wave-layer-2 {
    opacity: 0.5;
}

/* ===== 旋转渐变边框 ===== */
.gradient-border-spin {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(1.5);
    z-index: 1;
}

.gradient-border-spin::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--spin-angle, 0deg),
        #0ea5a8, #38bdf8, #2dd4b7, #7dd3fc, #0ea5a8
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spinBorder 4s linear infinite;
}

@property --spin-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes spinBorder {
    to { --spin-angle: 360deg; }
}

/* ===== 卡片 Spotlight 跟随效果 ===== */
.card-spotlight {
    position: relative;
    overflow: hidden;
}

.card-spotlight::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14, 165, 168, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.card-spotlight:hover::after {
    opacity: 1;
}

/* ===== 导航活动指示器 ===== */
.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px rgba(14, 165, 168, 0.4);
}

/* ===== 按钮悬浮发光环 ===== */
.btn-primary::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(135deg, #0ea5a8, #38bdf8, #2dd4b7);
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: opacity 0.4s ease;
}

.btn-primary:hover::before {
    opacity: 0.6;
}

/* ===== 文字逐字揭示 ===== */
.char-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) rotateX(90deg);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.char-reveal.visible span {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

/* ===== 产品Demo卡片悬浮上浮动效 ===== */
.chat-demo,
.digital-human-demo,
.map-demo,
.dashboard-demo,
.marketing-demo {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.chat-demo:hover,
.digital-human-demo:hover,
.map-demo:hover,
.dashboard-demo:hover,
.marketing-demo:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 20px 60px rgba(14, 165, 168, 0.15),
        0 0 40px rgba(56, 189, 248, 0.08);
}

/* ===== 解决方案icon弹跳 ===== */
.solution-card:hover .solution-icon {
    animation: bounceIn 0.6s ease;
}

/* ===== 优势卡片数字闪烁 ===== */
.advantage-card:hover .advantage-number {
    color: rgba(14, 165, 168, 0.15);
    transition: color 0.3s ease;
}

/* ===== Footer链接悬浮下划线 ===== */
.footer-links-group a {
    position: relative;
}

.footer-links-group a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.footer-links-group a:hover::after {
    width: 100%;
}
