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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #e6edf3;
  background: #0a0a0f;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #58a6ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e2430;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-brand {
  font-size: 1.125rem;
  font-weight: 600;
  color: #e6edf3;
  letter-spacing: -0.01em;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: #8b949e;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #e6edf3;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #8b949e;
  cursor: pointer;
  padding: 0.25rem;
}

/* Hero */
.hero {
  padding: 5rem 0 4.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(88, 166, 255, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 30% 10%, rgba(63, 185, 80, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 70% 10%, rgba(210, 168, 255, 0.04) 0%, transparent 60%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid #1e2430;
  background: rgba(22, 27, 34, 0.6);
  font-size: 0.8125rem;
  color: #8b949e;
  margin-bottom: 1.5rem;
}

.hero-badge span {
  color: #3fb950;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  color: #8b949e;
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.btn-primary {
  background: #58a6ff;
  color: #0a0a0f;
}

.btn-primary:hover {
  background: #79b8ff;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: #e6edf3;
  border-color: #30363d;
}

.btn-secondary:hover {
  border-color: #8b949e;
  text-decoration: none;
}

/* Terminal block */
.terminal {
  background: #0d1117;
  border: 1px solid #1e2430;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #161b22;
  border-bottom: 1px solid #1e2430;
}

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

.terminal-title {
  font-size: 0.75rem;
  color: #8b949e;
  margin-left: 0.5rem;
}

.terminal pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #e6edf3;
}

.terminal .prompt {
  color: #8b949e;
}

.terminal .comment {
  color: #6e7681;
}

.terminal .output {
  color: #8b949e;
}

.terminal .highlight {
  color: #58a6ff;
}

.terminal .green {
  color: #3fb950;
}

.terminal .purple {
  color: #d2a8ff;
}

/* Section headings */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: #8b949e;
  max-width: 600px;
  margin-bottom: 3rem;
}

.section-center {
  text-align: center;
}

.section-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* Principles row */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid #1e2430;
}

.principle {
  text-align: center;
}

.principle-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.375rem;
}

.principle p {
  color: #8b949e;
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-green { color: #3fb950; }
.text-blue { color: #58a6ff; }
.text-purple { color: #d2a8ff; }
.text-muted { color: #6e7681; }

/* Problem section */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Cards */
.card {
  background: #161b22;
  border: 1px solid #1e2430;
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: #30363d;
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

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

.card p {
  color: #8b949e;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.card .tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1875rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.tag-green {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.1);
}

.tag-purple {
  color: #d2a8ff;
  background: rgba(210, 168, 255, 0.1);
}

.tag-blue {
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
}

/* Layer cards */
.layers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card-green {
  border-color: rgba(63, 185, 80, 0.2);
}

.card-green:hover {
  border-color: rgba(63, 185, 80, 0.4);
}

.card-green .card-icon {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
}

.card-purple {
  border-color: rgba(210, 168, 255, 0.2);
}

.card-purple:hover {
  border-color: rgba(210, 168, 255, 0.4);
}

.card-purple .card-icon {
  background: rgba(210, 168, 255, 0.1);
  color: #d2a8ff;
}

.card-blue {
  border-color: rgba(88, 166, 255, 0.2);
}

.card-blue:hover {
  border-color: rgba(88, 166, 255, 0.4);
}

.card-blue .card-icon {
  background: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
}

/* Pipeline */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pipeline-step {
  background: #161b22;
  border: 1px solid #1e2430;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 120px;
}

.pipeline-step strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.pipeline-step span {
  font-size: 0.8125rem;
  color: #8b949e;
}

.pipeline-step .step-note {
  display: block;
  font-size: 0.6875rem;
  color: #3fb950;
  margin-top: 0.25rem;
}

.pipeline-arrow {
  color: #30363d;
  font-size: 1.25rem;
  padding: 0 0.5rem;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Contrast section (alternating bg) */
.section-alt {
  background: #0d1117;
}

/* Getting started */
.steps {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

.step-content {
  min-width: 0;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 2rem;
  margin-bottom: 0.5rem;
}

.step-content p {
  color: #8b949e;
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.step-content code {
  display: block;
  background: #0d1117;
  border: 1px solid #1e2430;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: #e6edf3;
  overflow-x: auto;
}

/* Query showcase */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.showcase-text h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.showcase-text p {
  color: #8b949e;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.showcase-text ul {
  list-style: none;
  padding: 0;
}

.showcase-text li {
  color: #8b949e;
  font-size: 0.9375rem;
  padding: 0.25rem 0;
}

.showcase-text li::before {
  content: "\2192 ";
  color: #58a6ff;
}

/* Footer */
.footer {
  border-top: 1px solid #1e2430;
  padding: 2.5rem 0;
  text-align: center;
  color: #8b949e;
  font-size: 0.8125rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #8b949e;
  font-size: 0.8125rem;
}

.footer-links a:hover {
  color: #e6edf3;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid #1e2430;
  margin: 0;
}

/* Mobile */
@media (max-width: 768px) {
  section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.98);
    border-bottom: 1px solid #1e2430;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

  .pipeline {
    flex-direction: column;
  }

  .pipeline-arrow {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }

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

@media (max-width: 480px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

/* Benchmark table */
.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.benchmark-table th,
.benchmark-table td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.benchmark-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.benchmark-table td:nth-child(3),
.benchmark-table td:nth-child(4),
.benchmark-table td:nth-child(5),
.benchmark-table th:nth-child(3),
.benchmark-table th:nth-child(4),
.benchmark-table th:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.benchmark-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

.benchmark-table tfoot td {
  border-top: 2px solid var(--border);
  padding-top: 0.8rem;
}

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

@media (max-width: 768px) {
  .benchmark-table {
    font-size: 0.85rem;
  }
  .benchmark-table th,
  .benchmark-table td {
    padding: 0.5rem 0.6rem;
  }
  .benchmark-notes {
    grid-template-columns: 1fr;
  }
}
