/* Momo — momowrite.com. Plain CSS, system fonts, no build step. */

:root {
  color-scheme: light;
  --bg: #fbfbfc;
  --bg-soft: #f3f4f6;
  --card: #ffffff;
  --text: #111114;
  --text-2: #565961;
  --text-3: #7c7f87;
  --line: rgba(10, 12, 20, 0.09);
  --line-strong: rgba(10, 12, 20, 0.16);
  --accent: #1a73d9;
  --accent-soft: rgba(47, 140, 245, 0.12);
  --glow: rgba(77, 163, 255, 0.2);
  --btn-bg: #111114;
  --btn-fg: #ffffff;
  --header-bg: rgba(251, 251, 252, 0.78);
  --shot-shadow: 0 0 0 1px rgba(10, 12, 20, 0.08), 0 2px 6px rgba(15, 25, 45, 0.05), 0 40px 80px -28px rgba(15, 30, 60, 0.28);
  --card-shadow: 0 0 0 1px rgba(10, 12, 20, 0.07), 0 1px 2px rgba(15, 25, 45, 0.04);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09090b;
    --bg-soft: #111114;
    --card: #141417;
    --text: #f4f4f6;
    --text-2: #a4a7af;
    --text-3: #7d8088;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #6ab3ff;
    --accent-soft: rgba(94, 173, 255, 0.14);
    --glow: rgba(64, 140, 255, 0.22);
    --btn-bg: #f4f4f6;
    --btn-fg: #0b0b0d;
    --header-bg: rgba(9, 9, 11, 0.72);
    --shot-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 90px -30px rgba(0, 0, 0, 0.9);
    --card-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --bg-soft: #111114;
  --card: #141417;
  --text: #f4f4f6;
  --text-2: #a4a7af;
  --text-3: #7d8088;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #6ab3ff;
  --accent-soft: rgba(94, 173, 255, 0.14);
  --glow: rgba(64, 140, 255, 0.22);
  --btn-bg: #f4f4f6;
  --btn-fg: #0b0b0d;
  --header-bg: rgba(9, 9, 11, 0.72);
  --shot-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
kbd {
  font: 500 0.86em/1 var(--mono);
  padding: 0.22em 0.42em;
  border-radius: 6px;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

/* Chinese headings break at punctuation and spaces, not in the middle of a phrase. */
h1:lang(zh-Hans), h2:lang(zh-Hans), h3:lang(zh-Hans) { word-break: keep-all; overflow-wrap: anywhere; }

/* Language: both languages are in the page; only the chosen one is shown. */
html[data-lang="en"] [lang="zh-Hans"]:not([data-lang-set]),
html[data-lang="zh"] [lang="en"]:not([data-lang-set]) { display: none !important; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px; background: var(--btn-bg); color: var(--btn-fg); font-size: 14px;
}
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a { padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--text-2); transition: color 0.2s, background-color 0.2s; }
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav + .tools { margin-left: 0; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.seg button {
  appearance: none; border: 0; background: none; cursor: pointer;
  min-width: 40px; height: 28px; padding: 0 10px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.06); }
.icon-btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: none; color: var(--text-2); transition: color 0.2s, background-color 0.2s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-soft); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .moon { display: none; }
.icon-btn[aria-pressed="true"] .sun { display: none; }
.icon-btn[aria-pressed="true"] .moon { display: block; }
.soon-pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong);
  white-space: nowrap;
}

/* Buttons */
.btn {
  appearance: none; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 16px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap;
}
.btn[disabled] { cursor: default; opacity: 1; }
.btn .dot { width: 7px; height: 7px; border-radius: 50%; background: #4da3ff; box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.22); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; }
.cta-note { font-size: 14px; color: var(--text-3); }

/* Hero */
.hero { position: relative; padding-top: clamp(56px, 9vw, 112px); text-align: center; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -6%;
  width: min(1500px, 150vw); height: 78%; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 100%);
  pointer-events: none;
}
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px;
  background: var(--card); box-shadow: var(--card-shadow);
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.eyebrow-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 {
  margin: 26px auto 0; max-width: 15ch;
  font-size: clamp(40px, 7vw, 80px); line-height: 1.03; font-weight: 650; letter-spacing: -0.04em;
  text-wrap: balance;
}
h1:lang(zh-Hans) { max-width: none; font-size: clamp(26px, 8vw, 70px); line-height: 1.16; letter-spacing: -0.01em; font-weight: 600; }
.lead {
  margin: 24px auto 0; max-width: 36em;
  font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; color: var(--text-2); text-wrap: pretty;
}
.lead:lang(zh-Hans) { max-width: 30em; line-height: 1.75; }
.hero .cta { margin-top: 34px; }

.film { margin-top: clamp(48px, 7vw, 84px); }
.film-frame {
  position: relative; border-radius: clamp(12px, 1.8vw, 22px); overflow: hidden;
  background: #05070c; box-shadow: var(--shot-shadow); aspect-ratio: 16 / 9;
}
.film-frame video { width: 100%; height: 100%; object-fit: cover; background: #05070c; }
.film-note { margin-top: 16px; font-size: 13px; color: var(--text-3); }

/* The loop */
.loop { padding-block: clamp(64px, 9vw, 120px) 0; }
.loop ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 28px; counter-reset: step; }
.loop li { counter-increment: step; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.loop li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font: 500 12px/1 var(--mono); color: var(--text-3); letter-spacing: 0.04em;
}
.loop h3 { margin-top: 14px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.loop p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }

/* Sections */
.section { padding-block: clamp(88px, 13vw, 176px) 0; }
.section-head { max-width: 760px; margin-inline: auto; text-align: center; }
.kicker { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; }
h2 {
  margin-top: 14px;
  font-size: clamp(30px, 4.6vw, 54px); line-height: 1.07; font-weight: 650; letter-spacing: -0.035em;
  text-wrap: balance;
}
h2:lang(zh-Hans) { line-height: 1.22; letter-spacing: -0.01em; font-weight: 600; font-size: clamp(28px, 4.2vw, 48px); }
.section-head p.body, .split-text p.body {
  margin-top: 20px; font-size: clamp(16.5px, 1.5vw, 19px); line-height: 1.6; color: var(--text-2); text-wrap: pretty;
}
.section-head p.body:lang(zh-Hans), .split-text p.body:lang(zh-Hans) { line-height: 1.8; }

.shot {
  position: relative; border-radius: clamp(7px, 1vw, 13px); overflow: hidden;
  background: var(--card); box-shadow: var(--shot-shadow);
}
.shot img { width: 100%; }
.section > .wrap > .shot { margin-top: clamp(40px, 6vw, 72px); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 13.5px; color: var(--text-2); background: var(--card); box-shadow: var(--card-shadow); white-space: nowrap;
}

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(28px, 4vw, 48px); }
.card { border-radius: 18px; background: var(--card); box-shadow: var(--card-shadow); overflow: hidden; }
.card figure img { width: 100%; border-bottom: 1px solid var(--line); }
.card figcaption, .card .card-text { padding: 18px 20px 20px; }
.card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.012em; }
.card p { margin-top: 5px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }

/* Comment steps: three states of the same panel */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(28px, 4vw, 48px); counter-reset: st; }
.steps li { counter-increment: st; }
.steps .card { height: 100%; display: flex; flex-direction: column; }
.steps .card-text { order: -1; padding: 22px 22px 18px; }
.steps .card-text::before {
  content: counter(st, decimal-leading-zero);
  display: block; margin-bottom: 12px; font: 500 12px/1 var(--mono); color: var(--text-3); letter-spacing: 0.04em;
}
.steps .panel { margin: 0 22px; border-radius: 12px 12px 0 0; overflow: hidden; box-shadow: 0 0 0 1px var(--line); flex: 1; background: var(--bg-soft); }
.steps .panel img { width: 100%; }

/* Split rows */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.flip .split-text { order: 2; }
.split-text h2 { margin-top: 14px; }
.split-text h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; font-weight: 650; letter-spacing: -0.028em; text-wrap: balance; }
.split-text h3:lang(zh-Hans) { letter-spacing: -0.005em; line-height: 1.3; font-weight: 600; }
.ticks { margin-top: 22px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 7px;
  border-left: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent); transform: rotate(-45deg) scale(0.85);
  transform-origin: center;
}
.sub-row { margin-top: clamp(56px, 8vw, 104px); }
.split-media.narrow { width: 100%; max-width: 400px; margin-inline: auto; }

/* Tools */
.tools-block { margin-top: clamp(56px, 8vw, 104px); text-align: center; }
.tools-block h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 650; letter-spacing: -0.025em; }
.tools-block h3:lang(zh-Hans) { letter-spacing: 0; font-weight: 600; }
.tools-block > p { margin: 10px auto 0; max-width: 40em; font-size: 15.5px; color: var(--text-2); }
.tool-list { max-width: 940px; margin-inline: auto; }
.tool-list li { color: var(--text); }
.mark { flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.mark.none { -webkit-mask: none; mask: none; width: 6px; height: 6px; margin-inline: 3px; border-radius: 50%; background: var(--text-3); }
.m-amp { --m: url(/assets/marks/amp.svg); } .m-antigravity { --m: url(/assets/marks/antigravity.svg); }
.m-claudecode { --m: url(/assets/marks/claudecode.svg); } .m-cline { --m: url(/assets/marks/cline.svg); }
.m-codebuddy { --m: url(/assets/marks/codebuddy.svg); } .m-codex { --m: url(/assets/marks/codex.svg); }
.m-cursor { --m: url(/assets/marks/cursor.svg); } .m-deepseek { --m: url(/assets/marks/deepseek.svg); }
.m-devin { --m: url(/assets/marks/devin.svg); } .m-geminicli { --m: url(/assets/marks/geminicli.svg); }
.m-githubcopilot { --m: url(/assets/marks/githubcopilot.svg); } .m-goose { --m: url(/assets/marks/goose.svg); }
.m-grok { --m: url(/assets/marks/grok.svg); } .m-kilocode { --m: url(/assets/marks/kilocode.svg); }
.m-kimi { --m: url(/assets/marks/kimi.svg); } .m-mistral { --m: url(/assets/marks/mistral.svg); }
.m-opencode { --m: url(/assets/marks/opencode.svg); } .m-openhands { --m: url(/assets/marks/openhands.svg); }
.m-pi { --m: url(/assets/marks/pi.svg); } .m-qwen { --m: url(/assets/marks/qwen.svg); }
.m-trae { --m: url(/assets/marks/trae.svg); } .m-workbuddy { --m: url(/assets/marks/workbuddy.svg); }
.m-zai { --m: url(/assets/marks/zai.svg); }

/* Two closing cards */
.duo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.duo .card { display: flex; flex-direction: column; }
.duo .card-text { padding: clamp(24px, 3vw, 36px); padding-bottom: 0; }
.duo h2 { margin-top: 12px; font-size: clamp(26px, 3vw, 36px); }
.duo h2:lang(zh-Hans) { font-size: clamp(25px, 2.8vw, 33px); }
.duo .card p.body { margin-top: 14px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.duo .card p.body:lang(zh-Hans) { line-height: 1.8; }
.duo .art { margin-top: auto; padding: clamp(24px, 3vw, 36px); padding-bottom: 0; }
.pair { position: relative; aspect-ratio: 16 / 10.4; }
.pair .shot { position: absolute; width: 78%; }
.pair .shot:first-child { left: 0; top: 0; }
.pair .shot:last-child { right: 0; top: 22%; }
.private-art { border-radius: 12px 12px 0 0; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.private-art img { width: 100%; }

/* Closing */
.closing { padding-block: clamp(96px, 14vw, 184px); text-align: center; position: relative; }
.closing::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 10%; width: min(900px, 120vw); height: 520px;
  transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 100%); pointer-events: none;
}
.closing .app-icon { width: clamp(96px, 12vw, 132px); margin-inline: auto; filter: drop-shadow(0 18px 30px rgba(20, 60, 120, 0.2)); }
.closing h2 { margin-top: 22px; font-size: clamp(40px, 6vw, 68px); }
.closing .lead { margin-top: 14px; }
.closing .cta { margin-top: 32px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px 48px; font-size: 13.5px; color: var(--text-3); }
.site-footer .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer .brand { font-size: 15px; color: var(--text); }
.site-footer .brand img { width: 24px; height: 24px; }
.credits { margin-top: 22px; max-width: 880px; line-height: 1.65; }
.credits summary { cursor: pointer; width: fit-content; color: var(--text-2); border-radius: 6px; }
.credits summary:hover { color: var(--text); }
.credits p { margin-top: 10px; }
.credits a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.credits a:hover { color: var(--text); }

/* 404 */
.lost { min-height: calc(100vh - 61px); min-height: calc(100svh - 61px); display: grid; place-items: center; text-align: center; padding-block: 64px; }
.lost .spirit { width: 132px; height: 132px; margin-inline: auto; border-radius: 50%; overflow: hidden; }
.lost h1 { font-size: clamp(34px, 5vw, 52px); max-width: none; margin-top: 28px; }
.lost .lead { margin-top: 14px; }
.lost .btn { margin-top: 30px; }
a.btn { transition: transform 0.25s var(--ease), opacity 0.2s; }
a.btn:hover { opacity: 0.88; }
a.btn:active { transform: scale(0.98); }

/* Scroll reveal (only with JS, never with reduced motion) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; }
.js .reveal.d2 { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Tablet */
@media (max-width: 960px) {
  .nav { display: none; }
  .nav + .tools { margin-left: auto; }
  .loop ol { grid-template-columns: repeat(6, 1fr); gap: 28px 24px; }
  .loop li { grid-column: span 2; }
  .loop li:nth-child(n + 4) { grid-column: span 3; }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip .split-text { order: 0; }
  .split-text { max-width: 640px; margin-inline: auto; text-align: center; }
  .split-text .ticks { text-align: left; width: fit-content; margin-inline: auto; }
  .split-media { max-width: 640px; margin-inline: auto; width: 100%; }
}

/* Phone */
@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header .wrap { height: 56px; gap: 12px; }
  .soon-pill { display: none; }
  .trio, .steps, .duo { grid-template-columns: 1fr; }
  .steps .panel img { max-height: 420px; object-fit: cover; object-position: top; }
  .loop ol { grid-template-columns: 1fr; gap: 0; }
  .loop li, .loop li:nth-child(n + 4) { grid-column: auto; display: grid; grid-template-columns: 34px 1fr; padding-block: 16px; }
  .loop li::before { grid-row: span 2; padding-top: 5px; }
  .loop h3 { margin-top: 0; font-size: 17px; }
  .loop p { margin-top: 3px; }
  .btn { height: 48px; }
  .chips li { height: 30px; font-size: 13px; padding: 0 11px; }
  .lost { min-height: calc(100svh - 57px); }
}

/* Art that exists once per appearance */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none; }
  :root:not([data-theme="light"]) .only-dark { display: block; }
}
:root[data-theme="dark"] .only-light { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
