:root {
  --ink: #0e0f11;
  --ink-2: #16181b;
  --ink-line: rgba(255, 255, 255, 0.1);
  --ink-text: #ecebe8;
  --ink-muted: #95979c;

  --paper: #f3f1ec;
  --paper-2: #e9e6df;
  --paper-line: rgba(20, 20, 20, 0.14);
  --text: #17181b;
  --muted: #5c5e63;

  --red: #e0442b;
  --red-hi: #f0563c;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a, td a, .small a, li a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
p a:hover, td a:hover, .small a:hover { text-decoration-color: var(--red); }
code, pre, kbd { font-family: var(--mono); }
:not(pre) > code { font-size: 0.86em; background: rgba(0, 0, 0, 0.06); padding: 0.1em 0.35em; border-radius: 3px; }
::selection { background: var(--red); color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2 { font-family: var(--cond); font-weight: 600; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.08; }
h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.35; margin: 0 0 8px; }
.label {
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin: 0 0 18px;
}
.lead { color: var(--muted); font-size: 1.08rem; max-width: 58ch; margin: 18px 0 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px;
  font: 500 0.94rem var(--sans); text-decoration: none; white-space: nowrap;
  border-radius: 4px; border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hi); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.28); color: var(--ink-text); }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--text); color: var(--paper); height: 38px; padding: 0 16px; font-size: 0.88rem; }
.btn-dark:hover { background: #000; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--ink-line);
  color: var(--ink-text);
}
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand {
  font: 600 1.5rem/1 var(--cond); letter-spacing: -0.03em;
  text-decoration: none; color: var(--ink-text);
  display: inline-flex; align-items: center; gap: 10px;
}
.brand .mark { width: 1.2em; height: 1.2em; flex: none; }

.top nav { display: flex; gap: 28px; font-size: 0.9rem; }
.top nav a { color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.top nav a:hover { color: #fff; }

/* hero */
.hero {
  background: var(--ink); color: var(--ink-text);
  padding: 96px 0 0;
  /* the screenshot hangs over the boundary into the paper section below */
  background-image: linear-gradient(to bottom, var(--ink) 0, var(--ink) calc(100% - min(22vw, 320px)), var(--paper) calc(100% - min(22vw, 320px)));
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px; align-items: end; margin-bottom: 72px;
}
.hero h1 { font-size: clamp(2.75rem, 6.4vw, 5.4rem); line-height: 0.98; letter-spacing: -0.025em; }
.hero-side p { color: var(--ink-muted); font-size: 1.06rem; margin: 0 0 28px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }

.shot {
  display: block; position: relative;
  border-radius: 6px; overflow: hidden;
  background: #1b1c1f;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.12), 0 24px 60px -18px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
}
.hero-shot { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 100px -30px rgba(0, 0, 0, 0.8); }

/* sections */
.paper { background: var(--paper); padding: 120px 0; }
.paper.deep { background: var(--paper-2); }
.ink { background: var(--ink); color: var(--ink-text); padding: 128px 0; }
.ink .lead { color: var(--ink-muted); }
.ink :not(pre) > code { background: rgba(255, 255, 255, 0.08); }
.head { max-width: 760px; margin-bottom: 64px; }
.session-wrap { padding-top: 136px; }

/* session: text scrolls, screenshot stays */
.session { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  min-height: min(76vh, 680px); padding: min(8vh, 72px) 0;
  border-top: 1px solid var(--paper-line);
  opacity: 0.38; transition: opacity 0.35s;
}
.step:first-child { padding-top: 32px; }
.step.active { opacity: 1; }
.step .num { font: 500 0.82rem var(--mono); color: var(--red); margin: 0 0 14px; letter-spacing: 0.04em; }
.step .num span { color: var(--muted); margin-left: 10px; }
.step h3 { font: 600 1.6rem/1.15 var(--cond); letter-spacing: -0.01em; margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; }
.step .inline { display: none; }

.keys { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 24px; margin: 26px 0 0; }
.keys div { display: flex; align-items: center; gap: 8px; }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; font-size: 0.86rem; color: var(--muted); }
kbd {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 26px; padding: 0 6px;
  font-size: 0.8rem; color: var(--text);
  background: #fbfaf7; border: 1px solid var(--paper-line); border-bottom-width: 2px;
  border-radius: 4px;
}

.stage { position: relative; }
.stage .shot { position: sticky; top: max(88px, calc(50vh - 240px)); aspect-ratio: 16 / 10; }
.stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.45s ease;
}
.stage img.on { opacity: 1; }

.also { margin-top: 88px; padding-top: 40px; border-top: 1px solid var(--paper-line); }
.also ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.also li { color: var(--muted); font-size: 0.95rem; }
.also b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* platforms */
.platforms { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.backends { margin: 40px 0 32px; }
.backends div { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--ink-line); }
.backends div:last-child { border-bottom: 1px solid var(--ink-line); }
.backends dt { font: 500 0.88rem/1.7 var(--mono); color: var(--ink-text); }
.backends dd { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }
pre {
  margin: 0; padding: 14px 18px; overflow-x: auto;
  font-size: 0.84rem; line-height: 1.7;
  background: var(--ink-2); color: #d9d7d2;
  border-radius: 4px; border: 1px solid var(--ink-line);
}
.paper pre { background: var(--ink); border-color: transparent; }
.pf-shot { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 80px -30px rgba(0, 0, 0, 0.9); }

/* specs */
.specs { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; }
.sheet { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 15px 0; border-top: 1px solid var(--paper-line); }
.sheet tr:last-child th, .sheet tr:last-child td { border-bottom: 1px solid var(--paper-line); }
.sheet td code { white-space: nowrap; }
.sheet th { width: 34%; padding-right: 24px; font: 500 0.78rem/1.9 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* download */
.dl { width: 100%; border-collapse: collapse; }
.dl th {
  text-align: left; padding: 0 16px 12px 0;
  font: 500 0.74rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.dl td { padding: 18px 16px 18px 0; border-top: 1px solid var(--paper-line); vertical-align: middle; }
.dl tr:last-child td { border-bottom: 1px solid var(--paper-line); }
.dl td b { font-weight: 600; }
.dl td code { background: none; padding: 0; font-size: 0.85rem; color: var(--muted); }
.dl td.num-col { font-family: var(--mono); font-size: 0.88rem; color: var(--muted); white-space: nowrap; }
.dl .go { text-align: right; padding-right: 0; }
.dl tr.match td { background: #fff; }
.dl tr.match td:first-child { box-shadow: inset 3px 0 0 var(--red); padding-left: 16px; }
.dl tr.match .btn-dark { background: var(--red); }
.dl tr.match .btn-dark:hover { background: var(--red-hi); }
.dl thead th:first-child { padding-left: 0; }
.dl tr.match td:first-child b::after {
  content: "This computer"; display: block;
  font: 500 0.7rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red);
}
.small { font-size: 0.9rem; color: var(--muted); margin: 20px 0 0; }

.first-run { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; margin-top: 72px; }
.first-run p { color: var(--muted); margin: 0 0 14px; }
.first-run p b { color: var(--text); font-weight: 600; }
.first-run pre { margin-bottom: 16px; }

/* faq */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; }
.qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 48px; }
.qa div { border-top: 2px solid var(--text); padding-top: 18px; }
.qa p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* footer */
.foot { background: var(--ink); color: var(--ink-muted); padding: 56px 0 64px; font-size: 0.9rem; }
.foot-in { display: grid; grid-template-columns: auto 1fr; gap: 16px 48px; align-items: baseline; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: #fff; }
.foot p { grid-column: 1 / -1; margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--ink-line); }
.foot p a { color: var(--ink-text); }

/* lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 4vh 4vw; border: 0;
  background: rgba(8, 8, 9, 0.94); color: var(--ink-text);
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 100%; max-height: calc(100% - 48px); object-fit: contain; border-radius: 4px; cursor: zoom-out; }
.lightbox p { margin: 0; font: 0.85rem var(--mono); color: var(--ink-muted); }
.lb-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: 1px solid var(--ink-line); color: var(--ink-text);
  font: 500 0.85rem var(--sans); padding: 6px 14px; border-radius: 4px; cursor: pointer;
}
.lb-close:hover { border-color: #fff; }

/* responsive */
@media (max-width: 980px) {
  .hero-grid, .platforms, .specs, .faq { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .session { display: block; }
  .stage { display: none; }
  .step { min-height: 0; opacity: 1; padding: 48px 0; }
  .step .inline { display: block; margin-top: 28px; }
  .also ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero { background-image: linear-gradient(to bottom, var(--ink) 0, var(--ink) calc(100% - 28vw), var(--paper) calc(100% - 28vw)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top nav a:not([href="#download"]):not([href*="github"]) { display: none; }
  .top nav { gap: 20px; }
  .brand { font-size: 1.32rem; }
  .hero { padding-top: 56px; }
  .hero-grid { margin-bottom: 48px; }
  .paper, .ink { padding: 88px 0; }
  .session-wrap { padding-top: 96px; }
  .head { margin-bottom: 32px; }
  .keys { grid-template-columns: repeat(2, auto); }
  .also ul, .qa, .first-run { grid-template-columns: minmax(0, 1fr); }
  .backends div { grid-template-columns: 1fr; gap: 4px; }
  .sheet th, .sheet td { display: block; width: auto; border: 0; padding: 0; }
  .sheet tr { display: block; padding: 14px 0; border-top: 1px solid var(--paper-line); }
  .sheet tr:last-child { border-bottom: 1px solid var(--paper-line); }
  .sheet tr:last-child th, .sheet tr:last-child td { border-bottom: 0; }
  .hide-sm { display: none; }
  .dl td { padding: 14px 10px 14px 0; font-size: 0.94rem; }
  .dl .btn-dark { padding: 0 12px; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step, .stage img { transition: none; }
}
