/* ==========================================================================
   PHP 安全服务官网 · 风格致敬 php.net 官方
   紫色系头部 / 大象元素 / 工程感排版
   ========================================================================== */

:root {
  --php-950: #23263f;
  --php-800: #333a63;
  --php-700: #414a80;
  --php-600: #4f5b95;   /* php 官方象紫 */
  --php-500: #6a76b4;
  --php-400: #8892bf;   /* 经典 elephpant 蓝紫 */
  --php-300: #aeb7dd;
  --php-100: #e6e9f5;
  --link: #4b6bcc;
  --ink: #24273a;
  --muted: #6d7288;
  --bg: #eef0f6;
  --card: #ffffff;
  --line: #dfe3ef;
  --ok: #2f9e6e;
  --err: #cf4450;
  --warn: #e0a437;
  --mono: "Cascadia Mono", "JetBrains Mono", "SF Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
  --shadow: 0 10px 30px rgba(53, 61, 108, 0.12);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; /* 移动端去除点击灰色闪烁 */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh; /* 手机浏览器地址栏收展时不再跳动/露底 */
  overflow-x: hidden; /* 移动端防御：装饰元素/跑马灯不再撑出横向滚动条 */
  overflow-x: clip;   /* 支持的新浏览器：不触发滚动容器副作用 */
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
ul { list-style: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------- 顶栏 ---------- */
.masthead {
  background:
    radial-gradient(1100px 340px at 78% -80px, rgba(136, 146, 191, .55), transparent 60%),
    linear-gradient(118deg, var(--php-950) 0%, var(--php-700) 52%, var(--php-500) 130%);
  color: #fff;
  position: relative;
  z-index: 60; /* 高于 Hero，保证移动端展开的下拉菜单绘制在正文之上、可点击 */
  overflow: hidden;
}

.masthead::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 96px);
  pointer-events: none;
}

.mast-inner {
  display: flex; align-items: center; gap: 28px;
  padding-top: 20px; padding-bottom: 22px; /* 只设上下，左右沿用 .wrap 的 22px，手机端不再贴边 */
  position: relative; z-index: 2;
}

.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.brand:hover { text-decoration: none; }

/* php 椭圆徽标（致敬官方 logo） */
.php-oval {
  position: relative;
  width: 88px; height: 46px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 30% 25%, #f9c24a 0%, #eab33f 18%, #a6b0dd 45%, #8892bf 72%, #6f7cb6 100%);
  box-shadow: inset 0 -4px 10px rgba(35, 38, 63, .35), 0 3px 10px rgba(0, 0, 0, .25);
  display: grid; place-items: center;
  flex: none;
}
.php-oval::before {
  content: "";
  position: absolute; left: 9px; top: 5px;
  width: 34px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .75);
  transform: rotate(-14deg);
  filter: blur(.4px);
}
.php-oval span {
  font-weight: 900; font-style: italic;
  font-size: 25px; letter-spacing: -1px;
  color: #4a4a86;
  text-shadow: 1px 1px 0 rgba(255,255,255,.45);
  z-index: 1;
}

.brand-text b { display: block; font-size: 19px; font-weight: 900; letter-spacing: .5px; line-height: 1.3; }
.brand-text small { display: block; font-size: 11.5px; color: var(--php-300); letter-spacing: 2.5px; font-family: var(--mono); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a {
  color: #e7eaf8; padding: 8px 14px; border-radius: 8px;
  font-size: 15px; transition: .18s;
}
.nav a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.nav a.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; user-select: none;
  font-family: inherit; font-size: 15.5px; font-weight: 700;
  padding: 11px 22px; border-radius: 10px;
  transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-cta {
  background: linear-gradient(135deg, #f2b64c, #e8983a);
  color: #3a2b08;
  box-shadow: 0 6px 18px rgba(232, 152, 58, .35);
}
.btn-cta:hover { box-shadow: 0 9px 24px rgba(232, 152, 58, .5); transform: translateY(-2px); }
.btn-primary { background: var(--php-600); color: #fff; }
.btn-primary:hover { background: var(--php-500); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79, 91, 149, .35); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-outline { background: #fff; color: var(--php-600); border: 1.5px solid var(--php-400); }
.btn-outline:hover { background: var(--php-100); }
.btn-lg { padding: 14px 30px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

.nav .btn { margin-left: 10px; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--php-950) 0%, var(--php-800) 46%, var(--php-600) 118%);
  color: #fff; position: relative; overflow: hidden;
}
.hero-elephant {
  position: absolute; right: -60px; bottom: -40px;
  width: 560px; height: 407px; opacity: .07; color: #fff; pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(720px 400px at 25% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(720px 400px at 25% 40%, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px;
  padding-top: 74px; padding-bottom: 84px; /* 只设上下，左右沿用 .wrap 的 22px */
  align-items: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 3px;
  color: #f2b64c; text-transform: uppercase; margin-bottom: 16px;
}
.eyebrow::before { content: "<?php "; color: var(--php-300); }
.eyebrow::after { content: " ?>"; color: var(--php-300); }

.hero h1 {
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.22; font-weight: 900; letter-spacing: .5px;
  margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: #f2b64c; }
.hero .lead { color: #ccd3ee; font-size: 17px; max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-badges { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.hero-badges span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--php-100);
  font-family: var(--mono);
}
.hero-badges span::before { content: "✓"; color: #9be2b8; font-weight: 700; }

/* 扫描终端卡片 */
.terminal {
  background: #191c30;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: rotate(.6deg);
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: #22263f;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #4b537a; }
.terminal-bar i:nth-child(1) { background: #e5605c; }
.terminal-bar i:nth-child(2) { background: #e0a437; }
.terminal-bar i:nth-child(3) { background: #4bbf7a; }
.terminal-bar b { margin-left: 8px; font-size: 12px; color: #7d87b3; font-family: var(--mono); font-weight: 400; }
.terminal-body {
  font-family: var(--mono); font-size: 12.8px; line-height: 1.85;
  padding: 16px 18px 20px; min-height: 246px; color: #c8d0f0;
}
.terminal-body .cmd { color: #f2b64c; }
.terminal-body .ok  { color: #83d8a4; }
.terminal-body .warn{ color: #ecc06d; }
.terminal-body .bad { color: #ef7b76; }
.terminal-body .dim { color: #66719c; }
.terminal-body .cur { display: inline-block; width: 8px; height: 15px; background: #f2b64c; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 通用区块 ---------- */
.section { padding: 78px 0; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-head .kicker {
  font-family: var(--mono); color: var(--php-500);
  font-size: 13px; letter-spacing: 3px; margin-bottom: 8px;
}
.section-head h2 { font-size: 31px; font-weight: 900; color: var(--php-800); }
.section-head p { color: var(--muted); max-width: 38em; margin: 10px auto 0; }

/* 服务卡片 */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.svc-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 26px 22px;
  position: relative; overflow: hidden;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.svc-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--php-400), var(--php-600));
  transform: scaleY(0); transform-origin: top; transition: .25s;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--php-300); }
.svc-card:hover::before { transform: scaleY(1); }
.svc-ico {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, var(--php-100), #fff);
  border: 1px solid var(--php-300);
  display: grid; place-items: center; margin-bottom: 16px; color: var(--php-600);
}
.svc-card h3 { font-size: 19.5px; color: var(--php-800); margin-bottom: 4px; }
.svc-card .tagline { font-size: 13px; color: var(--php-500); font-family: var(--mono); margin-bottom: 10px; }
.svc-card p.desc { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.svc-card ul li {
  font-size: 14px; color: #4b5068; padding: 3px 0 3px 22px; position: relative;
}
.svc-card ul li::before {
  content: "›"; position: absolute; left: 6px; top: 3px;
  color: var(--warn); font-weight: 900;
}
.svc-foot { display: flex; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }

/* 流程 */
.flow { background: #fff; border-block: 1px solid var(--line); }
.flow-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.flow-step {
  text-align: center; padding: 8px 10px 0; position: relative;
}
.flow-step .num {
  counter-increment: step;
  width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--php-300), var(--php-600));
  color: #fff; font-weight: 900; font-size: 19px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(79, 91, 149, .35);
  position: relative; z-index: 2;
}
.flow-step .num::after { content: counter(step); }
.flow-step:not(:last-child)::before {
  content: ""; position: absolute; top: 27px; left: calc(50% + 34px);
  width: calc(100% - 52px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--php-300) 0 8px, transparent 8px 14px);
}
.flow-step h4 { font-size: 16.5px; color: var(--php-800); margin-bottom: 6px; }
.flow-step p { font-size: 13.5px; color: var(--muted); }

/* 数据带 */
.stats { background: linear-gradient(120deg, var(--php-800), var(--php-600)); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat b { font-size: 42px; font-weight: 900; font-family: var(--mono); letter-spacing: -1px; display: inline-block; white-space: nowrap; }
.stat b sup { font-size: 20px; color: #f2b64c; }
.stat b .counter { display: inline; }
.stat > span { display: block; font-size: 14px; color: var(--php-100); margin-top: 2px; }

/* 为什么选择 */
.why-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.why-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 15px 18px 15px 56px; margin-bottom: 12px; position: relative;
  font-size: 14.8px; transition: .2s;
}
.why-list li:hover { border-color: var(--php-400); transform: translateX(4px); }
.why-list li b { color: var(--php-700); display: block; margin-bottom: 2px; font-size: 16px; }
.why-list li i {
  position: absolute; left: 15px; top: 15px; font-style: normal;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--php-100); color: var(--php-600);
  display: grid; place-items: center; font-weight: 900; font-family: var(--mono); font-size: 14px;
}
.why-visual {
  background: #191c30; border-radius: 14px; padding: 26px 28px;
  font-family: var(--mono); font-size: 13.5px; line-height: 2.05; color: #c8d0f0;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.why-visual::after {
  content: "🐘"; position: absolute; right: 12px; bottom: 4px; font-size: 56px; opacity: .12;
}
.why-visual .kw { color: #c792ea; }
.why-visual .fn { color: #82aaff; }
.why-visual .str { color: #c3e88d; }
.why-visual .vm { color: #f2b64c; }
.why-visual .cm { color: #66719c; }
.why-visual .ln { color: #4a527a; user-select: none; margin-right: 14px; }

/* FAQ */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--php-800);
  list-style: none; position: relative; padding-right: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--php-500); transition: .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .faq-body { padding: 0 20px 16px; color: var(--muted); font-size: 14.5px; }

/* ---------- 服务对象矩阵 ---------- */
.tgt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tgt-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tgt-tile::after {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--c); transform: scaleX(0); transform-origin: left; transition: .25s;
}
.tgt-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 45%, #fff); }
.tgt-tile:hover::after { transform: scaleX(1); }
.tgt-logo {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: 12px;
  background: color-mix(in srgb, var(--c) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 38%, #fff);
  color: var(--c);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 23px; font-weight: 700; font-style: italic;
}
.tgt-tile h3 { font-size: 16.5px; color: var(--ink); letter-spacing: .2px; }
.tgt-cat { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin: 2px 0 8px; }
.tgt-tile p { font-size: 12.8px; color: var(--muted); flex: 1; margin-bottom: 12px; }

/* ---------- 漏洞警示录 ---------- */
.vuln-sec {
  padding: 78px 0 64px;
  background:
    radial-gradient(760px 300px at 82% 0%, rgba(207, 68, 80, .12), transparent 60%),
    linear-gradient(165deg, #1b1e33 0%, #23263f 55%, #2c2f4d 100%);
  color: #fff;
}
.vuln-list { max-width: 900px; margin: 0 auto; }
.vuln-item {
  display: grid; grid-template-columns: 76px 1fr; gap: 18px;
  padding: 16px 18px 16px 16px; margin-bottom: 12px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09);
  border-left: 4px solid var(--sv, #8892bf); border-radius: 10px;
  transition: background .2s, transform .2s;
}
.vuln-item:hover { background: rgba(255, 255, 255, .08); transform: translateX(4px); }
.vuln-item.sev-critical { --sv: #ef5b62; }
.vuln-item.sev-high     { --sv: #e0a437; }
.vuln-item.sev-medium   { --sv: #6a9ce8; }
.vuln-year {
  font-family: var(--mono); font-size: 24px; font-weight: 700; color: #ecc06d;
  display: flex; align-items: center; justify-content: center;
}
.vuln-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.vuln-app {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(136, 146, 191, .22); border: 1px solid rgba(174, 183, 221, .4); color: #cdd4f2;
}
.vuln-sev { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 5px; }
.sev-critical .vuln-sev { background: rgba(239, 91, 98, .18); color: #ff8f94; border: 1px solid rgba(239, 91, 98, .45); }
.sev-high .vuln-sev     { background: rgba(224, 164, 55, .16); color: #ecc06d; border: 1px solid rgba(224, 164, 55, .4); }
.sev-medium .vuln-sev   { background: rgba(106, 156, 232, .16); color: #9dc0f5; border: 1px solid rgba(106, 156, 232, .4); }
.vuln-cve { font-family: var(--mono); font-size: 12px; color: #8d96c4; }
.vuln-main h3 { font-size: 16px; color: #fff; margin-bottom: 4px; }
.vuln-impact { font-size: 13.2px; color: #b9bfd9; }
.vuln-guard { margin-top: 7px; font-size: 12.8px; color: #a6c8b4; }
.vuln-guard b {
  font-style: normal; margin-right: 8px; padding: 2px 7px; border-radius: 4px;
  background: rgba(75, 191, 122, .16); border: 1px solid rgba(75, 191, 122, .4); color: #83d8a4;
  font-size: 11.5px; font-weight: 700;
}
.vuln-tip { text-align: center; margin-top: 26px; color: #aab1d4; font-size: 14.5px; }
.linklike {
  background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  color: #f2b64c; text-decoration: underline dotted; padding: 0 4px;
}
.linklike:hover { color: #ffd089; }

/* CTA 横幅 */
.cta-band {
  background:
    radial-gradient(500px 200px at 88% 0%, rgba(242, 182, 76, .18), transparent 60%),
    linear-gradient(115deg, var(--php-950), var(--php-600));
  color: #fff; text-align: center; padding: 62px 0;
}
.cta-band h2 { font-size: 29px; font-weight: 900; margin-bottom: 10px; }
.cta-band p { color: var(--php-100); margin-bottom: 26px; }

/* ---------- 内容页（服务详情 / 咨询页） ---------- */
.page-head {
  background: linear-gradient(115deg, var(--php-950), var(--php-700) 70%, var(--php-500));
  color: #fff; padding: 42px 0 46px; position: relative; overflow: hidden;
}
.page-head .wrap { position: relative; z-index: 2; }
.page-head::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255,255,255,.035) 46px 47px);
}
.crumb { font-size: 13px; font-family: var(--mono); color: var(--php-300); margin-bottom: 14px; }
.crumb a { color: var(--php-300); }
.crumb a:hover { color: #fff; }
.page-head h1 { font-size: 33px; font-weight: 900; }
.page-head .sub { color: #ccd3ee; margin-top: 8px; max-width: 46em; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; padding: 46px 0 70px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 32px;
}
.panel h2 { font-size: 21px; color: var(--php-800); margin: 26px 0 12px; }
.panel h2:first-child { margin-top: 0; }
.side-card { position: sticky; top: 20px; }
.side-card .panel { padding: 24px; }
.side-card h3 { color: var(--php-800); font-size: 17px; margin-bottom: 10px; }
.side-list li a {
  display: block; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; margin-bottom: 8px; font-size: 14.5px; color: var(--ink);
  transition: .18s;
}
.side-list li a:hover { border-color: var(--php-400); background: var(--php-100); text-decoration: none; transform: translateX(3px); }
.side-list li a.cur { background: var(--php-600); color: #fff; border-color: var(--php-600); font-weight: 700; }

.check-list li {
  padding: 9px 0 9px 34px; position: relative; border-bottom: 1px dashed var(--line);
  color: #3c4056; font-size: 15.2px;
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "✓"; position: absolute; left: 2px; top: 9px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--php-100); color: var(--php-600);
  font-weight: 900; font-size: 13px; display: grid; place-items: center;
}

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { margin-bottom: 2px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 14px; font-weight: 700; color: var(--php-800); margin-bottom: 6px; }
.field label .req { color: var(--err); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 9px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #fbfbfe; transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--php-500);
  box-shadow: 0 0 0 3px rgba(106, 118, 180, .18);
  background: #fff;
}
.field textarea { min-height: 108px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .err-msg { font-size: 12.5px; color: var(--err); margin-top: 4px; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); }
.field.invalid .err-msg { display: block; }
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.form-actions .privacy { font-size: 12.5px; color: var(--muted); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(26, 29, 48, .6); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(620px, 100%); max-height: 92vh; overflow: auto;
  background: #fff; border-radius: 16px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .4);
  transform: translateY(22px) scale(.97); transition: transform .25s;
}
.modal-mask.open .modal { transform: none; }
.modal-head {
  background: linear-gradient(115deg, var(--php-800), var(--php-600));
  color: #fff; padding: 20px 26px; border-radius: 16px 16px 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-head h3 { font-size: 19px; }
.modal-head small { color: var(--php-100); font-size: 12.5px; }
.modal-close {
  background: rgba(255,255,255,.12); border: 0; color: #fff; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1;
  transition: .15s; flex: none;
}
.modal-close:hover { background: rgba(255,255,255,.3); }
.modal-body { padding: 26px; }

/* ---------- Toast / flash ---------- */
.toast-zone { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 10px; width: min(460px, calc(100vw - 30px)); }
.toast {
  padding: 13px 18px; border-radius: 10px; color: #fff; font-size: 14.5px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  animation: toast-in .3s cubic-bezier(.2, .9, .3, 1.2);
  display: flex; gap: 10px; align-items: flex-start;
}
.toast.ok  { background: linear-gradient(120deg, #2f9e6e, #37b27d); }
.toast.bad { background: linear-gradient(120deg, #b83e49, #cf4450); }
.toast i { font-style: normal; font-weight: 900; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px); } }

.flash-banner {
  border-radius: 10px; padding: 13px 18px; font-size: 14.5px; margin-bottom: 20px;
  display: flex; gap: 10px; align-items: center;
}
.flash-banner.ok  { background: #e5f6ee; color: #1e6f4c; border: 1px solid #b9e3cd; }
.flash-banner.bad { background: #fbeaea; color: #9c3238; border: 1px solid #f0c3c6; }

/* ---------- 客户案例跑马灯 ---------- */
.cases-sec { padding-bottom: 64px; }
.cases-viewport {
  position: relative; overflow: hidden;
  padding: 10px 0 22px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.cases-track {
  display: flex; width: max-content;
  animation: marquee-left 72s linear infinite;
}
.cases-viewport:hover .cases-track { animation-play-state: paused; }
@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.cases-group { display: flex; gap: 20px; padding-right: 20px; }
.case-card {
  flex: none; width: 330px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 18px;
  display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--php-300); }
.case-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.chip {
  font-size: 12px; font-weight: 700; line-height: 1;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.chip-hardening { background: #e8f5ef; color: #1e6f4c; border: 1px solid #bfe3cf; }
.chip-upgrade   { background: #fdf3e0; color: #9a6b12; border: 1px solid #f3ddb0; }
.chip-scan      { background: #eceefb; color: #414a80; border: 1px solid #ccd2ef; }
.chip-dev       { background: #fbeaec; color: #9c3238; border: 1px solid #f0c8cc; }
.case-industry { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.case-card h3 { font-size: 16.5px; color: var(--php-800); line-height: 1.45; margin-bottom: 8px; }
.case-card p { font-size: 13.3px; color: var(--muted); flex: 1; }
.case-result {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 13px; font-weight: 700; color: var(--ok);
}

/* ---------- 页脚 ---------- */
.foot {
  background: var(--php-950); color: #aab1d4;
  padding: 52px 0 0; margin-top: auto; flex: 1 0 auto;
  font-size: 14px;
}
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 34px; }
.foot h4 { color: #fff; font-size: 15.5px; margin-bottom: 14px; letter-spacing: 1px; }
.foot li { margin-bottom: 8px; }
.foot a { color: #aab1d4; }
.foot a:hover { color: #fff; }
.foot .about p { margin-top: 10px; max-width: 26em; }
.foot-contact li { display: flex; gap: 9px; }
.foot-contact b { color: #fff; font-weight: 400; }
.foot-bar {
  margin-top: 42px; border-top: 1px solid rgba(255,255,255,.09);
  padding: 18px 0; font-size: 12.8px; color: #7d84aa;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.foot-bar .mono { font-family: var(--mono); }

/* ---------- 进场动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.svc-grid .svc-card:nth-child(2) { transition-delay: .08s; }
.svc-grid .svc-card:nth-child(3) { transition-delay: .16s; }
.svc-grid .svc-card:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  /* 案例跑马灯不受系统“减少动画”影响，保持自动滚动 */
  .cases-track { animation: marquee-left 72s linear infinite !important; }
  .cases-group[aria-hidden] { display: flex; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 54px; padding-bottom: 62px; }
  .terminal { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .svc-grid { gap: 18px; } /* 平板仍保持两列，减少竖向长度 */
  .tgt-grid { grid-template-columns: repeat(2, 1fr); }
  .why-visual { display: none; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .flow-step::before { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  /* 修复：顶栏 overflow:hidden 会把展开的移动端菜单裁掉，须放开 */
  .masthead { overflow: visible; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
    background: var(--php-800); flex-direction: column; align-items: stretch;
    padding: 12px 18px 18px; display: none;
    box-shadow: 0 18px 30px rgba(23, 26, 48, .35);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 16px; } /* 加大触控点击区域 */
  .nav .btn { margin: 8px 0 0; }
  .nav-toggle {
    display: grid; place-items: center;
    margin-left: auto; background: rgba(255,255,255,.12); border: 0;
    width: 42px; height: 42px; border-radius: 9px; cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 20px; height: 2px; background: #fff; position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after  { position: absolute; top: 6px; width: 14px; }
  .mast-inner { position: relative; }
  .nav-toggle { touch-action: manipulation; } /* 消除移动端约 300ms 点击延迟 */
  .svc-grid { grid-template-columns: 1fr; } /* 手机单列 */
  .form-grid { grid-template-columns: 1fr; }
  .tgt-grid { grid-template-columns: 1fr; }
  .vuln-item { grid-template-columns: 54px 1fr; gap: 12px; }
  .vuln-year { font-size: 18px; }
  /* 案例区触屏改原生横滑（跑马灯依赖 hover 暂停，手机上无意义） */
  .cases-viewport { mask-image: none; -webkit-mask-image: none; }
  .cases-track {
    animation: none !important; width: auto;
    overflow-x: auto; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; padding-bottom: 8px;
  }
  .cases-group[aria-hidden="true"] { display: none; }
  .cases-track::-webkit-scrollbar { display: none; }
  .case-card { scroll-snap-align: start; }
  /* 防 iOS 在聚焦输入框时自动放大整页（字体须 ≥16px） */
  .field input, .field select, .field textarea { font-size: 16px; padding: 12px 14px; }
  .brand-text small { display: none; }
}

/* ---------- 小屏手机（≤560px）整体压缩密度，避免横向溢出与字号过大 ---------- */
@media (max-width: 560px) {
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: 24px; }
  .section-head p { font-size: 14.5px; }

  /* Hero：限制装饰与留白 */
  .hero-inner { padding-top: 42px; padding-bottom: 52px; gap: 30px; }
  .hero .lead { font-size: 15.5px; }
  .hero-badges { gap: 12px 18px; }
  .hero-elephant { width: 340px; right: -90px; }

  /* 内容面板与页头收窄 */
  .page-head { padding: 30px 0 34px; }
  .page-head h1 { font-size: 26px; }
  .split { padding: 30px 0 52px; gap: 20px; }
  .panel { padding: 20px 16px; }
  .panel h2 { font-size: 18.5px; }

  /* 服务/数据/流程单列，数字缩放防换行 */
  .svc-card { padding: 20px 18px 18px; }
  .stats-grid { gap: 22px 10px; }
  .stat b { font-size: 30px; }
  .stat b sup { font-size: 15px; }

  /* 案例卡片跟随屏宽，不再固定 330px 撑破小屏 */
  .case-card { width: min(330px, calc(100vw - 66px)); }

  /* Hero 主标题与 CTA 按钮 */
  .hero h1 { font-size: clamp(26px, 7.2vw, 34px); }
  .hero-actions .btn { flex: 1 1 auto; min-height: 46px; } /* 拇指友好：按钮至少 46px 高 */

  /* 模态框与表单 */
  .modal-body { padding: 18px 16px; }
  .modal-head { padding: 16px 18px; }
  .form-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .form-actions .btn { width: 100%; }
  .form-actions .privacy { font-size: 12px; }

  /* 漏洞警示录：年份与内容改为上下排列 */
  .vuln-item { grid-template-columns: 1fr; gap: 6px; }
  .vuln-year { justify-content: flex-start; }

  /* 页脚单列 */
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .foot { padding-top: 40px; }
}
