/* ========== 全局变量 ========== */
:root {
    --bg-dark: #0a0f14;
    --bg-card: #12161c;
    --bg-elevated: #1a2028;
    --border-subtle: #2a2f38;
    --text-primary: #eef2f8;
    --text-secondary: #8a9bb0;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --transition: all 0.3s ease;
    --border-color-1: #3b82f6;
    --border-color-2: #8b5cf6;
    --border-color-3: #06b6d4;
    --btn-glow-bg: #0a0f14;
    --btn-glow-text: #eef2f8;
    --border-size: 2px;
    --border-radius: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
body {
    animation: fadeIn 0.6s ease-out;
}

/* ================================================================
   ★ 注意：所有导航相关样式已移至 common.css
   ================================================================ */

/* ===== 高级渐变边框按钮 ===== */
@property --border-angle-1 {
    syntax: "<angle>";
    inherits: true;
    initial-value: 0deg;
}
@property --border-angle-2 {
    syntax: "<angle>";
    inherits: true;
    initial-value: 90deg;
}
@property --border-angle-3 {
    syntax: "<angle>";
    inherits: true;
    initial-value: 180deg;
}

@supports (color: color(display-p3 1 1 1)) {
    :root {
        --border-color-1: color(display-p3 0 0.2 1);
        --border-color-2: color(display-p3 0.5 0.3 1);
        --border-color-3: color(display-p3 0 0.8 0.9);
    }
}

@keyframes rotateAngle1 { to { --border-angle-1: 360deg; } }
@keyframes rotateAngle2 { to { --border-angle-2: -270deg; } }
@keyframes rotateAngle3 { to { --border-angle-3: 540deg; } }

.btn-glow-advanced {
    --border-angle-1: 0deg;
    --border-angle-2: 90deg;
    --border-angle-3: 180deg;
    color: var(--btn-glow-text);
    font-size: var(--fs-16);
    font-weight: 600;
    font-family: inherit;
    border: 0;
    padding: var(--border-size);
    display: inline-flex;
    width: max-content;
    border-radius: var(--border-radius);
    background-color: transparent;
    background-image:
        conic-gradient(from var(--border-angle-1) at 10% 15%, transparent, var(--border-color-1) 10%, transparent 30%, transparent),
        conic-gradient(from var(--border-angle-2) at 70% 60%, transparent, var(--border-color-2) 10%, transparent 60%, transparent),
        conic-gradient(from var(--border-angle-3) at 50% 20%, transparent, var(--border-color-3) 10%, transparent 50%, transparent);
    animation: rotateAngle1 4s linear infinite, rotateAngle2 10s linear infinite, rotateAngle3 16s linear infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}
.btn-glow-advanced .btn-inner {
    background: var(--btn-glow-bg);
    padding: 12px 32px;
    border-radius: calc(var(--border-radius) - var(--border-size));
    color: var(--btn-glow-text);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}
.btn-glow-advanced:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}
.btn-glow-advanced:hover .btn-inner {
    background: rgba(10, 15, 20, 0.85);
}
.btn-glow-advanced .btn-inner i {
    font-size: var(--fs-14);
}

/* ===== 轮播 ===== */
.fade-carousel {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background: #05080c;
}
.carousel-slides-fade {
    position: relative;
    width: 100%;
    height: 100%;
}
.slide-fade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.9s ease;
    z-index: 1;
}
.slide-fade.active {
    opacity: 1;
    z-index: 2;
}
.slide-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28%;
    z-index: 3;
    text-align: center;
    background: transparent;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.7);
    color: white;
    padding: 12px 32px;
    font-size: var(--fs-16);
    border-radius: 40px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.btn-outline:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px var(--accent-glow);
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 28, 36, 0.7);
    color: white;
    border: none;
    font-size: var(--fs-28);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}
.carousel-btn:hover {
    background: var(--accent);
}
.prev { left: 24px; }
.next { right: 24px; }
.dots {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 20;
}
.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}
.dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* ===== 通用区块 =====
   宽度（1400px）与左右留白（5%）由 common.css 的 .container 提供，
   本规则只保留纵向节奏：首页模块最外层统一写成
   <section class="section container">。 */
.section {
    padding-top: 80px;
    padding-bottom: 80px;
}
.alt-bg {
    background: rgba(18, 22, 28, 0.6);
    border-radius: 40px;
    margin: 20px auto;
}
.section-title {
    font-size: var(--fs-40);
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.section-sub {
    text-align: center;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 60px;
    font-size: var(--fs-18);
}
.two-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: center;
    justify-content: space-between;
}
.col {
    flex: 1;
    min-width: 260px;
}
.col h3 {
    font-size: var(--fs-32);
    font-weight: 600;
    margin-bottom: 16px;
}
.lead {
    font-size: var(--fs-18);
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 500;
}
.col p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 0 6px var(--accent-glow);
}
.btn i {
    transition: transform 0.2s;
}
.btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px var(--accent-glow);
}
.btn:hover i {
    transform: translateX(4px);
}

/* ===== 爆炸图 ===== */
.explode-section {
    background: linear-gradient(135deg, #0a0f14 0%, #0f1419 100%);
    padding: 40px 20px;
    margin: 20px 0;
    border-top: 1px solid rgba(59,130,246,0.2);
    border-bottom: 1px solid rgba(59,130,246,0.2);
    position: relative;
    overflow-x: hidden;
}
/* 爆炸图是整幅色带（.explode-section 自带 5% 留白），
   内层按 common.css 的约定用 1400px 居中，与 .container 数学等价 */
.explode-container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}
.explode-title {
    font-size: var(--fs-32);
    font-weight: 600;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, #8ba0c0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.explode-sub {
    color: var(--text-secondary);
    font-size: var(--fs-16);
    margin-bottom: 30px;
    letter-spacing: 1px;
}
.explode-stage {
    position: relative;
    width: 100%;
    height: 350px;
    background: radial-gradient(circle at center, rgb(13, 18, 23) 0%, transparent 70%);
    border-radius: 40px;
    margin-bottom: 40px;
    overflow: visible;
}
.part-img {
    position: absolute;
    width: 300px;
    height: auto;
    pointer-events: none;
    transition: transform 0.05s linear;
    will-change: transform;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
@media (max-width: 768px) {
    .explode-stage {
        height: 250px;
    }
    .part-img {
        width: 60px;
    }
}
.explode-hint {
    color: #5c6e7a;
    font-size: var(--fs-14);
    text-align: center;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* ===== 核心产品矩阵 ===== */
/* 产品矩阵在 .section.container 内部，宽度已由容器约束，这里不再重复写 1400px */
.product-grid-large {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}
.product-card-large {
    flex: 1 1 calc(33.33% - 24px);
    min-width: 300px;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}
.product-card-large:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.7), 0 0 0 1px rgba(59,130,246,0.2);
}
.product-image-large {
    height: 240px;
    background: linear-gradient(145deg, #1a222c, #0a0f14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c6e7a;
    font-size: var(--fs-20);
    font-weight: 500;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card-large:hover .product-img {
    transform: scale(1.08);
}
.product-image-large::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(10,15,20,0.6), transparent);
    pointer-events: none;
}
.product-body-large {
    padding: 28px 26px 34px;
}
.product-body-large h4 {
    font-size: var(--fs-28);
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}
.product-tags-large {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.product-tags-large span {
    background: rgba(59,130,246,0.12);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: var(--fs-13);
    font-weight: 500;
    letter-spacing: 0.3px;
}
.product-params-large {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
}
.param-item-large {
    text-align: center;
    flex: 1;
}
.param-value-large {
    display: block;
    font-size: var(--fs-32);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: 0.5px;
}
.param-unit-large {
    display: block;
    font-size: var(--fs-14);
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 400;
}
.param-label-large {
    display: block;
    font-size: var(--fs-12);
    color: var(--text-secondary);
    margin-top: 8px;
    letter-spacing: 0.5px;
    font-weight: 400;
}
@media (max-width: 1024px) {
    .product-card-large { flex: 1 1 calc(50% - 24px); max-width: 500px; }
}
@media (max-width: 768px) {
    .product-card-large { flex: 1 1 100%; max-width: 480px; }
    .product-image-large { height: 240px; }
    .product-body-large h4 { font-size: var(--fs-22); }
    .param-value-large { font-size: var(--fs-28); }
    .product-params-large { flex-wrap: wrap; gap: 16px; }
    .param-item-large { flex: 1 1 calc(33.33% - 10px); min-width: 80px; }
}

/* ===== 合作伙伴 ===== */
.partner-section {
    margin-top: 80px;
    padding: 50px 0 40px;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.2);
}
.partner-header {
    text-align: center;
    margin-bottom: 40px;
}
.partner-header h3 {
    font-size: var(--fs-28);
    font-weight: 500;
}
.partner-header p {
    color: var(--text-secondary);
    font-size: var(--fs-14);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.logo-carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    /* 纵向滚动仍然交给页面，横向手势由 js/main.js 接管 */
    touch-action: pan-y;
}
.logo-carousel.is-dragging {
    cursor: grabbing;
}
.logo-carousel:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.logo-carousel img {
    /* 图片不参与命中测试，按住时才不会触发浏览器自带的图片拖拽 */
    pointer-events: none;
    -webkit-user-drag: none;
}
.logo-carousel::before,
.logo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.logo-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}
.logo-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}
.logo-track-advanced {
    display: flex;
    gap: 40px;
    width: fit-content;
    will-change: transform;
    /* transform 由 js/main.js 逐帧写入。原先这里是 animation: slowScroll 50s linear infinite，
       但 CSS 动画会独占 transform，没法再叠加左键拖拽的位移，故改为脚本驱动。 */
}
.gray-logo {
    background: #1e2933;
    border: 1px solid #2d3a44;
    flex: 0 0 auto;   /* 尺寸固定、不随轨道伸缩，拖拽位移才算得准 */
    width: 140px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-14);
    font-weight: 600;
    color: #6b7a8a;
    border-radius: 16px;
    overflow: hidden;
}
.gray-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.partner-note {
    text-align: center;
    margin-top: 40px;
    font-size: var(--fs-13);
    color: var(--text-secondary);
}

/* ===== 页脚 ===== */
.footer {
    background: #05080c;
    text-align: center;
    padding: 48px 20px;
    border-top: 1px solid var(--border-subtle);
    color: #7e8a98;
    font-size: var(--fs-14);
}
.footer-tagline {
    margin-top: 12px;
    font-size: var(--fs-12);
    letter-spacing: 1px;
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
    .fade-carousel { height: 400px; }
    .slide-content { bottom: 20%; white-space: nowrap; }
    .btn-outline { font-size: var(--fs-13); padding: 8px 20px; }
    .section-title { font-size: var(--fs-28); }
    .col h3 { font-size: var(--fs-28); }
}

/* 占位符通用 */
.gray-placeholder {
    background: linear-gradient(135deg, #12181f, #0a0f15);
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}