/* ===== CSS Reset & Variables ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #0a0a0a;
  --bg-elevated:   #111113;
  --bg-surface:    #18181b;
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(255,255,255,0.15);

  --text:          #fafafa;
  --text-secondary:#a1a1aa;
  --text-tertiary: #71717a;
  --text-muted:    #3f3f46;

  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-dark:   #4f46e5;

  --blue:          #3b82f6;
  --purple:        #a855f7;
  --cyan:          #22d3ee;
  --green:         #34d399;
  --amber:         #fbbf24;
  --rose:          #fb7185;

  --font-heading:  'Satoshi', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 100px;

  --nav-height:    64px;
  --container-max: 1200px;
  --section-pad:   clamp(100px, 12vw, 180px);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* 固定背景光晕 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at -10% 0%, rgba(99,102,241,0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 110% 100%, rgba(168,85,247,0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* 微点网格叠层 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Layout Utilities ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
  position: relative;
  z-index: 1;
}

section {
  padding: var(--section-pad) 0;
  position: relative;
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #a855f7, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.gradient-text-amber {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Section Divider ===== */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  position: relative;
  z-index: 1;
}

/* ===== Section Header ===== */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 16px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.section-header {
  max-width: 640px;
}

.section-header.centered {
  max-width: none;
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin: 0 auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
}

.btn-disabled {
  background: var(--bg-surface);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* ===== NAV ===== */
nav, .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(10,10,10,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition-base);
}
nav.scrolled, .nav.scrolled {
  background: rgba(10,10,10,0.95);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  flex: 1;
  justify-content: center;
}

.nav-links > li { position: relative; }

.nav-links > li > a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-links > li > a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.nav-links > li > a .nav-chevron {
  width: 10px; height: 10px;
  transition: transform var(--transition-fast);
}
.nav-links > li:hover > a .nav-chevron { transform: rotate(180deg); }

/* Dropdown */
.nav-links > li { padding-bottom: 12px; margin-bottom: -12px; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 4px;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 200;
}
.nav-links > li:hover .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 8px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-dropdown a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 20px clamp(20px, 5vw, 48px);
  z-index: 99;
  flex-direction: column;
  gap: 8px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition-fast);
}
.nav-mobile a:hover { color: var(--text); }
.nav-mobile a:last-child { border-bottom: none; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: clamp(60px, 8vw, 96px) 0 0;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(32px, 5vw, 60px);
  padding-bottom: clamp(48px, 6vw, 72px);
}

.footer-brand .nav-logo { margin-bottom: 14px; display: inline-flex; }
.footer-tagline {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--text); }

.footer-coming-soon {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-legal a:hover { color: var(--text-tertiary); }

/* ===== Shared Responsive ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  :root { --section-pad: clamp(64px, 10vw, 100px); }

  .nav-links    { display: none; }
  .nav-hamburger { display: flex; margin-left: auto; }
  .btn-disabled.nav-btn-disabled { display: none; }

  /* 在 about/contact 等页面 btn-disabled 直接作为 nav 按钮使用 */
  nav .btn-disabled,
  .nav .btn-disabled { display: none; }

  .section-title { font-size: clamp(28px, 7vw, 40px); }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
