/* primitive 层：布局变量、base reset、组件类。
 *
 * ⚠️ 本文件**不含任何设计 token 定义**。
 *
 * token 在 landing/_tokens.css —— 那是**生成产物**，来自
 * design-system/design-tokens.json，由 scripts/gen-tokens.mjs 产出，
 * 由 npm run gate 拦截漂移。
 *
 * 为什么这样拆：
 *   之前 token 手写在本文件里，靠「JSON 赢了」这句注释维持一致。
 *   那是文档约定，不是机器强制。改 JSON 忘改 CSS 会静默分叉，
 *   而分叉的表现是「落地页和 App 颜色不一致」，没有任何报错。
 *   现在生产使用的 token 文件就是生成物，只有一份，无第二份可漂移。
 *
 * 判据：能被产品复用的「视觉原子」进 JSON；
 *       只在页面上成立的「版式节奏」留在这里。
 *       界限不清晰时，问「App 端要不要用同一个值」。
 */

/* ============================================================
   LAYOUT — 页面级排版节奏（不是 token，不进 JSON）
   ============================================================ */
:root {
  --gutter: 20px;
  --section-y: 48px;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
    --section-y: 72px;
  }
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,p,ul,ol,figure,dl,dd { margin: 0; }
ul,ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
button, input { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 62ch; }

/* type scale */
.t-xs  { font-size: var(--text-xs); }
.t-sm  { font-size: var(--text-sm); }
.t-lg  { font-size: var(--text-lg); }
.t-xl  { font-size: var(--text-xl); letter-spacing: -.005em; }
.t-2xl { font-size: var(--text-2xl); letter-spacing: -.01em; line-height: 1.25; }
.t-3xl { font-size: var(--text-3xl); letter-spacing: -.015em; line-height: 1.15; }
.t-4xl { font-size: var(--text-4xl); letter-spacing: -.02em; line-height: 1.05; }

.w-510 { font-weight: 510; }
.w-590 { font-weight: 590; }
.c-fg    { color: var(--fg); }
.c-fg2   { color: var(--fg-2); }
.c-muted { color: var(--muted); }
.c-meta  { color: var(--meta); }
.c-accent{ color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 52px; padding: 0 var(--space-5);
  border: 0; border-radius: var(--radius-sm);
  font-size: var(--text-lg); font-weight: 590; letter-spacing: 0;
  cursor: pointer; text-decoration: none;
  transition: background-color var(--motion-fast) var(--ease-standard),
              transform var(--motion-fast) var(--ease-standard),
              border-color var(--motion-fast) var(--ease-standard);
}
.btn-primary { background: var(--accent); color: var(--accent-on); width: 100%; }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-on); }
.btn-primary:active { background: var(--accent-active); transform: scale(.99); }
.btn-secondary {
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn[disabled] { background: var(--surface-warm); color: var(--muted); cursor: not-allowed; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 20;
  /* Explicit rgba rather than a mix function: the identical rule must hold
     in React Native, which does not support CSS color interpolation. */
  background: rgba(244, 246, 245, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
@media (prefers-color-scheme: dark) {
  .nav { background: rgba(11, 15, 14, .88); }
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: var(--space-4);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 590; font-size: var(--text-lg); color: var(--fg); text-decoration: none; }
.brand-mark { width: 22px; height: 22px; flex: 0 0 22px; color: var(--accent); }
.nav-link { font-size: var(--text-sm); color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--fg); }

/* ============================================================
   HERO  — asymmetric. Text left, product right. Never centered.
   ============================================================ */
.hero { padding-block: var(--space-10) var(--space-12); }
.hero-grid { display: grid; gap: var(--space-10); }
@media (min-width: 900px) {
  .hero { padding-block: var(--space-16) var(--space-20); }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--space-16); align-items: center; }
}

/* eyebrow: plain sentence case, no letter-spaced ALL CAPS spam */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 510; color: var(--accent);
  margin-bottom: var(--space-4);
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: var(--radius-pill);
  background: var(--accent); flex: 0 0 6px;
}

h1 { font-size: var(--text-4xl); font-weight: 590; letter-spacing: -.02em; line-height: 1.05; }
@media (min-width: 900px) { h1 { font-size: clamp(2.75rem, 4.2vw, 3.5rem); } }
.h1-sub {
  margin-top: var(--space-5);
  font-size: var(--text-lg); line-height: 1.55; color: var(--fg-2);
  max-width: 46ch;
}

/* inline proof line — replaces fake testimonial */
.proof {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-top: var(--space-6); padding: var(--space-4);
  background: var(--accent-tint);
  border-radius: var(--radius-md);
  font-size: var(--text-md); color: var(--fg-2);
}
.proof svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--accent); margin-top: 1px; }

.hero-cta { margin-top: var(--space-6); }
.hero-cta-note {
  margin-top: var(--space-3);
  font-size: var(--text-sm); color: var(--muted); line-height: 1.5;
}
.hero-cta-note strong { font-weight: 590; color: var(--fg-2); }
.alt-cta {
  margin-top: var(--space-5); padding-top: var(--space-5);
  border-top: 1px solid var(--border-soft);
  font-size: var(--text-sm); color: var(--muted);
}
.alt-cta a { font-weight: 510; }
.alt-cta-form { display: flex; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }
.alt-cta-form input[type=email] {
  flex: 1 1 200px; min-width: 0; min-height: 44px;
  padding: 0 var(--space-3);
  background: var(--surface); color: var(--fg);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: var(--text-md);
}
.alt-cta-form input[type=email]::placeholder { color: var(--meta); }
.alt-cta-form button {
  min-height: 44px; padding: 0 var(--space-4);
  background: transparent; color: var(--accent);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: var(--text-md); font-weight: 510; cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard);
}
.alt-cta-form button:hover { border-color: var(--accent); }

/* ============================================================
   ACCUMULATOR BAND  —  direction-agnostic primitive.
   Fills one cell per completed unit (day / week / session / stage).
   Kept as STRUCTURE only: no category semantics attached.
   Use it wherever the product's value is "evidence accumulating".
   ============================================================ */
.band { margin-top: var(--space-6); }
.band-track { display: grid; gap: 3px; grid-template-columns: repeat(var(--band-count, 8), 1fr); }
.band-cell {
  height: 34px; border-radius: 3px;
  background: var(--surface-warm);
}
.band-cell[data-state="done"]    { background: var(--accent); }
.band-cell[data-state="partial"] { background: var(--accent); opacity: .38; }
.band-cell[data-state="empty"]   { background: var(--surface-warm); box-shadow: inset 0 0 0 1px var(--border); }
.band-cell[data-state="current"] { background: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.band-scale {
  display: grid; gap: 3px; grid-template-columns: repeat(var(--band-count, 8), 1fr);
  margin-top: var(--space-2);
  font-size: var(--text-xs); color: var(--meta); text-align: center;
  font-variant-numeric: tabular-nums;
}
.band-legend {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
  font-size: var(--text-xs); color: var(--muted);
}
.legend-item { display: inline-flex; align-items: center; gap: var(--space-2); }
.legend-swatch { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 10px; }
.legend-swatch.s-done    { background: var(--accent); }
.legend-swatch.s-partial { background: var(--accent); opacity: .38; }
.legend-swatch.s-empty   { background: var(--surface-warm); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: var(--section-y); }
@media (min-width: 768px) { .section { padding-block: var(--space-16); } }
.section-head { max-width: 56ch; }
.section-head h2 { font-size: var(--text-2xl); font-weight: 590; letter-spacing: -.01em; line-height: 1.25; }
@media (min-width: 768px) { .section-head h2 { font-size: var(--text-3xl); letter-spacing: -.015em; } }
.section-head p { margin-top: var(--space-4); font-size: var(--text-lg); color: var(--fg-2); line-height: 1.55; }

.divider-top { border-top: 1px solid var(--border-soft); }

/* ---- STEPS: vertical, numbered, connected. Not three equal cards. ---- */
.steps { margin-top: var(--space-10); display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-8);
  position: relative;
}
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before {
  content: ""; position: absolute;
  left: 16px; top: 34px; bottom: 0; width: 1px;
  background: var(--border);
}
.step-num {
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  display: grid; place-items: center;
  background: var(--surface); color: var(--accent);
  border: 1.5px solid var(--border-strong);
  font-size: var(--text-sm); font-weight: 590;
  font-variant-numeric: tabular-nums;
  position: relative; z-index: 1;
}
.step-body h3 { font-size: var(--text-xl); font-weight: 510; letter-spacing: -.005em; }
.step-body p { margin-top: var(--space-2); font-size: var(--text-md); color: var(--muted); line-height: 1.6; max-width: 56ch; }

/* ---- REPORT: what you actually get ---- */
.report {
  margin-top: var(--space-10);
  display: grid; gap: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
@media (min-width: 768px) { .report { grid-template-columns: 1fr 1fr; } }
.report-row {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-soft);
  font-size: var(--text-md);
}
@media (min-width: 768px) {
  .report-row { border-bottom: 0; border-right: 1px solid var(--border-soft); }
  .report-row:nth-child(2n) { border-right: 0; }
  .report-row:nth-last-child(-n+2) { border-bottom: 0; }
}
.report-row svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--accent); margin-top: 1px; }
.report-row span { color: var(--fg-2); }

/* ============================================================
   PRICING
   ============================================================ */
.price-card {
  margin-top: var(--space-8);
  max-width: 520px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}
.price-row { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.price-now { font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 590; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-was { font-size: var(--text-lg); color: var(--meta); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.price-tag {
  font-size: var(--text-xs); font-weight: 510;
  padding: 3px var(--space-2);
  background: var(--accent-tint); color: var(--accent);
  border-radius: var(--radius-xs);
}
.price-terms { margin-top: var(--space-4); display: grid; gap: var(--space-2); font-size: var(--text-md); color: var(--fg-2); }
.price-terms li { display: flex; gap: var(--space-2); align-items: flex-start; }
.price-terms svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--accent); margin-top: 3px; }
.price-card .btn { margin-top: var(--space-5); }
.price-fineprint { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--muted); line-height: 1.5; }
.price-fineprint strong { font-weight: 590; color: var(--fg-2); }

/* ---- refund band: the strongest trust object on the page ---- */
.refund {
  margin-top: var(--space-10);
  padding: var(--space-6);
  background: var(--surface-warm);
  border-radius: var(--radius-md);
}
.refund h3 { font-size: var(--text-xl); font-weight: 590; letter-spacing: -.005em; }
.refund p { margin-top: var(--space-3); font-size: var(--text-md); color: var(--fg-2); line-height: 1.6; max-width: 62ch; }
.refund p + p { margin-top: var(--space-2); }
.refund strong { font-weight: 590; }

/* ============================================================
   FAQ  — details/summary, no JS
   ============================================================ */
.faq { margin-top: var(--space-8); border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding-block: var(--space-5);
  font-size: var(--text-lg); font-weight: 510;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq-icon { flex: 0 0 20px; width: 20px; height: 20px; color: var(--muted); transition: transform var(--motion-base) var(--ease-standard); }
.faq details[open] .faq-icon { transform: rotate(45deg); }
.faq-answer { padding-bottom: var(--space-5); font-size: var(--text-md); color: var(--fg-2); line-height: 1.65; max-width: 68ch; }
.faq-answer p + p { margin-top: var(--space-3); }

/* ============================================================
   FINAL CTA + FOOTER
   ============================================================ */
.final { padding-block: var(--section-y); border-top: 1px solid var(--border-soft); }
@media (min-width: 768px) { .final { padding-block: var(--space-16); } }
.final-inner { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .final-inner { grid-template-columns: 1fr 320px; align-items: center; gap: var(--space-12); } }
.final h2 { font-size: var(--text-2xl); font-weight: 590; letter-spacing: -.01em; line-height: 1.25; }
.final p { margin-top: var(--space-3); font-size: var(--text-md); color: var(--muted); max-width: 48ch; }

.footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm); color: var(--muted);
}
.footer-nav {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-4);
}
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--fg); text-decoration: underline; }
.footer-legal { line-height: 1.6; max-width: 68ch; }
.footer-legal + .footer-legal { margin-top: var(--space-2); }

/* ============================================================
   MOTION — respect reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .btn-primary:active { transform: none; }
}

/* ============================================================
   PRINT — legal pages & the report matter on paper
   ============================================================ */
@media print {
  .nav, .hero-cta, .alt-cta, .final, .footer-nav { display: none; }
  body { background: #fff; color: #000; }
  .band, .promise, .summary { box-shadow: none; }
}
