/* === 设计变量与基础重置 === */
:root {
  --bg-primary: #050505;
  --bg-secondary: #0f0f0f;
  --bg-card: #141414;
  --text-primary: #f0ece4;
  --text-secondary: #a8a29e;
  --gold-primary: #c9a227;
  --gold-light: #e2b84b;
  --gold-dark: #8a6d10;
  --border-subtle: rgba(201, 162, 39, 0.25);
  --border-strong: rgba(201, 162, 39, 0.6);
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

ul, ol {
  list-style: none;
}

/* === 排版系统 === */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1.5rem; position: relative; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 0.75rem; color: var(--gold-light); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

/* === 头部与导航 === */
.site-header {
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo img {
  height: 40px;
  width: auto;
  vertical-align: middle;
  filter: drop-shadow(0 0 4px rgba(201, 162, 39, 0.3));
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-left: 0.75rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

nav ul {
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--gold-light);
}

nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold-primary);
}

/* === 按钮组件 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
  color: #000;
  border-color: var(--gold-light);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(201, 162, 39, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
}

.btn-outline:hover, .btn-outline:focus {
  background: rgba(201, 162, 39, 0.1);
  color: #fff;
}

/* === 首屏 Hero === */
.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 70% 30%, rgba(201, 162, 39, 0.08), transparent 50%), var(--bg-primary);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-lead {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-svg-wrap {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  position: relative;
}

/* === 通用卡片与网格 === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.icon-box {
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.icon-box svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

/* === 界面示意画布 === */
.interface-canvas {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-bg {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
}

.canvas-element {
  position: relative;
  z-index: 2;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  width: 80%;
  max-width: 600px;
}

/* === 表格样式 === */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-light);
  font-weight: 500;
}

td {
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* === FAQ === */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

details {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-base);
}

details[open] {
  border-color: var(--gold-primary);
}

summary {
  padding: 1.2rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  color: var(--gold-primary);
  font-size: 1.2rem;
  transition: transform var(--transition-base);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  padding: 0 1.2rem 1.2rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === 最新动态卡片 === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color var(--transition-base);
}

.news-card:hover {
  border-color: var(--border-strong);
}

.news-date {
  font-size: 0.85rem;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono, monospace);
}

.news-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 1rem;
}

/* === 页脚 === */
.site-footer {
  background: #020202;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--gold-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: #555;
}

/* === SVG 动效 Keyframes === */
@keyframes rotate-hex {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

@keyframes dash-flow {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

.svg-animated {
  transform-box: fill-box;
  transform-origin: center;
}

.rotate-slow { animation: rotate-hex 12s linear infinite; }
.rotate-reverse { animation: rotate-hex 15s linear infinite reverse; }
.pulse-gentle { animation: pulse-ring 4s ease-in-out infinite; }

/* 描边绘制效果 */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dash-flow 3s ease-in-out infinite alternate;
}

/* 减少动态效果适配 */
@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;
  }
}

/* === 响应式适配 === */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content {
    margin: 0 auto;
  }
  
  nav ul {
    display: none; /* 简化移动端处理，实际项目可加汉堡菜单 */
  }

  .features-grid, .news-grid {
    grid-template-columns: 1fr;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
}

@media (min-width: 769px) {
  .two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}
