:root {
  --bg: #ffffff;
  --surface: #f4f4f4;
  --ink: #111111;
  --muted: #6b6b6b;
  --accent: #1a4be0;
  --accent-ink: #ffffff;
  --field-1: #111111;
  --field-1-ink: #ffffff;
  /* the app's own colours, for the pieces of its interface */
  --oled: #000000;
  --pixel: #f4eedc;
  --app-window: #111113;
  --app-body: #212124;
  --app-panel: #18181b;
  --pad-off: #1c1c1e;

  --step-small: clamp(0.9375rem, 0.92rem + 0.08vw, 1rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-name: clamp(3rem, 1rem + 8.4vw, 9.5rem);

  --m: clamp(16px, 1.6vw, 24px);
  --gap: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.45; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h2 { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
strong { font-weight: 500; }
.soft { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons: one shape, square */
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  background: var(--accent); color: var(--accent-ink); font-weight: 500; font-size: var(--step-body);
  transition: transform .16s var(--ease), background-color .16s var(--ease);
}
.btn:hover { text-decoration: none; background: #1440c4; }
.btn:active { transform: scale(.97); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: var(--step-small); }

/* bar */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px;
  padding: 10px var(--m); background: var(--bg);
}
.wordmark { color: var(--ink); font-weight: 500; margin-right: auto; display: flex; flex-direction: column; line-height: 1.15; }
.wordmark span { font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); letter-spacing: -0.02em; }
.wordmark small { font-size: var(--step-small); font-weight: 400; color: var(--muted); }
.wordmark:hover { text-decoration: none; }
.wordmark:hover span { text-decoration: underline; text-underline-offset: 3px; }
.bar nav { display: flex; gap: 22px; }
.bar nav a { color: var(--ink); font-size: var(--step-small); }

/* hero: words on white, the grid alone in a black field */
.hero { padding: 0 0 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - 64px); }
.split > * { min-width: 0; }
.split-words { padding: clamp(32px, 4vw, 64px) var(--m); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.split-stmt { font-size: var(--step-lead); line-height: 1.22; letter-spacing: -0.02em; max-width: 26ch; }
.split .name { font-size: 7.4vw; }
.split-words > .soft { max-width: 46ch; }
.split-acts .brew { max-width: 100%; }
.split-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.split-acts > .soft { font-size: var(--step-small); }
.split-field { background: var(--app-window); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; padding: var(--m); }
.split-field .free { flex: none; align-self: center; width: min(84%, 640px); padding: 0; background: none; }
.split-field p { color: #98968f; font-size: var(--step-small); }
.hero .sheet, .hero .sheet-note { margin-left: var(--m); margin-right: var(--m); }
.free { flex: 0 0 clamp(260px, 30vw, 460px); background: var(--app-window); padding: clamp(10px, 1.1vw, 16px); border-radius: 12px; }
.free-grid b { cursor: pointer; transition: transform .12s var(--ease); }
.free-grid b:active { transform: scale(.9); }
.name {
  font-size: var(--step-name); font-weight: 400; letter-spacing: -0.045em; line-height: .92;
  white-space: nowrap; margin-left: -0.04em;
}

.sheet { margin-top: clamp(32px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 26px 26px; }
.run { display: flex; flex-direction: column; gap: 10px; }
.run-title { font-size: var(--step-small); display: flex; gap: 8px; }
.run-title span { color: var(--muted); font-variant-numeric: tabular-nums; }
.run { max-width: 100%; }
.run-frames { display: flex; flex-wrap: wrap; gap: 6px; }
.run-frames img { width: clamp(84px, 8.9vw, 128px); height: auto; aspect-ratio: 2 / 1; background: var(--oled); transition: opacity .24s var(--ease), transform .24s var(--ease); }
.sheet:hover .run-frames img { opacity: .4; }
.sheet .run-frames img.is-on { opacity: 1; transform: scale(1.06); position: relative; z-index: 1; }
.sheet-note { margin-top: 18px; padding: 12px 0; font-size: var(--step-small); min-height: 1.5em; background: var(--bg); }
.sheet-note strong { color: var(--ink); }

/* homebrew: a real command to copy, set like the norns pages set theirs */
.brew { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; width: 100%; max-width: 30rem; }
.brew-end { margin-top: 32px; }
.brew-label { font-size: var(--step-small); color: var(--muted); }
.brew-box { display: flex; align-items: stretch; background: var(--app-window); color: var(--pixel); }
.brew-box pre { margin: 0; padding: 12px 14px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.brew-box pre::-webkit-scrollbar { display: none; }
.brew-box code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; white-space: nowrap; }
.brew-copy {
  border: 0; background: #26262a; color: var(--pixel); font: 500 var(--step-small)/1 var(--font);
  padding: 0 16px; cursor: pointer; transition: background-color .16s var(--ease), transform .12s var(--ease);
}
.brew-copy:hover { background: #333338; }
.brew-copy:active { transform: scale(.96); }
.brew-copy.is-done { background: var(--accent); color: var(--accent-ink); }

/* showcase: the app window */
.showcase {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end;
  padding: clamp(120px, 14vw, 200px) var(--m) 0;
}
.showcase-side { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 18px; align-self: stretch; }
.showcase-side h2 { margin-bottom: auto; padding-bottom: 32px; }
.showcase-side p { max-width: 34ch; }
.showcase-side .soft { font-size: var(--step-small); }

.app {
  grid-column: 5 / span 8; background: var(--app-window); color: #ecebe3;
  padding: clamp(14px, 1.6vw, 22px); display: grid; gap: clamp(12px, 1.4vw, 20px);
}
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--step-small); }
.app-title { display: flex; flex-direction: column; line-height: 1.2; }
.app-title span { color: #98968f; }
.app-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.app-tools span { background: #232326; padding: 5px 10px; border-radius: 999px; }
.app-tools .on { background: #ecebe3; color: #111; }
.app-tools .rec { color: #ff5a4e; }
.app-tools i { width: 10px; }
.app-device {
  background: var(--app-body); border-radius: 18px; padding: clamp(14px, 2vw, 30px);
  display: grid; grid-template-columns: 1fr auto; gap: clamp(14px, 2.4vw, 36px); align-items: center;
}
.app-screen { width: 100%; aspect-ratio: 2 / 1; background: var(--oled); border-radius: 6px; image-rendering: pixelated; }
.app-controls { display: grid; grid-template-columns: repeat(2, auto); gap: clamp(8px, 1.2vw, 18px) clamp(12px, 1.6vw, 24px); }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ctl em { font-style: normal; font-size: 13px; color: #98968f; }
.key, .knob { display: block; border-radius: 50%; background: #2e2e32; }
.key { width: clamp(26px, 2.6vw, 40px); height: clamp(26px, 2.6vw, 40px); }
.knob { width: clamp(34px, 3.6vw, 54px); height: clamp(34px, 3.6vw, 54px); position: relative; background: #19191c; }
.knob::after { content: ""; position: absolute; left: 50%; top: 12%; width: 2px; height: 26%; background: #ecebe3; transform: translateX(-50%); }
.knob.r2 { transform: rotate(-40deg); }
.knob.r3 { transform: rotate(70deg); }

.grid16 { display: grid; grid-template-columns: repeat(16, 1fr); gap: clamp(3px, .45vw, 7px); }
.grid16 b { aspect-ratio: 1; border-radius: 3px; background: var(--pad-off); position: relative; }
.grid16 b::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--pixel); opacity: var(--l, 0); transition: opacity .08s linear; }
.app-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(10px, 1.2vw, 16px); }
.app-grid { background: var(--app-panel); border-radius: 14px; padding: clamp(10px, 1.4vw, 20px); align-content: center; }
.app-arc { background: var(--app-panel); border-radius: 14px; padding: clamp(10px, 1.4vw, 20px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1vw, 14px); align-content: center; }
.app-arc svg { width: 100%; height: auto; }

/* features */
.features {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
  padding: clamp(160px, 18vw, 260px) var(--m) clamp(40px, 6vw, 80px);
}
.features h2 { grid-column: 1 / -1; margin-bottom: 72px; }
.feature-cols { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.feature-cols ul { grid-column: span 3; line-height: 1.3; }
.feature-cols li { color: var(--muted); cursor: default; transition: color .16s var(--ease); padding: 1px 0; }
.feature-cols li.group { color: var(--ink); margin-bottom: 1.3em; font-weight: 500; }
.feature-cols li:not(.group):hover, .feature-cols li.is-on { color: var(--ink); }
.feature-desc { grid-column: 10 / span 3; align-self: start; max-width: 28ch; min-height: 4.5em; transition: opacity .2s var(--ease); }

/* scripts index with preview */
.scripts {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
  padding: clamp(120px, 14vw, 200px) var(--m) 0; align-items: start;
}
.scripts-list { grid-column: 1 / span 5; }
.scripts-list h2 { margin-bottom: 12px; }
.scripts-list > p { margin-bottom: 32px; font-size: var(--step-small); }
.index li button {
  all: unset; box-sizing: border-box; width: 100%; min-height: 38px; cursor: pointer;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  transition: opacity .2s var(--ease);
}
.index li button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.index .who { display: flex; gap: 8px; align-items: baseline; }
.index .dot { width: 10px; height: 10px; background: var(--ink); align-self: center; opacity: 0; transform: scale(.96); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.index .is-on .dot { opacity: 1; transform: none; }
.index .by { color: var(--muted); }
.index .what { color: var(--muted); font-size: var(--step-small); text-align: right; font-variant-numeric: tabular-nums; }
.index:hover li button:not(:hover) { opacity: .45; }
.preview {
  grid-column: 7 / span 6; position: sticky; top: 76px;
  background: var(--app-window); padding: clamp(14px, 1.8vw, 26px); display: grid; gap: clamp(12px, 1.4vw, 20px);
}
.preview img { width: 100%; aspect-ratio: 2 / 1; background: var(--oled); image-rendering: pixelated; border-radius: 6px; }
.preview-grid { background: var(--app-panel); border-radius: 12px; padding: clamp(10px, 1.2vw, 16px); }
.preview figcaption { color: #ecebe3; font-size: var(--step-small); min-height: 1.5em; }
.preview figcaption strong { color: #fff; }

/* hardware: photographs */
.hardware { padding: clamp(160px, 18vw, 260px) var(--m) 0; }
.hw-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); margin-bottom: 40px; }
.hw-head h2 { grid-column: 1 / span 3; }
.hw-head p { grid-column: 4 / span 6; max-width: 52ch; }
.hw-row { display: flex; align-items: flex-end; gap: 8px; }
.hw-row figure { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hw-row figcaption { font-size: var(--step-small); color: var(--muted); }
.hw-big { flex: 5.2; }
.hw-tall { flex: 1.75; }
.hw-small { flex: 2.6; }
.hw-row img { width: 100%; object-fit: cover; }
.hw-big img { aspect-ratio: 4 / 3; }
.hw-tall img { aspect-ratio: 9 / 16; }
.hw-small img { aspect-ratio: 4 / 3; }

/* steps */
.steps { padding: clamp(160px, 18vw, 240px) var(--m) 0; }
.steps-title { margin-bottom: 48px; }
.steps-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); align-items: start; }
.steps-row li { display: flex; flex-direction: column; }
.steps-row h3 { font-size: var(--step-body); font-weight: 500; margin-bottom: 8px; }
.steps-row p { font-size: var(--step-small); max-width: 32ch; }
.steps-row img { margin-top: var(--gap); width: 100%; aspect-ratio: 2 / 1; background: var(--oled); image-rendering: pixelated; }

/* credits: statement with a screen as the drop cap */
.credits {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
  padding: clamp(160px, 18vw, 260px) var(--m) 0;
}
.credits-facts { grid-column: 1 / span 2; display: flex; flex-direction: column; gap: 10px; font-size: var(--step-small); padding-top: .4em; }
.credits-facts p { color: var(--muted); }
.credits-facts strong { color: var(--ink); display: block; }
.credits-text { grid-column: 3 / span 10; display: flex; flex-direction: column; gap: 1.2em; }
.credits-text p { font-size: clamp(1.375rem, .9rem + 1.5vw, 2.25rem); line-height: 1.2; letter-spacing: -0.02em; max-width: 46ch; }
.credits-text p.credits-body { font-size: var(--step-body); line-height: 1.5; letter-spacing: -0.01em; max-width: 60ch; }
.credits-text a { color: var(--ink); text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: .06em; }
.dropcap { float: left; height: 3.6em; width: 7.2em; margin: .12em .45em 0 0; background: var(--oled); image-rendering: pixelated; }

/* faq */
.faq {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
  padding: clamp(160px, 18vw, 260px) var(--m) 0;
}
.faq h2 { grid-column: 1 / span 3; }
.faq-text { grid-column: 5 / span 8; columns: 2; column-gap: 56px; }
.faq-text p { break-inside: avoid; margin-bottom: 20px; line-height: 1.55; }
.faq-text strong { color: var(--ink); }

/* cta */
.cta { padding: clamp(160px, 22svh, 260px) var(--m) clamp(120px, 16svh, 200px); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; }
.cta-text { grid-column: 1 / span 5; }
.cta-screen { grid-column: 7 / span 6; background: var(--app-window); padding: clamp(14px, 1.8vw, 26px); display: grid; gap: 12px; }
.cta-screen video { width: 100%; height: auto; aspect-ratio: 2 / 1; background: var(--oled); border-radius: 6px; }
.cta-screen figcaption { color: #ecebe3; font-size: var(--step-small); }
.cta p { font-size: var(--step-lead); max-width: 34ch; line-height: 1.25; letter-spacing: -0.02em; }
.cta-actions { margin-top: 24px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* footer of tiles */
.tiles {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; padding: 0 var(--m) var(--m);
}
.tile { background: var(--surface); padding: 20px; min-height: 220px; display: flex; flex-direction: column; }
.t-statement { grid-column: span 4; justify-content: space-between; }
.t-statement p { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.02em; max-width: 18ch; }
.t-statement small { font-size: 13px; color: var(--muted); max-width: 46ch; }
.t-nav { grid-column: span 3; gap: 4px; }
.t-nav a, .t-links a { color: var(--ink); }
.t-place { grid-column: span 2; }
.t-place p { font-size: var(--step-small); color: var(--muted); }
.t-links { grid-column: span 3; justify-content: flex-end; gap: 4px; font-size: var(--step-lead); letter-spacing: -0.02em; }
.t-word {
  grid-column: span 8; min-height: 320px; background: var(--field-1); color: var(--field-1-ink);
  font-size: clamp(2.5rem, 7.6vw, 9rem); letter-spacing: -0.05em; line-height: .9;
  align-items: center; justify-content: center; white-space: nowrap;
}
.t-go {
  grid-column: span 4; min-height: 320px; background: var(--accent); color: var(--accent-ink);
  justify-content: space-between; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em;
  transition: background-color .2s var(--ease);
}
.t-go:hover { text-decoration: none; background: #1440c4; }
.t-go svg { width: 64px; height: 64px; align-self: flex-end; fill: none; stroke: currentColor; stroke-width: 4; transition: transform .24s var(--ease); }
.t-go:hover svg { transform: translateY(6px); }

/* entrances */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .run { opacity: 0; transform: translateY(14px); }
.js .run.is-in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .run { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* tablet */
@media (max-width: 1024px) {
  .showcase-side { grid-column: 1 / -1; }
  .showcase-side h2 { margin-bottom: 0; padding-bottom: 0; }
  .app { grid-column: 1 / -1; }
  .scripts-list { grid-column: 1 / span 6; }
  .preview { grid-column: 7 / span 6; }
  .feature-cols ul { grid-column: span 4; }
  .feature-desc { grid-column: 1 / -1; margin-top: 24px; }
  .faq h2 { grid-column: 1 / -1; }
  .faq-text { grid-column: 1 / -1; }
  .credits-facts { grid-column: 1 / -1; flex-direction: row; gap: 32px; }
  .credits-text { grid-column: 1 / -1; }
  .t-statement { grid-column: span 6; }
  .t-nav { grid-column: span 6; }
  .t-place { grid-column: span 6; }
  .t-links { grid-column: span 6; }
  .t-word, .t-go { grid-column: 1 / -1; }
  .hw-head h2, .hw-head p { grid-column: 1 / -1; }
  .steps-row { grid-template-columns: repeat(3, 1fr); row-gap: 48px; }
  .cta-text, .cta-screen { grid-column: 1 / -1; }
  .cta { row-gap: 48px; }
  .app-bottom { grid-template-columns: 1fr; }
  .app-arc { display: none; }
}

/* phone */
@media (max-width: 640px) {
  .bar nav { display: none; }
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split .name { font-size: 12.4vw; }
  .split-field { padding: 32px var(--m); }
  .split-field .free { width: 100%; }
  .sheet { gap: 20px 14px; }
  .run-frames { gap: 4px; }
  .run-frames img { width: calc((100vw - 2 * var(--m) - 8px) / 3); }
  .name { margin-left: 0; }
  .app-tools { display: none; }
  .app-device { grid-template-columns: 1fr; }
  .app-controls { grid-template-columns: repeat(6, auto); justify-content: space-between; }
  .scripts-list, .preview { grid-column: 1 / -1; }
  .preview { position: relative; top: 0; order: -1; }
  .scripts { row-gap: 32px; }
  .index li button { min-height: 44px; }
  .feature-cols { row-gap: 40px; }
  .feature-cols ul { grid-column: 1 / -1; font-size: 18px; line-height: 1.4; }
  .feature-desc { display: none; }
  .hw-row { flex-wrap: wrap; }
  .hw-big { flex: 1 1 100%; }
  .hw-tall, .hw-small { flex: 1 1 calc(50% - 4px); }
  .hw-tall img, .hw-small img { aspect-ratio: 3 / 4; }
  .steps-row { grid-template-columns: 1fr 1fr; gap: 32px 12px; }
  .steps-row img { margin-top: calc(var(--gap) / 2.5); }
  .faq-text { columns: 1; }
  .credits-facts { flex-direction: column; gap: 8px; }
  .dropcap { height: 4.8em; width: 9.6em; }
  .tiles { gap: 6px; }
  .t-word { order: -2; min-height: 160px; }
  .t-go { order: -1; min-height: 200px; }
  .t-nav, .t-links { grid-column: span 6; }
  .t-statement, .t-place { grid-column: 1 / -1; }
  .tile { min-height: 0; }
}
