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

:root {
  --bg: #0a0a0f;
  --surface: #141420;
  --surface-border: #1e1e2e;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --glow: rgba(59, 130, 246, 0.3);
  --glow-cyan: rgba(6, 182, 212, 0.2);
  --gradient: linear-gradient(135deg, var(--blue), var(--cyan));
  --radius: 12px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

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

/* ── Hero ── */

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

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(6, 182, 212, 0.05), transparent);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero h1 .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
}

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

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

.btn-primary:hover {
  box-shadow: 0 6px 30px var(--glow);
  color: #fff;
  opacity: 1;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
  border-color: var(--blue);
  opacity: 1;
}

.install-cmd {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.install-cmd code {
  color: var(--text);
}

.install-cmd .copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
  font-size: 1rem;
  line-height: 1;
}

.install-cmd .copy-btn:hover {
  color: var(--cyan);
}

.install-cmd .copy-btn.copied {
  color: #22c55e;
}

/* ── Terminal Frame (GIF placeholder) ── */

.terminal-frame {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 60px var(--glow-cyan);
}

.terminal-frame.hero-frame {
  max-width: 900px;
  margin: 0 auto;
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--surface-border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

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

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
  padding: 32px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.terminal-body img {
  width: 100%;
  height: auto;
  display: block;
}

.terminal-body.small {
  min-height: 220px;
  padding: 24px;
}

.placeholder-text {
  text-align: center;
  opacity: 0.5;
}

.placeholder-text .label {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.placeholder-text .hint {
  font-size: 0.75rem;
}

/* ── Section shared ── */

section {
  padding: 80px 0;
}

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

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Features Grid ── */

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 30px var(--glow);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ── How It Works ── */

.steps {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.step:nth-child(even) .step-text {
  order: 2;
}

.step:nth-child(even) .step-visual {
  order: 1;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ── Install Section ── */

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

.install-steps {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.install-step {
  text-align: left;
}

.install-step .step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  line-height: 1.7;
}

.code-block .comment {
  color: #6b7280;
}

.code-block .key {
  color: var(--cyan);
}

.code-block .string {
  color: #a5d6a7;
}

.install-link {
  margin-top: 32px;
}

/* ── Footer ── */

footer {
  padding: 32px 0;
  border-top: 1px solid var(--surface-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--cyan);
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-sep {
  color: var(--surface-border);
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .hero {
    padding: 80px 0 60px;
  }

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

  .step {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .step:nth-child(even) .step-text {
    order: 1;
  }

  .step:nth-child(even) .step-visual {
    order: 2;
  }

  .terminal-body {
    min-height: 200px;
    padding: 20px;
  }

  .terminal-body.small {
    min-height: 160px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .install-cmd {
    font-size: 0.8rem;
    padding: 10px 12px;
  }
}
