/* =========================================================================
   PPQCMS 发布页 · 全局样式
   主题：深色锁定（dark only） + 单一青绿强调色
   设计原则：统一圆角、统一强调色、移动优先、动效尊重 reduced-motion
   ========================================================================= */

:root {
  --bg: #0e1116;
  --bg-soft: #12161d;
  --surface: #161b22;
  --surface-2: #1c232c;
  --surface-3: #232c37;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ebef;
  --text-dim: #9aa4b1;
  --text-faint: #6b7682;
  --accent: #4fd1a5;
  --accent-strong: #2fb98a;
  --accent-ink: #06231b;
  --r: 14px;
  --r-sm: 10px;
  --r-pill: 999px;
  --maxw: 1140px;
  --nav-h: 68px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas,
    monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 通用排版 ---------- */
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 18px; }
p { margin: 0; color: var(--text-dim); }

.section { padding: clamp(64px, 9vw, 110px) 0; }
.section + .section { border-top: 1px solid var(--border); }

.lead { color: var(--text-dim); font-size: clamp(15px, 2vw, 17px); max-width: 60ch; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(14, 17, 22, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink); font-weight: 800; font-size: 15px;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-dim); font-size: 14px; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-buy {
  padding: 9px 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  transition: transform 0.15s ease, background 0.2s ease;
}
.nav-buy:hover { background: var(--accent-strong); }
.nav-buy:active { transform: translateY(1px); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }

/* ---------- 首屏 ---------- */
.hero { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px); line-height: 1.08; margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent); }
.hero .lead { font-size: clamp(16px, 2vw, 18px); margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-price { display: inline-flex; align-items: baseline; gap: 6px; margin-left: 4px; color: var(--text-dim); font-size: 14px; }
.hero-price b { color: var(--accent); font-size: 17px; }

/* 首屏右侧：产品占位框（替换为真实截图） */
.hero-visual {
  position: relative; border-radius: 18px; padding: 18px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.hero-visual .frame {
  aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: var(--bg-soft); display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.hero-visual .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .ph {
  color: var(--text-faint); font-size: 14px; text-align: center; padding: 24px;
}
.placeholder-note { color: var(--text-faint); font-size: 12px; margin-top: 10px; text-align: center; }

/* 流动性光晕（克制） */
.hero-visual::before {
  content: ""; position: absolute; inset: -40% 30% auto -10%; height: 220px;
  background: radial-gradient(closest-side, rgba(79, 209, 165, 0.22), transparent);
  filter: blur(20px); pointer-events: none;
}

/* ---------- 核心特色（卡片网格，非三等分） ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px;
}
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 26px; transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover { border-color: var(--accent); transform: translateY(-3px); }
.feature .ico {
  width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: rgba(79, 209, 165, 0.12); color: var(--accent); font-size: 20px; margin-bottom: 16px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 14px; }

/* ---------- 实装截图 ---------- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.shot {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden;
}
.shot .cap { padding: 14px 18px; font-size: 14px; color: var(--text-dim); border-top: 1px solid var(--border); }
.shot .frame { aspect-ratio: 16 / 10; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; }
.shot .frame.tall { aspect-ratio: 9 / 16; max-height: 520px; margin: 0 auto; }
.shot .frame img { width: 100%; height: 100%; object-fit: cover; }
.shot .frame .ph { color: var(--text-faint); font-size: 13px; text-align: center; padding: 20px; }

/* ---------- 视频教程 ---------- */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 44px; }
.video-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.video-card video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.video-card .cap { padding: 14px 18px; font-size: 14px; color: var(--text-dim); }

/* ---------- 横向对比表 ---------- */
.compare-wrap { margin-top: 44px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
table.compare th, table.compare td { padding: 16px 18px; text-align: left; font-size: 14px; }
table.compare thead th { background: var(--surface-2); font-weight: 600; }
table.compare tbody tr + tr td { border-top: 1px solid var(--border); }
table.compare th:first-child, table.compare td:first-child { color: var(--text-dim); }
table.compare .col-ppq { background: rgba(79, 209, 165, 0.07); }
table.compare .col-ppq.head { color: var(--accent); }
table.compare .yes { color: var(--accent); font-weight: 600; }
table.compare .no { color: var(--text-faint); }
.badge-free { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); font-size: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ---------- 资源精选（首页内嵌） ---------- */
.res-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.res-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px; transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.res-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.res-card .rtag { align-self: flex-start; font-size: 12px; color: var(--accent); background: rgba(79, 209, 165, 0.1); padding: 3px 10px; border-radius: var(--r-pill); }
.res-card .rname { font-weight: 600; font-size: 15px; color: var(--text); }
.res-card .rdesc { font-size: 13px; color: var(--text-dim); flex: 1; }
.res-card .rgo { font-size: 13px; color: var(--accent); margin-top: 4px; }
.res-more { margin-top: 28px; }

/* ---------- 资源中心子页：筛选 + 搜索 ---------- */
.res-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 36px 0 28px; }
.res-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.res-tab {
  padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-dim); font-size: 14px; cursor: pointer; transition: all 0.2s ease;
}
.res-tab:hover { color: var(--text); border-color: var(--accent); }
.res-tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.res-search { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.res-search input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: 14px;
}
.res-search input::placeholder { color: var(--text-faint); }
.res-search .si { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.res-count { color: var(--text-faint); font-size: 13px; margin-bottom: 18px; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.res-empty { padding: 50px; text-align: center; color: var(--text-faint); border: 1px dashed var(--border-strong); border-radius: var(--r); }

/* ---------- 页脚 ---------- */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: 14px; color: var(--text); margin: 0 0 14px; }
.footer a { color: var(--text-dim); font-size: 14px; display: block; padding: 5px 0; transition: color 0.2s ease; }
.footer a:hover { color: var(--accent); }
.footer .copy { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 13px; }

/* ---------- 滚动揭示动画 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .res-preview, .res-grid { grid-template-columns: repeat(2, 1fr); }
  .videos { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 4px; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 14px 24px;
  }
  .features-grid, .shots, .res-preview, .res-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual::before { display: none; }
}
