:root {
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --accent: #3B5BDB;
  --accent-bright: #5B7CFF;
}

:root[data-theme="dark"] {
  --bg: #0B0D12;
  --bg-alt: #11141B;
  --border: rgba(255, 255, 255, 0.08);
  --text-primary: #F3F5FA;
  --text-secondary: rgba(243, 245, 250, 0.62);
  --text-muted: rgba(243, 245, 250, 0.4);
  --terminal-bg: #000000;
  --badge-bg: rgba(91, 124, 255, 0.12);
  --badge-border: rgba(91, 124, 255, 0.25);
}

:root[data-theme="light"] {
  --bg: #FAFBFF;
  --bg-alt: #F3F5FC;
  --border: rgba(20, 25, 50, 0.08);
  --text-primary: #12141C;
  --text-secondary: rgba(18, 20, 28, 0.6);
  --text-muted: rgba(18, 20, 28, 0.42);
  --terminal-bg: #0F1117;
  --badge-bg: rgba(59, 91, 219, 0.08);
  --badge-border: rgba(59, 91, 219, 0.2);
}

* {
  box-sizing: border-box;
}

::selection {
  background: #2F4AC7;
  color: #fff;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

a {
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--text-primary);
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  flex-shrink: 0;
}

.wordmark {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.toggle-btn {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  cursor: pointer;
}

/* HERO */
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-bright);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 24px;
}

h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 20px;
  color: var(--text-primary);
}

.subhead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 0 36px;
}

.install-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.install-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  max-width: 100%;
  overflow-x: auto;
}

.prompt-char {
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-weight: 600;
  flex-shrink: 0;
}

.install-text {
  color: var(--text-primary);
  white-space: nowrap;
}

.icon-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.icon-copy-btn:hover {
  color: var(--text-primary);
  background: var(--border);
}

.icon-copy-btn .icon-copy,
.icon-copy-btn .icon-check {
  width: 14px;
  height: 14px;
}

.icon-copy-btn .icon-check {
  display: none;
  color: var(--accent-bright);
}

.icon-copy-btn.copied .icon-copy {
  display: none;
}

.icon-copy-btn.copied .icon-check {
  display: block;
}

.install-box .icon-copy-btn {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  border-radius: 0;
  width: auto;
}

.secondary-cta {
  color: var(--accent-bright);
  font-size: 15px;
  font-weight: 600;
}

.demo-wrap {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background: var(--terminal-bg);
  border-radius: 10px;
  padding: 22px 24px;
  min-height: 160px;
}

.demo-copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  color: rgba(243, 245, 250, 0.4);
}

.demo-copy-btn:hover {
  color: #F3F5FA;
  background: rgba(255, 255, 255, 0.1);
}

.demo-line {
  font-family: var(--font-mono);
  font-size: 15px;
  color: #F3F5FA;
  margin-bottom: 10px;
}

.demo-cmd {
  color: #F3F5FA;
}

.cursor {
  color: var(--accent-bright);
  animation: blink 1s step-end infinite;
}

.demo-output-line {
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(243, 245, 250, 0.62);
  padding: 2px 0;
  animation: fadeIn 0.3s ease;
  white-space: pre;
}

.demo-output-line.header {
  color: rgba(243, 245, 250, 0.4);
}

/* SECTIONS */
.section-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.section-shell.bordered {
  border-top: 1px solid var(--border);
  padding-top: 80px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-bright);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 40px;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* FEATURES */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 24px;
}

.feature-icon {
  font-size: 20px;
  color: var(--accent-bright);
  margin-bottom: 14px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* INSTALL METHODS */
.install-methods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.install-method-card {
  padding: 20px;
}

.install-method-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.install-method-cmd-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.install-method-cmd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.6;
  flex: 1;
}

.install-method-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-method-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-bright);
}

.install-method-link:hover {
  text-decoration: underline;
}

.install-method-cmd-row .icon-copy-btn {
  margin-top: 1px;
}

/* DOCS */
.docs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.docs-cmd {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-bright);
  font-weight: 500;
}

.docs-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* FOOTER */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-wordmark {
  font-weight: 700;
  font-size: 15px;
}

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

.footer-link {
  color: var(--text-secondary);
  font-size: 13px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .feature-grid,
  .install-methods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  h1 {
    font-size: 42px;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 16px 20px;
  }

  .nav-right {
    gap: 14px;
  }

  .nav-link {
    display: none;
  }

  .hero {
    padding: 56px 20px 48px;
  }

  h1 {
    font-size: 34px;
  }

  .subhead {
    font-size: 17px;
  }

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

  .footer {
    padding: 24px 20px;
    justify-content: flex-start;
  }
}
