/* ============================================================
   字幕说 · 音文对齐营销页 — 公共样式（机制层）
   reset / 按钮 / 入场动效 / 噪点 / FAQ / 无障碍
   配色与视觉系统由各页面 index.html 内的 <style> 自行定义
   ============================================================ */

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
ul, ol { list-style: none; }

/* ---------- 字体与曲线 ---------- */
:root {
  --font-sans: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong",
    "SimSun", serif;
  --brand: #059669;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-swift: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}
@media (min-width: 768px) {
  .container { padding-inline: 40px; }
}

/* ---------- Eyebrow 徽标 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, var(--brand));
}

/* ---------- CTA 按钮（Button-in-button 结构）---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    transform 0.5s var(--ease-swift),
    box-shadow 0.5s var(--ease-swift),
    background-color 0.3s ease,
    color 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn-orb {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.18);
  transition: transform 0.5s var(--ease-spring), background-color 0.3s ease;
}
.btn:hover .btn-orb { transform: translateX(3px) scale(1.06); }
.btn-orb svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--btn-bg, var(--brand));
  color: var(--btn-fg, #fff);
  box-shadow: 0 14px 34px -14px var(--btn-glow, rgb(5 150 105 / 0.55));
}
.btn-primary:hover {
  box-shadow: 0 20px 46px -16px var(--btn-glow, rgb(5 150 105 / 0.65));
}

.btn-ghost {
  padding: 13px 30px;
  color: var(--ghost-fg, inherit);
  box-shadow: inset 0 0 0 1.5px var(--ghost-line, rgb(255 255 255 / 0.24));
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ghost-line-hover, rgb(255 255 255 / 0.5)); }

.btn-lg { padding: 10px 10px 10px 32px; font-size: 17px; }
.btn-lg .btn-orb { width: 44px; height: 44px; }
.btn-lg .btn-orb svg { width: 17px; height: 17px; }
.btn-lg.btn-ghost { padding: 15px 34px; }

/* ---------- 入场动效（渐进增强：仅 html.js 时才预隐藏）---------- */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* ---------- 胶片噪点（固定层，不随滚动重绘）---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- FAQ 折叠 ---------- */
.faq details { border-top: 1px solid var(--faq-line, rgb(128 128 128 / 0.25)); }
.faq details:last-child { border-bottom: 1px solid var(--faq-line, rgb(128 128 128 / 0.25)); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 17px;
  transition: color 0.3s ease;
}
.faq summary::-webkit-details-marker { display: none; }

.faq-plus {
  flex: none;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--faq-line, rgb(128 128 128 / 0.35));
  transition: transform 0.45s var(--ease-spring), box-shadow 0.3s ease;
}
.faq-plus::before,
.faq-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] .faq-plus { transform: rotate(45deg); }

.faq-a {
  max-width: 62ch;
  padding: 0 4px 24px;
  font-size: 15.5px;
  line-height: 1.85;
  opacity: 0.78;
}

/* ---------- 无障碍与降级 ---------- */
:focus-visible {
  outline: 2px solid var(--accent, var(--brand));
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent, var(--brand)); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
