/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-primary: #0B1D3A;
  --color-primary-light: #152C4A;
  --color-accent: #FF6A00;
  --color-accent-hover: #E55D00;
  --color-bg-base: #F8FAFC;
  --color-bg-surface: #FFFFFF;
  --color-text-main: #0F172A;
  --color-text-muted: #475569;
  --color-border: #E2E8F0;
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-card: 0 4px 12px rgba(11, 29, 58, 0.06);
  --shadow-hover: 0 12px 28px rgba(11, 29, 58, 0.12);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background: var(--color-bg-base);
  line-height: 1.7;
  font-size: 1rem;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* =========================================
   排版与流体字号
   ========================================= */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2vw + 0.25rem, 1.5rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

.section {
  padding: 5rem 0;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-auto-2 {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.grid-auto-3 {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* =========================================
   组件：按钮
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 1rem;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.25);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.35);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* =========================================
   组件：卡片
   ========================================= */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.card-body { flex: 1; }

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: #E0F2FE;
  color: #0369A1;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* =========================================
   组件：表格
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: #F8FAFC; }

/* =========================================
   组件：FAQ (Details/Summary)
   ========================================= */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }

details {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

details:hover { box-shadow: var(--shadow-card); }

summary {
  padding: 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

details[open] summary::after { transform: rotate(45deg); }

details > div {
  padding: 0 1.25rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* =========================================
   导航与页头页脚
   ========================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.brand img { object-fit: contain; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.footer {
  background: var(--color-primary);
  color: #CBD5E1;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: #94A3B8;
  text-align: center;
}

/* =========================================
   SVG 动效
   ========================================= */
.svg-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: visible;
}

.anim-float {
  animation: float 6s ease-in-out infinite;
}

.anim-float-delay {
  animation: float 6s ease-in-out infinite;
  animation-delay: 2.5s;
}

.anim-float-slow {
  animation: float 8s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* 描边绘制动画 */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-stroke 3s linear infinite;
}

@keyframes draw-stroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* 节点呼吸 */
.node-pulse {
  animation: pulse-opacity 4s ease-in-out infinite;
}

.node-pulse-alt {
  animation: pulse-opacity 4s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-float,
  .anim-float-delay,
  .anim-float-slow,
  .draw-path,
  .node-pulse,
  .node-pulse-alt {
    animation: none !important;
  }
}
