/* ==================== Landing 页样式 ==================== */
/* 复用 style.css 中的 CSS 变量与 .theme-toggle 等通用样式 */

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 导航 ---------- */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-page) 80%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-grad);
  position: relative;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.brand-mark::after {
  content: 'P';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.05em;
}

.brand-name {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
  margin-left: 32px;
}

.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--accent);
}

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

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s,
    background 0.15s;
  white-space: nowrap;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-primary {
  background: var(--accent-grad);
  color: var(--text-on-accent);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title-en {
  display: block;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 8px;
  color: var(--text-muted);
  background: none;
  -webkit-text-fill-color: var(--text-muted);
  font-style: italic;
}

.hero-desc {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 560px;
}

.hero-desc strong {
  color: var(--text);
  font-weight: 600;
}

.hero-desc-en {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Hero 右侧装饰卡片 */
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.hero-banner {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
  isolation: isolate;
}

.hero-banner:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-banner-glow {
  position: absolute;
  inset: -18%;
  z-index: -1;
  background: radial-gradient(
      circle at 25% 25%,
      rgba(99, 102, 241, 0.55) 0%,
      transparent 55%
    ),
    radial-gradient(circle at 75% 80%, rgba(139, 92, 246, 0.45) 0%, transparent 55%);
  filter: blur(50px);
  opacity: 0.8;
  pointer-events: none;
}

.hero-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-surface);
}

.hero-banner-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-banner-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

/* ---------- 通用 section ---------- */
.section-title {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}

.section-title-en {
  display: block;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ---------- 特色 ---------- */
.features {
  padding: 80px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-page);
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}

.feature-desc-en {
  font-size: 12px !important;
  color: var(--text-dim) !important;
  font-style: italic;
}

/* ---------- 章节预览 ---------- */
.chapters {
  padding: 80px 0;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.chapter-card-skeleton {
  height: 220px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
}

.chapter-card {
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.chapter-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.chapter-card .cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-thumb);
}

.chapter-card .cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45) 0%,
    transparent 50%
  );
}

.chapter-card .badge-num {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.chapter-card .body {
  padding: 18px 20px;
}

.chapter-card .title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chapter-card .title-en {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.chapters-foot {
  margin-top: 40px;
  text-align: center;
}

/* ---------- 关于 ---------- */
.about {
  padding: 80px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.about-inner {
  max-width: 720px;
  text-align: center;
}

.about-inner .section-title {
  margin-bottom: 24px;
}

.about-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 12px;
}

.about-text-en {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* ---------- 页脚 ---------- */
.landing-footer {
  background: var(--bg-page);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 48px;
  padding-bottom: 40px;
}

.footer-tagline {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-tagline-en {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col a {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 60px 0 80px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-art {
    order: -1;
    min-height: 280px;
  }

  .hero-banner {
    max-width: 320px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .container {
    padding: 0 18px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-num {
    font-size: 24px;
  }

  .features,
  .chapters,
  .about {
    padding: 56px 0;
  }
}
