/* ============================================================
   Voxa Voice Studio — 主样式
   桌面优先；移动端在 media.css 中以「原生 App 风格」重构
   ============================================================ */

/* ---------- 背景氛围 ---------- */
.bg-aura {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(124, 108, 255, 0.20), transparent 60%),
    radial-gradient(760px 480px at 88% 2%, rgba(36, 211, 238, 0.13), transparent 62%),
    radial-gradient(700px 600px at 50% 42%, rgba(77, 141, 255, 0.08), transparent 70%),
    var(--bg-0);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
}

/* ---------- 通用布局 ---------- */
.container { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }
section { position: relative; }
.section-pad { padding-block: 116px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-3);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7;
}
h1, h2, h3, h4 { line-height: 1.14; margin: 0; font-weight: 700; letter-spacing: -0.03em; }
h1 { font-size: clamp(44px, 6vw, 80px); }
h2 { font-size: clamp(32px, 4vw, 52px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; }

.gradient-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { margin-top: 18px; }
.section-head p { margin-top: 20px; color: var(--text-2); font-size: 17px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 72px;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: rgba(5, 6, 11, 0.66);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}
.nav-wrap { height: 100%; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--brand-grad);
  display: grid; place-items: center;
  box-shadow: 0 6px 22px rgba(124, 108, 255, 0.4);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-sub { font-size: 10px; color: var(--text-3); font-weight: 600; letter-spacing: 0.1em; margin-left: 2px; }
.nav-links { display: flex; gap: 30px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--text-2); font-size: 14px; font-weight: 550; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-0); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.03);
}
.lang-switch a {
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  color: var(--text-2); transition: 0.2s;
}
.lang-switch a[aria-current="true"] {
  background: var(--surface-2); color: var(--text-0);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent; border-radius: 12px;
  padding: 12px 20px; font-size: 14px; font-weight: 650;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--brand-grad); color: #fff;
  box-shadow: 0 10px 30px rgba(124, 108, 255, 0.3);
}
.btn-primary:hover { box-shadow: 0 14px 44px rgba(124, 108, 255, 0.5); transform: translateY(-2px); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text-0); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-sm { padding: 9px 15px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { padding-top: 92px; padding-bottom: 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 64px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  border: 1px solid rgba(139, 108, 255, 0.3);
  background: rgba(124, 108, 255, 0.09);
  font-size: 12px; color: var(--text-1); font-weight: 600;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
.hero h1 { margin-top: 26px; }
.hero-lead {
  margin-top: 24px; font-size: 18px; color: var(--text-2); max-width: 580px; line-height: 1.75;
}
.hero-cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.hero-cta .btn { padding: 15px 26px; font-size: 15px; border-radius: 14px; }
.hero-trust {
  display: flex; align-items: center; gap: 24px; margin-top: 46px; flex-wrap: wrap;
  color: var(--text-3); font-size: 13px; font-weight: 600;
}
.hero-trust span { display: flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 15px; height: 15px; color: var(--brand-1); }

/* ---------- 演示卡片（Hero 右侧） ---------- */
.demo-shell {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02) 40%), var(--bg-1);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  overflow: hidden;
  position: relative;
}
.demo-shell::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(167,139,250,0.5), transparent 40%, transparent 60%, rgba(34,211,238,0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.demo-topbar {
  display: flex; align-items: center; gap: 7px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02);
}
.demo-topbar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.demo-topbar i:nth-child(1) { background: #ff6b6b; }
.demo-topbar i:nth-child(2) { background: #ffd166; }
.demo-topbar i:nth-child(3) { background: #34d399; }
.demo-topbar em {
  margin-left: auto; font-style: normal; font-size: 11px; color: var(--text-3); letter-spacing: 0.05em;
}
.demo-body { padding: 24px; }

/* 波形可视化 */
.waveform {
  height: 96px; display: flex; align-items: center; justify-content: center; gap: 3px;
  border-radius: var(--r-sm); padding: 12px 16px;
  background: radial-gradient(ellipse at center, rgba(124,108,255,0.12), transparent 70%), rgba(0,0,0,0.2);
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 20px;
}
.waveform canvas { width: 100%; height: 100%; }
.wave-idle { color: var(--text-3); font-size: 12px; letter-spacing: 0.08em; }

.demo-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 9px;
}
.demo-textarea {
  width: 100%; min-height: 88px; resize: vertical;
  background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text-0); padding: 14px 16px; font-size: 14px; line-height: 1.6;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.demo-textarea:focus { border-color: rgba(139,108,255,0.6); box-shadow: 0 0 0 3px rgba(124,108,255,0.12); }
.demo-textarea::placeholder { color: var(--text-3); }

.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.field-select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: rgba(0,0,0,0.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b90a6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text-0); padding: 12px 36px 12px 14px; font-size: 13px; outline: none;
}
.field-select:focus { border-color: rgba(139,108,255,0.6); }
.field-select option { background: var(--surface-solid); color: var(--text-0); }

.demo-actions { display: flex; gap: 10px; margin-top: 18px; }
.demo-actions .btn-primary { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-1);
  transition: 0.2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text-0); }
.icon-btn svg { width: 18px; height: 18px; }
.demo-status { min-height: 20px; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.demo-status.error { color: var(--danger); }
.demo-status.success { color: var(--success); }
.player {
  display: none; align-items: center; gap: 12px; margin-top: 14px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(52,211,153,0.07); border: 1px solid rgba(52,211,153,0.2);
}
.player.show { display: flex; }
.player button {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; border: 0;
  background: var(--success); color: #04231a; display: grid; place-items: center;
}
.player button svg { width: 17px; height: 17px; }
.player audio { flex: 1; height: 36px; filter: invert(0.9) hue-rotate(180deg); }
.player .dl {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--success); font-weight: 650;
}
.player .dl svg { width: 15px; height: 15px; }

/* ---------- 数据条 ---------- */
.stats-strip {
  border-block: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(124,108,255,0.04), rgba(36,211,238,0.04));
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-block: 38px;
}
.stat { text-align: center; padding-inline: 16px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat strong { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.04em; }
.stat span { display: block; margin-top: 6px; font-size: 13px; color: var(--text-2); }

/* ---------- 功能区 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card {
  padding: 30px; border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-6px); border-color: rgba(139,108,255,0.35);
  box-shadow: 0 22px 60px rgba(0,0,0,0.4);
}
.feature-card::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  top: -90px; right: -70px; background: radial-gradient(circle, rgba(124,108,255,0.16), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-soft); border: 1px solid rgba(139,108,255,0.22);
  color: var(--brand-1); margin-bottom: 22px;
}
.feature-icon svg { width: 23px; height: 23px; }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--text-2); font-size: 14px; line-height: 1.72; }

/* ---------- 声音克隆展示区 ---------- */
.clone-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.clone-visual {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  padding: 34px; box-shadow: var(--shadow-md);
}
.clone-step { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; }
.clone-step + .clone-step { border-top: 1px solid var(--border); }
.clone-step .num {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--brand-grad); color: #fff;
}
.clone-step h4 { margin: 0 0 5px; font-size: 15px; }
.clone-step p { font-size: 13px; color: var(--text-2); }
.clone-feature-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.clone-feature-list li { display: flex; gap: 11px; align-items: center; color: var(--text-1); font-size: 14px; }
.clone-feature-list svg { width: 18px; height: 18px; color: var(--success); flex: 0 0 18px; }

/* ---------- API / 开发者区 ---------- */
.code-panel {
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
  background: #070910; box-shadow: var(--shadow-md);
}
.code-head {
  display: flex; align-items: center; gap: 8px; padding: 13px 18px;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.025);
}
.code-head .lang-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-3); }
.code-head span { font-size: 12px; color: var(--text-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-head button { margin-left: auto; font-size: 11px; color: var(--text-3); background: none; border: 0; display: inline-flex; align-items: center; gap: 5px; }
.code-head button svg { width: 13px; height: 13px; }
.code-head button:hover { color: var(--text-0); }
.code-panel pre {
  margin: 0; padding: 22px; overflow-x: auto; font-size: 13px; line-height: 1.85;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #c9d1e8;
}
.code-panel .c-key { color: #a78bfa; }
.code-panel .c-str { color: #7ee7c7; }
.code-panel .c-com { color: #5b6178; }
.code-panel .c-fn { color: #7cb8ff; }
.api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.api-endpoints { display: grid; gap: 10px; margin-top: 26px; }
.api-ep {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface);
}
.method {
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 6px;
  background: rgba(52,211,153,0.12); color: var(--success);
}
.method.post { background: rgba(124,108,255,0.15); color: var(--brand-1); }
.api-ep code { font-size: 13px; font-family: ui-monospace, monospace; color: var(--text-0); }
.api-ep span { margin-left: auto; font-size: 12px; color: var(--text-3); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin-inline: auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text-0);
  padding: 24px 44px 24px 0; font-size: 16px; font-weight: 650; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--text-3); transition: transform 0.25s var(--ease), color 0.25s;
}
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); color: var(--brand-1); }
.faq-a { display: none; padding: 0 44px 24px 0; color: var(--text-2); font-size: 14px; line-height: 1.8; }
.faq-item.open .faq-a { display: block; animation: fadeIn 0.3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- 底部 CTA ---------- */
.final-cta {
  text-align: center; padding: 96px 24px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(124,108,255,0.18), transparent 65%),
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  box-shadow: var(--shadow-md);
}
.final-cta h2 { max-width: 640px; margin: 0 auto; }
.final-cta p { color: var(--text-2); margin: 20px auto 32px; max-width: 520px; font-size: 16px; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 72px 0 40px; margin-top: 110px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { color: var(--text-3); font-size: 13px; margin-top: 16px; max-width: 260px; }
.footer-col h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); margin: 0 0 18px; }
.footer-col a { display: block; color: var(--text-3); font-size: 13px; padding: 6px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text-0); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 12px;
}

/* ---------- 移动端底部 Tab Bar（原生 App 风格，桌面隐藏） ---------- */
.tabbar { display: none; }

/* ---------- 通用工具类 ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--brand-1); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 3px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .float-slow { animation: float 7s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-10px); } }
}
