/* ═══════════════════════════════════════════════════════
   拉闸官网 — 全局样式
   白色极简 · 大厂风范
   ═══════════════════════════════════════════════════════ */

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

:root {
    --white: #ffffff;
    --bg: #fafafa;
    --text: #1a1a1a;
    --text2: #555;
    --text3: #999;
    --border: #e5e5e5;
    --accent: #111;
    --accent-h: #333;
    --blue: #0071e3;
    --blue-h: #0077ed;
    --green: #34c759;
    --card-bg: #f5f5f7;
    --shadow: 0 2px 20px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.08);
    --radius: 16px;
    --max-w: 1200px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Display",
            "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ─── 导航栏 ─── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 56px;
    background: rgba(255,255,255,.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px;
    transition: background .3s;
}
.nav-logo {
    font-size: 20px; font-weight: 700; letter-spacing: 2px;
    color: var(--text);
}
.nav-links { display: flex; gap: 36px; }
.nav-links a {
    font-size: 14px; color: var(--text2); font-weight: 500;
    transition: color .2s;
    position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 50%; width: 0; height: 2px;
    background: var(--accent); transition: all .25s; transform: translateX(-50%);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { width: 100%; }

/* ─── Hero ─── */
.hero {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(0,113,227,.04) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--accent);
    color: var(--white);
    font-size: 12px; font-weight: 600; letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 28px;
    text-transform: uppercase;
}
.hero h1 {
    font-size: clamp(56px, 8vw, 96px);
    font-weight: 800;
    letter-spacing: 6px;
    line-height: 1.05;
    margin-bottom: 20px;
    color: var(--text);
}
.hero h1 span {
    background: linear-gradient(135deg, #1a1a1a 0%, #555 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--text2);
    max-width: 600px;
    margin: 0 auto 48px;
    font-weight: 400;
    line-height: 1.5;
}
.hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 42px;
    background: var(--accent);
    color: var(--white);
    font-size: 16px; font-weight: 600;
    border-radius: 50px;
    border: none;
    transition: all .3s;
    letter-spacing: 1px;
}
.hero-cta:hover { background: var(--accent-h); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hero-cta svg { width: 18px; height: 18px; }
.hero-scroll {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    animation: bounce 2s infinite;
}
.hero-scroll svg { width: 24px; height: 24px; color: var(--text3); }
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }

/* ─── 通用段落 ─── */
.section {
    padding: 120px 24px;
    max-width: var(--max-w);
    margin: 0 auto;
}
.section-full {
    padding: 120px 24px;
    background: var(--card-bg);
}
.section-full .section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.section-tag {
    font-size: 13px; font-weight: 600; color: var(--blue);
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.15;
}
.section-desc {
    font-size: 18px; color: var(--text2); max-width: 640px;
    line-height: 1.7;
}
.section-center { text-align: center; }
.section-center .section-desc { margin: 0 auto; }

/* ─── 特性卡片 ─── */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 64px;
}
.feat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 28px;
    box-shadow: var(--shadow);
    transition: all .35s;
    border: 1px solid transparent;
}
.feat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}
.feat-icon {
    width: 56px; height: 56px;
    background: var(--card-bg);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
    font-size: 24px;
}
.feat-card h3 {
    font-size: 18px; font-weight: 700; margin-bottom: 10px;
}
.feat-card p {
    font-size: 14px; color: var(--text2); line-height: 1.65;
}

/* ─── 交替图文 ─── */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-top: 80px;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split-visual {
    background: var(--card-bg);
    border-radius: var(--radius);
    aspect-ratio: 4/3;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}
.split-visual-inner {
    font-size: 64px; color: var(--text3); opacity: .3;
    font-weight: 800; letter-spacing: 4px;
}
.split-text h3 {
    font-size: 28px; font-weight: 700; margin-bottom: 16px; line-height: 1.3;
}
.split-text p {
    font-size: 16px; color: var(--text2); line-height: 1.8;
}
.split-text .tag {
    display: inline-block;
    padding: 4px 12px; background: rgba(0,113,227,.08); color: var(--blue);
    font-size: 12px; font-weight: 600; border-radius: 6px;
    margin-bottom: 16px;
}

/* ─── 数据统计条 ─── */
.stats-bar {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 24px;
    padding: 80px 24px;
    max-width: var(--max-w); margin: 0 auto;
    text-align: center;
}
.stat-item h4 {
    font-size: clamp(36px, 5vw, 56px); font-weight: 800;
    background: linear-gradient(135deg, #1a1a1a, #555);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-item p { font-size: 14px; color: var(--text3); margin-top: 6px; font-weight: 500; }

/* ─── CTA 横幅 ─── */
.cta-banner {
    text-align: center;
    padding: 100px 24px;
    background: var(--accent);
    color: var(--white);
}
.cta-banner h2 { font-size: clamp(28px,4vw,44px); font-weight: 700; margin-bottom: 16px; }
.cta-banner p { font-size: 17px; opacity: .7; margin-bottom: 40px; }
.cta-banner .btn-white {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 15px 40px;
    background: var(--white); color: var(--accent);
    font-size: 16px; font-weight: 600;
    border-radius: 50px; border: none;
    transition: all .3s;
}
.cta-banner .btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,255,255,.15); }

/* ─── Footer ─── */
.footer {
    padding: 48px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--white);
}
.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; }
.footer-links a { font-size: 14px; color: var(--text2); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text3); }

/* ─── 滚动动画 ─── */
.fade-up {
    opacity: 0; transform: translateY(40px);
    transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════
   下载中心
   ═══════════════════════════════════════════════════════ */
.dl-page {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 120px 24px 80px;
    background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
}
.dl-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 56px 48px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border);
}
.dl-card h2 {
    font-size: 28px; font-weight: 700; margin-bottom: 8px;
}
.dl-card .dl-sub {
    font-size: 15px; color: var(--text3); margin-bottom: 36px;
}
.dl-input-wrap {
    position: relative; margin-bottom: 16px;
}
.dl-input {
    width: 100%; padding: 14px 18px;
    font-size: 15px; font-family: 'SF Mono', 'Consolas', monospace;
    border: 2px solid var(--border);
    border-radius: 12px;
    outline: none;
    transition: border-color .25s;
    background: var(--bg);
    color: var(--text);
    letter-spacing: 1.5px;
    text-align: center;
}
.dl-input:focus { border-color: var(--accent); background: var(--white); }
.dl-input.error { border-color: #e53935; animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }
.dl-error {
    font-size: 13px; color: #e53935; margin-bottom: 16px;
    min-height: 20px;
}
.dl-btn {
    width: 100%; padding: 15px;
    background: var(--accent); color: var(--white);
    font-size: 16px; font-weight: 600;
    border: none; border-radius: 12px;
    transition: all .3s;
    letter-spacing: 1px;
}
.dl-btn:hover { background: var(--accent-h); }
.dl-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 编译进度区 */
.compile-area { display: none; width: 100%; margin-top: 32px; }
.compile-area.active { display: block; }
.compile-status {
    font-size: 14px; color: var(--text2); margin-bottom: 16px;
    text-align: left;
    min-height: 48px;
}
.compile-status .step {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 0;
    opacity: .4; transition: opacity .4s;
}
.compile-status .step.active { opacity: 1; color: var(--text); }
.compile-status .step.done { opacity: .6; color: var(--green); }
.compile-status .step .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text3);
    flex-shrink: 0;
}
.compile-status .step.active .dot {
    background: var(--blue);
    animation: pulse 1s infinite;
}
.compile-status .step.done .dot { background: var(--green); }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.3; } }

.progress-wrap {
    width: 100%; height: 6px;
    background: var(--border); border-radius: 3px;
    overflow: hidden; margin-bottom: 12px;
}
.progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--accent), #444);
    border-radius: 3px;
    transition: width .4s ease;
}
.progress-pct {
    font-size: 13px; color: var(--text3); font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* 编译完成 */
.compile-done { display: none; margin-top: 24px; }
.compile-done.active { display: block; }
.compile-done .check-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: var(--green); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    animation: popIn .4s ease;
}
@keyframes popIn { 0%{ transform:scale(0); } 60%{ transform:scale(1.15); } 100%{ transform:scale(1); } }
.compile-done .check-icon svg { width: 32px; height: 32px; color: #fff; }
.compile-done h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--green); }
.compile-done p { font-size: 14px; color: var(--text3); margin-bottom: 24px; }
.dl-btn-download {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 36px;
    background: var(--green); color: #fff;
    font-size: 16px; font-weight: 600;
    border: none; border-radius: 12px;
    transition: all .3s;
}
.dl-btn-download:hover { background: #2db84e; transform: translateY(-2px); }

/* ─── 响应式 ─── */
@media (max-width: 1024px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; gap: 40px; }
    .split.reverse { direction: ltr; }
    .stats-bar { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
    .nav { padding: 0 20px; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 13px; }
    .features { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr; }
    .dl-card { padding: 40px 24px; }
    .section { padding: 80px 20px; }
    .section-full { padding: 80px 20px; }
}
