:root {
  --blue: #2B80E5;
  --blue-dark: #1b5fb3;
  --ink: #17212f;
  --muted: #5b6b7f;
  --bg: #f6f9fd;
  --line: #e3eaf3;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(23, 33, 47, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-gutter: stable both-edges; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

h1, h2, h3 { text-wrap: balance; }
p, li, dd, figcaption, blockquote { text-wrap: pretty; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container { width: min(1120px, 92%); margin: 0 auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; font-size: 19px; }
.brand-name span { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .14em; }
.footer-grid .brand-logo { height: 30px; }
.site-footer .brand { display: flex; align-items: center; gap: 14px; margin-bottom: 0; }
.nav { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.nav a { color: var(--ink); font-size: 15px; white-space: nowrap; }
.nav a:hover { color: var(--blue); text-decoration: none; }
.nav a[aria-current] { color: var(--blue); }

/* Section sub-nav (技术两页) */
.section-nav {
  position: sticky; top: 64px; z-index: 40;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.section-nav .container {
  display: flex; align-items: center; overflow-x: auto;
  padding: 11px 0; font-size: 14px; -webkit-overflow-scrolling: touch;
}
.section-nav .container > * { flex: 0 0 auto; white-space: nowrap; }
.section-nav .container > * + * { border-left: 1px solid var(--line); margin-left: 14px; padding-left: 14px; }
.section-nav-label { color: var(--muted); }
.section-nav [aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-size: 18px; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; background: var(--blue); color: #fff;
  padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; }

/* Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(43, 128, 229, .45), transparent 60%),
    linear-gradient(135deg, #0e1f36 0%, #123a66 55%, #1b5fb3 100%);
  color: #fff; padding: 88px 0 72px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.25; margin: 0 0 18px; letter-spacing: .01em; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: rgba(255, 255, 255, .88); max-width: 720px; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-links { margin: 16px 0 0; font-size: 15px; color: rgba(255, 255, 255, .75); }
.hero-links a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.hero-links a:hover { color: #fff; }
.trustbar {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .82); font-size: 14px; display: flex; gap: 28px; flex-wrap: wrap;
}

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; }

.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .tag { display: inline-block; font-size: 12px; color: var(--blue); background: rgba(43,128,229,.08); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.card a.more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; }

.value-card { border-top: 4px solid var(--blue); }

/* Links row */
.line-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.line-links a {
  display: block; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--ink); box-shadow: var(--shadow);
}
.line-links a:hover { border-color: var(--blue); text-decoration: none; transform: translateY(-2px); transition: .18s; }
.line-links strong { display: block; font-size: 17px; margin-bottom: 6px; }
.line-links span { color: var(--muted); font-size: 14px; }

/* Page hero (inner pages) */
.page-hero { background: linear-gradient(135deg, #0e1f36, #1b5fb3); color: #fff; padding: 64px 0 56px; }
.page-hero h1 { margin: 0 0 12px; font-size: clamp(26px, 3.6vw, 38px); }
.page-hero p { margin: 0; color: rgba(255,255,255,.85); max-width: 800px; text-wrap: balance; }
.nw { white-space: nowrap; }

/* Prose */
.prose h2 { margin-top: 44px; font-size: 25px; }
.prose h3 { margin-top: 30px; font-size: 19px; }
.prose p, .prose li { color: #33445a; }
.prose ul { padding-left: 22px; }

/* Table */
.table-wrap { overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
th, td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
th { background: #eef4fc; font-weight: 600; }

/* Comparison table (technology page) */
.table-compare {
  min-width: 840px; table-layout: fixed; font-size: 14.5px;
  border-top: 2px solid var(--ink);
}
.table-compare th, .table-compare td {
  border: 0; border-bottom: 1px solid var(--line);
  padding: 11px 14px; vertical-align: top; line-height: 1.6;
}
.table-compare thead th {
  background: #f4f8fd; border-bottom: 1px solid #c9d7e8;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.table-compare th:nth-child(1), .table-compare td:nth-child(1) { width: 14%; font-weight: 600; }
.table-compare th:nth-child(2), .table-compare td:nth-child(2) { width: 26%; }
.table-compare th:nth-child(3), .table-compare td:nth-child(3) { width: 22%; }
.table-compare th:nth-child(4), .table-compare td:nth-child(4) { width: 24%; }
.table-compare th:nth-child(5), .table-compare td:nth-child(5) { width: 14%; }
.table-compare tbody td:nth-child(2) { background: rgba(43,128,229,.05); }
.table-compare thead th:nth-child(2) { background: #e8f1fc; color: var(--blue-dark); }
.table-compare tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
@media (max-width: 950px) {
  .table-compare th:first-child, .table-compare td:first-child {
    position: sticky; left: 0; z-index: 1; background: #fff;
    box-shadow: inset -1px 0 0 var(--line);
  }
  .table-compare thead th:first-child { background: #f4f8fd; }
}

/* Figures */
.figure { margin: 24px 0; }
.figure img { border-radius: 12px; border: 1px solid var(--line); width: 100%; height: auto; }
.figure video { border-radius: 12px; border: 1px solid var(--line); width: 100%; height: auto; display: block; background: #0d141c; }
.figure figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.figure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0; }
.figure-grid .figure { margin: 0; }

/* Color palette grids */
.palette { display: grid; gap: 10px; }
.palette.cols-4 { grid-template-columns: repeat(4, 1fr); }
.palette.cols-6 { grid-template-columns: repeat(6, 1fr); gap: 8px; }
.palette img {
  display: block; width: 100%; height: auto;
  border-radius: 8px; border: 1px solid rgba(20, 40, 70, .06);
  box-shadow: 0 2px 8px rgba(20, 40, 70, .10);
}
@media (max-width: 820px) {
  .palette.cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .palette.cols-4, .palette.cols-6 { grid-template-columns: repeat(2, 1fr); }
}

/* Steps */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; background: rgba(43,128,229,.1);
  color: var(--blue); font-weight: 700; display: grid; place-items: center;
}
.step h3 { margin: 6px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); }

/* Case cards */
.case-card { border-left: 4px solid var(--blue); }
.case-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.case-meta span { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 3px 10px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, #123a66, #2B80E5); color: #fff; padding: 56px 0; }
.cta-band h2 { margin: 0 0 10px; font-size: 28px; }
.cta-band p { margin: 0 0 24px; color: rgba(255,255,255,.85); }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 12px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* Contact form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background: #fff;
}
input:focus, textarea:focus { outline: 2px solid rgba(43,128,229,.35); border-color: var(--blue); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
p.footnote { font-size: 13px; line-height: 1.7; color: var(--muted); }

/* Footer */
.site-footer { background: #0e1a2b; color: rgba(255,255,255,.72); padding: 48px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.site-footer a { color: rgba(255,255,255,.72); display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; color: rgba(255,255,255,.5); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1239px) {
  .brand-name span { display: none; }
}

@media (max-width: 1040px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 18px 5%; gap: 16px; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}

@media (max-width: 900px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .line-links { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .figure-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand-logo { height: 32px; }
  .brand-name { font-size: 17px; }
  .section-nav .container { padding: 8px 0; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .line-links { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 56px 0; }
}
