/* ============================================================
   VoiceX 官网 — 黑白极简 · 高级动效
   ============================================================ */

:root {
  --font-display: "Sora", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Instrument Serif", "Songti SC", "STSong", serif;
  --font-body: "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius: 20px;
  --nav-h: 72px;
  --max-w: 1200px;
}

/* 明暗主题变量 */
:root[data-theme="dark"] {
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --bg-card: #0e0e0e;
  --bg-card-hover: #141414;
  --text: #f5f5f5;
  --text-dim: #a3a3a3;
  --text-faint: #6b6b6b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --particle-color: #ffffff;
  --particle-link: #ffffff;
  --grain-opacity: 0.05;
  --accent: #ffffff;
  --accent-contrast: #050505;
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-alt: #f4f4f4;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f5;
  --text: #0a0a0a;
  --text-dim: #555555;
  --text-faint: #999999;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --particle-color: #0a0a0a;
  --particle-link: #0a0a0a;
  --grain-opacity: 0.03;
  --accent: #0a0a0a;
  --accent-contrast: #ffffff;
}

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

html { scroll-behavior: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

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

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

img { display: block; max-width: 100%; }

/* ============ 粒子背景 ============ */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.particles canvas { display: block; }

/* ============ 噪点纹理 ============ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-out), background 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-solid {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-outline:hover { border-color: var(--text); transform: translateY(-2px); }

.btn-ghost { padding: 10px 20px; font-size: 14px; }

.btn-lg { padding: 17px 40px; font-size: 17px; }

/* ============ 导航 ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.logo-x { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  transition: color 0.3s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* 语言切换器 */
.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 3px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
}
.lang-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  height: 30px;
  width: 34px;
  border-radius: 100px;
  background: var(--accent);
  transition: transform 0.4s var(--ease-spring);
  z-index: 0;
}
.lang-switcher[data-lang="en"] .lang-indicator { transform: translateX(34px); }
.lang-switcher[data-lang="ja"] .lang-indicator { transform: translateX(68px); }
.lang-btn {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 100px;
  transition: color 0.3s var(--ease-out);
}
.lang-btn.active { color: var(--accent-contrast); }

/* 主题切换按钮 */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  overflow: hidden;
}
.theme-toggle:hover { border-color: var(--text); transform: rotate(12deg); }
.theme-icon { position: absolute; transition: transform 0.5s var(--ease-spring), opacity 0.3s var(--ease-out); }
.theme-sun { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text); }
.theme-moon {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--text);
  box-shadow: 4px -2px 0 0 var(--bg);
}
:root[data-theme="dark"] .theme-sun { transform: translateY(30px) scale(0.5); opacity: 0; }
:root[data-theme="dark"] .theme-moon { transform: translateY(0) scale(1); opacity: 1; }
:root[data-theme="light"] .theme-sun { transform: translateY(0) scale(1); opacity: 1; }
:root[data-theme="light"] .theme-moon { transform: translateY(-30px) scale(0.5); opacity: 0; }

/* ============ Hero ============ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) clamp(20px, 5vw, 60px) 60px;
}
.hero-inner {
  max-width: 1000px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 108px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  /* 微妙的渐变高光 */
  background: linear-gradient(120deg, var(--text) 0%, var(--text-dim) 60%, var(--text-faint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 26px;
  max-width: 620px;
  font-size: clamp(16px, 2.1vw, 20px);
  color: var(--text-dim);
  line-height: 1.7;
}
.desktop-only { display: inline; }

.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 声波动画 */
.wave {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 60px;
}
.wave span {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 4px;
  background: var(--text);
  opacity: 0.75;
  animation: wave 1.6s var(--ease-out) infinite;
  animation-delay: calc(var(--d) * -0.06s);
}
@keyframes wave {
  0%, 100% { height: 8px; opacity: 0.3; }
  50% { height: 48px; opacity: 0.9; }
}

.hero-stats {
  margin-top: 72px;
  display: flex;
  gap: clamp(28px, 6vw, 80px);
  flex-wrap: wrap;
  justify-content: center;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat strong {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat span { font-size: 13px; color: var(--text-faint); letter-spacing: 0.04em; }

/* ============ 滚动标语 ============ */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  background: var(--bg-alt);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-dim);
}
.marquee-track i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
  opacity: 0.5;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ 通用 Section ============ */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(90px, 12vw, 160px) clamp(20px, 5vw, 60px);
}
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(56px, 7vw, 90px);
  text-align: center;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.section-sub {
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ 功能网格 ============ */
.grid { max-width: var(--max-w); margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: background 0.45s var(--ease-out), border-color 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--line-strong);
  transform: translateY(-6px);
}
.card-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 22px;
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.card p { font-size: 15px; color: var(--text-dim); line-height: 1.7; }

/* ============ 模型 ============ */
.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  position: relative;
  transition: background 0.45s var(--ease-out), border-color 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.model-card:hover { border-color: var(--line-strong); transform: translateY(-6px); }
.model-card-featured { border-color: var(--line-strong); }
.model-card-featured::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 30px;
  right: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text), transparent);
  opacity: 0.6;
}
.model-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  margin-bottom: 22px;
}
.model-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.model-meta { font-size: 15px; font-weight: 500; color: var(--text-faint); }
.model-card p { font-size: 15px; color: var(--text-dim); line-height: 1.7; margin-bottom: 22px; }
.model-points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.model-points li {
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.model-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}

/* ============ 音乐 ============ */
.music-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.music-copy .section-title { text-align: left; }
.music-copy .eyebrow { text-align: left; }
.music-copy .section-sub { text-align: left; margin: 20px 0 0; }
.music-cta { margin-top: 32px; }

.music-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  position: relative;
}
.disc {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  position: relative;
  display: grid;
  place-items: center;
  animation: spin 18s linear infinite;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.disc-groove {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.disc-label {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.eq {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 120px;
}
.eq span {
  width: 5px;
  border-radius: 4px;
  background: var(--text);
  height: var(--h);
  opacity: 0.8;
  animation: eq 1.2s var(--ease-out) infinite alternate;
  animation-delay: calc(var(--i, 0) * -0.1s);
}
.eq span:nth-child(1) { --i: 0; }
.eq span:nth-child(2) { --i: 1; }
.eq span:nth-child(3) { --i: 2; }
.eq span:nth-child(4) { --i: 3; }
.eq span:nth-child(5) { --i: 4; }
.eq span:nth-child(6) { --i: 5; }
.eq span:nth-child(7) { --i: 6; }
.eq span:nth-child(8) { --i: 7; }
.eq span:nth-child(9) { --i: 8; }
.eq span:nth-child(10) { --i: 9; }
.eq span:nth-child(11) { --i: 10; }
.eq span:nth-child(12) { --i: 11; }
@keyframes eq {
  from { transform: scaleY(0.4); }
  to { transform: scaleY(1); }
}

/* ============ 下载 ============ */
.download-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.download-cta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.download-note { font-size: 13px; color: var(--text-faint); }
.download-meta {
  margin-top: 64px;
  display: flex;
  gap: clamp(30px, 6vw, 70px);
  flex-wrap: wrap;
  justify-content: center;
}
.dl-item { display: flex; flex-direction: column; gap: 4px; }
.dl-item strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.dl-item span { font-size: 13px; color: var(--text-faint); }

/* ============ 下载密码弹窗 ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s var(--ease-out);
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 40px 34px 34px;
  text-align: center;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.45s var(--ease-spring);
}
.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.modal-close:hover { border-color: var(--text); color: var(--text); transform: rotate(90deg); }
.modal-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.modal-desc { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }
.pwd-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: var(--bg-alt);
  margin-bottom: 16px;
}
.pwd {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.pwd-copy {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.pwd-copy:hover { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.pwd-copy.copied { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.modal-note { font-size: 13px; color: var(--text-faint); margin-bottom: 22px; }
.modal-go { width: 100%; }

/* ============ 页脚 ============ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 56px clamp(20px, 5vw, 60px) 40px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-tag { color: var(--text-dim); font-size: 15px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a { font-size: 14px; color: var(--text-faint); transition: color 0.3s var(--ease-out); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text-faint); margin-top: 10px; }

/* ============ 入场动画初始状态 ============ */
/* 仅在 JS 可用时隐藏，避免 JS/CDN 失败导致首屏空白 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .features-grid, .models-grid { grid-template-columns: 1fr 1fr; }
  .music-wrap { grid-template-columns: 1fr; }
  .music-copy .section-title, .music-copy .eyebrow, .music-copy .section-sub { text-align: center; }
  .music-copy { display: flex; flex-direction: column; align-items: center; }
  .music-visual { order: -1; }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .features-grid, .models-grid { grid-template-columns: 1fr; }
  .desktop-only { display: none; }
  .disc { width: 150px; height: 150px; }
  .eq { height: 80px; }
  .music-visual { gap: 24px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
