/* ==========================================================================
   Alfred Powerpack 中文官网 · 公共样式 common.css
   主题色 #5C1F87 · 浅色主题 · UTF-8
   ========================================================================== */

:root {
  --brand: #5C1F87;
  --brand-dark: #431561;
  --brand-light: #7d3aad;
  --brand-50: #f5eefb;
  --brand-100: #ece0f5;
  --accent: #b06ae0;
  --ink: #1c1425;
  --ink-soft: #4a4356;
  --muted: #7a7288;
  --line: #ece7f1;
  --bg: #ffffff;
  --bg-soft: #faf8fc;
  --bg-alt: #f5eefb;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(92, 31, 135, .06);
  --shadow: 0 10px 30px rgba(92, 31, 135, .10);
  --shadow-lg: 0 24px 60px rgba(92, 31, 135, .16);
  --maxw: 1200px;
  --nav-h: 72px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-light); }

h1, h2, h3, h4 { line-height: 1.3; color: var(--ink); font-weight: 700; margin: 0 0 .6em; }

p { margin: 0 0 1em; }

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

.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head h2 { font-size: 2.1rem; margin-bottom: .4em; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; font-size: 1rem; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent; transition: all .22s ease;
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn--primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 8px 22px rgba(92, 31, 135, .28);
}
.btn--primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(92, 31, 135, .36); }
.btn--ghost { background: transparent; color: var(--brand); border-color: rgba(92, 31, 135, .28); }
.btn--ghost:hover { background: var(--brand-50); color: var(--brand-dark); border-color: var(--brand); }
.btn--lg { padding: 16px 34px; font-size: 1.08rem; }

/* ==========================================================================
   导航栏 header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -18px rgba(26, 16, 36, .35);
}
.nav {
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
  gap: 20px; transition: height .3s ease;
}
.site-header.is-scrolled .nav { height: calc(var(--nav-h) - 10px); }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo { width: 40px; height: 40px; transition: transform .3s ease; }
.nav__brand:hover .nav__logo { transform: rotate(-6deg) scale(1.05); }
.nav__name { display: flex; flex-direction: column; line-height: 1.2; }
.nav__name strong { font-size: 1.06rem; color: var(--ink); font-weight: 700; }
.nav__name span { font-size: .74rem; color: var(--muted); }

.nav__links { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav__links a {
  color: var(--ink-soft); font-weight: 500; font-size: .96rem; position: relative;
  padding: 8px 14px; border-radius: 10px;
  transition: color .2s ease, background .2s ease;
}
.nav__links a::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; width: 0; height: 2px;
  background: var(--brand); border-radius: 2px;
  transform: translateX(-50%); transition: width .25s ease;
}
.nav__links a:hover { color: var(--brand); background: var(--brand-50); }
.nav__links a:hover::after { width: 20px; }
.nav__links a.active { color: var(--brand); font-weight: 600; }
.nav__links a.active::after { width: 20px; }

.nav__actions { display: flex; align-items: center; gap: 10px; }
.site-header .nav__actions .btn { padding: 9px 18px; font-size: .92rem; }
.site-header .nav__actions .btn svg { width: 17px; height: 17px; }

.nav__toggle {
  display: none; width: 44px; height: 44px; border: none; background: transparent;
  cursor: pointer; padding: 0; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .3s ease; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端 · 遮罩 */
.nav__overlay {
  position: fixed; inset: 0; z-index: 1001; background: rgba(26, 16, 36, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.nav__overlay.is-open { opacity: 1; pointer-events: auto; }

/* 移动端 · 抽屉式弹层 */
.nav__mobile {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1002;
  width: min(86vw, 360px); background: #fff;
  display: flex; flex-direction: column; padding: 26px 22px 32px;
  box-shadow: -20px 0 60px rgba(26, 16, 36, .28);
  transform: translateX(105%); transition: transform .34s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto; overscroll-behavior: contain;
}
.nav__mobile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(160deg, var(--brand-50), transparent); z-index: -1;
}
.nav__mobile.is-open { transform: translateX(0); }

.nav__mobile-links { display: flex; flex-direction: column; margin-top: 8px; }
.nav__mobile-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 14px; font-size: 1.06rem; font-weight: 600; color: var(--ink);
  border-radius: 12px; transition: background .2s ease, color .2s ease, padding-left .2s ease;
  opacity: 0; transform: translateX(14px);
}
.nav__mobile.is-open .nav__mobile-links a {
  animation: mobileItemIn .4s cubic-bezier(.4, 0, .2, 1) forwards;
  animation-delay: calc(var(--i) * .05s + .08s);
}
@keyframes mobileItemIn { to { opacity: 1; transform: translateX(0); } }
.nav__mobile-links a svg { width: 18px; height: 18px; color: var(--muted); transition: color .2s ease, transform .2s ease; }
.nav__mobile-links a:hover, .nav__mobile-links a.active { background: var(--brand-50); color: var(--brand); padding-left: 20px; }
.nav__mobile-links a:hover svg, .nav__mobile-links a.active svg { color: var(--brand); transform: translateX(3px); }
.nav__mobile-links a.active { position: relative; }
.nav__mobile-links a.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: var(--brand); border-radius: 3px; }

.nav__mobile-actions { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.nav__mobile-actions .btn { width: 100%; }
.nav__mobile-foot { margin-top: auto; padding-top: 26px; text-align: center; font-size: .8rem; color: var(--muted); }

@media (max-width: 900px) {
  .nav__links, .nav__actions .btn { display: none; }
  .nav__toggle { display: flex; }
}

/* ==========================================================================
   页脚 footer
   ========================================================================== */
.site-footer { background: #1a1024; color: #cfc6da; padding: 64px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.footer__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer__brand img { width: 44px; height: 44px; }
.footer__brand strong { color: #fff; font-size: 1.15rem; display: block; }
.footer__brand span { font-size: .8rem; color: #9d92ac; }
.footer__desc { font-size: .95rem; color: #a89db6; max-width: 480px; }
.footer__contact h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer__contact a { color: #d9b9f2; }
.footer__contact p { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.footer__contact svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.footer__reseller {
  margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .86rem; color: #8f8499; line-height: 1.8;
}
.footer__reseller .en { color: #6f6579; font-size: .8rem; }
.footer__bottom {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .82rem; color: #7b7185; text-align: center;
}

@media (max-width: 760px) {
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 60px 0; }
  .section-head h2 { font-size: 1.7rem; }
}

/* ---------- 通用卡片网格 ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; margin-bottom: .5em; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- 通用图文交替行（多页面复用） ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature-row + .feature-row { margin-top: 88px; }
.feature-row.reverse .feature-row__media { order: 2; }
.feature-row__media { position: relative; padding: 24px; border-radius: 28px;
  background: linear-gradient(155deg, var(--brand-50), #fff); border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature-row__media img { border-radius: 14px; width: 100%; display: block; }
.feature-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; color: var(--brand); background: var(--brand-50); border-radius: 8px; padding: 7px 13px; margin-bottom: 18px; }
.feature-tag svg { width: 15px; height: 15px; }
.feature-row__text h3 { font-size: 1.8rem; margin-bottom: .5em; }
.feature-row__text p { color: var(--ink-soft); font-size: 1.05rem; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.reverse .feature-row__media { order: 0; }
  .feature-row + .feature-row { margin-top: 56px; }
  .feature-row__media { padding: 16px; }
}

/* ---------- 帮助中心 · 文章排版（多页面复用） ---------- */
.prose { max-width: 820px; margin: 0 auto; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.85; }
.prose h2 { font-size: 1.6rem; color: var(--ink); margin: 44px 0 16px; }
.prose h3 { font-size: 1.25rem; color: var(--ink); margin: 32px 0 12px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 9px; }
.prose img { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin: 24px 0; }
.prose kbd { font-family: var(--font); font-size: .86em; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--bg-alt); color: var(--brand-dark); padding: 2px 7px; border-radius: 6px; }
.prose blockquote { margin: 22px 0; padding: 14px 22px; border-left: 3px solid var(--brand); background: var(--brand-50); border-radius: 0 12px 12px 0; color: var(--ink-soft); }
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.prose a { font-weight: 500; }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 600; }

/* 帮助文章：面包屑 + 侧栏布局 */
.help-crumbs { max-width: 820px; margin: 0 auto 24px; font-size: .88rem; color: var(--muted); }
.help-crumbs a { color: var(--muted); }
.help-crumbs a:hover { color: var(--brand); }
.help-note { max-width: 820px; margin: 40px auto 0; padding: 22px 26px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); font-size: .95rem; color: var(--ink-soft); }
.help-note strong { color: var(--brand); }

/* 帮助中心 · 分组导航卡 */
.help-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .help-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .help-groups { grid-template-columns: 1fr; } }
.help-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 26px; box-shadow: var(--shadow-sm); }
.help-group__ico { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(140deg, var(--brand-50), var(--brand-100)); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.help-group__ico svg { width: 24px; height: 24px; color: var(--brand); }
.help-group h3 { font-size: 1.2rem; margin-bottom: 14px; }
.help-group ul { list-style: none; padding: 0; margin: 0; }
.help-group li { margin-bottom: 10px; }
.help-group a { color: var(--ink-soft); font-size: .96rem; display: inline-flex; align-items: center; gap: 6px; }
.help-group a:hover { color: var(--brand); }

/* 通用页面顶部横幅 */
.page-hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; color: #fff;
  background: radial-gradient(900px 460px at 20% 0%, rgba(176,106,224,.5), transparent 60%),
    radial-gradient(760px 460px at 85% 15%, rgba(96,45,160,.55), transparent 62%),
    linear-gradient(160deg, #2c0f45 0%, #45166a 50%, #2a0d40 100%);
  padding: 80px 0 68px; }
.page-hero__pattern { position: absolute; inset: 0; z-index: -1; background: url("images/flockbg.png") repeat; opacity: .1; }
.page-hero .eyebrow { color: #e4c3ff; }
.page-hero h1 { color: #fff; font-size: 2.6rem; font-weight: 800; margin-bottom: .3em; }
.page-hero p { color: #e2d2f0; font-size: 1.12rem; max-width: 660px; margin: 0 auto; }
@media (max-width: 600px) { .page-hero h1 { font-size: 2rem; } .page-hero { padding: 60px 0 50px; } }
