@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@300;400;500&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg-void: #030508;
  --bg-deep: #070b12;
  --bg-surface: #0d1420;
  --bg-elevated: #111a2b;
  --bg-card: #0f1825;
  --bg-card-hover: #141f30;

  --border-subtle: rgba(30, 60, 100, 0.35);
  --border-active: rgba(56, 130, 220, 0.5);
  --border-glow: rgba(56, 130, 220, 0.8);

  --accent-primary: #2b7fff;
  --accent-secondary: #1a5fd4;
  --accent-tertiary: #0f3d8c;
  --accent-glow: rgba(43, 127, 255, 0.15);
  --accent-bright: #5aa3ff;
  --accent-cyan: #00d4ff;
  --accent-teal: #00b4d8;

  --text-primary: #e8edf5;
  --text-secondary: #8fa3be;
  --text-muted: #4a6080;
  --text-accent: #2b7fff;

  --success: #00c896;
  --warning: #f59e0b;
  --danger: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(43,127,255,0.12);

  --font-display: 'Syne', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.15; }

.text-mono { font-family: var(--font-mono); }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 840px; margin: 0 auto; padding: 0 24px; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(3, 5, 8, 0.8);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

nav.scrolled {
  background: rgba(3, 5, 8, 0.95);
  border-bottom-color: var(--border-active);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(43,127,255,0.4);
}

.nav-logo-icon svg { width: 18px; height: 18px; fill: white; }

.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.nav-logo-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  display: block;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.nav-links a.active { color: var(--accent-bright); }

.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(43,127,255,0.25);
}

.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: 0 0 30px rgba(43,127,255,0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: var(--bg-elevated);
}

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

.btn-outline:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 20px rgba(43,127,255,0.2);
}

.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-md); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.badge-blue {
  background: rgba(43,127,255,0.1);
  border-color: rgba(43,127,255,0.3);
  color: var(--accent-bright);
}

.badge-cyan {
  background: rgba(0,212,255,0.08);
  border-color: rgba(0,212,255,0.25);
  color: var(--accent-cyan);
}

.badge-green {
  background: rgba(0,200,150,0.08);
  border-color: rgba(0,200,150,0.25);
  color: var(--success);
}

.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition-slow);
}

.card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* ── SECTION STYLES ── */
.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

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

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: 0;
}

/* ── GLOW ORBS (background decorations) ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}

.orb-blue { background: radial-gradient(circle, #1a4d99, transparent 70%); }
.orb-cyan { background: radial-gradient(circle, #004466, transparent 70%); }

/* ── GRID BACKGROUND ── */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(43,127,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43,127,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ── FOOTER ── */
footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.footer-links h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links ul { list-style: none; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── STATS BAR ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-item {
  background: var(--bg-surface);
  padding: 28px 24px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── PROTOCOL LOGOS ── */
.protocol-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.protocol-tag:hover {
  border-color: var(--border-active);
  color: var(--accent-bright);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes scanline {
  0% { top: 0; }
  100% { top: 100%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-fade-up { animation: fadeUp 0.6s ease forwards; }
.animate-fade-in { animation: fadeIn 0.6s ease forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── MOBILE NAV TOGGLE ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links, .nav-actions {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 24px;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  .nav-links.open, .nav-actions.open { display: flex; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

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