/*
文件说明：该文件实现 CNAS 认可解决方案首页的视觉样式。
功能说明：负责蓝白科技感、卡片式结构、响应式布局、CTA 与交互状态。

结构概览：
  第一部分：全局变量与基础样式
  第二部分：导航、首屏与通用组件
  第三部分：各业务模块布局
  第四部分：响应式适配
*/

/* ========== 第一部分：全局变量与基础样式 ==========
  为什么这样做：集中管理颜色和阴影，便于后续按品牌规范快速替换。
*/
:root {
  --blue-900: #0b2b5c;
  --blue-800: #103f86;
  --blue-700: #1457b8;
  --blue-600: #1d6fe8;
  --cyan-500: #17c6d8;
  --ink: #102033;
  --muted: #5b6b81;
  --line: #dbe7f4;
  --soft: #f4f8fd;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(17, 70, 138, 0.16);
  --card-shadow: 0 16px 44px rgba(11, 43, 92, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 116px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(29, 111, 232, 0.12);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
label span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-900);
  font-size: 14px;
  font-weight: 900;
}

.shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 92px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-600);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.3;
}

p {
  color: var(--muted);
}

/* ========== 第二部分：导航、首屏与通用组件 ==========
  为什么这样做：导航固定在顶部，便于长首页中的用户随时触发转化。
*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 231, 244, 0.8);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.brand,
.nav-links,
.footer-inner,
.hero-actions,
.hero-proof {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--blue-900);
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-700), var(--cyan-500));
}

.nav-links {
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
}

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

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-cta {
  padding: 0 20px;
  color: var(--white);
  background: var(--blue-700);
  box-shadow: 0 12px 24px rgba(29, 111, 232, 0.22);
}

.btn {
  min-width: 156px;
  padding: 0 22px;
  border: 1px solid transparent;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.btn:hover,
.nav-cta:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: var(--blue-700);
  box-shadow: 0 16px 34px rgba(20, 87, 184, 0.24);
}

.btn-secondary {
  color: var(--blue-800);
  background: var(--white);
  border-color: var(--line);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 96px;
  background:
    radial-gradient(circle at 82% 20%, rgba(23, 198, 216, 0.16), transparent 30%),
    linear-gradient(180deg, #eef6ff 0%, #ffffff 74%);
}

.hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(20, 87, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 87, 184, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(420px, 1.04fr);
  align-items: center;
  gap: 54px;
}

.hero-copy {
  max-width: 670px;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 32px;
  font-size: 19px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
}

.hero-proof {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-proof span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-800);
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.hero-visual img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border: 1px solid rgba(219, 231, 244, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.floating-panel {
  position: absolute;
  display: grid;
  gap: 4px;
  width: min(280px, 72%);
  padding: 16px;
  border: 1px solid rgba(219, 231, 244, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(14px);
}

.floating-panel strong {
  color: var(--blue-900);
}

.floating-panel span {
  color: var(--muted);
  font-size: 13px;
}

.panel-a {
  top: 42px;
  left: -30px;
}

.panel-b {
  right: -18px;
  bottom: 40px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 38px;
}

.split-heading {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.text-link {
  color: var(--blue-700);
  font-weight: 900;
}

.assessment-section {
  padding-top: 42px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
}

.assessment-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 42px;
  align-items: start;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.assessment-copy {
  position: sticky;
  top: 104px;
}

.assessment-points {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.assessment-points span {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-800);
  background: var(--soft);
  font-weight: 900;
}

.wecom-card {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(20, 87, 184, 0.22);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.wecom-card h3 {
  margin-bottom: 8px;
}

.wecom-subtitle {
  margin-bottom: 10px;
  color: var(--blue-700);
  font-weight: 900;
}

.wecom-card p {
  margin-bottom: 10px;
}

.wecom-contact {
  color: var(--blue-800);
  font-weight: 900;
}

.wecom-qr {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(20, 87, 184, 0.38);
  border-radius: 8px;
  color: var(--blue-800);
  background: var(--soft);
  text-align: center;
}

.wecom-qr img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.wecom-qr span {
  font-weight: 900;
}

.wecom-qr small {
  color: var(--muted);
  font-size: 12px;
}

.wecom-confirm {
  grid-column: 1 / -1;
  justify-self: start;
}

.form-heading h3 {
  margin-bottom: 0;
}

.assessment-form {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.choice-grid label {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 800;
}

.choice-grid input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue-700);
}

.full-field {
  display: block;
}

.form-submit {
  justify-self: start;
}

.privacy-note {
  margin: -4px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 14px;
}

.risk-disclaimer {
  margin: -8px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(20, 87, 184, 0.18);
  border-radius: 8px;
  color: var(--blue-900);
  background: rgba(29, 111, 232, 0.07);
  font-size: 14px;
  font-weight: 800;
}

.form-message {
  display: none;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(23, 198, 216, 0.38);
  border-radius: 8px;
  color: var(--blue-900);
  background: rgba(23, 198, 216, 0.1);
  font-weight: 800;
}

.form-message.is-visible {
  display: block;
}

.form-message[data-state="submitting"] {
  border-color: rgba(29, 111, 232, 0.32);
  background: rgba(29, 111, 232, 0.08);
}

.form-message[data-state="success"] {
  border-color: rgba(23, 198, 216, 0.38);
  background: rgba(23, 198, 216, 0.1);
}

.form-message[data-state="error"] {
  border-color: rgba(220, 68, 68, 0.35);
  color: #8a1f1f;
  background: rgba(220, 68, 68, 0.08);
}

.assessment-result {
  display: none;
  gap: 22px;
  padding: 26px;
  border: 1px solid rgba(29, 111, 232, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(29, 111, 232, 0.08), rgba(23, 198, 216, 0.1)),
    var(--white);
}

.assessment-result.is-visible {
  display: grid;
}

.result-heading h3 {
  margin-bottom: 0;
}

.result-grade {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(20, 87, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.result-grade > span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue-700);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.result-grade strong {
  display: block;
  color: var(--blue-900);
  font-size: 18px;
}

.result-grade p {
  margin: 6px 0 0;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.result-grid section {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.result-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 900;
}

.result-grid p {
  margin-bottom: 0;
}

.result-cta {
  justify-self: start;
}

.result-next-actions {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.result-next-actions span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 900;
}

.result-next-actions ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

/* ========== 第三部分：各业务模块布局 ==========
  为什么这样做：模块之间交替使用白底与浅蓝底，形成接近参考站的清爽节奏，但内容完全围绕 CNAS 风险决策。
*/
.two-column {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 56px;
}

.risk-list,
.system-grid,
.scenario-grid,
.knowledge-grid,
.faq-list {
  display: grid;
  gap: 18px;
}

.risk-list article,
.system-card,
.scenario-grid article,
.knowledge-grid article,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.risk-section,
.scenario-section,
.faq-section {
  background: var(--soft);
}

.risk-list article {
  position: relative;
  padding: 24px 24px 24px 72px;
}

.risk-list span {
  position: absolute;
  top: 24px;
  left: 24px;
  color: var(--cyan-500);
  font-weight: 900;
}

.system-grid {
  grid-template-columns: repeat(3, 1fr);
}

.system-card {
  padding: 30px;
}

.system-card.featured {
  color: var(--white);
  background: linear-gradient(145deg, var(--blue-900), var(--blue-700));
  border-color: transparent;
}

.system-card.featured p,
.system-card.featured li,
.system-card.featured a {
  color: rgba(255, 255, 255, 0.84);
}

.icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue-700);
  font-weight: 900;
}

.featured .icon {
  color: var(--blue-900);
  background: var(--white);
}

.system-card ul {
  display: grid;
  gap: 8px;
  margin: 22px 0 24px;
  padding-left: 20px;
  color: var(--muted);
}

.system-card a {
  color: var(--blue-700);
  font-weight: 900;
}

.metrics-band {
  padding: 42px 0;
  color: var(--white);
  background: var(--blue-900);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.metrics-grid div {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.metrics-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1;
}

.metrics-grid span {
  color: rgba(255, 255, 255, 0.78);
}

.scenario-grid {
  grid-template-columns: repeat(4, 1fr);
}

.scenario-grid article,
.knowledge-grid article {
  padding: 26px;
}

.scenario-grid article {
  min-height: 250px;
}

.process-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.process-line article {
  min-height: 260px;
  padding: 30px;
  background: var(--white);
}

.process-line article + article {
  border-left: 1px solid var(--line);
}

.process-line span,
.knowledge-grid span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 900;
}

.maintenance-section {
  background: var(--soft);
}

.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.maintenance-grid article {
  min-height: 230px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.maintenance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.knowledge-grid {
  grid-template-columns: repeat(3, 1fr);
}

.faq-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 64px;
  align-items: start;
}

.faq-list details {
  padding: 22px 24px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--blue-900);
  font-size: 18px;
  font-weight: 900;
}

.faq-list p {
  margin: 14px 0 0;
}

.final-cta {
  padding: 96px 0;
  background:
    linear-gradient(135deg, rgba(23, 198, 216, 0.18), transparent 34%),
    var(--blue-900);
}

.final-cta-box {
  padding: 54px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.final-cta-box h2 {
  max-width: 820px;
}

.final-cta-box p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.contact-placeholders {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.contact-placeholders span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 800;
}

.bottom-wecom-card {
  display: inline-grid;
  grid-template-columns: 96px minmax(120px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 900;
}

.bottom-wecom-card img,
.handoff-wecom-card img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: var(--white);
  object-fit: cover;
}

.bottom-wecom-card span,
.handoff-wecom-card span {
  padding: 0;
  border: 0;
  background: transparent;
}

.handoff-section {
  background: var(--soft);
}

.handoff-box {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.handoff-contact {
  display: grid;
  gap: 12px;
}

.handoff-contact span {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-900);
  background: var(--soft);
  font-weight: 900;
}

.handoff-wecom-card {
  display: grid;
  grid-template-columns: 104px minmax(120px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-900);
  background: var(--soft);
  font-weight: 900;
}

.site-footer {
  padding: 26px 0;
  background: #071e3f;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
}

.footer-inner a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.footer-inner a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ========== 第四部分：响应式适配 ==========
  为什么这样做：模块卡片数量较多，移动端需要改为单列，避免文字挤压和 CTA 换行失控。
*/
@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero-grid,
  .two-column,
  .faq-layout,
  .assessment-layout,
  .handoff-box {
    grid-template-columns: 1fr;
  }

  .assessment-copy {
    position: static;
  }

  .wecom-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
  }

  .hero-visual img {
    height: 430px;
  }

  .panel-a {
    left: 18px;
  }

  .panel-b {
    right: 18px;
  }

  .system-grid,
  .scenario-grid,
  .process-line,
  .knowledge-grid,
  .maintenance-grid,
  .metrics-grid,
  .form-grid,
  .choice-grid,
  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-line article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 1160px);
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 29px;
  }

  .section {
    padding: 66px 0;
  }

  .nav {
    min-height: 66px;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding: 44px 0 64px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .btn {
    width: 100%;
  }

  .hero-proof span {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .hero-visual img {
    height: 300px;
  }

  .floating-panel {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .system-grid,
  .scenario-grid,
  .process-line,
  .knowledge-grid,
  .maintenance-grid,
  .metrics-grid,
  .form-grid,
  .choice-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .assessment-layout,
  .assessment-form,
  .assessment-result {
    padding: 18px;
  }

  .result-grade {
    grid-template-columns: 1fr;
  }

  .result-grid section {
    min-height: auto;
  }

  .split-heading {
    display: block;
  }

  .final-cta-box {
    padding: 26px 18px;
  }

  .contact-placeholders {
    display: grid;
  }

  .contact-placeholders span {
    width: 100%;
  }

  .bottom-wecom-card,
  .handoff-wecom-card {
    grid-template-columns: 88px minmax(0, 1fr);
    width: 100%;
  }

  .bottom-wecom-card img,
  .handoff-wecom-card img {
    width: 88px;
    height: 88px;
  }

  .handoff-box {
    padding: 18px;
  }

  .footer-inner {
    display: grid;
  }
}
