/* Sam Poplett, portfolio. From draft 04, Planche: one page of a French science-fiction comic. Cream paper, ink
   line, flat teal and orange spot colour. The layout has three forms of one markup:
     1  the stack (under 900 px): panels in reading order
     2  the page (900 px and more, no camera): the same panels as album pages in the normal flow
     3  the camera (html.is-cam, set by draft.js): two album pages side by side as one spread, the window is
        pinned, and the scroll moves a camera from panel to panel
   Colours: the six of DESIGN.md. Fonts: Big Shoulders (display), Karla (text), Shantell Sans (lettering),
   DM Mono (file paths only). */

:root {
  color-scheme: light;
  --paper: #F2EDDF;
  --ink: #12120F;
  --teal: #12A5A1;
  --orange: #EB6F1C;
  --tone: #CEC7B3;
  --screen: #0AC5C0;
  --display: "Big Shoulders", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
  --body: "Karla", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pen: "Shantell Sans", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --mono: "DM Mono", "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --mx: 16px;                       /* the side margin of the flow */
  --pw: calc(100vw - 2 * var(--mx));               /* the width of one album page */
  --cq: calc(var(--pw) / 100);                     /* 1 % of it: the unit of the splash panel */
  --gut: 20px;                      /* the gutter between panels */
  --bar: 64px;                      /* the height of the bar at the end of the window (under 1280 px) */
  --rule: 4px;                      /* the weight of a panel rule */
  --grain: url(media/paper.png);
  /* A halftone screen at 45 degrees: two dot grids, one half a cell from the other. */
  --dots: radial-gradient(circle at 25% 25%, var(--tone) 0 21%, transparent 25%),
          radial-gradient(circle at 75% 75%, var(--tone) 0 21%, transparent 25%);
  --dots-ink: radial-gradient(circle at 25% 25%, var(--ink) 0 17%, transparent 21%),
              radial-gradient(circle at 75% 75%, var(--ink) 0 17%, transparent 21%);
  --wobble: 3px 7px 4px 8px / 7px 3px 8px 4px;      /* a rule drawn by hand: no corner is the same */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper) var(--grain);
  scroll-padding-top: 24px;
  scroll-padding-bottom: calc(var(--bar) + 24px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--paper);
}

body {
  margin: 0;
  padding-bottom: var(--bar);
  font: 400 17px/1.5 var(--body);
  color: var(--ink);
  background: var(--paper) var(--grain);
  overflow-x: clip;
  caret-color: var(--orange);
}

::selection { background: var(--orange); color: var(--ink); }

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--orange); }
a:hover { background: var(--orange); text-decoration-color: var(--ink); }

:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; }

.wrap { max-width: calc(1216px + 2 * var(--mx)); margin-inline: auto; padding-inline: var(--mx); }

.skip { position: absolute; left: 8px; top: -90px; z-index: 100; padding: 10px 14px; font-weight: 700; background: var(--paper); border: 3px solid var(--ink); }
.skip:focus { top: 8px; }

/* ------------------------------------------------------------------ buttons */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 9px 22px 6px;
  font: 800 26px/1 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  background: var(--orange);
  border: 4px solid var(--ink);
  border-radius: var(--wobble);
  cursor: pointer;
}
.button:hover { background: var(--ink); color: var(--paper); }
.button:active { transform: translateY(2px); }
.button-second { background: var(--paper); }

/* ------------------------------------------------------------------ the head: two small tabs */

.site-head {
  position: relative;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px var(--mx) 0;
}
.brand {
  padding: 7px 12px 3px;
  font: 800 30px/1 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: var(--wobble);
}
.site-nav { display: flex; gap: 3px; overflow: hidden; background: var(--ink); border: 3px solid var(--ink); border-radius: var(--wobble); }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap; background: var(--paper); }
.site-nav a:hover, .site-nav a[aria-current] { background: var(--orange); }

/* ------------------------------------------------------------------ the play control, the step button, the rail */

.autoplay {
  position: fixed;
  z-index: 50;
  left: 0; right: 0; bottom: 0;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 10px;
  background: var(--paper) var(--grain);
  border-top: 4px solid var(--ink);
}
.autoplay-hint { display: none; flex: 1; font: 500 15px/1.3 var(--pen); }
html[data-autoplay="playing"]:not(.tour-met) .autoplay-hint { display: block; }

.autoplay-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 48px;
  height: 48px;
  padding: 0 9px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--wobble);
  cursor: pointer;
}
.autoplay-toggle:hover { background: var(--orange); }
.autoplay-icon { display: grid; place-items: center; width: 24px; height: 24px; }
.ic { grid-area: 1 / 1; fill: var(--ink); display: none; }
.ic .ln, .stepper .ln { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ic-play { display: block; }
html[data-autoplay="playing"] .ic-play, html[data-autoplay="ended"] .ic-play { display: none; }
html[data-autoplay="playing"] .ic-pause { display: block; }
html[data-autoplay="ended"] .ic-replay { display: block; }
/* The control says how to go on: the label of the next action, when the tour does not play. */
.autoplay-label { display: none; max-width: 96px; font: 500 15px/1.3 var(--pen); text-align: left; }
html[data-autoplay="paused"] .autoplay-label[data-when="paused"],
html[data-autoplay="idle"] .autoplay-label[data-when="paused"],
html[data-autoplay="ended"] .autoplay-label[data-when="ended"] { display: block; }

.stepper {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 48px;
  padding: 0;
  background: var(--orange);
  border: 3px solid var(--ink);
  border-radius: 50% 50% 48% 52% / 56% 54% 46% 44%;
  cursor: pointer;
}
.stepper::after {                    /* the tail of the balloon */
  content: "";
  position: absolute;
  left: 5px; bottom: -6px;
  width: 13px; height: 13px;
  background: var(--orange);
  border: solid var(--ink);
  border-width: 0 0 3px 3px;
  transform: skew(-18deg, -12deg);
}
.stepper .ln { stroke-width: 3.5; }
.stepper:hover, .stepper:hover::after { background: var(--paper); }
.stepper.is-end svg { transform: rotate(180deg); }

.rail {
  position: fixed;
  z-index: 51;
  left: 10px;
  bottom: 14px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  pointer-events: none;
}
html[data-autoplay="playing"]:not(.tour-met) .rail { display: none; }
.rail .pg { display: grid; gap: 2px; width: 20px; height: 28px; padding: 2px; background: var(--paper); border: 2px solid var(--ink); }
.rail .pg i { background: var(--tone); }
.rail .pg i.is-past { background: var(--ink); }
.rail .pg i.is-now { background: var(--orange); }
.rail .pg.is-now { transform: scale(1.28); transform-origin: 50% 100%; }
.rail .c2 { grid-template-columns: 1fr 1fr; }
.rail .c3 { grid-template-columns: repeat(3, 1fr); }
.rail-spines { gap: 3px; }
.rail-spines .pg { width: 9px; padding: 0; border-width: 2px; }

/* ------------------------------------------------------------------ panels, art, captions */

.panel {
  position: relative;
  background: var(--paper) var(--grain);
  border: var(--rule) solid var(--ink);
  border-radius: var(--wobble);
}
/* draft.js rules each panel by hand: an SVG frame with lines of uneven weight that cross at the corners. The
   CSS rule stays as the room of the frame. */
.has-ink .panel, .has-ink .cover, .has-ink .pic { border-color: transparent; border-radius: 0; }
.frame { position: absolute; z-index: 6; left: calc(-1 * var(--rule) - 6px); top: calc(-1 * var(--rule) - 6px); overflow: visible; pointer-events: none; fill: var(--ink); }
/* The frame of a cover or of a screenshot lies under the caption box that laps over it. */
.cover > .frame, .pic > .frame { z-index: 1; }

.art { position: relative; overflow: hidden; isolation: isolate; background: var(--paper); }
.art picture, .art .lay { position: absolute; inset: 0; width: 100%; height: 100%; }
.art picture img, img.lay { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.lay-fig { display: none; }
/* The film. `plate` is a black plate (black sky, white figure). `fig` is the figure alone. */
.ink { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 45%); }
.ink:not([src]) { visibility: hidden; }
.stage { position: absolute; inset: 0; }
.art.dark, .live .art { background: var(--ink); }
/* A film on a light ground (look F): the panels of the film are paper. */
.film-paper .art.dark, .film-paper .live .art { background: var(--paper); }

.cap-box {
  position: relative;
  z-index: 3;
  padding: 16px 18px 15px;
  background: var(--paper) var(--grain);
  border: 3px solid var(--ink);
  border-radius: var(--wobble);
}
.cap-box h2, .cap-box h3 { margin-bottom: 6px; font: 800 42px/0.92 var(--display); letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
.cap-box p + p { margin-top: 8px; }
.cap-box h3 a { text-decoration: none; }
.cap-box h3 a:hover { background: var(--orange); }

.banner {
  position: relative;
  z-index: 7;
  display: inline-block;
  margin: 0 0 -16px 8px;
  padding: 9px 16px 4px;
  font: 800 34px/1 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  transform: rotate(-1.5deg);
}

/* The proof of a claim: a small lettered label and the file, in the code face. */
.line { font-weight: 700; }
.decision { padding-top: 9px; border-top: 2px dashed var(--ink); }
.proof { font-size: 15px; }
.proof-label { margin-right: 4px; font: 700 15px/1 var(--pen); }
.path { font: 500 15px/1.35 var(--mono); overflow-wrap: anywhere; text-decoration-thickness: 2px; }
.links { font-weight: 700; }
.links a + a { margin-left: 16px; }
.more-link { font-weight: 700; }

/* ------------------------------------------------------------------ the planche: form 1, the stack */

.planche { position: relative; }
.board { position: relative; max-width: calc(1216px + 2 * var(--mx)); margin: 0 auto; padding: 14px var(--mx) 0; }
.page + .page { margin-top: 56px; }
.cord { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 5; overflow: visible; pointer-events: none; }
.cord path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cord .h { stroke: var(--paper); stroke-width: 13; }
.cord .o { stroke: var(--ink); stroke-width: 9; }
.cord .i { stroke: var(--teal); stroke-width: 3.5; }
.cord .plug { fill: var(--orange); stroke: var(--ink); stroke-width: 3; }
.iris, .veil, .veil-tone { display: none; }
.mark { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; }

/* The splash panel. */
.splash { padding-bottom: 18px; }
.splash .art { aspect-ratio: 1 / 0.92; --pos: 82% 50%; }
.splash h1 {
  position: relative;
  z-index: 3;
  display: inline-block;
  margin: calc(-17 * var(--cq)) 0 0 -7px;
  padding: 0.14em 0.2em 0.04em;
  font: 800 clamp(32px, calc(10.4 * var(--cq)), 150px)/0.9 var(--display);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  background: var(--paper) var(--grain);
  border: 4px solid var(--ink);
  border-radius: var(--wobble);
  --sh: 12px;
}
/* A halftone shadow: only the part that shows beside the box (the box itself keeps a plain ground). */
.splash h1::after { content: ""; position: absolute; z-index: -1; inset: var(--sh) calc(-1 * var(--sh) - 4px) calc(-1 * var(--sh) - 4px) var(--sh); background-image: var(--dots-ink); background-size: 8px 8px; clip-path: polygon(calc(100% - var(--sh)) 0, 100% 0, 100% 100%, 0 100%, 0 calc(100% - var(--sh)), calc(100% - var(--sh)) calc(100% - var(--sh))); }
.splash h1 span { display: block; }
/* The sub line is the balloon of this panel. */
.splash .lead {
  position: relative;
  z-index: 3;
  width: 94%;
  margin: 26px 8px 0 auto;
  padding: 26px 34px 38px;
  font: 500 20px/1.3 var(--pen);
  text-align: center;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 46% 54% 50% 50% / 44% 46% 54% 56%;
}
.splash .lead::before {              /* the tail points up at the figure */
  content: "";
  position: absolute;
  left: 66%; top: -15px;
  width: 26px; height: 26px;
  background: var(--paper);
  border: solid var(--ink);
  border-width: 4px 0 0 4px;
  transform: skew(22deg, 8deg) rotate(8deg);
}
.splash .actions { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 14px 0; }

/* The work: two large panels, then a strip of five. */
.work { position: relative; margin-top: var(--gut); }
.feature-list, .strip-list, .steps { display: grid; gap: var(--gut); }
.project { display: flex; flex-direction: column; }
.shot { position: relative; margin: 0; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink); border-bottom: var(--rule) solid var(--ink); }
.shot img, .shot picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot img { object-fit: cover; object-position: 0 0; }
.shot.drawn img { object-position: 50% 30%; }
.shot.is-tall img { object-position: 50% 0; }
/* The recording in the Provenance panel fills the picture box as a screenshot does. Its button stands in the
   corner, in the lettering of the page. */
.shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.demo-toggle { position: absolute; z-index: 2; right: 12px; top: 12px; min-width: 72px; min-height: 44px; padding: 9px 13px 6px; font: 700 17px/1 var(--pen); color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: var(--wobble); cursor: pointer; transition: background-color 160ms var(--ease); }
.demo-toggle:hover { background: var(--orange); }
.project .cap-box { margin: -34px 12px 14px; display: grid; gap: 8px; align-content: start; }
.project .cap-box p + p { margin-top: 0; }
.project.big h3 { font-size: clamp(44px, 9vw, 66px); }
.project.small h3 { font-size: 38px; }
.strip-list { margin-top: var(--gut); }
.more { margin-top: 22px; text-align: right; }

/* How I work: four drawn panels, the steps of a client project. */
.method { position: relative; }
.step { display: flex; flex-direction: column; min-height: min(78svh, 620px); }
.step .art { flex: 1; min-height: 240px; margin: 0; }
.step .cap-box { margin: -34px 22px 14px 12px; }
.method-end { margin-top: 14px; }
.step .cap-box p, .crate p { text-wrap: pretty; }
.method .promise { text-wrap: balance; }
.has-num { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
.has-num > :not(.num) { grid-column: 2; }
.num::before { content: attr(data-n); }
.has-num .num {
  grid-row: 1 / 4;
  min-width: 0.49em;
  padding-top: 5px;
  text-align: center;
  font: 800 104px/0.78 var(--display);
  color: var(--orange);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}

/* The live panel and the desk. */
.row-b { display: grid; gap: var(--gut); margin-top: var(--gut); }
.live { aspect-ratio: 1; }
.live .art { position: absolute; inset: 0; }
.counter { position: absolute; z-index: 3; left: 14px; bottom: 14px; padding: 7px 12px 3px; font: 800 26px/1 var(--display); letter-spacing: 0.04em; background: var(--paper); border: 4px solid var(--ink); }
.counter i { font-style: normal; }
.desk { display: flex; flex-direction: column; }
.desk .art { aspect-ratio: 4 / 3; --pos: 62% 50%; border-bottom: var(--rule) solid var(--ink); }
.desk .cap-box { margin: -30px 12px 14px; }
.desk .cap-box h2 { font-size: 44px; }

/* The pilot seat. */
.cockpit { margin-top: var(--gut); display: flex; flex-direction: column; }
.cockpit .art { aspect-ratio: 16 / 9; }
.cockpit .speed { display: none; }
.fly { transform-origin: 54% 46%; }
.cockpit .cap-box { margin: -26px 12px 14px; }
.cockpit .cap-box h2 { font-size: 44px; }

/* ------------------------------------------------------------------ the back pages: client work on the teal fill */

.client { position: relative; margin-top: 15vw; padding: 24px 0 88px; background: var(--teal) var(--grain); background-blend-mode: multiply; }
/* With no camera the teal fill comes up as one round edge. */
.client::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 13vw; background: var(--teal) var(--grain); background-blend-mode: multiply; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.client h2, .kit h2, .contact h2, .page-head h1 { font: 800 clamp(50px, 7vw, 96px)/0.88 var(--display); text-transform: uppercase; text-wrap: balance; }
.client .wrap { position: relative; display: grid; gap: 22px; }
.client .lead, .kit .lead { max-width: 44ch; font-size: 20px; line-height: 1.4; margin-top: 16px; }
/* The first line of the client part is one sentence in Sam's voice: a lettered note on paper. */
.client .lead { display: inline-block; max-width: 30ch; padding: 10px 15px 8px; font: 500 20px/1.3 var(--pen); text-wrap: balance; background: var(--paper) var(--grain); border: 3px solid var(--ink); border-radius: var(--wobble); }
.cargo { margin: 0; aspect-ratio: 3 / 2; background: var(--paper); }
.cargo picture { display: block; overflow: hidden; }
.cargo picture, .cargo img { width: 100%; height: 100%; object-fit: cover; }
.crates { display: grid; gap: 16px; }
.crate h3 { font-size: 34px; }
.nb { white-space: nowrap; }
/* A card with no line under its title: the text keeps a small distance from the title. */
.crate h3 + p:not(.place) { padding-top: 6px; }
.place { font: 700 15px/1.3 var(--pen); }
.client-note { max-width: 56ch; font-weight: 700; }

/* The tools: twelve tags. */
.kit { padding-top: 84px; padding-bottom: 24px; }
.kit-list { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 30px; }
.kit-list li { position: relative; display: grid; align-content: start; gap: 4px; padding: 30px 12px 12px; background: var(--paper) var(--grain); border: 3px solid var(--ink); border-radius: var(--wobble); }
.kit-list li::before { content: ""; position: absolute; left: 12px; top: 9px; width: 13px; height: 13px; border: 3px solid var(--ink); border-radius: 50%; background: var(--teal); }
.kit-list li:nth-child(3n + 2)::before { background: var(--orange); }
.kit-list h3 { font: 800 26px/0.96 var(--display); letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
.used { font-size: 17px; }
.kit-list .path { font-size: 15px; }

/* The last panel: the contact slip. */
.contact { padding-top: 72px; padding-bottom: 72px; }
.contact-panel { display: grid; }
.contact-panel .art { aspect-ratio: 16 / 10; margin: 0; --pos: 22% 50%; }
.contact-copy { margin: -56px 14px 0 -8px; justify-self: start; max-width: 430px; }
.contact h2 { font-size: clamp(46px, 5.4vw, 76px); margin-bottom: 8px; }
.slip { display: grid; gap: 14px; margin-top: 22px; padding: 26px 18px 22px; border-top: 3px dashed var(--ink); }
.slip li { display: grid; gap: 2px; }
.slip-label { font: 700 15px/1 var(--pen); }
.slip-value { font: 800 clamp(22px, 6.2vw, 40px)/1.05 var(--display); letter-spacing: 0.01em; overflow-wrap: anywhere; text-decoration-thickness: 3px; }

/* ------------------------------------------------------------------ the colophon */

.site-foot { border-top: 8px solid var(--ink); }
.foot-in { max-width: calc(1216px + 2 * var(--mx)); margin: 0 auto; padding: 30px var(--mx) 44px; display: grid; gap: 14px; }
.foot-name { font-weight: 700; }
.foot-line { font: 800 clamp(34px, 4.2vw, 58px)/0.92 var(--display); text-transform: uppercase; }
.foot-links { display: grid; gap: 8px; justify-items: start; font-weight: 700; }
.colophon { max-width: 60ch; font-size: 15px; }

/* ------------------------------------------------------------------ showcase: a rack of albums */

.page-head { padding-top: 44px; }
.page-head h1 { max-width: 9ch; }
.page-head .lead { max-width: 50ch; margin-top: 18px; font-size: 20px; line-height: 1.42; }
.head-art { margin: 26px 0 0; aspect-ratio: 16 / 7; }
.head-art picture { display: block; overflow: hidden; }
.head-art picture, .head-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }

.rack { margin-top: 36px; }
/* Under 900 px the albums lie in a pile. From 900 px they stand in a rack, spine out. */
.rack ol { display: grid; gap: 4px; padding-bottom: 4px; border-bottom: 8px solid var(--ink); }
.rack li { width: 96%; }
.rack li:nth-child(3n + 1) { width: 100%; }
.rack li:nth-child(4n + 2) { width: 89%; }
.rack li:nth-child(5n) { width: 93%; margin-left: 5%; }
.rack a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 11px 12px 6px; font: 800 20px/1.02 var(--display); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; background: var(--paper) var(--grain); border: 3px solid var(--ink); border-radius: var(--wobble); }
.rack li:nth-child(3n + 2) a { background: var(--teal); }
.rack li:nth-child(7n + 4) a { background: var(--orange); }
.rack a:hover, .rack a:focus-visible { background: var(--ink); color: var(--paper); }
.rack .spine-yours a { background-color: var(--paper); background-image: var(--dots); background-size: 8px 8px; border-style: dashed; }
.rack .spine-yours a:hover { background: var(--ink); }

#projects { margin-top: 24px; }
#projects .project { position: relative; display: grid; gap: 18px; padding: 56px 0 60px; }
.p-title h2 { font: 800 clamp(46px, 6.2vw, 92px)/0.88 var(--display); text-transform: uppercase; text-wrap: balance; }
.p-title .line { margin-top: 10px; font-size: 20px; }
.tag { margin-top: 6px; font: 500 15px/1.4 var(--mono); }
.cover { position: relative; margin: 0; background: var(--ink); border: var(--rule) solid var(--ink); border-radius: var(--wobble); aspect-ratio: 16 / 10; }
.cover img, .cover picture { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 0 0; }
.cover.is-tall { aspect-ratio: 9 / 13; max-width: 420px; }
.cover.drawn { aspect-ratio: 3 / 2; }
.cover.drawn img { object-position: 50% 40%; }
.drawn-note { position: absolute; z-index: 2; right: 12px; top: 12px; max-width: min(62%, 340px); padding: 9px 13px 7px; font: 500 15px/1.3 var(--pen); background: var(--paper); border: 3px solid var(--ink); border-radius: var(--wobble); }
#projects .cap-box { margin: -40px 10px 0 22px; display: grid; gap: 10px; }
#projects .cap-box p + p { margin-top: 0; }
.decisions { display: grid; gap: 14px; }
.decisions li { display: grid; gap: 4px; padding: 12px 0 0; border-top: 4px solid var(--ink); }
.decisions li > p:first-child { font-weight: 700; font-size: 20px; line-height: 1.34; max-width: 46ch; }
.counts { display: grid; gap: 6px; padding: 12px 14px; font-size: 17px; background-image: var(--dots); background-size: 8px 8px; border: 3px dashed var(--ink); }
.counts li { padding: 2px 6px; background: var(--paper); justify-self: start; }
.counts .path { margin-left: 6px; }

/* The screenshots are the panels of the page: strips of the same height, each picture at its own width. */
.shots { display: flex; flex-wrap: wrap; gap: 12px; }
.shots li { flex: var(--ar) 1 calc(var(--ar) * 150px); min-width: 0; }
.shots figure { margin: 0; }
/* Each screenshot is a small panel: draft.js rules its frame by hand. */
.pic { position: relative; display: block; background: var(--ink); border: 3px solid var(--ink); border-radius: var(--wobble); }
.shots img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; object-position: 50% 0; }
.shots figcaption { padding: 6px 2px 0; font-size: 17px; }
.shots::after { content: ""; flex: 8 1 0; }

.yours { padding-top: 60px; padding-bottom: 72px; }
.yours-page { position: relative; display: grid; place-items: center; min-height: 380px; padding: 30px 16px; overflow: hidden; background: var(--paper) var(--grain); border: var(--rule) solid var(--ink); border-radius: var(--wobble); }
/* The panels of the next page, in pencil: not inked yet. */
.blank { position: absolute; overflow: hidden; border: 3px dashed var(--tone); }
.b1 { left: 4%; top: 8%; width: 44%; height: 56%; }
.b2 { right: 4%; top: 8%; width: 44%; height: 30%; }
.b3 { left: 4%; bottom: 8%; width: 30%; height: 20%; background-image: var(--dots); background-size: 9px 9px; }
.pencil { position: absolute; left: 50%; top: 50%; width: 118%; max-width: none; height: auto; transform: translate(-50%, -46%); opacity: 0.2; filter: grayscale(1); }
.pencil:not([src]) { visibility: hidden; }
.yours-box { max-width: 520px; }
.yours-box h2 { font-size: clamp(34px, 4.4vw, 54px); }
.yours-box p + p { margin-top: 14px; }

/* ------------------------------------------------------------------ post: the back pages of the album */

.post { padding-top: 34px; padding-bottom: 72px; }
.back { font-weight: 700; }
.post-head h1 { margin-top: 26px; font: 800 clamp(48px, 7.4vw, 112px)/0.88 var(--display); text-transform: uppercase; text-wrap: balance; }
.post-intro { margin-top: 22px; }
.post-intro .lead { max-width: 52ch; font-size: 20px; line-height: 1.42; }
.post-intro .by { margin-top: 16px; font: 700 17px/1.7 var(--body); }
.post-intro .sig { display: inline-block; margin-right: 12px; font: 700 20px/1 var(--pen); transform: rotate(-2deg); }
.post-figure { margin-top: 34px; }
.post-figure figcaption { position: relative; z-index: 3; max-width: 56ch; margin: -22px 10px 0 18px; padding: 12px 16px 10px; font-size: 17px; background: var(--paper) var(--grain); border: 3px solid var(--ink); border-radius: var(--wobble); }
.chapter { margin-top: 84px; }
.chapter h2 { margin-bottom: 20px; font: 800 clamp(30px, 3.2vw, 42px)/0.96 var(--display); letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
.cols p + p { margin-top: 0.85em; }
.cols p { max-width: 62ch; }
.chapter-proof { margin-top: 18px; padding: 10px 14px; border: 3px dashed var(--ink); justify-self: start; }
.proof-note { margin-left: 6px; }
.figs { display: grid; gap: 26px; margin-top: 8px; }
.facts ul { display: grid; gap: 16px; }
.facts li { padding: 0 0 14px; background: var(--paper) var(--grain); border: 3px solid var(--ink); border-radius: var(--wobble); }
.facts time { display: inline-block; margin: -3px 0 0 -3px; padding: 8px 14px 4px; font: 800 20px/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; background: var(--teal); border: 3px solid var(--ink); }
.facts li:nth-child(3n) time { background: var(--orange); }
.facts span { display: block; padding: 10px 16px 0; }
.post-next { margin-top: 96px; padding: 30px 22px 30px; background: var(--teal); border: 4px solid var(--ink); border-radius: var(--wobble); }
.next-label { font: 700 17px/1 var(--pen); }
.next-title { max-width: 20ch; margin: 8px 0 22px; font: 800 clamp(44px, 6vw, 88px)/0.9 var(--display); text-transform: uppercase; text-wrap: balance; }
.next-title a { text-decoration-color: var(--ink); }
.next-title a:hover, .post-next .back a:hover { background: var(--paper); }
.post-next .back a { text-decoration-color: var(--ink); }

/* ------------------------------------------------------------------ iteration 2: rules for every form */

/* The promise of the page, lettered at the head of the work. */
.promise { position: relative; z-index: 7; display: inline-block; margin: 2px 0 14px; padding: 7px 12px 5px; font: 500 17px/1.3 var(--pen); background: var(--paper); border: 3px solid var(--ink); border-radius: var(--wobble); }

/* The desk: the way on to the contact part, at the foot of its caption. */
.desk-go { margin-top: 16px; }

/* The pilot seat in layers. The ship layer is needed only where the view moves by itself (the camera form). */
.cockpit .art { --pos: 50% 50%; }
.cockpit .ship, .cockpit .land, .cockpit .speed { display: none; }
.scope-ground { fill: var(--screen); }
.go { display: flex; flex-wrap: wrap; gap: 10px; }
.go .button { min-height: 48px; font-size: 20px; }
.go .button + .button { margin-left: 0; }

/* The line in the footer: a sentence never breaks in two. */
.foot-line span { white-space: nowrap; }
.site-foot { background: var(--paper) var(--grain); }

/* The showcase and the post lie on the same table as the album spread. Each part is a sheet of paper, and
   draft.js rules its frame by hand. */
body[data-page="showcase"] main, body[data-page="post"] main { padding-bottom: 56px; background-color: var(--paper); background-image: var(--dots); background-size: 14px 14px; }
.sheet { position: relative; background: var(--paper) var(--grain); border: var(--rule) solid var(--ink); border-radius: var(--wobble); }
.has-ink .sheet { border-color: transparent; border-radius: 0; }
.page-head.sheet { width: calc(100% - 20px); margin-top: 14px; padding: 26px 16px 20px; }
#projects { display: grid; gap: 26px; padding-inline: 10px; }
#projects .project.sheet { padding: 30px 16px 36px; border-bottom: var(--rule) solid var(--ink); }
.has-ink #projects .project.sheet { border-color: transparent; }
.post.sheet { width: calc(100% - 20px); margin-top: 14px; padding: 26px 16px 44px; }
.rack { margin-top: 26px; }

/* ================================================================== form 2: the page (900 px and more) */

@media (min-width: 900px) {
  :root { --mx: 32px; --gut: 32px; --pw: min(1216px, calc(100vw - 2 * var(--mx))); }
  .lay-fig { display: block; }
  .page + .page { margin-top: 96px; }

  /* The splash: the picture fills the panel. The headline box stands at the foot, the balloon in the sky. */
  .splash { height: calc(51.65 * var(--cq)); padding: 0; }
  .splash .art { position: absolute; inset: 0; aspect-ratio: auto; --pos: 50% 46%; }
  .splash h1 { position: absolute; left: calc(2.2 * var(--cq)); bottom: calc(9.4 * var(--cq)); margin: 0; font-size: calc(5.5 * var(--cq)); border-width: max(4px, calc(0.3 * var(--cq))); --sh: calc(0.8 * var(--cq)); }
  .splash h1::after { background-size: max(8px, calc(0.56 * var(--cq))) max(8px, calc(0.56 * var(--cq))); }
  .splash .lead { position: absolute; left: calc(49.5 * var(--cq)); top: calc(2.4 * var(--cq)); width: calc(23.5 * var(--cq)); margin: 0; padding: calc(2.6 * var(--cq)) calc(2.4 * var(--cq)) calc(2.5 * var(--cq)); font-size: max(17px, calc(1.42 * var(--cq))); line-height: 1.3; border-width: max(4px, calc(0.3 * var(--cq))); }
  .splash .lead::before { left: auto; right: 9%; top: auto; bottom: calc(-1.45 * var(--cq)); width: calc(2.8 * var(--cq)); height: calc(2.8 * var(--cq)); border-width: 0 max(4px, calc(0.3 * var(--cq))) max(4px, calc(0.3 * var(--cq))) 0; transform: skew(24deg, 10deg); }
  .splash .actions { position: absolute; left: calc(2.2 * var(--cq)); bottom: calc(2.6 * var(--cq)); margin: 0; gap: calc(1.2 * var(--cq)); }
  .splash .button { min-height: max(52px, calc(3.5 * var(--cq))); padding: 0.4em 0.9em 0.26em; font-size: max(24px, calc(1.75 * var(--cq))); border-width: max(4px, calc(0.3 * var(--cq))); }

  .work .banner, .method .banner { position: absolute; left: -12px; top: -26px; margin: 0; font-size: 40px; }
  .feature-list { grid-template-columns: 1.62fr 1fr; }
  .project.big .shot { aspect-ratio: auto; height: 390px; }
  .project.big .cap-box { flex: 1; margin: -44px 16px 16px; }
  .project.big:first-child .cap-box { grid-template-columns: 1fr 1fr; column-gap: 26px; }
  .project.big:first-child .cap-box > h3, .project.big:first-child .cap-box > .line, .project.big:first-child .cap-box > .blurb { grid-column: 1; }
  .project.big:first-child .cap-box > .decision { grid-column: 2; grid-row: 1 / 3; align-self: end; border-top: 0; padding-top: 0; font-weight: 700; font-size: 20px; line-height: 1.32; }
  .project.big:first-child .cap-box > .proof { grid-column: 2; grid-row: 3; }
  .project.big:first-child .cap-box > .links { grid-column: 1; }
  .project.big:first-child .cap-box > .more-link { grid-column: 2; grid-row: 4; }
  .project.big h3 { font-size: 66px; }
  .strip-list { grid-template-columns: repeat(6, 1fr); }
  .project.small { grid-column: span 2; }
  .project.small:nth-child(n + 4) { grid-column: span 3; }
  .project.small .shot { aspect-ratio: auto; height: 220px; }
  .project.small .cap-box { flex: 1; margin: 0; padding: 16px 18px 20px; border: 0; background: none; }
  .more { margin-top: 26px; }

  /* The page with no camera: two rows of two. The camera form sets four in one row. */
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { min-height: 520px; }
  .s1 .cap-box, .s3 .cap-box { order: -1; margin: 40px 30px -44px 14px; }
  .s2 .cap-box, .s4 .cap-box { margin: -44px 14px 16px 30px; }
  .row-b { grid-template-columns: 5fr 8fr; align-items: stretch; }
  .live { aspect-ratio: auto; min-height: 440px; }
  /* The desk: a caption column on bare paper, and the picture beside it. */
  .desk { display: grid; grid-template-columns: minmax(240px, 27%) 1fr; }
  .desk .art { grid-column: 2; grid-row: 1; aspect-ratio: auto; height: 100%; border-bottom: 0; border-left: var(--rule) solid var(--ink); }
  .desk .cap-box { grid-column: 1; grid-row: 1; align-self: start; margin: 0; padding: 26px 20px 20px 24px; border: 0; background: none; }
  .cockpit { display: block; }
  .cockpit .cap-box { position: absolute; right: 2.2%; top: 4.2%; width: min(31%, 420px); margin: 0; }

  .client { padding: 40px 0 96px; }
  .client .wrap { grid-template-columns: repeat(12, 1fr); column-gap: var(--gut); row-gap: 0; align-items: start; }
  .client-head { grid-column: 1 / 6; grid-row: 1; padding-top: 30px; }
  .cargo { grid-column: 6 / 13; grid-row: 1 / 3; }
  .crates { grid-column: 1 / 6; grid-row: 2; grid-template-columns: 1fr; gap: 16px; margin-top: 30px; align-items: start; }
  .crates { position: relative; z-index: 7; align-items: stretch; }
  /* Two more projects: one row of two under the picture. */
  .crates-more { grid-column: 1 / 13; grid-row: 3; grid-template-columns: repeat(12, 1fr); gap: var(--gut); margin-top: var(--gut); }
  /* The same two columns as over it: the cards, and the picture. */
  .crates-more > :first-child { grid-column: 1 / 6; }
  .crates-more > :last-child { grid-column: 6 / 13; }
  .client-note { grid-column: 1 / 9; grid-row: 3; margin-top: 30px; }

  .kit { padding-top: 128px; }
  .kit-list { grid-template-columns: repeat(4, 1fr); gap: 20px var(--gut); margin-top: 44px; }
  .kit-list li { padding: 34px 16px 16px; }
  .kit-list li:nth-child(4n + 2), .kit-list li:nth-child(4n + 4) { transform: translateY(14px); }
  .kit-list h3 { font-size: 30px; }

  .contact { padding-top: 110px; padding-bottom: 110px; }
  .contact-panel { display: block; min-height: 600px; }
  .contact-panel .art { position: absolute; inset: 0; aspect-ratio: auto; --pos: 30% 50%; }
  .contact-copy { position: absolute; right: 4%; top: auto; bottom: calc(8% + 176px); width: 46%; max-width: none; margin: 0; }
  .slip { position: absolute; z-index: 3; right: 4%; bottom: 8%; width: 46%; margin: 0; padding: 22px 24px 20px; background: var(--paper) var(--grain); border: 3px dashed var(--ink); }

  .foot-in { grid-template-columns: 7fr 5fr; column-gap: var(--gut); padding-top: 44px; padding-bottom: 60px; }
  .foot-name, .foot-line { grid-column: 1; }
  .foot-links { grid-column: 2; grid-row: 1 / 3; align-content: start; }
  .colophon { grid-column: 1 / 3; }

  .page-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gut); align-items: end; padding-top: 110px; }
  .page-head h1 { grid-column: 1 / 7; }
  .page-head .lead { grid-column: 7 / 13; margin: 0 0 10px; }
  .head-art { grid-column: 1 / 13; margin-top: 40px; aspect-ratio: 16 / 5.2; }
  .rack ol { display: flex; align-items: flex-end; gap: 6px; height: 360px; padding: 0 12px; }
  .rack li, .rack li:nth-child(n) { flex: 1 1 0; min-width: 0; width: auto; height: 86%; margin: 0; }
  .rack li:nth-child(3n + 1) { height: 100%; }
  .rack li:nth-child(4n + 2) { height: 78%; }
  .rack li:nth-child(5n) { height: 93%; }
  .rack a { flex-direction: column; align-items: center; gap: 14px; height: 100%; padding: 16px 0 8px; overflow: hidden; font-size: 30px; border-bottom: 0; border-radius: 4px 7px 0 0; }
  .rack span { writing-mode: vertical-rl; max-height: 100%; min-height: 0; flex: 1; }

  #projects .project { grid-template-columns: repeat(12, 1fr); gap: 0 var(--gut); padding: 96px 0 104px; align-items: start; }
  #projects .p-title { grid-column: 1 / 6; grid-row: 1; }
  #projects .cover { grid-column: 6 / 13; grid-row: 1 / 3; }
  #projects .cap-box { grid-column: 1 / 7; grid-row: 2; margin: 34px 0 0 0; align-self: end; }
  #projects .decisions { grid-column: 1 / 9; grid-row: 3; grid-template-columns: 1fr 1fr; gap: 26px var(--gut); margin-top: 44px; }
  #projects .counts { grid-column: 9 / 13; grid-row: 3; margin-top: 44px; align-self: start; }
  #projects .shots { grid-column: 1 / 13; grid-row: 4; margin-top: 44px; gap: 16px; }
  /* Each second page is the mirror of the first. */
  #projects .project:nth-child(even) .p-title { grid-column: 8 / 13; }
  #projects .project:nth-child(even) .cover { grid-column: 1 / 8; }
  #projects .project:nth-child(even) .cap-box { grid-column: 7 / 13; }
  #projects .project.has-tall .cover { grid-column: 9 / 13; max-width: none; }
  #projects .project.has-tall .p-title { grid-column: 1 / 8; }
  #projects .project.has-tall .cap-box { grid-column: 2 / 9; }
  .shots li { flex-basis: calc(var(--ar) * 230px); }
  .yours-page { min-height: 460px; }

  .post { padding-top: 110px; padding-bottom: 110px; }
  .post-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gut); align-items: end; }
  .post-head .back { grid-column: 1 / 13; }
  .post-head h1 { grid-column: 1 / 9; }
  .post-intro { grid-column: 9 / 13; margin: 0 0 8px; }
  .post > .post-figure { margin-top: 56px; }
  .post-figure figcaption { margin: -30px 0 0 28px; }
  /* A heading in the margin, and the text beside it. */
  .chapter { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gut); margin-top: 120px; align-items: start; }
  .chapter h2 { grid-column: 1 / 5; margin: 0; padding-top: 14px; border-top: 8px solid var(--ink); }
  .cols { grid-column: 5 / 12; font-size: 20px; line-height: 1.55; }
  .chapter-proof { grid-column: 5 / 12; }
  .figs { grid-column: 3 / 13; margin-top: 44px; }
  .facts ul { grid-column: 5 / 13; grid-template-columns: 1fr 1fr; gap: 24px var(--gut); align-items: start; }
  .facts li:nth-child(even) { margin-top: 34px; margin-bottom: -34px; }
  .post-next { margin-top: 150px; padding: 44px 44px 40px; }
}

/* ------------------------------------------------------------------ iteration 2: rules for 900 px and more */

@media (min-width: 900px) {
  /* The splash keeps its view clear: the headline lies low in the grass on two lines, the words about me are a
     caption on the top edge of the panel, and the two buttons stand at the right. */
  .splash h1 { bottom: calc(2.6 * var(--cq)); font-size: calc(4.8 * var(--cq)); }
  .splash h1 span { display: inline; }
  .splash h1 span:first-child { display: block; }
  .splash .lead { z-index: 7; left: calc(2.2 * var(--cq)); top: calc(-1.5 * var(--cq)); width: auto; max-width: calc(47 * var(--cq)); padding: 0.7em 1.05em 0.55em; text-align: left; border-radius: var(--wobble); }
  .splash .lead::before { display: none; }
  .splash .actions { left: auto; right: calc(2.2 * var(--cq)); }
  .board { padding-top: max(14px, calc(2 * var(--cq))); }

  .promise { position: absolute; left: 196px; top: -22px; margin: 0; }
  /* "How I work" is a wider banner than "The work". The note that closes the row stays in the flow. */
  .method .promise { left: 238px; }
  .method .method-end { position: static; display: block; width: fit-content; margin: 14px 0 0 auto; }

  /* The caption of the desk fills its column: the text at the head, the way on at the foot. */
  .desk .cap-box { align-self: stretch; display: flex; flex-direction: column; }
  .desk .cap-box .desk-go { margin-top: auto; padding-top: 18px; }

  .page-head.sheet { margin-top: 96px; padding: 52px 56px 48px; }
  #projects { gap: 52px; margin-top: 52px; padding-inline: var(--mx); }
  #projects .project.sheet { padding: 60px 56px 68px; }
  .post.sheet { margin-top: 96px; padding: 64px 64px 80px; }
  .rack { margin-top: 44px; }
  .go .button { font-size: 22px; }
}

/* ================================================================== the fixed parts in the side margins (1280 px and more) */

@media (min-width: 1280px) {
  :root { --mx: 112px; --bar: 0px; }
  html { scroll-padding-top: 96px; scroll-padding-bottom: 40px; }

  .site-head { position: fixed; left: 22px; right: 22px; top: 16px; padding: 0; pointer-events: none; }
  .site-head > * { pointer-events: auto; }
  .board { padding-top: 84px; }

  .autoplay { left: auto; right: 20px; bottom: 20px; width: 78px; height: auto; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 0; background: none; border: 0; }
  .autoplay-toggle { flex-direction: column; justify-content: center; width: 78px; height: auto; min-height: 58px; padding: 10px 2px 8px; border-width: 4px; }
  .autoplay-label { max-width: 70px; text-align: center; }
  .stepper { width: 68px; height: 60px; border-width: 4px; }
  .stepper::after { border-width: 0 0 4px 4px; }
  /* The hint stands in the right margin, over the control: it covers no panel at a station, so it can stay
     for the whole time that the page plays. */
  .autoplay-hint {
    position: absolute;
    right: -12px;
    bottom: calc(100% + 20px);
    width: 104px;
    flex: none;
    padding: 12px 6px 10px;
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
    background: var(--paper);
    border: 4px solid var(--ink);
    border-radius: 22px 26px 24px 20px / 26px 20px 26px 22px;
  }
  .autoplay-hint::after { content: ""; position: absolute; left: calc(50% - 9px); bottom: -11px; width: 18px; height: 18px; background: var(--paper); border: solid var(--ink); border-width: 0 4px 4px 0; transform: rotate(45deg); }

  .rail { left: 30px; top: 50%; bottom: auto; flex-direction: column; align-items: flex-start; gap: 9px; transform: translateY(-50%); }
  html[data-autoplay="playing"]:not(.tour-met) .rail { display: flex; }
  .rail .pg { width: 32px; height: 42px; padding: 3px; border-width: 3px; }
  .rail .pg.is-now { transform: scale(1.3); transform-origin: 0 50%; }
  .rail-spines { gap: 5px; }
  .rail-spines .pg { width: 30px; height: 15px; padding: 0; }
  .rail-spines .pg.is-now { transform: scaleX(1.5); }
}

/* ================================================================== form 3: the camera */

html.is-cam { --pw: 1936px; --rule: 5px; }
.is-cam .planche { height: calc(var(--len, 15) * 100vh); }
.is-cam .cam { position: sticky; top: 0; height: 100vh; overflow: clip; background-color: var(--paper); background-image: var(--dots); background-size: 14px 14px; }
.is-cam .board {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: flex-start;
  gap: 96px;
  width: 4128px;
  max-width: none;
  margin: 0;
  padding: 76px;
  background: var(--paper) var(--grain);
  border: 4px solid var(--ink);
  transform-origin: 0 0;
}
.is-cam .board.is-moving { will-change: transform; }
.is-cam .board::before { content: ""; position: absolute; left: calc(50% - 2px); top: 0; bottom: 0; width: 4px; background: var(--tone); }   /* the fold */
.is-cam .page { flex: none; width: 1936px; }
.is-cam .page + .page { margin-top: 0; }
.is-cam .splash { height: 1000px; }
.is-cam .work p, .is-cam .method p, .is-cam .desk p, .is-cam .cockpit p { font-size: 18px; }
.is-cam .work .proof, .is-cam .method .proof { font-size: 15px; }
.is-cam .project.big { height: 760px; }
.is-cam .project.big .shot { height: 560px; }
.is-cam .project.big:nth-child(2) .shot { height: 430px; }
.is-cam .project.big .cap-box { margin: -56px 22px 20px; padding: 20px 24px 18px; }
.is-cam .strip-list { grid-template-columns: repeat(5, 1fr); }
.is-cam .project.small, .is-cam .project.small:nth-child(n + 4) { grid-column: auto; height: 660px; }
.is-cam .project.small .shot { height: 250px; }
.is-cam .more { position: absolute; right: 22px; bottom: -34px; z-index: 7; margin: 0; }
.is-cam .steps { grid-template-columns: repeat(4, 1fr); }
.is-cam .step { min-height: 0; height: 640px; }
.is-cam .row-b { grid-template-columns: 700px 1fr; }
.is-cam .live { height: 700px; min-height: 0; }
.is-cam .counter { font-size: 30px; }
.is-cam .desk { grid-template-columns: 336px 1fr; }
.is-cam .desk .cap-box { padding: 40px 26px 20px 34px; }
/* The caption column of the desk is tall: its words are large enough to fill it. */
.is-cam .desk .cap-box h2 { font-size: 60px; }
.is-cam .desk .cap-box > p:not(.links):not(.desk-go) { font-size: 21px; line-height: 1.5; }
.is-cam .cockpit .speed { display: block; }
/* The pilot seat on the spread: the picture is free of boxes, and its words are a bar under it in large type
   (the camera shows this panel at about 0.6). */
.is-cam .cockpit { display: flex; flex-direction: column; }
.has-flight .cockpit .ship, .has-flight .cockpit .land, .has-flight .cockpit .speed { display: block; }
/* The hands turn about a point under the picture. They sit a little lower, so that the turn shows no foot of an arm. */
.has-flight .cockpit .hands { top: 5.8%; bottom: -5.8%; }
.is-cam .cockpit .cap-box { position: static; width: auto; margin: 0; display: flex; align-items: center; gap: 46px; padding: 30px 46px 26px; border: 0; border-top: var(--rule) solid var(--ink); border-radius: 0; }
.is-cam .cockpit .cap-box h2 { margin: 0; font-size: 96px; white-space: nowrap; }
.is-cam .cockpit .cap-box p { margin: 0; max-width: 14ch; font-size: 36px; line-height: 1.3; }
.is-cam .cockpit .cap-box .go { flex-wrap: nowrap; gap: 22px; max-width: none; margin-left: auto; }
.is-cam .cockpit .go .button { min-height: 86px; padding: 0.36em 0.8em 0.24em; font-size: 44px; border-width: 5px; }
.is-cam .promise { left: 214px; top: -24px; font-size: 20px; }
.is-cam .method .promise { left: 256px; }
/* On the spread no two step captions stand one over the other, and the first title needs the width: the numeral
   keeps its own width there. */
.is-cam .has-num .num { min-width: 0; }
/* On the spread the closing note stands over the last panel, so that the first camera stop does not show a part of it. */
.is-cam .method .method-end { position: absolute; left: auto; right: 0; top: -24px; margin: 0; white-space: nowrap; }
.is-cam .desk .cap-box .links { font-size: 18px; }
/* The words of the next part stand on the screen at the end of the dive. The heading of that part stays in the
   page for a screen reader, and the page shows the one on the screen. */
.iris-title { position: absolute; left: max(16px, calc((100% - 1216px) / 2)); top: calc(max(32vh, 260px) - 150px); margin: 0; font: 800 clamp(50px, 7vw, 96px)/0.88 var(--display); text-transform: uppercase; color: var(--ink); opacity: 0; }
.is-cam .client-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.is-cam .client { padding-top: 0; }
.is-cam .client-head { padding-top: 0; }
.is-cam .client .lead { margin-top: 0; }
/* The picture is as tall as the column of cards beside it, so that the two columns end on one line. */
.is-cam .cargo { align-self: stretch; aspect-ratio: auto; }
/* draft.js sets --fold when the window is too short for the row of two under the picture at the stop of the
   client part: the row then starts under the window, and its own stop shows it. */
.is-cam .crates-more { margin-top: var(--fold, var(--gut)); }
/* The paper tile is not see-through, so it is printed on the colour (multiply): teal with the grain of the sheet. */
.is-cam .iris { display: block; position: absolute; inset: 0; z-index: 8; background: var(--screen) var(--grain); background-blend-mode: multiply; opacity: 0; pointer-events: none; }
/* What the screen shows, drawn as lines. draft.js gives it the place of the screen. */
.hud { position: absolute; overflow: visible; }
.hud-disc { fill: var(--paper); opacity: 0.34; }
.hud-ln { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0.6; }
.hud-dash { stroke-dasharray: 2 5; }
.hud-thin { stroke-width: 0.9; }
.hud-mark { fill: var(--orange); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
/* The veil: paper over every panel but the one that the camera is on. Over text it is a flat wash, so no letter
   is cut by a dot. Over a picture it has a halftone of paper too (a screen tone), so a dark picture is a toned
   panel and not a grey slab. draft.js cuts the clear window and places one tile of dots on each picture. */
/* The cord lies on the page, over the veil and over the frames. */
.is-cam .cord { z-index: 9; }
.is-cam .veil, .is-cam .veil-tone { display: block; position: absolute; inset: 0; z-index: 8; opacity: 0; pointer-events: none; }
.is-cam .veil { background: var(--paper); }
.veil-tone i { position: absolute; background-image: radial-gradient(circle at 50% 50%, rgba(242, 237, 223, 0.9) 0 34%, transparent 39%); background-size: 7px 7px; }
.is-cam .client { margin-top: calc(-1 * var(--rise, 0px)); }
.is-cam .client::before { display: none; }

/* ================================================================== motion */

@media (prefers-reduced-motion: no-preference) {
  .button, .autoplay-toggle, .stepper, .rack a, .site-nav a { transition: background-color 0.16s ease-out, color 0.16s ease-out, transform 0.16s var(--ease); }
  .rail .pg { transition: transform 0.24s var(--ease); }
  .stepper:hover { transform: translateY(3px); }
  .lay { will-change: auto; }
}

@media (max-width: 899px) {
  .cockpit .art { aspect-ratio: 4 / 5; }
  .brand { font-size: 26px; }
  .site-nav a { padding: 0 9px; }
  .foot-in { padding-bottom: 30px; }
  .cover.is-tall { justify-self: start; width: 64%; }
}

@media (min-width: 560px) and (max-width: 899px) {
  .kit-list { grid-template-columns: 1fr 1fr; }
}

/* ================================================================== iteration 3 */

/* The film in look B is white ink on a black plate. The plate is printed over a toned ground (ink, with a teal
   halftone that comes up from one corner), so its black is the black of this print and not a black slab. */
.film-ink .art.dark, .film-ink .live .art { isolation: isolate; }
.film-ink .art.dark::before, .film-ink .live .art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, var(--teal) 0 31%, transparent 36%);
  background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(24deg, #000 0, rgba(0, 0, 0, 0.5) 30%, transparent 64%);
  mask-image: linear-gradient(24deg, #000 0, rgba(0, 0, 0, 0.5) 30%, transparent 64%);
}
.film-ink .art.dark > .plate, .film-ink .live .stage { mix-blend-mode: screen; }

/* The caption of the live film. */
.film-cap { position: absolute; z-index: 3; left: 14px; top: 14px; max-width: 17ch; margin: 0; padding: 9px 13px 6px; font: 500 20px/1.3 var(--pen); background: var(--paper); border: 4px solid var(--ink); border-radius: var(--wobble); }
.is-cam .film-cap { left: 24px; top: 24px; font-size: 24px; }

/* The dated public figure on the large panel of a project. */
.fact { display: inline-block; justify-self: start; padding: 5px 10px 2px; font: 500 17px/1.3 var(--pen); border: 2px dashed var(--ink); }
.post-intro .fact { margin-top: 12px; }

@media (min-width: 900px) {
  .project.big:first-child .cap-box > .fact { grid-column: 1; }

  /* The showcase. The title is one line over the sheet. The proof pictures are large: one large and two small,
     as a comic sets one wide panel beside two narrow ones. */
  body[data-page="showcase"] .page-head h1 { grid-column: 1 / 13; max-width: none; font-size: clamp(64px, 10.4vw, 150px); }
  body[data-page="showcase"] .page-head .lead { grid-column: 1 / 8; margin: 16px 0 0; }
  #projects .shots { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px var(--gut); align-items: start; }
  #projects .shots::after { display: none; }
  #projects .shots li { min-width: 0; }
  #projects .shots.n3 li:nth-child(1) { grid-column: 1 / 9; grid-row: 1 / 3; }
  #projects .shots.n3 li:nth-child(2) { grid-column: 9 / 13; grid-row: 1; }
  #projects .shots.n3 li:nth-child(3) { grid-column: 9 / 13; grid-row: 2; }
  #projects .shots.n2 li { grid-column: span 6; }
  #projects .shots.n1 li { grid-column: 1 / 9; }
  #projects .shots.tall li { grid-column: span 3; }
}

/* The fixed name and the menu stand on a band of paper with an ink rule, so that no heading runs under them.
   The camera page has none: there the two tabs stand on the table beside the sheet. */
@media (min-width: 1280px) {
  html:not(.is-cam) .site-head::before { content: ""; position: absolute; z-index: -1; left: -22px; right: -22px; top: -16px; height: 84px; background: var(--paper) var(--grain); border-bottom: var(--rule) solid var(--ink); pointer-events: auto; }
}

/* The phone: the first screen holds the picture, the headline, the line about me and the first button. The seven
   chips of the rail end before the play control. */
@media (max-width: 559px) {
  .splash .art { aspect-ratio: 1 / 0.8; }
  .splash .lead { margin-top: 16px; padding: 16px 26px 22px; font-size: 17px; }
  .splash .actions { margin-top: 16px; }
  .rail { gap: 4px; }
  .rail .pg { width: 17px; }
}

/* ================================================================== round 3.1 */

/* The display of the pilot seat in the dive: an ink rim and a ring of dots. They keep their weight while the
   display swells (the stroke does not scale). draft.js shows them when the dive starts. */
.scope-rim { fill: none; opacity: 0; vector-effect: non-scaling-stroke; }
.rim-ink { stroke: var(--ink); stroke-width: 5px; stroke-linejoin: round; }
.rim-dots { stroke: var(--ink); stroke-width: 4px; stroke-linecap: round; stroke-dasharray: 0.1 10; opacity: 0; }

/* A second ship that crosses the panes while the flight runs. draft.js moves it. */
.wing { position: absolute; left: 0; top: 0; width: 17%; height: auto; overflow: visible; opacity: 0; transform-origin: 0 0; }
.wing-body { fill: var(--paper); stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.wing-fin { fill: var(--orange); stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.wing-glass { fill: var(--teal); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.wing-belly { fill: var(--ink); }
.wing-trail { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

/* The client part: a halftone of ink comes up from its foot, as on the film panels. */
.client::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; pointer-events: none; background-image: radial-gradient(circle at 50% 50%, rgba(18, 18, 15, 0.5) 0 28%, transparent 33%); background-size: 9px 9px; -webkit-mask-image: linear-gradient(to top, #000 0, transparent 100%); mask-image: linear-gradient(to top, #000 0, transparent 100%); }
.client .wrap { z-index: 1; }

/* The post has one drawn panel at its head. */
.post .head-art { aspect-ratio: 16 / 8.2; margin-top: 30px; }
.post .head-art img { object-position: 50% 50%; }

@media (min-width: 900px) {
  /* The claims of a project fill each row: three in a row, or two and two, never one alone beside paper. The
     counts are one strip under them. */
  #projects .decisions { grid-column: 1 / 13; display: flex; flex-wrap: wrap; gap: 26px var(--gut); }
  #projects .decisions li { flex: 1 1 calc(33.333% - var(--gut)); min-width: 0; }
  #projects .decisions li:first-child:nth-last-child(4), #projects .decisions li:first-child:nth-last-child(4) ~ li { flex-basis: calc(50% - var(--gut)); }
  #projects .decisions li > p:first-child { max-width: none; }
  #projects .counts { grid-column: 1 / 13; grid-row: 4; display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 34px; }
  #projects .shots { grid-row: 5; }
  .post .head-art { margin-top: 44px; }
}
