/**
 * RX Aluminum - Apple B2B Homepage CSS Entry Point
 * 
 * ⭐ 聚合入口 - 这是真正 enqueue 的文件
 * 所有其他 CSS 通过 @import 引入
 */

/* ===== 1. Base Layer ===== */
@import url('./base/variables.css');
@import url('./base/typography.css');

/* ===== 2. Layout Layer ===== */
@import url('./layout/sections.css');
@import url('./layout/grid.css');
@import url('./layout/spacing.css');

/* ===== 3. Animation Layer ===== */
@import url('./animations/motion-rules.css');
@import url('./animations/reveal.css');
@import url('./animations/scroll.css');

/* ===== 4. Section Styles ===== */
@import url('./sections/hero.css');
@import url('./sections/roles.css');
@import url('./sections/systems.css');
@import url('./sections/systems-override.css');
@import url('./sections/delivery.css');
@import url('./sections/partner.css');
@import url('./sections/trust-proof.css');
@import url('./sections/track-record.css');
@import url('./sections/clients.css');

/* ===== 5. Page Specific ===== */
@import url('./pages/home.css');

/* ===== Google Fonts (Inter) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== Hero Animation - State-Based (工程级优化) ===== */
/* 安全初始态 - 防止字体加载抖动 */
.home .hero-inner,
.home .hero-sub,
.home .wp-block-uagb-buttons a {
    opacity: 0;
    transform: translateY(18px);
    will-change: opacity, transform;

    transition:
        opacity 0.8s var(--ease-apple, cubic-bezier(.4, 0, .2, 1)),
        transform 0.8s var(--ease-apple, cubic-bezier(.4, 0, .2, 1));

    /* 防字体切换抖动 */
    line-height: 1.2;
}

/* 进入视口 - 通过父容器状态控制 */
.home .home-hero.hero-is-active .hero-inner,
.home .home-hero.hero-is-active .hero-sub,
.home .home-hero.hero-is-active .wp-block-uagb-buttons a {
    opacity: 1;
    transform: translateY(0);
}

/* 离开视口 - 淡出效果 */
.home .home-hero.hero-is-leaving .hero-inner,
.home .home-hero.hero-is-leaving .hero-sub,
.home .home-hero.hero-is-leaving .wp-block-uagb-buttons a {
    opacity: 0;
    transform: translateY(18px);
}

/* ===== Override Astra for Home =====*/
/* 强制覆盖 Astra 背景色 - 匹配 Mega 菜单 */
body.home,
body.home #page,
body.home .site,
body.home .site-content,
body.home #content {
    background-color: rgba(255, 255, 255, 0.98) !important;
    background-image: none !important;
}

body.home .site-content {
    padding-top: 0;
}

/* 硬代码区底层容器 - 白色背景 */
body.home .entry-content {
    margin: 0;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.98);
}

/* 确保 section 全宽 */
/* 确保 section 全宽 - Hardcoded Sections Breakout */
body.home .entry-content>section,
/* Keep generic for potentially valid sections */
body.home .home-roles,
body.home .home-product-systems,
body.home .home-delivery,
body.home .home-partner,
body.home .home-trust,
body.home .home-track-record,
body.home .home-clients {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
    max-width: 100vw;
}



/* ===== Restore Astra Footer Defaults ===== */
/* 还原 Footer 字体和颜色，避免受 Apple B2B 样式影响 */
body.home .site-footer {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, Inter, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    z-index: 10;
    /* 确保在白色背景上正确显示，如果 footer 本身没背景 */
}

body.home .site-footer p,
body.home .site-footer a,
body.home .site-footer .ast-footer-copyright {
    color: unset;
    /* 允许 Astra 默认颜色生效 */
    font-family: inherit;
}

/* 重置 p 标签颜色 (home-kg.css 里的 p 有全局颜色) */
body.home .site-footer p {
    color: inherit;
    opacity: 1;
    /* 重置可能存在的透明度 */
}