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

:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --bg-card: #1b2430;
  --border: #30363d;
  --accent: #1f6feb;
  --accent-h: #388bfd;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --txt: #e6edf3;
  --txt-sec: #8b949e;
  --txt-mut: #484f58;
  --mono: 'IBM Plex Mono', 'Cascadia Code', 'Consolas', monospace;
  --sans: 'Manrope', 'Segoe UI', sans-serif;
  --radius: 8px;
  --shadow: 0 4px 28px rgba(0, 0, 0, .35);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

code {
  font-family: var(--mono);
  font-size: .85em;
  background: rgba(31, 111, 235, .12);
  color: #79c0ff;
  padding: .1em .35em;
  border-radius: 4px;
}

pre {
  font-family: var(--mono);
  font-size: .82em;
  line-height: 1.55;
  overflow-x: auto;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

img { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; }

/* ── nav ──────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--txt);
  font-weight: 800;
  letter-spacing: .02em;
}

.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #111827;
  color: #79c0ff;
  font-size: .78rem;
  font-family: var(--mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--txt-sec);
  font-size: .88rem;
  font-weight: 500;
  transition: color .15s;
}

.nav-links a:hover {
  color: var(--txt);
  text-decoration: none;
}

.btn-nav {
  background: var(--accent);
  color: #fff !important;
  padding: .35rem .9rem;
  border-radius: 6px;
  font-size: .85rem;
  transition: background .15s;
}

.btn-nav:hover { background: var(--accent-h) !important; text-decoration: none !important; }

/* ── hero ─────────────────────────────────────────────── */
.hero {
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 90% 55% at 50% 0%, rgba(31, 111, 235, .07) 0%, transparent 70%);
}

.hero-inner { max-width: 960px; margin: 0 auto; }

.ascii-block {
  display: inline-block;
  text-align: left;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  max-width: 100%;
}

.ascii-block pre {
  color: var(--accent-h);
  font-family: var(--mono);
  font-size: clamp(.38rem, .95vw, .65rem);
  line-height: 1.3;
  white-space: pre;
}

.ascii-block pre + pre {
  margin-top: .2rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--txt-sec);
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.hero-sub strong { color: var(--txt); }

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  margin-bottom: 1.75rem;
}

.badges img { height: 20px; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: background .15s, transform .1s, border-color .15s, color .15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 14px rgba(31, 111, 235, .38);
}

.btn-primary:hover {
  background: var(--accent-h);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--txt-sec);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--txt);
  text-decoration: none;
}

.hero-note {
  color: var(--txt-mut);
  font-size: .9rem;
}

/* ── layout ───────────────────────────────────────────── */
.section { padding: 4rem 1.5rem; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: .55rem;
  color: var(--txt);
}

.section-sub {
  color: var(--txt-sec);
  margin-bottom: 2.4rem;
  font-size: .97rem;
}

/* ── feature grid ─────────────────────────────────────── */
.feature-grid,
.mode-grid,
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.25rem;
}

.feature-card,
.mode-card,
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color .2s, transform .15s;
  box-shadow: var(--shadow);
}

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

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: .65rem;
  line-height: 1;
}

.feature-card h3,
.mode-card h3,
.app-card h3 {
  font-size: .97rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--txt);
}

.feature-card p,
.mode-card p,
.app-card p {
  font-size: .88rem;
  color: var(--txt-sec);
}

/* ── table ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

th {
  background: var(--bg-card);
  color: var(--txt-sec);
  text-align: left;
  padding: .65rem 1rem;
  border-bottom: 2px solid var(--border);
  font-weight: 700;
}

td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--txt-sec);
  vertical-align: top;
}

tr:hover td { background: rgba(255, 255, 255, .025); }

td:first-child code { color: var(--txt); }

/* ── quickstart ───────────────────────────────────────── */
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.install-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color .2s;
}

.install-block:hover { border-color: var(--accent); }

.install-block h3 {
  font-size: .97rem;
  font-weight: 700;
  margin-bottom: .9rem;
  color: var(--txt);
}

/* ── terminal demo ────────────────────────────────────── */
.terminal-demo {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
}

.terminal-demo pre {
  color: var(--txt-sec);
  font-size: .82rem;
  line-height: 1.7;
}

.t-prompt { color: var(--green); font-weight: 700; }
.t-box    { color: #79c0ff; }
.t-ok     { color: var(--green); }
.t-warn   { color: var(--yellow); }
.t-comment { color: var(--txt-mut); }

/* ── cta box ──────────────────────────────────────────── */
.cta-box {
  text-align: center;
  max-width: 760px;
}

/* ── footer ───────────────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.8rem;
}

.footer-logo {
  color: var(--txt);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: .55rem;
}

.footer-col p { font-size: .85rem; color: var(--txt-sec); line-height: 1.7; }
.footer-col h4 { font-size: .88rem; font-weight: 700; color: var(--txt); margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; }
.footer-col li a { font-size: .85rem; color: var(--txt-sec); }
.footer-col li a:hover { color: var(--accent-h); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  text-align: center;
}

.footer-bottom p { font-size: .8rem; color: var(--txt-mut); }

/* ── reveal animation ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .45s ease, transform .45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── responsive ───────────────────────────────────────── */
@media (max-width: 700px) {
  .nav-links a:not(.btn-nav) { display: none; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .ascii-block pre { font-size: .3rem; }
  .section { padding: 2.7rem 1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}
