/* ========================================
   Hivemind — Marketing Site Styles
   ======================================== */

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

:root {
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --primary: #6366f1;
  --accent: #f59e0b;
  --teal: #06b6d4;
  --text: #e8e8e8;
  --text-muted: #888;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(99, 102, 241, 0.4);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --section-pad: clamp(60px, 10vw, 120px);
  --container-max: 1200px;
  --card-radius: 16px;
  --glow: 0 0 30px rgba(99, 102, 241, 0.1), 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition: all 0.4s ease;
}

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

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.8;
}

img, svg {
  display: block;
  max-width: 100%;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Utility */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 48px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #0a0a0f;
}

.btn-primary:hover {
  opacity: 1;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.3), 0 0 80px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.btn-glow {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  opacity: 1;
  border-color: var(--border-hover);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

/* Body scroll lock (mobile menu) */
body.no-scroll {
  overflow: hidden;
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Hero Terminal */
.hero-terminal {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  box-shadow: var(--glow), 0 40px 80px rgba(0, 0, 0, 0.5);
  transform: rotateX(2deg);
  transition: transform 0.6s ease;
}

.hero-terminal:hover {
  transform: rotateX(0deg);
}

.hero-terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.hero-terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero-terminal-dot:nth-child(1) { background: #ff5f57; }
.hero-terminal-dot:nth-child(2) { background: #ffbd2e; }
.hero-terminal-dot:nth-child(3) { background: #28c840; }

.hero-terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 44px;
}

.hero-terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  min-height: 200px;
}

.hero-terminal-body .line {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-terminal-body .line.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-terminal-body .prompt {
  color: var(--accent);
}

.hero-terminal-body .cmd {
  color: var(--text);
}

.hero-terminal-body .output {
  color: var(--text-muted);
}

.hero-terminal-body .success {
  color: #22c55e;
}

.hero-terminal-body .cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

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

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 15, 0.9);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.nav-by {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-by a {
  color: var(--text-muted);
}

.nav-by a:hover {
  color: var(--primary);
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

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

.github-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.github-badge:hover {
  color: var(--text);
  border-color: var(--border-hover);
  opacity: 1;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

/* Hamburger → X animation */
.nav.menu-open .nav-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav.menu-open .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-nav--open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav a {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.3s, opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateY(12px);
}

.mobile-nav--open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav a:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav a:nth-child(2) { transition-delay: 0.1s; }
.mobile-nav a:nth-child(3) { transition-delay: 0.15s; }

.mobile-nav a:hover {
  color: var(--primary);
  opacity: 1;
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 60px;
}

.hero-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-platforms {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 60px;
}

.platform-icons {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 12px;
}

/* Floating Screenshot */
.hero-visual {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  perspective: 1000px;
}

.hero-screenshot-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  box-shadow: var(--glow), 0 40px 80px rgba(0, 0, 0, 0.5);
  transform: rotateX(4deg) rotateY(0deg);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.hero-screenshot-frame:hover {
  transform: rotateX(0deg) rotateY(0deg);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.12), 0 0 120px rgba(99, 102, 241, 0.04), 0 40px 80px rgba(0, 0, 0, 0.5);
}

/* Top-edge highlight line (Linear-style) */
.hero-screenshot-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
  z-index: 1;
}

.hero-screenshot-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(6, 182, 212, 0.03));
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
  transition: opacity 0.3s ease;
}

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

/* ========================================
   Features
   ======================================== */

.features {
  position: relative;
  z-index: 2;
  padding: var(--section-pad) 0;
  text-align: center;
}

.features::after {
  content: '';
  display: block;
  width: 200px;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.2;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Primary Feature Showcases */
.features-primary {
  margin: 60px 0;
}

.feature-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}

.feature-showcase:last-child {
  margin-bottom: 0;
}

.feature-visual {
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.feature-showcase:hover .feature-visual {
  border-color: var(--border-hover);
  box-shadow: var(--glow);
}

.feature-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.02), rgba(6, 182, 212, 0.02));
}

.feature-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ---- Feature Mock Shared ---- */
.mc-prompt { color: var(--accent); }
.mc-dim { color: #64748b; }
.mc-success { color: #22c55e; }
.mc-amber { color: var(--accent); }
.mc-red { color: #ef4444; }
.mc-green { color: #22c55e; }
.mc-indigo { color: var(--primary); }
.mc-cursor {
  display: inline-block;
  width: 6px;
  height: 13px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

.mock-pane-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
}

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

.mock-dot.red { background: #ff5f57; }
.mock-dot.yellow { background: #ffbd2e; }
.mock-dot.green { background: #28c840; }

.mock-pane-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
}

.mock-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.mock-badge.running {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.mock-badge.idle {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mock-pane-body {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
}

/* ---- Mock: Agent Grid ---- */
.mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  aspect-ratio: 16 / 10;
}

.mock-pane {
  background: rgba(15, 15, 25, 0.9);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ---- Mock: Git Diff ---- */
.mock-git {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: rgba(15, 15, 25, 0.9);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  font-family: var(--font-mono);
  font-size: 11px;
}

.mock-git-sidebar {
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.mock-git-header {
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.mock-git-count {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.mock-git-section {
  padding: 8px 0;
}

.mock-git-section-title {
  padding: 2px 12px 6px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mock-git-file {
  padding: 4px 12px;
  color: var(--text-muted);
  cursor: default;
}

.mock-git-file.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  border-left: 2px solid var(--primary);
}

.mock-git-file.staged {
  color: #64748b;
}

.mock-git-commit {
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.mock-git-input {
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 6px;
  font-size: 10px;
}

.mock-git-btn {
  padding: 5px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
}

.mock-git-diff {
  display: flex;
  flex-direction: column;
}

.mock-diff-bar {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 11px;
}

.mock-diff-lines {
  padding: 8px 0;
  flex: 1;
}

.mock-diff-line {
  padding: 1px 12px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
}

.mock-diff-line.add {
  background: rgba(34, 197, 94, 0.06);
  color: #86efac;
}

.mock-diff-line.del {
  background: rgba(239, 68, 68, 0.06);
  color: #fca5a5;
}

.mock-diff-line.ctx {
  color: #475569;
}

/* ---- Mock: MCP Integration ---- */
.mock-mcp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 12px;
  background: rgba(15, 15, 25, 0.9);
  border-radius: 8px;
  aspect-ratio: 16 / 10;
}

.mock-mcp-lead {
  width: 85%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.03);
}

.mock-mcp-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  color: var(--primary);
}

.mock-mcp-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mock-mcp-agents {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mock-mcp-agent {
  flex: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.3);
}

.mock-mcp-agent-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mock-mcp-agent-status {
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.feature-content {
  text-align: left;
}

.feature-content h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 16px;
}

.feature-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Secondary Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 80px 0 60px;
}

.feature-card {
  position: relative;
  padding: 32px;
  border-radius: var(--card-radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  text-align: left;
  transition: var(--transition);
  transform-style: preserve-3d;
}

/* Subtle top-edge gradient line on cards */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
  border-radius: 1px;
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.feature-icon[data-color="cyan"] {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
}

.feature-icon[data-color="green"] {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.06);
}

.feature-icon[data-color="purple"] {
  color: var(--teal);
  background: rgba(6, 182, 212, 0.06);
}

.feature-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Tech Stack Strip */
.tech-stack {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.tech-item {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
  animation: float 6s ease-in-out infinite;
}

.tech-item:nth-child(2) { animation-delay: 0.5s; }
.tech-item:nth-child(3) { animation-delay: 1s; }
.tech-item:nth-child(4) { animation-delay: 1.5s; }
.tech-item:nth-child(5) { animation-delay: 2s; }
.tech-item:nth-child(6) { animation-delay: 2.5s; }

.tech-item:hover {
  border-color: var(--border-hover);
  color: var(--primary);
}

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

/* ========================================
   How It Works
   ======================================== */

.how-it-works {
  position: relative;
  z-index: 2;
  padding: var(--section-pad) 0;
  text-align: center;
}

.how-it-works::after {
  content: '';
  display: block;
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.2;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
  position: relative;
}

.step {
  position: relative;
  padding: 32px 24px;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  border: 2px solid var(--primary);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.step-connector {
  position: absolute;
  top: 56px;
  left: calc(50% + 32px);
  width: calc(100% - 16px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.3;
}

.step:last-child .step-connector {
  display: none;
}

.step h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========================================
   Download
   ======================================== */

.download {
  position: relative;
  z-index: 2;
  padding: var(--section-pad) 0;
  text-align: center;
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0 32px;
}

.download-card {
  padding: 40px 28px;
  border-radius: var(--card-radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.download-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

.download-card--detected {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.12), 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}

.download-card--detected::after {
  content: 'Detected';
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.06);
}

.download-icon {
  color: var(--text-muted);
  margin: 0 auto 20px;
  width: 40px;
  height: 40px;
}

.download-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.download-arch {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download-buttons .btn {
  justify-content: center;
}

.download-github {
  margin-top: 24px;
}

.download-github a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.download-github a:hover {
  color: var(--primary);
  opacity: 1;
}

/* ========================================
   Newsletter
   ======================================== */

.newsletter {
  position: relative;
  z-index: 2;
  padding: 48px 0;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 40px;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
}

.newsletter-text h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.newsletter-text p {
  font-size: 13px;
  color: var(--text-muted);
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input[type="email"] {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  min-width: 240px;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--border-hover);
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.newsletter-success {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  position: relative;
  z-index: 2;
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.footer-by {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-by a {
  color: var(--text-muted);
}

.footer-by a:hover {
  color: var(--primary);
  opacity: 1;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color 0.3s;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 968px) {
  .feature-showcase {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-content {
    text-align: center;
  }

  .mock-git {
    grid-template-columns: 140px 1fr;
  }

  .mock-grid {
    font-size: 9px;
  }

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

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

  .step-connector {
    display: none;
  }

  .download-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

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

  .nav-toggle {
    display: flex;
  }

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

  .nav.menu-open .nav-inner {
    flex-wrap: wrap;
  }

  .nav.menu-open .nav-links {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
  }

  .nav.menu-open .nav-actions {
    order: 4;
    width: 100%;
    padding-bottom: 8px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .newsletter-inner {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-form input[type="email"] {
    min-width: unset;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   Scroll Animations
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in[data-direction="left"] {
  transform: translateX(-40px);
}

.fade-in[data-direction="right"] {
  transform: translateX(40px);
}

.fade-in[data-direction="left"].visible,
.fade-in[data-direction="right"].visible {
  transform: translateX(0);
}

/* Staggered fade-in for grid items */
.features-grid .feature-card:nth-child(2) { transition-delay: 0.08s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.16s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.24s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.32s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.4s; }

.steps .step:nth-child(2) { transition-delay: 0.1s; }
.steps .step:nth-child(3) { transition-delay: 0.2s; }
.steps .step:nth-child(4) { transition-delay: 0.3s; }

/* Focus styles (a11y) */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  #bg-canvas {
    display: none;
  }
}
