/* ============================================
   0xrex Website — Crypto Terminal Aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* -- Reset & Base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

:root {
  --bg-primary: #0c0a08;
  --bg-secondary: #12100d;
  --bg-card: #1a1610;
  --bg-card-hover: #231e16;
  --border: #2e2518;
  --border-glow: #f59e0b;
  --text-primary: #f0e8dc;
  --text-secondary: #a8967a;
  --text-muted: #6b5c46;
  --accent: #f59e0b;
  --accent-dim: #d48a06;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --green: #f59e0b;
  --green-dim: #d48a06;
  --red: #ff4466;
  --blue: #4488ff;
  --cyan: #22c55e;
  --yellow: #fbbf24;
  --purple: #aa66ff;
  --scanline-opacity: 0.03;
  --font-display: 'Orbitron', monospace;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Rajdhani', sans-serif;
}

html { scroll-behavior: smooth; }

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

/* -- Cursor Fireflies -- */
.cursor-firefly {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 4px 1px rgba(245, 158, 11, 0.25);
  opacity: 0;
  animation: fireflyDrift var(--fly-dur, 1.5s) ease-out forwards;
}
@keyframes fireflyDrift {
  0% { opacity: 0.35; transform: translate(0, 0) scale(1); }
  20% { opacity: 0.3; }
  60% { opacity: 0.2; transform: translate(var(--fly-x, 20px), var(--fly-y, -30px)) scale(0.8); }
  100% { opacity: 0; transform: translate(calc(var(--fly-x, 20px) * 1.3), calc(var(--fly-y, -30px) * 1.3)) scale(0); }
}

/* -- Nav Portal Link -- */
.nav-portal-link {
  border: 1px solid var(--accent) !important;
  padding: 0.35rem 1rem !important;
  border-radius: 4px !important;
  color: var(--accent) !important;
  transition: all 0.3s !important;
}
.nav-portal-link:hover {
  background: rgba(245, 158, 11, 0.1) !important;
}

/* -- Scanline Overlay -- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

::selection { background: var(--accent); color: var(--bg-primary); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* -- Typography -- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 600; }

p { font-size: 1.1rem; color: var(--text-secondary); }

a { color: var(--accent); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: #fbbf24; text-shadow: 0 0 10px var(--accent-glow); }

code, pre { font-family: var(--font-mono); font-size: 0.9rem; }

.logo-0x {
  color: var(--cyan); text-shadow: 0 0 8px var(--cyan), 0 0 20px rgba(34,197,94,0.4);
  animation: oxGlitch 4s ease-in-out infinite;
  display: inline-block; position: relative;
}
@keyframes oxGlitch {
  0%, 78%, 82%, 90%, 94%, 100% { text-shadow: 0 0 8px var(--cyan), 0 0 20px rgba(34,197,94,0.4); transform: none; opacity: 1; }
  79% { text-shadow: -3px 0 var(--red), 3px 0 var(--cyan), 0 0 20px var(--cyan); transform: translate(2px, -1px) skewX(-4deg); opacity: 0.8; }
  80% { text-shadow: 3px 0 var(--cyan), -2px 0 var(--red), 0 0 30px var(--cyan); transform: translate(-3px, 1px) skewX(6deg); opacity: 0.3; }
  81% { text-shadow: -1px 0 var(--red), 2px 0 var(--cyan), 0 0 15px var(--cyan); transform: translate(1px, -2px) skewX(-2deg); opacity: 0.9; }
  91% { text-shadow: 2px 0 var(--red), -3px 0 var(--cyan), 0 0 25px var(--cyan); transform: translate(-2px, 1px) skewX(5deg); opacity: 0.4; }
  92% { text-shadow: -2px 0 var(--cyan), 3px 0 var(--red), 0 0 30px var(--cyan); transform: translate(3px, 0) skewX(-3deg); opacity: 0.7; }
  93% { text-shadow: 0 0 8px var(--cyan), 0 0 20px rgba(34,197,94,0.4); transform: translate(0, 0); opacity: 1; }
}

@keyframes logoGlitch {
  0%, 85%, 88%, 100% { text-shadow: 0 0 12px var(--green); transform: none; }
  86% { text-shadow: -2px 0 var(--red), 2px 0 var(--green), 0 0 12px var(--green); transform: translate(-1px, 0) skewX(-2deg); }
  87% { text-shadow: 2px 0 var(--red), -2px 0 var(--cyan), 0 0 12px var(--green); transform: translate(1px, 0) skewX(1deg); }
}

/* -- Navigation -- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, #1a1610, #12100d, #0c0a08);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.03);
  overflow: hidden; padding: 0 2rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav::after {
  content: ''; position: absolute; bottom: 0; left: -100%; width: 60%; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
  animation: nav-glow-sweep 2s ease-in-out infinite;
}

@keyframes nav-glow-sweep { 0% { left: -60%; } 100% { left: 100%; } }

.nav-brand { display: flex; align-items: center; gap: 0.75rem; }

/* -- Hex Logo Icon -- */
.logo-hex-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.hex-outer {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(245,158,11,0.15));
  border: 1.5px solid rgba(34,197,94,0.6);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  animation: hexPulse 3s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(245,158,11,0.2), inset 0 0 8px rgba(34,197,94,0.1);
}

.hex-inner { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; color: var(--cyan); text-shadow: 0 0 6px rgba(34,197,94,0.6); }

@keyframes hexPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(245,158,11,0.2), inset 0 0 8px rgba(34,197,94,0.1); }
  50% { box-shadow: 0 0 20px rgba(245,158,11,0.35), inset 0 0 12px rgba(34,197,94,0.2); }
}

/* -- Hero Hex Logo -- */
.hero-logo-block { margin: 0 0 4rem; display: flex; justify-content: center; }

.hero-hex-logo { width: 120px; height: 120px; position: relative; display: flex; align-items: center; justify-content: center; }

.hex-glow-ring {
  position: absolute; inset: 0;
  border: 2px solid rgba(34,197,94,0.3); border-radius: 16px;
  animation: heroHexGlow 3s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(245,158,11,0.15), inset 0 0 20px rgba(34,197,94,0.08);
}

.hex-glow-ring::before {
  content: ''; position: absolute; inset: -8px;
  border: 1px solid rgba(245,158,11,0.1); border-radius: 20px;
  animation: heroHexGlow 3s ease-in-out infinite 0.5s;
}

@keyframes heroHexGlow {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 30px rgba(245,158,11,0.15), inset 0 0 20px rgba(34,197,94,0.08); }
  50% { opacity: 1; box-shadow: 0 0 50px rgba(245,158,11,0.3), inset 0 0 30px rgba(34,197,94,0.15); }
}

.hero-hex-text {
  font-family: var(--font-mono); font-size: 2.5rem; font-weight: 700;
  color: var(--cyan); text-shadow: 0 0 20px rgba(34,197,94,0.5), 0 0 40px rgba(245,158,11,0.2);
  animation: heroHexGlitch 4s ease-in-out infinite;
}

@keyframes heroHexGlitch {
  0%, 85%, 100% { filter: none; transform: none; }
  86% { filter: hue-rotate(90deg) brightness(2); transform: translate(3px, -2px) skewX(-3deg); }
  87% { filter: hue-rotate(-60deg) brightness(0.5); transform: translate(-4px, 1px) skewX(4deg); }
  88% { filter: brightness(3) saturate(3); transform: translate(2px, -3px); }
  89% { filter: none; transform: none; }
  93% { filter: none; transform: none; }
  94% { filter: hue-rotate(180deg) brightness(2); transform: translate(-2px, 2px); }
  95% { filter: none; transform: none; }
}

.nav-brand h1 {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 900;
  color: var(--green);
  letter-spacing: 0.1em;
  text-shadow: 0 0 14px var(--green);
  animation: logoGlitch 8s ease-in-out infinite;
}

.nav-brand .version {
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
  background: var(--bg-card); padding: 2px 8px; border-radius: 3px; border: 1px solid var(--border);
}

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

.nav-links a {
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary);
  padding: 0.5rem 1rem; border-radius: 4px; transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent); background: rgba(245, 158, 11, 0.08); text-shadow: 0 0 10px var(--accent-glow);
}

.nav-mobile-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--text-primary);
  padding: 0.5rem; border-radius: 4px; cursor: pointer; font-size: 1.2rem;
}

/* -- Container -- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* -- Section -- */
section { padding: 6rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 0.75rem; display: block; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p { max-width: 600px; margin: 0 auto; }

/* -- Buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 0.85rem 2rem;
  border-radius: 4px; border: 1px solid transparent; cursor: pointer; transition: all 0.3s ease; text-decoration: none;
}

.btn-primary { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:hover { background: #fbbf24; box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(245, 158, 11, 0.15); color: var(--bg-primary); transform: translateY(-2px); }

.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(245, 158, 11, 0.05); transform: translateY(-2px); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.7rem; }

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

/* -- Download Button (fancy animated) -- */
.btn-download {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
  color: var(--bg-primary);
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(245,158,11,0.3), 0 0 60px rgba(245,158,11,0.1);
  animation: downloadPulse 3s ease-in-out infinite;
  z-index: 1;
}
.btn-download::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0) 20%, rgba(255,220,130,0.6) 50%, rgba(255,255,255,0) 80%, transparent);
  z-index: -1;
  border-radius: 4px;
  animation: borderGlow 3s linear infinite;
}
.btn-download::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmerSweep 4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}
.btn-download:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fbbf24 100%);
  box-shadow: 0 0 30px rgba(245,158,11,0.5), 0 0 80px rgba(245,158,11,0.2), 0 4px 20px rgba(245,158,11,0.3);
  transform: translateY(-3px) scale(1.02);
  color: var(--bg-primary);
}
.btn-download:hover::after {
  animation: shimmerSweep 1.5s ease-in-out infinite;
}
@keyframes downloadPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245,158,11,0.3), 0 0 60px rgba(245,158,11,0.1); }
  50% { box-shadow: 0 0 30px rgba(245,158,11,0.5), 0 0 80px rgba(245,158,11,0.15); }
}
@keyframes shimmerSweep {
  0% { left: -100%; }
  50%, 100% { left: 200%; }
}
@keyframes borderGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* -- Cards -- */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  padding: 2rem; transition: all 0.3s ease; position: relative; overflow: hidden;
}

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

.card:hover { border-color: rgba(245, 158, 11, 0.3); background: var(--bg-card-hover); transform: translateY(-4px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  margin-bottom: 1.25rem; background: rgba(245, 158, 11, 0.05); color: var(--accent);
}

.card h3 { margin-bottom: 0.75rem; font-size: 1rem; }
.card p { font-size: 0.95rem; line-height: 1.7; }

.feature-tag { font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.75rem; display: block; }

/* -- Grid Layouts -- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

/* -- Hero Section -- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 64px; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .grid-overlay { display: none; }
.hero-bg .radial-glow { position: absolute; top: -30%; left: 50%; transform: translateX(-50%); width: 900px; height: 900px; background: radial-gradient(ellipse, rgba(245, 158, 11, 0.06) 0%, rgba(0, 212, 255, 0.02) 40%, transparent 70%); }

.hero-content { position: relative; z-index: 1; text-align: center; max-width: 900px; margin: 0 auto; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--green);
  background: rgba(245, 158, 11, 0.06); border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.5rem 1.2rem; border-radius: 2px; margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: 0.18em; position: relative; min-height: 2rem;
}
.hero-tag::before { content: '>'; color: var(--green); font-weight: 700; opacity: 0.5; }
.hero-tag .pulse { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; box-shadow: 0 0 8px var(--green); }

.hero-tag-text { display: inline-flex; align-items: center; gap: 0; }
.tag-prefix { color: var(--green); margin-right: 0.5em; font-weight: 700; opacity: 0.7; }
.tag-typing { color: var(--cyan); min-width: 20ch; }
.tag-cursor { color: var(--green); font-size: 0.7em; animation: blink-cursor 0.7s step-end infinite; margin-left: 1px; }

@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* -- Hero Status Bar -- */
.hero-status-bar {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap;
}
.hsb-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.hsb-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.hsb-dot--green { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 3s infinite; }
.hsb-dot--amber { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); animation: pulse 2s infinite 0.5s; }
.hsb-sep { color: var(--border); font-size: 0.5rem; }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .gradient { font-family: var(--font-display); font-weight: 900; letter-spacing: 0.1em; color: var(--green); text-shadow: 0 0 14px var(--green); animation: logoGlitch 8s ease-in-out infinite; }

.hero-desc { font-size: 1.25rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 2.5rem; line-height: 1.8; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 3rem; justify-content: center; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.hero-stat { text-align: center; }
.hero-stat .value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--accent); }
.hero-stat .label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.15em; margin-top: 0.25rem; }

/* -- Features Grid -- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.features-section-header { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.features-section-header .section-header { flex: 1; min-width: 300px; }

/* -- Demo Modules -- */
.demo-modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.demo-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; transition: all 0.3s ease;
}
.demo-panel:hover { border-color: rgba(245,158,11,0.3); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.demo-header {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border); background: rgba(245,158,11,0.02);
}
.demo-header h3 { font-size: 0.9rem; margin: 0; }
.demo-body { padding: 1rem; font-family: var(--font-mono); font-size: 0.72rem; }

/* Demo shared */
.demo-badge {
  font-family: var(--font-mono); font-size: 0.6rem; padding: 2px 8px;
  border-radius: 3px; letter-spacing: 0.08em; font-weight: 600;
}
.demo-badge--green { background: rgba(245,158,11,0.12); color: var(--green); border: 1px solid rgba(245,158,11,0.25); }
.demo-badge--cyan { background: rgba(34,197,94,0.12); color: var(--cyan); border: 1px solid rgba(34,197,94,0.25); }
.demo-badge--red { background: rgba(255,68,102,0.12); color: var(--red); border: 1px solid rgba(255,68,102,0.25); }
.demo-badge--amber { background: rgba(255,170,0,0.12); color: var(--yellow); border: 1px solid rgba(255,170,0,0.25); }
.demo-metric { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.dm-label { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.dm-value { font-size: 0.8rem; color: var(--text-primary); font-weight: 600; }
.dm-green { color: var(--green) !important; }
.dm-red { color: var(--red) !important; }
.dm-cyan { color: var(--cyan) !important; }
.dm-bg-green { background: var(--green); }
.dm-bg-red { background: var(--red); }

/* Module 01: Agent */
.demo-agent-status { display: flex; gap: 6px; margin-bottom: 0.75rem; }
.demo-agent-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; margin-bottom: 0.75rem;
  padding: 8px; background: rgba(245,158,11,0.03); border-radius: 4px; border: 1px solid var(--border); }
.demo-agent-cycle { margin-bottom: 0.5rem; }
.demo-cycle-bar { height: 4px; background: var(--bg-secondary); border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.demo-cycle-fill { height: 100%; background: var(--green); border-radius: 2px; width: 0%; transition: width 0.3s linear;
  box-shadow: 0 0 6px var(--green); }
.demo-cycle-text { font-size: 0.6rem; color: var(--text-muted); }
.demo-agent-log { max-height: 80px; overflow: hidden; }
.demo-agent-log-line { font-size: 0.6rem; color: var(--text-muted); padding: 1px 0; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; animation: fadeInLog 0.3s ease; }
.demo-agent-log-line .log-ts { color: var(--text-muted); margin-right: 6px; }
.demo-agent-log-line .log-cmd { color: var(--cyan); margin-right: 6px; font-weight: 600; }
.demo-agent-log-line.log-green .log-cmd { color: var(--green); }
.demo-agent-log-line.log-red .log-cmd { color: var(--red); }
@keyframes fadeInLog { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Module 02: Signals */
.demo-signal-cards { display: flex; flex-direction: column; gap: 6px; }
.demo-signal-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center;
  padding: 8px; border-radius: 4px; border: 1px solid var(--border); background: rgba(0,0,0,0.2);
  animation: fadeInLog 0.4s ease;
}
.demo-sig-ticker { font-weight: 700; color: var(--cyan); font-size: 0.85rem; }
.demo-sig-mid { display: flex; flex-direction: column; gap: 2px; }
.demo-sig-mid .dm-label { font-size: 0.55rem; }
.demo-sig-conf { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; text-align: right; }

/* Module 03: Risk */
.demo-risk-cb { margin-bottom: 0.75rem; }
.demo-risk-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0.75rem; }
.demo-risk-bar-item { display: flex; flex-direction: column; gap: 3px; }
.demo-risk-bar { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.demo-risk-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow)); border-radius: 3px;
  transition: width 1s ease; }
.demo-risk-bar-item .dm-value { font-size: 0.65rem; text-align: right; }
.demo-risk-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; padding: 8px;
  background: rgba(245,158,11,0.03); border-radius: 4px; border: 1px solid var(--border); }

/* Module 04: Scanner */
.demo-scanner-header { display: grid; grid-template-columns: 1fr 1fr 0.7fr; padding: 4px 0;
  border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.demo-scanner-rows { max-height: 180px; overflow: hidden; }
.demo-scanner-row { display: grid; grid-template-columns: 1fr 1fr 0.7fr; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03); transition: background 0.2s; }
.demo-scanner-row:hover { background: rgba(245,158,11,0.04); }
.demo-scanner-row .scan-ticker { color: var(--cyan); font-weight: 600; }
.demo-scanner-row .scan-price { color: var(--text-primary); }
.demo-scanner-row .scan-chg { font-weight: 600; }
.demo-scanner-status { text-align: center; padding: 6px 0; color: var(--text-muted); font-size: 0.6rem;
  letter-spacing: 0.1em; animation: pulse 2s infinite; }

/* Module 05: Regime */
.demo-regime-current { text-align: center; margin-bottom: 0.75rem; }
.demo-regime-label { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--green);
  text-shadow: 0 0 10px rgba(245,158,11,0.4); display: block; margin-bottom: 4px; }
.demo-regime-desc { font-size: 0.65rem; color: var(--text-muted); }
.demo-regime-gauge { margin-bottom: 0.75rem; }
.demo-regime-segments { display: flex; gap: 3px; }
.demo-regime-seg { flex: 1; padding: 6px 2px; text-align: center; border-radius: 3px; font-size: 0.55rem;
  letter-spacing: 0.08em; font-weight: 600; opacity: 0.3; transition: all 0.5s ease; }
.demo-regime-seg.active { opacity: 1; transform: scaleY(1.1); }
.seg-bear { background: rgba(255,68,102,0.15); color: var(--red); border: 1px solid rgba(255,68,102,0.3); }
.seg-accum { background: rgba(34,197,94,0.15); color: var(--cyan); border: 1px solid rgba(34,197,94,0.3); }
.seg-range { background: rgba(255,170,0,0.15); color: var(--yellow); border: 1px solid rgba(255,170,0,0.3); }
.seg-dist { background: rgba(170,102,255,0.15); color: var(--purple); border: 1px solid rgba(170,102,255,0.3); }
.seg-bull { background: rgba(245,158,11,0.15); color: var(--green); border: 1px solid rgba(245,158,11,0.3); }
.demo-regime-sentiment { padding: 8px; background: rgba(245,158,11,0.03); border-radius: 4px; border: 1px solid var(--border); }
.demo-fg-bar { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; margin: 6px 0; }
.demo-fg-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--yellow), var(--green)); border-radius: 3px;
  transition: width 1s ease; }

/* Module 06: Paper Trading */
.demo-paper-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 0.75rem;
  padding: 8px; background: rgba(245,158,11,0.03); border-radius: 4px; border: 1px solid var(--border); }
.demo-paper-summary .demo-metric { flex-direction: column; text-align: center; gap: 2px; }
.demo-paper-positions { margin-bottom: 0.5rem; }
.demo-paper-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.7rem; align-items: center; }
.demo-paper-equity { border-top: 1px solid var(--border); padding-top: 6px; }
.demo-paper-equity canvas { width: 100%; height: 60px; }

/* Module 07: Backtest */
.demo-bt-status { display: flex; align-items: center; gap: 8px; margin-bottom: 0.75rem; }
.demo-bt-window { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.08em; }
.demo-bt-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; margin-bottom: 0.75rem;
  padding: 8px; background: rgba(245,158,11,0.03); border-radius: 4px; border: 1px solid var(--border); }
.demo-bt-bars { display: flex; gap: 4px; align-items: flex-end; height: 80px; padding: 0 4px; }
.demo-bt-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.demo-bt-bar { width: 100%; border-radius: 2px 2px 0 0; min-height: 4px; transition: height 0.5s ease; }
.demo-bt-bar-wrap span { font-size: 0.5rem; color: var(--text-muted); margin-top: 3px; }
.demo-bt-label { text-align: center; font-size: 0.55rem; color: var(--text-muted); margin-top: 6px; letter-spacing: 0.08em; }

/* -- Stats Bar -- */
.stats-bar { background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 3rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-item .stat-value { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-item .stat-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.15em; margin-top: 0.5rem; }

/* -- Tech Stack -- */
.tech-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.tech-item { display: flex; align-items: center; gap: 1rem; width: calc(25% - 0.75rem); min-width: 200px; padding: 1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; transition: all 0.3s ease; }
.tech-item:hover { border-color: rgba(245, 158, 11, 0.3); background: var(--bg-card-hover); }
.tech-item .tech-icon { font-size: 1.5rem; width: 40px; text-align: center; }
.tech-item .tech-name { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.tech-item .tech-desc { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

/* -- Ops Demo (Radar + Log) -- */
.ops-demo-grid { display: grid; grid-template-columns: 160px 1fr; gap: 1.5rem; align-items: stretch; max-width: 800px; margin: 0 auto; }

.ops-demo-radar { display: flex; align-items: center; justify-content: center; background: rgba(6, 12, 10, 0.8); border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem; position: relative; overflow: hidden; }
.ops-demo-radar::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0px, rgba(245,158,11,0.015) 1px, transparent 2px); animation: radarStaticFlicker 0.15s steps(3) infinite; pointer-events: none; z-index: 1; }

@keyframes radarStaticFlicker { 0% { opacity: 0.4; } 33% { opacity: 0.7; } 66% { opacity: 0.3; } 100% { opacity: 0.5; } }

.ops-demo-radar-wrap { position: relative; width: 130px; height: 150px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.demo-radar-svg { width: 120px; height: 120px; }
.demo-radar-beam { transform-origin: 60px 60px; animation: demoBeamSpin 3s linear infinite; }
@keyframes demoBeamSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.demo-blip { opacity: 0; animation: demoBlipPulse 3s ease infinite; }
.demo-blip--green { fill: #f59e0b; }
.demo-blip--amber { fill: #ffaa00; }
.demo-blip--red { fill: #ff4466; }
@keyframes demoBlipPulse { 0% { opacity: 0; r: 1; } 15% { opacity: 0.9; r: 2.5; } 80% { opacity: 0.3; r: 1.5; } 100% { opacity: 0; r: 1; } }

.demo-center-dot { animation: demoCenterPulse 1.5s ease infinite; }
@keyframes demoCenterPulse { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.5; } }

.demo-radar-scanline { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent 10%, rgba(245,158,11,0.12) 30%, rgba(245,158,11,0.2) 50%, rgba(245,158,11,0.12) 70%, transparent 90%); animation: demoScanline 2.5s linear infinite; pointer-events: none; z-index: 2; }
@keyframes demoScanline { from { top: 0; } to { top: 100%; } }

.demo-radar-label { text-align: center; font-family: var(--font-display); font-size: 0.55rem; letter-spacing: 2px; color: var(--text-muted); margin-top: 2px; }
.demo-radar-dot { color: #f59e0b; animation: demoRadarDotPulse 2s ease infinite; margin-right: 4px; font-size: 7px; }
@keyframes demoRadarDotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.demo-radar-telemetry { position: absolute; inset: 0; overflow: hidden; z-index: 0; display: flex; flex-direction: column; justify-content: flex-start; padding: 4px 6px; gap: 1px; pointer-events: none; }
.demo-telem-line { font-family: var(--font-mono); font-size: 7px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; opacity: 0; color: rgba(245,158,11,0.22); line-height: 1.3; text-transform: uppercase; animation: telemFlash 3.5s ease forwards; }
.demo-telem-line.tl-green { color: rgba(0,204,68,0.25); }
.demo-telem-line.tl-red { color: rgba(255,60,60,0.25); }
@keyframes telemFlash { 0% { opacity: 0; transform: translateX(-3px); } 5% { opacity: 0.9; transform: translateX(1px); } 8% { opacity: 0; transform: translateX(-1px); } 12% { opacity: 0.8; transform: translateX(0); } 70% { opacity: 0.4; } 100% { opacity: 0; } }

.ops-demo-terminal { background: rgba(6, 12, 10, 0.6); border: 1px solid var(--border); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; min-height: 260px; }
.ops-demo-term-header { display: flex; align-items: center; gap: 5px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.ops-demo-dot { width: 8px; height: 8px; border-radius: 50%; }
.ops-demo-term-title { font-family: var(--font-display); font-size: 0.6rem; letter-spacing: 2px; color: var(--text-muted); margin-left: 6px; }
.ops-demo-term-body { flex: 1; padding: 8px 12px; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.7; overflow: hidden; }
.ops-demo-line { white-space: nowrap; overflow: hidden; animation: opsLineIn 0.3s ease both; }
@keyframes opsLineIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.ops-demo-ts { color: var(--text-muted); margin-right: 8px; }
.ops-demo-cmd { color: var(--cyan); font-weight: 700; margin-right: 8px; }
.ops-demo-msg { color: #f59e0b; }
.ops-demo-msg.warn { color: #ffaa00; }
.ops-demo-msg.err { color: #ff4466; }

/* -- Exchange/Broker Grid -- */
.broker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
a.broker-item { text-decoration: none; color: inherit; }
.broker-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; transition: all 0.3s ease; }
.broker-item.coming-soon { opacity: 0.45; }
.broker-item:hover { border-color: rgba(245, 158, 11, 0.3); background: var(--bg-card-hover); }
.broker-item strong { font-family: var(--font-display); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.broker-tag { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 6px; font-family: var(--font-display); font-size: 0.65rem; font-weight: 700; color: var(--accent); }
.broker-logo { width: 36px; height: 36px; flex-shrink: 0; opacity: 0.6; transition: opacity 0.3s; }
.broker-item:hover .broker-logo { opacity: 0.9; }

/* -- Asset Universe Grid -- */
/* -- Asset Scanner Graphic -- */
.asset-scanner {
  position: relative; width: 100%; max-width: 500px; height: 500px; margin: 0 auto 2rem;
}
.asset-scanner-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 180px; height: 180px;
}
.asset-hub-ring {
  position: absolute; border-radius: 50%; border: 1px solid rgba(245,158,11,0.15);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.asset-hub-ring--outer {
  width: 500px; height: 500px; border-color: rgba(245,158,11,0.08);
  animation: ringPulse 4s ease-in-out infinite;
}
.asset-hub-ring--mid {
  width: 360px; height: 360px; border-color: rgba(34,197,94,0.1);
  animation: ringPulse 4s ease-in-out infinite 1s;
}
.asset-hub-ring--inner {
  width: 240px; height: 240px; border-color: rgba(245,158,11,0.15);
  animation: ringPulse 4s ease-in-out infinite 2s;
}
@keyframes ringPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
}
.asset-hub-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 160px; height: 160px; border-radius: 50%; text-align: center;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  border: 1px solid rgba(245,158,11,0.25); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 0 40px rgba(245,158,11,0.1), inset 0 0 30px rgba(245,158,11,0.05);
}
.asset-hub-count {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 900;
  color: var(--green); text-shadow: 0 0 20px var(--green);
  line-height: 1;
}
.asset-hub-label {
  font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.asset-hub-status {
  font-family: var(--font-mono); font-size: 0.55rem; color: var(--green);
  letter-spacing: 0.1em; display: flex; align-items: center; gap: 4px; margin-top: 2px;
}
.asset-hub-status .hsb-dot { width: 5px; height: 5px; }

/* Sector orbit labels */
.asset-sector-orbits { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.orbit-label {
  position: absolute; font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--cyan); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid rgba(34,197,94,0.2); border-radius: 3px;
  background: rgba(34,197,94,0.05); white-space: nowrap;
  animation: labelFloat 6s ease-in-out infinite;
}
.orbit-label--1 { top: 2%; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.orbit-label--2 { top: 12%; right: 5%; animation-delay: 0.7s; }
.orbit-label--3 { top: 38%; right: 0%; animation-delay: 1.4s; }
.orbit-label--4 { top: 12%; left: 5%; animation-delay: 0.3s; }
.orbit-label--5 { top: 38%; left: 0%; animation-delay: 1.1s; }
.orbit-label--6 { bottom: 38%; right: 0%; animation-delay: 1.8s; }
.orbit-label--7 { bottom: 12%; right: 5%; animation-delay: 2.2s; }
.orbit-label--8 { bottom: 12%; left: 5%; animation-delay: 2.5s; }
.orbit-label--9 { bottom: 2%; left: 50%; transform: translateX(-50%); animation-delay: 1.6s; }

@keyframes labelFloat {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}
.orbit-label--1, .orbit-label--9 {
  animation: labelFloatCenter 6s ease-in-out infinite;
}
@keyframes labelFloatCenter {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-4px); }
}

/* Floating particles */
.asset-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.scan-particle {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--green); opacity: 0;
  animation: particleFly 3s linear infinite;
}
.scan-particle:nth-child(odd) { background: var(--cyan); }
@keyframes particleFly {
  0% { opacity: 0; transform: scale(0); }
  10% { opacity: 0.8; transform: scale(1); }
  90% { opacity: 0.4; }
  100% { opacity: 0; transform: scale(0.5); }
}

/* Scrolling ticker tapes */
.asset-ticker-tape-wrap {
  overflow: hidden; margin: 0 -1rem; position: relative;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.asset-ticker-tape { overflow: hidden; padding: 6px 0; }
.tape-track {
  display: flex; gap: 8px; width: max-content;
  animation: tickerScroll 40s linear infinite;
}
.tape-track--reverse { animation: tickerScrollReverse 35s linear infinite; }
.asset-ticker-tape span {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 3px; white-space: nowrap;
  transition: all 0.3s;
}
.asset-ticker-tape span:hover { color: var(--green); border-color: var(--green); background: rgba(245,158,11,0.06); }
.tape-2 span { color: var(--cyan); opacity: 0.5; }
.tape-2 span:hover { opacity: 1; color: var(--cyan); border-color: var(--cyan); }
.tape-3 span { opacity: 0.35; }
.tape-3 span:hover { opacity: 1; color: var(--green); border-color: var(--green); }

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes tickerScrollReverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* -- Download -- */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.download-grid-mobile { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 520px; margin: 1.5rem auto 0; }
@media (max-width: 600px) { .download-grid { grid-template-columns: 1fr; } .download-grid-mobile { grid-template-columns: 1fr; } }
.download-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 2rem 1.5rem; text-align: center; transition: all 0.3s ease; }
.download-card:hover { border-color: rgba(245, 158, 11, 0.4); background: var(--bg-card-hover); transform: translateY(-4px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.download-card .download-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.download-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.download-card p { font-size: 0.85rem; margin-bottom: 1.25rem; }
.download-card .download-meta { display: block; font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); margin-top: 0.75rem; }
.download-note { text-align: center; margin-top: 2rem; }
.download-note p { font-size: 0.8rem; color: var(--text-muted); max-width: 500px; margin: 0 auto; }

/* -- CTA Section -- */
.cta-section { text-align: center; padding: 6rem 0; position: relative; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.06) 0%, transparent 70%); }
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { max-width: 500px; margin: 0 auto 2rem; }

/* -- Footer -- */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 3rem 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-left p { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.footer-legal { text-align: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.footer-legal a { color: var(--text-secondary); text-decoration: none; font-size: 0.75rem; transition: color 0.2s; }
.footer-legal a:hover { color: var(--accent); text-decoration: underline; }
.footer-sep { margin: 0 8px; opacity: 0.4; color: var(--text-muted); }
.footer-copy { text-align: center; color: var(--text-muted); font-size: 0.65rem; margin-top: 0.5rem; }

/* -- Legal Modal -- */
.legal-modal-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; }
.legal-modal-overlay.hidden { display: none; }
.legal-modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; width: 640px; max-width: 94vw; max-height: 80vh; box-shadow: 0 20px 60px rgba(0,0,0,0.5); display: flex; flex-direction: column; overflow: hidden; }
.legal-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.legal-modal-title { font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: var(--accent); }
.legal-modal-close { background: none; border: 1px solid var(--border); color: var(--text-secondary); font-size: 1.2rem; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.legal-modal-close:hover { background: var(--bg-card-hover); color: var(--accent); border-color: var(--accent); }
.legal-modal-body { padding: 20px 24px; overflow-y: auto; font-size: 0.8rem; line-height: 1.7; color: var(--text-primary); }
.legal-modal-body h2 { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 1px; color: var(--accent); margin: 18px 0 8px; text-transform: uppercase; }
.legal-modal-body h2:first-child { margin-top: 0; }
.legal-modal-body p { margin: 0 0 10px; color: var(--text-secondary); }
.legal-modal-body ul { margin: 0 0 10px 18px; color: var(--text-secondary); }
.legal-modal-body li { margin-bottom: 4px; }
.legal-modal-body code { background: var(--bg-primary); padding: 2px 6px; border-radius: 3px; font-size: 0.75rem; }

/* -- Animations -- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { opacity: 0; animation: fadeInUp 0.6s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* -- 3D Cash Stack Logo (from app) -- */
.cash3d { width: 32px; height: 22px; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.cash3d-scene { width: 24px; height: 15px; perspective: 150px; position: relative; }
.cash3d-rotator { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: cash3dSpin 5s linear infinite; }
@keyframes cash3dSpin { 0% { transform: rotateY(0deg) rotateX(-15deg); } 100% { transform: rotateY(360deg) rotateX(-15deg); } }
.cash3d-face { position: absolute; backface-visibility: visible; }
.cash3d-front, .cash3d-back { width: 24px; height: 15px; top: 0; left: 0; }
.cash3d-front { transform: translateZ(2.5px); }
.cash3d-back  { transform: rotateY(180deg) translateZ(2.5px); }
.cash3d-right { width: 5px; height: 15px; top: 0; left: 9.5px; transform: rotateY(90deg) translateZ(12px); }
.cash3d-left  { width: 5px; height: 15px; top: 0; left: 9.5px; transform: rotateY(-90deg) translateZ(12px); }
.cash3d-top    { width: 24px; height: 5px; top: 5px; left: 0; transform: rotateX(90deg) translateZ(7.5px); }
.cash3d-bottom { width: 24px; height: 5px; top: 5px; left: 0; transform: rotateX(-90deg) translateZ(7.5px); }

.bill-face { width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,212,255,0.08) 0%, rgba(0,212,255,0.15) 50%, rgba(0,212,255,0.08) 100%); border: 1.5px solid rgba(0,212,255,0.7); border-radius: 2px; position: relative; overflow: hidden; box-shadow: inset 0 0 10px rgba(0,212,255,0.15); }
.bill-border { position: absolute; top: 1px; left: 2px; right: 2px; bottom: 1px; border: 1px solid rgba(0,212,255,0.3); border-radius: 1px; }
.bill-oval { position: absolute; width: 7px; height: 7px; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(0,212,255,0.35); border-radius: 50%; }
.bill-dollar { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Georgia', serif; font-size: 6px; font-weight: bold; color: rgba(0,212,255,0.9); text-shadow: 0 0 4px rgba(0,212,255,0.6), 0 0 8px rgba(0,212,255,0.3); }
.bill-100 { position: absolute; bottom: 1px; right: 1px; font-family: 'Courier New', monospace; font-size: 3px; font-weight: bold; color: rgba(0,212,255,0.5); }

.stack-edge { width: 100%; height: 100%; background: repeating-linear-gradient(90deg, rgba(0,30,40,0.4) 0px, rgba(0,212,255,0.25) 0.8px, rgba(0,30,40,0.4) 1.6px); border: 1px solid rgba(0,212,255,0.5); }
.stack-edge-h { width: 100%; height: 100%; background: repeating-linear-gradient(0deg, rgba(0,30,40,0.4) 0px, rgba(0,212,255,0.25) 0.8px, rgba(0,30,40,0.4) 1.6px); border: 1px solid rgba(0,212,255,0.5); }

.band-face { position: absolute; backface-visibility: visible; background: linear-gradient(90deg, rgba(245,158,11,0.15) 0%, rgba(245,158,11,0.35) 40%, rgba(0,212,255,0.35) 60%, rgba(245,158,11,0.15) 100%); border: 1px solid rgba(245,158,11,0.6); box-shadow: 0 0 6px rgba(245,158,11,0.3), inset 0 0 4px rgba(245,158,11,0.15); }
.band-front  { width: 5px; height: 15px; top: 0; left: 9.5px; transform: translateZ(2.7px); }
.band-back   { width: 5px; height: 15px; top: 0; left: 9.5px; transform: rotateY(180deg) translateZ(2.7px); }
.band-top    { width: 5px; height: 5px; top: 5px; left: 9.5px; transform: rotateX(90deg) translateZ(7.5px); }
.band-bottom { width: 5px; height: 5px; top: 5px; left: 9.5px; transform: rotateX(-90deg) translateZ(7.5px); }

/* Hero large cash stack */
.cash3d-hero { width: 60px; height: 36px; transform: scale(4); }
.cash3d-hero .cash3d-scene { width: 60px; height: 36px; perspective: 300px; }
.cash3d-hero .cash3d-front, .cash3d-hero .cash3d-back { width: 60px; height: 36px; top: 0; left: 0; }
.cash3d-hero .cash3d-front { transform: translateZ(7px); }
.cash3d-hero .cash3d-back  { transform: rotateY(180deg) translateZ(7px); }
.cash3d-hero .cash3d-right { width: 14px; height: 36px; top: 0; left: 23px; transform: rotateY(90deg) translateZ(30px); }
.cash3d-hero .cash3d-left  { width: 14px; height: 36px; top: 0; left: 23px; transform: rotateY(-90deg) translateZ(30px); }
.cash3d-hero .cash3d-top    { width: 60px; height: 14px; top: 11px; left: 0; transform: rotateX(90deg) translateZ(18px); }
.cash3d-hero .cash3d-bottom { width: 60px; height: 14px; top: 11px; left: 0; transform: rotateX(-90deg) translateZ(18px); }
.cash3d-hero .bill-oval { width: 16px; height: 16px; }
.cash3d-hero .bill-dollar { font-size: 14px; color: rgba(0,212,255,0.9); text-shadow: 0 0 6px rgba(0,212,255,0.6); }
.cash3d-hero .bill-100 { font-size: 7px; }
.cash3d-hero .band-face { background: linear-gradient(90deg, rgba(245,158,11,0.2) 0%, rgba(245,158,11,0.6) 40%, rgba(0,212,255,0.6) 60%, rgba(245,158,11,0.2) 100%); border: 1px solid rgba(245,158,11,0.8); box-shadow: 0 0 8px rgba(245,158,11,0.4), inset 0 0 4px rgba(245,158,11,0.2); }
.cash3d-hero .band-front, .cash3d-hero .band-back { width: 14px; height: 36px; top: 0; left: 23px; }
.cash3d-hero .band-front { transform: translateZ(7.2px); }
.cash3d-hero .band-back  { transform: rotateY(180deg) translateZ(7.2px); }
.cash3d-hero .band-top, .cash3d-hero .band-bottom { width: 14px; height: 14px; left: 23px; top: 11px; }
.cash3d-hero .band-top { transform: rotateX(90deg) translateZ(18px); }
.cash3d-hero .band-bottom { transform: rotateX(-90deg) translateZ(18px); }

/* -- 3D Spinning Coin -- */
.coin3d-scene {
  width: 120px; height: 120px; perspective: 800px;
}
.coin3d-rotator {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d;
  animation: coinSpin 5s linear infinite;
}
@keyframes coinSpin {
  0% { transform: rotateY(0deg) rotateX(-8deg); }
  100% { transform: rotateY(360deg) rotateX(-8deg); }
}
.coin3d-face {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  backface-visibility: hidden;
}
.coin3d-front { transform: translateZ(8px); }
.coin3d-back { transform: rotateY(180deg) translateZ(8px); }

.coin-inner {
  width: 100%; height: 100%; border-radius: 50%; position: relative;
  background: radial-gradient(ellipse at 35% 35%, #f5c542 0%, #f59e0b 40%, #b8750a 75%, #8a5a08 100%);
  border: 3px solid #d48a06;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,220,130,0.4),
    0 0 30px rgba(245,158,11,0.4), 0 0 60px rgba(245,158,11,0.15);
  display: flex; align-items: center; justify-content: center;
}
.coin-inner-back {
  background: radial-gradient(ellipse at 65% 65%, #f5c542 0%, #f59e0b 40%, #b8750a 75%, #8a5a08 100%);
}
.coin-ring {
  position: absolute; top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 2px solid rgba(255,220,130,0.35); border-radius: 50%;
}
.coin-symbol {
  font-family: var(--font-display); font-size: 4.2rem; font-weight: 900;
  color: rgba(180, 130, 40, 0.18); text-shadow: none;
  position: relative; z-index: 1;
}
.coin-symbol-back {
  font-family: var(--font-display); font-size: 4.2rem; font-weight: 900;
  color: rgba(180, 130, 40, 0.18); text-shadow: none;
  position: relative; z-index: 1;
}

/* Coin edge - cylinder wall between two faces */
.coin3d-edge-wrap {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transform-style: preserve-3d;
}
.coin3d-edge-seg {
  position: absolute;
  width: 12px; height: 16px;
  left: calc(50% - 6px); top: calc(50% - 8px);
  background: linear-gradient(180deg, #f5c542 0%, #b8750a 35%, #d48a06 50%, #8a5a08 75%, #a37208 100%);
  border-top: 1px solid rgba(255,220,130,0.25);
  border-bottom: 1px solid rgba(80,50,0,0.6);
  transform-origin: center center;
}

/* Nav coin (small) */
.coin3d-nav { display: inline-block; vertical-align: middle; }
.coin3d-scene--sm { width: 28px; height: 28px; perspective: 200px; }
.coin3d-scene--sm .coin3d-face { width: 28px; height: 28px; }
.coin3d-scene--sm .coin3d-front { transform: translateZ(2px); }
.coin3d-scene--sm .coin3d-back { transform: rotateY(180deg) translateZ(2px); }
.coin3d-scene--sm .coin-inner { border-width: 1px; }
.coin3d-scene--sm .coin-ring { top: 2px; left: 2px; right: 2px; bottom: 2px; border-width: 1px; }
.coin3d-scene--sm .coin-symbol,
.coin3d-scene--sm .coin-symbol-back { font-size: 1rem; color: rgba(180, 130, 40, 0.18); text-shadow: none; }
.coin3d-scene--sm .coin3d-edge-seg { width: 3px; height: 4px; left: calc(50% - 1.5px); top: calc(50% - 2px); }

/* Hero coin wrapper */
.hero-coin-wrap {
  position: relative;
  display: inline-block;
}
.matrix-rain-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle, rgba(0,0,0,0.8) 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.8) 30%, transparent 70%);
}
.hero-coin-glitch {
  position: relative;
  z-index: 1;
  display: inline-block;
  animation: coinFloat 4s ease-in-out infinite;
}
@keyframes coinFloat {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.25)); }
  50% { transform: translateY(-10px); filter: drop-shadow(0 0 22px rgba(245, 158, 11, 0.45)); }
}

/* Hero cash glitch animation */
.hero-cash-glitch { animation: cashGlitchMove 3s ease-in-out infinite, sceneFlicker 3s ease infinite; display: inline-block; }

@keyframes cashGlitchMove {
  0%, 70% { transform: translate(0, 0) skew(0); filter: none; }
  71% { transform: translate(12px, -5px) skewX(-8deg); filter: hue-rotate(90deg) brightness(2) saturate(3); }
  72% { transform: translate(-15px, 6px) skewX(10deg); filter: hue-rotate(-60deg) brightness(0.4); }
  73% { transform: translate(8px, -3px) skewX(-5deg) scaleX(1.1); filter: brightness(3) saturate(4) hue-rotate(120deg); }
  74% { transform: translate(-10px, 8px) skewX(12deg) scaleY(0.9); filter: hue-rotate(-120deg) brightness(0.3); }
  75% { transform: translate(18px, 0) skewX(-12deg); filter: brightness(4) contrast(2); }
  76% { transform: translate(-6px, -8px) skewX(6deg); filter: hue-rotate(180deg) brightness(1.5); }
  77% { transform: translate(0, 0) skew(0); filter: none; }
  85% { transform: translate(0, 0) skew(0); filter: none; }
  86% { transform: translate(-10px, 3px) skewX(8deg); filter: brightness(0.2) hue-rotate(-90deg); }
  87% { transform: translate(15px, -5px) skewX(-14deg) scaleX(0.9); filter: saturate(5) brightness(3); }
  88% { transform: translate(-18px, 2px) skewX(10deg); filter: hue-rotate(240deg) brightness(2); }
  89% { transform: translate(8px, -8px) skewX(-6deg); filter: brightness(5) contrast(3); }
  90% { transform: translate(-4px, 4px) skewX(4deg); filter: hue-rotate(60deg); }
  91% { transform: translate(0, 0) skew(0); filter: none; }
}

@keyframes sceneFlicker {
  0%, 100% { opacity: 1; }
  71% { opacity: 1; } 71.5% { opacity: 0; } 72% { opacity: 0.7; } 72.5% { opacity: 0; }
  73% { opacity: 1; } 73.5% { opacity: 0.1; } 74% { opacity: 0.8; } 75% { opacity: 0; } 75.5% { opacity: 1; }
  86% { opacity: 1; } 86.5% { opacity: 0; } 87% { opacity: 0.5; } 87.5% { opacity: 0; }
  88% { opacity: 1; } 88.5% { opacity: 0; } 89% { opacity: 0.6; } 89.5% { opacity: 1; }
}

/* -- Rex Mascot -- */
.rex-mascot { display: block; max-width: 220px; height: auto; filter: drop-shadow(0 0 20px rgba(245,158,11,0.3)); animation: rexFloat 4s ease-in-out infinite; }
.rex-mascot:hover { animation-play-state: paused; transform: scale(1.05) rotate(-2deg); }
.rex-mascot-big { max-width: 280px !important; }
@keyframes rexFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.rex-section { max-width: 200px; margin: 0 auto; }
.rex-cta { max-width: 220px; }
@keyframes rexFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.cta-with-rex { display: flex; align-items: center; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.cta-with-rex .cta-text { text-align: center; }

/* -- Responsive -- */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .asset-scanner { height: 400px; max-width: 400px; }
  .orbit-label { font-size: 0.55rem; padding: 3px 7px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-primary); border-bottom: 1px solid var(--border); padding: 1rem; }
  .nav-mobile-toggle { display: block; }
  .hero-stats { flex-direction: column; gap: 1.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .demo-modules { grid-template-columns: 1fr; }
  .asset-scanner { height: 340px; max-width: 340px; }
  .asset-hub-ring--outer { width: 340px; height: 340px; }
  .asset-hub-ring--mid { width: 260px; height: 260px; }
  .asset-hub-ring--inner { width: 190px; height: 190px; }
  .orbit-label { font-size: 0.5rem; padding: 2px 6px; }
  .broker-grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
  .ops-demo-grid { grid-template-columns: 1fr; }
  .ops-demo-radar { max-width: 280px; margin: 0 auto; }
  .rex-mascot { max-width: 140px; }
  .rex-cta { max-width: 160px; }
  .cta-with-rex { gap: 1.5rem; }
}
