/* Obeya's type: Newsreader for titles, IBM Plex Sans Condensed for the rest (both OFL, licences beside them) */
@font-face { font-family: Newsreader; font-style: normal; font-weight: 300 800; font-display: swap; src: url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-condensed-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-condensed-latin-600-normal.woff2) format("woff2"); }
/* Noto Serif JP, cut down to the three characters of 大部屋 */
@font-face { font-family: "Obeya Kanji"; font-weight: 700; font-display: swap; src: url(fonts/obeya-kanji.woff2) format("woff2"); }

:root {
  /* the canvas's palette: card stock on a warm board, the states as inks */
  --paper: #eee8dc; --ink: #1f1b14; --muted: #6b6253; --line: #ddd5c4; --card: #fdfbf5;
  --blue: #1d5fe0; --amber: #f27405; --green: #3d9a1f; --pink: #dc2f5e; --grey: #a0978a; --purple: #7b4fd6;
  --shadow: 0 1px 0 rgba(95,75,35,.20), 1px 2px 0 rgba(95,75,35,.10), 0 4px 8px -4px rgba(60,45,20,.18);
  --serif: Newsreader, "Iowan Old Style", Georgia, serif;
  --wide: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink);
  font: 18px/1.55 "Plex Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; margin: 0; text-wrap: balance; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }

.top { max-width: var(--wide); margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; }
.top nav { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.top nav .gh { color: var(--ink); }

section { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.head { margin-bottom: 36px; }
.head h2, .start > h2 { font-size: clamp(28px, 3vw, 38px); }
.head p { color: var(--muted); margin: 10px 0 0; }

/* ---------- hero and film ---------- */
.hero { padding-top: 72px; max-width: 900px; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 20px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 66px); letter-spacing: -0.02em; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 680px; margin: 24px auto 0; }
.cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 3px; font-weight: 600; font-size: 15px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); }
.btn.primary { background: var(--ink); color: var(--card); border-color: var(--ink); }

.film { margin-top: 64px; }
.player { position: relative; margin: 0; border-radius: 4px; overflow: hidden; background: #000;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 24px 60px -20px rgba(28,27,25,.35); }
.player video { display: block; width: 100%; height: auto; }
.player .play { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.player .play[hidden] { display: none; }
.player .play svg { width: clamp(72px, 10.3%, 148px); height: auto; border-radius: 50%; transition: transform .15s; }
.player .play:hover svg { transform: scale(1.06); }
.player .play:focus-visible { outline: none; }
.player .play:focus-visible svg { outline: 3px solid var(--blue); outline-offset: 4px; }
/* the video's scenes, the way a card lists its demo's chapters: the one that plays lifts as a card */
.chapters { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chapters[hidden] { display: none; }
.chapters button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; width: 100%; padding: 8px 12px;
  border-radius: 2px; font-size: 15px; line-height: 1.3; }
.chapters button:hover { background: color-mix(in srgb, var(--card) 60%, transparent); }
.chapters button.on { background: var(--card); box-shadow: var(--shadow); }
.chapters button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.chapters .t { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; }
.film-note { text-align: center; font-size: 14px; color: var(--muted); margin: 16px 0 0; }

/* ---------- pillars ---------- */
.pillars { margin-top: 128px; display: grid; gap: 112px; }
.pillar { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.pillar.flip .text { order: 2; }
.pillar h2 { font-size: clamp(28px, 3vw, 38px); margin: 14px 0 16px; }
.pillar p { color: var(--muted); margin: 0; }
.shot { border-radius: 3px; border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(28,27,25,.4); }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 2px; border-top: 3px solid; background: var(--card); box-shadow: var(--shadow); }
.tag.blue { border-color: var(--blue); } .tag.amber { border-color: var(--amber); } .tag.green { border-color: var(--green); } .tag.grey { border-color: var(--grey); }
.legend { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 500; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 1px; margin-right: 8px; vertical-align: -1px; }
.dot.blue { background: var(--blue); } .dot.amber { background: var(--amber); } .dot.green { background: var(--green); }

/* ---------- cards, as on Obeya's canvas: index cards with the state as a rule across the top ---------- */
.s-idea { --c: var(--pink); } .s-working { --c: var(--blue); } .s-waiting { --c: var(--amber); }
.s-approved { --c: var(--green); } .s-planned { --c: var(--grey); } .s-proposal { --c: var(--purple); }
.card { position: relative; background: var(--card); border-radius: 2px; box-shadow: var(--shadow); padding: 15px 16px 40px; min-height: 128px;
  background-image: linear-gradient(var(--c), var(--c)); background-size: 100% 4px; background-repeat: no-repeat; }
.s-idea.card { background-color: color-mix(in srgb, var(--pink) 9%, var(--card)); }
.kind { font-size: 12px; font-weight: 500; letter-spacing: .01em; color: var(--muted); }
.card .ttl { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.16; margin-top: 1px; }
.card .meta { margin-top: 4px; font-size: 13.5px; line-height: 1.38; color: var(--muted); }
.card .state { position: absolute; left: 16px; bottom: 12px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--c); }
/* the owner's turn: a frame in the stamp-pad colour and a pin */
.card.s-waiting { box-shadow: 0 0 0 2px var(--amber), var(--shadow); }
.badge { position: absolute; top: -10px; right: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.45), transparent 45%), var(--amber); color: #fff;
  font: 700 13px/1 var(--serif); box-shadow: 0 0 0 2px var(--paper), 1px 2px 0 2px rgba(0,0,0,.18); }
/* a proposal is a card only pencilled in: no stock yet, a dashed outline */
.card.s-proposal { background: transparent; box-shadow: none; border: 1.5px dashed var(--purple); }
/* an agent at work or thinking: a pencil stroke being drawn */
.s-working .state::after, .thinking .state::after { content: ""; width: 36px; height: 2px;
  background: linear-gradient(90deg, var(--c) 0 50%, transparent 50%) 0 0 / 200% 100% no-repeat, color-mix(in srgb, var(--c) 22%, transparent);
  animation: draw 1.6s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes draw { 0% { background-position: 100% 0; } 55% { background-position: 0 0; } 100% { background-position: -100% 0; } }

/* ---------- how it works: the usual three steps, or a card's way along the wall with its detours ---------- */
.how { margin-top: 144px; position: relative; }
.how .head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.how .head > div:first-child { flex: 1 1 26em; }
/* the switch: a segmented control of two labels over radios that are out of sight but take the keys */
.how-in { position: absolute; opacity: 0; pointer-events: none; }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--card); border-radius: 3px; box-shadow: var(--shadow); }
.seg label { padding: 7px 16px; border-radius: 2px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg label:hover { color: var(--ink); }
#how-std:checked ~ .head label[for=how-std], #how-ext:checked ~ .head label[for=how-ext] { background: var(--ink); color: var(--card); }
#how-std:focus-visible ~ .head label[for=how-std], #how-ext:focus-visible ~ .head label[for=how-ext] { outline: 2px solid var(--blue); outline-offset: 2px; }
.how .head .ext, .how .flow, #how-ext:checked ~ .head .std, #how-ext:checked ~ .steps, #how-ext:checked ~ .more { display: none; }
#how-ext:checked ~ .head .ext { display: block; }
#how-ext:checked ~ .flow { display: grid; }
/* the standard case: three steps side by side, each a card in its state */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 64px; }
.step h3 { font-size: 24px; display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.step .n { font-family: "Plex Condensed", sans-serif; font-size: 14px; font-weight: 600; color: var(--muted);
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--grey); display: inline-grid; place-items: center; flex: none; transform: translateY(-3px); }
.step .card::after { content: "→"; position: absolute; right: -44px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 22px; }
.step:last-child .card::after { content: none; }
.step p { font-size: 16px; color: #4d4537; margin: 18px 0 0; line-height: 1.5; }
.more { margin: 40px 0 0; font-size: 16px; color: var(--muted); }
.more label { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 28px; align-items: start;
  grid-template-areas:
    "opt   opt   start  .     .     "
    "idea  proto work   demo  done  "
    "c1    c2    loop   loop  branch"
    "c1    c2    c3     c4    branch"
    "c1    c2    .      .     branch";
  grid-template-rows: auto auto auto auto 1fr; }
.f-opt { grid-area: opt; } .f-start { grid-area: start; } .f-idea { grid-area: idea; } .f-proto { grid-area: proto; }
.f-work { grid-area: work; } .f-demo { grid-area: demo; } .f-done { grid-area: done; } .f-loop { grid-area: loop; }
.f-branch { grid-area: branch; } .f-c1 { grid-area: c1; } .f-c2 { grid-area: c2; } .f-c3 { grid-area: c3; }
.f-c4 { grid-area: c4; }
.flow p { font-size: 16px; color: #4d4537; margin: 18px 0 0; line-height: 1.5; }
.flow > .f-c1, .flow > .f-c2 { margin-top: 26px; }
/* the cards of a row as tall as the tallest, so that the arrows and the round line up */
.station { position: relative; align-self: stretch; display: flex; flex-direction: column; }
.station > .card, .stack { flex: 1; }
.stack > .card:first-child { height: 100%; }
.f-idea::after, .f-proto::after, .f-work::after, .f-demo::after { content: "→"; position: absolute; right: -22px; top: 52px; color: var(--muted); font-size: 18px; }
/* the labels over the wall: a bracket over the detours, an arrow down where a clear task begins */
.mark { font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 8px; margin-bottom: 14px; }
.f-opt { position: relative; text-align: center; border-bottom: 1.5px dashed var(--grey); }
.f-opt::before, .f-opt::after { content: ""; position: absolute; bottom: -8px; width: 1.5px; height: 8px; background: var(--grey); }
.f-opt::before { left: 0; } .f-opt::after { right: 0; }
.f-start::after { content: " ↓"; }
/* two prototypes, one in front of the other */
.stack { position: relative; }
.stack .card { position: relative; z-index: 1; }
.stack .behind { position: absolute; inset: 0; z-index: 0; transform: translate(6px, 11px) rotate(1.4deg); }
/* the round from the demo back to the worker */
.loop { position: relative; height: 58px; margin: 0 calc(25% - 7px); border: 1.5px dashed var(--amber); border-top: 0;
  border-radius: 0 0 16px 16px; display: grid; place-items: end center; }
.loop::before { content: ""; position: absolute; left: -7px; top: -2px; border: 6px solid transparent; border-bottom: 8px solid var(--amber); border-top: 0; }
.loop span { transform: translateY(55%); background: var(--paper); padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--amber); white-space: nowrap; }
/* a follow-up hangs off the merged card, a dashed line down past the text */
.f-branch { position: relative; padding-left: 18px; }
.f-branch p { margin-top: 26px; }
.f-branch::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 64px; width: 14px; border: 1.5px dashed var(--grey); border-right: 0; border-top: 0; }
.f-branch .card { margin-top: 22px; }

/* ---------- the big room ---------- */
.room { margin-top: 112px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center;
  border-top: 1px solid var(--line); padding-top: 72px; padding-bottom: 96px; }
.room-mark { font-size: clamp(80px, 13vw, 170px); line-height: .95; font-weight: 700; color: var(--ink); opacity: .9;
  writing-mode: vertical-rl; justify-self: center; letter-spacing: .05em;
  font-family: "Obeya Kanji", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }
.room h2 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 22px; }
.room p { margin: 0 0 18px; color: var(--muted); max-width: 36em; }
.room .big { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.4; color: var(--ink); font-weight: 500; }

/* ---------- built with Obeya ---------- */
.proof { max-width: none; background: var(--ink); color: #efe9dc; padding: 80px 24px; text-align: center; }
.proof .big { font-family: var(--serif); color: #fdfbf5; font-size: clamp(32px, 4.6vw, 52px); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; margin: 0; }
.proof p { max-width: 36em; margin: 14px auto 0; color: #b4ab98; font-size: 18px; }

/* ---------- getting started ---------- */
.start { margin-top: 96px; margin-bottom: 120px; }
.start .head p { max-width: 40em; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.cols > div { min-width: 0; }
.start h3 { font-size: 19px; margin-bottom: 14px; }
.needs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.needs li { background: var(--card); border-radius: 2px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 16px; }
.needs a { text-decoration: none; } .needs a:hover { text-decoration: underline; }
.downloads li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.downloads b { min-width: 5.5em; }
.downloads a { color: var(--blue); font-weight: 500; }
.small { font-size: 15px; color: var(--muted); margin-top: 18px; }
.start .cta { justify-content: flex-start; margin-top: 24px; }
pre { margin: 0; background: var(--ink); color: #efe9dc; border-radius: 3px; padding: 20px 22px; overflow-x: auto;
  font: 15px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
pre code { font-size: inherit; }
pre .c { color: #948b7a; }

footer { max-width: var(--wide); margin: 0 auto; padding: 28px 24px 48px; display: flex; gap: 18px; align-items: center;
  font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
footer span { margin-right: auto; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; row-gap: 36px; }
  .steps > * { max-width: 340px; }
  .step .card::after { content: none; }
  .flow { grid-template-columns: 1fr; grid-template-areas: none; }
  .flow > * { grid-area: auto; max-width: 340px; }
  .flow p { margin: 10px 0 26px; font-size: 15px; }
  .flow > .f-c1, .flow > .f-c2 { margin-top: 18px; }
  .station::after { content: none; }
  .station > .card, .stack { flex: none; }
  .f-opt { text-align: left; }
  .f-start { margin-top: 18px; }
  .loop { margin: 10px 0 0; height: auto; border: 0; display: block; }
  .loop::before { content: none; }
  .loop span { transform: none; padding: 0; }
  .loop span::before { content: "↺ "; }
  .f-branch p { margin-top: 10px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top nav a:not(.gh) { display: none; }
  .hero { padding-top: 40px; text-align: left; }
  .lede { margin-left: 0; }
  .cta { justify-content: flex-start; }
  .film { margin-top: 40px; padding: 0 12px; }
  .player { border-radius: 3px; }
  .chapters { grid-template-columns: 1fr 1fr; gap: 2px; }
  .chapters button { padding: 7px 8px; font-size: 14px; }
  .pillars { margin-top: 80px; gap: 72px; }
  .pillar { grid-template-columns: 1fr; gap: 24px; }
  .pillar.flip .text { order: 0; }
  .how, .room { margin-top: 96px; }
  .room { grid-template-columns: 1fr; gap: 8px; padding-top: 48px; padding-bottom: 64px; }
  .room-mark { writing-mode: horizontal-tb; justify-self: start; font-size: 72px; margin-bottom: 16px; }
  .proof { padding: 56px 20px; }
  .start { margin-top: 64px; }
  .cols { grid-template-columns: 1fr; gap: 32px; }
  pre { font-size: 13px; }
  footer { flex-wrap: wrap; }
  footer span { flex: 1 1 calc(100% - 40px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .s-working .state::after, .thinking .state::after { animation: none; }
}
