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

:root {
  --bg:          #0d1117;
  --bg-alt:      #111820;
  --surface:     #161d27;
  --surface-2:   #1c2433;
  --border:      rgba(255,255,255,0.08);
  --text:        #c8d4e0;
  --text-muted:  #667788;
  --text-bright: #e8f0fa;
  --accent:      #4b9eff;
  --accent-dim:  #2a5a99;
  --accent-glow: rgba(75,158,255,0.15);
  --green:       #3dd68c;
  --yellow:      #e5b94e;
  --radius:      10px;
  --nav-h:       56px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: #aadeff;
}

/* ── Nav ──────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-bright);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-bright); text-decoration: none; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn-primary,
.btn-outline,
.btn-ghost {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: #3a8eef; text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--text-bright);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
}
.btn-ghost:hover { color: var(--text-bright); border-color: rgba(255,255,255,0.2); text-decoration: none; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 80px 24px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(75,158,255,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(61,214,140,0.04) 0%, transparent 55%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 600px;
  flex: 1;
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(75,158,255,0.25);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Hero Diagram ─────────────────────────────────────────────────── */
.hero-diagram {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diag-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.diag-card {
  width: 120px;
  padding: 18px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 2;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.diag-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}
.diag-card span { color: var(--text-bright); }

.diag-card.cam  { border-top-color: var(--accent); }
.diag-card.ai   { border-top-color: var(--yellow); }
.diag-card.db   { border-top-color: #bb77ff; }
.diag-card.stat { border-top-color: var(--green); }

.diag-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 4px 0;
  line-height: 1;
}

/* ── Sections ─────────────────────────────────────────────────────── */
.section { padding: 96px 24px; }
.section-alt { background: var(--bg-alt); }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 600px;
}

/* ── Overview Cards ───────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: rgba(75,158,255,0.3);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.card p { font-size: 0.9rem; color: var(--text-muted); }

/* ── Pipeline ─────────────────────────────────────────────────────── */
.pipeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--border);
  margin-left: 24px;
  padding-left: 0;
}

.pipeline-step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 28px 0 28px 36px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.pipeline-step:last-child { border-bottom: none; }

.pipeline-step::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 32px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
}

.step-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 4px;
  min-width: 28px;
  text-transform: uppercase;
}

.step-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}
.step-body p { font-size: 0.9rem; color: var(--text); max-width: 600px; }

/* ── Hardware Grid ────────────────────────────────────────────────── */
.hw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.hw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.hw-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.hw-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 10px;
  line-height: 1.3;
}

.hw-card p { font-size: 0.875rem; color: var(--text-muted); }

/* ── Software Grid ────────────────────────────────────────────────── */
.sw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
  margin-bottom: 52px;
}

.sw-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px;
}

.sw-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(61,214,140,0.1);
  border: 1px solid rgba(61,214,140,0.2);
  border-radius: 100px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.sw-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}
.sw-item p { font-size: 0.85rem; color: var(--text-muted); }

/* ── Quick Start ──────────────────────────────────────────────────── */
.quickstart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.quickstart h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
}

.quickstart pre {
  padding: 20px 22px;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #aadeff;
}

.quickstart pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

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

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  background: var(--bg);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-bright); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
    gap: 48px;
  }
  .hero-cta { justify-content: center; }
  .hero-sub { margin: 0 auto 32px; }

  .nav-links {
    gap: 14px;
  }
  .nav-links a:not(.btn-ghost) { display: none; }

  .pipeline { margin-left: 8px; }
}

@media (max-width: 500px) {
  .hero-diagram { display: none; }
  .cards-grid, .hw-grid, .sw-grid { grid-template-columns: 1fr; }
}
