/* ===== 设计变量 ===== */
:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --border: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
}

/* ===== 基础重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== 导航栏 ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  font-size: 14px; color: var(--text-secondary);
  padding: 8px 14px; border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(0, 0, 0, 0.04); }
.nav-cta {
  background: var(--primary) !important; color: #fff !important;
  padding: 8px 20px !important; border-radius: 980px !important;
  font-weight: 500; transition: transform 0.2s var(--ease), opacity 0.2s;
}
.nav-cta:hover { opacity: 0.9; transform: scale(1.02); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }

/* ===== Hero ===== */
.hero {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  background: linear-gradient(180deg, #fbfbfd 0%, var(--bg) 100%);
}
.hero-content { max-width: 720px; }
.hero-tag {
  font-size: 14px; font-weight: 600; color: var(--primary);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px;
  animation: fadeUp 0.8s var(--ease) both;
}
.hero-title {
  font-size: clamp(36px, 8vw, 72px); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.04em; margin-bottom: 24px;
  animation: fadeUp 0.8s var(--ease) 0.1s both;
}
.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px); color: var(--text-secondary);
  margin-bottom: 36px; line-height: 1.7;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}
.hero-btns {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease) 0.3s both;
}
.hero-stats {
  display: flex; gap: 40px; justify-content: center; margin-top: 56px;
  animation: fadeUp 0.8s var(--ease) 0.4s both;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: 980px; font-size: 15px; font-weight: 500;
  transition: transform 0.2s var(--ease), opacity 0.2s, box-shadow 0.3s var(--ease);
  min-height: 48px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 20px rgba(22, 119, 255, 0.3); }
.btn-primary:hover { opacity: 0.9; box-shadow: 0 8px 30px rgba(22, 119, 255, 0.4); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(0, 0, 0, 0.12); }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.03); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: rgba(22, 119, 255, 0.06); }
.btn-full { width: 100%; }

/* ===== 通用区块 ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-card); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; }
.section-tag {
  font-size: 13px; font-weight: 600; color: var(--primary);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 5vw, 48px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 16px;
}
.section-desc { font-size: 16px; color: var(--text-secondary); margin-bottom: 48px; }

/* ===== 关于我 ===== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-top: 40px; }
.about-text p { font-size: 16px; color: var(--text-secondary); margin-bottom: 16px; }
.about-text h3 { font-size: 18px; margin: 28px 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 13px; padding: 6px 14px; border-radius: 980px;
  background: rgba(22, 119, 255, 0.08); color: var(--primary); font-weight: 500;
}
.about-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.about-card h3 { font-size: 18px; margin-bottom: 16px; }
.about-card p { font-size: 15px; color: var(--text-secondary); margin-bottom: 14px; }
.about-card strong { color: var(--text); }

/* ===== 项目作品集 ===== */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 48px; }
.project-card {
  background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project-img { aspect-ratio: 16/10; overflow: hidden; background: #e8e8ed; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.project-card:hover .project-img img { transform: scale(1.04); }
.project-body { padding: 24px; }
.project-body h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.02em; }
.project-body > p { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.project-tags span {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.04); color: var(--text-secondary);
}
.project-result { font-size: 13px; color: var(--primary); font-weight: 500; }

/* ===== 课程 ===== */
.courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.course-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px 28px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; flex-direction: column; position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.course-card-hot { border: 2px solid var(--primary); box-shadow: 0 12px 40px rgba(22, 119, 255, 0.15); }
.course-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 16px; border-radius: 980px;
}
.course-head { text-align: center; margin-bottom: 24px; }
.course-head h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.course-price { font-size: 36px; font-weight: 700; color: var(--primary); letter-spacing: -0.03em; }
.course-price span { font-size: 16px; font-weight: 500; }
.course-type { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.course-list { flex: 1; margin-bottom: 24px; }
.course-list li {
  font-size: 14px; color: var(--text-secondary); padding: 8px 0 8px 22px; position: relative;
}
.course-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 600;
}

/* ===== 学员反馈 ===== */
.reviews-track-wrap { overflow: hidden; margin-top: 48px; padding: 8px 0; }
.reviews-track {
  display: flex; gap: 20px; width: max-content;
  animation: scrollReviews 40s linear infinite;
}
.reviews-track-wrap:hover .reviews-track { animation-play-state: paused; }
.review-card {
  width: 340px; flex-shrink: 0; background: var(--bg-card);
  border-radius: var(--radius-md); padding: 28px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.review-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.review-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(22, 119, 255, 0.1);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
}
.reviews-note { text-align: center; font-size: 12px; color: var(--text-secondary); margin-top: 24px; }

/* ===== FAQ ===== */
.faq-list { margin-top: 40px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; font-size: 17px; font-weight: 500; color: var(--text);
  text-align: left; transition: color 0.2s;
}
.faq-q:hover { color: var(--primary); }
.faq-icon { font-size: 22px; font-weight: 300; transition: transform 0.4s var(--ease); color: var(--text-secondary); }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--primary); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
}
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 22px; }
.faq-a p { font-size: 15px; color: var(--text-secondary); line-height: 1.8; }

/* ===== 底部 ===== */
.footer {
  background: var(--text); color: #fff; padding: 80px 0 40px;
}
.footer-cta { text-align: center; margin-bottom: 56px; }
.footer-cta h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.footer-cta > p { color: rgba(255, 255, 255, 0.6); margin-bottom: 32px; }
.footer-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-qr img { width: 160px; height: 160px; object-fit: cover; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.1); }
.footer-qr p { font-size: 14px; color: rgba(255, 255, 255, 0.6); }
.footer-disclaimer {
  max-width: 720px; margin: 0 auto 40px; padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-disclaimer > p { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer-disclaimer ol { padding-left: 18px; }
.footer-disclaimer li { font-size: 12px; color: rgba(255, 255, 255, 0.4); line-height: 1.8; }
.footer-copy { text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.3); }

/* ===== 动画 ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollReviews {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== 响应式：平板 ===== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr 1fr; }
  .course-card-hot { grid-column: span 2; }
}

/* ===== 响应式：手机 ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    flex-direction: column; padding: 20px 24px; gap: 4px;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.3s;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 16px; border-radius: 12px; }
  .nav-cta { text-align: center; margin-top: 8px; }

  .section { padding: 72px 0; }
  .hero { padding: 100px 20px 60px; }
  .hero-stats { gap: 24px; margin-top: 40px; }
  .stat-num { font-size: 26px; }

  .projects-grid { grid-template-columns: 1fr; gap: 20px; }
  .courses-grid { grid-template-columns: 1fr; gap: 20px; }
  .course-card-hot { grid-column: auto; }

  .review-card { width: 280px; padding: 22px; }
  .reviews-track { animation-duration: 30s; }

  .btn { padding: 13px 26px; font-size: 14px; }
  .footer { padding: 60px 0 32px; }
  .footer-qr img { width: 140px; height: 140px; }
}

/* ===== 横屏手机优化 ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 80px 24px 40px; }
  .hero-stats { margin-top: 28px; }
}

/* ===== 减少动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}