:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --fg: #e8e8ed;
  --fg-muted: #8888a0;
  --fg-dim: #55556a;
  --accent: #00e5a0;
  --accent-dim: rgba(0, 229, 160, 0.15);
  --accent-glow: rgba(0, 229, 160, 0.4);
  --orange: #ff6b35;
  --code-bg: #0d0d14;
  --border: #1e1e2a;
  --radius: 12px;
  --font: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

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

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

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.hero-visual {
  margin-top: 4rem;
  position: relative;
  z-index: 2;
}

.scan-animation {
  width: 200px;
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanPulse 3s ease-in-out infinite;
  box-shadow: 0 0 20px var(--accent-glow);
}

@keyframes scanPulse {
  0%, 100% { top: 20%; opacity: 0.3; }
  50% { top: 80%; opacity: 1; }
}

.target-ring {
  position: absolute;
  border: 1px solid var(--accent-dim);
  border-radius: 50%;
}

.ring-1 { width: 180px; height: 180px; animation: ringPulse 4s ease-in-out infinite; }
.ring-2 { width: 120px; height: 120px; animation: ringPulse 4s ease-in-out 0.5s infinite; }
.ring-3 { width: 60px; height: 60px; animation: ringPulse 4s ease-in-out 1s infinite; }

.target-dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-dim);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.95); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-dim); }
}

/* ---- HOW IT WORKS ---- */
.how {
  padding: 6rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.step {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s;
}

.step:hover {
  border-left-color: var(--accent);
}

.step-number {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fg-dim);
  line-height: 1;
  min-width: 60px;
}

.step:hover .step-number { color: var(--accent); }

.step-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-content p {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---- FEATURES ---- */
.features {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.features h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 3.5rem;
  letter-spacing: -0.02em;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--mono);
}

.feature-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

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

/* ---- OUTPUT ---- */
.output {
  padding: 6rem 2rem;
  max-width: 750px;
  margin: 0 auto;
}

.output h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-filename {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-left: 0.8rem;
}

.code-block pre {
  padding: 1.5rem;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--fg-muted);
}

.json-key { color: #7dd3fc; }
.json-string { color: var(--accent); }

/* ---- CLOSING ---- */
.closing {
  padding: 8rem 2rem;
  text-align: center;
}

.closing-content {
  max-width: 650px;
  margin: 0 auto;
}

.closing h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.closing p {
  color: var(--fg-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.closing-tagline {
  color: var(--accent) !important;
  font-weight: 500;
  margin-top: 1.5rem;
}

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

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  .step-number {
    font-size: 2rem;
  }

  .hero {
    padding: 4rem 1.5rem 3rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .code-block code {
    font-size: 0.75rem;
  }
}

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

  .lede {
    font-size: 1rem;
  }

  .scan-animation {
    width: 150px;
    height: 150px;
  }

  .ring-1 { width: 130px; height: 130px; }
  .ring-2 { width: 90px; height: 90px; }
  .ring-3 { width: 50px; height: 50px; }
}

/* ── CTA buttons (landing page) ── */
.hero-cta,
.closing-cta {
  margin-top: 2.5rem;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: -0.01em;
}

.cta-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cta-btn:active {
  transform: translateY(0);
}