/* Parallel Translate — 官网样式
 * 基建 / 规格表（spec-sheet）风格：发丝级网格线、等宽字体标签、克制留白、单一靛蓝强调色。
 * 与产品「极简即专业」的设计哲学一致，仅浅色主题。无构建步骤、零依赖。 */

:root {
  /* 调色板源自插件 globals.css 的品牌 token */
  --bg: oklch(0.985 0.004 95);
  --bg-soft: oklch(0.965 0.004 95);
  --fg: oklch(0.22 0.01 260);
  --muted: oklch(0.52 0.01 260);
  --faint: oklch(0.7 0.01 260);
  --accent: oklch(0.62 0.22 270);
  --accent-soft: oklch(0.95 0.03 270);
  --accent-fg: oklch(0.99 0 0);
  --line: color-mix(in oklch, var(--fg) 12%, transparent);
  --line-strong: color-mix(in oklch, var(--fg) 22%, transparent);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;

  --maxw: 1080px;
  --radius: 6px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* 等宽小标签：基建风格的「眉标」 */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.mono { font-family: var(--font-mono); }

/* ── 容器与分隔线 ── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.rule { border: 0; border-top: 1px solid var(--line); }

/* ── 顶栏 ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.brand .sub { color: var(--faint); font-weight: 400; font-size: 13px; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--fg); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* 语言切换 */
.lang-toggle {
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
  padding: 5px 12px; transition: all .15s;
}
.lang-toggle:hover { color: var(--fg); border-color: var(--fg); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 9px 16px; border-radius: var(--radius);
  border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg); }
.btn svg { width: 16px; height: 16px; }

/* ── Hero ── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  /* 发丝点阵网格背景 */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(color-mix(in oklch, var(--fg) 10%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 35%, transparent 78%);
  opacity: 0.7;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 88px 24px 72px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 680;
  margin: 22px auto 0; max-width: 16ch;
}
.hero .lede {
  margin: 22px auto 0; max-width: 56ch;
  font-size: clamp(16px, 2.2vw, 19px); color: var(--muted);
}
.hero-cta { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

/* 产品演示：对照阅读卡片 */
.demo {
  position: relative; z-index: 1;
  max-width: 760px; margin: 56px auto -1px; padding: 0 24px;
}
.demo-frame {
  border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden;
  background: var(--bg); box-shadow: 0 24px 60px -32px color-mix(in oklch, var(--accent) 30%, transparent);
}
.demo-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.demo-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.demo-bar .url {
  margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--faint);
}
.demo-body { padding: 26px 30px 30px; text-align: left; }
.demo-body p { margin-top: 14px; }
.demo-body p:first-child { margin-top: 0; }
.src { font-size: 16px; color: var(--fg); }
.src .vocab {
  border-bottom: 2px solid var(--accent);
  cursor: help; font-weight: 500;
  border-radius: 3px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.src .vocab:hover,
.src .vocab:focus-visible,
.src .vocab.is-active {
  background: var(--accent-soft);
  color: color-mix(in oklch, var(--accent) 84%, var(--fg));
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.vocab-popover {
  position: fixed;
  z-index: 80;
  width: min(300px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in oklch, var(--bg) 98%, white);
  box-shadow: 0 20px 48px -28px color-mix(in oklch, var(--fg) 38%, transparent);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .14s, transform .14s;
}
.vocab-popover.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.vocab-popover::before {
  content: "";
  position: absolute;
  left: var(--arrow-left, 24px);
  top: -6px;
  width: 10px;
  height: 10px;
  border-left: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  background: inherit;
  transform: rotate(45deg);
}
.vocab-popover[data-placement="top"]::before {
  top: auto;
  bottom: -6px;
  transform: rotate(225deg);
}
.vocab-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.vocab-word {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
}
.vocab-phonetic {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}
.vocab-speak {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.vocab-speak:hover,
.vocab-speak:focus-visible {
  background: var(--accent-soft);
  border-color: color-mix(in oklch, var(--accent) 42%, var(--line-strong));
  outline: none;
}
.vocab-speak svg {
  width: 15px;
  height: 15px;
}
.vocab-pos {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}
.vocab-meaning {
  margin-top: 8px;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.55;
}
.vocab-submeaning {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.vocab-example {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.vocab-example strong {
  color: var(--fg);
  font-weight: 560;
}
.trg {
  font-size: 14px; color: var(--muted);
  border-left: 2px solid var(--accent-soft); padding-left: 12px; margin-top: 4px !important;
}

/* ── 通用区块 ── */
section { padding: 72px 0; }
.section-head { max-width: 60ch; }
.section-head h2 {
  font-size: clamp(24px, 4vw, 34px); letter-spacing: -0.02em; font-weight: 640;
  margin-top: 14px; line-height: 1.15;
}
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17px; }

/* 哲学 / 原则三栏 —— 规格表式分隔 */
.principles {
  margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.principle { padding: 28px; border-right: 1px solid var(--line); }
.principle:last-child { border-right: 0; }
.principle .idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.principle h3 { margin-top: 14px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.principle p { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* 功能特性：spec 网格 */
.features {
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.feature {
  padding: 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.feature:hover { background: var(--bg-soft); }
.feature .ico {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.feature .ico svg { width: 18px; height: 18px; }
.feature h3 { font-size: 16px; font-weight: 600; }
.feature p { margin-top: 7px; font-size: 14px; color: var(--muted); }

/* 引用 / 哲学陈述 */
.quote { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.quote .wrap { padding: 72px 24px; text-align: center; }
.quote blockquote {
  font-size: clamp(22px, 3.4vw, 32px); letter-spacing: -0.02em; line-height: 1.3;
  max-width: 24ch; margin: 0 auto; font-weight: 560;
}
.quote .by { margin-top: 18px; font-family: var(--font-mono); font-size: 13px; color: var(--faint); }

/* CTA 收尾 */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(26px, 4.5vw, 40px); letter-spacing: -0.02em; font-weight: 660; }
.cta-final p { margin-top: 14px; color: var(--muted); }
.cta-final .hero-cta { margin-top: 28px; }

/* ── 页脚 ── */
.footer { border-top: 1px solid var(--line); padding: 44px 0 56px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer .brand { font-size: 15px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.footer-col a { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); transition: color .15s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  max-width: var(--maxw); margin: 36px auto 0; padding: 0 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--faint);
}

/* ── 法律 / 隐私页 ── */
.legal { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.legal h1 { font-size: 34px; letter-spacing: -0.02em; }
.legal .updated { font-family: var(--font-mono); font-size: 13px; color: var(--faint); margin-top: 8px; }
.legal h2 { font-size: 20px; margin-top: 40px; letter-spacing: -0.01em; }
.legal h3 { font-size: 16px; margin-top: 24px; }
.legal p, .legal li { color: var(--muted); margin-top: 12px; font-size: 15px; }
.legal ul { margin-top: 8px; padding-left: 22px; }
.legal li { margin-top: 6px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal .back { font-family: var(--font-mono); font-size: 13px; color: var(--muted); display: inline-block; margin-bottom: 28px; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--bg-soft); font-weight: 600; color: var(--fg); }

/* ── 试读页 ── */
.try-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--bg-soft) 76%, transparent), transparent),
    var(--bg);
}
.try-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: end;
  padding-top: 72px;
  padding-bottom: 58px;
}
.try-hero h1 {
  max-width: 14ch;
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 680;
}
.try-hero p {
  max-width: 58ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
}
.try-status {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  background: var(--bg);
}
.try-status-label,
.article-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.try-status ol {
  margin-top: 12px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}
.try-status li + li { margin-top: 7px; }
.try-content { padding-top: 54px; }
.try-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 280px;
  gap: 56px;
  align-items: start;
}
.reading-article {
  min-width: 0;
  padding-bottom: 32px;
}
.reading-article h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 660;
}
.article-meta {
  margin-top: 12px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}
.reading-article p:not(.article-meta) {
  margin-top: 24px;
  color: color-mix(in oklch, var(--fg) 92%, var(--muted));
  font-size: 18px;
  line-height: 1.86;
  letter-spacing: 0;
}
.try-guide {
  position: sticky;
  top: 88px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.guide-block h3 {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.guide-block p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.guide-list {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.guide-list div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.guide-list span {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 12px;
}
.guide-list p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.guide-cta {
  margin-top: 24px;
  width: 100%;
  justify-content: center;
}

/* 语言可见性：默认隐藏，由 i18n.js 控制 */
[data-lang-show] { display: none; }

/* ── 响应式 ── */
@media (max-width: 860px) {
  .principles, .features { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .try-hero-inner,
  .try-layout {
    grid-template-columns: 1fr;
  }
  .try-guide {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }
}
@media (max-width: 560px) {
  .principles, .features { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: 1px solid var(--line); }
  .principle:last-child { border-bottom: 0; }
  section { padding: 56px 0; }
  .hero-inner { padding: 64px 24px 56px; }
  .try-hero-inner { padding-top: 54px; padding-bottom: 42px; }
  .reading-article p:not(.article-meta) { font-size: 16px; line-height: 1.78; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
