:root {
  --bg: #0e0d13;
  --bg2: #141320;
  --line: rgba(245, 158, 11, 0.11);
  --text: #f4eeff;
  --muted: rgba(244, 238, 255, 0.60);
  --subtle: rgba(244, 238, 255, 0.36);
  --accent: #f59e0b;
  --accent-b: #8b5cf6;
  --warm: #f97316;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Ambient canvas ───────────────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.028;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.9) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 35%, rgba(255,255,255,.7) 0 1px, transparent 1px),
    radial-gradient(circle at 45% 80%, rgba(255,255,255,.75) 0 1px, transparent 1px);
  background-size: 160px 160px;
}

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  background: rgba(14, 13, 19, 0.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  position: relative;
  flex-shrink: 0;
}

.nav-mark::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid rgba(14, 13, 19, 0.55);
}

.nav-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-by {
  font-size: 12px;
  color: var(--subtle);
  font-weight: 500;
}

.btn-nav {
  padding: 7px 18px;
  border-radius: 100px;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  color: #0e0d13;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
}

.btn-nav:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 120px 44px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-inner { max-width: 560px; }

.hero-eyebrow { margin-bottom: 24px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
  letter-spacing: 0.03em;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 22px;
}

.grad {
  background: linear-gradient(135deg, #f59e0b 0%, #e879f9 55%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  color: #0e0d13;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: filter 0.18s, transform 0.18s;
  letter-spacing: 0.01em;
}

.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.07);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 10px;
}

.stat-sep {
  width: 1px;
  height: 32px;
  background: var(--line);
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--subtle);
  font-weight: 500;
}

.hero-graph {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 480px;
  justify-self: center;
}

#mini-graph {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(16, 14, 24, 0.65);
  backdrop-filter: blur(4px);
}

/* ── Feature sections ────────────────────────────────────────────────── */
.feature-section {
  position: relative;
  z-index: 2;
  padding: 100px 44px;
  border-top: 1px solid var(--line);
}

.feature-section.alt {
  background: rgba(16, 14, 26, 0.5);
}

.feature-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.feature-inner.reverse { direction: rtl; }
.feature-inner.reverse > * { direction: ltr; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 100px;
  padding: 3px 12px;
  margin-bottom: 18px;
}

.tag.accent-b { color: var(--accent-b); border-color: rgba(139, 92, 246, 0.25); }

.feature-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.15;
}

.feature-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.feature-desc strong { color: var(--text); }

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.bullet {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Tribes preview card */
.tribes-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-tribe {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 14, 24, 0.65);
  backdrop-filter: blur(8px);
  transition: border-color 0.18s;
}

.preview-tribe:hover { border-color: rgba(245, 158, 11, 0.28); }

.preview-tribe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.preview-tribe-name {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.preview-tribe-count {
  font-family: 'Space Grotesk', monospace;
  font-size: 20px;
  font-weight: 700;
}

/* SIGNAL preview */
.signal-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-signal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(16, 14, 24, 0.55);
  transition: all 0.18s;
}

.preview-signal-item:hover {
  border-color: rgba(139, 92, 246, 0.30);
  background: rgba(139, 92, 246, 0.05);
}

.preview-signal-rank {
  font-size: 12px;
  font-weight: 800;
  color: var(--subtle);
  min-width: 20px;
  font-family: 'Space Grotesk', monospace;
}

.preview-signal-rank.top { color: var(--accent); }

.preview-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #0e0d13;
  flex-shrink: 0;
}

.preview-signal-info { flex: 1; }

.preview-signal-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.preview-signal-role {
  font-size: 11px;
  color: var(--muted);
}

.preview-signal-bar {
  min-width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}

.preview-signal-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b5cf6, #e879f9);
}

/* Metric grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.metric {
  padding: 14px 16px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.05);
}

.metric-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-b);
  margin-bottom: 5px;
}

.metric-desc {
  font-size: 11px;
  color: var(--subtle);
  line-height: 1.4;
}

/* ── How it works ────────────────────────────────────────────────────── */
.how-section {
  position: relative;
  z-index: 2;
  padding: 100px 44px;
  border-top: 1px solid var(--line);
}

.how-inner { max-width: 780px; margin: 0 auto; }

.section-header-center { text-align: center; margin-bottom: 60px; }

.how-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}

.how-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}

.steps { display: flex; flex-direction: column; }

.step {
  display: flex;
  gap: 24px;
  padding: 24px 0;
}

.step-line {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin-left: 22px;
}

.step-num {
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-width: 32px;
  padding-top: 3px;
  letter-spacing: 0.04em;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.step-desc code {
  color: var(--accent);
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  background: rgba(245, 158, 11, 0.09);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ── Install ─────────────────────────────────────────────────────────── */
.install-section {
  position: relative;
  z-index: 2;
  padding: 100px 44px;
  border-top: 1px solid var(--line);
}

.install-inner { max-width: 660px; margin: 0 auto; }

.install-card {
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(16, 14, 24, 0.72);
  backdrop-filter: blur(12px);
  text-align: center;
}

.install-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.install-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}

.install-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-bottom: 36px;
}

.install-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.install-step code {
  color: var(--accent);
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  background: rgba(245, 158, 11, 0.09);
  padding: 1px 5px;
  border-radius: 4px;
}

.install-step strong { color: var(--text); }

.istep-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  color: #0e0d13;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-install {
  display: inline-block;
  padding: 13px 36px;
  border-radius: 100px;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  color: #0e0d13;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: filter 0.18s, transform 0.18s;
  margin-bottom: 18px;
}

.btn-install:hover { filter: brightness(1.08); transform: translateY(-2px); }

.install-note {
  font-size: 11px;
  color: var(--subtle);
  font-weight: 500;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 28px 44px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b, #8b5cf6);
  position: relative;
}

.footer-mark::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(14, 13, 19, 0.5);
}

.footer-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.footer-meta { text-align: right; }

.footer-by {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 3px;
}

.footer-copy {
  font-size: 11px;
  color: var(--subtle);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; padding: 100px 20px 60px; }
  .hero-graph { max-width: 100%; aspect-ratio: 4/3; }
  .feature-section { padding: 70px 20px; }
  .feature-inner { grid-template-columns: 1fr; gap: 50px; }
  .feature-inner.reverse { direction: ltr; }
  .how-section { padding: 70px 20px; }
  .install-section { padding: 70px 20px; }
  .install-card { padding: 28px 22px; }
  .metric-grid { grid-template-columns: 1fr; }
  .footer { padding: 22px 20px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-meta { text-align: center; }
}
