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

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-terminal: #0d1117;
  --surface: #161616;
  --surface-2: #1a1a1a;
  --border: #2a2a2a;
  --border-light: #333;
  --text: #e0e0e0;
  --text-dim: #888;
  --text-muted: #666;
  --accent: #22d3ee;
  --accent-dim: #0e7490;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #f87171;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

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

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: #06b6d4;
}

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

.btn-secondary:hover {
  border-color: var(--text-dim);
  background: var(--surface);
}

/* Terminal */
.terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 14px;
  text-align: left;
}

.terminal-bar {
  background: #161b22;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  color: var(--text-dim);
  font-size: 12px;
  margin-left: 8px;
  font-family: var(--sans);
}

.terminal-body {
  padding: 16px 20px;
  line-height: 1.7;
  overflow-x: auto;
}

.terminal-line {
  white-space: pre;
}

.terminal-output {
  color: var(--text-dim);
  white-space: pre;
  margin-top: 4px;
}

.prompt {
  color: var(--green);
  margin-right: 8px;
  user-select: none;
}

.comment {
  color: var(--text-muted);
}

.dim {
  color: var(--text-muted);
}

.val {
  color: var(--accent);
  font-weight: 600;
}

.gen-label {
  color: var(--accent);
  font-weight: 600;
}

.terminal-sm {
  font-size: 13px;
}

.terminal-sm .terminal-body {
  padding: 12px 16px;
}

/* Hero */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 4px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: #fff;
}

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

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.hero-terminal .terminal-body {
  padding: 20px 24px;
}

.hero-terminal .terminal-line {
  font-size: 16px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-dark {
  background: var(--bg-elevated);
}

.section h2 {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.section-subtitle {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 520px;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 48px;
}

.step {
  display: grid;
  gap: 20px;
}

.step-number {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  background: var(--surface);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  font-weight: 600;
}

.step h3 {
  font-family: var(--mono);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 4px;
}

.step p {
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 16px;
}

/* Quirk Slider */
.quirk-demo {
  max-width: 640px;
}

.quirk-slider-container {
  margin-bottom: 32px;
}

.quirk-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.quirk-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.quirk-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.quirk-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

#quirk-value {
  color: var(--accent);
  font-weight: 600;
}

.quirk-examples {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quirk-example {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  opacity: 0.4;
  transition: all 0.2s ease;
  display: none;
}

.quirk-example.active {
  opacity: 1;
  border-color: var(--accent-dim);
  display: block;
}

.quirk-badge {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}

.quirk-example p {
  font-family: var(--mono);
  font-size: 15px;
  color: #fff;
  margin-bottom: 8px;
}

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

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.feature h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: #fff;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Privacy */
.privacy-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
  align-items: start;
}

.privacy-points {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.privacy-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check {
  color: var(--green);
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

.privacy-point p {
  color: var(--text-dim);
  line-height: 1.5;
}

/* Privacy Diagram */
.privacy-diagram {
  display: flex;
  align-items: center;
  gap: 16px;
}

.diagram-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  flex: 1;
  text-align: center;
}

.diagram-box.local {
  border-color: var(--green);
  border-style: dashed;
}

.diagram-box.remote {
  border-color: var(--text-muted);
  border-style: dashed;
}

.diagram-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.diagram-box.local .diagram-label {
  color: var(--green);
}

.diagram-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.diagram-item {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 4px;
  width: 100%;
}

.diagram-arrow {
  color: var(--text-muted);
  font-size: 14px;
}

.diagram-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.diagram-arrow-right {
  font-size: 18px;
}

/* Sources */
.sources-table {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.source-row {
  display: grid;
  grid-template-columns: 140px 80px 1fr;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 14px;
}

.source-row:last-child {
  border-bottom: none;
}

.source-row.supported {
  background: rgba(74, 222, 128, 0.05);
}

.source-name {
  font-family: var(--mono);
  color: #fff;
  font-weight: 500;
}

.source-status {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
}

.source-status.live {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green);
}

.source-status.planned {
  background: rgba(136, 136, 136, 0.15);
  color: var(--text-muted);
}

.source-how {
  color: var(--text-dim);
  font-size: 13px;
}

/* Install */
.install-steps {
  max-width: 640px;
  margin: 40px 0;
}

.install-cta {
  margin-top: 32px;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

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

.footer-brand {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 14px;
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0 48px;
  }

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

  .hero-tagline {
    font-size: 1.05rem;
  }

  .section {
    padding: 56px 0;
  }

  .section h2 {
    font-size: 1.6rem;
  }

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

  .privacy-layout {
    grid-template-columns: 1fr;
  }

  .privacy-diagram {
    flex-direction: column;
  }

  .diagram-connector {
    flex-direction: row;
    gap: 8px;
  }

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

  .source-row {
    grid-template-columns: 100px 70px 1fr;
    gap: 8px;
    padding: 12px 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .terminal {
    font-size: 12px;
  }

  .terminal-sm {
    font-size: 11px;
  }

  .hero-terminal .terminal-line {
    font-size: 14px;
  }
}

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

  .container {
    padding: 0 16px;
  }

  .source-row {
    grid-template-columns: 1fr 60px;
  }

  .source-how {
    display: none;
  }
}
