:root {
  --bg: #06080f;
  --bg-elevated: #0c1220;
  --bg-card: #111827;
  --border: rgba(212, 165, 116, 0.14);
  --border-soft: rgba(148, 163, 184, 0.1);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --gold: #f59e0b;
  --gold-light: #fcd34d;
  --gold-dark: #b45309;
  --helix: #8b5cf6;
  --helix-light: #c4b5fd;
  --cyan: #22d3ee;
  --radius: 16px;
  --font: "Noto Serif SC", "Noto Sans SC", "DM Sans", system-ui, sans-serif;
  --font-sans: "Noto Sans SC", "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.container { width: min(1140px, calc(100% - 40px)); margin: 0 auto; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(6, 8, 15, 0.88);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 0.08em;
}
.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.nav-links a:hover { color: var(--gold-light); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--text-muted);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1208;
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.3);
}
.btn-helix {
  background: linear-gradient(135deg, var(--helix), #6366f1);
  color: white;
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.28);
}
.btn-outline-gold {
  background: transparent;
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--gold-light);
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 480px; height: 480px;
  top: -120px; left: -80px;
  background: rgba(245, 158, 11, 0.12);
}
.hero-orb-2 {
  width: 400px; height: 400px;
  top: 0; right: -100px;
  background: rgba(139, 92, 246, 0.1);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.4), transparent 85%);
}
.hero-content { position: relative; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: var(--gold-light);
  font-size: 0.82rem;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.hero h1 .gold { color: var(--gold-light); }
.hero .slogan {
  font-family: var(--font);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.hero-desc {
  max-width: 60ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  font-size: 0.84rem;
  color: var(--text-muted);
}
.pill strong { color: var(--text); }

/* Sections */
.section { padding: 80px 0; }
.section-head { margin-bottom: 40px; }
.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 {
  font-family: var(--font);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 12px;
}
.section-head p { color: var(--text-muted); max-width: 64ch; }

/* Architecture */
.arch-block {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.6;
  color: #cbd5e1;
  background: #080d18;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  overflow-x: auto;
  white-space: pre;
}
.arch-layer {
  margin-top: 20px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}
.arch-layer h4 {
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.arch-layer p { color: var(--text-muted); font-size: 0.9rem; }

/* Dual drive */
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 0;
  align-items: stretch;
}
.dual-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}
.dual-card.left { border-color: rgba(34, 211, 238, 0.25); }
.dual-card.right { border-color: rgba(245, 158, 11, 0.25); }
.dual-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dual-card.left h3 { color: var(--cyan); }
.dual-card.right h3 { color: var(--gold-light); }
.dual-card p, .dual-card li {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.dual-card ul { margin-top: 12px; padding-left: 18px; }
.dual-center {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--helix-light);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}
.card-icon { font-size: 1.6rem; margin-bottom: 12px; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.9rem; }

/* Wiki tree */
.wiki-tree {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
  font-size: 0.92rem;
}
.wiki-tree ul { list-style: none; padding-left: 20px; }
.wiki-tree > ul { padding-left: 0; }
.wiki-tree li {
  padding: 6px 0;
  color: var(--text-muted);
  border-left: 2px solid rgba(245, 158, 11, 0.2);
  padding-left: 14px;
  margin-left: 4px;
}
.wiki-tree li strong { color: var(--text); }

/* Timeline */
.timeline { position: relative; }
.phase {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-soft);
}
.phase:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.phase-num {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.6;
  line-height: 1;
}
.phase h3 { font-size: 1.15rem; margin-bottom: 8px; }
.phase .phase-time {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.phase ul { padding-left: 18px; color: var(--text-muted); font-size: 0.9rem; }
.phase li { margin-bottom: 8px; }

/* Tiers */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tier {
  text-align: center;
  padding: 28px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  position: relative;
}
.tier.featured {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), var(--bg-card));
}
.tier-level {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.tier h4 { font-size: 1rem; margin-bottom: 8px; }
.tier p { color: var(--text-muted); font-size: 0.82rem; }
.tier-arrow {
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}
.tier:last-child .tier-arrow { display: none; }

/* Live loop */
.loop-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.loop-step {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  text-align: center;
}
.loop-step .time {
  display: block;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.loop-step span { color: var(--text-muted); font-size: 0.82rem; }

/* CTA */
.cta-box {
  border-radius: 24px;
  padding: 52px 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.cta-box h2 {
  font-family: var(--font);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}
.cta-box p {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto 28px;
}
.cta-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
  text-align: left;
}
.cta-step {
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-soft);
}
.cta-step strong {
  display: block;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--gold-light); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}
.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

/* Glory wall */
.glory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.glory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.glory-card.gold { border-color: rgba(245, 158, 11, 0.4); }
.glory-rank {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
}
.glory-card h3 { font-size: 1.05rem; margin-bottom: 6px; padding-right: 72px; }
.glory-meta { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 10px; }
.glory-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.glory-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(139, 92, 246, 0.15);
  color: var(--helix-light);
}

/* Signup form */
.signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.signup-form {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}
.form-row textarea { min-height: 88px; resize: vertical; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: rgba(245, 158, 11, 0.5);
}
.form-msg {
  margin-top: 12px;
  font-size: 0.88rem;
  min-height: 1.2em;
}
.form-msg.ok { color: var(--success, #22c55e); }
.form-msg.err { color: #f87171; }

/* 孔小爵 chat */
.kongjue-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--helix), #6366f1);
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 12px 36px rgba(139, 92, 246, 0.45);
  transition: transform 0.2s;
}
.kongjue-fab:hover { transform: scale(1.06); }
.kongjue-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 199;
  width: min(380px, calc(100vw - 32px));
  max-height: 480px;
  display: none;
  flex-direction: column;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.kongjue-panel.open { display: flex; }
.kongjue-head {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(245, 158, 11, 0.1));
  border-bottom: 1px solid var(--border-soft);
}
.kongjue-head strong { display: block; font-size: 1rem; }
.kongjue-head span { font-size: 0.8rem; color: var(--text-muted); }
.kongjue-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 300px;
}
.kongjue-msg {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.kongjue-msg.bot {
  align-self: flex-start;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.kongjue-msg.user {
  align-self: flex-end;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.kongjue-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-soft);
}
.kongjue-input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.88rem;
}
.kongjue-input button {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--helix);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.86rem;
}
.kongjue-input button:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 960px) {
  .glory-grid, .signup-grid { grid-template-columns: 1fr; }
  .card-grid, .cta-steps, .loop-steps { grid-template-columns: 1fr; }
  .dual-grid { grid-template-columns: 1fr; }
  .dual-center { padding: 12px 0; transform: rotate(90deg); }
  .tier-grid { grid-template-columns: 1fr 1fr; }
  .tier-arrow { display: none; }
  .phase { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: var(--bg);
    padding: 20px;
    border-bottom: 1px solid var(--border-soft);
  }
}
