/* 基础变量（CSS自定义属性） */
:root {
  --bg: #0b0c10;
  --bg-elev: #111318;
  --text: #e8ecf1;
  --muted: #a6b0bf;
  --primary: #5b8cff; /* 科技蓝 */
  --primary-600: #3c6bff;
  --accent: #22d3ee; /* 青色点缀 */
  --card: #151923;
  --border: #202636;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,.3);
}

/* 亮色主题覆盖 */
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #f7f9fc;
  --text: #0f172a;
  --muted: #52607a;
  --primary: #3057ff;
  --primary-600: #1f46ff;
  --accent: #06b6d4;
  --card: #ffffff;
  --border: #e6eaf2;
  --shadow: 0 10px 25px rgba(16,24,40,.12);
}

/* 全局样式 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6;
}
img { max-width: 100%; display: block; }
.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: 80px 0; }
.section.alt { background: var(--bg-elev); }
.section-title { font-size: 32px; margin: 0 0 12px; letter-spacing: .3px; }
.section-desc { color: var(--muted); margin: 0 0 28px; }
.accent { color: var(--accent); }

/* Header & Nav */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(0,0,0,0); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
.brand-logo { width: 28px; height: 28px; }
.nav .menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a { color: var(--text); text-decoration: none; opacity: .9; }
.nav a:hover { opacity: 1; }
.nav .btn-sm { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); }
.nav-toggle { display: none; background: transparent; border: 0; padding: 6px; border-radius: 8px; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }
.icon-btn { background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
.icon-sun { display: inline; }
.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: inline; }

/* Hero */
.hero { position: relative; padding: 120px 0 100px; overflow: hidden; }
.hero-inner { text-align: center; position: relative; z-index: 2; }
.hero-badge { display: inline-block; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; }
.hero-title { font-size: clamp(32px, 5vw, 54px); margin: 16px 0 12px; line-height: 1.15; }
.hero-subtitle { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; }
.hero-bg { position: absolute; inset: -10%; background: radial-gradient(800px 400px at 50% 0%, rgba(91,140,255,.25), transparent 60%), radial-gradient(600px 300px at 10% 20%, rgba(34,211,238,.22), transparent 55%); filter: blur(20px); opacity: .8; }

/* Cards & Grids */
.grid { display: grid; gap: 20px; }
.cards { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--primary); }

/* Features */
.features { grid-template-columns: repeat(4, 1fr); }
.feature { background: transparent; border: 1px dashed var(--border); border-radius: 14px; padding: 18px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px; text-decoration: none; color: var(--text); border: 1px solid var(--border); background: transparent; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); border-color: transparent; color: #fff; }
.btn-ghost { background: transparent; }
.btn:hover { opacity: .95; }

/* Contact */
.contact-card { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; }
.form-row { display: grid; gap: 8px; margin-bottom: 12px; }
input, textarea { width: 100%; padding: 12px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); }
input:focus, textarea:focus { outline: 2px solid color-mix(in oklab, var(--primary) 40%, transparent); border-color: var(--primary); }
.form-actions { display: flex; align-items: center; gap: 14px; }
.form-tip { color: var(--muted); font-size: 12px; }
.metrics { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; background: var(--bg-elev); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.footer-brand img { width: 22px; height: 22px; }
.copy { color: var(--muted); font-size: 14px; }
.copy .icp { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--border); padding-bottom: 1px; }
.copy .icp:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* Reveal on scroll */
.reveal-on-scroll { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.reveal-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* 响应式 */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .contact-card { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav .menu { position: fixed; right: 16px; top: 64px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: none; flex-direction: column; gap: 8px; width: calc(100% - 32px); box-shadow: var(--shadow); }
  .nav .menu.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .brand-name { display: none; }
  .cards { grid-template-columns: 1fr; }
}