/* ==========================================================
   零工之家官网统一样式
   纯静态站点（HTML5 + CSS3 + 原生 JS），无框架依赖
   ========================================================== */

:root {
  --primary: #0ea5a4;
  --primary-dark: #0b8a89;
  --primary-light: #e6f7f7;
  --accent: #f59e0b;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-gray: #f8fafc;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(14, 165, 164, 0.08);
  --shadow-lg: 0 12px 40px rgba(14, 165, 164, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:hover { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 164, 0.3);
}

.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover { background: var(--primary-light); }

.btn-lg { padding: 13px 34px; font-size: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, #e6f7f7 0%, #f0f9ff 45%, #ffffff 100%);
  padding: 96px 0 88px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 164, 0.12), transparent 70%);
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(14, 165, 164, 0.1);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

.hero h1 .highlight {
  color: var(--primary);
  background: linear-gradient(120deg, var(--primary), #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.hero-stats .stat b {
  display: block;
  font-size: 28px;
  color: var(--primary-dark);
}

.hero-stats .stat span { font-size: 13px; color: var(--text-light); }

.hero-visual {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
}

.hero-visual .mock {
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 15px;
  text-align: center;
  padding: 24px;
  border: 1px dashed #cbd5e1;
}

/* ---------- 区块通用 ---------- */
.section { padding: 84px 0; }

.section-gray { background: var(--bg-gray); }

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-head .tag {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: 34px;
  font-weight: 800;
  margin: 10px 0 14px;
}

.section-head p { color: var(--text-light); font-size: 16px; }

/* ---------- 三端角色卡片 ---------- */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.role-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.role-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.role-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  background: var(--primary-light);
}

.role-card h3 { font-size: 22px; margin-bottom: 6px; }

.role-card .sub { color: var(--primary-dark); font-size: 14px; font-weight: 600; margin-bottom: 16px; }

.role-card ul { list-style: none; }

.role-card ul li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--text-light);
  margin-bottom: 9px;
}

.role-card ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
}

/* ---------- 亮点 ---------- */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.highlight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow 0.25s ease;
}

.highlight-card:hover { box-shadow: var(--shadow); }

.highlight-card .icon { font-size: 30px; margin-bottom: 14px; }

.highlight-card h4 { font-size: 17px; margin-bottom: 8px; }

.highlight-card p { font-size: 14px; color: var(--text-light); }

/* ---------- 技术架构 ---------- */
.tech-box {
  background: #0f172a;
  border-radius: 16px;
  color: #e2e8f0;
  padding: 40px;
  overflow-x: auto;
}

.tech-box pre {
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.8;
  white-space: pre;
}

.tech-box .dim { color: #64748b; }

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.tech-tags span {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(14, 165, 164, 0.12);
  color: #5eead4;
  font-size: 13.5px;
  font-weight: 500;
}

/* ---------- 关于/联系 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-grid h3 { font-size: 22px; margin-bottom: 16px; }

.about-grid p { color: var(--text-light); margin-bottom: 14px; }

.contact-list { list-style: none; }

.contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--text-light);
}

.contact-list .k { color: var(--text); font-weight: 600; min-width: 72px; }

/* ---------- 页脚 ---------- */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 32px;
  font-size: 14px;
}

.footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer h5 { color: #e2e8f0; font-size: 15px; margin-bottom: 14px; }

.footer ul { list-style: none; }

.footer ul li { margin-bottom: 8px; }

.footer ul a { color: #94a3b8; }
.footer ul a:hover { color: #5eead4; }

.footer .brand-desc { margin-top: 12px; color: #64748b; font-size: 13.5px; }

.footer .bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.footer .bottom a { color: #94a3b8; }
.footer .bottom a:hover { color: #5eead4; }

/* ---------- 法律文档页（隐私政策/用户协议） ---------- */
.legal-hero {
  background: linear-gradient(160deg, #e6f7f7, #ffffff);
  padding: 56px 0 40px;
  text-align: center;
}

.legal-hero h1 { font-size: 32px; font-weight: 800; }

.legal-hero .meta { color: var(--text-light); font-size: 14px; margin-top: 10px; }

.legal-body { padding: 48px 0 80px; }

.legal-body .doc {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 56px;
  font-size: 15px;
  color: #374151;
}

.legal-body h2 {
  font-size: 20px;
  color: var(--text);
  margin: 32px 0 14px;
  padding-top: 8px;
}

.legal-body h2:first-child { margin-top: 0; }

.legal-body h3 { font-size: 16px; margin: 20px 0 10px; color: var(--text); }

.legal-body p { margin-bottom: 12px; }

.legal-body ul, .legal-body ol { margin: 0 0 12px 22px; }

.legal-body li { margin-bottom: 6px; }

.legal-body .toc {
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 30px;
  font-size: 14px;
}

.legal-body .toc a { display: inline-block; margin-right: 16px; margin-bottom: 4px; }

.legal-body table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14px; }

.legal-body table th, .legal-body table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.legal-body table th { background: var(--bg-gray); font-weight: 600; }

.legal-footer-note {
  max-width: 860px;
  margin: 24px auto 0;
  color: var(--text-light);
  font-size: 13.5px;
  text-align: center;
}

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 140px 24px; }

.error-page .code { font-size: 96px; font-weight: 800; color: var(--primary); line-height: 1; }

.error-page p { color: var(--text-light); margin: 18px 0 30px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero { padding: 64px 0 56px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 34px; }
  .roles-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; border-bottom: 1px solid var(--bg-gray); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-toggle { display: block; }
  .highlights-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 26px; }
  .legal-body .doc { padding: 28px 22px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
}
