/* ============================================================
   词粒 CILI 官网 —— 前台样式
   配色取自品牌 Logo：品牌绿 / 蓝 / 橙，浅色教育风
   ============================================================ */

:root {
  --green: #1fa055;
  --green-600: #178541;
  --green-50: #e9f7ef;
  --blue: #2f8fe5;
  --blue-50: #e9f3fd;
  --orange: #f08a24;
  --orange-50: #fdf1e2;
  --yellow: #f7b928;

  --ink: #1c2b21;
  --body: #43544a;
  --muted: #7c8d82;
  --line: #e2ece5;
  --bg: #f6faf7;
  --card: #ffffff;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(23, 69, 41, 0.08);
  --shadow-lg: 0 18px 48px rgba(23, 69, 41, 0.14);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 68px;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 0.6em; }

.container {
  width: min(1140px, 100% - 48px);
  margin-inline: auto;
}

.container.narrow { width: min(820px, 100% - 48px); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(47, 143, 229, 0.45); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(135deg, #23ad5c, var(--green-600));
  color: #fff;
  box-shadow: 0 8px 20px rgba(25, 138, 70, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(25, 138, 70, 0.34); }

.btn-outline {
  background: #fff;
  color: var(--green-600);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green-50); }

.btn-ghost {
  background: rgba(31, 160, 85, 0.10);
  color: var(--green-600);
}
.btn-ghost:hover { background: rgba(31, 160, 85, 0.18); }

.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }

.btn.is-disabled {
  background: #e6ede8;
  color: #9fb0a4;
  border-color: transparent;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(246, 250, 247, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 18px rgba(23, 69, 41, 0.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 19px; letter-spacing: 1px; }
.brand-text i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--green);
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-inline-start: auto;
}
.site-nav a {
  color: var(--body);
  font-weight: 500;
  font-size: 15px;
  position: relative;
}
.site-nav a:hover { color: var(--green-600); text-decoration: none; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
  transition: right 0.25s ease;
}
.site-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

main { padding-top: var(--header-h); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 110px);
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(47, 143, 229, 0.10), transparent 60%),
    radial-gradient(55% 75% at 8% 90%, rgba(240, 138, 36, 0.10), transparent 60%),
    linear-gradient(180deg, #eef8f1 0%, var(--bg) 100%);
}

/* 品牌点阵装饰（呼应 Logo 的点） */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(31, 160, 85, 0.16) 1.6px, transparent 1.6px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--green-600);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.hero-badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 800;
  letter-spacing: 0.5px;
}
.hero-title::after {
  content: "";
  display: block;
  width: 72px; height: 6px;
  margin-top: 16px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue) 55%, var(--orange));
}

.hero-sub {
  max-width: 34em;
  font-size: clamp(15px, 1.4vw, 17px);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* 手机样机 */
.hero-visual { position: relative; display: flex; justify-content: center; }

.phone {
  width: 272px;
  padding: 10px;
  border-radius: 38px;
  background: linear-gradient(160deg, #223128, #101a12);
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
}
.phone-screen img { width: 100%; }
.phone-hero { width: min(300px, 78vw); }

.phone-sm { width: 232px; padding: 8px; border-radius: 32px; }
.phone-sm .phone-screen { border-radius: 25px; }
.phone-sm .phone-screen img { max-height: 430px; object-fit: cover; object-position: top; }

/* 首屏浮动数据卡片 */
.float-chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: floaty 5s ease-in-out infinite;
}
.float-chip b { font-size: 18px; color: var(--ink); }
.float-chip span { font-size: 12px; color: var(--muted); }
.chip-green { top: 12%; left: 2%; border-top: 3px solid var(--green); animation-delay: 0s; }
.chip-blue  { top: 46%; right: 0; border-top: 3px solid var(--blue); animation-delay: 1.2s; }
.chip-orange { bottom: 10%; left: 6%; border-top: 3px solid var(--orange); animation-delay: 2.4s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- 通用 section ---------- */
.section { padding: clamp(56px, 7vw, 92px) 0; }
.section-alt { background: linear-gradient(180deg, #fff 0%, var(--green-50) 100%); }

.section-head {
  max-width: 640px;
  margin: 0 auto clamp(32px, 4vw, 52px);
  text-align: center;
}
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-600);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.section-head p { color: var(--muted); }

/* ---------- 功能亮点 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.feature-shot {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--green-50);
  border-bottom: 1px solid var(--line);
}
.feature-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}
.feature-card:hover .feature-shot img { transform: scale(1.04); }

.feature-body { padding: 18px 20px 22px; }
.feature-body h3 { font-size: 17px; margin-bottom: 8px; }
.feature-body h3::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  vertical-align: 2px;
}
.feature-body p { font-size: 14px; color: var(--body); margin: 0; }

/* ---------- 截图轮播 ---------- */
.shots {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shots-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 4px 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}
.shots-track::-webkit-scrollbar { display: none; }

.shot-item {
  margin: 0;
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
}
.shot-item figcaption {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.shots-arrow {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green-600);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s ease, transform 0.2s ease;
}
.shots-arrow:hover { background: var(--green-50); transform: scale(1.06); }

/* ---------- 协议 / 隐私 / FAQ ---------- */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  align-items: start;
}

.doc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.doc-icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 22px;
  margin-bottom: 14px;
}
.icon-green { background: var(--green-50); }
.icon-blue { background: var(--blue-50); }

.doc-card h3 { font-size: 18px; }
.doc-card p { font-size: 14px; }

.doc-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 14px;
}

/* FAQ 折叠 */
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.faq-list details:last-child { border-bottom: none; }
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 26px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--green);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  margin: 8px 0 4px;
  font-size: 14px;
  color: var(--body);
}

/* ---------- 下载引导 ---------- */
.cta-band {
  padding: clamp(52px, 6vw, 84px) 0;
  background:
    radial-gradient(50% 90% at 80% 20%, rgba(47, 143, 229, 0.25), transparent 60%),
    radial-gradient(45% 80% at 15% 80%, rgba(240, 138, 36, 0.22), transparent 60%),
    linear-gradient(135deg, var(--green-600), #14683a);
  color: #eafaf0;
  text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(22px, 3vw, 32px); }
.cta-band p { color: rgba(255, 255, 255, 0.85); }
.cta-actions { justify-content: center; margin-top: 24px; }
.cta-band .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.cta-band .btn-outline:hover { background: rgba(255, 255, 255, 0.14); }
.cta-band .btn-ghost { background: rgba(255, 255, 255, 0.16); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.26); }
.cta-band .btn.is-disabled { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.5); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #102015;
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 0;
}
.site-footer a { color: rgba(255, 255, 255, 0.75); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
}

.footer-brand .brand { color: #fff; }
.footer-brand .brand-text b { color: #fff; }
.footer-brand .brand-logo { width: 44px; height: 44px; }
.footer-about { margin-top: 14px; font-size: 14px; max-width: 30em; }

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
}
.footer-col p, .footer-col a { display: block; font-size: 14px; margin: 0 0 8px; }
.footer-muted { color: rgba(255, 255, 255, 0.45); font-size: 13px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}
.footer-bottom p { margin: 0; }

/* ---------- 子页面（协议 / 隐私 / FAQ） ---------- */
.page-wrap { padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 7vw, 88px); }

.page-head {
  text-align: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.page-head h1 { font-size: clamp(26px, 3.4vw, 36px); }
.page-meta { color: var(--muted); font-size: 14px; }
.page-meta a { font-weight: 700; }

.prose { font-size: 15.5px; }
.prose h3 { font-size: 18px; margin-top: 30px; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 1.4em; margin: 0 0 14px; }
.prose li { margin-bottom: 8px; }
.prose a { word-break: break-all; }
.prose img { border-radius: var(--radius-sm); margin: 12px 0; }
.prose strong { color: var(--ink); }

.page-back { margin-top: 36px; font-size: 14px; }

.faq-full { margin-top: 8px; }
.faq-full details { padding: 14px 0; }
.faq-full summary { font-size: 16px; }

/* ---------- 小程序码弹窗 ---------- */
.qr-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.qr-modal[hidden] { display: none; }
.qr-modal-mask { position: absolute; inset: 0; background: rgba(16, 32, 21, 0.55); }
.qr-modal-box {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 32px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: min(320px, 90vw);
}
.qr-modal-box h4 { font-size: 16px; }
.qr-modal-box img { margin: 12px auto 0; border-radius: 12px; }
.qr-modal-close {
  position: absolute;
  top: 8px; right: 12px;
  border: none;
  background: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
}

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip { animation: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px 24px 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }

  .float-chip { display: none; }
  .phone-hero { width: min(260px, 70vw); }
  .phone-sm { width: 210px; }
  .phone-sm .phone-screen img { max-height: 380px; }
  .shots-arrow { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
