/* 阿里妈妈数黑体 */
@font-face {
  font-family: 'AlimamaShuHeiTi';
  src: url('./public/fonts/Alimama_ShuHeiTi_Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --header-height: 80px;
  --primary-color: #5c20ff;
  --primary-hover: #4814d6;
  --primary-light: #ece6ff;
  --text-dark: #333333;
  --text-medium: #666666;
  --text-light: #999999;
  --bg-main: #faf7ff;
  --white: #ffffff;
  --card-shadow: 0px 10px 20px 0px rgba(92, 32, 255, 0.2);
  --card-shadow-sm: 0px 5px 10px 0px rgba(92, 32, 255, 0.15);
  --font-heading:
    'AlimamaShuHeiTi', -apple-system, BlinkMacSystemFont, 'PingFang SC',
    sans-serif;
  --font-body:
    'PingFang SC', -apple-system, BlinkMacSystemFont, 'Microsoft YaHei',
    sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* 全局背景装饰图片 (100% 宽度无缝铺满，无任何白边) */
.global-bg-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.banner-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: max(900px, 100svh);
  object-fit: cover;
  object-position: center top;
}

.left-bg-img {
  position: absolute;
  top: 600px;
  left: 0px;
  width: 900px;
}

.btm-bg-img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.7;
}

/* PC 端固定宽度容器 1200px */
.container {
  width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-content {
  margin-top: 100px;
  padding: 0 50px;
  box-sizing: border-box;
}

/* 头部 Header (1200px 居中) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    backdrop-filter 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(250, 247, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(92, 32, 255, 0.08);
  box-shadow: 0px 4px 20px rgba(92, 32, 255, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo-area {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.logo-slogan {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 2px;
  padding-bottom: 2px;
  font-weight: 400;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 60px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 26px;
  border-radius: 10px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
  background-color: rgba(92, 32, 255, 0.06);
}

/* 导航当前区块高亮 (Scrollspy) */
.nav-links a.active {
  color: var(--primary-color);
  background-color: rgba(92, 32, 255, 0.08);
  font-weight: 600;
}

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

.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-contact:hover {
  background-color: rgba(92, 32, 255, 0.06);
  color: var(--primary-color);
}

.btn-contact img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  border-radius: 10px;
  background: var(--primary-color);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--primary-color);
  box-shadow: 0px 10px 10px rgba(92, 32, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0px 14px 20px rgba(92, 32, 255, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Banner / Hero 区域 */
.hero-section {
  padding-top: 60px;
  padding-bottom: 0;
  text-align: left;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 70px;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-align: left;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 54px;
  color: var(--primary-color);
  line-height: 1.2;
  margin-bottom: 24px;
  text-align: left;
}

.hero-tags {
  font-size: 30px;
  color: var(--text-dark);
  letter-spacing: 4px;
  margin-bottom: 40px;
  font-weight: 500;
  text-align: left;
}

.hero-cta {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0;
}

/* 强指 Hero CTA 按钮尺寸: 200px x 50px */
.btn-hero {
  width: 200px;
  height: 50px;
  font-size: 20px;
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 10px 10px rgba(92, 32, 255, 0.3);
}

/* 用户统计数卡片 (贴着 900px banner-bg-img 底部: 2/5 即 80px 处于图片内，3/5 处于图片外) */
.stats-card {
  width: 800px;
  height: 200px;
  margin: 240px auto 0;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0px 5px 10px 0px rgba(255, 255, 255, 0.5),
    0px 10px 20px 0px rgba(92, 32, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.stats-label {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.stats-number {
  font-size: 75px;
  font-weight: 500;
  color: var(--primary-color);
  line-height: 1;
  font-family: var(--font-heading), var(--font-body);
}

/* 锚点跳转时为粘性头部预留偏移，避免区块标题被遮挡 */
#hero,
#product-intro,
#tutorials,
#faq {
  scroll-margin-top: var(--header-height);
}

/* Section 通用标题 (Figma 24px) */
.section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 48px;
}

/* 产品介绍 Product Section (与上方 stats-card 精确保持 150px 间距) */
.product-section {
  padding: 150px 0 100px;
  position: relative;
  z-index: 1;
}

.product-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 150px;
}

.product-carousel {
  width: 100%;
}

.product-visual {
  width: 570px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.product-img-wrapper {
  position: relative;
  width: 570px;
  overflow: hidden;
}

.product-image-track,
.product-text-group {
  display: grid;
}

.product-image-slide,
.product-copy-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0.45s;
}

.product-image-slide {
  margin: 0;
}

.product-image-slide.is-active,
.product-copy-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

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

.product-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 4px;
  margin-top: 16px;
}

.product-carousel-dot {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-carousel-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
  transition:
    width 0.25s ease,
    height 0.25s ease,
    background-color 0.25s ease;
}

.product-carousel-dot.is-active::before {
  width: 10px;
  height: 10px;
  background: var(--primary-color);
}

.product-carousel-dot:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
}

.product-content {
  width: 422px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-dark);
  padding-top: 20px;
  margin-bottom: 24px;
  line-height: 1.3;
  text-align: left;
}

.product-text-group {
  margin-bottom: 30px;
  font-size: 18px;
  color: #333333;
  line-height: 1.6;
}

.product-text-group p {
  word-break: break-word;
}

.btn-product {
  width: 140px;
  height: 40px;
  font-size: 14px;
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 官方教程 Tutorials Section */
.tutorials-section {
  padding: 80px 0 100px;
  position: relative;
  z-index: 1;
}

.cards-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 48px;
}

/* 单张卡片按照 Figma 230px x 390px */
.tutorial-card {
  width: 230px;
  height: 390px;
  background: var(--white);
  border-radius: 20px;
  padding: 10px;
  box-shadow: var(--card-shadow-sm);
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.tutorial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow);
}

.tutorial-card.featured {
  box-shadow: var(--card-shadow);
  border: none;
}

.card-cover {
  width: 210px;
  height: 140px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e4ebff 0%, #d5deff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary-color);
  overflow: hidden;
}

.card-cover-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card-cover-svg {
  width: 50px;
  height: 50px;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 4px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-desc {
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 10px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.tutorial-card:hover .card-action,
.card-action:hover {
  background: var(--primary-color);
  color: var(--white);
}

.arrow-icon {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.tutorials-section .btn-primary {
  width: 140px;
  height: 40px;
  font-size: 14px;
  padding: 0;
}

.section-footer-cta {
  text-align: center;
}

/* 常见问题 FAQ Section (按照 Figma: width 900px 居中) */
.faq-section {
  padding: 80px 0 100px;
  position: relative;
  z-index: 1;
}

.faq-list {
  width: 900px;
  margin: 0 auto 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  min-height: 82px;
  padding: 14px 20px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: inherit;
  text-decoration: none;
}

.faq-item:hover,
.faq-item:focus-visible {
  background: var(--white);
  border-color: rgba(92, 32, 255, 0.18);
  box-shadow: 0px 5px 12px rgba(92, 32, 255, 0.16);
  transform: translateY(-2px);
  outline: none;
}

.faq-copy {
  min-width: 0;
  flex: 1;
}

.faq-question {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.faq-link-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.faq-link-icon svg {
  width: 14px;
  height: 14px;
  fill: var(--text-medium);
  transform: rotate(-90deg);
  transition: fill 0.25s ease;
}

.faq-item:hover .faq-link-icon,
.faq-item:focus-visible .faq-link-icon {
  transform: translateX(3px);
}

.faq-item:hover .faq-link-icon svg,
.faq-item:focus-visible .faq-link-icon svg {
  fill: var(--primary-color);
}

.faq-section .btn-primary {
  width: 140px;
  height: 40px;
  font-size: 14px;
  padding: 0;
}

/* 页脚 Footer */
.site-footer {
  padding: 80px 0 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-hero-text {
  margin-bottom: 40px;
}

.footer-h1 {
  font-family: var(--font-heading);
  font-size: 60px;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.footer-h2 {
  font-family: var(--font-heading);
  font-size: 46px;
  color: var(--primary-color);
  margin-bottom: 30px;
}

.footer-cta {
  margin-bottom: 60px;
}

.footer-cta .btn-hero {
  width: 160px;
  height: 50px;
  font-size: 20px;
}

.footer-content-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(92, 32, 255, 0.1);
}

.footer-content-links-label {
  flex: none;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
}

.footer-content-links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.footer-content-links a {
  color: var(--text-medium);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-content-links a:hover {
  color: var(--primary-color);
}

.footer-content-links a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-info-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: none;
  padding-top: 40px;
  margin-bottom: 40px;
  text-align: left;
}

.footer-contact p {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 20px;
  width: auto;
  white-space: nowrap;
}

.footer-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qrcode-box {
  width: 100px;
  height: 100px;
  background: var(--white);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qrcode-label {
  font-size: 12px;
  color: var(--text-dark);
}

.footer-icp {
  font-size: 12px;
  color: var(--text-dark);
}

.footer-icp a {
  color: var(--text-dark);
  text-decoration: none;
}

.footer-icp a:hover {
  text-decoration: underline;
}

/* 右侧挂饰与悬浮组件 (按 Figma node 4:2, 4:7 放置 1580px, 3349px) */
.floating-widgets {
  position: fixed;
  right: 30px;
  bottom: 40px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.float-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0px 8px 20px rgba(92, 32, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0px 12px 28px rgba(92, 32, 255, 0.35);
}

.float-btn img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* 回到顶部：无白色背景，直接展示图片 */
.float-back-top {
  background: transparent;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.float-back-top:hover {
  background: transparent;
  box-shadow: none;
  transform: scale(1.1);
}

.float-back-top.show {
  opacity: 1;
  visibility: visible;
}

/* 右侧吉祥物紧贴屏幕最右侧 */
.right-pig-decor {
  position: absolute;
  right: 0;
  bottom: 260px;
  width: 198px;
  height: auto;
  pointer-events: none;
  z-index: 2;
}

/* 客服弹窗 Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 380px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-main);
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-medium);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-medium);
  margin-bottom: 20px;
}

.modal-qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 桌面端分屏布局：滚轮切屏由 index.js 控制，避免原生滚动后再次吸附 */
@media (min-width: 901px) {
  .screen-section {
    min-height: calc(100svh - var(--header-height));
    display: flex;
    align-items: center;
  }

  .hero-section {
    padding: 0;
  }

  .hero-content {
    margin-top: 0;
  }

  .stats-card {
    height: clamp(150px, 18vh, 190px);
    margin-top: clamp(44px, 7vh, 80px);
  }

  .product-section,
  .tutorials-section,
  .faq-section,
  .site-footer {
    padding-top: clamp(32px, 5vh, 64px);
    padding-bottom: 20px;
  }

  .site-footer > .container {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .footer-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .footer-bottom {
    flex-shrink: 0;
  }

  .tutorials-section .section-title,
  .faq-section .section-title {
    margin-bottom: 32px;
  }

  .cards-grid {
    margin-bottom: 32px;
  }

  .footer-hero-text {
    margin-bottom: 24px;
  }

  .footer-h2 {
    margin-bottom: 20px;
  }

  .footer-cta {
    margin-bottom: 32px;
  }

  .footer-info-grid {
    padding-top: 0;
    margin-bottom: 16px;
  }
}

/* 滚动渐入动画 (Scroll Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 尊重系统“减少动态效果”偏好 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .product-image-slide,
  .product-copy-slide,
  .product-carousel-dot::before {
    transition: none;
  }
}

/* ============================================================
   响应式适配 (Responsive)
   桌面优先：以下均为 max-width 覆盖规则，不改动上方桌面端样式。
   断点：1240px 容器流式 / 900px 布局堆叠 / 768px 头部精简 / 640px 手机精修
   ============================================================ */

/* 宽度安全网 + 标题强制换行：避免长标题/长行在窄屏溢出右侧 */
html,
body {
  max-width: 100%;
}
.hero-title,
.hero-subtitle,
.product-title,
.footer-h1,
.footer-h2,
.product-text-group p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---- ≤1240px：固定容器转流式；教程卡片横向滑动 ---- */
@media (max-width: 1240px) {
  .container {
    width: 100%;
    padding: 0 32px;
  }

  .hero-content {
    padding: 0 32px;
  }

  /* 5 张卡片总宽 1198px，容器变窄后改为横向滑动 + 吸附 */
  .cards-grid {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox 隐藏滚动条 */
  }
  .cards-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari 隐藏滚动条，靠滑动 + 吸附 */
  }
  .tutorial-card {
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .stats-card {
    width: 100%;
    max-width: 800px;
  }

  .faq-list {
    width: 100%;
  }
  .faq-question {
    width: auto;
    flex: 1;
  }
}

/* ---- ≤900px：产品区双栏堆叠；标题缩小 ---- */
@media (max-width: 900px) {
  .nav-group {
    gap: 24px;
  }
  .nav-links a {
    padding: 10px 14px;
  }

  .hero-title {
    font-size: 56px;
  }
  .hero-subtitle {
    font-size: 42px;
  }
  .hero-tags {
    font-size: 24px;
  }

  .product-section {
    padding: 100px 0 80px;
  }
  .product-grid {
    flex-direction: column;
    gap: 48px;
  }
  .product-visual {
    width: 100%;
  }
  .product-img-wrapper {
    width: 100%;
    max-width: 570px;
  }
  .product-content {
    width: 100%;
    max-width: 570px;
    align-items: center;
    text-align: center;
  }

  .footer-h1 {
    font-size: 48px;
  }
  .footer-h2 {
    font-size: 36px;
  }
}

/* ---- ≤768px：头部精简（隐藏导航与客服按钮，客服由悬浮球提供） ---- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .nav-links,
  .btn-contact {
    display: none;
  }
  .nav-group {
    gap: 0;
  }
  .site-header .container {
    height: 64px;
  }
}

/* ---- ≤640px：手机精修 ---- */
@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  /* Hero */
  .hero-content {
    margin-top: 48px;
    padding: 0 20px;
  }
  .hero-title {
    font-size: 32px;
    letter-spacing: 0;
    line-height: 1.25;
  }
  .hero-subtitle {
    font-size: 24px;
    margin-bottom: 18px;
    line-height: 1.3;
  }
  .hero-tags {
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 28px;
  }
  .hero-cta .btn-hero {
    width: 100%;
    max-width: 320px;
  }

  /* 背景装饰：压缩 banner 高度，移除左侧大图避免溢出 */
  .banner-bg-img {
    height: 480px;
  }
  .left-bg-img {
    display: none;
  }

  /* 统计卡片 */
  .stats-card {
    margin-top: 56px;
    height: auto;
    padding: 22px 16px;
    border-radius: 20px;
  }
  .stats-label {
    font-size: 15px;
  }
  .stats-number {
    font-size: 40px;
  }

  .section-title {
    font-size: 22px;
    margin-bottom: 32px;
  }

  /* 产品介绍 */
  .product-section {
    padding: 72px 0 56px;
  }
  .product-grid {
    gap: 32px;
  }
  .product-title {
    font-size: 22px;
    padding-top: 0;
  }
  .product-text-group {
    font-size: 15px;
    gap: 14px;
    margin-bottom: 24px;
  }

  /* 官方教程 */
  .tutorials-section {
    padding: 56px 0 72px;
  }

  /* FAQ */
  .faq-section {
    padding: 56px 0 72px;
  }
  .faq-list {
    margin-bottom: 32px;
  }
  .faq-item {
    padding: 16px;
  }
  .faq-question {
    font-size: 15px;
  }

  /* 页脚 */
  .site-footer {
    padding: 56px 0 20px;
  }
  .footer-h1 {
    font-size: 30px;
    line-height: 1.25;
  }
  .footer-h2 {
    font-size: 22px;
    margin-bottom: 24px;
    line-height: 1.3;
  }
  .footer-cta {
    margin-bottom: 40px;
  }
  .footer-cta .btn-hero {
    width: 100%;
    max-width: 260px;
  }
  .footer-info-grid {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding-top: 24px;
    margin-bottom: 24px;
  }
  .footer-content-links {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
  }
  .footer-content-links-list {
    gap: 8px 14px;
  }
  .footer-contact p {
    white-space: normal;
    text-align: center;
    margin-bottom: 12px;
  }
  .right-pig-decor {
    width: 100px;
    bottom: 190px;
  }

  /* 弹窗与悬浮组件 */
  .modal-box {
    width: calc(100% - 48px);
    max-width: 380px;
    padding: 28px 20px;
  }
  .modal-qr {
    width: 180px;
    height: 180px;
  }
  .floating-widgets {
    right: 14px;
    bottom: 18px;
    gap: 10px;
  }
  .float-btn,
  .float-btn img {
    width: 50px;
    height: 50px;
  }
}
