/* Flat: black, white and grays, one accent, hairlines instead of shadows. */
:root {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --text: #0a0b0d;
  --muted: #5f646b;
  --faint: #8a9098;
  --line: #e8e9eb;
  --accent: #0d9488;
  --primary-bg: #0a0b0d;
  --primary-text: #ffffff;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0d;
    --surface: #111317;
    --text: #ededee;
    --muted: #9298a0;
    --faint: #6b7178;
    --line: #1e2126;
    --accent: #2dd4bf;
    --primary-bg: #ededee;
    --primary-text: #0a0b0d;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }

.wrap { width: min(1080px, 100% - 48px); margin: 0 auto; }

/* Navigation. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 56px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand img { border-radius: 6px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.lang {
  font: inherit; font-size: 13px; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 10px; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.lang:hover { color: var(--text); border-color: var(--faint); }

/* Hero. */
.hero { padding: 104px 0 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); margin: 0 0 28px;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 10px;
}
.dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
/* The dot is live, as the app's "Live": a ring leaves it now and then. */
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--accent); opacity: 0;
  animation: live 2.4s var(--ease-out) 1.2s infinite;
}
@keyframes live {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(3); opacity: 0; }
}
h1 {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 0 0 24px;
  max-width: 12ch;
  text-wrap: balance;
}
/* Chinese is wider per character than ch counts. */
html:lang(zh-CN) h1 { max-width: 11em; letter-spacing: -0.03em; }
/* Headings break between words, at spaces and punctuation, not inside
   them: "接入" stays whole. */
html:lang(zh-CN) h1, html:lang(zh-CN) h2 { word-break: keep-all; }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 34em; margin: 0 0 36px; line-height: 1.55; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: 10px;
  font-weight: 500; font-size: 15px;
  border: 1px solid var(--line); color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 160ms var(--ease-out);
}
/* Feedback: a press sinks the button a little. */
.button:active { transform: scale(0.97); }
.button:hover { border-color: var(--faint); }
.button.primary { background: var(--primary-bg); color: var(--primary-text); border-color: var(--primary-bg); }
.button.primary:hover { opacity: 0.88; }
.fineprint { font-size: 13px; color: var(--faint); margin: 18px 0 0; }
#version:not(:empty)::after { content: " · "; }

.shot img { width: 100%; }
.hero-shot { margin-top: 72px; padding: 24px; border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--surface); }

/* Sections. */
.section { padding: 112px 0; border-top: 1px solid var(--line); }
.head { max-width: 640px; margin-bottom: 56px; }
.label { font-size: 13px; font-weight: 500; color: var(--accent); margin: 0 0 14px; }
h2 { font-size: clamp(30px, 4.2vw, 44px); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; margin: 0; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
p { margin: 0; }
.body { color: var(--muted); margin-top: 18px; font-size: 17px; }

/* Features: a grid split by hairlines. */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.features article {
  padding: 32px 28px 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.features svg {
  width: 22px; height: 22px; margin-bottom: 22px;
  fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.features p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* Two columns: text beside a picture or code. */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 72px; align-items: center; }
.split .shot { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.list li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; position: relative; }
.list li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.code {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 30px;
  font: 13.5px/1.75 "JetBrains Mono", ui-monospace, Menlo, monospace;
  color: var(--text);
  overflow-x: auto;
}
.code .c { color: var(--faint); }
.code .k { color: var(--accent); }
.code .s { color: var(--muted); }

/* Steps. */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li { border-top: 1px solid var(--text); padding-top: 22px; }
.num { display: block; font: 500 13px "JetBrains Mono", ui-monospace, monospace; color: var(--faint); margin-bottom: 18px; }
.steps p { color: var(--muted); font-size: 14.5px; }
.brew {
  display: block; margin-top: 14px; padding: 10px 12px;
  font: 12.5px "JetBrains Mono", ui-monospace, Menlo, monospace;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  overflow-x: auto; white-space: nowrap; user-select: all;
}

/* MyGo. */
.mygo { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.mygo-text { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.4; letter-spacing: -0.02em; max-width: 30em; }
.mygo .button { flex-shrink: 0; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--faint); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .brand { color: var(--text); font-size: 14px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .lang { margin-left: auto; }
  .hero { padding-top: 72px; }
  .hero-shot { padding: 12px; margin-top: 48px; }
  .features { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .mygo { flex-direction: column; align-items: flex-start; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
}

/* The hero arrives once, in order: what it is, then what it looks like. */
.hero .wrap:first-child > * { animation: rise 700ms var(--ease-out) both; }
.hero .wrap:first-child > .eyebrow { animation-delay: 0ms; }
.hero .wrap:first-child > h1 { animation-delay: 80ms; }
.hero .wrap:first-child > .lede { animation-delay: 160ms; }
.hero .wrap:first-child > .cta { animation-delay: 240ms; }
.hero .wrap:first-child > .fineprint { animation-delay: 320ms; }
.hero-shot { animation: rise-shot 900ms var(--ease-out) 360ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise-shot { from { opacity: 0; transform: translateY(24px) scale(0.98); } }

/* Sections come in as they scroll into view, once; with no script they
   simply show. */
.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Gentler, not gone: fades without movement. */
  .hero .wrap:first-child > *, .hero-shot { animation-name: fade; }
  @keyframes fade { from { opacity: 0; } }
  .js .reveal { transform: none; }
  .dot::after { animation: none; }
  .button:active { transform: none; }
}
