/* ==========================================================================
   一云梯 (Yiyunti) - 黑白极简设计系统与样式表
   域名: yyt-jc.lol
   ========================================================================== */

/* 1. 全局变量与 CSS Reset */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f4f4f5;
  --bg-dark: #09090b;
  --bg-card: #ffffff;
  
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text-inverse: #ffffff;
  
  --border-light: #e4e4e7;
  --border-medium: #d4d4d8;
  --border-dark: #27272a;
  
  --accent-black: #000000;
  --accent-gray: #3f3f46;
  --accent-light: #f4f4f5;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.12);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 2. 布局容器与通用类 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  border-bottom: none;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-dark .section-tag {
  background-color: var(--border-dark);
  color: var(--text-inverse);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.section-dark .section-subtitle {
  color: var(--text-muted);
}

/* 3. 按钮与交互控件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-black);
  color: var(--text-inverse);
  border-color: var(--accent-black);
}

.btn-primary:hover {
  background-color: var(--accent-gray);
  border-color: var(--accent-gray);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-black);
}

.btn-white {
  background-color: #ffffff;
  color: var(--accent-black);
  border-color: #ffffff;
}

.btn-white:hover {
  background-color: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-black);
  outline-offset: 2px;
}

/* 4. 页眉 Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: background-color var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-black);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background-color: var(--accent-black);
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.125rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-black);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* 5. 主视觉 Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 5rem;
  background: radial-gradient(circle at 50% 0%, #f4f4f5 0%, #ffffff 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-title span {
  display: block;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1.75rem;
  margin-top: 0.5rem;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.trust-icon {
  color: var(--accent-black);
}

/* 动态图卡 Hero Visual Component */
.hero-card-stack {
  position: relative;
  width: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.hero-card-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-dark);
  color: #ffffff;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-black);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 6. 核心优势 Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-black);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 7. 流媒体与 AI 支持 Services Section */
.services-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.service-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.service-box-title {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.service-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-light);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* 8. 套餐对比 Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.pricing-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
}

.pricing-card.popular {
  border: 2px solid var(--accent-black);
  box-shadow: var(--shadow-lg);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-black);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.plan-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 2.5rem;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.plan-price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  margin: 1.75rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  flex-grow: 1;
}

.plan-features li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features li svg {
  color: var(--accent-black);
  flex-shrink: 0;
}

/* 9. 常见问题 FAQ Section */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}

.faq-icon {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem 1.5rem;
}

/* 10. 页脚 Footer */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  padding: 4rem 0 2rem 0;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-dark);
  gap: 2rem;
}

.footer-brand .logo {
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 360px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.footer-link {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* 11. 侧边章节导航组件 Section Navigation Arrows */
.section-nav-controls {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}

.section-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--accent-black);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.section-arrow-btn:hover:not(:disabled) {
  background-color: var(--accent-black);
  color: #ffffff;
  border-color: var(--accent-black);
  transform: scale(1.08);
}

.section-arrow-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

/* 12. 文章与知识科普专栏特定样式 */
.article-header {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 2rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs a:hover {
  color: var(--accent-black);
}

.article-body {
  max-width: 820px;
  margin: 3rem auto;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h2 {
  font-size: 1.625rem;
  font-weight: 800;
  margin: 2.25rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem 0;
}

.article-body p {
  margin-bottom: 1.5rem;
  color: #27272a;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-cta-box {
  background-color: var(--bg-tertiary);
  border-left: 4px solid var(--accent-black);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.75rem;
  margin: 2.5rem 0;
}

.article-cta-box h4 {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.article-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

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

.article-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.article-card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* 13. 响应式适配 Media Queries */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .services-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  .section {
    padding: 3.5rem 0;
  }
  .hero-title {
    font-size: 2.35rem;
  }
  .hero-title span {
    font-size: 1.35rem;
  }
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
  }
  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--shadow-lg);
  }
  .mobile-toggle {
    display: block;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  /* 移动端章节箭头优化：位于右下角悬浮，不遮挡正文与主按钮 */
  .section-nav-controls {
    right: 12px;
    bottom: 24px;
    top: auto;
    transform: none;
    flex-direction: row;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
  }
  .section-arrow-btn {
    width: 38px;
    height: 38px;
    border: none;
    box-shadow: none;
  }
}
