/* manabi 官网。配色 / 字体 / 圆角刻意与应用本体同源(crates/app/ui/styles.css)——
   落地页和产品长得不像同一个东西,是最廉价的不信任。 */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #fbfbfa;
  --raise: #f6f6f5;
  --text: #37352f;
  --muted: #787774;
  --faint: #9b9a97;
  --line: #ebebea;
  --line2: #e3e3e1;
  --hover: rgba(55, 53, 47, 0.055);
  --accent: #2f76d6;
  --accent-soft: #eaf1fb;
  --good: #2f7a52;
  --good-soft: #e9f3ec;
  --recast: #b8741a;
  --recast-soft: #faf0e1;
  --r: 10px;
  --r-sm: 6px;
  --sans: system-ui, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --wrap: 1080px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191919;
  --surface: #202020;
  --raise: #242424;
  --text: #e6e6e3;
  --muted: #9b9a97;
  --faint: #6f6f6c;
  --line: #2e2e2c;
  --line2: #3a3a37;
  --hover: rgba(255, 255, 255, 0.06);
  --accent: #5b9bf0;
  --accent-soft: #1e2c44;
  --good: #5cb389;
  --good-soft: #17271f;
  --recast: #d6a04a;
  --recast-soft: #2c2618;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
.icon-defs { position: absolute; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--raise); padding: 1px 5px; border-radius: 4px; }
kbd {
  font-family: var(--sans); font-size: 0.82em; border: 1px solid var(--line2);
  border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--bg); color: var(--muted);
}
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.big { width: 22px; height: 22px; color: var(--accent); }
.faint { color: var(--faint); }

/* ---- 顶栏 ---- */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 12px max(20px, calc((100vw - var(--wrap)) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.2px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand img { display: block; }   /* 去掉 inline 图片的基线间隙,不然图标比文字低半格 */
.top nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
.theme {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  background: var(--bg); color: var(--muted); cursor: pointer;
}
.theme:hover { background: var(--surface); color: var(--text); }
@media (max-width: 720px) { .top nav { display: none; } }

/* ---- 通用区块 ---- */
main { padding: 0 max(20px, calc((100vw - var(--wrap)) / 2)); }
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.sec-head { max-width: 760px; margin-bottom: 34px; }
.sec-head h2 { font-size: 27px; line-height: 1.35; margin: 0 0 10px; letter-spacing: -0.4px; }
.sec-head p { margin: 0; color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 10px 20px; font-size: 14.5px; font-family: var(--sans);
  background: var(--bg); color: var(--text); cursor: pointer; text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.btn:hover { background: var(--surface); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #2a6ac6; border-color: #2a6ac6; }

/* ---- Hero ---- */
.hero { padding: 86px 0 76px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(31px, 5.4vw, 50px); line-height: 1.22; letter-spacing: -1px; margin: 0 0 22px; }
.hero .lede { max-width: 720px; font-size: 17px; color: var(--muted); margin: 0 0 30px; }
.hero .lede b { color: var(--text); font-weight: 600; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.fineprint { margin: 18px 0 0; font-size: 13px; color: var(--faint); }

/* ---- 演示 ---- */
.demo-sec .sec-head p b { color: var(--text); }
.demo-wrap { border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; background: var(--raise); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.chrome .dots { display: flex; gap: 7px; }
/* 真的红绿灯。原来三个点用的是 --line2,深色下几乎和标题栏一个颜色 ——
   看不见的窗口装饰等于没有,而这三个点正是「这是一个桌面应用」的第一眼信号。 */
.chrome .dots i { width: 11px; height: 11px; border-radius: 50%; }
.chrome .dots i:nth-child(1) { background: #ff5f57; }
.chrome .dots i:nth-child(2) { background: #febc2e; }
.chrome .dots i:nth-child(3) { background: #28c840; }
.chrome .title { font-weight: 600; color: var(--text); }
.chrome .tag { margin-left: auto; padding: 1px 9px; border-radius: 999px; background: var(--recast-soft); color: var(--recast); font-size: 11.5px; }

/* demo 是 900×680 的桌面窗口。用 transform 等比缩放塞进容器 ——
   改 iframe 宽度会触发应用自己的响应式断点,那就不是 1:1 了。 */
/* 高度用宽高比推出来:iframe 还没加载时占位框也得是对的形状,
   否则手机上先看到一个 680px 高的空盒子。 */
.stage { position: relative; width: 100%; aspect-ratio: 900 / 680; overflow: hidden; background: var(--bg); }
.stage iframe { position: absolute; top: 0; left: 0; width: 900px; height: 680px; border: 0; transform-origin: top left; }
.stage-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.stage-ph p { margin: 0; font-size: 12.5px; }

.tryme { margin: 26px 0 0; padding-left: 22px; color: var(--muted); max-width: 800px; }
.tryme li { margin-bottom: 7px; }
.tryme b { color: var(--text); }
.honest {
  margin: 20px 0 0; padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--recast-soft); color: var(--recast); font-size: 13.5px; max-width: 800px;
}

/* ---- 亮点卡 ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.cards article { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: var(--surface); }
.cards h3 { font-size: 18px; margin: 12px 0 8px; }
.cards p { margin: 0; color: var(--muted); font-size: 14.5px; }
.cards b { color: var(--text); font-weight: 600; }

/* ---- 阶梯 ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.steps > div { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--surface); }
.steps .n { font-size: 20px; color: var(--accent); }
.steps h4 { margin: 6px 0 6px; font-size: 15.5px; }
.steps p { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.steps em { font-style: normal; font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.steps .local { background: var(--good-soft); color: var(--good); }
.steps .cloud { background: var(--recast-soft); color: var(--recast); }

/* ---- 它不是什么 ---- */
.nots ul { max-width: 820px; margin: 0; padding-left: 22px; color: var(--muted); }
.nots li { margin-bottom: 11px; }
.nots b { color: var(--text); }

/* ---- 技术 ---- */
.tech dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 28px; margin: 0; }
.tech dl > div { padding: 14px 0; border-top: 1px solid var(--line); }
.tech dt { font-weight: 600; font-size: 14.5px; }
.tech dd { margin: 3px 0 0; color: var(--muted); font-size: 14px; }

/* ---- 时间轴 ---- */
.timeline { position: relative; padding-left: 22px; max-width: 840px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line2); }
.tl-day { position: relative; margin-bottom: 26px; }
.tl-day::before {
  content: ""; position: absolute; left: -22px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line2);
}
.tl-day:first-child::before { border-color: var(--accent); background: var(--accent); }
.tl-date { font-size: 12.5px; color: var(--faint); font-family: var(--mono); margin-bottom: 8px; }
.tl-item { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; font-size: 14.5px; }
.tl-kind { flex: none; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--raise); color: var(--muted); }
.tl-kind.feat { background: var(--accent-soft); color: var(--accent); }
.tl-kind.fix { background: var(--recast-soft); color: var(--recast); }
.tl-kind.perf, .tl-kind.polish { background: var(--good-soft); color: var(--good); }
.tl-area { flex: none; color: var(--faint); font-size: 13px; }
.tl-title { color: var(--muted); }
.log .btn { margin-top: 8px; }

/* ---- 定价 ---- */
/* 两张卡等高(grid 默认 stretch),按钮各自钉底 —— 内容量天生不等,靠拉伸对齐 */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.plan {
  position: relative; border: 1px solid var(--line2); border-radius: var(--r);
  padding: 26px; background: var(--surface);
  display: flex; flex-direction: column;
}
.plan .btn { margin-top: auto; }
.plan.pro { border-color: var(--accent); background: var(--bg); }
.ribbon {
  position: absolute; top: -11px; left: 26px; font-size: 11.5px;
  background: var(--accent); color: #fff; padding: 2px 11px; border-radius: 999px;
}
.plan h3 { margin: 0; font-size: 17px; }
.amount { font-size: 34px; font-weight: 700; margin: 6px 0 2px; letter-spacing: -1px; }
.amount span { font-size: 13px; font-weight: 400; color: var(--faint); margin-left: 8px; letter-spacing: 0; }
.plan-for { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
/* Pro 卡三档价签:月/年/永久并排,永久是主推位 */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; }
.tier {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 6px 9px;
  text-align: center; background: var(--surface);
}
.tier.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.t-name { display: block; font-size: 12px; color: var(--muted); }
.t-price { display: block; font-size: 21px; font-weight: 700; letter-spacing: -0.5px; margin-top: 3px; }
.t-was { font-size: 13px; font-weight: 400; color: var(--faint); margin-right: 5px; letter-spacing: 0; }
.t-note { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.plan ul { list-style: none; margin: 0 0 22px; padding: 0; }
.plan li { display: flex; gap: 9px; align-items: flex-start; padding: 5px 0; font-size: 14px; color: var(--muted); }
.plan li .ic { width: 15px; height: 15px; color: var(--good); margin-top: 5px; }
.plan li b { color: var(--text); font-weight: 600; }
.plan li em { font-style: normal; color: var(--faint); font-size: 0.92em; }
.plan .btn { width: 100%; }
.refund { margin: 12px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }
.price-note { margin: 26px 0 0; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
#dl-ready { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-meta { color: var(--faint); font-size: 13px; }
.dl-note { flex-basis: 100%; margin: 8px 0 0; font-size: 12.5px; color: var(--faint); line-height: 1.6; }

/* ---- FAQ ---- */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; max-width: 840px; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 15px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋"; color: var(--faint); margin-right: 10px; font-weight: 400; }
.faq details[open] summary::before { content: "－"; }
.faq p { margin: 0 0 14px; padding-left: 26px; color: var(--muted); font-size: 14.5px; }

/* ---- 页脚 ---- */
footer { padding: 40px max(20px, calc((100vw - var(--wrap)) / 2)) 60px; border-top: 1px solid var(--line); }
.foot-main p { margin: 0 0 8px; font-size: 13.5px; }
.foot-brand { display: flex; align-items: center; gap: 8px; }
.foot-main .faint { font-size: 12.5px; line-height: 1.7; }

/* demo 是 900px 桌面窗口的等比缩放,窄屏上会显得小 —— 说一句,别让人以为是坏了 */
.small-note { display: none; margin: 12px 0 0; font-size: 12.5px; color: var(--faint); }
@media (max-width: 720px) { .small-note { display: block; } }

@media (max-width: 640px) {
  section { padding: 52px 0; }
  .hero { padding: 56px 0 50px; }
  .sec-head h2 { font-size: 23px; }
  .tryme, .honest { font-size: 13.5px; }
}
