/* ============================================================
   威海戴维网络科技有限公司 · 官方网站
   黑色科技风 / SCI-FI DARK THEME
   全局样式表 —— 新增页面直接引用本文件即可复用全部视觉体系
   ============================================================ */

:root {
  --bg-0: #030509;
  --bg-1: #070b14;
  --bg-2: #0b1220;
  --line: rgba(0, 229, 255, 0.14);
  --line-strong: rgba(0, 229, 255, 0.35);
  --cyan: #00e5ff;
  --violet: #7b5cff;
  --magenta: #ff4ecd;
  --text-0: #eaf6ff;
  --text-1: #9fb3c8;
  --text-2: #5c6b7f;
  --glow-cyan: 0 0 24px rgba(0, 229, 255, 0.35);
  --font-main: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0, 229, 255, 0.28); color: #fff; }

a { color: var(--cyan); text-decoration: none; transition: color .25s, text-shadow .25s; }
a:hover { text-shadow: var(--glow-cyan); }

/* ---------- 背景层：粒子画布 + 网格 + 扫描线 ---------- */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
}
.scanline {
  position: fixed; left: 0; right: 0; height: 120px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 229, 255, 0.05), transparent);
  animation: scan 9s linear infinite;
}
@keyframes scan {
  0% { top: -15%; }
  100% { top: 110%; }
}

.page-shell { position: relative; z-index: 2; }

/* ---------- 顶部导航 ---------- */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 64px);
  background: rgba(3, 5, 9, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
#site-header.scrolled {
  background: rgba(3, 5, 9, 0.88);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  font-family: var(--font-mono); font-weight: 700; font-size: 18px;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
  background: linear-gradient(135deg, rgba(0,229,255,.16), rgba(123,92,255,.16));
  text-shadow: var(--glow-cyan);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text .cn { font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.brand-text .en { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); letter-spacing: 3px; }

.nav-links { display: flex; gap: clamp(14px, 3vw, 36px); list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 2px;
  color: var(--text-1);
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--cyan);
  box-shadow: var(--glow-cyan);
  transition: width .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ---------- 通用容器 / 区块 ---------- */
.container { width: min(1120px, 92vw); margin: 0 auto; }
section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }

.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-index {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--cyan); letter-spacing: 4px;
  display: flex; align-items: center; gap: 14px;
}
.section-index::after {
  content: ""; height: 1px; width: 72px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.section-title {
  margin-top: 12px;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800; letter-spacing: 4px;
}
.section-title .en {
  display: block; margin-top: 6px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 400;
  color: var(--text-2); letter-spacing: 6px;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: var(--header-h);
  position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 70% 20%, rgba(123, 92, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 40% at 25% 75%, rgba(0, 229, 255, 0.12), transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 3px;
  color: var(--cyan);
  border: 1px solid var(--line-strong);
  padding: 7px 16px;
  background: rgba(0, 229, 255, 0.06);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: var(--glow-cyan);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.hero-title {
  margin: 28px 0 10px;
  font-size: clamp(34px, 6.4vw, 72px);
  font-weight: 900; letter-spacing: 6px; line-height: 1.2;
  background: linear-gradient(100deg, #ffffff 10%, var(--cyan) 45%, var(--violet) 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 26px rgba(0, 229, 255, 0.22));
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.6vw, 16px);
  color: var(--text-1); letter-spacing: 5px;
}
.hero-desc {
  margin-top: 26px; max-width: 640px;
  color: var(--text-1); font-size: clamp(14px, 1.5vw, 17px);
}
.hero-tags { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tags span {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px;
  color: var(--text-0);
  padding: 8px 18px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.6);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.hero-tags span:hover { border-color: var(--line-strong); box-shadow: var(--glow-cyan); transform: translateY(-2px); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px; color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint::after {
  content: ""; width: 1px; height: 42px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); } 100% { opacity: 0; } }

/* ---------- 公司介绍 ---------- */
.about-text p { color: var(--text-1); margin-bottom: 18px; text-align: justify; }
.about-text p strong { color: var(--text-0); }

/* ---------- 业务方向 ---------- */
.biz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.biz-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.72);
  padding: 30px 26px;
  transition: transform .35s, border-color .35s, box-shadow .35s;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.biz-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(0, 229, 255, 0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s;
}
.biz-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 12px 40px rgba(0, 229, 255, 0.12); }
.biz-card:hover::after { transform: translateX(100%); }
.biz-icon {
  width: 46px; height: 46px; margin-bottom: 18px;
  display: grid; place-items: center;
  color: var(--cyan);
  border: 1px solid var(--line-strong);
  background: rgba(0, 229, 255, 0.07);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.biz-icon svg { width: 22px; height: 22px; }
.biz-card h3 { font-size: 17px; letter-spacing: 2px; margin-bottom: 10px; }
.biz-card .code { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); letter-spacing: 2px; display: block; margin-bottom: 8px; }
.biz-card p { font-size: 13.5px; color: var(--text-1); }

/* ---------- 经营范围 ---------- */
.scope-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.scope-panel {
  border: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.78);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.scope-panel .panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.08), transparent);
}
.scope-panel.licensed .panel-head { background: linear-gradient(90deg, rgba(123, 92, 255, 0.12), transparent); }
.scope-panel .panel-head h3 { font-size: 16px; letter-spacing: 3px; }
.scope-panel .panel-head .tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  color: var(--cyan); border: 1px solid var(--line-strong); padding: 3px 10px;
}
.scope-panel.licensed .panel-head .tag { color: var(--violet); border-color: rgba(123, 92, 255, .5); }
.scope-panel .panel-body { padding: 26px; }
.scope-panel ul { list-style: none; }
.scope-panel li {
  position: relative; padding: 9px 0 9px 26px;
  color: var(--text-1); font-size: 14.5px;
  border-bottom: 1px dashed rgba(0, 229, 255, 0.1);
}
.scope-panel li:last-child { border-bottom: none; }
.scope-panel li::before {
  content: "▸"; position: absolute; left: 4px; color: var(--cyan);
}
.scope-panel.licensed li::before { color: var(--violet); }
.scope-note {
  margin-top: 14px; padding: 14px 18px;
  font-size: 12.5px; color: var(--text-2);
  border-left: 2px solid var(--line-strong);
  background: rgba(0, 229, 255, 0.04);
}

/* ---------- 滚动显现动画 ---------- */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- 页脚 / 合规信息 ---------- */
#site-footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.9), rgba(3, 5, 9, 1));
  padding: 56px 0 34px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 3px;
  color: var(--cyan); margin-bottom: 16px;
}
.footer-col p, .footer-col li { font-size: 13px; color: var(--text-2); }
.footer-col ul { list-style: none; }
.footer-col li { padding: 4px 0; }
.footer-brand .cn { font-size: 17px; font-weight: 800; letter-spacing: 3px; color: var(--text-0); }
.footer-brand .en { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: var(--text-2); margin-top: 4px; }
.footer-brand p { margin-top: 14px; }

.footer-compliance {
  margin-top: 44px; padding-top: 24px;
  border-top: 1px dashed rgba(0, 229, 255, 0.12);
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  justify-content: center; align-items: center;
  font-size: 12.5px; color: var(--text-2);
  font-family: var(--font-mono);
}
.footer-compliance a { color: var(--text-2); }
.footer-compliance a:hover { color: var(--cyan); }
.footer-compliance .sep { color: rgba(0, 229, 255, .3); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .biz-grid { grid-template-columns: repeat(2, 1fr); }
  .scope-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .biz-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-title { letter-spacing: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
