/* 全局变量与共用样式（导航、页脚、按钮、容器） */
:root {
    --primary: #1a6dff;
    --primary-dark: #0d4fcc;
    --primary-deep: #0a2a6b;
    --navy: #061a3a;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --bg: #ffffff;
    --bg-soft: #f5f7fb;
    --bg-blue: #eef4ff;
    --border: #e5e7eb;
    --white: #ffffff;
    --container-width: 1200px;
    --header-height: 96px;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 8px 24px rgba(26, 109, 255, 0.08);
    --shadow-hover: 0 16px 40px rgba(26, 109, 255, 0.16);
    --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
        'Noto Sans SC', sans-serif;
    --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    height: 48px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    transition: transform var(--transition), box-shadow var(--transition),
        background var(--transition), color var(--transition),
        border-color var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #3b8bff 0%, var(--primary) 100%);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(26, 109, 255, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 12px 28px rgba(26, 109, 255, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-outline-blue {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline-blue:hover {
    background: var(--primary);
    color: var(--white);
}

/* 区块标题 */
.section-title {
    font-size: 50px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.section-title .en {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--primary);
    text-transform: uppercase;
}

.section-desc {
    margin-top: 12px;
    font-size: 20px;
    color: #333333;
}

.section-title-center {
    text-align: center;
}

.section-title-center .section-desc {
    margin-left: auto;
    margin-right: auto;
}

/* 顶部导航（可被后端复用）：滚动时固定顶部 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
}

/* Logo 左侧固定定位，与设计稿 left: 40px 对齐 */
.site-header .logo {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: block;
    width: 160px;
    height: 51px;
}

.site-header .logo img {
    display: block;
    width: 160px;
    height: 51px;
    object-fit: contain;
}

/* 菜单距左侧 400px（相对 logo 区域） */
.site-header nav {
    position: absolute;
    left: 400px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #5aa3ff, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(26, 109, 255, 0.4);
}

.logo-mark svg {
    width: 20px;
    height: 20px;
}

.logo-mark svg path {
    fill: var(--white);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 80px;
    white-space: nowrap;
}

.nav-list a {
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    position: relative;
    padding: 8px 0 12px;
    transition: color var(--transition);
}

/* 菜单选中/悬停下划线：宽度与文案一致 */
.nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: #ffffff;
    opacity: 0;
    transition: opacity var(--transition);
}

.nav-list a:hover::after,
.nav-list a.is-active::after {
    opacity: 1;
}

/* ========== 顶部导航：登录系统按钮（暗色/透明导航默认白字） ========== */
.header-login {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background var(--transition), color var(--transition),
        border-color var(--transition);
}

.header-login__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.header-login__text {
    line-height: 1;
}

.header-login:hover {
    background: #ffffff;
    color: var(--primary);
    border-color: #ffffff;
}

/* 页脚（可被后端复用） */
.site-footer {
    width: 100%;
    height: 320px;
    min-height: 320px;
    max-height: 320px;
    opacity: 1;
    background: #0162e4;
    color: #ffffff;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
    font-family: 'Source Han Sans', 'Source Han Sans SC', '思源黑体',
        'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.site-footer > .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    max-width: none;
    width: 100%;
    height: 100%;
    padding: 26px 120px 20px;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    justify-content: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.footer-logo img {
    display: block;
    width: 160px;
    height: 49px;
    object-fit: contain;
    /* 蓝底上转为白色 logo */
    filter: brightness(0) invert(1);
}

.footer-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
}

.footer-slogan {
    margin: 0;
    font-family: 'Source Han Sans', 'Source Han Sans SC', '思源黑体',
        'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 26px;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0em;
    font-variation-settings: 'opsz' auto;
    font-feature-settings: 'kern' on;
    color: #ffffff;
}

.footer-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    padding: 16px 0;
    align-items: start;
    flex: 1;
    min-height: 0;
}

/* 联系电话列 */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: center;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact li img {
    flex-shrink: 0;
}

.footer-phone {
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 22px;
    font-weight: normal;
    color: #ffffff;
    white-space: nowrap;
}

.footer-nav {
    width: 480px;
    margin-left: 300px;
}

.footer-nav h4 {
    margin: 0 0 12px;
    font-family: 'Alibaba PuHuiTi 3.0', 'Alibaba PuHuiTi', '阿里巴巴普惠体',
        'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 26px;
    font-weight: 500;
    line-height: 30px;
    letter-spacing: 0em;
    font-variation-settings: 'opsz' auto;
    font-feature-settings: 'kern' on;
    color: #ffffff;
}

.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 24px;
}

.footer-nav-grid a {
    font-family: 'Source Han Sans', 'Source Han Sans SC', '思源黑体',
        'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: normal;
    letter-spacing: 0em;
    font-variation-settings: 'opsz' auto;
    font-feature-settings: 'kern' on;
    color: #ffffff;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.footer-nav-grid a:hover {
    opacity: 0.85;
}

.footer-qr {
    display: flex;
    gap: 24px;
    justify-self: end;
}

.footer-qr-item {
    text-align: center;
}

.footer-qr-item img {
    width: 96px;
    height: 96px;
    margin: 0 auto 6px;
    background: #ffffff;
    display: block;
    box-sizing: border-box;
}

.footer-qr-item p {
    margin: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: normal;
    color: #ffffff;
    white-space: nowrap;
}

.footer-bottom {
    padding: 10px 0 0;
    font-family: 'Source Han Sans', 'Source Han Sans SC', '思源黑体',
        'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: normal;
    letter-spacing: 0em;
    font-variation-settings: 'opsz' auto;
    font-feature-settings: 'kern' on;
    color: #ffffff;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .site-footer > .container {
        padding-left: 60px;
        padding-right: 60px;
    }

    .footer-slogan {
        font-size: 20px;
    }
}

@media (max-width: 900px) {
    .site-header nav {
        display: none;
    }

    .site-header .logo {
        left: 20px;
    }

    .header-login {
        right: 20px;
        height: 36px;
        padding: 0 14px;
        font-size: 13px;
    }

    .header-login__icon {
        width: 14px;
        height: 14px;
    }

    .site-footer {
        height: auto;
        min-height: 320px;
        max-height: none;
        overflow: visible;
    }

    .site-footer > .container {
        padding: 24px 24px 16px;
    }

    .footer-top {
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    .footer-divider {
        display: none;
    }

    .footer-slogan {
        font-size: 16px;
        width: 100%;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
        flex: none;
    }

    .footer-contact {
        flex-direction: row;
        gap: 24px;
    }

    .footer-nav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 20px;
    }

    .footer-qr {
        justify-self: start;
    }
}

/* ========== Hero 描边按钮（跨页通用） ========== */
.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-hero {
    width: 186px;
    height: 60px;
    min-width: 186px;
    padding: 0 24px;
    border-radius: 50px;
    box-sizing: border-box;
    border: 2px solid #ffffff;
    background: transparent;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    gap: 10px;
    box-shadow: none;
}

.btn-hero:hover {
    transform: none;
    color: #333333;
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: none;
}

.btn-hero-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: url('../image/index/arrow-right-white.png') center / contain no-repeat;
    transition: none;
}

.btn-hero:hover .btn-hero-icon {
    background-image: url('../image/index/arrow-right-gray.png');
}

/* ========== 浅色背景 Hero 按钮覆盖（product / cases / about / 首页第二屏） ========== */
.page-product .btn-hero,
.page-cases .btn-hero,
.page-about .btn-hero,
.hero-actions--track .btn-hero {
    border-color: transparent;
}

/* 主按钮：蓝色渐变实底 */
.page-product .hero-actions .btn-hero:first-child,
.page-cases .hero-actions .btn-hero:first-child,
.page-about .hero-actions .btn-hero:first-child,
.hero-actions--track .btn-hero:first-child {
    background: linear-gradient(135deg, #3b8bff 0%, #1a6dff 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(26, 109, 255, 0.35);
}

.page-product .hero-actions .btn-hero:first-child:hover,
.page-cases .hero-actions .btn-hero:first-child:hover,
.page-about .hero-actions .btn-hero:first-child:hover,
.hero-actions--track .btn-hero:first-child:hover {
    background: linear-gradient(135deg, #1a6dff 0%, #0d4fcc 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(26, 109, 255, 0.45);
}

/* 主按钮 hover 保持白色箭头 */
.page-product .hero-actions .btn-hero:first-child:hover .btn-hero-icon,
.page-cases .hero-actions .btn-hero:first-child:hover .btn-hero-icon,
.page-about .hero-actions .btn-hero:first-child:hover .btn-hero-icon,
.hero-actions--track .btn-hero:first-child:hover .btn-hero-icon {
    background-image: url('../image/index/arrow-right-white.png');
}

/* 次按钮：白色毛玻璃 + 蓝字 */
.page-product .hero-actions .btn-hero:last-child,
.page-cases .hero-actions .btn-hero:last-child,
.page-about .hero-actions .btn-hero:last-child,
.hero-actions--track .btn-hero:last-child {
    background: rgba(255, 255, 255, 0.75);
    color: #1a6dff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-product .hero-actions .btn-hero:last-child:hover,
.page-cases .hero-actions .btn-hero:last-child:hover,
.page-about .hero-actions .btn-hero:last-child:hover,
.hero-actions--track .btn-hero:last-child:hover {
    background: #ffffff;
    color: #0d4fcc;
    box-shadow: 0 8px 24px rgba(26, 109, 255, 0.25);
    border-color: #ffffff;
}

/* 次按钮：蓝色箭头（与文字同色 #1a6dff） */
.page-product .hero-actions .btn-hero:last-child .btn-hero-icon,
.page-cases .hero-actions .btn-hero:last-child .btn-hero-icon,
.page-about .hero-actions .btn-hero:last-child .btn-hero-icon,
.hero-actions--track .btn-hero:last-child .btn-hero-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a6dff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* 次按钮 hover：深蓝箭头（与 hover 文字同色 #0d4fcc） */
.page-product .hero-actions .btn-hero:last-child:hover .btn-hero-icon,
.page-cases .hero-actions .btn-hero:last-child:hover .btn-hero-icon,
.page-about .hero-actions .btn-hero:last-child:hover .btn-hero-icon,
.hero-actions--track .btn-hero:last-child:hover .btn-hero-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230d4fcc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* ========== 微信咨询弹窗（跨页通用） ========== */
body.wechat-modal-open {
    overflow: hidden;
}

.wechat-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.wechat-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.wechat-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 18, 42, 0.62);
    backdrop-filter: blur(8px);
}

.wechat-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(405px, 100%);
    box-sizing: border-box;
    border-radius: 24px;
    background: #ffffff;
    box-shadow:
        0 32px 80px rgba(5, 32, 83, 0.30),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wechat-modal.is-open .wechat-modal__dialog {
    transform: translateY(0) scale(1);
}

/* --- Header: immersive blue gradient --- */
.wechat-modal__header {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, #0162e4 0%, #3b8bff 55%, #5aa3ff 100%);
    overflow: hidden;
}

.wechat-modal__header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(120, 190, 255, 0.4);
    filter: blur(30px);
    pointer-events: none;
}

.wechat-modal__header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(150, 205, 255, 0.3);
    filter: blur(25px);
    pointer-events: none;
}

.wechat-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
}

.wechat-modal__close svg {
    width: 18px;
    height: 18px;
    display: block;
}

.wechat-modal__close:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    transform: rotate(90deg);
}

.wechat-modal__badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.wechat-modal__badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 8px rgba(110, 231, 183, 0.8);
    animation: wechat-badge-pulse 2s ease-in-out infinite;
}

@keyframes wechat-badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

.wechat-modal__header h2 {
    position: relative;
    margin: 14px 0 8px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.wechat-modal__desc {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.6;
}

/* --- Body: clean white scan zone --- */
.wechat-modal__body {
    padding: 24px 32px 28px;
    text-align: center;
}

.wechat-modal__qr {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 0 auto 8px;
}

.wechat-modal__qr-item {
    width: 180px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 16px;
    background: #f8faff;
    box-shadow:
        0 2px 8px rgba(26, 109, 255, 0.08),
        inset 0 0 0 1px rgba(26, 109, 255, 0.08);
    transition: all 0.3s ease;
}

.wechat-modal__qr-item:hover {
    box-shadow:
        0 8px 24px rgba(26, 109, 255, 0.18),
        inset 0 0 0 1px rgba(26, 109, 255, 0.15);
    transform: translateY(-3px);
}

.wechat-modal__qr-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
}

.wechat-modal__tip {
    margin: 14px 0 0;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.6;
}

/* --- Staggered entrance animations --- */
.wechat-modal.is-open .wechat-modal__badge,
.wechat-modal.is-open .wechat-modal__header h2,
.wechat-modal.is-open .wechat-modal__desc {
    animation: wechat-header-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.wechat-modal.is-open .wechat-modal__badge { animation-delay: 0.1s; }
.wechat-modal.is-open .wechat-modal__header h2 { animation-delay: 0.18s; }
.wechat-modal.is-open .wechat-modal__desc { animation-delay: 0.26s; }

.wechat-modal.is-open .wechat-modal__qr-item {
    animation: wechat-qr-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.wechat-modal.is-open .wechat-modal__qr-item:nth-child(1) { animation-delay: 0.34s; }
.wechat-modal.is-open .wechat-modal__qr-item:nth-child(2) { animation-delay: 0.42s; }

@keyframes wechat-header-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes wechat-qr-enter {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Respect reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
    .wechat-modal,
    .wechat-modal__dialog,
    .wechat-modal__close,
    .wechat-modal__qr-item,
    .wechat-modal__badge,
    .wechat-modal__badge::before,
    .wechat-modal__header h2,
    .wechat-modal__desc {
        transition: none !important;
        animation: none !important;
    }
}
