/* =========================================
   1. 设计变量与设计系统
   ========================================= */
:root {
  /* 品牌色系：午夜蓝 + 暖橙强调 */
  --color-midnight-blue: #0f172a;
  --color-midnight-light: #1e293b;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-inverse: #ffffff;
  --color-warm-orange: #ff7a2e;
  --color-warm-orange-hover: #e55d15;
  --color-bg-main: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e2e8f0;

  /* 排版体系 */
  --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;

  /* 布局参数 */
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* =========================================
   2. 基础重置与排版
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background-color: var(--color-bg-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 重点文本样式 */
.text-highlight {
  color: var(--color-warm-orange);
  font-weight: 600;
}

/* =========================================
   3. 页头与导航
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-midnight-blue);
}

.main-nav ul {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-midnight-blue);
  font-weight: 600;
}

@media (max-width: 768px) {
  .main-nav { display: none; } /* 简化移动端，仅保留核心结构 */
}

/* =========================================
   4. 通用组件（按钮、卡片、表格）
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-warm-orange);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 122, 46, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-warm-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 122, 46, 0.4);
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background-color: var(--color-bg-alt);
  font-weight: 600;
  color: var(--color-midnight-blue);
}

tr:last-child td {
  border-bottom: none;
}

/* =========================================
   5. FAQ 交互样式
   ========================================= */
.faq-section details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  background: #fff;
}

.faq-section summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-midnight-blue);
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::after {
  content: "+";
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--color-warm-orange);
  transition: transform 0.2s ease;
}

.faq-section details[open] summary::after {
  transform: rotate(45deg);
}

.faq-section details p {
  padding: 0 1.5rem 1rem 1.5rem;
  margin-top: 0;
  margin-bottom: 0;
}

/* =========================================
   6. 页脚
   ========================================= */
.site-footer {
  background-color: var(--color-midnight-blue);
  color: #cbd5e1;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  margin-bottom: 0.5rem;
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

/* =========================================
   7. SVG 动效 (Animations)
   ========================================= */

/* 卡片漂浮效果 (Hero) */
@keyframes float-1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}
@keyframes float-3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(0.5deg); }
}

.anim-float-1 { animation: float-1 6s ease-in-out infinite; }
.anim-float-2 { animation: float-2 7s ease-in-out infinite; }
.anim-float-3 { animation: float-3 5s ease-in-out infinite; }

/* 描边绘制效果 (Feature Icons) */
@keyframes draw-stroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.anim-draw {
  path, circle, rect {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
  }
  &:hover path, &:hover circle, &:hover rect {
    animation: draw-stroke 1.5s ease forwards;
  }
}

/* 减少动画偏好设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .anim-float-1, .anim-float-2, .anim-float-3 {
    animation: none;
  }
}
