/* ==========================================
   home.css - 首页专属样式 (浅色高级版)
   适配珍珠白底色，移除所有暗黑模式硬编码
========================================== */

/* --- 1. 首屏背景 (Premium Light Hero Section) --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    overflow: hidden;
    z-index: 1;

    /* 【核心更改】：多重背景融合 */
    background-image: 
        /* 第 1 层 (顶层)：90%不透明度的珍珠白渐变遮罩，用来“洗白”图片，保证文字绝对清晰 */
        linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(240, 238, 245, 0.95) 100%),
        /* 第 2 层 (底层)：你的实际背景图片 */
        url('image/BACKGROUND_IMAGE.jpg');
    
    background-size: cover; /* 让图片铺满整个屏幕 */
    background-position: center center; /* 图片居中对齐 */
    background-repeat: no-repeat;
    background-attachment: fixed; 
}

/* --- 2. 顶级商务“流光掠影”特效 (白金微光版) --- */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    /* 在浅色背景上，光束改为半透明的亮白色夹杂极弱的香槟金 */
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-35deg);
    pointer-events: none;
    z-index: 0;
    animation: premiumLightSweep 8s infinite;
}

@keyframes premiumLightSweep {
    0% { left: -150%; }
    30% { left: 150%; } 
    100% { left: 150%; } 
}

/* --- 3. 首屏内容排版 (清理了重复代码) --- */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: 0 20px;
}
.hero-content .badge {
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid rgba(193, 155, 84, 0.4); /* 哑光金边框 */
    color: var(--brand-dark); /* 牛津紫文字 */
    background: rgba(193, 155, 84, 0.5);
    border-radius: 30px;
    font-size: 0.85rem;
    margin-bottom: 30px;
    letter-spacing: 1px;
    font-weight: 700;
}
.hero-content h1 { 
    font-size: 4.2rem; 
    line-height: 1.15; 
    margin-bottom: 25px; 
    font-weight: 800;
    letter-spacing: -1px; 
    color: var(--brand-dark); /* 深邃的牛津紫大标题 */
}
.hero-content p { 
    font-size: 1.15rem; 
    color: var(--text-muted); 
    margin-bottom: 40px; 
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.hero-buttons { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
}

/* --- 4. 动态信任数据 (Trust Metrics) --- */
.trust-metrics {
    display: flex;
    justify-content: space-around;
    max-width: 1000px;
    margin: -50px auto 100px;
    position: relative;
    z-index: 10;
    /* 浅色模式下的悬浮白卡 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(35, 27, 56, 0.05); /* 极其柔和的高级阴影 */
}
.metric { text-align: center; }
.metric h2 { font-size: 3rem; color: var(--gold); font-weight: 800; }
.metric p { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;}

/* --- 5. About / Why Astral Reach --- */
.about-section {
    padding: 0 5% 100px;
}

.about-intro {
    max-width: 1200px;
    margin: 0 auto;
}

.about-intro .section-kicker {
    margin-bottom: 20px;
}

.section-kicker {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(193, 155, 84, 0.12);
    border: 1px solid rgba(193, 155, 84, 0.28);
    color: var(--brand-dark);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.about-intro h2 {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    font-size: 2.7rem;
    line-height: 1.22;
}

.about-intro p {
    max-width: 820px;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

.about-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.about-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 244, 250, 0.96) 100%);
    min-height: 100%;
}

.about-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, rgba(35, 27, 56, 0.92) 100%);
}

.about-card-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 155, 84, 0.12);
    border: 1px solid rgba(193, 155, 84, 0.2);
    margin-bottom: 20px;
}

.about-card-icon i {
    font-size: 1.35rem;
}

.about-card-meta {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.about-card h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--brand-dark);
}

.about-card p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0;
}

/* --- 6. 翻转卡片 (痛点对比 Comparison) --- */
/* 移除背景色，让它自然继承网页底色 */
.comparison-section { padding: 100px 5%; max-width: 1200px; margin: 0 auto; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.flip-card { background-color: transparent; height: 300px; perspective: 1000px; cursor: pointer; /* 增加小手图标，暗示可点击 */ }
.flip-card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.8s; transform-style: preserve-3d;
}

/* 【核心修复】：分离电脑端的悬停和移动端的点击，彻底解决“粘性悬停”BUG */

/* 只有在支持鼠标悬停的设备（电脑）上，才使用 hover 翻转 */
@media (hover: hover) {
    .flip-card:hover .flip-card-inner { 
        transform: rotateY(180deg); 
    }
}

/* 在所有设备上，只要有 is-flipped 这个类，就执行翻转（交由 JS 控制） */
.flip-card.is-flipped .flip-card-inner { 
    transform: rotateY(180deg); 
}

.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-radius: 16px; padding: 30px;
}
.flip-card-front { 
    background: var(--bg-card); 
    border: 1px solid var(--glass-border); 
    box-shadow: var(--glass-shadow);
}
.flip-card-back { 
    background: var(--brand-dark); 
    color: #FFFFFF; 
    transform: rotateY(180deg); 
    box-shadow: 0 15px 35px rgba(35, 27, 56, 0.15);
}
.flip-card-front i { font-size: 3rem; margin-bottom: 20px; color: var(--gold); }
.flip-card-back i { font-size: 3rem; margin-bottom: 20px; color: var(--gold); }
.flip-card-front p { color: var(--text-muted); font-size: 0.95rem; margin-top: 15px;}
.flip-card-back p { color: rgba(255,255,255,0.8); font-weight: 400; font-size: 0.95rem; margin-top: 15px; }

/* 【新增】：为移动端增加一个“点击翻转”的微小提示，提升交互体验 (UX) */
.tap-hint {
    display: none; /* 电脑端隐藏 */
    font-size: 0.75rem;
    color: var(--gold);
    margin-top: 15px;
    font-weight: 600;
}

/* 在手机和平板屏幕下，显示“点击翻转”提示 */
@media(max-width: 1024px) {
    .tap-hint { display: block; }
}

/* --- 7. 业务矩阵 (Tab 切换) --- */
/* 区块背景：纯白色，和上下文的浅紫灰形成柔和分割 */
.services-matrix { padding: 100px 5%; background: #FFFFFF; }
.tabs { display: flex; justify-content: center; gap: 20px; margin-bottom: 50px; }
.tab-btn {
    background: transparent; color: var(--text-muted); border: none;
    font-size: 1.2rem; font-weight: 600; padding: 10px 30px;
    cursor: pointer; transition: all 0.3s; border-bottom: 2px solid transparent;
}
.tab-btn.active { color: var(--brand-dark); border-bottom: 2px solid var(--gold); } /* 激活状态为深紫色字 + 金色下划线 */
.tab-content { display: none; max-width: 1200px; margin: 0 auto; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-item i { font-size: 2.5rem; margin-bottom: 20px; color: var(--gold); }
.service-item h4 { font-size: 1.2rem; margin-bottom: 10px; color: var(--brand-dark); }
.service-item p { font-size: 0.9rem; color: var(--text-muted); }

/* --- 8. 时间轴 (5步交付流程) --- */
/* 回到柔和的紫灰底色 */
.process-section { padding: 100px 5%; background: #F4F2F7; }
.timeline { display: flex; justify-content: space-between; position: relative; flex-wrap: wrap; gap: 20px; max-width: 1200px; margin: 0 auto;}
.timeline::before {
    content: ''; position: absolute; top: 30px; left: 0; width: 100%; height: 2px;
    background: rgba(35, 27, 56, 0.1); /* 浅色模式下的浅紫灰连线 */
    z-index: 0;
}
.step { text-align: center; flex: 1; min-width: 150px; position: relative; z-index: 1; }
/* 步骤数字：深紫底 + 金边 + 金字 */
.step-num {
    width: 60px; height: 60px; margin: 0 auto 20px; 
    background: var(--brand-dark);
    border: 2px solid var(--gold); 
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center; 
    font-size: 1.2rem; font-weight: 700; color: var(--gold);
    box-shadow: 0 5px 15px rgba(35, 27, 56, 0.1);
}
.step h4 { font-size: 1.1rem; margin-bottom: 10px; color: var(--brand-dark); }
.step p { font-size: 0.85rem; color: var(--text-muted); }

/* --- 9. 成功案例卡片 (高度统一排版优化) --- */
.cases-section { padding: 100px 5%; background: #FFFFFF; }

/* 1. 改用 Grid 布局，强制所有列等高、完全对齐 */
.cases-wrapper { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 40px; 
    max-width: 1200px; 
    margin: 0 auto; 
}

/* 2. 卡片变为列向弹性盒，配合 Grid 实现完美填充 */
.case-card { 
    border-top: 4px solid var(--gold); 
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tag { 
    align-self: flex-start; /* 确保标签不会被意外拉伸 */
    background: rgba(193, 155, 84, 0.1); 
    color: var(--brand-dark); 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: 700;
    margin-bottom: 20px;
}

.case-card h3 { 
    margin-bottom: 10px; 
    font-size: 1.3rem; 
    color: var(--brand-dark);
    line-height: 1.4;
}

/* 客户基本信息 */
.case-card > p {
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* 3. 挑战与方案详情区 (关键破局点) */
.case-details { 
    background-color: var(--bg-main); /* 珍珠灰内底，划分视觉层次 */
    padding: 25px;
    border-radius: 12px;
    flex-grow: 1; /* 自动撑满卡片底部剩余空间，保证所有卡片底部平齐 */
    display: flex;
    flex-direction: column;
}

.case-details h4 { 
    font-size: 1rem; 
    margin-bottom: 10px; 
    color: var(--brand-dark); 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.case-details p { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-bottom: 20px; 
    line-height: 1.6; 
}

/* 去除最后一个段落的多余边距，确保底部内边距统一 */
.case-details p:last-child { 
    margin-bottom: 0; 
}

/* --- 10. 首页专属响应式适配 (桌面、平板、手机三端完美适配) --- */

/* ==========================================
   1. 平板端适配 (iPad 等中等屏幕，1024px 以下) 
========================================== */
@media(max-width: 1024px) {
    /* 首屏大标题缩小，避免折行太难看 */
    .hero-content h1 { font-size: 3.2rem; }
    .hero-content p { font-size: 1.05rem; }

    .about-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .about-intro h2 {
        font-size: 2.35rem;
    }

    /* 信任数据：横向排 4 个太挤，改为 2x2 的田字格布局 */
    .trust-metrics {
        flex-wrap: wrap;
        gap: 30px;
        padding: 30px;
    }
    .metric {
        flex: 1 1 40%; /* 每个占大概一半宽度 */
        margin-bottom: 10px;
    }

    /* 时间轴流程：稍微缩小圈圈和文字，防止 5 个步骤重叠 */
    .step-num { 
        width: 50px; 
        height: 50px; 
        font-size: 1.1rem; 
        margin-bottom: 15px; 
    }
    .step h4 { font-size: 1rem; }
    .step p { font-size: 0.8rem; }
    
    /* 缩小各个区块的上下留白，因为平板屏幕没那么高 */
    .about-section, .comparison-section, .services-matrix, .process-section, .cases-section {
        padding: 80px 5%;
    }

    .about-section {
        padding-top: 0;
    }
}

/* ==========================================
   2. 移动端适配 (手机屏幕，768px 以下) 
========================================== */
@media(max-width: 768px) {
    /* 首屏文字进一步等比例缩小 */
    .hero-content h1 { 
        font-size: 2.2rem; 
        line-height: 1.25; 
        margin-bottom: 15px; 
    }
    .hero-content p { 
        font-size: 1rem; 
        margin-bottom: 30px; 
        padding: 0 10px; 
    }
    .hero-content .badge {
        font-size: 0.75rem;
        padding: 6px 16px;
        margin-bottom: 20px;
    }

    /* 首屏按钮改为上下堆叠，100%宽度，大拇指点击极其舒服 */
    .hero-buttons { 
        flex-direction: column; 
        gap: 15px; 
        padding: 0 20px; 
    }
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        text-align: center;
        display: block; 
    }

    /* 信任数据：变成单列 (1x4) */
    .trust-metrics { 
        flex-direction: column; 
        gap: 30px; 
        margin-top: 20px; 
    }
    .metric {
        flex: 1 1 100%;
        margin-bottom: 0;
    }

    .about-intro h2 {
        font-size: 1.95rem;
        margin-bottom: 18px;
    }
    .about-intro p {
        font-size: 0.98rem;
        line-height: 1.72;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-card-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    /* 交付流程时间轴：隐藏横线，改成垂直瀑布流显示 */
    .timeline::before { 
        display: none; 
    }
    .timeline {
        flex-direction: column; /* 垂直排布 */
        gap: 40px;
    }
    
    /* 手机端区块上下留白进一步收紧，避免滑动太累 */
    .about-section, .comparison-section, .services-matrix, .process-section, .cases-section {
        padding: 60px 5%;
    }

    .about-section {
        padding-top: 0;
    }
}

/* ==========================================
   3. 极限小屏保护 (iPhone SE 等极窄屏幕，400px 以下) 
========================================== */
@media(max-width: 400px) {
    /* --- 首屏与通用标题极致压缩 --- */
    .hero-content h1 { 
        font-size: 1.8rem; /* 进一步缩小，防止英文长单词被硬切 */
        letter-spacing: -0.5px;
    }
    .hero-content p { 
        font-size: 0.95rem; /* 减小正文负担 */
    }
    .hero-content .badge {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
    .section-title h2 { 
        font-size: 1.8rem; /* 各个区块的大标题同步缩小 */
    }
    .about-intro h2 {
        font-size: 1.68rem;
    }
    .section-kicker {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    /* --- 按钮与交互区域体验优化 --- */
    /* 注意：必须用逗号分隔，否则 CSS 不生效 */
    .btn-primary, .btn-secondary {
        font-size: 0.9rem; /* 稍微缩小字号 */
        padding: 10px 15px; /* 减小按钮本身的内边距 */
    }
    .hero-buttons { 
        padding: 0 10px; /* 让按钮区域更贴近屏幕边缘，释放内部空间 */
    }

    /* --- 释放屏幕空间：全面缩小组件内边距 --- */
    /* 区块上下留白从 60px 进一步压缩到 40px，避免小屏滑断手 */
    .about-section, .comparison-section, .services-matrix, .process-section, .cases-section {
        padding: 40px 5%;
    }
    /* 玻璃卡片的内边距压缩，给文字留出更多横向空间 */
    .glass-panel {
        padding: 25px 20px;
    }

    /* --- 信任数据 (Trust Metrics) 防突兀处理 --- */
    .metric h2 { 
        font-size: 2.5rem; /* 防止数字在小屏幕上显得像个大灯泡 */
    }
    .metric p { 
        font-size: 0.8rem; 
    }

    /* --- 业务矩阵 Tabs 极小屏特调 --- */
    .tabs { 
        flex-direction: column; /* 极窄屏幕下，选项卡改为上下堆叠 */
        gap: 10px; 
        margin-bottom: 30px;
    }
    .tab-btn { 
        width: 100%; /* 选项卡占满屏幕，变成两个超大点击块，对胖手指极度友好 */
        font-size: 1.05rem; 
        padding: 12px 0; 
        background: rgba(35, 27, 56, 0.03); /* 给未选中的加上微弱底色区分 */
        border-radius: 8px;
    }
    .tab-btn.active {
        border-bottom: none;
        background: rgba(193, 155, 84, 0.1); /* 选中状态变为底色高亮，而非下划线 */
        border-left: 3px solid var(--gold);
    }

    /* --- 严防横向滚动条：联系方式暴力换行 --- */
    .contact-card {
        padding: 30px 15px; /* 左右内边距压到最小 */
    }
    .contact-card .contact-detail {
        font-size: 1.05rem; /* 稍微缩小邮箱和电话的字号 */
        /* 核心绝招：允许长邮箱地址在任何字母处强制换行，死死守住不溢出屏幕 */
        word-break: break-all; 
        overflow-wrap: break-word;
    }
}
