/* base.css —— 官网首页样式（构建期原样拷进 worker/public/assets/）
 *
 * 设计原则：深色、克制、有层次。所有视觉都由本地 CSS / 内联 SVG 完成，
 * 不加载第三方字体、图标或追踪脚本 —— 静态层发出时不产生任何外部请求。
 */

:root {
  --bg: #080a0f;
  --bg-soft: #10131c;
  --bg-raised: #141827;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #f2f5fb;
  --fg-dim: #9aa5bd;
  --accent: #8b7cff;
  --accent-2: #3fe0c5;
  --gradient: linear-gradient(120deg, #a595ff 0%, #8b7cff 45%, #3fe0c5 100%);
  --radius: 20px;
  --wrap: 1140px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(139, 124, 255, 0.16), transparent 62%),
    radial-gradient(700px 420px at 8% 12%, rgba(63, 224, 197, 0.06), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { display: block; }

::selection { background: rgba(139, 124, 255, 0.35); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 50;
  background: var(--accent);
  color: #0b0d12;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  font-weight: 650;
}
.skip:focus { inset-inline-start: 0; }

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

/* ── 顶栏 ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 10, 15, 0.78);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 680;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand__mark { width: 32px; height: 32px; border-radius: 9px; }
.brand__name { font-size: 1.03rem; }

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--fg-dim);
}
.nav > a { text-decoration: none; transition: color 0.16s ease; }
.nav > a:hover { color: var(--fg); }

.langpick { position: relative; }
.langmenu { position: relative; }
.langmenu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg-dim);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary:hover { color: var(--fg); border-color: var(--line-strong); }
.langmenu summary svg { flex: 0 0 auto; opacity: 0.8; }
.langmenu[open] summary { color: var(--fg); border-color: var(--line-strong); }
.langmenu ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: max-content;
  min-width: 260px;
  max-height: 60vh;
  overflow: auto;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(16, 19, 28, 0.98);
  box-shadow: var(--shadow);
}
.langmenu ul a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg-dim);
  font-size: 0.84rem;
  line-height: 1.3;
}
.langmenu ul a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.06); }
.langmenu ul a[aria-current="true"] { color: #0b0d12; background: var(--fg); font-weight: 650; }

/* ── 主视觉 ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 64px;
}
.hero__glow {
  position: absolute;
  inset: -220px -10% auto auto;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(139, 124, 255, 0.22), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.hero__in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 56px;
  align-items: center;
}

.kicker {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-2);
}
.hero__title {
  margin: 0 0 20px;
  font-size: clamp(2.15rem, 4.7vw, 3.55rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 760;
  max-width: 16ch;
}
.hero__title em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 0;
  max-width: 60ch;
  color: var(--fg-dim);
  font-size: 1.06rem;
}
.hero .lead { margin-bottom: 28px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 36px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat dt {
  font-size: 1.5rem;
  font-weight: 720;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat dd { margin: 0; font-size: 0.8rem; color: var(--fg-dim); }

/* ── 主视觉右侧：两层「窗口」示意 ─────────────────────────────────── */
.hero__art {
  position: relative;
  min-height: 390px;
  isolation: isolate;
}
.hero__art::before {
  content: "";
  position: absolute;
  inset: 12% 6% 6%;
  background: radial-gradient(circle at 55% 40%, rgba(139, 124, 255, 0.24), transparent 65%);
  filter: blur(18px);
  z-index: -1;
}

.art-window {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(26, 30, 46, 0.96), rgba(12, 15, 23, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.art-window--back {
  inset: 0 12% 26% 0;
  transform: rotate(-5deg);
  opacity: 0.72;
}
.art-window--front {
  inset: 20% 0 4% 18%;
  transform: rotate(3deg);
}
.art-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.art-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.art-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}
.art-grid span {
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.5), rgba(26, 115, 232, 0.08)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 8px, transparent 8px 16px);
  border: 1px solid rgba(26, 115, 232, 0.28);
}
.art-grid span:first-child {
  background:
    linear-gradient(135deg, rgba(139, 124, 255, 0.5), rgba(63, 224, 197, 0.14)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 8px, transparent 8px 16px);
  border-color: rgba(139, 124, 255, 0.35);
}
.art-lines { display: grid; gap: 11px; padding: 20px 22px 26px; }
.art-lines b {
  display: block;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.art-lines b:nth-child(1) { width: 72%; }
.art-lines b:nth-child(3) { width: 88%; }
.art-lines b:nth-child(5) { width: 55%; }
.art-lines b.masked {
  background: #05070c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.art-lines b.art-mask--soft {
  background: rgba(154, 165, 189, 0.3);
  backdrop-filter: blur(3px);
}
.art-lock {
  position: absolute;
  inset-inline-end: 18px;
  bottom: 18px;
  padding: 6px 10px;
  border: 1px solid rgba(63, 224, 197, 0.35);
  border-radius: 999px;
  background: rgba(63, 224, 197, 0.1);
  color: var(--accent-2);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.art-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(13, 16, 24, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.art-chip img { width: 28px; height: 28px; }
.art-chip--pip { top: 6%; inset-inline-end: 2%; }
.art-chip--guard { bottom: -2%; inset-inline-start: 2%; }

/* ── 产品卡片 ─────────────────────────────────────────────────────── */
.products { padding: 36px 0 86px; }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}
.section-head .lead { font-size: 1rem; }

.cards {
  display: grid;
  /* min(100%, 320px) 让卡片在 320px 级窄屏上也不会把网格撑破 */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 45%),
    linear-gradient(180deg, var(--bg-soft), rgba(12, 15, 23, 0.6));
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.8;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}
.card__head { display: flex; align-items: center; gap: 14px; }
.card__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.card__icon img { width: 38px; height: 38px; }
.card__kicker {
  display: block;
  margin-bottom: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 65%, #ffffff);
}
.card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.card__tag {
  margin: 0;
  color: var(--fg);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
}
.card__desc { margin: 0; color: var(--fg-dim); font-size: 0.94rem; }
.card__features {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}
.card__features li {
  position: relative;
  padding-inline-start: 20px;
  color: var(--fg-dim);
  font-size: 0.89rem;
  line-height: 1.5;
}
.card__features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ── 按钮 ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1;
  padding: 13px 19px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--gradient);
  color: #0a0c11;
  transition: filter 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.28); filter: none; }
.card .btn {
  /* 比主按钮再深一档，保证白字对彩色底仍达到 4.5:1 */
  background: color-mix(in srgb, var(--accent) 82%, #000000);
  color: #fff;
}
.card .btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}

/* ── 原则 / 为什么 ────────────────────────────────────────────────── */
.why {
  padding: 74px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(63, 224, 197, 0.07), transparent 70%),
    rgba(255, 255, 255, 0.012);
}
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.principle { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.principle__num {
  display: block;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-2);
}
.principle h3 { margin: 0 0 8px; font-size: 1.13rem; letter-spacing: -0.015em; }
.principle p { margin: 0; color: var(--fg-dim); font-size: 0.93rem; }

/* ── 常见问题 ─────────────────────────────────────────────────────── */
.faq { padding: 78px 0 92px; }
.faq__in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
.faq__list { display: grid; gap: 10px; align-content: start; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.faq details[open] { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.035); }
.faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 46px 16px 18px;
  font-weight: 620;
  font-size: 0.97rem;
  line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--fg-dim);
  font-size: 0.93rem;
}

/* ── 页脚 / 404 ───────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 40px 0 46px; color: var(--fg-dim); font-size: 0.9rem; }
.footer__in { display: flex; flex-direction: column; gap: 18px; }
.footer__brandline { display: flex; align-items: center; gap: 11px; }
.footer__brandline img { border-radius: 8px; }
.footer__brand { margin: 0; color: var(--fg); font-weight: 650; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 40px 80px; }
.footer__cols > div { display: flex; flex-direction: column; gap: 4px; }
.footer__label {
  margin: 0 0 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
}
.footer__meta { margin: 0; }
.footer__meta a, .footer__cols a { text-decoration: none; }
.footer__meta a:hover, .footer__cols a:hover { color: var(--fg); text-decoration: underline; }
.footer__note { margin: 0; font-size: 0.82rem; opacity: 0.78; }

.nf { padding: 110px 0; min-height: 60vh; }
.nf__actions { margin-top: 22px; }
.nf .hero__title { max-width: 22ch; }

/* ── 响应式 ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { padding-top: 64px; }
  .hero__in { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { min-height: 320px; max-width: 520px; width: 100%; }
  .faq__in { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 720px) {
  .nav > a { display: none; }
  .langmenu { max-width: 100%; justify-content: flex-end; }
  .topbar__in { height: 62px; }
  .hero { padding: 48px 0 36px; }
  .hero__title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .stats { gap: 14px 28px; }
  .products { padding-bottom: 60px; }
  .why, .faq { padding: 56px 0; }
  .card { padding: 22px; }
  .hero__art { min-height: 280px; }
  .art-chip { font-size: 0.72rem; padding: 7px 10px 7px 8px; }
}

@media (max-width: 430px) {
  .wrap { padding: 0 18px; }
  .brand__name { font-size: 0.95rem; }
  .stats { gap: 14px 22px; }
  .stat dt { font-size: 1.28rem; }
  .art-window--back { inset-inline-end: 6%; }
}

/* 320px 级窄屏：品牌名让位给语言选择器，避免顶栏撑出视口 */
@media (max-width: 360px) {
  .wrap { padding: 0 14px; }
  .topbar__in { gap: 12px; }
  .brand__name { display: none; }
}

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

/* RTL：窗口示意与卡片都按逻辑方向自动翻转，这里只补两处位置细节 */
[dir="rtl"] .hero__glow { inset: -220px auto auto -10%; }
[dir="rtl"] .art-window--back { transform: rotate(5deg); }
[dir="rtl"] .art-window--front { transform: rotate(-3deg); }
