/* Posemark website — one stylesheet for every page. Bilingual: elements carry lang="zh-CN" or
   lang="en" and the one that does not match <html lang> is hidden. */
:root {
  --brand: #2f62e6;
  --brand-deep: #1d3a94;
  --accent: #ff8a3d;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-card: #ffffff;
  --fg: #1b2333;
  --fg-muted: #5b6577;
  --border: #e3e8f0;
  --code-bg: #f1f4f9;
  --shadow: 0 18px 50px rgba(20, 40, 100, .12);
  --radius: 14px;
  --max: 1160px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #6f95ff;
    --bg: #0f1420;
    --bg-soft: #151c2b;
    --bg-card: #18202f;
    --fg: #e6eaf2;
    --fg-muted: #9aa5b8;
    --border: #273145;
    --code-bg: #1e2738;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

html[lang^="zh"] [lang="en"], html[lang="en"] [lang="zh-CN"] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); padding: 2px 6px; border-radius: 5px; }
kbd { font-family: var(--mono); font-size: .82em; padding: 2px 7px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--bg-card); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; height: 64px; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-size: 19px; }
.logo:hover { text-decoration: none; }
.logo img { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--fg-muted); font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--fg); text-decoration: none; }
.lang-toggle {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--fg);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--brand); }
.menu-btn { display: none; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 12px;
  font-weight: 600; font-size: 15.5px; border: 1px solid transparent; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-ghost { background: var(--bg-card); color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); }

/* ------------------------------------------------------------------ hero */
.hero { padding: 84px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 720px; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%);
}
.eyebrow { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); padding: 4px 12px; border-radius: 999px; }
.hero h1, .section-head h2, .showcase h3 { text-wrap: balance; }
.hero .lead, .section-head p { text-wrap: pretty; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.12; margin: 20px auto 18px; letter-spacing: -.5px; max-width: 900px; }
.hero h1 .hl { background: linear-gradient(90deg, var(--brand), #7a5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: var(--fg-muted); max-width: 720px; margin: 0 auto 34px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.platforms { margin-top: 16px; font-size: 14px; color: var(--fg-muted); }
.window {
  margin: 56px auto 0; max-width: 1080px; border-radius: 14px; overflow: hidden; background: var(--bg-card);
  box-shadow: var(--shadow), 0 0 0 1px var(--border);
}
.window .bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.window .bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window .bar i:nth-child(2) { background: #febc2e; }
.window .bar i:nth-child(3) { background: #28c840; }

/* ------------------------------------------------------------------ sections */
section.block { padding: 88px 0; }
section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.2; margin: 0 0 14px; letter-spacing: -.3px; }
.section-head p { color: var(--fg-muted); margin: 0; font-size: 17px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px; }
.feature .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--fg-muted); font-size: 14.5px; line-height: 1.65; }

.showcase { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; margin-bottom: 96px; }
.showcase:last-child { margin-bottom: 0; }
.showcase.flip { grid-template-columns: 7fr 5fr; }
.showcase.flip .copy { order: 2; }
.showcase h3 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; margin: 0 0 14px; }
.showcase p { color: var(--fg-muted); margin: 0 0 16px; }
.showcase ul { margin: 0; padding: 0; list-style: none; }
.showcase li { padding-left: 26px; position: relative; margin: 8px 0; }
.showcase li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.shot { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--border); background: var(--bg-card); }
/* feature shots are cropped to the part that matters, so they sit on a tinted mat instead of a window frame */
.showcase .shot {
  padding: 22px; border-radius: 18px; box-shadow: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--bg-soft)), color-mix(in srgb, #7a5cff 14%, var(--bg-soft)));
}
.showcase .shot img { border-radius: 10px; box-shadow: var(--shadow), 0 0 0 1px var(--border); }

.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.dl h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 20px; }
.dl h3 svg { width: 24px; height: 24px; }
.dl p { color: var(--fg-muted); font-size: 14.5px; margin: 0 0 18px; flex: 1; }
.dl .links { display: flex; flex-direction: column; gap: 10px; }
.dl .links .btn { justify-content: center; height: 42px; font-size: 14.5px; }
.note { text-align: center; color: var(--fg-muted); font-size: 14px; margin-top: 26px; }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--fg-muted); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; margin-left: auto; }
.site-footer a { color: var(--fg-muted); }

/* ------------------------------------------------------------------ docs / prose pages */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 80px; }
.docs-nav { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 14.5px; }
.docs-nav h4 { margin: 18px 0 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-muted); }
.docs-nav a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--fg); }
.docs-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.docs-nav a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.prose { max-width: 800px; }
.prose h1 { font-size: 38px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.3px; }
.prose h2 { font-size: 26px; margin: 56px 0 14px; padding-top: 8px; border-top: 1px solid var(--border); }
.prose h2:first-of-type { border-top: 0; }
.prose h3 { font-size: 19px; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--fg); }
.prose .lead { color: var(--fg-muted); font-size: 18px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 6px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--bg-soft); font-weight: 600; }
.prose pre { background: var(--code-bg); border-radius: 10px; padding: 16px 18px; overflow-x: auto; font: 13.5px/1.6 var(--mono); }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose .shot { margin: 20px 0 8px; }
.callout { border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 7%, transparent); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 18px 0; }
.callout p { margin: 0; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .showcase, .showcase.flip { grid-template-columns: 1fr; gap: 28px; }
  .showcase.flip .copy { order: 0; }
  .downloads { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; max-height: none; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav a.hide-sm { display: none; }
  .nav { gap: 14px; }
  .features { grid-template-columns: 1fr; }
  section.block { padding: 64px 0; }
  .hero { padding-top: 56px; }
  .site-footer nav { margin-left: 0; }
}
