/*
 * [INPUT]:  无外部依赖 (系统字体栈, 零外链 — 与隐私铁律自洽)
 * [OUTPUT]: 言壤落地页骨架样式 — tokens/base/nav/hero/sections/footer/motion/响应式
 * [POS]:    样式层主文件; app 界面复刻样式见 mockups.css
 * [PROTOCOL]: 变更时更新此头部, 然后检查 CLAUDE.md
 */

/* ════════════════════════════ Design Tokens ════════════════════════════ */
:root {
  --bg: #0a0a0c;
  --bg-2: #0f0f12;
  --surface: #161619;
  --surface-2: #1d1d21;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);

  --ink: #f4f4f5;
  --ink-muted: #a6a6ae;
  --ink-faint: #9a9aa3;        /* 提亮至 WCAG AA (≥4.5:1 on all bg): 用于时间戳/meta 等小字 */

  --red: #ff3b33;
  --red-deep: #c81e2a;
  --green: #30d158;
  --blue: #0a84ff;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
          "Noto Sans SC", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 14px;
  --radius-sm: 10px;

  --ease: cubic-bezier(.16, 1, .3, 1);            /* ease-out-expo-ish */
  --z-nav: 100;

  --sect-gap: clamp(5rem, 11vw, 9rem);
}

/* ════════════════════════════════ Base ════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 按语言切换字体栈: 同一汉字在中/日字体字形不同, 韩文需专用黑体; 全系统字体, 零加载 */
html[lang="en"] { --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif; }
html[lang="ja"] { --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif; }
html[lang="ko"] { --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; }
/* 日韩文字更密更长(日文无空格), Hero 标题按字种收一档, 避免窄列里词被拆断 */
html[lang="ja"] .hero-title { font-size: clamp(2.1rem, 4.8vw, 3.6rem); }
html[lang="ko"] .hero-title { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; font-weight: 700; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
strong, b { font-weight: 650; color: var(--ink); }
em { font-style: normal; }
::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.accent { color: var(--red); }

/* ══════════════════════════ Brand mark / badge ══════════════════════════ */
/* logo: 真实白色 logo PNG, 按徽章尺寸等比缩放 (单规则覆盖所有档位) */
.brand-mark { width: 66%; height: auto; display: block; }
.brand-badge {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(150deg, var(--red), var(--red-deep));
  box-shadow: 0 4px 14px rgba(255, 59, 51, .35);
  flex: none;
}
.brand-badge.lg { width: 46px; height: 46px; border-radius: 12px; }
.brand-badge.xl { width: 72px; height: 72px; border-radius: 18px; }

.brand-dot { color: var(--red); }

/* ════════════════════════════════ Nav ════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem var(--pad);
  background: rgba(10, 10, 12, .72);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; font-size: .95rem; color: var(--ink-muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: .25rem; }

/* ════════════════════════════ 语言切换器 ════════════════════════════ */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .7rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--ink-muted); font-size: .9rem;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { color: var(--ink); border-color: var(--border-strong); background: var(--surface); }
.i-globe { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.lang-menu .caret { font-size: .65rem; transition: transform .25s var(--ease); }
.lang-menu[open] .caret { transform: rotate(180deg); }
.lang-pop {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 60;
  display: grid; min-width: 156px; padding: .35rem;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7);
}
.lang-opt {
  text-align: left; background: none; border: none; cursor: pointer; font: inherit;
  color: var(--ink-muted); font-size: .92rem; padding: .55rem .7rem; border-radius: 8px;
  transition: background .15s, color .15s;
}
.lang-opt:hover { background: var(--surface-2); color: var(--ink); }
.lang-opt.active { color: var(--red); font-weight: 600; }

/* ════════════════════════════════ Buttons ════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .7rem 1.15rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .25s;
  white-space: nowrap;
}
.btn-lg { font-size: 1.05rem; padding: .95rem 1.6rem; }
.btn-primary {
  background: linear-gradient(160deg, #ff5149, var(--red-deep));
  color: #fff; box-shadow: 0 6px 22px rgba(255, 59, 51, .32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 59, 51, .45); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-muted); transform: translateY(-2px); }

.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: rec 1.8s var(--ease) infinite; flex: none; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 70%,100% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: live 2s ease-in-out infinite; flex: none; display: inline-block; }
@keyframes live { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ════════════════════════════════ Layout ════════════════════════════════ */
section { padding-left: var(--pad); padding-right: var(--pad); }
.section-head { max-width: 760px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
.section-head p { margin-top: 1rem; color: var(--ink-muted); font-size: 1.1rem; max-width: 62ch; margin-inline: auto; }

/* ════════════════════════════════ Hero ════════════════════════════════ */
.hero { position: relative; padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: var(--sect-gap); overflow: hidden; }
.hero-glow {
  position: absolute; top: -28%; left: 50%; transform: translateX(-50%);
  width: min(1100px, 120vw); height: 760px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(46% 50% at 50% 38%, rgba(255, 59, 51, .20), transparent 70%),
    radial-gradient(40% 45% at 64% 30%, rgba(120, 90, 255, .08), transparent 72%);
  filter: blur(8px);
}
.hero-inner {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9rem; color: var(--ink-muted); margin-bottom: 1.4rem;
  font-family: var(--mono); letter-spacing: .02em;
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 700; letter-spacing: -0.04em; }
.hero-sub { margin-top: 1.5rem; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-muted); max-width: 40ch; line-height: 1.7; }
.hero-sub strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero-aux { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.5rem; margin-top: 1.3rem; }
.hero-gh, .hero-scroll { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-muted); font-size: .92rem; transition: color .2s; }
.hero-gh:hover, .hero-scroll:hover { color: var(--ink); }
.hero-meta { margin-top: 1.4rem; font-size: .85rem; color: var(--ink-faint); font-family: var(--mono); }
.stage-caption { margin-top: 1.1rem; text-align: center; font-size: .9rem; color: var(--ink-faint); }

/* ════════════════════════════ Trust strip ════════════════════════════ */
.trust-strip {
  max-width: var(--maxw); margin: 0 auto var(--sect-gap);
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.4rem clamp(1rem, 4vw, 2.5rem);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  color: var(--ink-muted); font-size: .98rem;
}
.trust-strip span { display: inline-flex; align-items: center; gap: .55rem; }
.ts-ico { color: var(--red); font-style: normal; font-size: 1.05rem; }

/* ════════════════════════════════ Pillars ════════════════════════════════ */
.pillars { max-width: var(--maxw); margin: 0 auto; padding-bottom: var(--sect-gap); }
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; }
.pillar {
  padding: 1.8rem 1.6rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); transition: transform .35s var(--ease), border-color .3s, background .3s;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.pillar-tag { font-family: var(--mono); font-size: .78rem; color: var(--red); letter-spacing: .04em; }
.pillar h3 { font-size: 1.3rem; margin: .8rem 0 .6rem; }
.pillar p { color: var(--ink-muted); font-size: .98rem; }

/* ════════════════════════════════ Feature ════════════════════════════════ */
.feature {
  max-width: var(--maxw); margin: 0 auto; padding-bottom: var(--sect-gap);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
.feature-kicker { font-family: var(--mono); font-size: .82rem; color: var(--red); letter-spacing: .05em; margin-bottom: 1rem; }
.feature-copy h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.feature-copy > p { margin-top: 1.2rem; color: var(--ink-muted); font-size: 1.08rem; max-width: 46ch; }
.feature-copy strong { color: var(--ink); }
.feature-list { list-style: none; margin-top: 1.6rem; display: grid; gap: 1rem; }
.feature-list li { position: relative; padding-left: 1.6rem; color: var(--ink-muted); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.feature-list b { color: var(--ink); }
.feature-note { font-size: .92rem !important; color: var(--ink-faint) !important; border-top: 1px solid var(--border); padding-top: 1.1rem; margin-top: 1.6rem !important; }

/* feature visuals: vault / pipeline / gates */
.feature-visual { min-width: 0; }
.vault, .pipeline, .gates { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); padding: clamp(1.4rem, 3vw, 2rem); }

.vault-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; justify-content: center; }
.vault-chip { font-size: .85rem; padding: .55rem .8rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); }
.vault-chip.on { border-color: rgba(48, 209, 88, .5); color: #d8ffe4; box-shadow: 0 0 18px rgba(48,209,88,.12) inset; }
.vault-arrow { color: var(--green); }
.vault-cloud { margin-top: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border: 1px dashed rgba(255,59,51,.45); border-radius: var(--radius-sm); opacity: .65; }
.cloud-label { color: var(--ink-muted); }
.cloud-x { color: var(--red); font-size: .85rem; font-family: var(--mono); }

.pipeline { list-style: none; display: grid; gap: 0; }
.pipeline li { position: relative; padding: 0 0 1.5rem 1.8rem; }
.pipeline li:last-child { padding-bottom: 0; }
.pipeline li::after { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: linear-gradient(var(--red), transparent); }
.pipeline li:last-child::after { display: none; }
.pipe-dot { position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px rgba(255,59,51,.5); }
.pipeline b { display: block; font-size: 1.05rem; }
.pipeline em { color: var(--ink-muted); font-size: .9rem; }

.gates { display: grid; gap: 1rem; text-align: center; }
.gate { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.gate-no { font-size: .82rem; padding: .4rem .7rem; border-radius: 999px; color: var(--ink-faint); border: 1px solid var(--border); text-decoration: line-through; }
.gate-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.door { padding: .9rem .5rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.door b { display: block; font-size: .98rem; }
.door em { display: block; color: var(--ink-muted); font-size: .76rem; margin-top: .25rem; }
.gate-yes { color: var(--green); font-weight: 600; display: inline-block; padding: .5rem 1rem; border: 1px solid rgba(48,209,88,.4); border-radius: 999px; }

/* ════════════════════════════════ Tour ════════════════════════════════ */
.tour { max-width: var(--maxw); margin: 0 auto; padding-bottom: var(--sect-gap); }
.tour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.4rem; }
.tour-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: transform .35s var(--ease), border-color .3s; }
.tour-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.tour-cap { padding: 1.3rem 1.5rem 1.6rem; }
.tour-cap h3 { font-size: 1.2rem; }
.tour-cap p { color: var(--ink-muted); font-size: .95rem; margin-top: .5rem; }

/* ════════════════════════════════ Usecase ════════════════════════════════ */
.usecase { max-width: var(--maxw); margin: 0 auto; padding-bottom: var(--sect-gap); }
.flow { display: flex; align-items: stretch; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.flow-step { flex: 1 1 200px; max-width: 250px; padding: 1.6rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.flow-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(150deg, var(--red), var(--red-deep)); color: #fff; font-size: 1.2rem; font-weight: 700; margin-bottom: .9rem; }
.flow-step p { color: var(--ink-muted); font-size: .95rem; }
.flow-link { align-self: center; color: var(--red); font-size: 1.4rem; }

/* ════════════════════════════════ Download ════════════════════════════════ */
.download { position: relative; padding-top: var(--sect-gap); padding-bottom: var(--sect-gap); overflow: hidden; }
.dl-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 60% at 50% 50%, rgba(255,59,51,.16), transparent 70%); }
.dl-inner { position: relative; max-width: 720px; margin: 0 auto; text-align: center; }
.dl-inner .brand-badge { margin: 0 auto 1.6rem; }
.dl-inner h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.dl-inner > p { margin-top: 1.1rem; color: var(--ink-muted); font-size: 1.1rem; }
.dl-actions { margin-top: 2.2rem; display: grid; gap: 1rem; justify-items: center; }
.dl-buttons { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.dl-note { font-size: .85rem; color: var(--ink-faint); font-family: var(--mono); }
.dl-source { display: inline-flex; align-items: center; gap: .5rem; margin-top: .35rem; color: var(--ink-muted); font-size: .92rem; transition: color .2s; }
.dl-source:hover { color: var(--red); }
.i-gh { width: 16px; height: 16px; flex: none; }

/* ════════════════════════════════ Footer ════════════════════════════════ */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 5vw, 3.5rem) var(--pad) 3rem;
  border-top: 1px solid var(--border);
  display: grid; gap: 1.6rem;
}
.foot-brand { display: flex; align-items: center; gap: .8rem; }
.foot-name { font-weight: 700; }
.foot-tag { color: var(--ink-muted); font-size: .92rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.4rem; color: var(--ink-muted); font-size: .95rem; }
.foot-links a { transition: color .2s; }
.foot-links a:hover { color: var(--red); }
.foot-copy { color: var(--ink-faint); font-size: .85rem; }

/* ════════════════════════════════ Motion ════════════════════════════════ */
/* .anim 仅在 JS 确认可动效时由脚本注入; 无 JS/无头渲染时内容默认完全可见 */
.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.anim .reveal.in { opacity: 1; transform: none; }
.anim .reveal-d1 { transition-delay: .08s; }
.anim .reveal-d2 { transition-delay: .16s; }

/* ════════════════════════════════ Responsive ════════════════════════════════ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-aux { justify-content: center; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-pipeline .feature-visual { order: 2; }
  .feature-copy { text-align: center; }
  .feature-copy > p, .feature-list { margin-inline: auto; }
  .feature-list li { text-align: left; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .flow-link { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .lang-menu summary { padding: .5rem .55rem; }
  .lang-menu [data-lang-current], .lang-menu .caret { display: none; }
}

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