/* 基础字体设置 */
body {
    font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* 导航栏滚动效果 */
#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#header.scrolled .nav-link {
    color: #475569;
}

#header.scrolled .text-slate-900 {
    color: #0f172a;
}

/* 动画关键帧 */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
    50%      { box-shadow: 0 0 40px rgba(37, 99, 235, 0.5); }
}

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

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* 动画类 */
.animate-fade-up {
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* 滚动触发入场动画 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* 首屏浮动装饰卡片 */
.float-card {
    animation: float 5s ease-in-out infinite;
}

.float-card:nth-of-type(2) {
    animation-delay: 1.2s;
}

/* 业务矩阵 V2 卡片样式 */

/* 卡片容器 - 悬停上浮 */
.matrix-card-v2 {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.matrix-card-v2:hover {
    transform: translateY(-8px);
}

/* 发光边框 - 悬停时从底部渐变出现 */
.matrix-card-v2 .card-glow {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(180deg, 
        rgba(var(--accent-rgb, 37,99,235), 0.5) 0%, 
        rgba(var(--accent-rgb, 37,99,235), 0) 60%);
    filter: blur(2px);
    transition: opacity 0.4s ease;
    z-index: -1;
    pointer-events: none;
}

.matrix-card-v2:hover .card-glow {
    opacity: 1;
}

/* 水印序号呼吸效果 - 匹配新旧 opacity 值 */
.matrix-card-v2:hover span.text-white\/\[0\.025\] {
    color: rgba(var(--accent-rgb, 37,99,235), 0.06) !important;
    transition: color 0.4s ease;
}
.matrix-card-v2:hover span.text-white\/\[0\.03\] {
    color: rgba(var(--accent-rgb, 37,99,235), 0.06) !important;
    transition: color 0.4s ease;
}
.matrix-card-v2:hover span.text-white\/\[0\.05\] {
    color: rgba(var(--accent-rgb, 37,99,235), 0.08) !important;
    transition: color 0.4s ease;
}

/* 悬停时顶部装饰线变亮 */
.matrix-card-v2:hover .bg-gradient-to-r {
    opacity: 1;
}

/* 客户 Logo 悬停效果 */
.client-logo {
    transition: all 0.3s ease;
}

.client-logo:hover {
    transform: translateY(-3px);
}

/* 按钮通用样式增强 */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* 表单焦点样式 */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 移动端菜单动画 */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选择文本颜色 */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: #1e40af;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .matrix-card {
        position: relative !important;
        width: 100% !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
}

@media (max-width: 768px) {
    .animate-fade-up {
        animation-duration: 0.6s;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* 加载占位符样式 */
.placeholder {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
