/* ==========================================================================
   Base：重置、排版、布局原语、通用组件（按钮 / 标签 / 卡片 / 状态）
   各区块只写自己的 assets/css/sections/<name>.css，公共件一律从这里取。
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

html[lang="en"] body {
  font-family: var(--font-sans);
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--brand);
  color: var(--on-accent);
}

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

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--on-accent);
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus {
  top: 16px;
}

/* ---------- 布局原语 ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
  background: var(--bg);
  color: var(--text);
  isolation: isolate;
}

.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}

.section-head {
  display: grid;
  gap: var(--s-5);
  max-width: 880px;
  margin-bottom: clamp(48px, 7vw, 96px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-head--split {
  max-width: none;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--s-7);
}

@media (max-width: 880px) {
  .section-head--split {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
}

/* ---------- 排版 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--brand-800);
  background: var(--brand-100);
  border: 1px solid rgba(var(--brand-rgb), 0.35);
}

.section-head--center .eyebrow {
  justify-self: center;
}

.h-hero,
.h-display,
.h2,
.h3,
.h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

.h-hero {
  font-size: var(--fs-hero);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.h-display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: -0.015em;
}

.h4 {
  font-size: var(--fs-h4);
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
}

html[lang="zh-CN"] .h-hero,
html[lang="zh-CN"] .h-display,
html[lang="zh-CN"] .h2 {
  letter-spacing: -0.01em;
  font-weight: 800;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--text-2);
  text-wrap: pretty;
  max-width: 62ch;
}

.body-2 {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--text-2);
}

.muted {
  color: var(--text-3);
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
}

.num {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* 残影：与 Logo 同一偏移比例的绿色余影 */
.echo {
  text-shadow: var(--echo-x) var(--echo-y) 0 var(--brand-echo);
}

.echo-strong {
  text-shadow: var(--echo-x) var(--echo-y) 0 rgba(var(--brand-rgb), 0.6);
}

.accent {
  color: var(--brand-700);
}

.grad-text {
  background: linear-gradient(100deg, var(--brand-800), var(--brand-600) 45%, var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 按钮 ---------- */

.btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding-inline: 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    transform var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-mid) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  background: var(--brand);
  color: var(--on-accent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 10px 26px -12px rgba(var(--brand-rgb), 0.75);
}

.btn--primary:hover {
  background: var(--brand-400);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 16px 36px -12px rgba(var(--brand-rgb), 0.85);
}

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

.btn--ghost:hover {
  border-color: rgba(var(--brand-rgb), 0.7);
  background: var(--brand-100);
}

.btn--sm {
  --btn-h: 38px;
  padding-inline: 16px;
  font-size: 14px;
}

.btn--lg {
  --btn-h: 56px;
  padding-inline: 28px;
  font-size: 16px;
}

.btn__arrow {
  transition: transform var(--t-mid) var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ---------- 诚实标签：每项能力都标明现状 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
  vertical-align: middle;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag--live {
  color: var(--live);
  background: var(--live-bg);
  border-color: color-mix(in srgb, var(--live) 28%, transparent);
}

.tag--live::before {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent);
  animation: tag-pulse 2.4s var(--ease-in-out) infinite;
}

.tag--beta {
  color: var(--beta);
  background: var(--beta-bg);
  border-color: color-mix(in srgb, var(--beta) 28%, transparent);
}

.tag--plan {
  color: var(--plan);
  background: var(--plan-bg);
  border-color: color-mix(in srgb, var(--plan) 26%, transparent);
}

.tag--plan::before {
  background: transparent;
  border: 1.5px solid currentColor;
}

.tag--neutral {
  color: var(--text-2);
  background: var(--surface-2);
  border-color: var(--line);
}

.tag--neutral::before {
  display: none;
}

@keyframes tag-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 40%, transparent);
  }
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 0%, transparent);
  }
}

/* ---------- 卡片 / 面 ---------- */

.card {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.card--raised {
  background: var(--bg-raised);
  box-shadow: var(--shadow-2);
}

.card--pad {
  padding: clamp(20px, 2.4vw, 32px);
}

.hairline {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

/* 演示标注：页面上所有模拟数据都要带这个角标 */
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1px dashed var(--line-strong);
}

/* ---------- 滚动入场 ---------- */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 900ms var(--ease-out),
    transform 1100ms var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0) * 1ms);
  will-change: opacity, transform;
}

[data-reveal="fade"] {
  transform: none;
}

[data-reveal="scale"] {
  transform: scale(0.96);
}

[data-reveal="left"] {
  transform: translate3d(-32px, 0, 0);
}

[data-reveal="right"] {
  transform: translate3d(32px, 0, 0);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.no-js [data-reveal],
.reduced-motion [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}

/* 分词入场：标题按字 / 词逐个浮现（由 motion.js 拆分） */
.split-word {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  padding-right: 0.08em;
  margin-right: -0.08em;
}

.split-word > span {
  display: inline-block;
  transform: translate3d(0, 105%, 0);
  transition: transform 1000ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 38ms + var(--reveal-delay, 0) * 1ms);
}

.is-in .split-word > span,
.split-word.is-in > span {
  transform: none;
}

.reduced-motion .split-word > span {
  transform: none;
  transition: none;
}

/* ---------- 窗口框（产品界面示意的外壳） ---------- */

.window {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cx-bg);
  color: var(--cx-text);
  border: 1px solid var(--line);
  box-shadow:
    0 1px 2px rgba(12, 31, 21, 0.06),
    0 40px 90px -36px rgba(12, 31, 21, 0.3),
    0 18px 40px -24px rgba(var(--brand-rgb), 0.3);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", var(--font-cjk), sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.window__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  background: #eef1f5;
  border-bottom: 1px solid var(--cx-border);
}

.window__dots {
  display: flex;
  gap: 7px;
}

.window__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d5dae1;
}

.window__dots i:nth-child(1) {
  background: #ff5f57;
}
.window__dots i:nth-child(2) {
  background: #febc2e;
}
.window__dots i:nth-child(3) {
  background: #28c840;
}

.window__url {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 24px;
  max-width: 420px;
  margin-inline: auto;
  padding: 0 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--cx-border);
  color: var(--cx-text-3);
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window--dark {
  background: #0d1117;
  color: #e6edf3;
  border-color: rgba(255, 255, 255, 0.08);
}

.window--dark .window__bar {
  background: #161b22;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.window--dark .window__url {
  background: #0d1117;
  border-color: rgba(255, 255, 255, 0.08);
  color: #8b949e;
}

/* ---------- 工具 ---------- */

.stack {
  display: grid;
  gap: var(--stack-gap, var(--s-4));
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--row-gap, var(--s-3));
}

.center {
  text-align: center;
}

.hide-mobile {
  display: initial;
}

@media (max-width: 720px) {
  .hide-mobile {
    display: none !important;
  }
}
