/* WisDefend 官网样式
   视觉语言延续产品控制台：深空蓝、青色高光、数据栅格、四角装饰线。
   不引入任何外部资源——纯静态托管、国内访问无外链拖累。 */

:root {
  --void:   #04070f;
  --bg2:    #0a1020;
  --panel:  rgba(14, 28, 56, .42);
  --line:   rgba(64, 158, 255, .16);
  --line2:  rgba(64, 158, 255, .42);
  --cyan:   #22d3ee;
  --blue:   #3b82f6;
  --amber:  #f59e0b;
  --red:    #ef4444;
  --green:  #22c55e;
  --text:   #dbe7fb;
  --dim:    #7089b4;
  --dimmer: #4d6389;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --edge: clamp(1.25rem, 5vw, 5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 全局氛围：顶部光晕 + 细网格，网格用遮罩淡出避免喧宾夺主 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(59,130,246,.22), transparent 62%),
    radial-gradient(ellipse 55% 45% at 88% 12%, rgba(34,211,238,.10), transparent 60%),
    linear-gradient(180deg, #04070f, #0a1020 55%, #04070f);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(64,158,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64,158,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 25%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 25%, transparent 85%);
}

a { color: inherit; text-decoration: none; }
img, canvas { display: block; max-width: 100%; }

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem var(--edge);
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(4,7,15,.92), rgba(4,7,15,.55));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .65rem; }
.brand svg { width: 26px; height: 26px; filter: drop-shadow(0 0 8px rgba(34,211,238,.6)); }
.brand b {
  font-size: 1.02rem; letter-spacing: -.01em; color: #f0f7ff; font-weight: 700;
}
.brand span {
  display: block; font-size: .66rem; letter-spacing: .3em; color: var(--dimmer);
  text-transform: uppercase; margin-top: -.2rem;
}
.nav .links { display: flex; gap: 1.6rem; margin-left: auto; font-size: .875rem; }
.nav .links a { color: var(--dim); transition: color .18s; }
.nav .links a:hover { color: var(--cyan); }
.nav .cta {
  padding: .45rem 1.1rem; border: 1px solid var(--line2); border-radius: 2px;
  color: var(--cyan); font-size: .84rem; letter-spacing: .04em;
  transition: .2s; white-space: nowrap;
}
.nav .cta:hover { background: rgba(34,211,238,.12); box-shadow: 0 0 20px rgba(34,211,238,.25); }
@media (max-width: 860px) { .nav .links { display: none; } }

/* ============ 通用版式 ============ */
section { padding: clamp(4rem, 9vw, 8rem) var(--edge); position: relative; }
.wrap { max-width: 76rem; margin: 0 auto; }

.eyebrow {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .38em;
  color: var(--cyan); text-transform: uppercase; margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .7rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.24; margin: 0 0 1rem;
  letter-spacing: -.025em; font-weight: 700; color: #f2f8ff;
}
.lede { font-size: clamp(.95rem, 1.5vw, 1.05rem); color: var(--dim); max-width: 42rem; }

/* 四角装饰：与控制台面板一致的语言 */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 11px; height: 11px; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }

/* ============ 首屏 ============ */
.hero {
  min-height: min(88vh, 780px);
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding-top: clamp(2.5rem, 6vw, 5rem);
}
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { order: -1; }
}

.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.1rem);
  line-height: 1.06; letter-spacing: -.04em; margin: 0 0 1.4rem; font-weight: 800;
  background: linear-gradient(168deg, #ffffff 12%, #a9d4ff 62%, #4a94e8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero h1 em {
  font-style: normal; display: block;
  background: linear-gradient(100deg, var(--cyan), #6fb4ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: clamp(1rem, 1.7vw, 1.12rem); color: var(--dim);
  max-width: 33rem; margin: 0 0 2.2rem;
}
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.7rem; border-radius: 2px; font-size: .92rem; font-weight: 600;
  letter-spacing: .02em; border: 1px solid transparent; cursor: pointer;
  transition: .2s; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(100deg, #1668d8, #22a7e0);
  color: #fff; box-shadow: 0 6px 26px rgba(24,110,214,.42);
}
.btn-primary:hover { filter: brightness(1.14); box-shadow: 0 8px 34px rgba(34,167,224,.55); }
.btn-ghost { border-color: var(--line2); color: var(--text); }
.btn-ghost:hover { background: rgba(59,130,246,.12); border-color: var(--cyan); }

.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 34rem; margin: 0 auto; width: 100%; }
#shield { width: 100%; height: 100%; }
.hero-legend {
  position: absolute; left: 0; bottom: 0; font-family: var(--mono);
  font-size: .68rem; color: var(--dimmer); line-height: 2;
}
.hero-legend i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: .5rem; vertical-align: middle;
}

/* 首屏指标条 */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.metrics div { background: var(--void); padding: 1.15rem 1.3rem; }
.metrics .n {
  font-family: var(--mono); font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 600;
  color: #eaf5ff; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.metrics .n small { font-size: .55em; color: var(--cyan); margin-left: .2rem; font-weight: 500; }
.metrics .k { font-size: .74rem; color: var(--dimmer); margin-top: .15rem; }

/* ============ 能力网格 ============ */
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.feat { padding: 1.6rem 1.5rem; transition: .25s; }
.feat:hover { transform: translateY(-3px); border-color: var(--line2); }
.feat .ic {
  width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 1rem;
  border: 1px solid var(--line2); color: var(--cyan);
}
.feat .ic svg { width: 17px; height: 17px; }
.feat h3 { font-size: 1rem; margin: 0 0 .5rem; color: #eaf4ff; font-weight: 650; letter-spacing: -.01em; }
.feat p { margin: 0; font-size: .84rem; color: var(--dim); line-height: 1.85; }

/* ============ 五级防御 ============ */
.levels-wrap { display: grid; grid-template-columns: 15rem 1fr; gap: 2.5rem; margin-top: 3rem; }
@media (max-width: 860px) { .levels-wrap { grid-template-columns: 1fr; gap: 1.5rem; } }

.level-rail { display: flex; flex-direction: column; gap: 2px; }
.level-rail button {
  display: flex; align-items: center; gap: .9rem; text-align: left;
  padding: .85rem 1rem; background: transparent; border: 1px solid var(--line);
  color: var(--dim); font: inherit; font-size: .88rem; cursor: pointer;
  transition: .18s; position: relative;
}
.level-rail button .num {
  font-family: var(--mono); font-size: 1.15rem; font-weight: 600; color: var(--dimmer);
  transition: .18s; min-width: 1.4rem;
}
.level-rail button:hover { border-color: var(--line2); color: var(--text); }
.level-rail button.on {
  background: linear-gradient(90deg, rgba(34,167,224,.18), transparent);
  border-color: var(--cyan); color: #fff;
}
.level-rail button.on .num { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }

.level-detail { padding: 2rem 2.1rem; min-height: 17rem; }
.level-detail h3 {
  font-size: 1.45rem; margin: 0 0 .3rem; color: #f2f8ff; letter-spacing: -.02em; font-weight: 700;
}
.level-detail .tagline { font-family: var(--mono); font-size: .74rem; color: var(--cyan); letter-spacing: .16em; margin-bottom: 1.3rem; }
.level-detail p { color: var(--dim); font-size: .92rem; margin: 0 0 1.4rem; }
.level-detail ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.level-detail li { font-size: .85rem; color: var(--text); display: flex; gap: .7rem; align-items: baseline; }
.level-detail li::before { content: "▸"; color: var(--cyan); flex: none; }
.level-detail li.off { color: var(--dimmer); }
.level-detail li.off::before { content: "·"; color: var(--dimmer); }

/* ============ 分层拦截示意 ============ */
.stack { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3rem; }
.stack-row {
  background: var(--void); padding: 1.4rem 1.6rem;
  display: grid; grid-template-columns: 8.5rem 1fr auto; gap: 1.5rem; align-items: center;
}
@media (max-width: 760px) { .stack-row { grid-template-columns: 1fr; gap: .5rem; } }
.stack-row .layer {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; color: var(--cyan);
}
.stack-row .what { font-size: .88rem; color: var(--text); }
.stack-row .what b { color: #fff; font-weight: 600; }
.stack-row .cost {
  font-family: var(--mono); font-size: .74rem; color: var(--dimmer); white-space: nowrap;
}
.stack-row:nth-child(1) .layer { color: var(--red); }
.stack-row:nth-child(2) .layer { color: var(--amber); }
.stack-row:nth-child(3) .layer { color: var(--cyan); }
.stack-row:nth-child(4) .layer { color: var(--green); }

/* ============ 能力边界 ============ */
.boundary {
  border-left: 2px solid var(--amber); padding: 1.6rem 1.9rem;
  background: linear-gradient(90deg, rgba(245,158,11,.07), transparent 70%);
  margin-top: 2.5rem;
}
.boundary h3 { margin: 0 0 .7rem; font-size: 1rem; color: #ffd48a; font-weight: 650; }
.boundary p { margin: 0; font-size: .87rem; color: var(--dim); line-height: 1.9; }
.boundary b { color: var(--text); font-weight: 600; }

/* ============ 下载 ============ */
.dl-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.5rem; margin-top: 3rem; }
@media (max-width: 860px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-card { padding: 1.9rem 1.8rem; display: flex; flex-direction: column; }
.dl-card .head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .3rem; }
.dl-card h3 { margin: 0; font-size: 1.15rem; color: #f2f8ff; font-weight: 700; letter-spacing: -.015em; }
.dl-card .ver {
  font-family: var(--mono); font-size: .82rem; color: var(--cyan);
  padding: .1rem .55rem; border: 1px solid var(--line2);
}
.dl-card .date { font-family: var(--mono); font-size: .72rem; color: var(--dimmer); margin-bottom: 1.2rem; }
.dl-card p { font-size: .85rem; color: var(--dim); margin: 0 0 1.5rem; flex: 1; }
.dl-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 1.3rem; }
.dl-list a, .dl-list div {
  background: var(--void); padding: .7rem .95rem; display: flex; align-items: center; gap: .8rem;
  font-family: var(--mono); font-size: .78rem; color: var(--text); transition: .16s;
}
.dl-list a:hover { background: rgba(34,167,224,.12); color: var(--cyan); }
.dl-list .sz { margin-left: auto; color: var(--dimmer); font-size: .72rem; }
.hash {
  font-family: var(--mono); font-size: .68rem; color: var(--dimmer);
  word-break: break-all; line-height: 1.7; margin-top: auto;
}
.hash b { color: var(--dim); font-weight: 500; }

/* 步骤 */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2.5rem; }
.steps > div { background: var(--void); padding: 1.4rem 1.6rem; }
.steps .no {
  font-family: var(--mono); font-size: .72rem; color: var(--cyan); letter-spacing: .2em; margin-bottom: .5rem;
}
.steps h4 { margin: 0 0 .45rem; font-size: .95rem; color: #eaf4ff; font-weight: 650; }
.steps p { margin: 0; font-size: .82rem; color: var(--dim); }
.steps code {
  display: block; margin-top: .7rem; padding: .55rem .75rem; background: rgba(4,10,22,.75);
  border: 1px solid var(--line); font-family: var(--mono); font-size: .74rem;
  color: #9fd8ff; overflow-x: auto; white-space: pre;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ============ 页脚 ============ */
footer {
  border-top: 1px solid var(--line); padding: 3rem var(--edge) 2.5rem;
  color: var(--dimmer); font-size: .8rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
footer a { color: var(--dim); }
footer a:hover { color: var(--cyan); }
footer .cols { display: flex; gap: 3.5rem; flex-wrap: wrap; }
footer .col { display: grid; gap: .5rem; }
footer .col strong { color: var(--text); font-size: .78rem; font-weight: 600; letter-spacing: .06em; }

/* 备案信息：横向排列，窄屏自动换行 */
.beian {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.4rem;
  font-size: .75rem; color: var(--dimmer);
}
.beian a { color: var(--dimmer); transition: color .16s; }
.beian a:hover { color: var(--cyan); }

/* ============ 进场动画 ============ */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.8,.3,1), transform .7s cubic-bezier(.2,.8,.3,1); }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
