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

:root {
  --bg: #0d0d0d;
  --bg-surface: #141414;
  --bg-elevated: #1a1a1a;
  --fg: #e8e4dd;
  --fg-muted: #7a7670;
  --fg-dim: #4a4740;
  --accent: #f59e0b;
  --accent-dim: rgba(245,158,11,0.12);
  --border: rgba(232,228,221,0.08);
  --font-code: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

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

/* === NAV === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-code);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--fg-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse 2s infinite;
}

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

/* === HERO === */
.hero {
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  padding: 5rem 2rem;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.hero-headline {
  font-family: var(--font-code);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

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

.hero-stats {
  display: flex;
  gap: 2.5rem;
}

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

.stat-value {
  font-family: var(--font-code);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Terminal */
.terminal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(245,158,11,0.06);
}

.terminal-bar {
  background: var(--bg-elevated);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.terminal-title {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--fg-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 1.25rem 1.4rem;
  font-family: var(--font-code);
  font-size: 0.78rem;
  line-height: 1.9;
}

.t-line { color: var(--fg-muted); }
.t-dim { opacity: 0.6; }
.t-cyan { color: #67e8f9; }
.t-amber { color: var(--accent); }
.t-green { color: #22c55e; }
.t-bold { font-weight: 700; }
.t-bright { color: var(--fg); opacity: 0.9; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

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

/* === SECTION SHARED === */
.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-code);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--fg);
  max-width: 600px;
}

.section-sub {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 500px;
}

/* === HOW === */
.how {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border);
}

.how-inner { max-width: 1200px; margin: 0 auto; }

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 1rem;
}

.pipeline-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
}

.step-num {
  font-family: var(--font-code);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.pipeline-step h3 {
  font-family: var(--font-code);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.pipeline-step p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  padding-top: 2.5rem;
}

/* === DETECTIONS === */
.detections {
  padding: 6rem 2rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.detections-inner { max-width: 1200px; margin: 0 auto; }

.detections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.detection-card {
  background: var(--bg);
  padding: 1.75rem 1.5rem;
  transition: background 0.2s;
}

.detection-card:hover { background: var(--bg-elevated); }

.detection-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.detection-card h4 {
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.detection-card p {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* === PRINCIPLES === */
.principles {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border);
}

.principles-inner { max-width: 1200px; margin: 0 auto; }

.principles-quote {
  margin-bottom: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

blockquote {
  font-family: var(--font-code);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  letter-spacing: -0.02em;
  max-width: 680px;
}

blockquote em { color: var(--accent); font-style: normal; }

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

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

.principle-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.principle h4 {
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.principle p {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* === CLOSING === */
.closing { padding: 8rem 2rem; }

.closing-inner { max-width: 1200px; margin: 0 auto; }

.closing-tagline {
  font-family: var(--font-code);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.closing-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 480px;
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-code);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.78rem;
  color: var(--fg-muted);
  max-width: 300px;
  line-height: 1.6;
}

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

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-lede { max-width: 100%; }

  .pipeline {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .pipeline-arrow {
    display: none;
  }

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

  .principles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .hero { padding: 3rem 1.25rem; }
  .how, .detections, .principles { padding: 4rem 1.25rem; }
  .closing { padding: 5rem 1.25rem; }

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

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

  .nav-inner { padding: 0 1.25rem; }

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