:root {
  --paper: #e8e6e1;
  --paper-2: #dedbd4;
  --ink: #161616;
  --ink-2: #55534e;
  --rule: rgb(22 22 22 / .14);
  --signal: #f05a1e;
  --panel-dark: #1a1b1e;
  --panel-lit: #c9cac8;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
kbd {
  font-family: var(--mono); font-size: .78em; padding: .08em .5em .12em; border-radius: 5px;
  background: #fbfaf7; border: 1px solid var(--rule); box-shadow: 0 2px 0 var(--rule); white-space: nowrap;
}
.mono { font-family: var(--mono); font-size: .85em; }

/* ---------------------------------------------------------------- the stage: one 3D canvas behind everything */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; opacity: 0; transition: opacity .9s ease; }
#stage.ready { opacity: var(--stage-o, 1); transition: none; }
#leaders { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2; pointer-events: none; overflow: visible; }
#leaders { color: var(--ink); }
#leaders polyline { stroke-width: 1; }
#leaders circle { fill: var(--signal); }
#leaders text { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; fill: var(--ink); text-transform: uppercase; }
main, .bar, .foot { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  background: rgb(232 230 225 / .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);   /* the paper: the page scrolls under it */
}
.bar nav { display: flex; gap: 20px; margin-left: auto; }
.bar nav a { text-decoration: none; opacity: .7; }
.bar nav a:hover { opacity: 1; }
.mark { font-family: var(--mono); font-weight: 700; font-style: italic; font-size: 22px; text-transform: none; letter-spacing: 0; text-decoration: none; }
.crumb { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.maker { text-decoration: none; opacity: .7; }
.maker:hover { opacity: 1; }
.crumb .sep { opacity: .35; }
.code { opacity: .55; }
@media (max-width: 760px) { .bar nav { display: none; } .code { margin-left: auto; } }
@media (max-width: 440px) { .code { display: none; } }

/* ---------------------------------------------------------------- type */
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 18px; }
h1, h2 { font-weight: 500; letter-spacing: -.035em; line-height: .98; margin: 0 0 24px; }
h1 { font-size: clamp(44px, 5.4vw, 86px); }
h1 em { font-family: var(--mono); font-style: italic; font-weight: 700; letter-spacing: -.06em; color: var(--signal); }
h2 { font-size: clamp(34px, 4.6vw, 68px); }
h3 { font-size: 19px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 8px; }
.lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; max-width: 34em; margin: 0 0 24px; color: #2a2926; }
.narrow { max-width: 30em; }
.small { font-size: 14px; color: var(--ink-2); max-width: 36em; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 140px 0; }

/* ---------------------------------------------------------------- hero */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 0 var(--gutter) 9vh; }
.hero-copy { max-width: 44%; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 1px; height: 46px; background: var(--rule); overflow: hidden; }
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { to { top: 100%; } }
@media (max-width: 760px) {
  /* the copy starts under the slab (posed 72 mm over the middle, 150 mm across the screen: its near edge 24vw above it),
     so a short phone scrolls to the end rather than putting the slab over the words; the cue stays under them */
  .hero { align-items: flex-end; padding-top: calc(50svh - 24vw + 24px); padding-bottom: 92px; }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: 46px; }
}

/* ---------------------------------------------------------------- where it sits */
.between { background: var(--paper); }
.flow { margin: 56px 0 0; }
.flow svg { width: 100%; height: auto; display: block; overflow: visible; }
.flow figcaption { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.svg-label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; fill: var(--ink-2); }
.svg-screen { font-family: var(--mono); font-style: italic; font-weight: 700; font-size: 26px; fill: var(--panel-lit); }
.svg-typed { font-family: var(--mono); font-size: 14px; fill: var(--ink); }
.packet { fill: var(--signal); }
.packet-out { fill: var(--ink); }

/* ---------------------------------------------------------------- try it */
.try { background: var(--paper-2); }
.try-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.profiles { list-style: none; padding: 0; margin: 28px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.profiles button {
  font: 500 15px var(--sans); padding: 8px 14px 9px; border-radius: 999px; border: 1px solid var(--rule); background: transparent;
  cursor: pointer; display: inline-flex; gap: 8px; align-items: center; color: var(--ink);
}
.profiles button kbd { font-size: 11px; }
.profiles button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.profiles button[aria-pressed="true"] kbd { background: #333; color: #ddd; border-color: #444; box-shadow: none; }
.device {
  position: relative; aspect-ratio: 98 / 81.3; border-radius: 10px; padding: 4.5% 4.6% 10.4%;
  background: linear-gradient(160deg, #e4e4e1, #bdbdb9 60%, #a9a9a5); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .45), inset 0 1px 0 #fff;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.device.hop { transform: translateY(-4px) rotate(-.4deg); }
.device canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; border-radius: 2px; background: var(--panel-dark);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .4); }
.out-label { display: block; margin: 28px 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
#out {
  width: 100%; height: 132px; resize: vertical; font: 17px/1.5 var(--mono); padding: 14px 16px; color: var(--ink);
  background: #f6f5f1; border: 1px solid var(--rule); border-radius: 8px; outline: none;
}
#out:focus { border-color: var(--ink); }
.try-buttons { display: flex; gap: 10px; margin-top: 12px; }
button#autotype, button#clear {
  font: 500 15px var(--sans); padding: 10px 18px; border-radius: 999px; cursor: pointer; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
}
button.ghost { background: transparent !important; color: var(--ink) !important; border-color: var(--rule) !important; }
@media (max-width: 860px) { .try-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- the chords' tricks */
.chords-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "head device" "body device";
  gap: 0 clamp(32px, 6vw, 96px); align-items: start; }
.chords-head { grid-area: head; }
.chords-body { grid-area: body; }
.chord-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 12px 0 20px; }
.chord-cols .label { margin: 0 0 6px; }
.chord-list { list-style: none; margin: 0 0 24px; padding: 0; }
.chord-list li { border-top: 1px solid var(--rule); }
.chord-list button {
  display: grid; grid-template-columns: 1fr; gap: 2px; width: calc(100% + 20px); text-align: left; padding: 12px 10px 13px;
  margin: 0 -10px; font: inherit; color: inherit; background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.chord-list button:hover { background: rgb(22 22 22 / .05); }
.chord-list button:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.chord-list .keys { font-family: var(--mono); font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chord-list .keys kbd { font-size: 11px; }
.chord-list b { font-weight: 500; font-size: 17px; margin-top: 4px; }
.chord-list b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 9px; border-radius: 50%; vertical-align: 2px;
  background: transparent; box-shadow: inset 0 0 0 1px var(--rule); transition: background .2s; }
.chord-list button:not([aria-pressed]) b::after { display: none; }
.chord-list button[aria-pressed="true"] b::after { background: var(--signal); box-shadow: none; }
.chord-list .what { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.chord-device { grid-area: device; position: sticky; top: 90px; }
.chord-out { min-height: 1.6em; margin: 18px 0 0; font: 17px/1.5 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.chord-out::after { content: "▍"; color: var(--signal); animation: blink 1s steps(1) infinite; }
.chord-out:empty::after { content: none; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 1060px) { .chord-cols { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .chords-grid { grid-template-columns: 1fr; grid-template-areas: "head" "device" "body"; }
  .chord-device { top: 0; z-index: 3; background: var(--paper); margin: 0 calc(-1 * var(--gutter)); padding: 56px var(--gutter) 8px; }
  .chord-list button { scroll-margin-top: 360px; }       /* under the screen, not behind it */
  .chord-device .device { width: min(100%, 300px); margin: 0 auto; }
  .chord-out { text-align: center; font-size: 15px; margin-top: 10px; }
}

/* ---------------------------------------------------------------- apart: a tall section, the model held still while it comes apart */
.apart { height: 420vh; padding: 0; }
.apart-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding: 0 var(--gutter); }
.apart-copy { width: min(380px, 34vw); }
.layers { list-style: none; padding: 0; margin: 0; counter-reset: layer; }
.layers li { padding: 12px 0; border-top: 1px solid var(--rule); opacity: .32; transition: opacity .35s; counter-increment: layer; }
.layers li.on { opacity: 1; }
.layers b { display: block; font-weight: 500; font-size: 18px; }
.layers b::before { content: "0" counter(layer) "  "; font-family: var(--mono); font-size: 11px; color: var(--signal); white-space: pre; }
.layers span { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 760px) {
  .apart-sticky { align-items: flex-end; padding-bottom: 4vh; }
  .apart-copy { width: 100%; }
  .apart h2 { font-size: 30px; margin-bottom: 10px; }
  .layers li { max-height: 0; overflow: hidden; padding: 0; border: 0; opacity: 0; }   /* hidden, but still counted */
  .layers li.current { max-height: 12em; padding: 6px 0; opacity: 1; }
}

/* ---------------------------------------------------------------- the screens */
.screens { background: #111214; color: #e9e7e2; }
.screens .label, .screens .small { color: #8d8b86; }
.screens .lede { color: #c9c7c1; }
.screen-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 56px 0 28px; }
.screen-cards figure { margin: 0; }
.panel { background: var(--panel-dark); border-radius: 6px; padding: 14px; box-shadow: inset 0 0 0 1px #2c2d31; }
.panel img, .panel canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.screen-cards figcaption { margin-top: 14px; font-size: 15px; color: #b5b3ad; }
.screen-cards figcaption b { display: block; color: #fff; font-weight: 500; font-size: 18px; margin-bottom: 2px; }
@media (max-width: 860px) { .screen-cards { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- features */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--rule); }
.grid article { padding: 26px 24px 30px 0; border-bottom: 1px solid var(--rule); }
.grid article:not(:nth-child(4n)) { border-right: 1px solid var(--rule); }
.grid article:not(:nth-child(4n + 1)) { padding-left: 24px; }
.grid p { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 1060px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid article { border-right: 0 !important; padding-left: 0 !important; }
  .grid article:nth-child(odd) { border-right: 1px solid var(--rule) !important; padding-right: 24px; }
  .grid article:nth-child(even) { padding-left: 24px !important; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .grid article:nth-child(n) { border-right: 0 !important; padding: 22px 0 !important; }
}

/* ---------------------------------------------------------------- the back */
.back { min-height: 130vh; display: flex; align-items: center; }
.back-grid { width: 100%; }
.back-grid > div { max-width: 420px; }
.finish-label { margin-top: 36px; }
.finishes { display: flex; flex-wrap: wrap; gap: 8px; }
.finishes button {
  font: 500 15px var(--sans); display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 8px 8px;
  border-radius: 999px; border: 1px solid var(--rule); background: transparent; cursor: pointer; color: var(--ink);
}
.finishes i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.finishes button[aria-checked="true"] { border-color: var(--ink); }
@media (max-width: 760px) { .back { align-items: flex-end; } }

/* ---------------------------------------------------------------- the board */
.inside { background: var(--paper-2); }
.inside-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.board-shot { margin: 0; }
.board-shot img { display: block; width: 100%; height: auto; }
.chips { margin: 28px 0 0; display: grid; gap: 0; }
.chips div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.chips dt { font-family: var(--mono); font-size: 13px; padding-top: 2px; }
.chips dd { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 860px) { .inside-grid { grid-template-columns: 1fr; } .chips div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------------------------------------------------------------- make it yours */
.hack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--rule); }
.hack-grid article { padding: 26px 28px 30px 0; }
.hack-grid article + article { padding-left: 28px; border-left: 1px solid var(--rule); }
.hack-grid p { margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.steps { margin: 0 0 14px; padding-left: 1.3em; font-size: 15px; }
.steps li { margin-bottom: 6px; }
.steps li::marker { font-family: var(--mono); color: var(--signal); }
.pins { margin: 18px 0 0; font-size: 13px; }
.pins div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); }
.pins dt { font-family: var(--mono); font-size: 12px; }
.pins dd { margin: 0; color: var(--ink-2); }
.hack-code { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.hack-code figure { margin: 0; min-width: 0; }
.hack-code figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 8px; }
.hack-code pre { margin: 0; padding: 18px 20px; background: var(--panel-dark); color: var(--panel-lit); border-radius: 8px; overflow-x: auto;
  font: 13.5px/1.6 var(--mono); }
@media (max-width: 960px) {
  .hack-grid { grid-template-columns: 1fr; }
  .hack-grid article, .hack-grid article + article { padding: 22px 0; border-left: 0; }
  .hack-grid article + article { border-top: 1px solid var(--rule); }
  .hack-code { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- specs */
.specs table { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 16px; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 14px 0; border-top: 1px solid var(--rule); }
.specs th { width: 220px; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding-top: 17px; }
@media (max-width: 600px) { .specs th { width: 120px; } }

/* ---------------------------------------------------------------- foot */
.foot { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; padding: 40px var(--gutter) 48px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.small-mark { font-size: 18px; color: var(--ink); }
.foot .mono { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue span, .chord-out::after { animation: none; }
}
