:root {
  --bg: #070b14;
  --bg-alt: #0a1120;
  --surface: #0e1627;
  --surface-2: #121c31;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #e6edf7;
  --text-2: #c0cbdb;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --ok: #4ade80;
  --grad: linear-gradient(120deg, #7dd3fc 0%, #38bdf8 40%, #818cf8 100%);

  --radius: 14px;
  --container: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
h1, h2 { text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--mono); }

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
html[lang="zh-CN"] .eyebrow { letter-spacing: 0.12em; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 550;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-primary {
  background: var(--accent);
  color: #04111d;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, .4), 0 8px 24px -8px rgba(56, 189, 248, .55);
}
.btn-primary:hover { background: #5cc9fa; }
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, .02);
}
.btn-ghost:hover { border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .06); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, .72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; height: 68px; gap: 32px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-sub { color: var(--muted); font-weight: 500; margin-left: 5px; }

.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a { color: var(--muted); font-size: 14.5px; transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  height: 36px;
  min-width: 52px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  font: 500 13.5px var(--font);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.lang-toggle:hover { color: var(--text); border-color: rgba(56, 189, 248, .5); }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 0; background: transparent; cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--text);
  transition: transform .2s ease, top .2s ease;
}
.menu-toggle span:first-child { top: 15px; }
.menu-toggle span:last-child { top: 23px; }
.nav.open .menu-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.nav.open .menu-toggle span:last-child { top: 19px; transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 56px;
  border-bottom: 1px solid var(--border);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 340px at 18% 30%, rgba(56, 189, 248, .14), transparent 70%),
    radial-gradient(520px 320px at 85% 15%, rgba(129, 140, 248, .12), transparent 70%),
    linear-gradient(to bottom, transparent 60%, var(--bg));
}
.hero-inner { position: relative; max-width: 860px; margin-left: max(0px, calc((100% - var(--container)) / 2)); }
.hero-title {
  margin-top: 20px;
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
html[lang="zh-CN"] .hero-title { letter-spacing: -0.01em; line-height: 1.15; }
.hero-sub { margin-top: 24px; max-width: 620px; font-size: 18px; color: var(--muted); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.facts {
  position: relative;
  list-style: none;
  margin: 88px 0 0;
  padding: 18px 0 0;
  display: flex; flex-wrap: wrap; gap: 12px 36px;
  border-top: 1px solid var(--border);
  font-size: 14px; color: var(--muted);
}
.facts li { display: flex; align-items: center; gap: 10px; }
.facts .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* Sections */
.section { padding: 112px 0; }
.section-tight { padding-top: 64px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2, .split-head h2, .company h2, .contact h2 { margin-top: 14px; font-size: clamp(30px, 3.8vw, 44px); }
.lead { margin-top: 16px; font-size: 17.5px; color: var(--muted); }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative;
  padding: 28px 24px 30px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease;
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(56, 189, 248, .55), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s ease;
}
.card:hover { transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 18px; margin-top: 22px; }
.card p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(56, 189, 248, .08);
  border: 1px solid rgba(56, 189, 248, .22);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.card-featured {
  border-color: rgba(56, 189, 248, .35);
  background:
    radial-gradient(320px 180px at 0% 0%, rgba(56, 189, 248, .12), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}

/* Tech stack */
.stack {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
}
.stack-label { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack-list li {
  padding: 5px 11px;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, .02);
}

/* Steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 70%, transparent);
  opacity: .45;
}
.step { position: relative; padding-right: 28px; }
.step-num {
  position: relative;
  display: inline-grid; place-items: center;
  height: 30px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px; color: var(--accent);
  background: var(--bg-alt);
  border: 1px solid rgba(56, 189, 248, .4);
}
.step h3 { margin-top: 24px; font-size: 20px; }
.step p { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* Company */
.company { display: grid; grid-template-columns: 1.05fr 1fr; gap: 72px; align-items: center; }
.company-text p:not(.eyebrow) { margin-top: 20px; color: var(--muted); font-size: 16.5px; }
.company-text h2 + p { margin-top: 24px; }

.record {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(56, 189, 248, .05);
  overflow: hidden;
}
.record-head {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  font-size: 12.5px; color: var(--faint);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .015);
}
.rec-dots { display: flex; gap: 6px; }
.rec-dots i { width: 10px; height: 10px; border-radius: 50%; background: #1e293b; }
.record-body { margin: 0; padding: 10px 0; font-size: 13.5px; }
.record-body div {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px;
  padding: 9px 20px;
}
.record-body div + div { border-top: 1px dashed rgba(148, 163, 184, .08); }
.record-body dt { color: var(--faint); }
.record-body dd { margin: 0; color: var(--text); word-break: break-word; }
.ok { color: var(--ok); display: inline-flex; align-items: center; gap: 8px; }
.ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* Contact */
.contact-card {
  position: relative;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px;
  padding: 56px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(500px 260px at 0% 0%, rgba(56, 189, 248, .14), transparent 70%),
    radial-gradient(500px 260px at 100% 100%, rgba(129, 140, 248, .12), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.contact-copy .btn { margin-top: 32px; }
.contact-details { margin: 0; display: grid; gap: 28px; align-content: center; }
.contact-details dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.contact-details dd { margin: 8px 0 0; font-size: 16px; }
.contact-details a { color: var(--accent); border-bottom: 1px solid rgba(56, 189, 248, .3); }
.contact-details a:hover { border-bottom-color: var(--accent); }
address { font-style: normal; color: var(--text); line-height: 1.7; }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-brand .brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-about { margin-top: 16px; max-width: 330px; font-size: 14.5px; color: var(--muted); }
.footer-meta { margin-top: 12px; font-size: 13px; color: var(--faint); }
.footer-h { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.footer-col ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; }
.footer-col a { color: var(--muted); transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer-col address { color: var(--muted); line-height: 1.6; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  font-size: 13px; color: var(--faint);
}
.footer-tm { max-width: 560px; }

/* Split layout: sticky heading beside a list (principles, support) */
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 72px; align-items: start; }
.split-head { position: sticky; top: 120px; }
.split + .split { margin-top: 96px; }

.principle-list { list-style: none; margin: 0; padding: 0; }
.principle { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid var(--border); }
.principle:first-child { border-top: 0; padding-top: 4px; }
.principle h3 { font-size: 18px; margin-top: 2px; }
.principle p { margin-top: 8px; font-size: 15.5px; color: var(--muted); }

/* Sub-page hero */
.page-hero { position: relative; overflow: hidden; padding: 96px 0 56px; border-bottom: 1px solid var(--border); }
.page-hero .container { position: relative; }
.page-hero h1 { margin-top: 16px; font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; }
html[lang="zh-CN"] .page-hero h1 { letter-spacing: -0.01em; }
.page-hero .lead { max-width: 620px; }
.page-meta { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* Long-form pages carry both languages; the active one follows <html lang>. */
html[lang="zh-CN"] [data-lang="en"],
html:not([lang="zh-CN"]) [data-lang="zh"] { display: none; }

/* Legal documents */
.legal { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 72px; padding-top: 64px; padding-bottom: 112px; }
.legal > .prose { grid-column: 2; }
.legal-toc { grid-column: 1; grid-row: 1; position: sticky; top: 100px; align-self: start; }
.toc-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.legal-toc ol { list-style: none; margin: 14px 0 0; padding: 0 0 0 14px; border-left: 1px solid var(--border); display: grid; gap: 9px; font-size: 14px; line-height: 1.45; }
.legal-toc a { color: var(--muted); transition: color .15s; }
.legal-toc a:hover { color: var(--text); }

.prose { color: var(--text-2); font-size: 16px; line-height: 1.75; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 48px; font-size: 21px; color: var(--text); letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin-bottom: 0; padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(56, 189, 248, .3); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose address { color: var(--text-2); }
.note {
  padding: 14px 18px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface);
  font-size: 14.5px; color: var(--muted);
}

/* Support */
.support-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card-link { display: inline-flex; margin-top: 18px; font-size: 15px; font-weight: 550; color: var(--accent); }
.card-link:hover { color: #7dd3fc; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
}
.checklist li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, .4);
  background: rgba(56, 189, 248, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.8' fill='none' stroke='%2338bdf8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0;
  font-size: 17px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq summary:hover { color: #fff; }
.faq details > div { padding: 0 0 22px; max-width: 680px; color: var(--muted); }
.faq details > div > * + * { margin-top: 10px; }
.faq a { color: var(--accent); border-bottom: 1px solid rgba(56, 189, 248, .3); }

/* 404 */
.nf { position: relative; overflow: hidden; padding: 140px 0 160px; text-align: center; }
.nf .container { position: relative; }
.nf-code { font-size: clamp(88px, 16vw, 168px); font-weight: 600; line-height: 1; letter-spacing: -0.05em; }
.nf h1 { margin-top: 16px; font-size: clamp(28px, 4vw, 36px); }
.nf p { margin: 14px auto 0; max-width: 440px; color: var(--muted); }
.nf .hero-ctas { justify-content: center; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 0; }
  .steps::before { display: none; }
  .company { grid-template-columns: 1fr; gap: 48px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-head { position: static; }
  .split + .split { margin-top: 72px; }
  .support-cards { grid-template-columns: 1fr 1fr; }
  .legal { grid-template-columns: 1fr; gap: 0; }
  .legal > .prose { grid-column: 1; }
  .legal-toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px 16px 16px;
    background: rgba(7, 11, 20, .97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: 0; }
  .menu-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-inner { justify-content: space-between; }

  .contact-card { grid-template-columns: 1fr; padding: 36px 28px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 80px 0 40px; }
  .hero-sub { font-size: 16.5px; }
  .facts { margin-top: 64px; gap: 10px 24px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .step { padding-right: 0; }
  .record-body div { grid-template-columns: 1fr; gap: 2px; }
  .contact-card { padding: 32px 20px; }
  .page-hero { padding: 64px 0 40px; }
  .section-tight { padding-top: 40px; }
  .legal { padding-top: 40px; padding-bottom: 80px; }
  .support-cards { grid-template-columns: 1fr; }
  .nf { padding: 96px 0 112px; }
  .footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}
