/**
 * 重构增量样式表：新架构 section（header/hero/features）与通用交互（data-*）所需的类。
 * 与 styles.css 解耦，只从 index.html 追加引用；旧页面（法务页）不受影响。
 * 命名沿用旧站视觉变量（--cyan/--orange/--green 等），保证观感统一。
 */

.download-tutorial-link {
  color: var(--cyan-2);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.download-tutorial-link:hover {
  color: var(--white);
}

/* ============ 通用交互：声明式 data-* 的落地样式 ============ */

/* [data-tilt]：指针 3D 倾斜。角度由 fx.js 写入 --tilt-rx/--tilt-ry。 */
[data-tilt] {
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-tilt].is-tiltable {
  transform: perspective(1000px) rotateX(var(--tilt-rx)) rotateY(var(--tilt-ry));
}

/* [data-magnetic]：磁吸位移。位移由 fx.js 写入 --mag-x/--mag-y。 */
[data-magnetic] {
  --mag-x: 0px;
  --mag-y: 0px;
}

[data-magnetic].is-magnetic {
  transform: translate3d(var(--mag-x), var(--mag-y), 0);
  transition: transform 0.18s ease-out;
}

/* [data-stagger-item]：容器 .is-in 后按 --stagger-delay 逐个入场。 */
[data-stagger-item] {
  opacity: 1;
  transform: none;
}

[data-stagger]:not(.is-in) [data-stagger-item] {
  opacity: 0;
  transform: translateY(22px);
}

[data-stagger] [data-stagger-item] {
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--stagger-delay, 0ms);
}

/* ============ 装饰性文字 ============ */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: rgba(143, 253, 244, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(32, 247, 230, 0.85);
  animation: kickerPulse 1.8s ease-in-out infinite;
}

@keyframes kickerPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* 渐变流光标题，用于 hero 品牌名。 */
.shimmer {
  background: linear-gradient(100deg, var(--white) 20%, var(--cyan) 40%, var(--green) 55%, var(--white) 75%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerFlow 5s linear infinite;
}

@keyframes shimmerFlow {
  to { background-position: -220% center; }
}

/* ============ 顶部导航新增件 ============ */

.scroll-progress {
  --scroll-progress: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress));
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--orange));
  box-shadow: 0 0 12px rgba(32, 247, 230, 0.6);
}

.nav-indicator {
  --nav-x: 0px;
  --nav-w: 0px;
  position: absolute;
  left: 0;
  bottom: 2px;
  z-index: -1;
  height: 34px;
  width: var(--nav-w);
  transform: translate(var(--nav-x), -6px);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(32, 247, 230, 0.16), rgba(108, 255, 118, 0.1));
  border: 1px solid rgba(143, 253, 244, 0.2);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), width 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  pointer-events: none;
}

.nav-indicator.is-ready {
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(143, 253, 244, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(32, 247, 230, 0.6);
  transition: transform 0.26s ease, opacity 0.26s ease;
}

.nav-toggle span {
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

body.nav-open .nav-toggle span { background: transparent; box-shadow: none; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ============ Hero 新装饰 ============ */

.hero-aura {
  position: absolute;
  inset: -10% 0 auto;
  left: 50%;
  top: 20%;
  width: min(760px, 60vw);
  aspect-ratio: 1;
  transform: translate(-14%, -10%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(32, 247, 230, 0.24), transparent 62%),
    conic-gradient(from 150deg, transparent, rgba(32, 247, 230, 0.28), transparent 32%, rgba(255, 122, 26, 0.16), transparent 60%);
  filter: blur(30px);
  opacity: 0.5;
  pointer-events: none;
  animation: auraDrift 12s ease-in-out infinite;
}

@keyframes auraDrift {
  0%, 100% { transform: translate(-14%, -10%) scale(1); opacity: 0.42; }
  50% { transform: translate(-8%, -4%) scale(1.08); opacity: 0.6; }
}

.hero-rings {
  position: absolute;
  top: 16%;
  right: 8%;
  width: min(720px, 46vw);
  height: min(720px, 68vh);
  opacity: 0.5;
  pointer-events: none;
}

.hero-rings span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--ring, 60%);
  height: var(--ring, 60%);
  transform: translate(-50%, -50%) rotateX(66deg) rotateZ(var(--rz, 0deg));
  border: 1px solid rgba(32, 247, 230, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(32, 247, 230, 0.08) 59%, transparent 62%),
    conic-gradient(from 120deg, transparent, rgba(32, 247, 230, 0.3), transparent 28%, rgba(255, 122, 26, 0.14), transparent 56%);
  box-shadow: 0 0 32px rgba(32, 247, 230, 0.14);
  animation: driftWave 14s linear infinite;
}

.hero-rings span:nth-child(1) { --ring: 36%; --rz: -12deg; animation-delay: -1s; }
.hero-rings span:nth-child(2) { --ring: 54%; --rz: 16deg; animation-delay: -4s; }
.hero-rings span:nth-child(3) { --ring: 72%; --rz: -28deg; animation-delay: -7s; border-color: rgba(255, 122, 26, 0.14); }
.hero-rings span:nth-child(4) { --ring: 90%; --rz: 34deg; animation-delay: -10s; opacity: 0.6; }

/* Hero 手机相框：沿用旧 hero-phone 尺寸，改用 phone-frame 承载。 */
.phone-frame {
  position: relative;
  width: min(380px, 86vw);
  margin: 0 auto;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(36, 211, 238, 0.42);
  border-radius: 38px;
  background: linear-gradient(145deg, rgba(180, 245, 255, 0.22), rgba(5, 10, 12, 0.96) 28%, #020506);
  box-shadow: 0 48px 110px rgba(0, 0, 0, 0.72), 0 0 72px rgba(32, 247, 230, 0.3);
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 3;
  width: 96px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 0 0 15px 15px;
  background: #040708;
}

.phone-frame .phone-screen {
  min-height: auto;
  aspect-ratio: 390 / 844;
  padding: 0;
  border-radius: 30px;
  background: #05070d;
}

.hero-phone {
  animation: phoneFloat 5.5s ease-in-out infinite;
}

/* 屏面斜切高光 + 扫描线。 */
.shot-sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 26%, transparent 70%, rgba(32, 247, 230, 0.1));
  mix-blend-mode: screen;
}

.shot-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(32, 247, 230, 0.22), transparent);
  mix-blend-mode: screen;
  animation: shotScan 3.4s ease-in-out infinite;
}

@keyframes shotScan {
  0% { transform: translateY(-42%); opacity: 0; }
  30% { opacity: 0.9; }
  70% { opacity: 0.9; }
  100% { transform: translateY(240%); opacity: 0; }
}

/* Hero 舞台底部频谱。 */
.stage-spectrum {
  position: absolute;
  left: 50%;
  bottom: 2%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 78%;
  height: 60px;
  transform: translateX(-50%);
  opacity: 0.8;
  pointer-events: none;
}

.stage-spectrum i {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--orange));
  box-shadow: 0 0 10px rgba(32, 247, 230, 0.5);
  animation: barJump 1.05s ease-in-out infinite;
}

/* 浮标：新命名 chip-1/2/3。 */
.floating-chip.chip-1 { top: 8%; right: 6%; color: var(--cyan); }
.floating-chip.chip-2 { top: 62%; right: 0; color: var(--orange); animation-delay: -1.4s; }
.floating-chip.chip-3 { top: 38%; left: -2%; color: var(--green); animation-delay: -2.5s; }

/* Hero 跑马灯。 */
.hero-ticker {
  position: relative;
  z-index: 1;
  margin-top: clamp(32px, 5vw, 56px);
  padding: 14px 0;
  overflow: hidden;
  border-top: 1px solid rgba(143, 253, 244, 0.12);
  border-bottom: 1px solid rgba(143, 253, 244, 0.12);
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  will-change: transform;
}

.ticker-track span {
  color: rgba(224, 249, 244, 0.82);
  font-weight: 900;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.ticker-track i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(32, 247, 230, 0.7);
}

/* ============ Features 网格（新版） ============ */

.section-head {
  max-width: 760px;
  margin-bottom: clamp(34px, 5vw, 54px);
}

.section-head h2 {
  margin-top: 6px;
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(143, 253, 244, 0.16);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(32, 247, 230, 0.06), rgba(255, 255, 255, 0.02)), #071012;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(32, 247, 230, 0.22), transparent 42%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  border-color: rgba(32, 247, 230, 0.5);
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.5), 0 0 34px rgba(32, 247, 230, 0.16);
}

.feature-ordinal {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 3;
  color: rgba(143, 253, 244, 0.4);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.feature-shot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 390 / 844;
  border-radius: 16px;
  background: #05070d;
}

.feature-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.feature-card:hover .feature-shot img {
  transform: scale(1.05);
  filter: saturate(1.16) contrast(1.05);
}

.feature-card h3 {
  padding: 16px 6px 6px;
  font-size: 1.05rem;
}

.feature-card p {
  min-height: 3.3em;
  padding: 0 6px 10px;
  color: rgba(224, 249, 244, 0.66);
  font-size: 0.88rem;
  line-height: 1.55;
}

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

@media (max-width: 1040px) {
  .nav-toggle {
    display: grid;
    place-items: center;
    order: 2;
  }

  .nav-links {
    position: fixed;
    inset: 86px 0 auto;
    z-index: 18;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
    background: rgba(5, 8, 10, 0.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid transparent;
    transition: max-height 0.34s ease, padding 0.34s ease, border-color 0.34s ease;
  }

  body.nav-open .nav-links {
    max-height: 60vh;
    padding: 16px 20px 22px;
    border-bottom-color: rgba(143, 253, 244, 0.14);
  }

  .nav-indicator { display: none; }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-rings { opacity: 0.32; }
}

@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .contact-float {
    top: auto;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: none;
  }

  .contact-fab {
    justify-content: center;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
  }

  .contact-fab-tip {
    display: none;
  }

  .site-load-error {
    width: min(100% - 40px, 640px);
    margin: 120px auto;
    color: var(--muted);
    text-align: center;
  }

  .hero-ticker { margin-top: 26px; }

  .floating-chip.chip-1 { transform: scale(0.82); }
  .floating-chip.chip-2 { transform: scale(0.82); }
  .floating-chip.chip-3 { left: -8px; transform: scale(0.82); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-aura,
  .shot-scan,
  .stage-spectrum i,
  .kicker::before,
  .shimmer {
    animation: none !important;
  }

  [data-stagger]:not(.is-in) [data-stagger-item] {
    opacity: 1;
    transform: none;
  }
}

/* 音色流控件由 section 模块统一接线，覆盖旧样式中的隐藏占位。 */
.coverflow-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(32, 247, 230, 0.42);
  border-radius: 50%;
  background: rgba(5, 18, 20, 0.82);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(32, 247, 230, 0.16);
}

.coverflow-arrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}

.coverflow-arrow.next::before {
  transform: rotate(135deg);
}

.coverflow-arrow:hover,
.coverflow-arrow:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 26px rgba(32, 247, 230, 0.38);
}

.download-qr-code {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.download-qr-code canvas,
.download-qr-code img {
  display: block;
  width: 100%;
  height: 100%;
}

.download-qr-code:empty {
  color: #566;
  font-size: 0.62rem;
  text-align: center;
}
