/*
  site.css — 汉字学习（Hanzi Learn）官方网站公共样式
  页面统一使用 xxx.html，通过 URL 的 lang 参数切换文案。
  品牌规范：蓝紫渐变 #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: 44px; height: 44px; border-radius: 12px;
  background: transparent; object-fit: contain; flex-shrink: 0;
  display: block;
  box-shadow: 0 8px 18px rgba(74,108,247,.32);
}
.brand-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.1; }
.brand .sub { color: var(--sub); font-weight: 600; font-size: 12px; line-height: 1.1; 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 { position: relative; }
.lang-current {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 112px; padding: 8px 12px;
  border-radius: 10px; background: #f1f3f9;
  color: var(--brand1); font-size: 13px; font-weight: 600;
}
.lang-current::-webkit-details-marker { display: none; }
.lang-current::after {
  content: ""; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .16s;
}
.lang-switch[open] .lang-current::after { transform: rotate(225deg) translate(-1px, -1px); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  display: grid; gap: 3px; min-width: 150px; padding: 6px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; box-shadow: 0 12px 30px rgba(31,35,41,.14);
}
.lang-menu a {
  display: block; padding: 8px 11px; border-radius: 8px;
  color: var(--sub); font-size: 13px; font-weight: 600;
}
.lang-menu a:hover { background: #f1f3f9; color: var(--brand1); }
.lang-switch[open] .lang-current { background: #fff; 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; }
.store-badges { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.store-badges-centered { justify-content: center; }
.store-badge {
  display: inline-flex; flex: 1 1 164px; max-width: 190px; min-height: 54px;
  align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  background: #191b20; color: #fff; line-height: 1.2;
  box-shadow: 0 8px 20px rgba(20,24,31,.14);
  transition: transform .16s, background-color .16s, box-shadow .16s;
}
.store-badge:hover { background: #101216; box-shadow: 0 10px 24px rgba(20,24,31,.2); transform: translateY(-1px); }
.store-badge:focus-visible { outline: 3px solid rgba(74,108,247,.5); outline-offset: 3px; }
.store-badge:active { transform: translateY(0) scale(.99); }
.store-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.apple-icon { fill: currentColor; }
.store-badge .sb-main { font-size: 15.5px; font-weight: 650; white-space: nowrap; }

/* 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;
}

/* ===== 产品宣传视觉 ===== */
.hero-promo {
  width: min(100%, 320px);
  border-radius: 28px;
  box-shadow: 0 22px 46px rgba(106,74,247,.2);
}
.hero-promo img {
  width: 100%; height: auto; border-radius: 28px;
}
.hero-promo picture, .promo-tile picture { display: block; }
.promo-section { background: #fbfaff; border-top: 1px solid var(--line); }
.promo-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px;
}
.promo-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 10px 10px 16px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.promo-tile img { width: 100%; height: auto; border-radius: 15px; }
.promo-caption { padding: 14px 8px 0; }
.promo-caption strong { display: block; font-size: 17px; margin-bottom: 4px; }
.promo-caption span { display: block; color: var(--sub); font-size: 14px; line-height: 1.55; }
.member-card .mc-visual {
  width: 180px; height: auto; border-radius: 17px; overflow: hidden;
  box-shadow: 0 14px 30px rgba(31,35,41,.22); flex-shrink: 0;
}
.member-card .mc-visual img { width: 100%; height: auto; display: block; }

/* ===== 系统课程 ===== */
.course-section {
  background: #fff;
  border-top: 1px solid var(--line);
}
.course-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 64px;
  align-items: center;
}
.course-copy .eyebrow { color: var(--brand1); font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.course-copy h2 { font-size: 34px; line-height: 1.2; font-weight: 800; margin: 10px 0 14px; letter-spacing: -.4px; }
.course-copy > p { font-size: 16px; color: var(--sub); max-width: 530px; }
.course-points { display: flex; flex-direction: column; gap: 18px; margin: 28px 0 30px; }
.course-point { display: flex; align-items: flex-start; gap: 13px; }
.course-point-num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  background: #eef1ff; color: var(--brand1); display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 800;
}
.course-point strong { display: block; font-size: 16px; margin-bottom: 2px; }
.course-point span:not(.course-point-num) { display: block; color: var(--sub); font-size: 14px; line-height: 1.5; }
.course-preview {
  position: relative; overflow: hidden; border-radius: 26px; padding: 30px;
  color: #fff; background: var(--gradient); box-shadow: var(--shadow-md);
}
.course-preview::after {
  content: ""; position: absolute; width: 240px; height: 240px; right: -100px; bottom: -120px;
  border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none;
}
.course-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; opacity: .82; }
.course-preview-kicker { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }
.course-preview-status { font-size: 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 5px 9px; }
.course-preview-title { font-size: 26px; line-height: 1.2; font-weight: 800; margin: 20px 0 24px; max-width: 310px; }
.course-track { display: flex; flex-direction: column; gap: 13px; position: relative; z-index: 1; }
.course-track::before {
  content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px;
  background: rgba(255,255,255,.26);
}
.course-track-item { display: flex; align-items: center; gap: 13px; position: relative; }
.track-dot {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28); font-size: 12px; font-weight: 800;
}
.course-track-item.is-done .track-dot { background: var(--gold); color: #5a3b00; border-color: var(--gold); }
.course-track-item.is-current .track-dot { background: #fff; color: var(--brand1); border-color: #fff; }
.course-track-item strong { display: block; font-size: 15px; }
.course-track-item small { display: block; font-size: 12px; opacity: .76; margin-top: 1px; }
.course-preview-footer {
  position: relative; z-index: 1; margin-top: 25px; padding-top: 17px;
  border-top: 1px solid rgba(255,255,255,.2); display: flex; justify-content: space-between;
  gap: 12px; font-size: 12px; opacity: .86;
}
.course-preview-footer strong { color: #fff; font-size: 12px; }

/* ===== 数据条 ===== */
.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(4, 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; }
  .store-badges { justify-content: center; }
  .char-stage { order: 0; }
  .promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .course-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: repeat(2, 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; }
  .brand { gap: 7px; font-size: 15px; }
  .brand .logo { width: 38px; height: 38px; border-radius: 11px; }
  .brand-copy { gap: 2px; }
  .brand .sub { font-size: 10px; line-height: 1.1; letter-spacing: .4px; }
  .nav-right { gap: 6px; }
  .lang-current { min-width: 104px; padding: 7px 9px; }
  .nav-right .btn { padding: 9px 12px; font-size: 13px; }
  .store-badges { gap: 10px; }
  .store-badge { min-width: 150px; min-height: 52px; padding: 7px 10px; gap: 8px; }
  .store-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .store-badge .sb-main { font-size: 14.5px; }
  .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; }
  .promo-grid { grid-template-columns: 1fr; }
  .hero-promo { width: min(100%, 300px); }
  .course-copy h2 { font-size: 28px; }
  .course-preview { padding: 24px; }
  .course-preview-title { font-size: 23px; }
  .course-preview-footer { flex-direction: column; gap: 4px; }
  .steps { grid-template-columns: 1fr; }
  .char-card { width: 260px; height: 320px; }
  .char-card .cc-char { font-size: 140px; }
  .member-card .mc-visual { width: min(100%, 220px); }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
