/* ── Reset & Base ─────────────────────────────────────────── */

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

:root {
  --bg:          #13131c;
  --bg-raised:   #1a1a26;
  --bg-card:     #222230;
  --bg-card-hover: #2a2a3a;
  --border:      #323244;
  --border-light:#3c3c52;
  --text:        #e8e8ef;
  --text-dim:    #9595aa;
  --text-muted:  #68687e;
  --accent:      #6c5ce7;
  --accent-light:#8577ed;
  --accent-glow: rgba(108, 92, 231, 0.25);
  --green:       #00d68f;
  --green-dim:   rgba(0, 214, 143, 0.12);
  --amber:       #ffb347;
  --amber-dim:   rgba(255, 179, 71, 0.12);
  --red:         #ff6b6b;
  --font-mono:   "SF Mono", "Fira Code", "Cascadia Code", "JetBrains Mono", monospace;
  --font-sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius:      12px;
  --radius-sm:   8px;
  --max-width:   1120px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-raised);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ──────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(19, 19, 28, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-logo img {
  border-radius: 6px;
}

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

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0 24px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.nav-mobile a {
  padding: 12px 0;
  font-size: 0.95rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  color: var(--text);
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  transition: all 0.2s;
}

.btn-sm:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-glow);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 32px var(--accent-glow);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid rgba(108, 92, 231, 0.3);
  margin-bottom: 28px;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), #a78bfa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.hero-sub strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-install {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  text-align: left;
}

.hero-install pre {
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.hero-install code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* ── Terminal chrome ──────────────────────────────────────── */

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

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

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.prompt {
  color: var(--green);
}

/* ── Example terminal output ─────────────────────────────── */

.example-section {
  padding: 0 0 100px;
}

.example-terminal {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.example-output {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.example-output code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.example-output .dim { color: var(--text-muted); }
.example-output .heading { color: var(--accent-light); font-weight: 700; }
.example-output .evidence { color: var(--text-dim); }
.example-output .accent { color: var(--green); font-weight: 600; }

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--green);
  font-weight: 700;
}

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

/* ── Section headers ──────────────────────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ── Features ─────────────────────────────────────────────── */

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.25s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent-light);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── Demo video ───────────────────────────────────────────── */

.demo {
  padding: 100px 0;
}

.demo-video-wrapper {
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.demo-video {
  width: 100%;
  display: block;
  background: #000;
}

/* ── How it works ─────────────────────────────────────────── */

.how-it-works {
  padding: 100px 0;
}

.steps {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--border);
}

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 0;
  position: relative;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent-light);
  z-index: 1;
}

.step-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  padding-top: 2px;
}

.step-content p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

.step-content em {
  color: var(--text);
  font-style: italic;
}

/* ── Safety ───────────────────────────────────────────────── */

.safety {
  padding: 100px 0;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.safety-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.25s;
}

.safety-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.safety-tier {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.safety-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.safety-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 16px;
}

.safety-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.safety-badge.safe {
  background: var(--green-dim);
  color: var(--green);
}

.safety-badge.confirm {
  background: var(--amber-dim);
  color: var(--amber);
}

/* ── CTA ──────────────────────────────────────────────────── */

.cta {
  padding: 100px 0;
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.25;
}

.cta p {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}

.footer-brand img {
  border-radius: 4px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── Scroll reveal ────────────────────────────────────────── */

.feature-card,
.step,
.safety-card,
.demo-video-wrapper {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.feature-card.visible,
.step.visible,
.safety-card.visible,
.demo-video-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

/* staggered delays for grid items */
.feature-card:nth-child(2),
.safety-card:nth-child(2) { transition-delay: 0.08s; }
.feature-card:nth-child(3),
.safety-card:nth-child(3) { transition-delay: 0.16s; }
.feature-card:nth-child(4) { transition-delay: 0.24s; }
.feature-card:nth-child(5) { transition-delay: 0.32s; }
.feature-card:nth-child(6) { transition-delay: 0.4s; }

.step:nth-child(2) { transition-delay: 0.1s; }
.step:nth-child(3) { transition-delay: 0.2s; }
.step:nth-child(4) { transition-delay: 0.3s; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .features-grid,
  .safety-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
  }

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

  .hero-sub {
    font-size: 1rem;
  }

  .hero-install pre {
    font-size: 0.72rem;
    padding: 16px;
  }

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

  .features,
  .demo,
  .how-it-works,
  .safety,
  .cta {
    padding: 64px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .steps::before {
    left: 19px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }

  .step {
    gap: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}
