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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-terminal: #0d0d14;
  --border: #1e1e2e;
  --text: #e0e0e8;
  --text-dim: #8888a0;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --green: #00e676;
  --cyan: #00e5ff;
  --yellow: #ffd600;
  --red: #ff5252;
  --orange: #ff9100;
  --font: "SF Mono", "Fira Code", "Cascadia Code", "JetBrains Mono", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  top: -200px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: rgba(108, 92, 231, 0.12);
}
.orb-2 {
  bottom: -200px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: rgba(0, 230, 118, 0.06);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent-light);
  text-decoration: none;
}
a:hover {
  color: #fff;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

code {
  font-family: var(--font);
  font-size: 0.85em;
  background: rgba(108, 92, 231, 0.15);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-light);
}

.accent {
  color: var(--accent-light);
}

.section-sub {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  color: #000;
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-light);
  color: #000;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}
.btn-ghost {
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}
.btn-ghost:hover {
  background: rgba(0, 230, 118, 0.1);
  border-color: var(--green);
  color: var(--green);
}

/* === Header === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.logo:hover {
  color: var(--text);
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
nav a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
}
nav a:hover {
  color: var(--text);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: 0.2s;
}

/* === Hero === */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
}

.badge-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(108, 92, 231, 0.3);
}

.badge-green {
  background: rgba(0, 230, 118, 0.1);
  color: var(--green);
  border-color: rgba(0, 230, 118, 0.3);
}

.badge-inline {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  vertical-align: middle;
  margin-left: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 650px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* === Stats Bar === */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* === Terminal === */
.terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green { background: var(--green); }

.terminal-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.terminal pre {
  padding: 1.2rem;
  overflow-x: auto;
}

.terminal code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
}

.hero-terminal {
  max-width: 650px;
  margin: 0 auto;
}

.t-gray { color: var(--text-dim); }
.t-green { color: var(--green); }
.t-cyan { color: var(--cyan); }
.t-yellow { color: var(--yellow); }
.t-white { color: #fff; font-weight: 600; }

/* === Grids === */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.card code {
  font-size: 0.78rem;
  display: block;
}

/* === Sections === */
section {
  padding: 5rem 0;
}

.features {
  border-top: 1px solid var(--border);
}

.install {
  border-top: 1px solid var(--border);
  background: rgba(108, 92, 231, 0.02);
}

/* === Steps === */
.steps {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.step-content p {
  color: var(--text-dim);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.step-content .terminal {
  margin-top: 0.5rem;
}

/* === Clawlancer === */
.clawlancer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.02) 0%, transparent 100%);
}

.clawlancer-flow {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.flow-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.flow-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.flow-step h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.flow-step p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* === Reputation Tiers === */
.reputation-section {
  border-top: 1px solid var(--border);
}

.tiers {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.tier {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  width: 170px;
  transition: transform 0.2s, border-color 0.2s;
}
.tier:hover {
  transform: translateY(-3px);
}

.tier-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  margin: 0 auto 0.8rem;
}

.tier h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.tier p {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.tier span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.tier-bronze .tier-icon {
  background: rgba(180, 130, 80, 0.2);
  color: #cd7f32;
  border: 2px solid rgba(180, 130, 80, 0.4);
}
.tier-bronze:hover { border-color: #cd7f32; }

.tier-silver .tier-icon {
  background: rgba(192, 192, 192, 0.15);
  color: #c0c0c0;
  border: 2px solid rgba(192, 192, 192, 0.4);
}
.tier-silver:hover { border-color: #c0c0c0; }

.tier-gold .tier-icon {
  background: rgba(255, 215, 0, 0.15);
  color: var(--yellow);
  border: 2px solid rgba(255, 215, 0, 0.4);
}
.tier-gold:hover { border-color: var(--yellow); }

.tier-platinum .tier-icon {
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
  border: 2px solid rgba(0, 229, 255, 0.3);
}
.tier-platinum:hover { border-color: var(--cyan); }

.tier-diamond .tier-icon {
  background: rgba(162, 155, 254, 0.15);
  color: var(--accent-light);
  border: 2px solid rgba(162, 155, 254, 0.4);
}
.tier-diamond:hover { border-color: var(--accent-light); }

/* === Commands === */
.commands {
  border-top: 1px solid var(--border);
}

.cmd-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.cmd-group h3 {
  font-size: 0.95rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.cmd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 1rem;
}
.cmd:last-child {
  border-bottom: none;
}

.cmd code {
  font-size: 0.82rem;
  white-space: nowrap;
}

.cmd span {
  color: var(--text-dim);
  font-size: 0.82rem;
  text-align: right;
}

/* === Architecture === */
.architecture {
  border-top: 1px solid var(--border);
}

.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.arch-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  text-align: center;
  min-width: 140px;
}
.arch-node.highlight {
  border-color: var(--accent);
  background: rgba(108, 92, 231, 0.1);
}

.arch-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.arch-desc {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.arch-arrow {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 300;
}

/* === CTA === */
.cta {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(108, 92, 231, 0.04) 0%, transparent 100%);
  text-align: center;
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-links a:hover {
  color: var(--text);
}

/* === Responsive === */
@media (max-width: 768px) {
  .mobile-menu {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.8rem;
  }
  nav.open {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

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

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

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .stats-bar {
    gap: 1.5rem;
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tiers {
    flex-direction: column;
    align-items: center;
  }

  .tier {
    width: 100%;
    max-width: 280px;
  }

  .arch-flow {
    flex-direction: column;
  }

  .arch-arrow {
    transform: rotate(90deg);
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cmd {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .badge-row {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .terminal code {
    font-size: 0.75rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }
}
