:root {
  --bg: #0c0b0a;
  --paper: #efe8dc;
  --muted: rgba(239, 232, 220, 0.68);
  --dim: rgba(239, 232, 220, 0.42);
  --line: rgba(239, 232, 220, 0.12);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --serif: Newsreader, "Iowan Old Style", Palatino, serif;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 72rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 232, 220, 0.28) var(--bg);
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
}

::selection {
  background: var(--paper);
  color: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--paper);
  text-underline-offset: 0.22em;
}

a:hover {
  opacity: 0.7;
}

:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--paper);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  font-weight: 500;
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 6vw;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav__brand:hover {
  opacity: 1;
}

.mark {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  font-weight: 500;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
}

.nav__links a:hover,
.nav__download {
  color: var(--paper);
  opacity: 1;
}

.nav__download {
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(239, 232, 220, 0.22);
}

.hero {
  width: min(var(--max), calc(100% - 12vw));
  margin: 0 auto;
  min-height: calc(100svh - 4.2rem);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 4.5rem;
  align-items: center;
  padding: 4.5rem 0 4rem;
}

.kicker {
  margin: 0 0 1.15rem;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(2.35rem, 4.6vw, 3.6rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.h1-line {
  white-space: nowrap;
}

.lede {
  max-width: 32rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.9rem;
}

.hero__meta {
  margin: 1.1rem 0 0;
  color: var(--dim);
  font-size: 0.82rem;
}

.hero__meta a {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.55rem;
  padding: 0 1.1rem;
  background: var(--paper);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.btn:hover {
  opacity: 1;
  background: #fff;
}

.text-link {
  font-size: 0.88rem;
  font-weight: 500;
}

.stage {
  margin: 0;
}

.chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.45rem 0.7rem 0.5rem;
  background: #161412;
  border: 1px solid var(--line);
  border-bottom: 0;
  color: var(--dim);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chrome span:last-child {
  text-align: right;
}

.chrome span:nth-child(2) {
  color: var(--muted);
}

.viewport {
  overflow: hidden;
  background: #090807;
  border: 1px solid var(--line);
  border-top: 0;
  aspect-ratio: 16 / 10;
}

.fold {
  height: 100%;
  transform-origin: 50% 100%;
  clip-path: polygon(3.5% 0%, 96.5% 0%, 100% 100%, 0% 100%);
  transition: clip-path 0.16s var(--ease), filter 0.16s var(--ease), transform 0.16s var(--ease);
}

.fold picture,
.fold img {
  width: 100%;
  height: 100%;
  display: block;
}

.fold img {
  object-fit: cover;
  object-position: 58% 46%;
}

.stage__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
}

.stage__bar .slider {
  flex: 1;
}

.stage__bar strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  min-width: 3.2rem;
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1px;
  background: rgba(239, 232, 220, 0.22);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.band {
  width: min(var(--max), calc(100% - 12vw));
  margin: 0 auto;
  padding: 2.4rem 0 3.2rem;
  border-top: 1px solid var(--line);
}

.band p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 36rem;
}

.band ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.band li {
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.78rem;
}

.install {
  width: min(var(--max), calc(100% - 12vw));
  margin: 0 auto;
  padding: 3.4rem 0 2rem;
  border-top: 1px solid var(--line);
}

.install-lead {
  margin: -0.6rem 0 1.8rem;
  max-width: 40rem;
  color: var(--muted);
}

.cmd-alt {
  margin: 1rem 0 0;
  color: var(--dim);
  font-size: 0.82rem;
}

h2 {
  margin: 0 0 1.8rem;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.6rem;
  max-width: 40rem;
}

.steps li {
  counter-increment: step;
  padding-left: 2.8rem;
  position: relative;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.2rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.steps h3 {
  margin: 0 0 0.28rem;
  font-size: 1rem;
  font-weight: 500;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.steps .term + p {
  margin-top: 1rem;
}

.term {
  position: relative;
  margin-top: 0.8rem;
  background: #090807;
  border: 1px solid var(--line);
}

.term pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

.copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: none;
  border: 0;
  color: var(--dim);
  font: 500 0.7rem var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.copy:hover,
.copy.is-copied {
  color: var(--paper);
}

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

kbd {
  display: inline-block;
  padding: 0.04rem 0.32rem;
  border: 1px solid var(--line);
}

.downloads {
  display: grid;
  max-width: 40rem;
  margin: 0 0 2rem;
  border-top: 1px solid var(--line);
}

.dl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  margin: 0;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.dl:hover {
  opacity: 1;
}

.dl__kind {
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dl__name {
  font-family: var(--serif);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--paper);
}

.dl__meta,
.hash,
.note {
  color: var(--dim);
  font-size: 0.82rem;
}

.hash {
  margin: 0.7rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  word-break: break-all;
}

.note {
  margin: 1.4rem 0 0;
  max-width: 36rem;
}

.foot {
  width: min(var(--max), calc(100% - 12vw));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.82rem;
}

.foot p {
  margin: 0;
}

.foot p + p {
  margin-top: 0.55rem;
}

.foot a {
  color: var(--muted);
}

@media (max-width: 860px) {
  .nav__links a:not(.nav__download) {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    min-height: auto;
    padding: 2.4rem 0 2.8rem;
    width: calc(100% - 10vw);
  }

  .h1-line {
    white-space: normal;
  }

  .band,
  .install,
  .foot {
    width: calc(100% - 10vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fold { transition: none !important; }
}
