:root {
  --paper: #fbf7ef;
  --paper-deep: #f3ecdf;
  --ink: #141414;
  --muted: #5d574e;
  --orange: #f26b1d;
  --coral: #f0604d;
  --blue: #1f5fd1;
  --rule: rgb(20 20 20 / 0.06);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    18px/1.55 ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  background:
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--paper);
}
a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--orange);
}
code {
  font: 0.86em var(--mono);
  background: var(--paper-deep);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}
.hand {
  font-family: var(--hand);
  font-weight: 700;
}
h1,
h2,
h3,
.lede {
  text-wrap: balance;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 2rem;
}
section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Mode switch: one page, two readers. */
html[data-mode="human"] .agent-view,
html[data-mode="agent"] .human-view {
  display: none;
}
.mode {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper);
}
.mode .long {
  white-space: pre;
}
.mode button {
  font: 600 0.85rem var(--display);
  border: 0;
  background: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
}
html[data-mode="human"] [data-set-mode="human"],
html[data-mode="agent"] [data-set-mode="agent"] {
  background: var(--ink);
  color: var(--paper);
}

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1.5rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font: 800 1.6rem var(--display);
}
.brand .blob {
  width: 30px;
  height: 32px;
}
.nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.95rem;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover {
  color: var(--ink);
}
.gh {
  font-weight: 600;
}

/* Hero */
.hero {
  padding-top: 3rem;
  text-align: center;
}
.kicker {
  color: var(--blue);
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  transform: rotate(-2deg);
}
h1 {
  font-size: clamp(3.4rem, 10vw, 7.5rem);
}
h1 span {
  display: block;
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 0.6rem;
}
.lede {
  max-width: 38rem;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: 1.2rem;
}

/* The artwork is black ink on white; multiply lets the paper and its rules show through. */
.hero-art img,
.how img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}
/* The hero art breaks out of the section to a wider band than the text. */
.hero-art {
  margin: 1.5rem calc(50% - min(50vw - 1rem, 660px)) 0;
}

.ctas {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  text-align: left;
}
.ctas .prompt {
  width: min(100%, 44rem);
}
.fine {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.8rem 0 0;
}
.fine.req {
  margin-top: 0.2rem;
  white-space: nowrap;
}

.prompt {
  position: relative;
  background: #fff4b8;
  padding: 1.4rem 1.4rem 1.2rem;
  border-radius: 4px;
  transform: rotate(0.5deg);
  box-shadow:
    0 1px 0 rgb(0 0 0 / 0.08),
    0 14px 28px -12px rgb(0 0 0 / 0.3);
}
.prompt::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 90px;
  height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgb(255 255 255 / 0.6);
  border: 1px solid rgb(0 0 0 / 0.06);
}
.prompt-label {
  margin: 0 0 0.4rem;
  color: var(--blue);
  font-size: 1.45rem;
}
.prompt blockquote {
  margin: 0 0 1rem;
  font: 1rem/1.55 var(--mono);
  overflow-wrap: break-word;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}
.open {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font: 800 1.05rem var(--display);
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--coral);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.open:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--coral);
}
.copy {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font: 700 0.95rem var(--display);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  color: var(--ink);
}
.copy:hover {
  background: var(--ink);
  color: var(--paper);
}
.prompt .copy {
  font-size: 1.05rem;
  padding: 0.6rem 1.25rem;
}
.copy-done:not(:empty) {
  color: var(--orange);
}

/* Launch film */
.film {
  padding-top: 1rem;
  text-align: center;
}
.film-label {
  color: var(--blue);
  font-size: 1.6rem;
  margin: 0 0 0.6rem;
}
.film-player {
  position: relative;
}
.film video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--orange);
}
.film .fine {
  margin-top: 1.4rem;
}
/* The whole poster is the play button; the circle sits in the gutter below the poster's headline. */
.film-play {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: none;
  cursor: pointer;
}
.film-play-icon {
  position: absolute;
  top: 76%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(3.5rem, 9vw, 5.5rem);
  height: clamp(3.5rem, 9vw, 5.5rem);
  border: 2.5px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--orange);
  transform: translate(-50%, -50%);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.film-play:hover .film-play-icon {
  transform: translate(calc(-50% - 2px), calc(-50% - 2px)) scale(1.06);
  box-shadow: 7px 7px 0 var(--orange);
}
.film-play:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
/* The triangle's centroid sits at the circle's centre, which is what reads as centred. */
.film-play-icon svg {
  display: block;
  width: 50%;
  fill: var(--paper);
}

/* Speech bubbles */
.asks h2 {
  text-align: center;
}
.asks ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem 1.1rem;
  justify-content: center;
}
.asks li {
  position: relative;
  max-width: 22rem;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 22px;
  padding: 0.9rem 1.15rem;
  font-size: 1.02rem;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(var(--tilt, -1deg));
  transition: transform 0.2s;
}
.asks li::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 26px;
  width: 18px;
  height: 18px;
  background: var(--paper);
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg) skew(10deg, 10deg);
}
.asks li:nth-child(3n + 2) {
  --tilt: 1.4deg;
  background: #ffe7dc;
}
.asks li:nth-child(3n + 2)::after {
  background: #ffe7dc;
}
.asks li:nth-child(4n) {
  --tilt: -2deg;
}
.asks li:hover {
  transform: rotate(0) scale(1.03);
}

/* How it works: art and copy side by side, alternating. */
.how article {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.2rem, 4vw, 3.5rem);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.how article:nth-of-type(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
}
.how article:nth-of-type(even) figure {
  order: 2;
}
.how figure {
  margin: 0;
}
.how-kicker {
  margin: 0;
  color: var(--orange);
  font-size: 1.45rem;
  line-height: 1;
}
.how h3 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0.4rem 0 0.6rem;
}
.how p:last-child {
  margin: 0;
  color: var(--muted);
}

.promises {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 0;
}
.promises div {
  border-top: 3px solid var(--ink);
  padding-top: 1rem;
}
.promises h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.promises p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Setup */
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: start;
}
/* The two directions carry equal weight. */
.directions .columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.directions code {
  font-size: 0.92em;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgb(20 20 20 / 0.18);
}
/* Steps read at body size here; the setup section keeps its quieter notes. */
.directions .for-humans p {
  color: var(--ink);
  font-size: 1rem;
}
.columns h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.columns h3 .hand {
  color: var(--orange);
  font-size: 1.1em;
  margin-right: 0.2rem;
}
.for-humans ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.for-humans li {
  counter-increment: step;
  position: relative;
  padding-left: 3.4rem;
  margin-bottom: 1.6rem;
}
.for-humans li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.2rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  font: 700 1.7rem var(--hand);
  border: 2.5px solid var(--ink);
  border-radius: 50% 46% 52% 48%;
  background: var(--paper);
}
.for-humans p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.terminal {
  background: var(--ink);
  color: #e9e4da;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--orange);
}
.dots {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: #262626;
}
.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #555;
}
.dots i:first-child {
  background: var(--coral);
}
.dots span {
  margin-left: 0.6rem;
  font: 0.8rem var(--mono);
  color: #9b958a;
}
.terminal pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  max-height: 30rem;
  overflow: auto;
  font: 0.78rem/1.6 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Agent view: the same page as plain text. */
.agent-view {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  font-family: var(--mono);
}
.agent-banner {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.agent-view pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 0.92rem/1.7 var(--mono);
  margin: 0;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 3rem 1.5rem 4rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}
.foot .blob {
  width: 26px;
  height: 28px;
  flex: none;
}

.blob .eyes circle {
  transition: transform 0.12s ease-out;
}

@media (max-width: 860px) {
  .columns,
  .directions .columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
  .promises {
    grid-template-columns: 1fr 1fr;
  }
  .how article,
  .how article:nth-of-type(even) {
    grid-template-columns: minmax(0, 1fr);
  }
  .how article:nth-of-type(even) figure {
    order: 0;
  }
  .nav,
  .bar .gh,
  .mode .long {
    display: none;
  }
  .mode {
    margin-left: auto;
  }
  .foot {
    flex-direction: column;
  }
}
