:root {
  --bg: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #1a1a25;
  --fg: #e8e8ed;
  --fg-muted: #8888a0;
  --fg-dim: #55556a;
  --accent: #00e599;
  --accent-dim: rgba(0, 229, 153, 0.12);
  --accent-glow: rgba(0, 229, 153, 0.25);
  --red: #ff4d4d;
  --yellow: #ffd700;
  --green: #00e599;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Fira Code', monospace;
  --radius: 8px;
  --max-width: 1120px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2s infinite;
}

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

.label-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

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

.hero-lede {
  font-size: 1.125rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--bg-elevated);
}

/* ===== TERMINAL ===== */
.hero-terminal {
  background: var(--bg-surface);
  border: 1px solid var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.03);
}

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

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

.terminal-dot.red { background: var(--red); opacity: 0.7; }
.terminal-dot.yellow { background: var(--yellow); opacity: 0.7; }
.terminal-dot.green { background: var(--green); opacity: 0.7; }

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

.terminal-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.terminal-body code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--fg);
  white-space: pre;
  min-height: 1.2em;
}

.code-comment { color: var(--fg-dim); }
.code-keyword { color: #c792ea; }
.code-string { color: var(--accent); }
.code-number { color: #f78c6c; }

/* ===== PROTOCOL ===== */
.protocol {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8rem 2rem;
}

.protocol-header {
  margin-bottom: 4rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}

.protocol-header h2,
.features-header h2,
.closing h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.protocol-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--bg-elevated);
  line-height: 1;
}

.step-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step-content p {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 1rem;
}

.step-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent-dim);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.step-endpoint .method {
  color: var(--accent);
  font-weight: 500;
}

.step-endpoint .path {
  color: var(--fg-muted);
}

.step-connector {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--bg-elevated), transparent);
  margin-left: 39px;
}

/* ===== FEATURES ===== */
.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
}

.features-header {
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-elevated);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: rgba(0, 229, 153, 0.2);
}

.feature-large {
  grid-column: span 3;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 0 2rem;
  padding: 2.5rem;
}

.feature-large .feature-icon {
  grid-row: span 2;
  font-size: 2.5rem;
  align-self: start;
}

.feature-icon {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 6px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ===== CLOSING ===== */
.closing {
  padding: 6rem 2rem;
  text-align: center;
}

.closing-content {
  max-width: 720px;
  margin: 0 auto;
}

.closing-rule {
  width: 64px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 2.5rem;
  opacity: 0.5;
}

.closing-rule:last-child {
  margin: 2.5rem auto 0;
}

.closing h2 {
  margin-bottom: 1.5rem;
}

.closing-text {
  color: var(--fg-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--bg-elevated);
  padding: 2rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--fg-dim);
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--fg-dim);
}

.footer-meta a {
  color: var(--accent);
  text-decoration: none;
}

.footer-meta a:hover {
  text-decoration: underline;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 4rem 1.25rem 3rem;
    min-height: auto;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .stat-divider {
    display: none;
  }

  .protocol {
    padding: 5rem 1.25rem;
  }

  .step {
    grid-template-columns: 50px 1fr;
    gap: 1rem;
  }

  .step-number {
    font-size: 1.75rem;
  }

  .step-connector {
    margin-left: 24px;
  }

  .features {
    padding: 3rem 1.25rem 5rem;
  }

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

  .feature-large {
    grid-column: span 1;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .feature-large .feature-icon {
    grid-row: auto;
  }

  .closing {
    padding: 4rem 1.25rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: 0.25rem;
  }
}