/*
 * DogTV 官网公共样式（首页 + 法律页共用）
 * - 纯 CSS，无构建；颜色统一定义在 :root
 * - 动画均在 prefers-reduced-motion 下关闭
 * - 滚动入场动画依赖 html.js（由 main.js 添加），无 JS 时内容直接可见
 */
:root {
  --bg: #07080c;
  --bg-elev: #0e1016;
  --bg-card: rgba(255, 255, 255, 0.035);
  --text: #f2f3f5;
  --text-muted: #9aa1ad;
  --text-dim: #6b7280;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --brand: #68e36a;
  --brand-2: #3fd9c8;
  --brand-3: #8b7bff;
  --brand-ink: #0b1a0c;
  --radius: 18px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(104, 227, 106, 0.3); }

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

/* 渐变文字；不支持 background-clip:text 的浏览器回退为品牌色 */
.gradient-text {
  color: var(--brand);
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 50%, var(--brand-3));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 6s linear infinite;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
}
.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 8px 30px -8px rgba(104, 227, 106, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(104, 227, 106, 0.75); }
.btn-ghost { border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.04); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-2px); }
.btn svg { transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* ---------- 顶部导航：滚动后变为毛玻璃 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.site-header.scrolled,
.site-header.solid {
  background: rgba(7, 8, 12, 0.78);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo img { height: 28px; width: auto; }
.nav { display: flex; gap: 32px; font-size: 15px; color: var(--text-muted); }
.nav a { position: relative; transition: color 0.2s; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* 移动端浏览器地址栏兼容，不支持时回退到 100vh */
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 80px;
}
/* 背景网格 */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
/* 流动光晕 */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}
.glow-1 { width: 520px; height: 520px; top: -120px; left: -80px; background: var(--brand); opacity: 0.28; animation: drift1 18s ease-in-out infinite; }
.glow-2 { width: 460px; height: 460px; top: 10%; right: -120px; background: var(--brand-3); opacity: 0.32; animation: drift2 22s ease-in-out infinite; }
.glow-3 { width: 380px; height: 380px; bottom: -160px; left: 35%; background: var(--brand-2); opacity: 0.22; animation: drift1 26s ease-in-out infinite reverse; }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-muted);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(104, 227, 106, 0.6);
  animation: pulse 2s infinite;
}
.hero h1 { margin: 0 0 24px; font-size: 60px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.hero-desc { margin: 0 0 36px; max-width: 540px; font-size: 18px; color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* 首屏右侧：AI 生成预览卡片 */
.preview {
  position: relative;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: float 7s ease-in-out infinite;
}
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 4px 6px 12px; }
.preview-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.preview-bar span { margin-inline-start: auto; font-size: 12px; color: var(--text-dim); }
.preview-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px; background: #111; }
.preview-media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 16s ease-in-out infinite alternate; }
/* 扫描光带，模拟“正在生成” */
.preview-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(104, 227, 106, 0.28), transparent);
  animation: scan 3.6s var(--ease) infinite;
}
.preview-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 14px;
  color: var(--text-muted);
}
.preview-prompt .caret { width: 2px; height: 16px; background: var(--brand); animation: blink 1s steps(1) infinite; }
.progress { height: 4px; margin-top: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  animation: progress 3.6s var(--ease) infinite;
}
/* 悬浮标签 */
.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(14, 16, 22, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.chip b { color: var(--brand); }
.chip-1 { top: 18%; left: -36px; animation: float 6s ease-in-out infinite -2s; }
.chip-2 { bottom: 16%; right: -28px; animation: float 8s ease-in-out infinite -4s; }

/* 首屏下方滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 24px;
  height: 38px;
  margin-left: -12px;
  border: 2px solid var(--border-strong);
  border-radius: 12px;
}
.scroll-hint::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--text-muted);
  animation: wheel 1.8s ease-in-out infinite;
}

/* ---------- 数据条 ---------- */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.stats .container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 36px 16px; text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--border); }
.stat strong { display: block; font-size: 30px; font-weight: 800; }
.stat span { font-size: 14px; color: var(--text-muted); }

/* ---------- 通用区块 ---------- */
.section { position: relative; padding: 120px 0; }
.section.elev { background: var(--bg-elev); }
.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.kicker { display: inline-block; margin-bottom: 14px; color: var(--brand); font-size: 13px; font-weight: 600; letter-spacing: 0.18em; }
.section-title { margin: 0 0 16px; font-size: 40px; line-height: 1.3; font-weight: 800; }
.section-desc { margin: 0; color: var(--text-muted); font-size: 17px; }

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

/* 卡片：悬停时上浮 + 跟随鼠标的光斑（--mx/--my 由 main.js 写入） */
.card {
  position: relative;
  padding: 32px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(104, 227, 106, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: rgba(104, 227, 106, 0.35); }
.card:hover::before { opacity: 1; }
.card h3 { position: relative; margin: 0 0 10px; font-size: 19px; }
.card p { position: relative; margin: 0; color: var(--text-muted); font-size: 15px; }
.icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 14px;
  color: var(--brand);
  background: linear-gradient(140deg, rgba(104, 227, 106, 0.2), rgba(63, 217, 200, 0.06));
  border: 1px solid rgba(104, 227, 106, 0.25);
}
.icon svg { width: 24px; height: 24px; }

/* ---------- 创作流程 ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
/* 步骤间连线，进入视口后从左向右绘制 */
.steps::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  transform-origin: left;
  transition: transform 1.4s var(--ease) 0.3s;
}
.js .steps:not(.in)::before { transform: scaleX(0); }
.step { position: relative; text-align: center; }
.step-num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 1px solid rgba(104, 227, 106, 0.4);
  background: var(--bg);
  color: var(--brand);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 0 8px var(--bg), 0 0 30px rgba(104, 227, 106, 0.25);
}
.step h3 { margin: 0 0 8px; font-size: 19px; }
.step p { margin: 0 auto; max-width: 300px; color: var(--text-muted); font-size: 15px; }

/* ---------- 关于 / 联系 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split .section-title, .split .kicker { text-align: start; }
.info-panel { padding: 8px 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.info-list { margin: 0; padding: 0; list-style: none; }
.info-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: 0; }
.info-list .label { flex: 0 0 96px; color: var(--text-dim); }

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  position: relative;
  overflow: hidden;
  padding: 64px 48px;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(600px circle at 20% 0%, rgba(104, 227, 106, 0.22), transparent 60%),
    radial-gradient(600px circle at 80% 100%, rgba(139, 123, 255, 0.22), transparent 60%),
    var(--bg-elev);
}
.cta-banner h2 { margin: 0 0 12px; font-size: 34px; }
.cta-banner p { margin: 0 0 28px; color: var(--text-muted); }

/* ---------- 页脚 ---------- */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 14px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a, .beian a { transition: color 0.2s; }
.footer-links a:hover, .beian a:hover { color: var(--text); }
.beian { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 24px; border-top: 1px solid var(--border); }
.beian img { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-inline-end: 4px; }

/* ---------- 法律文件页 ---------- */
.legal { padding: 120px 0 96px; }
.legal .container { max-width: 840px; }
.legal h1 { margin: 0 0 32px; font-size: 34px; }
.legal h2 { margin: 40px 0 14px; padding-top: 8px; font-size: 20px; }
.legal p { margin: 0 0 12px; color: #c9ced6; }
.legal strong { color: var(--text); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; font-size: 14px; }
.legal-nav a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); transition: all 0.2s; }
.legal-nav a:hover { color: var(--text); border-color: var(--border-strong); }
.legal-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); font-weight: 600; }

/* ---------- 滚动入场动画 ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.1s; }
.js .reveal[data-delay="2"] { transition-delay: 0.2s; }
.js .reveal[data-delay="3"] { transition-delay: 0.3s; }
.js .reveal[data-delay="4"] { transition-delay: 0.4s; }
.js .reveal[data-delay="5"] { transition-delay: 0.5s; }

/* ---------- 关键帧 ---------- */
@keyframes shine { to { background-position: 200% center; } }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-100px, 120px) scale(0.9); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, -2%); } }
@keyframes scan { 0% { top: -40%; } 100% { top: 100%; } }
@keyframes progress { 0% { width: 0; } 80%, 100% { width: 100%; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(104, 227, 106, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(104, 227, 106, 0); } }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner, .split { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 46px; }
  .preview { max-width: 560px; }
  .chip-1 { left: -8px; }
  .chip-2 { right: -8px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scroll-hint { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav { gap: 18px; font-size: 14px; }
  .nav .hide-sm { display: none; }
  .hero { padding: 104px 0 64px; }
  .hero h1 { font-size: 34px; }
  .hero-desc { font-size: 16px; }
  .chip { display: none; }
  .stats .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .stat strong { font-size: 24px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 44px; }
  .section-title { font-size: 28px; }
  .grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 40px; }
  .steps::before { display: none; }
  .info-panel { padding: 4px 20px; }
  .info-list li { flex-direction: column; gap: 2px; }
  .cta-banner { padding: 48px 20px; }
  .cta-banner h2 { font-size: 26px; }
  .legal h1 { font-size: 26px; }
}

/* 尊重系统“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
