/* ferrum — white steel, one heated accent */

:root {
  --paper: #ffffff;
  --ink: #141414;
  --ink-soft: #4b4b4b;
  --ink-faint: #8a8a8a;
  --line: #e6e6e6;
  --line-strong: #d0d0d0;
  --heat: #e03e11;
  --heat-deep: #b93008;
  --ok: #1a7f37;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

a {
  color: var(--ink);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--heat);
}

:focus-visible {
  outline: 2px solid var(--heat);
  outline-offset: 3px;
  border-radius: 2px;
}

code,
kbd {
  font-family: var(--font-mono);
}

code {
  font-size: 0.92em;
  background: #f4f4f4;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

kbd {
  font-size: 0.85em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05em 0.4em;
}

/* --- nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.version {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-faint);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 8px 18px;
  border-radius: 6px;
  transition: background 120ms ease;
}

.nav-cta:hover {
  background: var(--heat-deep);
  color: var(--paper);
  text-decoration: none;
}

/* --- hero --- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 112px;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0 0 24px;
  max-width: 13ch;
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 6px;
  transition: background 120ms ease;
}

.button:hover {
  background: var(--heat-deep);
  color: var(--paper);
}

.copy-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 11px 16px;
  cursor: pointer;
  font: inherit;
  transition: border-color 120ms ease;
}

.copy-inline:hover {
  border-color: var(--ink);
}

.copy-inline code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
}

.copy-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.copy-inline:hover .copy-label,
.copy-inline.copied .copy-label {
  color: var(--heat);
}

/* --- terminal --- */

.terminal {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(20, 20, 20, 0.35);
}

.terminal-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.terminal-body {
  margin: 0;
  padding: 22px 24px 26px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 340px;
}

.t-line {
  display: block;
}

/* Hidden only when JS can play them back; without JS they just show. */
.js .t-line {
  opacity: 0;
}

.js .t-line.shown {
  opacity: 1;
}

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

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

.prompt {
  color: var(--heat);
}

.verified {
  color: var(--heat);
  font-weight: 500;
}

.t-line:last-child.shown::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--heat);
  margin-left: 6px;
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* --- sections --- */

.section {
  padding: 88px 32px;
  border-top: 1px solid var(--line);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 40px;
}

.section-intro {
  color: var(--ink-soft);
  max-width: 58ch;
  margin: -22px 0 40px;
}

/* --- how it works --- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--heat);
  border-top: 2px solid var(--heat);
  padding-top: 14px;
  margin-bottom: 18px;
}

.steps h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* --- features --- */

.features {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
}

.feature {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.feature dt {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 46ch;
}

/* --- commands --- */

.commands,
.install-commands {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.install-commands {
  grid-template-columns: 1fr 1fr;
  max-width: 760px;
}

.command {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  transition: border-color 120ms ease;
}

.command:hover {
  border-color: var(--line-strong);
}

.command.accent {
  border-color: var(--ink);
}

.command-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.command-row code {
  background: none;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 500;
}

.command p {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.copy {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 5px 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 120ms ease, border-color 120ms ease;
}

.copy:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.copy.copied {
  color: var(--heat);
  border-color: var(--heat);
}

/* --- install --- */

.install {
  background: #fafafa;
}

.install .section-intro {
  margin-bottom: 32px;
}

.install-note {
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.install-note a {
  font-weight: 600;
  margin-left: 6px;
}

/* --- footer --- */

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.dot {
  color: var(--line-strong);
}

/* --- responsive --- */

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 64px;
    padding-bottom: 72px;
  }

  .hero-copy h1 {
    max-width: none;
  }

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

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

  .install-commands {
    grid-template-columns: 1fr;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 64px 20px;
  }

  .command-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .copy-inline {
    width: 100%;
    justify-content: space-between;
  }

  .terminal-body {
    font-size: 0.76rem;
    padding: 18px 16px;
    min-height: 0;
  }
}

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

  .js .t-line,
  .t-line {
    opacity: 1;
  }

  .t-line:last-child.shown::after {
    animation: none;
  }

  * {
    transition: none !important;
  }
}
