/* ===== CSS Variables ===== */
:root {
  --bg-warm: #F5F0EB;
  --text-dark: #2A2522;
  --accent: #E8572A;
  --accent-hover: #D04A20;
  --muted: #B8A99A;
  --green: #4A7C6F;
  --dark: #2A2522;
  --dark-surface: #352F2B;
  --white: #FEFCFA;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text-dark);
  background: var(--bg-warm);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 纸张噪点纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 滚动渐入动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== 导航栏 ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.nav.scrolled {
  background: rgba(245, 240, 235, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 12px rgba(42, 37, 34, 0.06);
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 32px;
  width: auto;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-dark); }
.nav-download-btn {
  font-size: 0.8rem;
  padding: 8px 20px;
  background: var(--accent);
  color: var(--white);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.nav-download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232, 87, 42, 0.25);
}

/* ===== Section 通用 ===== */
.section { padding: 100px 48px; max-width: 1200px; margin: 0 auto; }
.section-dark {
  background: var(--dark);
  color: var(--white);
  max-width: none;
}
.section-dark .section-inner { max-width: 1200px; margin: 0 auto; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 40px;
  align-items: center;
  width: 100%;
}
.hero-text { padding-right: 24px; }
.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text-dark);
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 44px;
  line-height: 1.7;
  max-width: 420px;
}
.hero-sub strong {
  color: var(--text-dark);
  font-weight: 600;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--accent);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.01em;
}
.download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 87, 42, 0.3);
}
.download-btn:active { transform: translateY(0); }
.download-btn svg { width: 18px; height: 18px; }
.download-meta {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-mockup {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(42, 37, 34, 0.12);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.hero-mockup-badge {
  position: absolute;
  bottom: -16px;
  left: 24px;
  background: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(42, 37, 34, 0.1);
  color: var(--text-dark);
}
.hero-mockup-badge em {
  font-style: normal;
  color: var(--accent);
}

/* ===== Section 2: 壁纸展示 ===== */
.wallpaper-section { padding: 100px 48px 120px; }
.wallpaper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}
.wallpaper-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.wallpaper-count {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: right;
}
.wallpaper-count .num {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}
.wallpaper-grid .wp-item {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.wallpaper-grid .wp-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.wallpaper-grid .wp-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(42, 37, 34, 0);
  transition: background 0.3s ease;
}
.wallpaper-grid .wp-item:hover img { transform: scale(1.05); }
.wallpaper-grid .wp-item:hover::after { background: rgba(42, 37, 34, 0.2); }

/* 错落布局 */
.wallpaper-grid .wp-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.wallpaper-grid .wp-item:nth-child(1) img { height: 100%; }
.wallpaper-grid .wp-item:not(:first-child) { aspect-ratio: 16 / 10; }

/* ===== Feature Section 通用 ===== */
.feature-section { padding: 100px 48px; }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.feature-number {
  font-size: 5rem;
  font-weight: 900;
  color: var(--bg-warm);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 1.5px var(--muted);
  paint-order: stroke fill;
}
.section-dark .feature-number {
  color: var(--dark);
  -webkit-text-stroke: 1.5px var(--dark-surface);
}
.feature-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.feature-content p {
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 400px;
  line-height: 1.75;
  font-size: 0.95rem;
}
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
.feature-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.section-dark .feature-list li { color: rgba(254, 252, 250, 0.85); }
.section-dark .feature-content p { color: rgba(184, 169, 154, 0.8); }

.feature-image {
  position: relative;
  display: flex;
  justify-content: center;
}
.feature-image img,
.feature-image video {
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(42, 37, 34, 0.1);
}
.section-dark .feature-image img,
.section-dark .feature-image video {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.feature-video {
  display: block;
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

/* 交替布局 */
.feature-grid.reverse { direction: rtl; }
.feature-grid.reverse > * { direction: ltr; }

/* ===== Section 5: 弹窗拦截 ===== */
.popup-section { padding: 80px 48px 100px; text-align: center; }
.popup-section .feature-number {
  -webkit-text-stroke: 1.5px rgba(184, 169, 154, 0.25);
  color: transparent;
  margin-bottom: 8px;
}
.popup-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}
.popup-section p {
  color: rgba(184, 169, 154, 0.8);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-size: 0.95rem;
}
.popup-demo {
  position: relative;
  display: inline-block;
  width: 320px;
  height: 180px;
  background: var(--dark-surface);
  border-radius: 10px;
  overflow: hidden;
}
.popup-fake {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  animation: popupBlock 4s ease-in-out infinite;
}
.popup-fake-text {
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 10px;
}
.popup-fake-btn {
  display: inline-block;
  background: #eee;
  padding: 4px 16px;
  border-radius: 4px;
  font-size: 0.65rem;
  color: #999;
}
.popup-shield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: shieldAppear 4s ease-in-out infinite;
}
.popup-shield svg {
  width: 48px;
  height: 48px;
  fill: var(--green);
  filter: drop-shadow(0 2px 8px rgba(74, 124, 111, 0.4));
}

@keyframes popupBlock {
  0%, 30% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%, 65% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  85%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes shieldAppear {
  0%, 30% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  50%, 65% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  85%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
}

/* ===== Section 6: 底部CTA + Footer ===== */
.cta-section {
  text-align: center;
  padding: 100px 48px 80px;
}
.cta-section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.cta-section p {
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.footer {
  text-align: center;
  padding: 40px 48px;
  border-top: 1px solid rgba(184, 169, 154, 0.2);
  max-width: 1200px;
  margin: 0 auto;
}
.footer p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav-links a { display: none; }
  .section, .feature-section, .wallpaper-section, .popup-section, .cta-section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero { min-height: auto; padding-top: 100px; padding-bottom: 60px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-text { padding-right: 0; }
  .hero-visual { order: -1; }
  .hero-mockup { max-width: 100%; }
  .hero-mockup-badge { bottom: -12px; left: 12px; }
  .wallpaper-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .wallpaper-count { text-align: left; }
  .wallpaper-grid {
    grid-template-columns: 1fr 1fr;
  }
  .wallpaper-grid .wp-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .feature-grid, .feature-grid.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
    direction: ltr;
  }
  .feature-number { font-size: 3.5rem; }
  .footer { padding: 32px 20px; }
}