/* public/css/index.css */
/* 收付贝 (ShouFuBei) 首页专属样式表
    版本：最终修正版 V2 (已集成响应式布局优化)
    说明：已包含所有动效及移动端布局微调。
*/

/* --- 1. 变量与全局设定 --- */
:root {
    --font-regular: 'NotoSansSC-Regular', sans-serif;
    --font-bold: 'NotoSansSC-Bold', sans-serif;
    --font-light: 'NotoSansSC-Light', sans-serif;
    --brand-color: #007AFF; /* 品牌主色调 */
    --primary-text-color: #1d1d1f; /* 主要文字颜色 (深灰) */
    --secondary-text-color: #555; /* 次要文字颜色 (中灰) */
    --container-width: 1200px; /* 内容最大宽度 */
    --section-padding: 6rem 0; /* 上下内边距 */
}

body {
    background-color: #fff; /* 默认背景色 */
    color: var(--primary-text-color);
    font-family: var(--font-regular);
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- 2. 粒子背景样式 --- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; 
    background-color: #f5f5f7;
}

/* --- 3. 页面主要内容层叠上下文修复 --- */
.site-header,
.main-content,
.site-footer {
    position: relative; 
    z-index: 1;      
    background-color: transparent;
}

/* --- 4. 主视觉区 (Hero Section) --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 0 1rem;
    box-sizing: border-box;
    background-color: transparent;
}

.hero-title {
    font-family: var(--font-bold);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin: 0;
    line-height: 1.2;
}

.typewriter {
    display: block;
    color: var(--brand-color);
    min-height: 1.2em; 
}

.typewriter::after {
    content: '|';
    animation: blink 0.7s infinite;
}

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

.hero-subtitle {
    font-family: var(--font-light);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
    line-height: 1.6;
}

/* --- 5. 通用按钮样式 --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-bold);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--brand-color);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.7);
}

.btn-primary:hover {
    transform: translateY(-3px);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.5); }
    70% { box-shadow: 0 0 0 20px rgba(0, 122, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); }
}

.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::before {
    width: 250px;
    height: 250px;
}

/* --- 6. 通用 Section 样式 --- */
.services-section, .cta-section {
    padding: var(--section-padding);
    background-color: #fff;
    position: relative;
}

.section-title {
    text-align: center;
    font-family: var(--font-bold);
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 3rem;
}

/* --- 7. 服务概览区 (Services Section) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.service-card {
    background-color: #f9f9f9;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.5s ease;
    transform-style: preserve-3d;
}

.service-card:hover {
    transform: rotateY(-5deg) rotateX(5deg) scale(1.03) translateZ(20px);
    box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.2);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-family: var(--font-bold);
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--primary-text-color);
}

.service-card p {
    color: var(--secondary-text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.learn-more {
    color: var(--brand-color);
    text-decoration: none;
    font-family: var(--font-bold);
}

/* --- 8. 行动号召区 (CTA Section) --- */
.cta-section {
    background-color: #f5f5f7;
    text-align: center;
}

.section-description {
    color: var(--secondary-text-color);
    font-size: 1.2rem;
    margin: -2rem auto 2rem;
    max-width: 500px;
    line-height: 1.7;
}

.btn-secondary {
    background-color: transparent;
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.btn-secondary:hover {
    background-color: var(--brand-color);
    color: #fff;
    animation: none;
}

/* --- 9. 滚动入场动画 --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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


/* --- 10. 响应式布局微调 (新增) --- */
@media (max-width: 992px) {
    :root {
        /* 在平板及以下设备，减小区块的垂直间距 */
        --section-padding: 4rem 0;
    }
    
    .hero-section {
        /* 在手机上，主视觉区高度调整为90vh，防止内容被推太远 */
        min-height: 90vh;
        padding-top: var(--header-height); /* 加上header高度，避免内容重叠 */
    }

    .service-card:hover {
        /* 在触摸设备上禁用悬停的3D效果，因为没有hover状态 */
        transform: none;
        box-shadow: none;
    }

    .services-grid {
        /* 移除3D视距 */
        perspective: none;
    }
}

@media (max-width: 767px) {
    .hero-title {
        /* 在手机上进一步控制标题字体大小 */
        font-size: clamp(2rem, 10vw, 2.8rem);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin: 1rem auto 2rem;
    }

    .section-title {
        /* 在手机上控制章节标题字体大小 */
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        margin-bottom: 2rem;
    }

    .services-grid {
        /* 在手机上，让卡片宽度不超过屏幕 */
        grid-template-columns: 1fr;
    }
}