:root {
  --bg: #060608;
  --surface: #0c0c10;
  --surface-2: #111116;
  --text: #f2f2f4;
  --muted: #9a9aa6;
  --dim: #5c5c6a;
  --line: #222228;
  --line-hover: #33333d;
  --accent: #b794f6;
  --font: "Inter", system-ui, sans-serif;
  --display: "Instrument Sans", var(--font);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --wide: 1040px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

svg { display: block; }

/* shared kbd */
kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-hover);
  border-radius: 5px;
  padding: 2px 7px;
}

/* ── Nav ── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: calc(var(--wide) + 64px);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo img { border-radius: 8px; }

.top nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-link:hover { color: var(--text); }

.nav-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  padding: 8px 18px;
  border-radius: 8px;
  transition: opacity 0.15s;
}

.nav-cta:hover { opacity: 0.88; }

/* ── Showcase ── */

.showcase { padding: 8px 0 72px; }

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--dim);
  padding: 10px 14px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 0;
  background: none;
}

.tab:hover { color: var(--muted); }

.tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
  background: none;
}

.tab-caption {
  font-size: 0.88rem;
  color: var(--dim);
  margin-bottom: 16px;
  min-height: 1.4em;
  transition: opacity 0.2s;
}

.tab-caption.fade { opacity: 0; }

.frame {
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  background: #0a0a10;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.frame .panel {
  display: none;
  width: 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.frame .panel.active { display: block; opacity: 1; }

.frame .panel img {
  width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
}

.frame .panel.loading {
  display: block;
  opacity: 0.35;
  min-height: 400px;
}

/* ── Below showcase ── */

.below {
  border-top: 1px solid var(--line);
  padding: 64px 0 56px;
}

.headline-split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.headline-block h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 560px;
}

.headline-block h1 .h1-second {
  display: block;
  margin-top: 0.08em;
}

.sub {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 620px;
}

.stat-strip {
  display: flex;
  gap: 36px;
  padding-bottom: 8px;
}

.stat-strip div { text-align: right; }

.stat-strip dt {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.stat-strip dd {
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: 4px;
}

/* steps */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px 0 0;
  border-right: 1px solid var(--line);
}

.steps li:last-child { border-right: none; padding-right: 0; }
.steps li + li { padding-left: 24px; }

.step-n {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dim);
}

.step-ico {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.steps li > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.steps strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}
.steps span { font-size: 0.78rem; color: var(--dim); line-height: 1.45; }

/* ── Ecosystem ── */

.ecosystem {
  border-top: 1px solid var(--line);
  padding: 72px 0 64px;
}

.eco-head {
  max-width: 540px;
  margin-bottom: 48px;
}

.eco-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.eco-lead {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

.eco-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 48px;
}

.eco-card-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 32px 32px 28px;
  border-bottom: 1px solid var(--line);
}

.eco-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.eco-card-copy h3,
.eco-row-copy h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.eco-card-copy p,
.eco-row-copy p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
}

.feat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.feat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feat svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.feat strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.feat span {
  font-size: 0.74rem;
  color: var(--dim);
  line-height: 1.4;
}

.shortcut-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 16px 32px;
  font-size: 0.8rem;
  color: var(--dim);
}

.shortcut-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.shortcut-bar kbd {
  font-size: 0.72rem;
  padding: 1px 6px;
}

.eco-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.eco-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.eco-row:first-of-type { padding-top: 0; }

.eco-shot {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a10;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  line-height: 0;
}

.eco-shot img {
  width: 100%;
  height: auto;
}

.eco-bullets {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eco-bullets li {
  font-size: 0.84rem;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
}

.eco-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-hover);
}

.eco-row-copy code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text);
}

.eco-credit {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.5;
}

.eco-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-hover);
}

.eco-credit a:hover {
  color: var(--text);
}

.eco-shot-terminal {
  margin: 0 32px 28px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a10;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  line-height: 0;
}

.eco-shot-terminal img {
  width: 100%;
  height: auto;
}

.eco-shot-vscode img {
  object-fit: contain;
}

/* ── Install ── */

.install-block {
  border-top: 1px solid var(--line);
  padding: 64px 0 80px;
  background: var(--surface);
}

.install-head {
  margin-bottom: 32px;
}

.install-title {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.install-sub {
  font-size: 0.92rem;
  color: var(--dim);
}

.install-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.install-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.install-step:last-child { border-bottom: none; }

.install-n {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  border-right: 1px solid var(--line);
  background: var(--surface);
  min-height: 100%;
}

.install-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.install-step-main .install-body {
  padding: 24px 28px 28px;
}

.install-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.install-ico {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.install-label strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.install-hint {
  font-size: 0.78rem;
  color: var(--dim);
  margin-left: 4px;
}

.install-hint-muted {
  font-style: italic;
}

.install-link {
  align-self: flex-start;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-hover);
  transition: text-decoration-color 0.15s;
}

.install-link:hover {
  text-decoration-color: var(--muted);
}

.install-step-main .terminal-bar {
  margin: 0;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line-hover);
  border-radius: 10px;
}

.terminal-bar code {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  word-break: break-all;
}

.btn-copy {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  padding: 8px 16px;
  border-radius: 7px;
  transition: opacity 0.15s;
}

.btn-copy:hover { opacity: 0.85; }

/* ── Footer ── */

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.foot-privacy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foot-lock {
  width: 16px;
  height: 16px;
  color: var(--dim);
  flex-shrink: 0;
}

.foot p { font-size: 0.85rem; color: var(--dim); }

.foot code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--muted);
}

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

.foot-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-hover);
  transition: color 0.15s, text-decoration-color 0.15s;
}

.foot-links a:hover {
  color: var(--text);
  text-decoration-color: var(--muted);
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .headline-split { grid-template-columns: 1fr; gap: 28px; }
  .stat-strip {
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 12px;
  }
  .stat-strip div { text-align: center; }
  .headline-block h1 { max-width: 100%; }
  .sub { max-width: 100%; }
  .steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .steps li {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .steps li + li { padding-left: 16px; }
  .step-n { display: none; }
  .step-ico { flex-shrink: 0; }
  .steps li > div { flex: 1; min-width: 0; }
  .eco-card-top { grid-template-columns: 1fr; gap: 28px; }
  .eco-row,
  .eco-row-flip { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .eco-row-flip .eco-shot { order: -1; }
  .eco-row-flip.eco-row-vscode .eco-row-copy { order: 1; }
}

@media (max-width: 640px) {
  .wrap, .top { padding-left: 20px; padding-right: 20px; }
  .top nav { gap: 12px; }
  .nav-link { font-size: 0.82rem; }
  .nav-cta { padding: 7px 14px; font-size: 0.82rem; }
  .showcase { padding-bottom: 48px; }
  .below { padding: 48px 0 40px; }
  .headline-block h1 {
    font-size: clamp(1.45rem, 6.8vw, 1.75rem);
    line-height: 1.22;
    max-width: 100%;
  }
  .headline-block h1 .h1-second {
    margin-top: 0.12em;
  }
  .sub {
    font-size: 0.94rem;
    line-height: 1.65;
    max-width: 100%;
  }
  .stat-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-bottom: 0;
  }
  .stat-strip div { text-align: center; }
  .stat-strip dt { font-size: 1.65rem; }
  .stat-strip dd { font-size: 0.72rem; }
  .tab-caption {
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 12px;
  }
  .tabs { margin-bottom: 10px; }
  .tab { padding: 9px 12px; font-size: 0.8rem; }
  .frame .panel.loading { min-height: 200px; }
  .steps li { padding: 12px 14px; }
  .feat-grid { grid-template-columns: 1fr; }
  .eco-card-top { padding: 24px 20px 20px; }
  .eco-shot-terminal { margin: 0 20px 20px; }
  .eco-head { margin-bottom: 32px; }
  .eco-row,
  .eco-row-flip {
    gap: 24px;
    padding: 28px 0;
  }
  .eco-row-copy h3 { font-size: 1.12rem; }
  .eco-row-copy p,
  .eco-bullets li {
    font-size: 0.84rem;
    line-height: 1.65;
  }
  .eco-bullets {
    margin-top: 16px;
    gap: 10px;
  }
  .eco-credit { font-size: 0.76rem; }
  .shortcut-bar { padding: 14px 20px; gap: 8px 14px; }
  .install-body { padding: 20px; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}
