/*
 * The front page — the pinboard.
 *
 * Uses the tokens and components defined in site.css; nothing here redefines a
 * colour, a radius or a shadow. The documents are a notebook, so they stay calm
 * and linear. This page is the wall the notes are pinned to, so it is allowed to
 * tilt things, overlap them and stick tape on them.
 *
 * One deliberate exception to the paper aesthetic: the two terminal blocks stay
 * dark and literal. Everything else here is an illustration of the product, but
 * those are machine output — the git log especially, which is what
 * `npm run demo:provenance` genuinely prints. Drawing real output on a sticky
 * note would make the one verifiable thing on the page look staged, so it keeps
 * the screen it came off.
 */

.landing main { max-width: 64rem; padding: 0 24px 40px; }

.landing section { padding: 72px 0; border-bottom: 3px dashed var(--muted); }
.landing section:last-of-type { border-bottom: 0; }

/* A sticky-note tag, used as the section label. */
.eyebrow {
  display: inline-block;
  font-family: var(--marker-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--postit);
  border: 2px solid var(--ink);
  border-radius: var(--wobbly-sm);
  padding: 3px 12px 4px;
  margin: 0 0 16px;
  transform: rotate(-2deg);
  box-shadow: var(--shadow-sm);
}

.section-head { max-width: 60ch; margin: 0 0 44px; }
.section-head h2 {
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 14px;
  background: none;
  padding: 0;
  transform: rotate(-0.6deg);
  transform-origin: left center;
  text-wrap: balance;
}
.section-head p { color: var(--ink-soft); margin: 0; font-size: 1.15rem; }

/* ---------------- hero ---------------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
  padding: 44px 0 64px;
  border-bottom: 0;
}

.kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: clamp(2.4rem, 7.4vw, 4rem);
  line-height: 1.02;
  margin: 0 0 22px;
  transform: rotate(-1.2deg);
  transform-origin: left center;
}

.hero .lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 0 30px;
}

.cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }

/*
 * The button presses flat: the shadow is the gap between the paper and the
 * board, so pushing it down closes that gap rather than blurring it.
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-family: var(--hand);
  font-size: 1.2rem;
  padding: 10px 28px;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--wobbly-pill);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 100ms ease, box-shadow 100ms ease,
    background-color 100ms ease, color 100ms ease;
}
.btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 2px 2px 0 0 var(--ink);
  transform: translate(2px, 2px);
}
.btn:active { box-shadow: none; transform: translate(4px, 4px); }
.btn.secondary { background: var(--muted); }
.btn.secondary:hover { background: var(--pen); color: #fff; }

.cta-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.cta-facts li {
  font-size: 1.02rem;
  color: var(--ink-soft);
  padding-left: 30px;
  position: relative;
  max-width: none;
  margin: 0;
}
/* A biro tick rather than a bullet. */
.cta-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 18px;
  height: 18px;
  background: var(--tick) center / contain no-repeat;
}

/* Pinned to the board with a tack, and slightly askew. */
.hero-shot { position: relative; justify-self: start; }
.hero-shot img {
  display: block;
  width: 320px;
  max-width: 100%;
  height: auto;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--wobbly-sm);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.4deg);
}
.hero-shot::after {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 58% 42% 47% 53% / 50% 55% 45% 50%;
  box-shadow: 2px 2px 0 0 rgb(45 45 45 / 0.35);
}

/* ---------------- band ---------------- */

.band {
  position: relative;
  background: var(--paper-2);
  border-block: 3px dashed var(--muted);
  margin-inline: calc(50% - 50vw);
  padding: 72px calc(50vw - 50%);
}
.band-inner { max-width: 44rem; margin: 0 auto; text-align: center; }
.band h2 {
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 14px;
  transform: rotate(-0.7deg);
  text-wrap: balance;
}
.band-lede { color: var(--ink-soft); margin: 0 auto 30px; max-width: 52ch; font-size: 1.15rem; }
.band-note {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 58ch;
  margin: 22px auto 0;
  text-align: left;
}

/* ---------------- terminals (the deliberate exception) ---------------- */

.term {
  background: #232323;
  border: 3px solid var(--ink);
  border-radius: var(--wobbly-sm);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-lg);
  transform: rotate(-0.5deg);
}
.term-bar {
  display: flex;
  gap: 8px;
  padding: 11px 14px;
  background: #333;
  border-bottom: 2px dashed #4a4a4a;
}
.term-bar span {
  width: 12px;
  height: 12px;
  background: #555;
  border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
}
.term pre {
  margin: 0;
  padding: 18px 20px 20px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
}
.term code {
  background: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  color: #ded9d0;
}
.term.small code { font-size: 13px; }
.term .p { color: #8a8175; }
.term .s { color: #9fc98a; }
.term .who { color: #ffb454; }

/* ---------------- diagram ---------------- */

.diagram { width: 100%; height: auto; display: block; overflow: visible; }
.dg-node path { fill: var(--card); stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.dg-you path.dg-box { fill: var(--postit); stroke: var(--ink); stroke-width: 3.2; }
.dg-relay path.dg-box { fill: var(--muted); stroke: var(--ink); stroke-width: 3.2; }

.dg-handle text, .dg-handle-t {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink);
}
.dg-relay-t {
  font-family: var(--marker-font);
  font-size: 19px;
  font-weight: 700;
  fill: var(--ink);
}
.dg-you-tag {
  font-family: var(--marker-font);
  font-size: 14px;
  font-weight: 700;
  fill: var(--marker);
}
.dg-sub, .dg-sub text {
  font-family: var(--hand);
  font-size: 14px;
  fill: var(--ink-soft);
}
.dg-line path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 9 7;
}
.dg-note text {
  font-family: var(--marker-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  fill: var(--marker);
}

/* ---------------- features ---------------- */

.feature { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }

.feature-copy h2 {
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  line-height: 1.14;
  margin: 0 0 14px;
  transform: rotate(-0.5deg);
  transform-origin: left center;
  text-wrap: balance;
}
.feature-copy p { color: var(--ink-soft); margin: 0 0 14px; max-width: 46ch; }
.feature-copy .muted { color: var(--ink-faint); font-size: 1.02rem; }

/* ---------------- index cards ---------------- */

.ui-card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--wobbly-md);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  font-size: 1.02rem;
  transform: rotate(-1deg);
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.ui-card:hover { transform: rotate(0.8deg); box-shadow: var(--shadow-lg); }

.ui-head {
  font-family: var(--marker-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--marker);
  margin-bottom: 14px;
}

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.log li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  align-items: baseline;
  margin: 0;
  max-width: none;
  line-height: 1.5;
}
.log li::before { content: none; }
.log .ok { color: var(--green); font-weight: 700; }
.log .bad { color: var(--marker); font-weight: 700; }
.log b { font-family: var(--marker-font); font-weight: 700; }
.log code { font-size: 0.82em; }
.log .on { color: var(--marker); font-style: italic; }

/* The approval card is the one thing that stops you, so it wears the tape. */
.ui-card.approval { border-width: 3px; transform: rotate(1deg); }
.ui-card.approval::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 26px;
  width: 74px;
  height: 22px;
  transform: rotate(-4deg);
  background: rgb(255 77 77 / 0.22);
  border-left: 1px dashed rgb(45 45 45 / 0.25);
  border-right: 1px dashed rgb(45 45 45 / 0.25);
}
.ui-title { font-family: var(--marker-font); font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.cmd {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--muted);
  padding: 10px 12px;
  border-radius: var(--wobbly-sm);
  margin-bottom: 14px;
  overflow-x: auto;
}
.ui-btns { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ui-btn {
  font-family: var(--hand);
  font-size: 0.98rem;
  padding: 6px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--wobbly-pill);
  box-shadow: 2px 2px 0 0 var(--ink);
}
.ui-btn.pri { background: var(--accent); color: #fff; }
.ui-btn.sec { background: var(--card); color: var(--ink); }
.ui-note { font-size: 0.88rem; color: var(--ink-faint); margin: 0; line-height: 1.5; }

/* ---------------- providers ---------------- */

.providers { display: grid; gap: 12px; }
.prov {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--wobbly-sm);
  padding: 13px 18px;
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.prov:nth-child(odd)  { transform: rotate(-0.8deg); }
.prov:nth-child(even) { transform: rotate(0.7deg); }
.prov:hover { transform: rotate(0); box-shadow: var(--shadow); }
.prov em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--ink-faint);
}

/* ---------------- roster + chat ---------------- */

.roster { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pres {
  font-family: var(--hand);
  font-size: 0.92rem;
  padding: 3px 12px 4px;
  border: 2px solid var(--ink);
  border-radius: var(--wobbly-pill);
  background: var(--card);
  color: var(--ink-soft);
}
.pres.you  { background: var(--postit); color: var(--ink); transform: rotate(-1.5deg); }
.pres.busy { background: var(--muted); }
.pres.idle { background: var(--muted); color: var(--ink-faint); border-style: dashed; }

.chat { display: grid; gap: 12px; }
.cm {
  border-left: 3px solid var(--ink);
  padding: 8px 0 8px 12px;
  font-size: 1rem;
  line-height: 1.5;
}
.cm b {
  display: block;
  font-family: var(--marker-font);
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.cm.sam  { border-left-color: var(--pen); }
.cm.sam b { color: var(--pen); }
.cm.kate { border-left-color: var(--marker); }
.cm.kate b { color: var(--marker); }
.cm.bot {
  border-left-color: var(--ink);
  border-left-style: dashed;
  background: var(--muted);
  border-radius: 0 var(--wobbly-sm) var(--wobbly-sm) 0;
  padding-right: 12px;
}
.cm.bot b { color: var(--ink-soft); }

/* ---------------- handoff ---------------- */

.ui-card.handoff { background: var(--postit); transform: rotate(1.2deg); }
.ho-task {
  font-family: var(--marker-font);
  font-size: 1.18rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.35;
  max-width: none;
}
.ho-meta { font-size: 0.98rem; color: var(--ink-soft); margin: 0 0 16px; max-width: none; }
.ho-meta b { font-family: var(--marker-font); color: var(--ink); }

/* ---------------- steps ---------------- */

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 40px; }
/*
 * min-width:0 is load-bearing. A grid item defaults to min-width:auto, so a
 * track will not shrink below its content's min-content width — and the long
 * command in steps 1 and 3 is one unbreakable line, so those two tracks grew
 * until step 2 was a single word wide. The code scrolls inside its own box
 * instead.
 */
ol.steps > li {
  counter-increment: step;
  max-width: none;
  position: relative;
  min-width: 0;
}
ol.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  position: static;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 58% 42% 50% 50% / 50% 55% 45% 50%;
  box-shadow: var(--shadow-sm);
  color: var(--marker);
  font-family: var(--marker-font);
  font-size: 1.3rem;
  font-weight: 700;
  transform: rotate(-3deg);
}
ol.steps h3 { font-family: var(--marker-font); font-size: 1.3rem; font-weight: 700; margin: 0 0 10px; }
ol.steps p { margin: 0 0 12px; color: var(--ink-soft); font-size: 1.05rem; }
/*
 * These three wrap rather than scroll. Elsewhere a long line scrolls inside its
 * box, but this is the section where somebody is copying a command out — a
 * command they can only see half of is the wrong trade in a three-column grid.
 */
ol.steps pre { margin: 0 0 12px; font-size: 0.82rem; max-width: 100%; }
ol.steps pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.muted { font-size: 1rem; color: var(--ink-faint); }

/* ---------------- footer ---------------- */

.site-foot { max-width: 64rem; }
.foot-cols { display: grid; gap: 34px; margin-bottom: 30px; }
.foot-h {
  font-family: var(--marker-font);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  display: inline-block;
  background: var(--wave-red) repeat-x 0 100%;
  background-size: 22px 8px;
  padding-bottom: 6px;
}
.foot-tag { max-width: 42ch; font-style: italic; }
/* One per line. inline-block let them run together as a paragraph — the
   line-through on hover only ever crosses the text, so block costs nothing. */
.foot-cols a {
  display: block;
  width: fit-content;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 1.02rem;
}
/* Crossed out, like a job done. */
.foot-cols a:hover { color: var(--marker); text-decoration: line-through 2px; }
.foot-legal { margin: 0; padding-top: 22px; border-top: 3px dashed var(--muted); }

/* ---------------- responsive ---------------- */

@media (min-width: 768px) {
  .landing section { padding: 84px 0; }
  .hero { grid-template-columns: 1fr 380px; gap: 56px; padding: 64px 0 84px; }
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature.reverse .feature-copy { order: 2; }
  ol.steps { grid-template-columns: repeat(3, 1fr); }
  .foot-cols { grid-template-columns: 2fr 1fr 1fr; }
}

@media (max-width: 767px) {
  /* Less tilt on a narrow screen, where rotation costs real width. */
  .hero h1, .section-head h2, .feature-copy h2, .band h2 { transform: none; }
  .ui-card, .ui-card.approval, .ui-card.handoff,
  .prov, .term, .hero-shot img { transform: rotate(-0.5deg); }
  .btn { width: 100%; }
  .band { padding-block: 56px; }
}

/* ---------------- the room, drawn ---------------- */

/*
 * The hero used to be a 320px PNG of the real panel. Two problems: the source
 * had text clipped at its right edge, which reads as a rendering fault, and a
 * photographic element on a page where everything else is drawn put two visual
 * registers side by side. Rebuilt from the same parts as the cards further down,
 * so the whole page is one register and only the terminals are literal.
 */
.hero-shot { position: relative; justify-self: start; width: 100%; }

.room {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--wobbly-md);
  box-shadow: var(--shadow-lg);
  padding: 16px 18px 18px;
  transform: rotate(1.2deg);
  font-size: 0.95rem;
}
.room > * + * { margin-top: 12px; }

.room-top { display: flex; align-items: center; gap: 9px; }
.room-code { font-family: var(--marker-font); font-weight: 700; font-size: 1.1rem; }
.room-byo {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  background: var(--postit);
  border: 2px solid var(--ink);
  border-radius: var(--wobbly-pill);
}

.room .roster { margin-bottom: 0; }
.room .chat { gap: 10px; }
.room .cm { font-size: 0.92rem; }

.room-log {
  background: var(--muted);
  border-radius: var(--wobbly-sm);
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.65;
}
.room-log-h {
  font-family: var(--marker-font);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--marker);
  margin-bottom: 6px;
}
.rl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl .ok { color: var(--green); font-weight: 700; }
.rl .bad { color: var(--marker); font-weight: 700; }
.rl em { color: var(--marker); font-style: italic; }
.rl code { font-size: 0.78rem; background: var(--card); }

.room-appr {
  border: 2px solid var(--ink);
  border-left-width: 4px;
  border-radius: var(--wobbly-sm);
  padding: 11px 13px;
  background: var(--card);
}
.ra-t { font-family: var(--marker-font); font-weight: 700; font-size: 0.92rem; margin-bottom: 8px; }
.room-appr .cmd { font-size: 0.74rem; margin-bottom: 10px; }
.room-appr .ui-btns { margin-bottom: 0; }
.room-appr .ui-btn { font-size: 0.84rem; padding: 4px 12px; }

.room-composer {
  border: 2px dashed var(--rule-strong);
  border-radius: var(--wobbly-pill);
  padding: 8px 14px;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

@media (max-width: 767px) { .room { transform: rotate(0.6deg); } }

.cta-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  margin: 18px 0 0;
}
