/* ==========================================================================
   鑫荣旺泰机电 · 设计系统 v3
   方向：Autodesk 式工业大版式 + Logo 蓝主视觉 + Apple 式滚动动效
   ========================================================================== */

:root {
    --brand:       #063793;  /* Logo 主蓝 */
    --brand-deep:  #04286f;
    --brand-ink:   #021b4e;
    --brand-light: #2f66d0;
    --brand-tint:  #eef3fc;  /* 浅蓝底 */
    --accent:      #ff6600;  /* Logo 三角橙（小面积点缀） */
    --ink:         #101318;
    --ink-2:       #2c333d;
    --mute:        #5c6572;
    --faint:       #98a1ad;
    --line:        #e6e8ec;
    --line-dark:   #cdd2da;
    --paper:       #ffffff;
    --paper-2:     #f5f6f8;
    --dark:        #0d1117;
    --dark-2:      #161c25;
    --dark-line:   #2a323d;
    --dark-mute:   #9aa5b3;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --r:      14px;
    --r-sm:   8px;
    --shadow: 0 1px 2px rgba(16,19,24,0.05), 0 12px 32px -12px rgba(16,19,24,0.14);
    --shadow-lg: 0 2px 6px rgba(2,27,78,0.10), 0 28px 64px -20px rgba(2,27,78,0.28);
    --gutter: clamp(20px, 5vw, 56px);
    --header-h: 76px;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.75;
    font-size: 16.5px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
::selection { background: var(--brand); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.22; font-weight: 800; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}
.wrap > *, .cards > *, .hero-grid > *, .split > *, .contact-grid > *, .intro-grid > * { min-width: 0; }
.mono { font-family: var(--mono); }

/* ---------- 主导航 ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border-bottom: 1px solid rgba(230,232,236,0.9);
    transition: box-shadow .3s;
}
.header.scrolled { box-shadow: 0 8px 30px -12px rgba(2,27,78,0.18); }
.header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 38px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
    position: relative;
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
    border-radius: 999px;
    transition: color .2s, background .2s;
}
.nav a:hover { color: var(--brand); background: var(--brand-tint); }
.nav a.active { color: var(--brand); font-weight: 700; }
.nav-cta {
    margin-left: 14px;
    padding: 10px 22px !important;
    background: var(--brand);
    color: #fff !important;
    font-weight: 600;
    border-radius: 999px !important;
    transition: background .2s, transform .2s var(--ease) !important;
}
.nav-cta:hover { background: var(--brand-deep) !important; transform: translateY(-1px); }

/* 汉堡按钮（移动端） */
.burger {
    display: none;
    width: 44px; height: 44px;
    background: none; border: 1px solid var(--line-dark);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 5px;
}
.burger span {
    display: block; width: 20px; height: 2px;
    background: var(--ink);
    transition: transform .3s var(--ease), opacity .2s;
}
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端全屏菜单（深蓝） */
.mmenu {
    position: fixed; inset: 0;
    background: linear-gradient(165deg, var(--brand-ink), var(--brand) 70%, var(--brand-light));
    color: #fff;
    z-index: 800;
    padding: calc(var(--header-h) + 34px) var(--gutter) 40px;
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
    overflow-y: auto;
}
body.menu-open .mmenu {
    opacity: 1; visibility: visible;
    transform: translateY(0);
    transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.mmenu a {
    display: block;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.16);
    font-size: 26px; font-weight: 800; letter-spacing: -0.01em;
}
.mmenu a.active { color: #ffd8c2; }
.mmenu-meta {
    margin-top: auto;
    padding-top: 30px;
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    line-height: 2;
}
.mmenu-meta a { color: #fff; font-size: 13px; border: none; padding: 0; display: inline; }

/* ---------- 页头（深蓝大版式） ---------- */
.page-head {
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(47,102,208,0.55), transparent 60%),
        linear-gradient(160deg, var(--brand-ink) 0%, var(--brand-deep) 55%, var(--brand) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: clamp(72px, 10vw, 130px) 0 clamp(64px, 9vw, 110px);
}
.page-head .wrap { position: relative; }
.page-head h1 {
    font-size: clamp(40px, 6.4vw, 76px);
    letter-spacing: -0.025em;
    max-width: 16ch;
}
.page-head .sub {
    margin-top: 22px;
    color: rgba(255,255,255,0.78);
    font-size: clamp(15px, 1.7vw, 18.5px);
    max-width: 54ch;
    line-height: 1.8;
}

/* ---------- 章节通用 ---------- */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.section.tint { background: var(--brand-tint); }
.section.alt { background: var(--paper-2); }
.section.dark {
    background:
        radial-gradient(1000px 480px at 90% 0%, rgba(47,102,208,0.35), transparent 55%),
        linear-gradient(165deg, var(--dark) 0%, #101a2e 60%, var(--brand-ink) 100%);
    color: #fff;
}
.section.brand {
    background:
        radial-gradient(1100px 520px at 85% -10%, rgba(47,102,208,0.5), transparent 60%),
        linear-gradient(160deg, var(--brand-ink), var(--brand-deep) 55%, var(--brand));
    color: #fff;
}

.sec-head { margin-bottom: clamp(40px, 6vw, 68px); max-width: 780px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 {
    font-size: clamp(30px, 4.6vw, 54px);
    letter-spacing: -0.025em;
}
.sec-head .lead {
    margin-top: 16px;
    color: var(--mute);
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.8;
}
.dark .sec-head .lead, .brand .sec-head .lead { color: rgba(255,255,255,0.75); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 15.5px;
    border: 1px solid var(--brand);
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px rgba(6,55,147,0.45);
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-dark);
}
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: none; }
.btn.ghost.light { color: #fff; border-color: rgba(255,255,255,0.5); }
.btn.ghost.light:hover { background: #fff; color: var(--brand-deep); border-color: #fff; }
.btn.white { background: #fff; color: var(--brand-deep); border-color: #fff; }
.btn.white:hover { background: var(--brand-tint); border-color: var(--brand-tint); }

/* ---------- 数据条（大数字） ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(20px, 3vw, 40px);
}
.stat .num {
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--brand);
    line-height: 1.05;
}
.stat .num em { font-style: normal; color: var(--accent); font-size: 0.5em; margin-left: 3px; font-weight: 700; }
.stat .lbl { margin-top: 10px; font-size: 14px; color: var(--mute); line-height: 1.6; }
.dark .stat .num, .brand .stat .num { color: #fff; }
.dark .stat .lbl, .brand .stat .lbl { color: var(--dark-mute); }

/* ---------- 通用卡片 ---------- */
.cards { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: clamp(26px, 3vw, 38px);
    position: relative;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.card h3 { font-size: 20px; margin-bottom: 12px; letter-spacing: -0.01em; }
.card p { font-size: 14.5px; color: var(--mute); line-height: 1.8; }
.card .k {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-tint);
    border-radius: 999px;
    padding: 5px 13px;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}

/* ---------- 规格表 ---------- */
.spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    background: #fff;
}
.spec-table th, .spec-table td {
    padding: 15px 20px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: none; }
.spec-table thead th {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.spec-table tbody th { font-weight: 600; background: var(--paper-2); white-space: nowrap; }
.spec-table td.mono, .spec-table .mono { font-family: var(--mono); font-size: 13.5px; }
.spec-table tbody tr:hover td, .spec-table tbody tr:hover th { background: var(--brand-tint); }
.spec-note { font-size: 13px; color: var(--mute); margin-top: 14px; }

/* ---------- 列表（细线分割） ---------- */
.line-list li {
    display: flex;
    gap: 14px;
    padding: 15px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    color: var(--ink-2);
    align-items: baseline;
}
.line-list li::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 2px;
    background: var(--brand);
    flex-shrink: 0;
    transform: translateY(-1px);
}

/* ---------- 照片组件 ---------- */
.photo {
    border-radius: var(--r);
    overflow: hidden;
    background: var(--paper-2);
    box-shadow: var(--shadow);
}
.photo img { width: 100%; height: auto; }
.photo.cover img { aspect-ratio: 16 / 10; object-fit: cover; }
.photo .cap {
    padding: 12px 16px;
    font-size: 12.5px;
    color: var(--mute);
    background: #fff;
}
.photo-band {
    border-radius: clamp(16px, 2.5vw, 28px);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.photo-band img {
    width: 100%;
    height: clamp(280px, 42vw, 520px);
    object-fit: cover;
    transform: scale(1.08);
    transition: transform 1.6s var(--ease);
}
.photo-band.in img { transform: scale(1); }
.photo-band .cap {
    position: absolute; left: 18px; bottom: 18px;
    background: rgba(13,17,23,0.72);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.92);
    font-size: 12.5px;
    padding: 8px 16px;
    border-radius: 999px;
}
.photo-duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 28px); }

/* ---------- 页脚 ---------- */
.footer {
    background: var(--dark);
    color: var(--dark-mute);
    font-size: 14px;
}
.footer-main {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
    gap: clamp(28px, 4vw, 56px);
    padding: clamp(52px, 7vw, 84px) 0 44px;
}
.footer h5 {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
}
.footer-brand p { margin-top: 18px; line-height: 1.9; font-size: 13.5px; max-width: 40ch; }
.footer-logo {
    height: 44px;
    width: auto;
    background: #fff;
    padding: 8px 16px;
    border-radius: 10px;
}
.footer ul li { margin-bottom: 11px; }
.footer ul a { transition: color .2s; }
.footer ul a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 12px; line-height: 1.7; }
.footer-contact .k { color: var(--faint); font-size: 11px; letter-spacing: 0.06em; padding-top: 4px; flex-shrink: 0; width: 42px; font-weight: 700; }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid var(--dark-line);
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--faint);
}

/* ---------- 滚动动效（Apple 式） ---------- */
.reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

[data-parallax] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .photo-band img { transform: none; transition: none; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
    .nav { display: none; }
    .burger { display: flex; }
    .cards.c4 { grid-template-columns: repeat(2, 1fr); }
    .cards.c3 { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
    .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    body { font-size: 16px; }
    .cards.c4, .cards.c3, .cards.c2 { grid-template-columns: 1fr; }
    .photo-duo { grid-template-columns: 1fr; }
    .brand-logo { height: 32px; }
    .footer-main { grid-template-columns: 1fr; gap: 36px; }
    .footer-bottom { flex-direction: column; gap: 6px; }
}
