/* ============================================================
   优词记 Pro 官网样式
   主色：#5BB5A2（薄荷绿） 辅助色：#14D6B3
   风格：清新教育风 · 移动优先 · 无框架依赖
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --primary: #5bb5a2;
  --primary-dark: #3e9484;
  --primary-deep: #2c6f62;
  --accent: #14d6b3;
  --bg: #ffffff;
  --bg-soft: #f4faf8;
  --bg-mint: #e9f6f2;
  --text: #2b3a37;
  --text-light: #64766f;
  --line: #e3ede9;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 30px rgba(91, 181, 162, 0.12);
  --shadow-strong: 0 16px 44px rgba(91, 181, 162, 0.2);

  /* 流式字号 */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1rem + 1.25vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.625rem);

  /* 流式间距 */
  --space-section: clamp(3.5rem, 3rem + 3vw, 6rem);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* 锚点跳转时为吸顶导航留出空间 */
  scroll-padding-top: 84px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #fff;
}

.btn-ghost:hover {
  background: var(--bg-mint);
}

/* ---------- 区块标题 ---------- */
.section {
  padding-block: var(--space-section);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--bg-mint);
  color: var(--primary-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.section-desc {
  margin-top: 12px;
  color: var(--text-light);
  font-size: var(--text-sm);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(43, 58, 55, 0.06);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-lg);
  font-weight: 800;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}

.brand-name em {
  font-style: normal;
  color: var(--primary);
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px 4%;
}

.nav-menu.is-open {
  display: block;
}

.nav-menu a {
  display: block;
  padding: 14px 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  border-radius: 10px;
}

.nav-menu a:hover {
  color: var(--primary-dark);
  background: var(--bg-soft);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s 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);
}

/* ---------- 首屏 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(20, 214, 179, 0.14), transparent 70%),
    radial-gradient(500px 260px at -5% 30%, rgba(91, 181, 162, 0.12), transparent 70%),
    var(--bg-soft);
}

.hero-inner {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  padding-block: clamp(3rem, 2.5rem + 3vw, 5.5rem);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  box-shadow: var(--shadow);
}

.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  margin-top: 20px;
  font-size: var(--text-3xl);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-desc {
  margin-top: 16px;
  color: var(--text-light);
  font-size: var(--text-base);
  max-width: 32em;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-stats {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 1rem + 2vw, 3rem);
}

.hero-stat strong {
  display: block;
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--primary-dark);
}

.hero-stat span {
  font-size: var(--text-xs);
  color: var(--text-light);
}

/* 首屏小程序码卡片 */
.hero-qr {
  justify-self: center;
  width: min(340px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  text-align: center;
  box-shadow: var(--shadow-strong);
  border: 1px solid var(--line);
}

.hero-qr img {
  width: 100%;
  border-radius: var(--radius);
}

.hero-qr p {
  margin-top: 14px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--primary-dark);
}

.hero-qr small {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: var(--text-xs);
}

/* ---------- 功能亮点 ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
}

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(91, 181, 162, 0.4);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-mint);
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--primary-dark);
}

.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: 800;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-light);
  font-size: var(--text-sm);
}

.feature-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-list li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--primary-dark);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ---------- 学习体验（学习闭环） ---------- */
.experience {
  background: var(--bg-soft);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  counter-reset: step;
}

.step {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  counter-increment: step;
}

.step::before {
  content: "0" counter(step);
  display: block;
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 8px;
}

.step h3 {
  font-size: var(--text-base);
  font-weight: 800;
  margin-bottom: 6px;
}

.step p {
  font-size: var(--text-xs);
  color: var(--text-light);
}

.experience-note {
  margin-top: clamp(1.5rem, 1.2rem + 1vw, 2.5rem);
  text-align: center;
  color: var(--primary-dark);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ---------- 下载引导区 ---------- */
.download-grid {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.download-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1.4rem + 1.5vw, 3rem);
  display: grid;
  gap: clamp(1.5rem, 1.2rem + 1vw, 2.5rem);
  align-items: center;
  overflow: hidden;
}

.download-card-main {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-dark) 55%, var(--primary));
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.download-card-sub {
  background: #fff;
  border: 1px solid var(--line);
}

.download-info h3 {
  font-size: var(--text-xl);
  font-weight: 800;
}

.download-info .platform-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.download-card-main .platform-tag {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.download-card-sub .platform-tag {
  background: var(--bg-mint);
  color: var(--primary-dark);
}

.download-info p {
  margin-top: 12px;
  font-size: var(--text-sm);
  max-width: 30em;
}

.download-card-main p {
  color: rgba(255, 255, 255, 0.85);
}

.download-card-sub p {
  color: var(--text-light);
}

.download-points {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-points li {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.download-card-main .download-points li {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.download-card-sub .download-points li {
  background: var(--bg-soft);
  color: var(--primary-dark);
}

/* 二维码展示块 */
.download-qr {
  justify-self: center;
  text-align: center;
}

.download-qr .qr-frame {
  width: clamp(160px, 140px + 4vw, 210px);
  aspect-ratio: 1;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.download-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.download-qr figcaption {
  margin-top: 12px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.download-card-main figcaption {
  color: #fff;
}

.download-card-sub figcaption {
  color: var(--text-light);
}

/* APP 开发中徽标与即将上线占位 */
.badge-developing {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-mint);
  color: var(--primary-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  border: 1px solid rgba(91, 181, 162, 0.35);
}

/* 即将上线占位：虚线框 + 居中 Logo，替代真实二维码 */
.download-qr.qr-coming .qr-frame {
  background: var(--bg-soft);
  border: 2px dashed rgba(91, 181, 162, 0.45);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.download-qr.qr-coming .qr-coming-logo {
  width: 46%;
  height: auto;
  border-radius: 16px;
}

.download-qr.qr-coming .qr-coming-text {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.06em;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.72);
  padding-block: clamp(2rem, 1.8rem + 1vw, 3rem);
  font-size: var(--text-xs);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
}

.footer-brand .brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   桌面端增强（移动优先，768px 起）
   ============================================================ */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    gap: 6px;
  }

  .nav-menu a {
    padding: 10px 16px;
  }

  .nav-cta {
    display: inline-flex;
    min-height: 42px;
    padding: 0 22px;
  }

  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 1024px) {
  .download-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }

  .download-card {
    grid-template-columns: auto;
    align-content: center;
    justify-items: center;
    text-align: center;
  }

  .download-card-main {
    grid-template-columns: 1fr auto;
    text-align: left;
    justify-items: start;
    align-items: center;
  }
}
