/* Landing page · hero 区。营销页词汇（准则 §2）：浮起白卡、大圆角、描边 + 大模糊柔和阴影、胶囊按钮、ambient 漂浮。
   颜色一律取 css-current/designTokens.css；下面三个是 landing 专用的形状 token（app 里没有这一档），落地时并进 designTokens.css。 */
:root, [data-theme] {
  --radius-hero-card: 18px;
  --radius-pill: 999px;
  --shadow-hero: 0 1px 2px rgb(40 30 20 / 0.05), 0 24px 64px -12px rgb(40 30 20 / 0.18);
}
:root { --hero-headline-weight: 700; }
[data-theme='dark'] { --shadow-hero: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 64px -12px rgb(0 0 0 / 0.55); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface-page); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-tint); }

/* ---------- 顶栏 ---------- */
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.site-brand { display: inline-flex; text-decoration: none; }
/* 字标拆成同尺寸两层，和 readerAppShell.css 同一做法：三色旗保留原色，文字当遮罩取 --ink */
.site-brand-wordmark { position: relative; display: block; height: 40px; aspect-ratio: 301 / 200; background: url('/assets/french-dojo-flag.png') center / contain no-repeat; }
.site-brand-wordmark::before { content: ''; position: absolute; inset: 0; background: var(--ink); mask: url('/assets/french-dojo-wordmark.png') center / contain no-repeat; -webkit-mask: url('/assets/french-dojo-wordmark.png') center / contain no-repeat; }
.site-nav-links { display: flex; align-items: center; gap: 8px; }
.site-nav-link { padding: 8px 12px; border-radius: var(--radius-pill); font-size: 15px; color: var(--ink-secondary); text-decoration: none; transition: color 200ms ease, background-color 200ms ease; }
.site-nav-link:hover { color: var(--ink); background: var(--surface-sunken); }

/* ---------- 按钮 ---------- */
.pill-primary, .pill-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border-radius: var(--radius-pill); font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform 250ms ease, background-color 250ms ease, border-color 250ms ease;
}
.pill-primary { border: 0; background: var(--ink); color: var(--ink-on-ink); }
.pill-primary:hover { transform: translateY(-1px); }
.pill-primary .arrow { transition: transform 250ms ease; }
.pill-primary:hover .arrow { transform: translateX(3px); }
.pill-secondary { border: 1px solid var(--line-strong); background: transparent; color: var(--ink); }
.pill-secondary:hover { background: var(--surface-sunken); }
.pill-small { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ---------- hero 通用 ---------- */
.hero-eyebrow { margin: 0; font-family: var(--font-reading); font-size: 17px; font-style: italic; color: var(--accent); }
.hero-headline {
  margin: 0; font-family: var(--font-display); font-weight: var(--hero-headline-weight); line-height: 1.02; letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-lede { margin: 0; font-size: 19px; line-height: 1.6; color: var(--ink-secondary); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero-mock-float { animation: hero-float 6s ease-in-out infinite; }
@keyframes hero-float { 0%, 100% { transform: translateY(0) rotate(var(--float-rotate, 0deg)); } 50% { transform: translateY(-8px) rotate(calc(var(--float-rotate, 0deg) + 0.3deg)); } }

/* ---------- 演示节点（三个方案三种摆法，同一个组件） ---------- */
.demo-steps { display: flex; align-items: flex-start; gap: 8px; }
.demo-steps-list { flex: 1; display: grid; margin: 0; padding: 0; list-style: none; }
.demo-step {
  position: relative; display: grid; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: var(--ink-secondary);
  transition: color 250ms ease;
}
.demo-step:hover, .demo-step[aria-current='step'] { color: var(--ink); }
.demo-step-number { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-placeholder); }
.demo-step[aria-current='step'] .demo-step-number { color: var(--accent); }
.demo-step-progress { position: relative; height: 2px; border-radius: 2px; background: var(--line-hairline); overflow: hidden; }
.demo-step-progress::after { content: ''; position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.demo-replay {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line-hairline); border-radius: 50%;
  background: var(--surface-panel); color: var(--ink-secondary); transition: color 200ms ease, background-color 200ms ease;
}
.demo-replay:hover { color: var(--ink); background: var(--surface-sunken); }
.demo-replay .icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* bar：mock 下面一行四段进度，段上写长句 */
.demo-steps--bar .demo-steps-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.demo-steps--bar .demo-step { grid-template-rows: auto auto auto; gap: 6px; }
.demo-steps--bar .demo-step-progress { order: -1; margin-bottom: 4px; }
.demo-steps--bar .demo-step-label { font-size: 13px; line-height: 1.4; }
.demo-steps--bar .demo-replay { margin-top: -6px; }

/* tabs：mock 上沿一排下划线 tab，短词 */
.demo-steps--tabs { align-items: center; justify-content: center; }
.demo-steps--tabs .demo-steps-list { flex: none; grid-auto-flow: column; gap: 4px; }
.demo-steps--tabs .demo-step { grid-template-columns: auto auto; align-items: baseline; gap: 8px; padding: 12px 18px 14px; }
.demo-steps--tabs .demo-step-label { font-size: 16px; font-weight: 500; }
.demo-steps--tabs .demo-step-progress { position: absolute; left: 18px; right: 18px; bottom: 0; }

/* list：竖排带编号，当前项正文色 */
.demo-steps--list { flex-direction: column; gap: 18px; }
.demo-steps--list .demo-steps-list { width: 100%; gap: 0; }
.demo-steps--list .demo-step { grid-template-columns: 34px minmax(0, 1fr); align-items: baseline; column-gap: 8px; padding: 12px 0 13px; }
.demo-steps--list .demo-step-label { font-size: 16px; }
.demo-steps--list .demo-step-progress { position: absolute; left: 0; right: 0; bottom: 0; }
.demo-steps--list li + li .demo-step { border-top: 0; }

/* 不自动播放（reduced-motion / ?step=）：节点退化成可点的功能清单，不画进度、不给重播 */
.demo-steps--static .demo-step-progress::after { transform: scaleX(0); }
.demo-steps--static .demo-step[aria-current='step'] .demo-step-progress::after { transform: scaleX(1); }
.demo-steps--static .demo-replay { display: none; }

/* ==========================================================================
   方案 1 · 左文右 mock
   ========================================================================== */
.hero-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr); align-items: center; gap: 64px; max-width: 1240px; min-height: calc(100svh - 76px); margin: 0 auto; padding: 24px 40px 72px; }
.hero-split .hero-copy { display: grid; gap: 22px; max-width: 520px; }
.hero-split .hero-headline { font-size: clamp(44px, 5.4vw, 72px); }
.hero-split .hero-actions { margin-top: 10px; }
.hero-split .hero-demo { display: grid; gap: 26px; }

/* ==========================================================================
   方案 2 · 居中大字，四个功能当 tab 压在 mock 上沿
   ========================================================================== */
.hero-stage { max-width: 1240px; margin: 0 auto; padding: 40px 40px 0; text-align: center; }
.hero-stage .hero-copy { display: grid; justify-items: center; gap: 18px; max-width: 900px; margin: 0 auto; }
.hero-stage .hero-headline { font-size: clamp(48px, 5.8vw, 84px); }
.hero-stage .hero-lede { max-width: 860px; }
.hero-stage .hero-actions { justify-content: center; margin-top: 6px; }
.hero-stage .hero-demo { position: relative; max-width: 980px; margin: 32px auto 0; }
/* 矮屏（笔记本浏览器约 1280×720–800）把 mock 按视口高度收窄，暂停译文卡片仍留在首屏里：
   596px ≈ mock 上沿（1280–1440 宽时 558–577px）+ 余量，820 / 314 = 画布宽 / 卡片底边在画布里的高度；最窄 560px，再窄正文就看不清 */
.hero-stage .hero-demo > [data-reader-mock] { width: clamp(560px, calc((100svh - 596px) * 820 / 314), 100%); margin: 0 auto; }
.hero-stage .demo-steps { margin-bottom: 14px; }
/* mock 下半截被一层渐隐的纸色收掉：首屏底边像在画布中间截断，暗示下面还有 */
.hero-stage .hero-demo::after { content: ''; position: absolute; left: -40px; right: -40px; bottom: -1px; height: 120px; background: linear-gradient(to bottom, transparent, var(--surface-page)); pointer-events: none; }
.hero-stage .mock-frame { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* ==========================================================================
   方案 3 · 整屏墨色名片（VI 深色名片），纸色 mock 斜放出血
   ========================================================================== */
.hero-ink-section { background: var(--surface-page); color: var(--ink); overflow: hidden; }
.hero-ink {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr; gap: 40px 56px;
  max-width: 1240px; min-height: calc(100svh - 76px); margin: 0 auto; padding: 28px 40px 0;
}
.hero-ink .hero-title-block { grid-column: 1 / -1; display: grid; gap: 18px; }
.hero-ink .hero-headline { font-size: clamp(52px, 7.2vw, 108px); line-height: 0.98; }
.hero-ink .hero-copy { display: flex; flex-direction: column; gap: 26px; padding-bottom: 56px; }
.hero-ink .hero-lede { max-width: 470px; }
.hero-ink .demo-steps { max-width: 470px; }
.hero-ink .hero-demo { position: relative; align-self: start; margin: 8px -120px -80px 0; --float-rotate: -2.5deg; }
.hero-ink .hero-demo .mock-frame { border-color: transparent; }
[data-theme='dark'] .hero-ink .pill-secondary { border-color: var(--line-strong); }

/* ---------- 手机 ---------- */
@media (max-width: 899px) {
  .site-nav { height: 64px; padding: 0 16px; }
  .site-brand-wordmark { height: 34px; }
  .site-nav-link { display: none; }
  .hero-lede { font-size: 17px; }
  .pill-primary, .pill-secondary { min-height: 48px; }

  .hero-split { grid-template-columns: minmax(0, 1fr); gap: 40px; min-height: 0; padding: 20px 16px 48px; }
  .hero-split .hero-headline { font-size: 44px; }
  .demo-steps--bar .demo-steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }

  .hero-stage { padding: 36px 16px 0; }
  .hero-stage .hero-headline { font-size: 46px; }
  .hero-stage .hero-demo { margin-top: 40px; }
  .hero-stage .hero-demo > [data-reader-mock] { width: 100%; }
  .hero-stage .hero-demo::after { left: -16px; right: -16px; height: 72px; }
  .demo-steps--tabs { justify-content: flex-start; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .demo-steps--tabs .demo-replay { display: none; }
  .demo-steps--tabs .demo-step { padding: 10px 12px 12px; }
  .demo-steps--tabs .demo-step-number { display: none; }
  .demo-steps--tabs .demo-step-progress { left: 12px; right: 12px; }

  .hero-ink { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 24px; min-height: 0; padding: 20px 16px 0; }
  .hero-ink .hero-headline { font-size: 56px; }
  /* 手机：mock 提到功能清单前面，清单紧跟在演示下面当进度 */
  .hero-ink .hero-copy { display: contents; }
  .hero-ink .hero-demo { order: 3; margin: 16px -110px 0 0; }
  .hero-ink .demo-steps { order: 4; padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero-mock-float { animation: none; transform: rotate(var(--float-rotate, 0deg)); }
}

