:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #0f0f0f;
  --surface-raised: #141414;
  --ink: #ededed;
  --muted: #a1a1a1;
  --faint: #666666;
  --line: #1f1f1f;
  --line-strong: #2e2e2e;
  --green: #4ade80;
  --radius: 10px;
  --text: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(237, 237, 237, 0.2);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p,
figure,
pre {
  margin: 0;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-icon {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-primary {
  background: var(--ink);
  color: #0a0a0a;
}

.btn-primary:hover {
  background: #ffffff;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--faint);
  background: var(--surface-raised);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(72px, 11vw, 128px) 0 clamp(56px, 8vw, 88px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-glow {
  position: absolute;
  inset: -64px -20vw auto;
  height: 560px;
  background: radial-gradient(ellipse 55% 55% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 70%);
  pointer-events: none;
}

h1,
h2 {
  text-wrap: balance;
}

h1 {
  max-width: 720px;
  font-size: clamp(44px, 7.2vw, 76px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  background: linear-gradient(180deg, #ffffff 30%, #9b9b9b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  max-width: 640px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 560px;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
}

.lede code {
  color: var(--ink);
  font-size: 0.92em;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* ---------- install bar ---------- */

.install-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 8px 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.install-bar:hover {
  border-color: var(--faint);
}

.install-prompt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 14px;
}

.install-bar code {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.copy-button:hover {
  background: var(--surface-raised);
  color: var(--ink);
}

.copy-button .icon-check {
  display: none;
  color: var(--green);
}

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

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

.copy-button:focus-visible,
.btn:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 2px;
}

/* ---------- terminal ---------- */

.terminal {
  width: min(680px, 100%);
  margin-top: clamp(48px, 7vw, 72px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-align: left;
}

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

.terminal-dots {
  display: inline-flex;
  gap: 6px;
}

.terminal-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.terminal-title {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.terminal-body {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.t-prompt {
  color: var(--faint);
}

.t-cmd {
  color: var(--ink);
  font-weight: 500;
}

.t-dim {
  color: var(--faint);
}

.t-ok {
  color: var(--green);
}

.t-hl {
  color: var(--ink);
}

/* ---------- principles ---------- */

.principles {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principles-grid {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.principles-grid > div {
  padding: 36px 28px;
}

.principles-grid > div + div {
  border-left: 1px solid var(--line);
}

.principles-grid h3 {
  margin-bottom: 8px;
}

.principles-grid p {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- sections ---------- */

.section {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(80px, 11vw, 128px) 0 0;
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.step {
  padding: 28px 24px;
  background: var(--bg);
  transition: background 0.15s ease;
}

.step:hover {
  background: var(--surface);
}

.step-num {
  display: block;
  margin-bottom: 18px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- commands ---------- */

.command-list {
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.command-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 18px 24px;
  transition: background 0.15s ease;
}

.command-row:hover {
  background: var(--surface);
}

.command-row + .command-row {
  border-top: 1px solid var(--line);
}

.command-row code {
  color: var(--ink);
  font-size: 14px;
}

.command-row span {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- cta ---------- */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: clamp(96px, 13vw, 152px);
}

.cta .lede {
  margin-top: 16px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  color: var(--faint);
  font-size: 13px;
}

.footer-inner a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-inner a:hover {
  color: var(--ink);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .header-inner,
  .hero,
  .principles-grid,
  .section,
  .footer-inner {
    width: calc(100% - 40px);
  }

  .nav-links {
    display: none;
  }

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

  .principles-grid > div {
    padding: 28px 0;
  }

  .principles-grid > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

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

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .install-bar {
    width: 100%;
    justify-content: space-between;
  }

  .btn-ghost {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
