:root {
  --brand: #1764db;
  --brand-600: #1257c2;
  --brand-50: #eef4fd;
  --brand-100: #dbe7fb;
  --ink: #16233a;
  --ink-2: #44526b;
  --ink-3: #6b778c;
  --line: #e3e7ee;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ok: #138a57;
  --radius: 10px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "tnum" 1;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
img, svg { display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; height: 64px; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: 16px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); font-size: 14px; padding: 8px 12px; border-radius: 6px; transition: background .18s ease-out, color .18s ease-out; }
.nav a:hover { background: var(--brand-50); color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 550; }
.nav .btn { margin-left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 6px;
  font-size: 14px; font-weight: 550; border: 1px solid transparent;
  transition: background .18s ease-out, border-color .18s ease-out, transform .18s ease-out;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-100); color: var(--brand); }
.nav .btn-primary { height: 36px; padding: 0 14px; color: #fff; }
.nav .btn-primary:hover { background: var(--brand-600); color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  mask-image: radial-gradient(ellipse 70% 80% at 75% 40%, #000 0%, transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--brand); background: var(--brand-50); border: 1px solid var(--brand-100); padding: 4px 10px; border-radius: 6px; font-weight: 550; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(19, 138, 87, .15); }
h1 { font-size: 48px; line-height: 1.1; letter-spacing: -0.025em; margin: 20px 0 20px; font-weight: 700; }
h1 .accent { color: var(--brand); }
.lead { font-size: 18px; color: var(--ink-2); max-width: 540px; margin: 0 0 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero panel: network diagram */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(22, 35, 58, .04), 0 12px 32px -12px rgba(23, 100, 219, .18); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.panel-head strong { color: var(--ink); font-weight: 600; }
.panel-body { padding: 8px 18px 18px; }
.stack-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.stack-row:last-child { border-bottom: 0; }
.stack-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.stack-icon svg { width: 18px; height: 18px; }
.stack-row h4 { margin: 0; font-size: 14px; font-weight: 600; }
.stack-row p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.tag { font-size: 12px; font-family: var(--mono); color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.flow { height: 2px; margin: 4px 0 0; background: linear-gradient(90deg, transparent, var(--brand) 50%, transparent); background-size: 200% 100%; animation: flow 2.4s linear infinite; opacity: .5; border-radius: 2px; }
@keyframes flow { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Sections */
section { padding: 88px 0; }
.section-head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; margin-bottom: 40px; align-items: end; }
.section-head h2 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
.section-head p { margin: 0; color: var(--ink-2); }
.kicker { display: block; font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 10px; }

/* Services: two-column detailed list, not icon cards */
.services { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.service { padding: 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .2s ease-out; }
.service:nth-child(2n) { border-right: 0; }
.service:nth-last-child(-n + 2) { border-bottom: 0; }
.service:hover { background: #fbfcfe; }
.service-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.service-top .stack-icon { width: 40px; height: 40px; }
.service h3 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.service > p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 4px; }

/* Principles band */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.principle { padding: 4px 28px; border-left: 1px solid var(--line); }
.principle:first-child { border-left: 0; padding-left: 0; }
.principle h4 { margin: 0 0 6px; font-size: 15px; }
.principle p { margin: 0; font-size: 14px; color: var(--ink-3); }

/* Process */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.step h4 { margin: 12px 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--ink-2); }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; }

/* CTA */
.cta { background: var(--brand); color: #fff; border-radius: 14px; padding: 48px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 48px solid rgba(255, 255, 255, .07); }
.cta h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.02em; }
.cta p { margin: 0; color: rgba(255, 255, 255, .82); }
.cta .actions { justify-content: flex-end; position: relative; z-index: 1; }
.cta .btn-light { background: #fff; color: var(--brand); }
.cta .btn-light:hover { background: var(--brand-50); }
.cta .btn-outline { border-color: rgba(255, 255, 255, .4); color: #fff; }
.cta .btn-outline:hover { border-color: #fff; color: #fff; }

/* Inner pages */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 64px 0 48px; }
.page-hero h1 { font-size: 40px; margin: 8px 0 12px; }
.page-hero p { margin: 0; color: var(--ink-2); max-width: 680px; font-size: 17px; }
.page-body { padding: 56px 0 88px; }
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: 14px; display: grid; gap: 2px; }
.toc a { color: var(--ink-3); padding: 6px 10px; border-radius: 6px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--brand); background: var(--brand-50); }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 40px 48px; max-width: 780px; }
.prose h2 { font-size: 20px; margin: 36px 0 10px; letter-spacing: -0.01em; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); font-size: 15px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 4px 0; }
.meta-line { font-size: 13px; color: var(--ink-3); margin-bottom: 24px !important; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: grid; gap: 6px; transition: border-color .2s ease-out, transform .2s ease-out; }
.contact-card:hover { border-color: var(--brand-100); transform: translateY(-2px); }
.contact-card h3 { margin: 8px 0 0; font-size: 17px; }
.contact-card p { margin: 0; color: var(--ink-3); font-size: 14px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: 14px; }
.copy-row a { color: var(--ink); }
.copy-btn { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--font); padding: 4px 6px; border-radius: 4px; transition: color .18s ease-out, background .18s ease-out; }
.copy-btn:hover { color: var(--brand); background: var(--brand-50); }
.copy-btn svg { width: 14px; height: 14px; }
.facts { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts dl { margin: 0; display: grid; grid-template-columns: 220px 1fr; }
.facts dt, .facts dd { margin: 0; padding: 14px 24px; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--ink-3); background: #fbfcfe; }
.facts dd { color: var(--ink); }
.facts dl > :nth-last-child(-n + 2) { border-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 32px; font-size: 14px; color: var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h5 { margin: 0 0 12px; font-size: 13px; color: var(--ink); font-weight: 600; }
.footer-grid a { display: block; color: var(--ink-3); padding: 3px 0; }
.footer-grid a:hover { color: var(--brand); }
.footer-grid address { font-style: normal; line-height: 1.7; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* Reveal motion */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease-out, transform .5s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .hero .wrap, .section-head, .cta, .doc { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: 56px; padding-bottom: 64px; gap: 40px; }
  h1 { font-size: 36px; }
  .services, .contact-grid, .steps { grid-template-columns: 1fr; }
  .service { border-right: 0; }
  .service:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .principles { grid-template-columns: 1fr 1fr; gap: 24px; }
  .principle { border-left: 0; padding: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta .actions { justify-content: flex-start; }
  .toc { display: none; }
  .prose { padding: 28px 22px; }
  .facts dl { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
  .nav a:not(.btn) { display: none; }
}
