/* ============================================================
   LOS CLAWS — Main Stylesheet
   Neon Noir Cityscape Theme
   ============================================================ */

/* Fonts via loli.net mirror — works in mainland China (fonts.googleapis.com is blocked) */
@import url('https://fonts.loli.net/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&family=Noto+Sans+SC:wght@400;700&display=swap');

/* ─── Design Tokens ────────────────────────────────────────── */

:root {
  --bg: #0a0e1a;
  --surface: #141828;
  --surface-2: #1a2038;
  --accent-cyan: #00e5ff;
  --accent-mag: #ff2d6b;
  --accent-amber: #ffc107;
  --text: #eef0f6;
  --text-muted: #7a8ba8;
  --border: rgba(0, 229, 255, 0.2);
  --border-dim: rgba(0, 229, 255, 0.08);

  /* Citizen variant colors */
  --openclaw: #00e5ff;
  --ironclaw: #ff8a50;
  --zeroclaw: #00e676;
  --nanoclaw: #b388ff;
  --picoclaw: #ffc107;
  --nanobot: #64b5f6;
  --wildclaw: #ff2d6b;
  --hybrid: #e040fb;

  --radius: 8px;
  --radius-lg: 14px;
  --transition: 200ms ease;
}

/* ─── Reset ──────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar for Neon Noir vibe */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
  border-left: 1px solid var(--border-dim);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* ─── Typography ─────────────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

p {
  line-height: 1.8;
  color: var(--text);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  opacity: 0.8;
}

code,
.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.875em;
}

/* ─── Layout ─────────────────────────────────────────────────── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-dim);
}

.section:first-child {
  border-top: none;
}

/* ─── Navigation ─────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--text);
  text-transform: uppercase;
}

.nav-logo span {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
  opacity: 1;
}

.nav-signin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted) !important;
  transition: color var(--transition);
}

.nav-signin:hover {
  color: var(--text) !important;
  opacity: 1 !important;
}

.nav-user-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-cyan) !important;
  text-decoration: none;
  transition: opacity var(--transition);
}

.nav-user-name:hover {
  opacity: 0.8;
}

.nav-logout-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  margin-left: 0.4rem;
  background: transparent;
  border: 1px solid rgba(255, 45, 107, 0.4);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.nav-logout-btn:hover {
  border-color: var(--accent-mag);
  color: var(--accent-mag);
}

.nav-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent-cyan);
  background: rgba(0, 229, 255, 0.05);
  color: var(--accent-cyan) !important;
  letter-spacing: 0.06em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  transition: all var(--transition);
}

.nav-cta:hover {
  background: rgba(0, 229, 255, 0.2);
  color: var(--accent-cyan) !important;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
  opacity: 1 !important;
}

/* Hamburger (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  transition: var(--transition);
}

/* ─── Hero ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  overflow: hidden;
  padding: 60px 0 2.25rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Grid/circuit pattern */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Radial gradient for depth */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
}

.hero-skyline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: min(1200px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 2.75rem);
  padding: clamp(2rem, 8vh, 5rem) 0 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s ease forwards;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s ease forwards;
}

.hero-title .glow {
  color: var(--accent-cyan);
  text-shadow: 0 0 40px rgba(0, 229, 255, 0.5);
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease forwards;
}

.hero-sub {
  font-size: clamp(0.875rem, 1.5vw, 1.05rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s ease forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: all var(--transition);
  opacity: 0;
  animation: fadeUp 0.8s 0.9s ease forwards;
}

.hero-cta:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
  opacity: 1;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: pulse 2s infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-50%) translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
  }
}

.hero-pulse {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-pulse .container {
  max-width: 1100px;
}

/* ─── City Pulse ─────────────────────────────────────────────── */

.pulse-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-pulse .pulse-header {
  justify-content: center;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-mag);
  box-shadow: 0 0 8px var(--accent-mag);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.pulse-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.hero-pulse .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hero-pulse .stat-card {
  padding: 1.25rem;
  background: rgba(20, 24, 40, 0.9);
  backdrop-filter: blur(10px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.4;
}

.stat-card:hover {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
  transform: translateY(-2px);
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-pulse .stat-value {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Skill Download ─────────────────────────────────────────── */

.skill-download {
  max-width: 480px;
  margin: 1.5rem auto 0;
  text-align: center;
}

.skill-download-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.skill-code-box {
  position: relative;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  text-align: left;
}

.skill-code-box pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.skill-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.skill-copy-btn:hover {
  opacity: 1;
}

/* ─── Leaderboard ────────────────────────────────────────────── */

.section-title {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.section.section-after-hero {
  border-top: 1px solid var(--border-dim);
}

.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}

.lb-entry:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.lb-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 1.5rem;
  text-align: right;
}

.lb-rank.gold {
  color: #ffd700;
}

.lb-rank.silver {
  color: #c0c8d0;
}

.lb-rank.bronze {
  color: #cd7f32;
}

.lb-bar {
  width: 4px;
  height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
}

.lb-name {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text);
}

.lb-variant {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.lb-elo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent-amber);
  font-weight: 600;
}

/* ─── Activity Feed ───────────────────────────────────────────── */

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
  animation: slideIn 0.4s ease forwards;
  opacity: 0;
}

.activity-item:nth-child(1) {
  animation-delay: 0.05s;
}

.activity-item:nth-child(2) {
  animation-delay: 0.10s;
}

.activity-item:nth-child(3) {
  animation-delay: 0.15s;
}

.activity-item:nth-child(4) {
  animation-delay: 0.20s;
}

.activity-item:nth-child(5) {
  animation-delay: 0.25s;
}

/* Skip entry animation on data refresh (not first load) */
.activity-item.no-anim {
  animation: none;
  opacity: 1;
}

/* Placeholder entries shown when no live data is available */
.lb-entry.placeholder,
.activity-item.placeholder {
  opacity: 0.45;
  pointer-events: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  color: var(--text);
}

.activity-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Two-column data layout ─────────────────────────────────── */

.data-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .data-cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ─── Problem / City sections ────────────────────────────────── */

.prose-section {
  max-width: 780px;
}

.prose-section .section-heading {
  margin-bottom: 1.5rem;
  color: var(--text);
}

.prose-section p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.prose-section p strong {
  color: var(--text);
}

.highlight-stat {
  display: inline;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-mag);
  font-weight: 600;
}

/* ─── Districts Grid ─────────────────────────────────────────── */

.districts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .districts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .districts-grid {
    grid-template-columns: 1fr;
  }
}

.district-card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.district-card:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.district-card.live {
  border-color: rgba(0, 229, 255, 0.2);
}

.district-card.live:hover {
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.08);
}

.district-card.offline:hover {
  border-color: var(--border);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.district-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.district-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

.district-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.district-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-dot.live {
  background: var(--zeroclaw);
  box-shadow: 0 0 6px var(--zeroclaw);
  animation: blink 2s infinite;
}

.status-dot.offline {
  background: var(--text-muted);
}

.status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-text.live {
  color: var(--zeroclaw);
}

.status-text.offline {
  color: var(--text-muted);
}

.district-enter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ─── Citizens Section (landing) ─────────────────────────────── */

.citizens-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.citizen-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}

.citizen-chip:hover {
  opacity: 1;
}

.citizen-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.citizen-chip.openclaw {
  border-color: var(--openclaw);
}

.citizen-chip.openclaw:hover {
  color: var(--openclaw);
}

.citizen-chip.openclaw .dot {
  background: var(--openclaw);
}

.citizen-chip.ironclaw {
  border-color: var(--ironclaw);
}

.citizen-chip.ironclaw:hover {
  color: var(--ironclaw);
}

.citizen-chip.ironclaw .dot {
  background: var(--ironclaw);
}

.citizen-chip.zeroclaw {
  border-color: var(--zeroclaw);
}

.citizen-chip.zeroclaw:hover {
  color: var(--zeroclaw);
}

.citizen-chip.zeroclaw .dot {
  background: var(--zeroclaw);
}

.citizen-chip.nanoclaw {
  border-color: var(--nanoclaw);
}

.citizen-chip.nanoclaw:hover {
  color: var(--nanoclaw);
}

.citizen-chip.nanoclaw .dot {
  background: var(--nanoclaw);
}

.citizen-chip.picoclaw {
  border-color: var(--picoclaw);
}

.citizen-chip.picoclaw:hover {
  color: var(--picoclaw);
}

.citizen-chip.picoclaw .dot {
  background: var(--picoclaw);
}

.citizen-chip.nanobot {
  border-color: var(--nanobot);
}

.citizen-chip.nanobot:hover {
  color: var(--nanobot);
}

.citizen-chip.nanobot .dot {
  background: var(--nanobot);
}

.citizen-chip.wildclaw {
  border-color: var(--wildclaw);
}

.citizen-chip.wildclaw:hover {
  color: var(--wildclaw);
}

.citizen-chip.wildclaw .dot {
  background: var(--wildclaw);
}

.citizen-chip.hybrid {
  border-color: var(--hybrid);
}

.citizen-chip.hybrid:hover {
  color: var(--hybrid);
}

.citizen-chip.hybrid .dot {
  background: var(--hybrid);
}

/* ─── Citizens Page ──────────────────────────────────────────── */

.citizens-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.citizen-card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.citizen-card:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.citizen-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.citizen-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.citizen-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.citizen-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.citizen-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.citizen-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.citizen-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.citizen-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.citizen-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'JetBrains Mono', monospace;
}

.citizen-stat-value {
  font-size: 0.85rem;
  color: var(--text);
}

/* ─── Districts Page ─────────────────────────────────────────── */

.city-map {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.city-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

.map-diagram {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.map-row {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: opacity var(--transition);
}

.map-node:hover {
  opacity: 0.8;
}

.map-node-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid;
}

.map-node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map-connector-h {
  height: 2px;
  width: 40px;
  background: var(--border);
}

.map-connector-v {
  width: 2px;
  height: 30px;
  background: var(--border);
}

.district-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.district-full-card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.district-full-card.live {
  border-color: rgba(0, 229, 255, 0.15);
}

.district-full-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
}

.district-full-icon {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.district-full-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.district-full-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.district-subdomain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.district-full-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 600px;
}

.district-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid;
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.district-enter-btn.live {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.district-enter-btn.live:hover {
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.15);
  opacity: 1;
}

.district-enter-btn.soon {
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
}

/* ─── Story Page ─────────────────────────────────────────────── */

.story-article {
  max-width: 760px;
  margin: 0 auto;
}

.story-article h2 {
  font-size: 1.75rem;
  color: var(--text);
  margin: 3rem 0 1rem;
}

.story-article h3 {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  margin: 2rem 0 0.75rem;
  font-weight: 600;
}

.story-article p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.story-article strong {
  color: var(--text);
}

.story-article em {
  color: var(--accent-amber);
  font-style: italic;
}

.pull-quote {
  border-left: 3px solid var(--accent-cyan);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pull-quote p {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text) !important;
  margin: 0;
}

.story-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.citizen-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  overflow-x: auto;
  display: block;
}

.citizen-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.citizen-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-muted);
  vertical-align: top;
}

.citizen-table td:first-child {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.citizen-table tr:hover td {
  background: var(--surface);
}

/* ─── About Page ─────────────────────────────────────────────── */

.about-section {
  max-width: 760px;
  margin: 0 auto;
}

.about-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-section p {
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

.contribute-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.contribute-box h3 {
  margin-bottom: 1rem;
  color: var(--text);
}

.contribute-box p {
  font-size: 0.9rem;
}

/* ─── Open Source section ────────────────────────────────────── */

.oss-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.oss-text {
  flex: 1;
  min-width: 200px;
}

.oss-text h2 {
  margin-bottom: 0.5rem;
}

.oss-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.oss-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--bg);
  border-color: var(--accent-cyan);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  opacity: 1;
}

/* ─── Footer ─────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-dim);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent-cyan);
  opacity: 1;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Page header for inner pages ────────────────────────────── */

.page-header {
  padding: 6rem 0 3rem;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 0;
}

.page-header .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.75rem;
}

.page-header .subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
}

/* ─── Neon glow utilities ────────────────────────────────────── */

.glow-cyan {
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.glow-mag {
  text-shadow: 0 0 20px rgba(255, 45, 107, 0.5);
}

/* ─── Scroll reveal ──────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-dim);
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .district-full-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .district-full-card .district-enter-btn {
    grid-column: 2;
  }

  .citizen-card {
    grid-template-columns: 1fr;
  }

  .oss-box {
    flex-direction: column;
  }

  .hero {
    padding-bottom: 1.5rem;
  }

  .hero-stage {
    gap: 1.25rem;
    padding-top: 1.5rem;
  }

  .hero-title {
    font-size: clamp(2.75rem, 15vw, 4.5rem);
    letter-spacing: 0.08em;
  }

  .hero-sub {
    margin-bottom: 1rem;
  }

  .hero-pulse .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .hero-pulse .stat-card {
    padding: 1rem;
  }

  .hero-pulse .stat-value {
    font-size: 1.7rem;
  }

  .hero-title {
    letter-spacing: 0.08em;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-bottom: 1rem;
  }

  .hero-stage {
    gap: 1rem;
    padding-top: 1rem;
  }

  .hero-eyebrow {
    margin-bottom: 0.75rem;
  }

  .hero-title {
    font-size: clamp(2.45rem, 16vw, 3.3rem);
    margin-bottom: 0.5rem;
  }

  .hero-tagline {
    margin-bottom: 0.5rem;
  }

  .hero-sub {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.85rem;
  }

  .hero-cta {
    padding: 0.7rem 1.2rem;
    font-size: 0.92rem;
  }

  .hero-pulse .pulse-header {
    margin-bottom: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-pulse .stats-grid {
    gap: 0.65rem;
  }

  .hero-pulse .stat-card {
    padding: 0.9rem;
  }

  .hero-pulse .stat-value {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
  }

  .hero-pulse .stat-label {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .city-map {
    padding: 1.5rem;
  }
}

/* ─── i18n & Language Switcher ───────────────────────────────── */

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 0.15rem 0.25rem;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: all var(--transition);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.1);
  font-weight: 600;
}

.lang-sep {
  color: var(--border);
  font-size: 0.7rem;
}

/* Chinese typography overrides */
html[lang="zh-CN"] body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3,
html[lang="zh-CN"] h4,
html[lang="zh-CN"] h5 {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  letter-spacing: 0;
}

html[lang="zh-CN"] .mono,
html[lang="zh-CN"] .district-enter,
html[lang="zh-CN"] .status-text,
html[lang="zh-CN"] .section-title,
html[lang="zh-CN"] .pulse-label,
html[lang="zh-CN"] .hero-eyebrow,
html[lang="zh-CN"] .nav-cta {
  letter-spacing: 0.05em;
  /* Reduce extreme letter spacing for Chinese */
}

html[lang="zh-CN"] .hero-stage {
  gap: clamp(1.1rem, 3vh, 2.1rem);
}

html[lang="zh-CN"] .hero-title {
  font-size: clamp(2.8rem, 7.3vw, 6rem);
}

html[lang="zh-CN"] .hero-tagline {
  font-size: clamp(0.95rem, 1.7vw, 1.18rem);
  margin-bottom: 0.55rem;
}

html[lang="zh-CN"] .hero-sub {
  font-size: clamp(0.82rem, 1.25vw, 0.96rem);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 1rem;
}

html[lang="zh-CN"] .hero-cta {
  padding: 0.72rem 1.5rem;
}

html[lang="zh-CN"] .hero-pulse .pulse-header {
  margin-bottom: 1rem;
}

html[lang="zh-CN"] .hero-pulse .stat-card {
  padding: 1rem;
}

html[lang="zh-CN"] .hero-pulse .stat-value {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
}

html[lang="zh-CN"] .hero-pulse .stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .nav-right {
    gap: 1rem;
  }

  .lang-switcher {
    display: flex;
  }

  /* Keep visible on mobile */

  html[lang="zh-CN"] .hero-stage {
    gap: 0.95rem;
    padding-top: 0.9rem;
  }

  html[lang="zh-CN"] .hero-title {
    font-size: clamp(2.3rem, 13vw, 3.8rem);
  }

  html[lang="zh-CN"] .hero-sub {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  html[lang="zh-CN"] .hero-pulse .stat-card {
    padding: 0.85rem;
  }

  html[lang="zh-CN"] .hero-pulse .stat-value {
    font-size: 1.4rem;
  }

  html[lang="zh-CN"] .hero-pulse .stat-label {
    font-size: 0.68rem;
  }
}
