/* ─── Palette ─── */
:root {
  --bg:         #0b0d11;
  --bg-raised:  #11141a;
  --border:     #1c2028;
  --text:       #9ca3af;
  --text-bright:#e0e4ea;
  --accent:     #6d9cff;
  --green:      #6ecb8b;
  --string:     #c4a7e7;
  --dim:        #4b5263;
  --mono:       "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, monospace;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --max-w:      840px;
}

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

/* ─── Base ─── */
html { scroll-behavior: smooth; }

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--text-bright);
  background: var(--bg-raised);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
}

/* ─── Nav ─── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--accent); text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  font-size: 0.85rem;
  color: var(--text);
}
.nav-links a:hover { color: var(--text-bright); text-decoration: none; }

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ─── Main ─── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

section { margin-bottom: 5rem; }

h2 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

/* ─── Hero ─── */
.hero {
  padding-top: 5rem;
  padding-bottom: 1rem;
}

.hero-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-install {
  display: inline-block;
}

.hero-cmd {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-bright);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-cmd .prompt {
  color: var(--green);
  user-select: none;
}

.hero-sub strong {
  color: var(--text-bright);
  font-weight: 600;
}

/* ─── Copy button ─── */
.copy-btn {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--text-bright); }
.copy-btn.copied { color: var(--green); }

/* ─── Demo ─── */
.demo { margin-bottom: 5rem; }

.demo-window {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.demo-titlebar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.demo img {
  width: 100%;
  display: block;
}

/* ─── Pillars ─── */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.pillar {
  background: var(--bg);
  padding: 1.75rem;
}

.pillar h3 {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.pillar p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
}

/* ─── TUI Section ─── */
.tui-desc {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

.tui-highlights {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.tui-hl {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
}

.tui-hl-label {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text-bright);
  font-size: 0.8rem;
}

.tui-hl span:last-child {
  color: var(--text);
}

.tui-screenshot {
  margin-bottom: 1rem;
}

.tui-screenshot img {
  width: 100%;
  display: block;
}

.tui-install {
  display: inline-block;
}

.tui-install .install-cmd {
  font-family: var(--mono);
  font-size: 0.88rem;
}

.tui-install .prompt {
  color: var(--green);
  user-select: none;
}

/* ─── Terminal / Quickstart ─── */
.terminal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.terminal-titlebar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.terminal pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  line-height: 1.7;
}

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

.terminal .c {
  color: var(--dim);
}

.terminal .s {
  color: var(--string);
}

.terminal .o {
  color: var(--text);
  opacity: 0.7;
}

/* ─── Features ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.feature {
  background: var(--bg);
  padding: 1.5rem 1.75rem;
}

.feature h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 0.35rem;
}

.feature p {
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ─── Install ─── */
.install-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.install-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.install-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 5.5rem;
  flex-shrink: 0;
  text-align: right;
}

.install-cmd {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem 0.55rem 1rem;
  gap: 0.75rem;
}

.install-cmd pre {
  flex: 1;
  overflow-x: auto;
}

.install-cmd p {
  font-size: 0.88rem;
  flex: 1;
}

/* ─── Footer ─── */
footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text);
}
.footer-links a:hover { color: var(--text-bright); }

.footer-license {
  font-size: 0.75rem;
  color: var(--dim);
}

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .hero { padding-top: 3.5rem; }
  .hero h1 { font-size: 1.75rem; }

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

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

  .tui-highlights {
    flex-direction: column;
    gap: 1rem;
  }

  .install-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .install-label {
    text-align: left;
    width: auto;
  }

  section { margin-bottom: 3.5rem; }
}
