/* A run sheet from the press: cream stock, riso inks, every heading a hair out of register.
   The hero is the press itself; the sections under it keep prints beside the words that describe them. */
:root {
  --paper: #f4efe3;
  --ink: #1d1d1f;
  --muted: #5e584d;
  --rule: #d3c9b2;
  --blue: #3d5588;
  --red: #f15060;
  --pink: #ff48b0;
  --pink-text: #d81b88;   /* Fluorescent Pink darkened to 4:1 on the paper, for words people must read */
  --pink-ghost: #ffa3d6;  /* the second drum's pink, screened light so its overlap with blue prints indigo, not mud */
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --mono: 'Courier Prime', 'Courier New', Courier, monospace;
  --gutter: max(16px, 4vw);
  --p: clamp(120px, 13vw, 250px);
  --floor-h: calc(var(--p) * 1.18 + 28px);
  --bar-h: 48px;  /* the logo and section links across the top of the hero */
  /* the press's height on a tall screen: what the bar, the floor and the hero's top padding leave, plus the overlap into the floor */
  --press-room: calc(100svh - var(--bar-h) - var(--floor-h) + var(--p) * .35 - 30px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper) url(art/paper-grain.png) repeat;
  background-size: 256px 256px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .15em; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.col { max-width: 64ch; }

/* overprint: a second drum lands the same words a hair off, multiplied over the first */
.mis, .mis-h { position: relative; }
.mis { display: block; }
.mis::after, .mis-h::after {
  content: attr(data-text);
  content: attr(data-text) / "";  /* empty alt text, so screen readers don't read the line twice */
  position: absolute; inset: 0; pointer-events: none;
  color: var(--pink-ghost); mix-blend-mode: multiply;
}
.mis-h {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.2rem, 5.4vw, 3.8rem); line-height: .98; letter-spacing: .005em;
  color: var(--blue); margin: 0 0 1.4rem; text-wrap: balance;
}
.mis-h::after { transform: translate(.04em, .028em); }
.kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; margin: 0 0 .4rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  grid-template-areas: "copy press" "floor floor";
  column-gap: clamp(16px, 3vw, 48px);
  min-height: calc(100svh - var(--bar-h));
  padding: 10px var(--gutter) 0;
}
/* the art puts the trim corner at 75% of the image, so anchoring each mark at a hero corner frames a trim box inset by that much */
.crop { position: absolute; width: 48px; height: 48px; pointer-events: none; z-index: 5; }
.crop.tl { left: 0; top: 0; }
.crop.tr { right: 0; top: 0; transform: scaleX(-1); }
.crop.bl { left: 0; bottom: 0; transform: scaleY(-1); }
.crop.br { right: 0; bottom: 0; transform: scale(-1); }

.bar {
  position: sticky; top: 0; z-index: 10;
  min-height: var(--bar-h); padding: 6px var(--gutter);
  background: var(--paper) url(art/paper-grain.png) repeat; background-size: 256px 256px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.5rem;
}
.nav .cta { color: var(--red); border: 2px solid var(--red); padding: .3rem .6rem .25rem; font-family: var(--display); font-weight: 400; font-size: .95rem; letter-spacing: .05em; }
.nav .cta:hover { background: var(--red); color: var(--paper); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.3rem; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.mark {
  display: flex; align-items: center; gap: .55rem; margin: 0;
  font-family: var(--display); text-transform: uppercase; font-size: 1.15rem; letter-spacing: .04em;
}
.mark img { width: 34px; height: 34px; }

.copy { grid-area: copy; align-self: center; min-width: 0; position: relative; z-index: 5; }
.headline {
  min-width: 0;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  /* three lines that never wrap, sized to the column (the longest line is about 7.05em) and capped by the viewport's
     height, so the first screen goes to the press and the pile */
  container-type: inline-size;
  line-height: .98; letter-spacing: .004em; white-space: nowrap;
  color: var(--blue); margin: 0; padding-top: 1.2rem;
}
.headline .mis { font-size: min(13.9cqi, 8.6rem, 10.5svh); }
.l1::after { transform: translate(.03em, .022em); }
.l2::after { transform: translate(-.024em, .03em); }
.l3::after { transform: translate(.04em, -.014em); }

.intro { display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; padding-top: clamp(1.2rem, 3svh, 2.2rem); }
.lede { max-width: 40ch; margin: 0; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.5; }

.press {
  grid-area: press; align-self: end; margin: 0 0 calc(var(--p) * -.35);
  position: relative; z-index: 1;
  width: min(58vw, calc(var(--press-room) * 10 / 9));
  aspect-ratio: 800 / 720;
}
.stage { position: absolute; left: 0; top: 0; width: 800px; height: 720px; transform-origin: 0 0; transform: scale(var(--s, .7)); }
.stage .layer { position: absolute; left: 0; top: 0; width: 800px; height: 720px; max-width: none; }
.drum { position: absolute; left: 105px; top: 300px; width: 210px; height: 135px; overflow: hidden; }
.drum i {
  display: block; width: 210px; height: 1620px;
  background: url(art/printer-drum.png) 0 0 / 210px 1620px no-repeat;
  animation: drum .6s steps(12) infinite paused;
}
.printing .drum i { animation-play-state: running; }
@keyframes drum { to { transform: translateY(-1620px); } }

/* the run counter on the panel's LCD: four cells of printer-digits.png, laid where the art leaves unlit segments */
.counter { position: absolute; left: 376px; top: 316px; width: 102px; height: 42px; }
.counter i {
  position: absolute; top: 0; width: 28px; height: 42px;
  background: url(art/printer-digits.png) 0 0 / 280px 42px no-repeat;
  background-position-x: calc(var(--d, 2) * -28px);
}
.counter i:nth-child(2) { left: 24.5px; }
.counter i:nth-child(3) { left: 49px; }
.counter i:nth-child(4) { left: 73.5px; }

/* the job panel: the blank band under the drum window, styled as the LCD above it (blue screened dark, lit segments
   in the counter's yellow), where each sheet's traits type out one at a time while it prints */
.led {
  position: absolute; left: 92px; top: 463px; width: 476px; height: 62px;
  display: flex; align-items: center; overflow: hidden;
  padding: 0 16px; border: 3px solid var(--ink); border-radius: 9px;
  background: radial-gradient(#16161a 1.1px, transparent 1.5px) 0 0 / 4px 4px, #4a5d81;
  box-shadow: inset 0 3px 0 rgba(22, 22, 26, .45);
}
.led span {
  font: 700 28px/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
  color: #f4e368; text-shadow: 0 0 6px rgba(244, 227, 104, .55);
  transform: skewX(-6deg);
}

/* the pile lands on the floor row; JS writes --floor, the floor's foot in hero pixels */
.floor { grid-area: floor; height: var(--floor-h); }
/* front to back: the falling sheet, the pile, the sheet printing on the tray, the machine */
.pile, .flight, .out-tray { position: absolute; inset: 0; pointer-events: none; }
.out-tray { z-index: 2; }
.pile { z-index: 3; }
.flight { z-index: 4; }
.sheet {
  position: absolute; left: 0; top: 0; width: var(--p); height: var(--p);
  -webkit-mask: url(art/deckle-mask.png) 0 0 / 100% 100%;
  mask: url(art/deckle-mask.png) 0 0 / 100% 100%;
  background: var(--paper);
}
.sheet img { display: block; width: 100%; height: 100%; }
.flight .sheet, .out-tray .sheet { will-change: transform; transform-origin: 50% 50%; }
.item {
  position: absolute; width: var(--p); height: var(--p);
  top: calc(var(--floor, 100%) - var(--p) * (1 + var(--up, 0)) - 14px);
  transform: rotate(var(--r)); transition: opacity .6s ease;
}
.item .sheet { transform: none; }
.item .shade {
  position: absolute; left: -12.5%; top: -10.9%; width: 125%; height: 125%; max-width: none;
  transform-origin: 50% 50%;
}

/* ---------- sections ---------- */
main { position: relative; padding-top: clamp(1.5rem, 4vw, 3rem); }

section { padding-block: clamp(2.5rem, 6vw, 4.5rem); scroll-margin-top: var(--bar-h); }

.rule { height: 64px; background-repeat: no-repeat; background-size: max(100%, 512px) 64px; background-position: right center; }
.rule.flip { transform: scaleX(-1); }
.rule.red { background-image: url(art/halftone-red.png); }
.rule.blue { background-image: url(art/halftone-blue.png); }
.rule.pink { background-image: url(art/halftone-pink.png); }

/* a print as it sits on the page: deckled, turned a little, with its own shadow */
.trait img, .scatter img, .ones img, .ones .unknown {
  display: block; width: 100%; height: auto; aspect-ratio: 1;
  -webkit-mask: url(art/deckle-mask.png) 0 0 / 100% 100%;
  mask: url(art/deckle-mask.png) 0 0 / 100% 100%;
}

/* each sheet is trimmed by hand: make_art.py draws six off-square outlines, and every print wears one */
.sheet.deckle-1, img.deckle-1, .unknown.deckle-1 { -webkit-mask-image: url(art/deckle-1.png); mask-image: url(art/deckle-1.png); }
.sheet.deckle-2, img.deckle-2, .unknown.deckle-2 { -webkit-mask-image: url(art/deckle-2.png); mask-image: url(art/deckle-2.png); }
.sheet.deckle-3, img.deckle-3, .unknown.deckle-3 { -webkit-mask-image: url(art/deckle-3.png); mask-image: url(art/deckle-3.png); }
.sheet.deckle-4, img.deckle-4, .unknown.deckle-4 { -webkit-mask-image: url(art/deckle-4.png); mask-image: url(art/deckle-4.png); }
.sheet.deckle-5, img.deckle-5, .unknown.deckle-5 { -webkit-mask-image: url(art/deckle-5.png); mask-image: url(art/deckle-5.png); }
.sheet.deckle-6, img.deckle-6, .unknown.deckle-6 { -webkit-mask-image: url(art/deckle-6.png); mask-image: url(art/deckle-6.png); }

/* meet Iggy */
.chapter {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--rule);
  background-image: radial-gradient(rgba(61, 85, 136, .14) 1px, transparent 1.35px);
  background-size: 7px 7px;
}
.chapter .opener { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; text-transform: uppercase; margin-bottom: 1.1rem; }
.chapter .coda { margin: 1.4rem 0 0; padding-top: 1rem; border-top: 2px dashed var(--ink); font-weight: 700; }

.redact {
  display: inline-block; background: var(--ink); color: transparent; user-select: none;
  padding: 0 .12em; line-height: 1.05; box-shadow: 2px 1px 0 var(--red); vertical-align: baseline;
}
.redact::selection { color: transparent; }
span.redact:empty { width: 3.2em; height: 1.05em; vertical-align: -.15em; }
span.redact.wide:empty { width: 6em; height: 1em; }

/* every trait, one example print each */
.trait { margin-top: 2.2rem; border-top: 2px solid var(--ink); padding-top: .7rem; }
.trait h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.35rem; line-height: 1.1; margin: 0 0 1rem; letter-spacing: .02em; }
.trait ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 1.4rem 1.1rem; }
.trait li { min-width: 0; }
.trait span { display: block; margin-top: .5rem; font-size: .85rem; font-weight: 700; line-height: 1.3; }

/* on the shelf: the drum that printed Iggy, and the ones that haven't run */
.ladder { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
@media (min-width: 760px) { .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 66rem; } }
.pass { position: relative; min-width: 0; padding: 0 1rem 0 0; }
.drum-icon {
  display: block; width: 126px; height: 81px; margin-bottom: .9rem;
  background: url(art/printer-drum.png) 0 0 / 126px 972px no-repeat;
  border: 3px solid var(--ink); border-radius: 10px;
}
.pass:not(.lit) .drum-icon { filter: grayscale(1) contrast(.5) brightness(1.25); opacity: .55; }
@media (min-width: 760px) {
  .pass::before { content: ""; position: absolute; left: 126px; right: 0; top: 40px; border-top: 3px dashed var(--ink); opacity: .35; }
  .pass:last-child::before {  /* the shelf runs on past the last drum and fades out */
    -webkit-mask-image: linear-gradient(to right, #000 20%, transparent);
    mask-image: linear-gradient(to right, #000 20%, transparent);
  }
}
.pass .n { display: block; font-size: .85rem; color: var(--muted); }
.pass .who { display: block; font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.05; text-transform: uppercase; margin: .15rem 0 .4rem; }
.pass p { font-size: .95rem; margin: 0; }
.plain { margin-top: 2.5rem; max-width: 64ch; border-left: 6px solid var(--blue); padding-left: 1.2rem; }
.plain p:last-child { margin: 0; font-weight: 700; }

/* palettes: palettes.png holds one 56px swatch per palette, in the order the page lists them */
.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1.8rem clamp(1.5rem, 3vw, 2.5rem); margin-top: .5rem; }
.group { min-width: 0; border-top: 2px solid var(--ink); padding-top: .7rem; }
.group h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.35rem; line-height: 1.1; margin: 0 0 .6rem; letter-spacing: .02em; }
.group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.group li { display: flex; align-items: center; gap: .65rem; min-height: 44px; }
.group li::before {
  content: ""; flex: none; width: 44px; height: 44px;
  background: url(art/palettes.png) no-repeat;
  background-size: calc(33 * 44px) 44px;
  background-position: calc(var(--i) * -44px) 0;
}
.ghost-line { margin: 2rem 0 0; max-width: 64ch; font-weight: 700; }

/* nine one of ones: the name, and nothing about how it prints */
.ones { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.4rem 2rem; }
@media (min-width: 640px) { .ones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .ones { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ones li { min-width: 0; border-top: 1px solid var(--ink); padding-top: .8rem; container-type: inline-size; }
.ones h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.5rem; line-height: 1.1; margin: 0 0 .6rem; }
.ones .shown img { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.ones .about { margin: .8rem 0 0; font-size: .9rem; line-height: 1.5; }
.ones h3 .redact { display: inline-block; height: .85em; width: 3.4em; margin-right: .3em; vertical-align: -.05em; }
.ones h3 .redact:nth-child(2) { width: 2.6em; }
.ones .lines { margin: .95rem 0 0; display: grid; gap: .45rem; }
.ones .lines .redact { display: block; height: .9em; width: 100%; }
.ones .lines .redact:nth-child(2) { width: 86%; }
.ones .lines .redact:last-child { width: 55%; }
/* the eight not shown: a white sheet with one big question mark printed on it */
.ones .unknown {
  aspect-ratio: 1; display: grid; place-items: center;
  background-color: #fbfaf6;
  background-image: radial-gradient(rgba(61, 85, 136, .16) 1px, transparent 1.35px); background-size: 7px 7px;
}
.ones li:nth-child(even) .unknown { transform: rotate(1.4deg); }
.ones li:nth-child(odd) .unknown { transform: rotate(-1.6deg); }
.ones .unknown .mis { font-family: var(--display); font-size: clamp(6rem, 22cqi, 11rem); line-height: 1; color: var(--blue); padding-bottom: .08em; }
.ones .unknown .mis::after { transform: translate(.045em, .03em); }

/* faq, with a few sheets off the pile beside it */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 66ch) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); } }
.faq { margin: 0; display: grid; gap: 1.5rem; }
.faq dt { font-weight: 700; }
.faq dd { margin: .25rem 0 0; }
.faq dd p { margin: 0; }
.faq dd p + p { margin-top: .7rem; }
.scatter { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.scatter img { filter: drop-shadow(2px 5px 7px rgba(42, 36, 32, .22)); }
.scatter img:nth-child(1) { transform: rotate(-6deg); }
.scatter img:nth-child(2) { transform: rotate(4deg) translateY(.6rem); }
.scatter img:nth-child(3) { transform: rotate(-2deg); }
@media (min-width: 900px) {
  .scatter { position: sticky; top: 2rem; display: block; aspect-ratio: 1 / 1.25; }
  .scatter img { position: absolute; width: 62%; }
  .scatter img:nth-child(1) { left: 0; top: 0; transform: rotate(-7deg); }
  .scatter img:nth-child(2) { right: 0; top: 22%; transform: rotate(5deg); }
  .scatter img:nth-child(3) { left: 10%; top: 46%; transform: rotate(-2deg); }
}

/* the closing step */
.pull-card {
  border: 3px solid var(--ink); box-shadow: 7px 6px 0 var(--red);
  padding: clamp(1.4rem, 3vw, 2.4rem); max-width: 52rem;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem 2rem; align-items: center;
}
@media (min-width: 760px) { .pull-card { grid-template-columns: minmax(0, 1fr) auto; } .pull-card .mis-h { grid-column: 1 / -1; } }
.pull-card .mis-h { margin-bottom: .4rem; }
.pull-card p { margin: 0; font-size: 1.1rem; }
.stamp {
  justify-self: start; margin: 0; display: inline-block; text-decoration: none;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; font-size: 1.25rem; line-height: 1;
  color: var(--red); border: 3px solid var(--red); padding: .5rem .8rem .45rem; transform: rotate(-3deg);
}
.stamp:hover { color: var(--paper); background: var(--red); }

.colophon { padding-block: 0 4rem; font-size: .88rem; color: var(--muted); }
.colophon-inner { display: flex; gap: 1rem; align-items: flex-start; border-top: 2px solid var(--ink); padding-top: 2rem; }
.colophon img { flex: none; width: 30px; height: 30px; margin-top: .1rem; }
.colophon p { max-width: 66ch; margin: 0; }
.colophon a { margin-left: auto; font-weight: 700; }

@media (min-width: 900px) and (max-width: 1199px) {
  .press { width: min(50vw, calc(var(--press-room) * 10 / 9)); }
}
/* a tablet held upright is wide enough for the side-by-side hero but too tall to fill: let it sit at content height, so
   the press and the pile stay up near the headline instead of sinking to the foot of the screen */
@media (min-width: 900px) and (orientation: portrait) {
  .hero { min-height: 0; padding-bottom: 0; }
  .copy { align-self: end; }
}

/* ---------- narrow: the headline, the press and the pile, so a print shows on the first screen, then the lede ---------- */
@media (max-width: 899px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "copy" "press" "floor" "intro";
    min-height: 0;
  }
  .headline { padding: 1.1rem 0 .4rem; }
  .headline .mis { font-size: min(13.9cqi, 5rem, 6svh); }
  .press { width: min(100%, 560px); justify-self: center; margin-bottom: calc(var(--p) * -.18); }
  .copy { display: contents; }
  .headline { grid-area: copy; }
  .intro { grid-area: intro; padding: 1rem 0 1.8rem; }
  .crop { display: none; }
  .nav .anchor { display: none; }
  .trait ul {
    display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .trait ul::-webkit-scrollbar { display: none; }
  .trait li { flex: 0 0 42%; scroll-snap-align: start; }
  .palettes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1rem; }
}
