/* Shared look for the public site (index.html, guide.html). Large type, lots of room, one accent. */
:root {
  --bg: #ffffff;
  --bg2: #f5f5f3;
  --surface: #ffffff;
  --fg: #161615;
  --fg2: #5c5a55;
  --muted: #8b8881;
  --line: #e6e4df;
  --line2: #d6d3cc;
  --accent: #2d5be3;
  --accent-hover: #2149c4;
  --accent-fg: #ffffff;
  --accent-soft: #eef2fd;
  --ok: #1d7a4b;
  --ink: #0b0b0c; /* the always-dark band */
  --ink-fg: #f4f3f0;
  --ink-fg2: #a3a19b;
  --radius: 22px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 30px 60px -30px rgb(0 0 0 / 0.28);
  --nav-h: 52px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0d;
    --bg2: #171716;
    --surface: #1b1b1a;
    --fg: #f1efea;
    --fg2: #b3afa6;
    --muted: #85817a;
    --line: #2a2926;
    --line2: #3b3934;
    --accent: #7c99ff;
    --accent-hover: #9bb1ff;
    --accent-fg: #0b0b0c;
    --accent-soft: #1b2238;
    --ok: #57c48a;
    --ink: #000000;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 30px 60px -30px rgb(0 0 0 / 0.8);
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    17px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Inter,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}
code {
  font:
    0.88em/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-word;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}
.narrow {
  max-width: 760px;
}

/* ---- nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.8) blur(18px);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}
.logo i {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--fg) 0 55%, var(--accent) 55%);
  display: inline-block;
}
.nav a.link,
.nav button.lang {
  font: inherit;
  font-size: 13.5px;
  color: var(--fg2);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.nav a.link:hover,
.nav button.lang:hover,
.nav a.link[aria-current="page"] {
  color: var(--fg);
}
.nav .pill {
  padding: 6px 14px;
  font-size: 13.5px;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .nav .hide-sm {
    display: none;
  }
  .nav .wrap {
    gap: 2px;
  }
}
@media (max-width: 400px) {
  .nav .hide-xs {
    display: none;
  }
}

/* ---- buttons ---- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
.pill:hover {
  background: var(--accent-hover);
}
.pill:active {
  transform: scale(0.98);
}
.pill.ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line2);
}
.pill.ghost:hover {
  background: var(--bg2);
}
.pill.dark {
  background: var(--fg);
  color: var(--bg);
}
.more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.more::after {
  content: " ›";
}
.more:hover {
  text-decoration: underline;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- type ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg2);
  margin: 0 0 14px;
}
.eyebrow b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.kicker {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 10px;
}
.display {
  font-size: clamp(42px, 7.6vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 700;
  margin: 0;
}
.headline {
  font-size: clamp(32px, 5.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 18px;
}
.title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 680;
  margin: 0 0 12px;
}
html[lang="zh"] .display,
html[lang="zh"] .headline,
html[lang="zh"] .title {
  letter-spacing: -0.01em;
  line-height: 1.16;
}
.lede {
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
  color: var(--fg2);
  margin: 0;
  font-weight: 450;
}
.center {
  text-align: center;
}
.display,
.headline,
.title,
.lede {
  text-wrap: balance;
}
.center .lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 720px;
}
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, #8a5cf6 60%, #e2557a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- sections ---- */
.band {
  padding: clamp(80px, 12vw, 150px) 0;
}
.band.alt {
  background: var(--bg2);
}
.band.ink {
  background: var(--ink);
  color: var(--ink-fg);
  --fg: var(--ink-fg);
  --fg2: var(--ink-fg2);
  --line: #2a2a2a;
  --line2: #3a3a3a;
  --bg2: #161616;
}
.band.ink .kicker {
  color: #9db2ff;
}

/* ---- device frames ---- */
.shot {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--surface);
}
.shot img {
  width: 100%;
  height: auto;
}
.browser {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--surface);
}
.browser .chrome {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}
.browser .chrome span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line2);
}
.browser img {
  width: 100%;
  height: auto;
}
.phone {
  width: 100%;
  max-width: 300px;
  border-radius: 46px;
  padding: 10px;
  background: #111;
  box-shadow:
    0 0 0 1px #2c2c2c inset,
    var(--shadow);
}
.phone img {
  border-radius: 37px;
  width: 100%;
  height: auto;
}

/* ---- reveal on scroll (only when JS runs; respects reduced motion) ---- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
.js .reveal.d1 {
  transition-delay: 0.08s;
}
.js .reveal.d2 {
  transition-delay: 0.16s;
}
.js .reveal.d3 {
  transition-delay: 0.24s;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- footer ---- */
footer {
  background: var(--bg2);
  color: var(--muted);
  font-size: 13px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
}
footer .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--fg);
  text-decoration: underline;
}
footer .grow {
  flex: 1 1 260px;
}
