/* ================================
 * 灵基 · 下载中心
 * 设计稿：Figma 176-1341 (1440×768)
 * 安全区：1200px 居中
 * ================================ */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', -apple-system,
        BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    /* 不要给 body/html 设置不透明背景色，否则会遮挡 z-index:-2 的 .bg-layer */
    background: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 兑底色：多出背景图的区域由与背景图色调接近的渐变填充，避免出现空白/色块的震撒 */
html {
    background: linear-gradient(
            180deg,
            #c5dcfe 0%,
            #d9e1fe 22%,
            #f6f2ff 56%,
            #ffffff 87%
        )
        no-repeat;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ================================
 * 背景层（视口级 100vw 拉伸居中）
 * ================================ */
.bg-layer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 让安全区内容压在背景之上 */
.page {
    z-index: 2;
}

.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* background-image: url('/r/cms/www/default/v02/images/lingji/lingjiDownloadNew/banner-bg.jpg'); */
    background-image: url('/r/cms/www/default/v02/images/lingji/lingjiDownloadNew/banner-bgNew.jpg');
    background-size: cover;
    /* 锡定右上角：保证右上角的猪猫宇航员在任何宽高下都不会被裁切 */
    background-position: right top;
    background-repeat: no-repeat;
    will-change: filter;
    animation: bg-breath 18s ease-in-out infinite;
}

/* 超宽屏（≥7:3 / 21:9）：限制背景图继续被拉大，避免纵向裁切过多
   换为 “高度跟视口，宽度自适应”，多余横向区域由底层渐变兑底 */
/* @media (min-aspect-ratio: 21/9) {
    .bg-image {
        background-size: auto 100%;
        background-position: right top;
    }
} */

/* 窄屏（高宽比 ≤ 4/3 ，包含竖屏手机/小窗口/接近正方形）：
   cover 按高度缩放后图会变得很宽，报 right top 会把“右侧的猛猜”拉到画面中央跟按钮/Logo 重叠。
   切换为 left top 后，图的右侧（含猛猜）会被推出视口右边外，中央只看到背景装饰纹理。
   注：不要用负百分比（如 -30%）试图“更左”，实际会反方向把图推往右边，
   造成左侧出现背景空白带，和右侧“图+蒙版”区域形成明显的垂直分割线。 */
@media (max-aspect-ratio: 4/3) {
    .bg-image {
        background-position: left top;
    }
}

.bg-overlay {
    position: absolute;
    inset: 0;
    /* background: linear-gradient(
        180deg,
        rgba(197, 220, 254, 0.5) 0%,
        rgba(217, 225, 254, 0.5) 22%,
        rgba(246, 242, 255, 0.5) 56%,
        rgba(255, 255, 255, 0.5) 87%
    ); */
}

/* 窄屏下加强蒙版，让任何残留背景元素都足够柔和，不干扰前景内容 */
@media (max-aspect-ratio: 4/3) {
    .bg-overlay {
        background: linear-gradient(
            180deg,
            rgba(197, 220, 254, 0.7) 0%,
            rgba(217, 225, 254, 0.7) 22%,
            rgba(246, 242, 255, 0.75) 56%,
            rgba(255, 255, 255, 0.7) 87%
        );
    }
}

/* 背景缓慢呼吸：仅用 filter 微调亮度/饱和度，不动布局，避免任何裁切变化 */
@keyframes bg-breath {
    0%,
    100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.04) saturate(1.06);
    }
}

/* ================================
 * 安全区 1200px
 * ================================ */
.page {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
}

/* ================================
 * 顶部导航
 * ================================ */
.nav {
    width: 100%;
    padding-top: 14px;
    padding-bottom: 14px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-logo:hover {
    transform: translateY(-1px);
    opacity: 0.85;
}

.nav-logo img {
    height: 34px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 38px;
}

.nav-item {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: #1f2433;
    line-height: 1;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #998dff 0%, #576dff 50%, #65b2ff 100%);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-item:hover {
    color: #576dff;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-item.active {
    color: #576dff;
}

/* ================================
 * Hero 主区
 * ================================ */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 0 100px;
}

/* ---------- 大Logo ---------- */
.brand {
    width: 400px;
    max-width: 80%;
    margin-bottom: 70px;
}

.brand-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 40px rgba(87, 109, 255, 0.18));
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover .brand-img {
    transform: translateY(-4px) scale(1.02);
}

/* ---------- 下载按钮组 ---------- */
.download-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 760px;
}

.dl-btn {
    position: relative;
    flex: 0 1 auto;
    min-width: 168px;
    padding: 12px 22px;
    border-radius: 222px;
    background: linear-gradient(90deg, #998DFF 0%, #576DFF 50%, #65B2FF 100%);
    /* background-size: 200% 100%;
    background-position: 0% 50%; */
    color: #ffffff;
    /* box-shadow: 0 8px 24px rgba(87, 109, 255, 0.28),
        0 2px 6px rgba(87, 109, 255, 0.18); */
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease, background-position 0.6s ease;
}

/* 闪光扫过装饰 */
.dl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    pointer-events: none;
}

.dl-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(87, 109, 255, 0.38),
        0 4px 10px rgba(87, 109, 255, 0.22);
    background-position: 100% 50%;
}

.dl-btn:hover::before {
    left: 130%;
}

.dl-btn:active {
    transform: translateY(-1px);
}

.dl-btn-inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1;
}

.dl-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.dl-btn-icon img {
    width: 100%;
    height: 100%;
    /* 把SVG染白 */
    filter: brightness(0) invert(1);
}

.dl-btn-text {
    font-size: 14px;
    /* font-weight: 600; */
    line-height: 22px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ---------- 提示文字（Figma 187:1629） ---------- */
.hero-tip {
    margin-top: 23px;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #565656;
    letter-spacing: 0.2px;
    text-align: center;
}

/* ================================
 * 入场动画
 * ================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ================================
 * 响应式
 * ================================ */
/* 平板 */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 28px;
    }
    .brand {
        width: 340px;
        margin-bottom: 56px;
    }
    .hero {
        padding: 64px 0 80px;
    }
}

/* 移动端 */
@media (max-width: 768px) {
    .page {
        padding: 0 20px;
    }
    .nav {
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .nav-logo img {
        height: 28px;
    }
    .nav-menu {
        gap: 18px;
    }
    .nav-item {
        font-size: 13px;
    }

    .hero {
        padding: 90px 0 60px;
        justify-content: flex-start;
    }
    .brand {
        width: 260px;
        margin-top: 40px;
        margin-bottom: 44px;
    }

    .download-group {
        flex-direction: column;
        gap: 16px;
        max-width: 320px;
        margin: 0 auto;
    }
    .dl-btn {
        width: 100%;
        min-width: 0;
        padding: 14px 22px;
    }
    .dl-btn-text {
        font-size: 15px;
    }
    .hero-tip {
        margin-top: 24px;
        font-size: 13px;
        line-height: 20px;
        padding: 0 10px;
    }

    .cursor-glow {
        display: none;
    }
}

/* 小屏 */
@media (max-width: 380px) {
    .nav-menu {
        gap: 12px;
    }
    .nav-item {
        font-size: 12px;
    }
    .brand {
        width: 220px;
    }
}

/* ================================
 * 偏好降级（用户启用减弱动画）
 * ================================ */
@media (prefers-reduced-motion: reduce) {
    .bg-image,
    .reveal,
    .dl-btn,
    .dl-btn::before,
    .brand-img {
        animation: none !important;
        transition: none !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
