/* ============================================================
   尖子生背单词 · StudyKeep 官网
   品牌色 / 间距 / 圆角 / 动效 均取自 尖子生背单词_tokens.json（唯一真源）
   字体自托管，零外部依赖
   ============================================================ */

/* ── 字体 ─────────────────────────────────────────────── */
@font-face {
  font-family: "PlusJakarta";
  src: url("../fonts/PlusJakartaSans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PlusJakarta";
  src: url("../fonts/PlusJakartaSans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PlusJakarta";
  src: url("../fonts/PlusJakartaSans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SourceSerifShow";
  src: url("../fonts/SourceSerif4-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "SourceSerifShow";
  src: url("../fonts/SourceSerif4-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ── 变量 ─────────────────────────────────────────────── */
:root {
  --paper:        oklch(98% 0.006 175);
  --surface-1:    oklch(100% 0.003 175);
  --surface-2:    oklch(94% 0.008 175);
  --ink:          oklch(26% 0.015 175);
  --ink-soft:     oklch(45% 0.012 175);
  --ink-faint:    oklch(62% 0.010 175);
  --line:         oklch(90% 0.008 175);
  --line-strong:  oklch(82% 0.012 175);
  --brand:        oklch(78% 0.135 173);
  --brand-strong: oklch(54% 0.112 178);
  --brand-soft:   oklch(95% 0.030 175);
  --brand-tint:   oklch(96% 0.020 175);
  --brand-ink:    oklch(30% 0.045 180);
  --on-brand:     oklch(99% 0.010 175);
  --f0:           oklch(64% 0.160 24);
  --f0-soft:      oklch(95% 0.055 24);
  --f1:           oklch(80% 0.135 84);
  --f1-strong:    oklch(58% 0.140 78);
  --f1-soft:      oklch(96% 0.060 84);
  --f2:           oklch(70% 0.130 150);
  --f2-strong:    oklch(55% 0.140 152);
  --f2-soft:      oklch(95% 0.050 150);

  --sh-1: 0 1px 2px oklch(27% 0.02 262 / .06), 0 1px 3px oklch(27% 0.02 262 / .04);
  --sh-2: 0 4px 10px oklch(27% 0.02 262 / .07), 0 2px 4px oklch(27% 0.02 262 / .05);
  --sh-3: 0 12px 28px oklch(27% 0.02 262 / .10), 0 4px 10px oklch(27% 0.02 262 / .06);

  --e-out: cubic-bezier(.25, 1, .5, 1);
  --t-fast: 140ms; --t-mid: 280ms; --t-slow: 460ms;

  --font-ui: "PlusJakarta", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-show: "SourceSerifShow", "Songti SC", Georgia, serif;

  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --wrap: 1160px;
  --nav-h: 68px;
}

/* ── 基础 ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 700; }
em { font-style: normal; color: var(--brand-strong); }
ol, ul { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 32px); }
.wrap-narrow { max-width: 820px; }
.ta-center { text-align: center; }

/* ── 导航 ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(244, 250, 248, 0.85); /* 旧浏览器 fallback（≈ paper 85%） */
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--e-out), background var(--t-mid) var(--e-out);
}
.nav.is-stuck { border-bottom-color: var(--line); background: rgba(244, 250, 248, 0.93); background: color-mix(in oklab, var(--paper) 92%, transparent); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--ink-faint); letter-spacing: .08em; text-transform: uppercase; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--r-s);
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: var(--ink); background: var(--brand-tint); text-decoration: none; }
.nav-cta { margin-left: 8px; }

/* ── 按钮 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 20px; min-height: 44px;
  transition: transform var(--t-fast) var(--e-out), box-shadow var(--t-mid) var(--e-out), background var(--t-fast);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: var(--on-brand);
  box-shadow: 0 6px 18px oklch(54% 0.112 178 / .28), 0 2px 6px oklch(54% 0.112 178 / .20);
}
.btn-primary:hover { box-shadow: 0 10px 26px oklch(54% 0.112 178 / .34), 0 3px 8px oklch(54% 0.112 178 / .22); }

.btn-ghost { background: var(--surface-1); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-ink); }

.btn-lg { padding: 16px 28px; border-radius: var(--r-m); font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 14px; min-height: 38px; border-radius: var(--r-s); }
.btn-mini { padding: 8px 14px; font-size: 13px; min-height: 44px; border-radius: var(--r-s); background: var(--surface-1); color: var(--brand-strong); border: 1px solid var(--line-strong); }

.btn-ico { width: 20px; height: 20px; flex-shrink: 0; }
.btn-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; text-align: left; }
.btn-label b { font-size: 16px; font-weight: 700; }
.btn-label i { font-style: normal; font-size: 12px; font-weight: 400; opacity: .85; }

/* ── 第一屏 ───────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(36px, 6vw, 80px) 0 clamp(56px, 8vw, 96px);
  background:
    radial-gradient(900px 520px at 78% -8%, var(--brand-soft) 0%, transparent 62%),
    radial-gradient(700px 420px at 4% 8%, var(--brand-tint) 0%, transparent 58%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface-1); border: 1px solid var(--line-strong);
  box-shadow: var(--sh-1);
  font-size: 13px; font-weight: 600; color: var(--brand-ink);
  letter-spacing: .01em;
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-strong);
  box-shadow: 0 0 0 3px oklch(54% 0.112 178 / .16);
  animation: pulse 2.4s var(--e-out) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px oklch(54% 0.112 178 / .16); }
  50%      { box-shadow: 0 0 0 6px oklch(54% 0.112 178 / .04); }
}

.hero h1 {
  margin: 20px 0 18px;
  font-family: var(--font-show);
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.015em;
}
.lede { font-size: clamp(15px, 1.5vw, 17px); color: var(--ink-soft); max-width: 34em; }

.cta-box { margin-top: 32px; }
.cta-note { margin-top: 12px; font-size: 13px; color: var(--ink-faint); }
.cta-alt { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.cta-alt a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.notice {
  display: flex; gap: 12px; margin-top: 24px; padding: 16px;
  background: var(--f1-soft); border: 1px solid oklch(80% 0.135 84 / .45);
  border-radius: var(--r-m);
}
/* display:flex 会覆盖 hidden 属性的 UA 样式，必须显式压回（否则 Windows 用户也会看到降级提示） */
.notice[hidden] { display: none; }
.notice-ico { display: block; width: 20px; height: 20px; flex-shrink: 0; color: var(--f1-strong); margin-top: 2px; }
.notice-ico svg, .callout-ico svg { display: block; width: 100%; height: 100%; }
.notice b { display: block; font-size: 14px; }
.notice p { font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }

/* App 界面示意 */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .glow {
  position: absolute; inset: 8% 12% 12% 12%;
  background: radial-gradient(closest-side, var(--brand) 0%, transparent 72%);
  opacity: .22; filter: blur(48px); z-index: 0;
}
.appshot { position: relative; z-index: 1; width: min(100%, 380px); height: auto; }
.appshot text { font-family: var(--font-ui); }
.s-title { fill: var(--on-brand); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.s-meta { fill: var(--ink-faint); font-size: 11px; }
.s-meta.strong { fill: var(--brand-strong); font-weight: 700; }
.s-tag { fill: var(--brand-ink); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.s-word { fill: var(--ink); font-family: var(--font-show); font-size: 34px; font-weight: 600; }
.s-ipa  { fill: var(--ink-faint); font-size: 13px; font-family: "Charis SIL", Georgia, serif; }
.s-cn   { fill: var(--ink); font-size: 15px; font-weight: 600; }
.s-en   { fill: var(--ink-soft); font-size: 12px; font-style: italic; }
.s-en.dim { fill: var(--ink-faint); font-style: normal; }
.s-btn  { fill: var(--ink-soft); font-size: 12px; font-weight: 700; }
.fg-f0 { fill: var(--f0); } .fg-f1 { fill: var(--f1-strong); } .fg-f2 { fill: var(--f2-strong); }
.on-brand { fill: var(--on-brand); }
.s-tab-t { fill: var(--ink-faint); font-size: 10px; }
.s-tab-t.on { fill: var(--brand-strong); font-weight: 700; }

/* ── 通用区块 ─────────────────────────────────────────── */
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec-alt { background: linear-gradient(180deg, var(--brand-tint) 0%, var(--surface-1) 100%); }

.sec-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-strong);
}
.sec-head h2 { font-family: var(--font-show); font-size: clamp(26px, 3.6vw, 38px); font-weight: 600; }
.sec-lede { margin-top: 14px; color: var(--ink-soft); font-size: clamp(14px, 1.4vw, 16px); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--sh-1);
  transition: transform var(--t-mid) var(--e-out), box-shadow var(--t-mid) var(--e-out), border-color var(--t-mid);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--ink-soft); }
.card-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 13px; background: var(--brand-soft); color: var(--brand-ink);
}
.card-ico svg { width: 22px; height: 22px; }
.card-flat { box-shadow: none; background: #F5FAF7; background: color-mix(in oklab, var(--surface-1) 70%, var(--brand-tint)); }
.card-flat:hover { box-shadow: var(--sh-1); }
.card-mini { text-align: left; }
.card-mini h3 { font-size: 16px; }

/* ── 记忆引擎 ─────────────────────────────────────────── */
.engine-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 24px; align-items: start; }

.ladder {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: clamp(20px, 3vw, 28px); box-shadow: var(--sh-1);
}
.ladder-head {
  display: flex; justify-content: space-between; padding-bottom: 12px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700;
  color: var(--ink-faint); letter-spacing: .06em;
}
.ladder-list { list-style: none; }
.ladder-list li {
  display: grid; grid-template-columns: 72px 1fr 56px; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
}
.ladder-list li:last-child { border-bottom: 0; }
.lv { font-size: 13px; font-weight: 700; }
.lv0 { color: var(--f0); } .lv1 { color: var(--f1-strong); } .lv2 { color: oklch(72% 0.110 175); }
.lv3 { color: oklch(66% 0.110 175); } .lv4 { color: oklch(60% 0.120 155); } .lv5 { color: var(--brand-strong); }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: var(--w); border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
  transform-origin: left;
}
.reveal.in .bar i { animation: grow 900ms var(--e-out) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ladder-list b { text-align: right; font-size: 14px; color: var(--ink); }
.ladder-foot { margin-top: 16px; font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 20px; text-align: center; box-shadow: var(--sh-1);
}
.stat b {
  display: block; font-family: var(--font-show); font-size: clamp(24px, 3vw, 30px);
  font-weight: 600; color: var(--brand-strong); line-height: 1.1;
}
.stat span { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-faint); line-height: 1.5; }

/* ── SmartScreen 提示 ─────────────────────────────────── */
.callout {
  display: flex; gap: 16px; margin-top: 24px; padding: clamp(20px, 3vw, 28px);
  background: var(--f1-soft); border: 1px solid oklch(80% 0.135 84 / .45);
  border-radius: var(--r-l);
}
.callout-ico { display: block; flex-shrink: 0; width: 26px; height: 26px; color: var(--f1-strong); }
.callout h3 { font-size: 16px; margin-bottom: 8px; }
.callout p { font-size: 14px; color: var(--ink-soft); }
.steps { list-style: none; counter-reset: s; margin: 14px 0; }
.steps li {
  counter-increment: s; position: relative; padding-left: 30px; margin-bottom: 8px;
  font-size: 14px; color: var(--ink);
}
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--f1-strong); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.callout-foot { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }

/* ── 适用人群 ─────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 32px; }
.chip {
  padding: 8px 18px; border-radius: 999px;
  background: var(--surface-1); border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 600; color: var(--brand-ink);
  box-shadow: var(--sh-1);
}
.who-grid { margin-top: 0; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--r-m); overflow: hidden;
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
}
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; color: var(--ink);
  min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex-shrink: 0; width: 10px; height: 10px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg) translateY(-2px); transition: transform var(--t-mid) var(--e-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p {
  padding: 0 20px 18px; font-size: 14px; color: var(--ink-soft); line-height: 1.75;
}

/* ── 底部 CTA ─────────────────────────────────────────── */
.cta-bottom {
  padding: clamp(56px, 8vw, 96px) 0;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--paper) 60%, var(--brand-tint) 100%);
  border-top: 1px solid var(--line);
}
.cta-bottom h2 { font-family: var(--font-show); font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; }
.cta-bottom > .wrap > p { margin-top: 12px; color: var(--ink-soft); }
.cta-bottom .btn { margin-top: 28px; }
.cta-note-light { color: var(--ink-faint); }
.cta-alt-light { color: var(--ink-soft); }

/* ── 页脚 ─────────────────────────────────────────────── */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); background: var(--surface-1); }
.foot-inner { text-align: center; }
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.foot-meta { margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
.foot-links { margin-top: 14px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.foot-links a { font-size: 13px; color: var(--ink-faint); }
.foot-links a:hover { color: var(--brand-strong); }
.foot-copy { margin-top: 16px; font-size: 12px; color: var(--ink-faint); }

/* ── 品牌图标（SVG 填充走 CSS 类，跨引擎兼容） ────────── */
.brand-mark .bm-bg { fill: var(--brand); }
.brand-mark .bm-stroke { fill: none; stroke: var(--brand-ink); stroke-width: 2.4; stroke-linecap: round; }
.brand-mark .bm-dot { fill: var(--brand-ink); }
#gTop .gs1 { stop-color: var(--brand); }
#gTop .gs2 { stop-color: var(--brand-strong); }

/* ── 滚动动效 ─────────────────────────────────────────── */
/* 由 main.js 首行给 <html> 加 .js 后才启用隐藏；无 JS / JS 失败时内容始终可见 */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 560ms var(--e-out), transform 560ms var(--e-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── 响应式 ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .cta-box, .notice { width: 100%; max-width: 460px; }
  .notice { text-align: left; }
  .engine-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-visual { order: 2; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  body { font-size: 15px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 40px); }
  .btn-lg { width: 100%; padding: 16px 20px; }
  .btn-lg .btn-label { align-items: center; text-align: center; }
  .ladder-list li { grid-template-columns: 62px 1fr 48px; gap: 8px; }
  .callout { flex-direction: column; gap: 12px; }
  .faq summary { font-size: 14.5px; padding: 14px 16px; }
  .faq details p { padding: 0 16px 16px; }
  .chips { gap: 8px; }
  .chip { padding: 7px 14px; font-size: 13px; }
  .foot-links { gap: 14px; }
}

@media (max-width: 380px) {
  .brand-text i { display: none; }
  .stat b { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
