*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg-base: #08080a;
  --bg-surface: #131316;
  --bg-card: #1a1a1f;
  --border-default: #2a2a30;
  --border-accent: rgba(0, 224, 150, 0.25);
  --text-primary: #f0f0f2;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #00e096;
  --accent-hover: #00c484;
  --accent-glow: rgba(0, 224, 150, 0.15);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-condensed: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --container-max: 1200px;
  --header-h: 64px;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-condensed);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: var(--space-md);
}
h1 { font-size: clamp(2rem, 4vw + 0.5rem, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw + 0.25rem, 2.25rem); margin-top: var(--space-2xl); }
h3 { font-size: clamp(1.125rem, 2vw + 0.25rem, 1.5rem); margin-top: var(--space-lg); }
p { margin-top: 0; margin-bottom: var(--space-md); color: var(--text-secondary); }
strong { color: var(--text-primary); font-weight: 600; }

/* Layout & Containers */
.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--space-lg); }
.section { padding-block: var(--space-2xl); position: relative; }
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
@media (max-width: 900px) {
  .split-layout { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* Header & Nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.brand { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; color: var(--text-primary); font-weight: 600; }
.brand img { height: 32px; width: auto; display: block; }
.nav { display: flex; gap: var(--space-lg); list-style: none; margin: 0; padding: 0; }
.nav a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 0.25rem 0; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.nav a:hover, .nav a:focus-visible, .nav [aria-current="page"] { color: var(--text-primary); border-color: var(--accent); }
.nav [aria-current="page"] { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-default);
  padding: var(--space-xl) 0;
  margin-top: var(--space-2xl);
  background: var(--bg-surface);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-xl); }
.footer-col h4 { margin-bottom: var(--space-md); font-size: 1rem; color: var(--text-primary); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--space-sm); }
.footer-col a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.copyright { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--border-default); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer; border: none; user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #050505; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }
.btn-outline { background: transparent; border: 1px solid var(--border-default); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--text-secondary); background: var(--bg-card); }

/* Cards & Grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-lg); }
.card {
  background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: var(--space-lg); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--border-accent); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-sm); display: flex; align-items: center; gap: var(--space-sm); }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: var(--space-sm); color: var(--text-primary); }
.card-desc { font-size: 0.95rem; line-height: 1.5; margin-bottom: var(--space-md); }
.link-btn { font-size: 0.9rem; color: var(--accent); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { text-decoration: underline; }

/* Table */
.table-wrapper { overflow-x: auto; margin: var(--space-lg) 0; border: 1px solid var(--border-default); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border-default); }
th { background: var(--bg-surface); font-weight: 600; color: var(--text-primary); }
td { color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: rgba(255,255,255,0.02); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: var(--space-md); }
details {
  background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg); transition: border-color 0.2s;
}
details[open] { border-color: var(--border-accent); }
summary { cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; color: var(--accent); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.details-content { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border-default); color: var(--text-secondary); line-height: 1.6; }

/* Forms/Inputs */
input[type="email"], input[type="search"] {
  width: 100%; padding: 0.6rem 1rem; background: var(--bg-base); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 1rem;
}
input:focus-visible { outline: 2px solid var(--accent); border-color: transparent; }

/* Accessibility & Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--accent); color: #000; padding: 8px; z-index: 999; transition: top 0.2s; }
.skip-link:focus { top: 0; }

/* SVG Animation Base */
.svg-anim-wrap { width: 100%; max-width: 100%; overflow: hidden; }
svg { display: block; width: 100%; height: auto; }
svg path.stroke-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg circle.node { fill: var(--accent); opacity: 0.8; }
@keyframes draw-path {
  0% { stroke-dashoffset: 1; }
  25%, 75% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes float-node {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.animate-draw { animation: draw-path 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.animate-float { animation: float-node 4s ease-in-out infinite; }
.transform-center { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  svg path.stroke-line { stroke-dashoffset: 0 !important; }
  svg circle.node { animation: none !important; }
}

/* Utility */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.gap-md { gap: var(--space-md); }
.divider { height: 1px; background: var(--border-default); margin: var(--space-xl) 0; }
.highlight-text { color: var(--accent); }
.bg-gradient-hero {
  background: radial-gradient(ellipse at 30% 20%, rgba(0, 224, 150, 0.12) 0%, transparent 60%), var(--bg-base);
}
.gallery-scroll {
  display: flex; gap: var(--space-lg); overflow-x: auto; padding-bottom: var(--space-md); scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--border-default) var(--bg-surface);
}
.gallery-scroll > * { flex: 0 0 280px; scroll-snap-align: start; }
.mock-ui {
  background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  overflow: hidden; aspect-ratio: 9/16; max-width: 320px; margin: 0 auto;
}
.mock-bar { height: 40px; background: var(--bg-surface); border-bottom: 1px solid var(--border-default); display: flex; align-items: center; padding: 0 var(--space-md); gap: var(--space-sm); }
.mock-bar span { width: 24px; height: 24px; background: var(--border-default); border-radius: 50%; }
.mock-body { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.mock-msg { padding: 8px 12px; border-radius: 8px; max-width: 80%; font-size: 0.85rem; }
.msg-in { background: var(--bg-surface); align-self: flex-start; }
.msg-out { background: rgba(0, 224, 150, 0.15); color: var(--accent); align-self: flex-end; }
.mock-input { height: 32px; background: var(--bg-surface); border-radius: 16px; margin-top: auto; }
