/* ============================================================
 * Parababel site — 唯一样式表
 * 设计语言: 暖纸白 / 墨黑 双主题 · 衬线标题 + 无衬线正文 · 陶土橙点睛
 * 零 JS: 所有动效纯 CSS, 并尊重 prefers-reduced-motion
 * ============================================================ */

/* ---------- 设计令牌 ---------- */

:root {
  --bg: #f6f3ec;
  --bg-2: #efeadf;
  --surface: #fffdf8;
  --ink: #17160f;
  --ink-2: #3a372f;
  --muted: #6f6a5e;
  --line: #e2dccd;
  --accent: #b8502a;
  --accent-2: #d9774b;
  --accent-soft: #f4e2d6;
  --night: #15140f;
  --night-2: #221f18;
  --night-ink: #f3efe6;
  --radius: 18px;
  --radius-sm: 10px;
  --wide: 1160px;
  --measure: 700px;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 24px 60px -24px rgb(40 30 10 / 0.28);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "PingFang SC", "Hiragino Sans",
          "Hiragino Sans GB", "Apple SD Gothic Neo", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12110d;
    --bg-2: #1a1813;
    --surface: #1d1b16;
    --ink: #efeae0;
    --ink-2: #d6d0c3;
    --muted: #a39d8f;
    --line: #2f2c24;
    --accent: #e3855a;
    --accent-2: #f0a37d;
    --accent-soft: #2e2119;
    --night: #0b0a08;
    --night-2: #1a1813;
    --shadow: 0 30px 70px -30px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

/* ---------- 基础 ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
img, svg { display: block; }

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

.wrap { width: min(var(--wide), 100% - 40px); margin-inline: auto; }
.prose { width: min(var(--measure), 100% - 40px); margin-inline: auto; }

.kicker {
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- 页头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.brand small { color: var(--muted); font-weight: 400; margin-left: 2px; }

.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

/* 语言切换: 纯 details */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); font-size: 14px; background: var(--surface);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--ink-2); color: var(--ink); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 10px); margin: 0; padding: 6px; list-style: none;
  min-width: 180px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
}
.lang li a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 15px; }
.lang li a:hover { background: var(--accent-soft); }
.lang li a[aria-current] { color: var(--accent); font-weight: 650; }
.lang li a[aria-current]::after { content: " ✓"; }

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

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); }
.btn.ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn.ghost:hover { border-color: var(--ink-2); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
 * 首页
 * ============================================================ */

.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: 64px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.hero h1 { font-size: clamp(44px, 6.2vw, 80px); margin: 22px 0 14px; text-wrap: balance; }
:lang(zh-Hans) .hero h1, :lang(zh-Hant) .hero h1, :lang(ja) .hero h1, :lang(ko) .hero h1 { font-size: clamp(40px, 5.2vw, 66px); letter-spacing: 0; line-height: 1.2; }
.hero .tagline { font-family: var(--serif); font-size: clamp(19px, 2.2vw, 24px); color: var(--muted); font-style: italic; margin-bottom: 26px; }
:lang(en) .hero .tagline { font-style: normal; }
.hero .lead { font-size: 19px; color: var(--ink-2); max-width: 34em; margin-bottom: 34px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- 产品演示画面 (纯 CSS) ---------- */

.stage { position: relative; margin: 0; }
.screen {
  position: relative; border-radius: 22px; overflow: hidden; background: var(--night);
  box-shadow: var(--shadow), 0 0 0 1px rgb(255 255 255 / 0.06) inset; aspect-ratio: 16 / 10.5;
}
.screen-bar { display: flex; gap: 7px; padding: 14px 16px; background: var(--night-2); }
.screen-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a362c; }
.scene {
  position: absolute; inset: 39px 0 0 0;
  background:
    radial-gradient(120% 90% at 20% 10%, #3c2a1f 0%, transparent 55%),
    radial-gradient(90% 90% at 85% 90%, #1f2a33 0%, transparent 60%),
    linear-gradient(160deg, #221c16, #0f0e0b);
}
/* 抽象说话人 */
.speaker { position: absolute; left: 50%; top: 18%; translate: -50% 0; width: 30%; aspect-ratio: 1; }
.speaker::before, .speaker::after { content: ""; position: absolute; left: 50%; translate: -50% 0; background: #5b4637; }
.speaker::before { top: 0; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #8a6a52, #4a382c); }
.speaker::after { bottom: 0; width: 100%; height: 44%; border-radius: 999px 999px 18px 18px; background: linear-gradient(#4a3a2f, #2b221b); }
/* 声波 */
.wave { position: absolute; left: 50%; translate: -50% 0; top: 58%; display: flex; gap: 5px; align-items: center; height: 34px; }
.wave i { width: 4px; height: 100%; border-radius: 4px; background: var(--accent-2); transform-origin: center; animation: talk 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -.9s; } .wave i:nth-child(3) { animation-delay: -.3s; }
.wave i:nth-child(4) { animation-delay: -.7s; } .wave i:nth-child(5) { animation-delay: -.1s; }
.wave i:nth-child(6) { animation-delay: -.5s; } .wave i:nth-child(7) { animation-delay: -.8s; }
@keyframes talk { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
/* 双语字幕 */
.subs { position: absolute; left: 6%; right: 6%; bottom: 13%; text-align: center; }
.subs p { display: inline; padding: 3px 10px; line-height: 1.95; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.sub-src { font-size: clamp(11px, 1.05vw, 14px); color: #d8d1c2; background: rgb(0 0 0 / 0.45); }
.sub-dst { font-size: clamp(14px, 1.45vw, 19px); font-weight: 600; color: #fff; background: rgb(0 0 0 / 0.62); }
.subs br + .sub-dst { }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / 0.12); }
.progress span { position: absolute; inset: 0 62% 0 0; background: var(--accent-2); }
/* 混音器浮层 */
.mixer {
  position: absolute; right: -26px; top: 22px; width: min(280px, 58%);
  padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px;
}
.mixer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 650; }
.mixer-head span { display: flex; align-items: center; gap: 8px; }
.mixer-head img { width: 20px; height: 20px; }
.live { font: 600 11px/1 var(--mono); color: var(--accent); display: flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.track { display: grid; grid-template-columns: 5.5em 1fr; align-items: center; gap: 10px; color: var(--muted); }
.track + .track { margin-top: 8px; }
.track b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 6px; border-radius: 6px; background: var(--bg-2); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--ink-2); }
.bar.low i { width: 28%; }
.bar.hot i { width: 86%; background: var(--accent); }

/* ---------- 多语问候跑马灯 ---------- */

.hello { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 18px 0; margin-top: 40px; }
.marquee { display: flex; width: max-content; animation: slide 40s linear infinite; }
.marquee span { font-family: var(--serif); font-size: 26px; color: var(--ink-2); padding: 0 28px; white-space: nowrap; }
.marquee span::after { content: "·"; margin-left: 56px; color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- 通用区块 ---------- */

section.block { padding: 110px 0 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.section-head h2 { font-size: clamp(32px, 4vw, 50px); text-wrap: balance; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--accent-soft); color: var(--accent);
}
.icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 24px; margin-bottom: 10px; }
.feature p { color: var(--muted); }

/* 四步流程 */
.flow4 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.flow4::before {
  content: ""; position: absolute; top: 23px; left: 24px; right: 24px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.flow4 li { position: relative; }
.flow4 .num {
  position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); font: 600 15px/1 var(--mono); color: var(--accent); margin-bottom: 22px;
}
.flow4 h3 { font-size: 22px; margin-bottom: 8px; }
.flow4 p { color: var(--muted); font-size: 16px; }
.flow-more { margin-top: 36px; }

/* 现状 / 路线 */
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.status .card { padding: 34px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.status .card.next { background: transparent; border-style: dashed; }
.status h3 { font-size: 26px; margin: 12px 0 18px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: var(--ink-2); }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.checks li::before {
  content: ""; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.next .checks li::before { background: transparent; border: 1.5px dashed var(--muted); width: 18px; height: 18px; }

/* 深色行动区 */
.cta-band { margin-top: 120px; background: var(--night); color: var(--night-ink); padding: 110px 0; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%;
  background: radial-gradient(closest-side, rgb(217 119 75 / 0.28), transparent 70%); pointer-events: none;
}
.cta-band .prose { position: relative; text-align: center; }
.cta-band h2 { font-size: clamp(34px, 4.6vw, 58px); margin-bottom: 20px; text-wrap: balance; }
.cta-band p { color: #bdb6a7; font-size: 19px; margin-bottom: 36px; }
.cta-band .actions { justify-content: center; }
.cta-band .btn.primary { background: var(--night-ink); color: var(--night); }
.cta-band .btn.primary:hover { background: var(--accent-2); }
.cta-band .btn.ghost { background: transparent; color: var(--night-ink); border-color: #3b372d; }

/* ============================================================
 * 文档页 (工作原理 / 关于 / 隐私 / 404)
 * ============================================================ */

.page-hero { padding: 84px 0 56px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--bg-2), var(--bg)); }
.page-hero h1 { font-size: clamp(40px, 5.6vw, 68px); margin: 16px 0 16px; text-wrap: balance; }
.page-hero .meta { color: var(--muted); font-size: 19px; }
.doc-body { padding: 56px 0 0; font-size: 18px; color: var(--ink-2); }
.doc-body > * + * { margin-top: 18px; }
.doc-body h2 { font-size: 30px; margin-top: 56px; color: var(--ink); }
.doc-body ul { padding-left: 22px; }
.doc-body li + li { margin-top: 8px; }
.doc-body strong { color: var(--ink); }
.doc-body code { font-family: var(--mono); font-size: 0.86em; padding: 2px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }

.steps { list-style: none; padding: 0 !important; margin: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 22px 24px 22px 76px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin: 0 !important; }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 24px; top: 22px;
  font: 600 15px/1.7 var(--mono); color: var(--accent);
}

.center { text-align: center; }
.notfound { padding: 140px 0; }
.notfound h1 { font-size: clamp(44px, 7vw, 84px); margin: 16px 0; }
.notfound .meta { color: var(--muted); font-size: 19px; margin-bottom: 34px; }

/* ============================================================
 * 页脚
 * ============================================================ */

.site-footer { background: var(--night); color: #a8a192; font-size: 15px; padding: 72px 0 36px; }
.doc-page { padding-bottom: 120px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot-brand .brand { color: var(--night-ink); margin-bottom: 14px; }
.foot-brand .brand img { filter: none; }
.foot-brand p { max-width: 26em; }
.site-footer h4 { margin: 4px 0 16px; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #6f695c; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #d9d3c6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-base {
  margin-top: 56px; padding-top: 26px; border-top: 1px solid #2a271f;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; font-size: 13px; color: #7d7769;
}
.foot-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot-langs a { color: #9d9687; }
.foot-langs a[aria-current] { color: #fff; }

/* ============================================================
 * 响应式
 * ============================================================ */

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 72px; }
  .stage { max-width: 640px; }
  .mixer { right: 12px; }
  .features { grid-template-columns: 1fr; }
  .flow4 { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .flow4::before { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .brand small { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-header .wrap { height: auto; padding: 12px 0; flex-wrap: wrap; row-gap: 10px; }
  .nav { flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
  .hero { padding: 56px 0 56px; }
  .hero .lead { font-size: 17px; }
  .status { grid-template-columns: 1fr; }
  .flow4 { grid-template-columns: 1fr; }
  section.block { padding-top: 84px; }
  .mixer { position: relative; right: auto; top: auto; bottom: auto; width: auto; margin: 14px 0 0; }
  .screen { aspect-ratio: 4 / 3.3; }
  .speaker { top: 10%; width: 34%; }
  .wave { top: 50%; height: 26px; }
  .subs { left: 4%; right: 4%; bottom: 9%; }
  .sub-src { font-size: 10px; }
  .sub-dst { font-size: 13px; }
  .marquee span { font-size: 21px; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .wave i { transform: scaleY(.6); }
}
