/* ============================================================
   云衡科技官网 — 现代科技蓝主题（参考阿里云 / 蚂蚁设计语言）
   浅色、克制、专业；数字使用 Bahnschrift 呈现工程感
   ============================================================ */
:root {
  --blue:       #1677ff;
  --blue-dark:  #0958d9;
  --blue-deep:  #003eb3;
  --blue-50:    #e6f4ff;
  --blue-100:   #f0f7ff;
  --ink:        #16233d;   /* 标题深蓝黑 */
  --text:       #33405a;   /* 正文 */
  --muted:      #66738c;   /* 辅助文字 */
  --bg:         #ffffff;
  --bg-alt:     #f6f8fb;
  --line:       #e6ebf2;
  --green:      #17c25d;
  --radius:     14px;
  --radius-sm:  10px;
  --shadow-card: 0 2px 6px rgba(22, 60, 120, 0.05), 0 14px 36px rgba(22, 60, 120, 0.07);
  --shadow-card-hover: 0 4px 12px rgba(22, 60, 120, 0.08), 0 22px 48px rgba(22, 119, 255, 0.14);
  --shadow-btn: 0 6px 16px rgba(22, 119, 255, 0.28);
  --num: "Bahnschrift", "DIN Alternate", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

a { color: var(--blue); text-decoration: none; }
img, svg { display: block; }

/* 键盘可达性：清晰的焦点环 */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

section[id] { scroll-margin-top: 76px; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500; line-height: 1;
  padding: 14px 28px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-xs { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

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

.btn-ghost {
  background: #fff; color: var(--blue); border-color: #cfe0f5;
}
.btn-ghost:hover { border-color: var(--blue); background: var(--blue-100); }

.btn-white {
  background: #fff; color: var(--blue-deep);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.btn-white:hover { transform: translateY(-2px); }

.btn-ghost-light {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ================= 顶部导航 ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 2px 12px rgba(22, 60, 120, 0.06); }
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(22, 119, 255, 0.3);
}
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: .02em; }

.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 15px; color: var(--text); padding: 6px 0;
  position: relative; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--blue); border-radius: 2px; transition: right .25s;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { right: 0; }

.nav-cta { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= Hero ================= */
.hero {
  position: relative; overflow: hidden;
  padding: 150px 0 90px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(22, 119, 255, 0.08), transparent 60%),
    linear-gradient(180deg, var(--blue-100) 0%, #fff 100%);
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 119, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 119, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 2px;
  color: var(--blue); text-transform: uppercase;
  padding: 5px 14px; border-radius: 20px;
  background: var(--blue-50); border: 1px solid rgba(22, 119, 255, 0.18);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.16; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em;
}
.grad-text {
  background: linear-gradient(92deg, var(--blue) 0%, #4da3ff 60%, var(--blue-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-desc { margin-top: 20px; max-width: 480px; font-size: 16.5px; color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }

.hero-trusts {
  list-style: none; display: flex; flex-wrap: wrap; gap: 26px; margin-top: 34px;
}
.hero-trusts li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--muted);
}
.hero-trusts svg { color: var(--green); }

/* —— 运维控制台面板（首屏签名元素） —— */
.console-wrap { position: relative; }
.console-wrap::before {
  content: ""; position: absolute; inset: 34px -16px -20px 36px; z-index: -1;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.1), rgba(0, 62, 179, 0.06));
}
.console {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card-hover);
  overflow: hidden; font-size: 13px;
  animation: console-in .8s cubic-bezier(.2, .8, .25, 1) both;
}
@keyframes console-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.console-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt);
}
.window-dots { display: inline-flex; gap: 6px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; }
.window-dots i:first-child { background: #ffb3b3; }

.console-title { font-weight: 600; color: var(--ink); }
.console-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 12px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 194, 93, 0.18);
  animation: live-pulse 2.2s ease-in-out infinite;
}
@keyframes live-pulse { 50% { box-shadow: 0 0 0 6px rgba(23, 194, 93, 0); } }

.console-body { padding: 18px 18px 10px; }
.console-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kpi {
  background: var(--blue-100); border: 1px solid rgba(22, 119, 255, 0.1);
  border-radius: 12px; padding: 14px 16px;
}
.kpi-num {
  display: block; font-family: var(--num); font-size: 27px; font-weight: 600;
  color: var(--ink); letter-spacing: .01em;
}
.kpi-label { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.console-chart { position: relative; margin-top: 18px; padding-bottom: 18px; }
.console-chart svg { width: 100%; height: 96px; }
.chart-line {
  fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 620; stroke-dashoffset: 620;
  animation: chart-draw 1.6s .35s cubic-bezier(.25, .6, .3, 1) forwards;
}
.chart-area {
  opacity: 0; animation: chart-fade 1.1s 1.05s ease forwards;
}
.chart-dot {
  fill: #fff; stroke: var(--blue); stroke-width: 2;
  opacity: 0; animation: chart-fade .6s 1.9s ease forwards;
}
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
@keyframes chart-fade { to { opacity: 1; } }
.chart-caption {
  position: absolute; left: 0; bottom: 0; font-size: 11.5px; color: var(--muted);
}

.console-list { list-style: none; border-top: 1px solid var(--line); }
.console-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px; border-bottom: 1px dashed var(--line);
}
.console-list li:last-child { border-bottom: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot.ok { background: var(--green); }
.svc { font-family: var(--num); font-weight: 600; color: var(--ink); font-size: 12.5px; }
.svc-meta { color: var(--muted); font-size: 12px; }
.svc-state { margin-left: auto; color: var(--green); font-size: 12px; }

/* ================= 数据带 ================= */
.stats { border-bottom: 1px solid var(--line); background: #fff; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding-top: 48px; padding-bottom: 48px;
}
.stat { text-align: center; }
.stat-num {
  display: block; font-family: var(--num); font-size: 42px; font-weight: 600;
  color: var(--ink); letter-spacing: .01em; line-height: 1.1;
}
.stat-label { display: block; margin-top: 8px; font-size: 13.5px; color: var(--muted); }

/* ================= 通用区块 ================= */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 34px); color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.section-sub { margin-top: 12px; color: var(--muted); font-size: 15.5px; }

.cards-grid { display: grid; gap: 24px; }
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.cards-grid.four { grid-template-columns: repeat(4, 1fr); }

/* 卡片 */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-card);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(22, 119, 255, 0.32); }

.card-icon {
  width: 52px; height: 52px; border-radius: 13px;
  background: var(--blue-50); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card h3 { font-size: 18px; color: var(--ink); margin-bottom: 10px; }
.card p { font-size: 14.5px; color: var(--muted); }

/* 产品卡 */
.product-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.product-top h3 { margin-bottom: 0; }
.product-en { font-family: var(--num); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.product-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; font-size: 14px; font-weight: 500; color: var(--blue);
}
.product-more svg { transition: transform .2s; }
.product-more:hover svg { transform: translateX(3px); }

/* 优势 */
.advantage { text-align: center; padding: 34px 22px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.adv-metric {
  display: block; font-family: var(--num); font-size: 30px; font-weight: 600;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.advantage h3 { font-size: 17px; color: var(--ink); margin: 12px 0 8px; }
.advantage p { font-size: 13.5px; color: var(--muted); }

/* 案例卡 */
.case-tags { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.tag {
  font-size: 12px; color: var(--blue); background: var(--blue-50);
  padding: 3px 10px; border-radius: 6px; font-weight: 600;
}
.case-client { font-size: 13px; color: var(--muted); }
.case-story { font-size: 14.5px; color: var(--text); border-left: 3px solid var(--blue-50); padding-left: 14px; margin: 0 0 18px; }
.case-metric {
  font-family: var(--num); font-size: 20px; font-weight: 600; color: var(--blue);
}

/* ================= FAQ ================= */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s, box-shadow .25s;
}
.faq-item.open { border-color: rgba(22, 119, 255, 0.4); box-shadow: var(--shadow-card); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 18px 24px; font-size: 16px; font-weight: 500; color: var(--ink);
  font-family: inherit;
}
.faq-icon { position: relative; flex-shrink: 0; width: 18px; height: 18px; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: var(--blue); border-radius: 2px;
  transition: transform .3s;
}
.faq-icon::before { left: 2px; right: 2px; top: 8px; height: 2px; }
.faq-icon::after { top: 2px; bottom: 2px; left: 8px; width: 2px; }
.faq-item.open .faq-icon::after { transform: rotate(90deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.25, .6, .3, 1);
}
.faq-a p { padding: 0 24px 20px; font-size: 14.5px; color: var(--muted); }

/* ================= CTA ================= */
.cta {
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(120deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff; padding: 84px 0;
}
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; }
.cta-inner p { margin-top: 12px; color: rgba(255, 255, 255, 0.85); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 34px; }
.cta-note { margin-top: 26px; font-size: 13px; }
.cta-note a { color: rgba(255, 255, 255, 0.85); border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.cta-note a:hover { color: #fff; border-color: #fff; }

/* ================= 页脚 ================= */
.footer { background: #0d1526; color: #a8b3c6; font-size: 14px; padding: 64px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { max-width: 300px; line-height: 1.8; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 6px; }
.footer-col a { color: #a8b3c6; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-addr { color: #a8b3c6; }
.footer-col .btn-ghost { max-width: 130px; border-color: rgba(255, 255, 255, 0.2); background: transparent; color: #cfd8e7; }
.footer-col .btn-ghost:hover { border-color: var(--blue); color: #fff; background: rgba(22, 119, 255, 0.15); }
.footer-col .btn { justify-content: flex-start; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 20px 24px 26px; text-align: center; font-size: 13px; }
.footer-bottom a { color: #a8b3c6; }

/* ================= 滚动揭示 ================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ================= Toast ================= */
.toast {
  position: fixed; bottom: 36px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #fff; color: var(--ink); font-size: 14px;
  padding: 12px 22px; border-radius: 10px; z-index: 200;
  border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(22, 60, 120, 0.18);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok::before { content: "✓ "; color: var(--green); }
.toast.err::before { content: "✕ "; color: #e5484d; }

/* ================= 响应式 ================= */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .console { max-width: 520px; }
  .cards-grid.three { grid-template-columns: repeat(2, 1fr); }
  .cards-grid.four { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(22, 60, 120, 0.1);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.mobile-open { max-height: 340px; }
  .nav-links a { padding: 15px 24px; border-top: 1px solid var(--bg-alt); }
  .nav-links a::after { display: none; }
  .nav-cta .btn { display: none; }

  .hero { padding: 120px 0 64px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-trusts { gap: 16px 22px; }

  .cards-grid.three, .cards-grid.four { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ================= 减少动态 ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .chart-line { stroke-dashoffset: 0; }
  .chart-area, .chart-dot { opacity: 1; }
}