/* =========================================
   KERNEL: 变量、重置、滚动容器、加载器
   ========================================= */
:root {
    /* 核心变量 (配色/字体) - 必须全局定义以保持风格统一 */
    --bg-canvas: #f4f6f8;
    --bg-card: #ffffff;
    --bg-sidebar: #f8f9fa;
    --font-display: 'Space Grotesk', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --c-text-main: #1a1e23;
    --c-text-muted: #64748b;
    --c-accent-primary: #0f172a;
    --c-accent-secondary: #2ebcf5;
    --c-accent-tertiary: #6366f1;
    --r-card: 16px;
    --r-btn: 8px;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 50px -12px rgba(0, 0, 0, 0.12);
    --border-light: #e2e8f0;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
::selection { background: var(--c-accent-secondary); color: #000; }

body {
    background-color: var(--bg-canvas);
    color: var(--c-text-main);
    font-family: var(--font-display);
    height: 100vh;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.6;
}

/* 背景网格 */
.grid-layer {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

/* 装饰文字 */
.deco-text { position: fixed; font-family: var(--font-display); font-weight: 800; color: rgba(0, 0, 0, 0.02); z-index: -1; user-select: none; }
.dt-1 { top: 10%; right: -5%; font-size: 15rem; transform: rotate(90deg); }
.dt-2 { bottom: 5%; left: 5%; font-size: 1.2rem; letter-spacing: 0.5em; opacity: 0.5; }

/* 滚动容器逻辑 */
.snap-scroller { height: 100vh; width: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scroll-behavior: smooth; }
section { height: 100vh; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; align-items: center; position: relative; }
.container { width: 100%; max-width: 1400px; padding: 0 80px; display: flex; flex-direction: column; justify-content: center; height: 100%; }

/* 侧边导航 */
.line-nav { position: fixed; left: 40px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 20px; z-index: 100; }
.ln-item { width: 4px; height: 4px; background: #cbd5e1; border-radius: 50%; cursor: pointer; transition: all 0.3s; position: relative; }
.ln-item.active { height: 32px; background: var(--c-accent-primary); border-radius: 4px; }

/* 启动 Loader */
#boot-layer { position: fixed; inset: 0; background: #0f172a; z-index: 9999; color: #fff; font-family: var(--font-code); display: flex; flex-direction: column; justify-content: center; align-items: center; transition: transform 0.8s var(--ease-out-expo); }
.loader-track { width: 100%; height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; margin-bottom: 15px; }
.loader-bar { width: 0%; height: 100%; background: var(--c-accent-secondary); transition: width 0.05s linear; }
body.loaded #boot-layer { transform: translateY(-100%); }

/* 通用动效类 */
.reveal-up { opacity: 0; transform: translateY(40px); transition: 0.8s var(--ease-out-expo); }
section.active .reveal-up { opacity: 1; transform: translateY(0); }
.d-1 { transition-delay: 0.1s; } .d-2 { transition-delay: 0.2s; } .d-3 { transition-delay: 0.3s; }