/* =========================================
   1. 字体引入 & 全局变量 (中国大陆优化版)
   ========================================= */
/* ❌ 已删除 Google Fonts 引用，改为系统字体栈 */

:root {
    --brand-blue: #222656;
    --brand-red: #E02826;
    --bg-off-white: #fbfbfd;
    --text-main: #1d1d1f;
    /* Apple 风格缓动曲线 */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    /* ★ 核心修改：使用系统字体栈，国内秒开，无网络延迟 */
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* 定义全局入场动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

body {
    font-family: var(--font-stack);
    /* 使用系统字体 */
    background-color: var(--bg-off-white);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* 配合 script.js 防止闪烁 */
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* 导航栏毛玻璃 */
.nav-blur {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* =========================================
   2. 卡片与视觉特效 (Tech Premium)
   ========================================= */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    transition: all 0.6s var(--ease-out-expo);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(34, 38, 86, 0.1);
    border-color: rgba(34, 38, 86, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

/* 英雄区文字流光特效 */
.animate-gradient-text {
    background: linear-gradient(110deg, #222656 30%, #4f46e5 45%, #E02826 55%, #4f46e5 65%, #222656 80%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 6s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #4B5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 背景氛围光晕 */
.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    z-index: 0;
    animation: blob-bounce 10s infinite ease-in-out alternate;
    pointer-events: none;
}

@keyframes blob-bounce {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* =========================================
   3. 交互暗示 (UX)
   ========================================= */
.clickable-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* 防止光效溢出 */
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), border-color 0.3s;
}

.clickable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(34, 38, 86, 0.15);
    border-color: #3b82f6;
}

.clickable-card:hover .arrow-icon {
    transform: translateX(5px);
    color: #3b82f6;
}

.arrow-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

/* 扫光特效 (Shine Effect) */
.clickable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: none;
    z-index: 1;
    pointer-events: none;
}

.clickable-card:hover::before {
    animation: shine-sweep 0.7s;
}

@keyframes shine-sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* =========================================
   4. 滚动动效 (Scroll Reveal)
   ========================================= */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
    will-change: opacity, transform;
}

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

/* 交错动画 (Stagger) */
.grid .reveal-on-scroll:nth-child(1) {
    transition-delay: 100ms;
}

.grid .reveal-on-scroll:nth-child(2) {
    transition-delay: 200ms;
}

.grid .reveal-on-scroll:nth-child(3) {
    transition-delay: 300ms;
}

.grid .reveal-on-scroll:nth-child(4) {
    transition-delay: 150ms;
}

.grid .reveal-on-scroll:nth-child(5) {
    transition-delay: 250ms;
}

.grid .reveal-on-scroll:nth-child(6) {
    transition-delay: 350ms;
}

.grid .reveal-on-scroll:nth-child(7) {
    transition-delay: 450ms;
}

.grid .reveal-on-scroll:nth-child(8) {
    transition-delay: 550ms;
}

.grid .reveal-on-scroll:nth-child(9) {
    transition-delay: 650ms;
}

/* =========================================
   5. 成功案例隐私保护 (Privacy Blur)
   ========================================= */
.privacy-blur {
    filter: blur(5px);
    transition: all 0.5s ease;
    user-select: none;
    pointer-events: none;
}

.watermark-overlay {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(0px);
}

/* =========================================
   6. 打印样式 (Print)
   ========================================= */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    body {
        background: white !important;
        margin: 0;
        opacity: 1 !important;
        animation: none !important;
    }

    nav,
    script,
    #backToTop,
    .no-print {
        display: none !important;
    }

    section,
    .print-page {
        height: auto !important;
        display: block !important;
        padding: 20px 0 !important;
        break-inside: avoid !important;
    }

    /* 禁用所有屏幕特效 */
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }

    .animate-gradient-text {
        background: none !important;
        color: #222656 !important;
        -webkit-text-fill-color: initial !important;
    }

    .ambient-blob {
        display: none !important;
    }

    .glass-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    /* 颜色强制 */
    h1,
    h2,
    h3,
    p,
    li {
        color: black !important;
        text-shadow: none !important;
    }

    #contact {
        background: #1d1d1f !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }

    #contact * {
        color: white !important;
    }
}