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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-terminal: #0f172a;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #6b7280;
  --text-terminal: #e2e8f0;
  --prompt-green: #22c55e;
  --border-color: #e2e8f0;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ── */

.hero {
  padding: 80px 0 64px;
  text-align: center;
  background: var(--bg-primary);
}

.hero-logo {
  color: var(--accent-blue);
  font-size: clamp(0.45rem, 2.2vw, 0.85rem);
  line-height: 1.2;
  margin-bottom: 24px;
  display: inline-block;
  text-align: left;
}

.hero h1 {
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 16px;
  min-height: 1.4em;
}

.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--accent-blue);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
  border: 1px solid var(--accent-blue);
}

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

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

/* ── Sections ── */

section {
  padding: 64px 0;
}

.bg-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 40px;
}

/* ── Features ── */

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

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.feature-icon {
  font-size: 1.25rem;
  color: var(--accent-blue);
  margin-bottom: 12px;
}

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

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

/* ── Terminal windows ── */

.terminal-window {
  background: var(--bg-terminal);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1e293b;
}

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.terminal-title {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 8px;
}

.terminal-body {
  padding: 16px 20px;
}

.terminal-body pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-terminal);
  overflow-x: auto;
}

.terminal-body .prompt {
  color: var(--prompt-green);
  user-select: none;
}

.terminal-body .flag {
  color: var(--accent-blue);
}

.terminal-body .comment {
  color: var(--text-muted);
}

.terminal-body .line-num {
  color: var(--text-muted);
  user-select: none;
  display: inline-block;
  width: 2ch;
  text-align: right;
  margin-right: 1.5ch;
}

/* ── Install ── */

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

.install-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 700;
}

.install-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 24px;
  text-align: center;
}

/* ── Usage ── */

.usage-examples {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.usage-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ── Demo placeholder ── */

.demo-placeholder {
  text-align: center;
  padding: 48px 24px;
}

.demo-placeholder pre {
  display: inline-block;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.demo-placeholder a {
  color: var(--accent-blue);
  text-decoration: none;
}

.demo-placeholder a:hover {
  text-decoration: underline;
}

/* ── Footer ── */

footer {
  background: var(--bg-terminal);
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 0.8rem;
  line-height: 2;
}

footer a {
  color: var(--accent-blue);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  text-align: left;
}

.footer-logo {
  color: var(--accent-blue);
  font-size: clamp(0.35rem, 1.8vw, 0.65rem);
  line-height: 1.2;
  margin-bottom: 12px;
  display: inline-block;
  text-align: left;
}

.footer-col-title {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  color: var(--text-terminal);
}

.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-columns ul li {
  margin-bottom: 6px;
}

.footer-slogan {
  color: var(--text-terminal);
  font-weight: 700;
}

.footer-version {
  font-size: 0.7rem;
  opacity: 0.6;
}

footer hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 32px 0 24px;
}

.footer-credit {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-terminal);
}

.footer-heart {
  color: #ea580c;
}

.back-to-top-wrap {
  text-align: center;
  margin-top: 12px;
}

.back-to-top {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
}

.back-to-top:hover {
  color: var(--accent-blue);
}

/* ── Animations ── */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Focus styles ── */

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* ── Skip nav ── */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  z-index: 100;
  padding: 8px 16px;
  background: var(--accent-blue);
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
}

.skip-link:focus {
  top: 0;
}

/* ── Responsive ── */

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

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

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

  section {
    padding: 48px 0;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-columns .footer-logo {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .typing-cursor::after { animation: none; opacity: 1; }
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
