﻿/* ============================================================
   zep4yrs — 明亮工程图纸设计系统
   暖白纸张 + 网格纸纹理 + 墨黑排版 + 项目独立标识色
   ============================================================ */

/* ---------- 字体 ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,700;9..144,900&family=JetBrains+Mono:wght@400;500;700&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

/* ---------- 设计令牌 ---------- */
:root {
  /* 纸张基底 */
  --paper: #f4efe4;
  --paper-2: #ece5d4;
  --paper-3: #e3dcc8;
  --ink: #1a1714;
  --ink-2: #3a332c;
  --ink-3: #6b6358;
  --ink-4: #9a9082;
  --line: #c9bfa9;
  --line-2: #d8cfba;

  /* 项目独立标识色(纸面友好) */
  --c-bluetidy: #1e5b8a;
  --c-lannook: #9c4a1e;
  --c-ctf: #3a6b2a;
  --c-autopen: #6b2a5e;
  --c-alertzero: #8a1c28;
  --c-cryptovis: #1a6b7a;
  --c-structvis: #1b4965;

  /* 功能色 */
  --accent: #b8341a;
  --warn: #8a6d1e;

  /* 排版 */
  --font-display: 'Fraunces', 'Noto Sans SC', Georgia, serif;
  --font-body: 'Noto Sans SC', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* 节奏 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* 工程感 */
  --border: 1.5px solid var(--ink);
  --border-2: 1px solid var(--line);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 2px 2px 0 var(--line);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  position: relative;
  overflow-x: hidden;
}

/* 网格纸纹理 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,23,20,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,23,20,0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

/* 纸张噪点 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
}

main, header, footer, section { position: relative; z-index: 3; }

a { color: inherit; text-decoration: none; }

/* ---------- 排版 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-variation-settings: 'opsz' 144;
}

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* ---------- 容器 ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-6); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 var(--space-6); }

/* ---------- 顶部导航 ---------- */
.nav {
  border-bottom: var(--border);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(244,239,228,0.92);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  min-width: 36px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.brand-mark .b1 {
  color: #5b9bd5;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.brand-mark .b2 {
  color: #e89046;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.nav-links a {
  position: relative;
  padding: var(--space-1) 0;
  transition: color .2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: currentColor;
  transition: width .25s ease;
}

.nav-links a:hover::after { width: 100%; }

.nav-back {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-back::before { content: '←'; transition: transform .2s; }
.nav-back:hover::before { transform: translateX(-4px); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: var(--space-3) var(--space-5);
  border: var(--border);
  background: var(--paper);
  color: var(--ink);
  transition: all .15s ease;
  cursor: pointer;
  position: relative;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover { background: var(--accent); border-color: var(--accent); }

.btn::after { content: '→'; transition: transform .2s; }
.btn:hover::after { transform: translateX(3px); }

/* ---------- 卡片/规格块 ---------- */
.spec-card {
  border: var(--border);
  background: var(--paper);
  padding: var(--space-5);
  position: relative;
}

.spec-card::before {
  content: attr(data-tag);
  position: absolute;
  top: -1px; left: var(--space-5);
  background: var(--paper);
  padding: 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  transform: translateY(-50%);
}

/* ---------- 项目标识色覆盖 ---------- */
.theme-bluetidy { --c: var(--c-bluetidy); }
.theme-lannook { --c: var(--c-lannook); }
.theme-ctf { --c: var(--c-ctf); }
.theme-autopen { --c: var(--c-autopen); }
.theme-alertzero { --c: var(--c-alertzero); }
.theme-cryptovis { --c: var(--c-cryptovis); }
.theme-structvis { --c: var(--c-structvis); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: var(--border);
  margin-top: var(--space-9);
  padding: var(--space-7) 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-3);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ---------- 动画 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes draw {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

.rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.rise-1 { animation-delay: .1s; }
.rise-2 { animation-delay: .2s; }
.rise-3 { animation-delay: .3s; }
.rise-4 { animation-delay: .4s; }
.rise-5 { animation-delay: .5s; }

/* ---------- 选区 ---------- */
::selection { background: var(--ink); color: var(--paper); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border: 2px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav-links { gap: var(--space-3); font-size: 0.75rem; }
  .wrap, .wrap-narrow { padding: 0 var(--space-4); }
  .nav-inner { padding: var(--space-3) var(--space-4); }
}

@media (max-width: 480px) {
  .nav-links { gap: var(--space-2); font-size: 0.7rem; }
  .nav-inner { flex-wrap: wrap; gap: var(--space-2); }
}
