/*
  site.css — 汉字学习（Hanzi Learn）官方网站公共样式
  由 index.html（中文）与 index-en.html（英文）共用。
  品牌规范：蓝紫渐变 #4a6cf7→#6a4af7，金色点缀 #ffb02e，墨色 #1f2329。
*/
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand1: #4a6cf7;
  --brand2: #6a4af7;
  --gold: #ffb02e;
  --ink: #1f2329;
  --sub: #6b7280;
  --line: #ebedf3;
  --bg-card: #ffffff;
  --gradient: linear-gradient(135deg, #4a6cf7 0%, #6a4af7 100%);
  --gradient-soft: linear-gradient(160deg, #eef1ff 0%, #f7f0ff 60%, #ffffff 100%);
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(74,108,247,.06);
  --shadow-md: 0 14px 34px rgba(106,74,247,.14);
  --maxw: 1120px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ===== 顶部导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--gradient); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(74,108,247,.32);
}
.brand .sub { color: var(--sub); font-weight: 600; font-size: 12px; letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 14.5px; color: #444b55; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--brand1); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 4px; background: #f1f3f9; border-radius: 10px; padding: 4px; }
.lang-switch a { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 8px; color: var(--sub); }
.lang-switch a.active { background: #fff; color: var(--brand1); box-shadow: var(--shadow-sm); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700; padding: 13px 22px; border-radius: 13px;
  cursor: pointer; border: none; transition: .16s; white-space: nowrap;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(2px); }
.btn-ghost { background: #fff; color: var(--brand1); border: 1.5px solid #dfe4f5; }
.btn-ghost:active { transform: translateY(2px); }
.btn-gold { background: var(--gold); color: #5a3b00; box-shadow: 0 12px 26px rgba(255,176,46,.4); }
.btn-gold:active { transform: translateY(2px); }

/* ===== Hero ===== */
.hero {
  background: var(--gradient-soft);
  padding: 76px 0 64px;
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e3e8f7; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--brand1);
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: 46px; line-height: 1.18; font-weight: 800; margin: 20px 0 16px;
  letter-spacing: -0.5px;
}
.hero h1 .accent {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 17px; color: var(--sub); max-width: 520px; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.store-badges { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 16px;
  font-size: 13.5px; line-height: 1.2; transition: .16s;
}
.store-badge:active { transform: translateY(2px); }
.store-badge .sb-top { font-size: 11px; opacity: .7; }
.store-badge .sb-main { font-size: 14.5px; font-weight: 700; }
.store-badge .ic { font-size: 20px; }

/* Hero 汉字展示卡 */
.char-stage { display: flex; justify-content: center; }
.char-card {
  position: relative; width: 300px; height: 360px; border-radius: 28px;
  background: #fff; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; border: 1px solid #eceffb;
}
.char-card::before {
  content: ""; position: absolute; inset: -2px;
  background: var(--gradient); border-radius: 28px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 3px; pointer-events: none;
}
.char-card .cc-pinyin { font-size: 22px; font-weight: 700; color: var(--brand1); letter-spacing: 1px; }
.char-card .cc-char { font-size: 168px; font-weight: 800; line-height: 1; color: var(--ink); margin: 6px 0; }
.char-card .cc-mean { font-size: 16px; color: var(--sub); font-weight: 600; }
.char-card .cc-strokes { position: absolute; bottom: 18px; font-size: 12.5px; color: var(--sub); }
.char-card .cc-badge {
  position: absolute; top: 16px; right: 16px;
  background: #fff4e0; color: #b76e00; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
}

/* ===== 数据条 ===== */
.stats {
  background: var(--gradient); color: #fff; padding: 38px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat .num { font-size: 38px; font-weight: 800; line-height: 1; }
.stat .num small { font-size: 20px; font-weight: 700; margin-left: 2px; }
.stat .label { font-size: 14px; opacity: .9; margin-top: 8px; }

/* ===== 通用区块 ===== */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .eyebrow { color: var(--brand1); font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.section-head h2 { font-size: 32px; font-weight: 800; margin: 10px 0 12px; letter-spacing: -0.3px; }
.section-head p { font-size: 16px; color: var(--sub); }

/* ===== 功能网格 ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); transition: .18s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #dfe4f5; }
.feature-card .ic {
  width: 52px; height: 52px; border-radius: 14px;
  background: #eef1ff; color: var(--brand1);
  display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; color: var(--sub); }

/* ===== 三步学习法 ===== */
.steps-wrap { background: #fafbff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-sm); position: relative;
}
.step .num {
  width: 40px; height: 40px; border-radius: 12px; background: var(--gradient); color: #fff;
  font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--sub); }

/* ===== 会员权益 band ===== */
.member-band { padding: 0 0 72px; }
.member-card {
  position: relative; overflow: hidden; border-radius: 24px;
  background: var(--gradient); color: #fff; padding: 44px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  box-shadow: var(--shadow-md);
}
.member-card::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12);
}
.member-card .mc-text h2 { font-size: 27px; font-weight: 800; margin-bottom: 10px; }
.member-card .mc-text p { font-size: 15.5px; opacity: .92; max-width: 540px; }
.member-card .mc-actions { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; position: relative; z-index: 1; }
.member-card .btn-ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }

/* ===== FAQ ===== */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; background: #fff; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 18px 20px; font-size: 16px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: inherit;
}
.faq-q .arrow { color: var(--brand1); font-size: 20px; transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-q .arrow { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a .inner { padding: 0 20px 18px; font-size: 14.5px; color: var(--sub); }

/* ===== 底部 CTA ===== */
.cta-final { background: var(--gradient-soft); padding: 72px 0; text-align: center; }
.cta-final h2 { font-size: 32px; font-weight: 800; margin-bottom: 14px; }
.cta-final p { font-size: 16px; color: var(--sub); margin-bottom: 28px; }

/* ===== 页脚 ===== */
.footer { background: #14161c; color: #c9ced8; padding: 52px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer .brand { color: #fff; }
.footer .brand .sub { color: #8b93a3; }
.footer .f-about { font-size: 14px; color: #9aa1ad; max-width: 280px; margin-top: 14px; }
.footer h4 { color: #fff; font-size: 14.5px; font-weight: 700; margin-bottom: 16px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { font-size: 14px; color: #aab1bd; transition: color .15s; }
.footer ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #262a33; margin-top: 38px; padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: #7c8492;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero p.lead { margin: 0 auto; }
  .hero-cta, .store-badges { justify-content: center; }
  .char-stage { order: -1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .steps { grid-template-columns: 1fr; }
  .member-card { flex-direction: column; text-align: center; align-items: stretch; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero { padding: 52px 0 44px; }
  .hero h1 { font-size: 34px; }
  .section { padding: 54px 0; }
  .section-head h2 { font-size: 26px; }
  .features-grid { grid-template-columns: 1fr; }
  .char-card { width: 260px; height: 320px; }
  .char-card .cc-char { font-size: 140px; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
