/* ========== Reset & Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', '微软雅黑', sans-serif;
    background: #0a1628;
    color: #e0e6f0;
    line-height: 1.7;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ========== Loading Screen ========== */
#loading-screen {
    position: fixed; z-index: 99999;
    inset: 0;
    background: #0a1628;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
    width: 48px; height: 48px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: #94a3b8; font-size: 14px; letter-spacing: 2px; }

/* ========== Navigation ========== */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px; height: 70px;
    transition: all 0.35s;
    background: transparent;
}
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-logo { display: flex; align-items: center; gap: 12px; color: #fff; }
.nav-logo img { height: 50px; flex-shrink: 0; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.25; width: 320px; }
.nav-logo-cn { font-size: 19px; font-weight: 700; text-align: justify; text-align-last: justify; white-space: nowrap; }
.nav-logo-en { font-size: 14px; font-weight: 400; color: #94a3b8; text-align: justify; text-align-last: justify; white-space: nowrap; margin-top: 3px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    font-size: 14px; color: #c8d6e5; letter-spacing: 1px;
    transition: color 0.3s; position: relative; padding: 4px 0;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 0; height: 2px; background: #2563eb;
    transition: width 0.3s;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; z-index: 10000;
}
.hamburger span {
    width: 26px; height: 2px; background: #fff;
    transition: all 0.3s; border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== Hero Slider ========== */
#hero { position: relative; height: 100vh; overflow: hidden; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.2s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,22,40,0.6) 0%, rgba(10,22,40,0.8) 100%);
}
.hero-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%;
    text-align: center; padding: 0 20px;
}
.hero-title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 800; color: #fff;
    letter-spacing: 3px; margin-bottom: 10px;
    animation: fadeInUp 1s ease;
}
.hero-title .accent { color: #3b82f6; }
.hero-origin {
    font-size: clamp(14px, 2vw, 18px);
    color: #94a3b8; letter-spacing: 6px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s both;
}
.hero-subtitle {
    font-size: clamp(14px, 2vw, 18px);
    color: #c8d6e5; letter-spacing: 2px; max-width: 700px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.4s both;
}
.hero-badge {
    display: inline-block;
    border: 1px solid rgba(59, 130, 246, 0.5);
    padding: 10px 30px; border-radius: 50px;
    color: #60a5fa; font-size: 14px; letter-spacing: 2px;
    animation: fadeInUp 1s ease 0.6s both;
}
.hero-dots {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 3;
}
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.4); cursor: pointer;
    transition: all 0.3s;
}
.hero-dot.active { background: #2563eb; width: 28px; border-radius: 5px; }
.hero-scroll {
    position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
    z-index: 3; cursor: pointer;
    animation: bounce 2s infinite;
}
.hero-scroll span {
    display: block; width: 20px; height: 20px;
    border-right: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== Section Common ========== */
section { padding: 90px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-block; color: #3b82f6;
    font-size: 13px; letter-spacing: 3px;
    text-transform: uppercase; margin-bottom: 12px;
    padding: 4px 16px; border: 1px solid rgba(59,130,246,0.3);
    border-radius: 20px;
}
.section-title {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700; color: #fff; letter-spacing: 2px;
    margin-bottom: 15px;
}
.section-divider {
    width: 60px; height: 3px; background: #2563eb;
    margin: 0 auto; border-radius: 2px;
}
.section-desc {
    color: #94a3b8; font-size: 15px; max-width: 680px;
    margin: 0 auto; margin-top: 15px; line-height: 1.8;
}

/* ========== Section Alternating ========== */
.bg-dark { background: #0a1628; }
.bg-medium { background: #0d1f35; }
.bg-light-section { background: #0f2744; }

/* ========== About Section ========== */
#about .about-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
}
.about-image-wrap { position: relative; }
.about-image {
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.about-image img { width: 100%; }
.about-exp-box {
    position: absolute; bottom: -20px; right: -20px;
    background: #2563eb; color: #fff;
    padding: 20px 30px; border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(37,99,235,0.4);
}
.about-exp-num { font-size: 36px; font-weight: 800; line-height: 1; }
.about-exp-unit { font-size: 14px; opacity: 0.9; margin-top: 4px; }
.about-text h3 {
    font-size: 24px; color: #fff; margin-bottom: 20px;
    letter-spacing: 1px;
}
.about-text-body {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 12px;
    margin-bottom: 16px;
}
.about-text p {
    color: #b0bed0; font-size: 15px; margin-bottom: 16px;
    line-height: 1.9;
}
.about-text p:last-child { margin-bottom: 0; }

/* ====== Scrollbar Styling ====== */
.about-text-body::-webkit-scrollbar { width: 5px; }
.about-text-body::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}
.about-text-body::-webkit-scrollbar-thumb {
    background: rgba(37,99,235,0.4);
    border-radius: 10px;
}
.about-text-body::-webkit-scrollbar-thumb:hover {
    background: rgba(37,99,235,0.6);
}
.about-text-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(37,99,235,0.4) rgba(255,255,255,0.05);
}
.about-features {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; margin-top: 25px;
}
.about-feat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 16px;
    display: flex; align-items: center; gap: 12px;
    transition: all 0.3s;
}
.about-feat:hover { border-color: rgba(37,99,235,0.4); background: rgba(37,99,235,0.05); }
.about-feat-icon {
    width: 40px; height: 40px; border-radius: 8px;
    background: rgba(37,99,235,0.15); display: flex;
    align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.about-feat-text { font-size: 13px; color: #c8d6e5; }

/* ========== Parallax Divider ========== */
.divider {
    position: relative; padding: 100px 0;
    background-size: cover; background-position: center;
    background-attachment: fixed;
}
.divider::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(10,22,40,0.82);
}
.divider-content {
    position: relative; z-index: 1; text-align: center;
}
.divider-num {
    font-size: 80px; font-weight: 900; color: #2563eb;
    opacity: 0.3; line-height: 1;
}
.divider-text {
    font-size: 22px; color: #fff; letter-spacing: 3px;
    margin-top: 10px;
}
.divider-sub {
    color: #94a3b8; font-size: 14px; margin-top: 8px;
}

/* ========== 建仪科技 Section ========== */
#tech .tech-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.tech-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 40px 30px; text-align: center;
    transition: all 0.4s; position: relative; overflow: hidden;
}
.tech-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: linear-gradient(90deg, #2563eb, #60a5fa);
    transform: scaleX(0); transition: transform 0.4s;
}
.tech-card:hover { transform: translateY(-8px); border-color: rgba(37,99,235,0.3); }
.tech-card:hover::before { transform: scaleX(1); }
.tech-icon {
    width: 70px; height: 70px; margin: 0 auto 20px;
    background: rgba(37,99,235,0.1); border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
}
.tech-card h4 { color: #fff; font-size: 18px; margin-bottom: 12px; letter-spacing: 1px; }
.tech-card p { color: #94a3b8; font-size: 14px; line-height: 1.8; }

/* ========== History Timeline ========== */
.timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}
.timeline::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
    width: 2px; background: rgba(37,99,235,0.3);
    transform: translateX(-50%);
}
.tl-item {
    position: relative;
    margin-bottom: 50px;
    width: 44%;
}
.tl-item:nth-child(odd) {
    /* 奇数项在左侧 */
}
.tl-item:nth-child(even) {
    margin-left: auto;
    /* 偶数项在右侧 */
}
.tl-item::before {
    content: ''; position: absolute; top: 10px;
    width: 14px; height: 14px; background: #2563eb;
    border-radius: 50%; border: 3px solid #0a1628;
    box-shadow: 0 0 12px rgba(37,99,235,0.6);
    z-index: 1;
}
.tl-item:nth-child(odd)::before {
    right: -34px;
}
.tl-item:nth-child(even)::before {
    left: -35px;
}
.tl-year {
    font-size: 28px; font-weight: 800; color: #2563eb;
    letter-spacing: 2px; margin-bottom: 6px;
}
.tl-title { font-size: 16px; color: #fff; font-weight: 600; margin-bottom: 8px; }
.tl-desc { color: #94a3b8; font-size: 14px; line-height: 1.8; }
.tl-item:nth-child(even) { text-align: left; }

/* ========== Products ========== */
#products .product-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 30px 24px; text-align: center;
    transition: all 0.4s; cursor: pointer;
}
.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37,99,235,0.3);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}
.product-icon {
    width: 60px; height: 60px; margin: 0 auto 16px;
    background: rgba(37,99,235,0.1); border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
}
.product-card h4 { color: #fff; font-size: 16px; margin-bottom: 8px; }
.product-card p { color: #94a3b8; font-size: 13px; line-height: 1.7; }

/* ========== Brands ========== */
.brand-matrix {
    display: flex; flex-direction: column; align-items: center;
    width: 100%;
}
.bm-main { display: flex; flex-direction: column; align-items: center; }
.bm-branch { width: 100%; }

.brand-hero {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 46px; border-radius: 12px; text-align: center;
    border: 1px solid rgba(37,99,235,0.28);
    background: linear-gradient(135deg, rgba(37,99,235,0.14), rgba(37,99,235,0.03));
    transition: all 0.3s;
}
.brand-hero--legacy {
    border-color: rgba(148,163,184,0.25);
    background: linear-gradient(135deg, rgba(148,163,184,0.10), rgba(148,163,184,0.02));
}
.brand-hero--legacy .brand-name-main { color: #b6c2d4; }
.brand-hero:hover {
    border-color: rgba(59,130,246,0.6);
    box-shadow: 0 12px 30px rgba(37,99,235,0.16);
}
.brand-name-main { font-size: 26px; letter-spacing: 6px; padding-left: 6px; }

.brand-logo { display: block; height: auto; width: auto; max-width: 100%; object-fit: contain; }
.brand-logo--main { height: 58px; }
.brand-logo--sub { height: 20px; margin: 0 auto; }

.bm-arrow {
    position: relative; width: 2px; height: 34px; margin: 0 auto;
    background: linear-gradient(180deg, rgba(59,130,246,0.35), rgba(59,130,246,0.75));
}
.bm-arrow::after {
    content: ''; position: absolute; left: 50%; bottom: -2px;
    width: 8px; height: 8px;
    border-right: 2px solid rgba(96,165,250,0.85);
    border-bottom: 2px solid rgba(96,165,250,0.85);
    transform: translateX(-50%) rotate(45deg);
}

.bm-branch-title {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin-top: 6px;
    color: #cbd5e1; font-size: 15px; letter-spacing: 3px;
}
.bm-branch-title::before,
.bm-branch-title::after {
    content: ''; width: 48px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.45));
}
.bm-branch-title::after {
    background: linear-gradient(270deg, transparent, rgba(59,130,246,0.45));
}

.bm-stem {
    width: 1px; height: 18px; margin: 0 auto;
    background: rgba(59,130,246,0.3);
}
.bm-stem--tall { height: 30px; }

.bm-row {
    position: relative; display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px; width: 100%; padding-top: 26px;
    --bm-inset: 5.9%;
}
.bm-row::before {
    content: ''; position: absolute; top: 0;
    left: var(--bm-inset); right: var(--bm-inset);
    height: 1px; background: rgba(59,130,246,0.28);
}
.bm-cn { grid-template-columns: repeat(3, 1fr); max-width: 800px; margin: 0 auto; --bm-inset: 16.1%; }

.brand-item {
    position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 16px 10px; text-align: center;
    transition: all 0.3s;
}
.bm-row .brand-item::before {
    content: ''; position: absolute; top: -26px; left: 50%;
    width: 1px; height: 26px; transform: translateX(-50%);
    background: rgba(59,130,246,0.28);
}
.brand-item:hover {
    border-color: rgba(37,99,235,0.5);
    background: rgba(37,99,235,0.08);
    transform: translateY(-3px);
}
.bm-cn .brand-item { padding: 22px 10px; }

.brand-name {
    font-size: 15px; font-weight: 700; color: #fff;
    letter-spacing: 0.5px; line-height: 1.3; word-break: break-all;
}
.bm-cn .brand-name { font-size: 19px; letter-spacing: 3px; padding-left: 3px; }
.brand-type {
    font-size: 12px; color: #7c8ea8; margin-top: 6px;
    letter-spacing: 0.5px;
}
.brand-mark {
    font-size: 9px; font-weight: 400; color: #60a5fa;
    margin-left: 1px; vertical-align: super;
}

/* ========== Contact ========== */
#contact .contact-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.contact-info h3 { font-size: 24px; color: #fff; margin-bottom: 24px; letter-spacing: 1px; }
.contact-item {
    display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start;
}
.contact-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(37,99,235,0.1); display: flex; align-items: center;
    justify-content: center; font-size: 20px; flex-shrink: 0;
}
.contact-item h5 { color: #fff; font-size: 15px; margin-bottom: 4px; }
.contact-item span { color: #94a3b8; font-size: 14px; }
.contact-qr { text-align: center; }
.contact-qr img { width: 160px; margin: 0 auto 12px; border-radius: 10px; }
.contact-qr p { color: #94a3b8; font-size: 13px; }

/* ========== Footer ========== */
footer {
    background: #061220; padding: 50px 0 30px;
    text-align: center; border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.footer-logo img { height: 36px; }
.footer-logo span { font-size: 20px; font-weight: 700; color: #fff; }
.footer-desc { color: #64748b; font-size: 13px; max-width: 700px; margin: 0 auto 20px; line-height: 1.8; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; }
.footer-links a { color: #94a3b8; font-size: 13px; transition: color 0.3s; }
.footer-links a:hover { color: #60a5fa; }
.footer-copy { color: #475569; font-size: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }

/* ========== Back to Top ========== */
#back-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px; border-radius: 50%;
    background: #2563eb; color: #fff; border: none;
    cursor: pointer; font-size: 20px;
    box-shadow: 0 4px 15px rgba(37,99,235,0.5);
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.3s; z-index: 999;
    display: flex; align-items: center; justify-content: center;
}
#back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-top:hover { background: #1d4ed8; }

/* ========== AOS ========== */
[data-aos] {
    opacity: 0; transform: translateY(40px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }
[data-aos="fade-left"]  { transform: translateX(-60px); }
[data-aos="fade-left"].aos-animate  { transform: translateX(0); }
[data-aos="fade-right"] { transform: translateX(60px); }
[data-aos="fade-right"].aos-animate { transform: translateX(0); }
[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    #products .product-grid { grid-template-columns: repeat(2, 1fr); }
    #brands .bm-row { padding-top: 0; margin-top: 18px; }
    #brands .bm-en { grid-template-columns: repeat(4, 1fr); }
    #brands .bm-cn { grid-template-columns: repeat(2, 1fr); }
    #brands .bm-row::before,
    #brands .bm-row .brand-item::before,
    #brands .bm-stem { display: none; }
}
@media (max-width: 768px) {
    #navbar { padding: 0 20px; }
    .nav-logo img { height: 40px; }
    .nav-logo-text { width: 230px; }
    .nav-logo-cn { font-size: 14px; }
    .nav-logo-en { font-size: 8px; }
    .nav-links {
        position: fixed; inset: 0; background: rgba(10,22,40,0.98);
        flex-direction: column; align-items: center; justify-content: center;
        gap: 30px; opacity: 0; visibility: hidden;
        transition: all 0.4s;
    }
    .nav-links.open { opacity: 1; visibility: visible; }
    .nav-links a { font-size: 18px; }
    .hamburger { display: flex; }
    #about .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-exp-box { bottom: -10px; right: -10px; padding: 15px 20px; }
    .about-exp-num { font-size: 26px; }
    #tech .tech-grid { grid-template-columns: 1fr; }
    .timeline { padding-left: 30px; }
    .timeline::before { left: 0; }
    .tl-item { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; text-align: left !important; }
    .tl-item::before { left: -8px !important; right: auto !important; }
    #products .product-grid { grid-template-columns: 1fr 1fr; }
    #brands .bm-en { grid-template-columns: repeat(2, 1fr); }
    #brands .bm-cn { grid-template-columns: repeat(2, 1fr); }
    .brand-name-main { font-size: 22px; letter-spacing: 4px; }
    .brand-hero { padding: 14px 32px; }
    .brand-logo--main { height: 46px; }
    #contact .contact-grid { grid-template-columns: 1fr; }
    .divider-num { font-size: 50px; }
}
@media (max-width: 480px) {
    #products .product-grid { grid-template-columns: 1fr; }
    #brands .bm-cn { grid-template-columns: 1fr 1fr; }
    .brand-name-main { font-size: 19px; letter-spacing: 3px; }
    .bm-branch-title { font-size: 13px; letter-spacing: 1.5px; }
    .bm-branch-title::before, .bm-branch-title::after { width: 24px; }
}
