/* ═══════════════════════════════════════════════════════════════
   MACLLM Design System — macllm-core.css v1.0
   Neural Hub v2 — Locked Tokens + Shared Components
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  /* Backgrounds */
  --bg:          #0A0E17;
  --bg-surface:  #101827;
  --bg-surface-alt: #0F172A;
  --bg-hover:    #1E293B;
  --bg-card:     rgba(15,23,42,0.90);
  --bg-glass:    rgba(10,14,23,0.80);

  /* Borders */
  --border:      rgba(255,255,255,0.10);
  --border-hover: rgba(255,255,255,0.20);
  --border-glow-cyan: rgba(34,211,238,0.20);
  --border-glow-violet: rgba(167,139,250,0.20);

  /* Product accents */
  --cyan:    #22D3EE;
  --violet:  #A78BFA;
  --emerald: #10B981;
  --amber:   #FBBF24;
  --red:     #F87171;
  --pink:    #F472B6;

  /* Text */
  --text:       #E5EEF8;
  --text-secondary: #94A3B8;
  --text-muted: #8FA4BF;
  --text-dim:   #475569;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #22D3EE, #A78BFA);
  --gradient-brain:   linear-gradient(135deg, #22D3EE, #06B6D4);
  --gradient-chain:   linear-gradient(135deg, #A78BFA, #8B5CF6);
  --gradient-think:   linear-gradient(135deg, #10B981, #34D399);
  --gradient-game:    linear-gradient(135deg, #FBBF24, #F59E0B);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.30);
  --shadow-glow-cyan: 0 0 30px rgba(34,211,238,0.12);
  --shadow-glow-violet: 0 0 30px rgba(167,139,250,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.40);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-3xl: 32px;
  --radius-full: 999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: rgba(34,211,238,0.20); color: white; }
a { color: var(--cyan); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.85; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

/* ── Typography Scale ── */
.text-xs   { font-size: 0.75rem;  line-height: 1.5; }   /* 12px */
.text-sm   { font-size: 0.875rem; line-height: 1.5; }   /* 14px */
.text-base { font-size: 1rem;     line-height: 1.6; }   /* 16px */
.text-lg   { font-size: 1.25rem;  line-height: 1.5; }   /* 20px */
.text-xl   { font-size: 1.5rem;   line-height: 1.3; }   /* 24px */
.text-2xl  { font-size: 2rem;     line-height: 1.2; }   /* 32px */
.text-3xl  { font-size: 3rem;     line-height: 1.1; }   /* 48px */

.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black     { font-weight: 900; }

.text-gradient  { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-cyan      { color: var(--cyan); }
.text-violet    { color: var(--violet); }
.text-emerald   { color: var(--emerald); }
.text-amber     { color: var(--amber); }
.text-muted     { color: var(--text-muted); }
.text-dim       { color: var(--text-dim); }
.text-secondary { color: var(--text-secondary); }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.2em; }
.mono { font-family: var(--font-mono); }

/* ── Layout ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 640px; margin: 0 auto; padding: 0 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Spacing */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mt-16 { margin-top: 64px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.py-8  { padding-top: 32px; padding-bottom: 32px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.py-16 { padding-top: 64px; padding-bottom: 64px; }
.py-20 { padding-top: 80px; padding-bottom: 80px; }
.px-4  { padding-left: 16px; padding-right: 16px; }
.px-6  { padding-left: 24px; padding-right: 24px; }
.p-4   { padding: 16px; }
.p-6   { padding: 24px; }
.p-8   { padding: 32px; }

.hidden { display: none; }
.block  { display: block; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.pointer-events-none { pointer-events: none; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* ── Buttons ── */

/* Primary — gradient cyan→violet */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-xl); border: none;
  font-size: 0.875rem; font-weight: 700; color: #0A0E17;
  background: var(--gradient-primary);
  box-shadow: 0 4px 16px rgba(34,211,238,0.25);
  cursor: pointer; transition: all var(--transition-slow);
  text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(34,211,238,0.35); opacity: 1; }

/* Secondary — ghost with border */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,0.05);
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.08); opacity: 1; }

/* Ghost — text only */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-xl);
  border: none; background: none;
  font-size: 0.875rem; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: color var(--transition);
  text-decoration: none;
}
.btn-ghost:hover { color: var(--text); opacity: 1; }

/* Sizes */
.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: var(--radius-md); }
.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-2xl); }

/* Connect wallet variant */
.btn-connect {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 20px; border-radius: var(--radius-md); border: 1px solid var(--border-glow-cyan);
  font-size: 0.8rem; font-weight: 700; color: var(--cyan);
  background: rgba(34,211,238,0.05);
  cursor: pointer; transition: all var(--transition);
}
.btn-connect:hover { background: rgba(34,211,238,0.12); box-shadow: var(--shadow-glow-cyan); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 32px;
  transition: all var(--transition-slow);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.card-sm { padding: 20px; border-radius: var(--radius-lg); }
.card-flat { padding: 24px; }
.card-flat:hover { transform: none; }

/* Accent card borders */
.card-cyan:hover    { border-color: var(--border-glow-cyan); box-shadow: var(--shadow-glow-cyan); }
.card-violet:hover  { border-color: var(--border-glow-violet); box-shadow: var(--shadow-glow-violet); }
.card-emerald:hover { border-color: rgba(16,185,129,0.20); box-shadow: 0 0 30px rgba(16,185,129,0.12); }
.card-amber:hover   { border-color: rgba(251,191,36,0.20); box-shadow: 0 0 30px rgba(251,191,36,0.12); }

/* Gradient ring cards (product cards) */
.card-ring {
  border-radius: var(--radius-2xl);
  padding: 1px;
  border: none;
  transition: all var(--transition-slow);
}
.card-ring:hover { transform: translateY(-4px); }
.card-ring-inner {
  height: 100%;
  border-radius: calc(var(--radius-2xl) - 1px);
  background: rgba(15,23,42,0.95);
  padding: 24px;
  transition: background var(--transition-slow);
}
.card-ring:hover .card-ring-inner { background: rgba(18,29,48,1); }
.card-ring-cyan    { background: linear-gradient(to bottom, rgba(34,211,238,0.30), rgba(34,211,238,0.05)); }
.card-ring-violet  { background: linear-gradient(to bottom, rgba(167,139,250,0.30), rgba(167,139,250,0.05)); }
.card-ring-emerald { background: linear-gradient(to bottom, rgba(16,185,129,0.30), rgba(16,185,129,0.05)); }
.card-ring-amber   { background: linear-gradient(to bottom, rgba(251,191,36,0.30), rgba(251,191,36,0.05)); }

/* Glass card */
.card-glass {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Sections ── */
.section { padding: 80px 24px; max-width: 1280px; margin: 0 auto; }
.section-sm { padding: 48px 24px; max-width: 1280px; margin: 0 auto; }
.section-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--cyan); margin-bottom: 8px;
}
.section-title {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px;
}
.section-sub {
  font-size: 1rem; color: var(--text-secondary); max-width: 600px; line-height: 1.7;
}
.section-sub.centered { margin: 0 auto; text-align: center; }

/* ── Badges / Pills ── */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
}
.badge-cyan    { background: rgba(34,211,238,0.10); border: 1px solid rgba(34,211,238,0.20); color: var(--cyan); }
.badge-violet  { background: rgba(167,139,250,0.10); border: 1px solid rgba(167,139,250,0.20); color: var(--violet); }
.badge-emerald { background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.20); color: var(--emerald); }
.badge-amber   { background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.20); color: var(--amber); }
.badge-ghost   { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-secondary); }

.dot-live {
  width: 6px; height: 6px; border-radius: 50%; background: var(--emerald);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Stats ── */
.stat-bar {
  display: grid; gap: 1px; border-radius: var(--radius-2xl);
  border: 1px solid var(--border); overflow: hidden;
}
.stat-item { background: var(--bg-surface-alt); padding: 24px 16px; text-align: center; }
.stat-num {
  font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-num-cyan   { color: var(--cyan); -webkit-text-fill-color: var(--cyan); background: none; }
.stat-num-violet { color: var(--violet); -webkit-text-fill-color: var(--violet); background: none; }
.stat-num-emerald{ color: var(--emerald); -webkit-text-fill-color: var(--emerald); background: none; }
.stat-num-amber  { color: var(--amber); -webkit-text-fill-color: var(--amber); background: none; }
.stat-label {
  font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.1em; margin-top: 4px;
}

/* ── Progress bar ── */
.bar-bg { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.bar-cyan    { background: var(--gradient-brain); }
.bar-violet  { background: var(--gradient-chain); }
.bar-emerald { background: var(--gradient-think); }
.bar-amber   { background: var(--gradient-game); }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th {
  text-align: left; color: var(--text-dim); font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 10px 8px; border-bottom: 1px solid var(--border);
}
.table td { padding: 10px 8px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Forms ── */
.input {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-surface-alt);
  color: var(--text); font-size: 0.875rem; outline: none; transition: border-color var(--transition);
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34,211,238,0.12); }
.input::placeholder { color: var(--text-dim); }
.label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; display: block; }

/* ── Code blocks ── */
.code-block {
  background: #0D1117; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; font-family: var(--font-mono); font-size: 0.85rem;
  color: #C9D1D9; overflow-x: auto; line-height: 1.8;
}

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Background Effects ── */
.bg-glow {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.glow-blob {
  position: absolute; border-radius: 50%; filter: blur(80px);
}
.glow-cyan   { background: rgba(34,211,238,0.15); }
.glow-violet { background: rgba(167,139,250,0.15); }
.glow-emerald{ background: rgba(16,185,129,0.08); }

/* ── Neural Map Animations ── */
.neural-node {
  transition: all var(--transition-slow);
  text-decoration: none; color: inherit;
}
.neural-node:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow-glow-cyan);
  border-color: var(--border-hover) !important;
  opacity: 1;
}
.node-bar { transition: transform 0.3s ease; transform-origin: left; }
.neural-node:hover .node-bar { transform: scaleX(1.15); }

.conn-line { animation: line-pulse 3s ease-in-out infinite; }
.conn-line:nth-child(2) { animation-delay: 0.8s; }
.conn-line:nth-child(3) { animation-delay: 1.6s; }
.conn-line:nth-child(4) { animation-delay: 2.4s; }
@keyframes line-pulse { 0%,100% { opacity: 0.12; } 50% { opacity: 0.4; } }

.brain-ring { animation: brain-pulse 4s ease-in-out infinite; }
@keyframes brain-pulse {
  0%,100% { box-shadow: 0 0 40px rgba(34,211,238,0.10); }
  50% { box-shadow: 0 0 80px rgba(34,211,238,0.22); }
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .footer-inner { max-width: 1280px; margin: 0 auto; padding: 48px 24px 24px; }
.site-footer .footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px;
}
.site-footer .footer-brand p { font-size: 0.78rem; color: var(--text-dim); line-height: 1.7; margin-top: 12px; max-width: 320px; }
.site-footer .footer-col h4 {
  font-size: 0.68rem; color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.15em; font-weight: 700; margin-bottom: 14px;
}
.site-footer .footer-col a {
  display: block; font-size: 0.82rem; color: var(--text-dim);
  padding: 3px 0; transition: color var(--transition);
}
.site-footer .footer-col a:hover { color: var(--cyan); opacity: 1; }
.site-footer .footer-bottom {
  text-align: center; color: var(--text-dim); font-size: 0.7rem;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.site-footer .social-links { display: flex; gap: 8px; margin-top: 12px; }
.site-footer .social-link {
  display: flex; width: 32px; height: 32px; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  font-size: 0.7rem; font-weight: 700; transition: all var(--transition);
}
.site-footer .social-link:hover { background: rgba(255,255,255,0.08); color: var(--text); opacity: 1; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .stat-bar { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 48px 16px; }
  .section-title { font-size: 1.6rem; }
  .text-3xl { font-size: 2.2rem; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .stat-bar { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}
