@font-face { font-family: "Saira"; src: url(fonts/Saira.woff2) format("woff2"); font-weight: 100 900; font-stretch: 50% 125%; font-display: swap; }
@font-face { font-family: "Saira"; src: url(fonts/Saira-Italic.woff2) format("woff2"); font-weight: 100 900; font-stretch: 50% 125%; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/IBMPlexMono-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
/* the page's dots as letters (tools/dotfont.py): an em is ten dots, so a font-size of ten times a dot pitch prints on
   it. Used only where its dots can be the page's own; 2 KiB, so it is waited for rather than swapped in */
@font-face { font-family: "Gadget Dots"; src: url(fonts/GadgetDots.woff2) format("woff2"); font-display: block; }
/* a colour, so the card frame's dots can fade between two */
@property --frame { syntax: "<color>"; inherits: true; initial-value: transparent; }
/* a length, so scripts read the dot pitch back in pixels */
@property --dot { syntax: "<length>"; inherits: true; initial-value: 5px; }

/*
  One system for every measure:
  - space: Fibonacci steps, so each is the two before it added (and about φ times the last)
  - type: a modular scale, 16px × √φ^n, so every second step is φ apart
  - photos: golden rectangles, 1.618 : 1
  - one column edge for the bar, the hero and the grid
*/
:root {
  --s1: 5px; --s2: 8px; --s3: 13px; --s4: 21px; --s5: 34px; --s6: 55px; --s7: 89px; --s8: 144px;

  --t-1: 12.6px; --t0: 16px; --t1: 20.4px; --t2: 25.9px; --t3: 32.9px; --t4: 41.9px;
  --t5: 53.3px; --t6: 67.8px; --t7: 86.2px;

  --max: 1320px;
  --edge: max(var(--s4), 4vw, (100% - var(--max)) / 2);
  /* one dot pitch for everything made of dots (the photo screens, the gear background, the dotted rules and frames,
     the dot digits): the same size on every screen, gearmark's cell at 5px. The mark, 182 dots wide, has its own:
     the same where it fits, a half or a third of it where not (pitch.js sets both, to whole device pixels) */
  --dot: 5px;
  --mark-dot: min(5px, (100vw - 2 * max(var(--s4), 4vw)) / 182);

  --bg: #0d0a08;
  --panel: #14100c;
  --ink: #eadbc6;
  --soft: #e2d2bc;
  --dim: #a3917c;
  --line: rgba(255, 170, 100, .14);
  --accent: #e8874a;
  --cold: #8cc6bd;
  --sans: "Saira", system-ui, sans-serif;     /* squared, rounded bowls: the wordmark's own construction */
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --narrow: 87.5%;                             /* Saira's width for titles */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* no text inflation on a turned phone */
/* the page sits on a faint field of meshing gears (gearmark site writes img/gears.webp: 160 dots square) */
body { margin: 0; background: var(--bg) url(img/gears.webp) 0 0 / calc(var(--dot) * 160); color: var(--ink); font: 400 var(--t0)/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, ul { margin: 0; }

/* film grain over everything, moving like a projected print. The 256px grain tile repeats, so a jump of up to one
   tile looks like any jump: the layer only reaches one tile past the top left corner and moves within it. Kept that
   small (not twice the screen), it leaves the GPU room for the page's tiles, so nothing blanks out while scrolling. */
body::after {
  content: ""; position: fixed; inset: -256px 0 0 -256px; z-index: 50; pointer-events: none;
  background: url(img/grain.webp); opacity: .07;
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(179px, 74px); } 40% { transform: translate(51px, 201px); }
  60% { transform: translate(230px, 23px); } 80% { transform: translate(13px, 166px); } 100% { transform: translate(0, 0); }
}

/* top bar: pinned. Over the hero it is bare and its small mark waits; once the hero's mark has scrolled away
   (site.js sets .is-docked) it gets a dark ground and a dotted rule, and the small mark shows. The mark's height is
   the nav's cap height × φ. */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s4) var(--edge);    /* the same docked or not: only the ground and the mark change */
  transition: background-color .3s;
}
.bar.is-docked {
  background: rgba(13, 10, 8, .94);   /* no backdrop blur: it is redone every frame of a scroll, and at this opacity barely shows */
}
.bar::after { opacity: 0; transition: opacity .3s; }   /* its row of dots (below, with the others) shows once docked */
.bar.is-docked::after { opacity: 1; }
.mark { transition: opacity .3s, visibility .3s; }
.bar[data-dock]:not(.is-docked) .mark { opacity: 0; visibility: hidden; }
/* the hero's own mark, its dots and gears, scaled down to the bar; its height given back so the bar keeps the height
   its letters alone gave it */
.mark img { --h: var(--s6); height: var(--h); width: auto; margin-block: calc((var(--s4) - var(--h)) / 2); }
.bar nav { display: flex; gap: var(--s5); font: 500 var(--t-1) var(--sans); letter-spacing: .04em; }
/* over the bright sky the links need their own shadow to stay legible */
.bar nav a { text-decoration: none; color: var(--soft); text-shadow: 0 0 3px rgba(13, 10, 8, .9), 0 1px 13px rgba(13, 10, 8, .9); transition: color .2s; }
.bar nav a:hover { color: #fff; }
/* the one call to action: a white block, its padding given back so the bar keeps its height */
.bar nav a.contact { padding: 6px var(--s3); margin-block: -6px; background: #fff; color: var(--bg); text-shadow: none; transition: background-color .2s; }
.bar nav a.contact:hover { background: var(--ink); color: var(--bg); }

/* hero: the wordmark's cap line sits on the golden section of the hero's height; its gears rise above it.
   The photo shows through a dot screen on the mark's own grid: one dot a cell, the cell and the grid's origin set by
   site.js from the mark (the defaults here are the desktop layout's, for when it cannot). */
.hero { position: relative; height: min(100svh, 960px); min-height: 560px; overflow: hidden; background: var(--bg);
  --cell: var(--dot); --grid-x: var(--edge); --grid-y: calc(61.8% + var(--cell) * .618); }
/* the stand-in (img/placeholders.js) prints through the same screen from the first paint, under the photo */
.hero__ghost { position: absolute; inset: 0; background: var(--ghost-hero) 50% 62% / cover no-repeat; }
.hero__photo, .hero__ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%;
  filter: brightness(1.7) saturate(1.15);    /* the dots cover under half the area: lift them back to the photo's level */
  mask: radial-gradient(circle closest-side, #000 calc(76% - .5px), transparent calc(76% + .5px))
        var(--grid-x) var(--grid-y) / var(--cell) var(--cell) repeat; }
/* with site.js the canvas draws the screen itself and opens it under the cursor (HeroDissolve); then the photo (the
   canvas still draws from it) and the stand-in go, as does the stand-in once the photo covers it. Not just hidden:
   Firefox still works through a hidden element's full-hero dot mask and filter each time the hero scrolls back in,
   and falls behind, so the top of the hero showed blank */
.hero.has-dissolve .hero__photo, .hero.has-dissolve .hero__ghost, .hero:has(.hero__photo.is-loaded) .hero__ghost { display: none; }
/* photos fade in once loaded instead of drawing in strips (site.js sets .is-loaded) */
html.js .hero__photo:not(.is-loaded), html.js .card__photo > img:not(.is-loaded) { opacity: 0; }
.hero__photo { transition: opacity .6s; }
.hero__screen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 10, 8, .72) 0, rgba(13, 10, 8, 0) var(--s8)),    /* under the bar */
              linear-gradient(90deg, rgba(13, 10, 8, .78) 0%, rgba(13, 10, 8, .3) 50%, rgba(13, 10, 8, 0) 76%),
              linear-gradient(0deg, var(--bg) 0%, rgba(13, 10, 8, 0) 38.2%);
}
.hero__text { --mark: calc(var(--mark-dot) * 182); position: absolute; z-index: 1; inset: 61.8% var(--edge) auto;
  inset: round(61.8%, 1px) var(--edge) auto; }   /* on a whole pixel, so the mark's dots land on device pixels */
/* the mark is 182 dots wide and its cap line 28 dots below its top (gearmark), one dot a --mark-dot */
h1 { position: relative; margin-top: calc(var(--mark-dot) * -28); }
/* a dark pool under the mark: the photo behind it is printed through dots of the same pitch, and without it the
   mark's dots, the gears most of all, sink into the photo's */
h1::before { content: ""; position: absolute; z-index: -1; inset: calc(var(--mark-dot) * -21) calc(var(--mark-dot) * -34); pointer-events: none;
  background: radial-gradient(closest-side, rgba(13, 10, 8, .85), rgba(13, 10, 8, .7) 55%, rgba(13, 10, 8, 0)); }
h1 img, .hero__live { width: var(--mark); height: auto; }
/* only the still mark: on the live one the blur would be redone at every turn of the gears, and the pool behind the
   mark already sets it off */
h1 img { filter: drop-shadow(0 4px 30px rgba(0, 0, 0, .55)); }
/* while site.js draws the mark live on a canvas over it (lighting up, then its gears turning), the image waits
   underneath, still there for screen readers */
.hero__live { position: absolute; inset: 0; height: 100%; pointer-events: none; }
h1 img.is-live { opacity: 0; filter: none; }   /* unseen, so no shadow to work out */
/* with scripts the still mark waits for site.js (it lights up dot by dot, or shows when it can't), so it never
   flashes whole first; if site.js never answers it shows after 2.5 s anyway */
html.js h1 img:not(.is-live, .is-ready) { opacity: 0; animation: show 0s 2.5s forwards; }
@keyframes show { to { opacity: 1; } }
.lede { margin-top: var(--s5); width: var(--mark); font: italic 300 var(--t2)/1.27 var(--sans); color: var(--soft); text-wrap: balance; }
/* where the mark prints on the page's own dot (pitch.js sets .dots-one), the line under it does too, in dot letters:
   seven dots below the mark and whole dots a line, so its dots land on the photo's screen behind. Elsewhere (phones,
   tablets: the mark's dot is a part of the page's) dot letters could not match the page's dots, so it stays in type */
html.dots-one .lede { margin-top: calc(var(--mark-dot) * 7); font: calc(var(--mark-dot) * 10)/1 "Gadget Dots", var(--sans); font-synthesis: none; }

/* what the lab does, before the gadgets: each section's words, and the idea drawn in the page's dots beside them
   (site.js, DotScene). They all sit on plain black; the gear field only fades in after the last, slowly */
/* plain black under every section, the gear field fading in only in the room after the last */
.works { --fade: calc(var(--s8) + var(--s7)); position: relative; padding-bottom: var(--fade);
  background: linear-gradient(var(--bg) calc(100% - var(--fade)), rgba(13, 10, 8, 0)); }
/* a line of dots down the middle, from the first heading to the last picture: the gap between words and pictures,
   whichever side each is on (site.js puts it on the page's grid column nearest the middle) */
.works__spine { position: absolute; inset: var(--s8) 0 calc(var(--s8) + var(--s7)); pointer-events: none; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: center;
  padding: var(--s8) var(--edge) 0; }
.work + .work { padding-top: var(--s5); }
/* the words centred in their half, as the pictures are in theirs: each the same way from the line down the middle */
.work__text { justify-self: center; width: min(100%, 30rem); }
.work h2 { padding-bottom: 0; margin-bottom: var(--s4); }
.work h2::after { display: none; }   /* the line down the middle stands for these sections' rules */
.work__lede { font: italic 300 var(--t2)/1.27 var(--sans); color: var(--soft); text-wrap: balance; }
.work__body { margin-top: var(--s4); max-width: 34em; font-size: calc(var(--t0) * .9); line-height: 1.618; color: var(--dim); }
.work__visual { position: relative; aspect-ratio: 1.45; }
.work__visual canvas { display: block; width: 100%; height: 100%; }
/* the format a picture is showing, centred just under it (site.js sets its top) */
.work__tag { position: absolute; left: 50%; top: 100%; translate: -50% 0; font: 400 var(--t-1) var(--mono); color: var(--accent); letter-spacing: .06em; }
/* every other section: the picture on the other side */
.work--flip .work__visual { order: -1; }

/* the catalogue */
.catalog { padding: var(--s6) var(--edge) var(--s7); }   /* the sections before it end in the fade's room */
/* Rows of dots, like everything the mark is made of: under the headings, round the cards, on the chips, under the
   repos, above the footer and under the docked bar. Each is a pseudo-element printed on the page's own dot grid, the
   one the gear field is on (cells of --dot from the page's top left): site.js (DotGrid) measures where each element
   sits on that grid. A row spans the whole cells inside its element's width, on the grid row at its edge; a card's
   frame takes the cells just round the card. `space` keeps whole dots even before site.js has measured, or without it */
h2, .chips li, .repos li, .foot, .foot__fine, .card { position: relative; }
h2::after, .chips li::before, .repos li::after, .foot::before, .foot__fine::before, .bar::after, .card::before, .card::after, .works__spine::before {
  content: ""; position: absolute; pointer-events: none;
  --row: radial-gradient(circle closest-side, var(--dots) calc(76% - .5px), transparent calc(76% + .5px));
  left: var(--grid-x0, 0px); width: var(--grid-w, 100%); height: var(--dot); background: var(--row) 0 0 / var(--dot) var(--dot) space no-repeat; }
.chips li::before, .foot::before, .foot__fine::before { top: var(--grid-top, 0px); }                        /* on the top edge */
h2::after, .repos li::after, .bar::after { top: var(--grid-bottom, calc(100% - var(--dot))); }               /* on the bottom edge */
.chips li::before, .card::before { top: var(--grid-top, 0px); height: calc(var(--grid-bottom, calc(100% - var(--dot))) - var(--grid-top, 0px) + var(--dot)); }
.chips li::before { background: var(--row) 0 0 / var(--dot) var(--dot) space no-repeat, var(--row) 0 100% / var(--dot) var(--dot) space no-repeat; }
h2 { --dots: var(--dim); }
.chips li, .foot, .foot__fine, .bar { --dots: var(--line); }
.repos li { --dots: rgba(255, 170, 100, .16); }
/* the column of dots down the middle of the sections: one grid column wide, whole cells inside its box */
.works__spine { --dots: var(--dim); }
.works__spine::before { left: var(--grid-cx, calc(50% - var(--dot) / 2)); width: var(--dot); top: var(--grid-y0, 0px); height: var(--grid-h, 100%);
  background: var(--row) 0 0 / var(--dot) var(--dot) no-repeat space; }
/* once site.js has measured (it sets .dot-grid), every box is whole cells on the grid: one dot a cell, exactly as the
   grid is. (`space` would drop a dot from a row a hair short of whole, and spread the rest off the grid) */
html.dot-grid .works__spine::before { background-repeat: repeat-y; }
html.dot-grid h2::after, html.dot-grid .chips li::before, html.dot-grid .repos li::after, html.dot-grid .foot::before,
html.dot-grid .foot__fine::before, html.dot-grid .bar::after { background-repeat: repeat-x; }
html.dot-grid .card::before { background-repeat: repeat-x; }
html.dot-grid .card::after { background-repeat: repeat-y; }

h2 { font: 500 var(--t6)/1 var(--sans); font-stretch: var(--narrow); letter-spacing: -.01em; padding-bottom: var(--s5); margin-bottom: var(--s6); }

/* each card spans the grid's seven rows and takes them as a subgrid, so across a row every card's title, tagline,
   text, chips, repos and footer start on the same line */
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); column-gap: var(--s5); }
/* no row gap on the grid: a subgrid keeps its parent's gaps between its own rows, so the cards are spaced by margin */
/* a card is framed by rows of dots on the page's pitch; they light up in the accent when the card is hovered */
.card { --frame: var(--line); display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0; margin-bottom: var(--s6);
  padding: var(--dot); background: var(--panel) content-box;
  transition: --frame .25s; }
/* the frame, in the grid cells just round the card (the ring its padding leaves): its top and bottom rows, corner to
   corner, then its sides between them, so no corner dot is printed twice (the dots are translucent: it would show) */
.card::before, .card::after { --dots: var(--frame); left: var(--grid-ox, 0px); width: var(--grid-ow, 100%); }
.card::before { background: var(--row) 0 0 / var(--dot) var(--dot) space no-repeat, var(--row) 0 100% / var(--dot) var(--dot) space no-repeat; }
.card::after { top: calc(var(--grid-top, 0px) + var(--dot)); height: calc(var(--grid-bottom, calc(100% - var(--dot))) - var(--grid-top, 0px) - var(--dot));
  background: var(--row) 0 0 / var(--dot) var(--dot) no-repeat space, var(--row) 100% 0 / var(--dot) var(--dot) no-repeat space; }
.card:hover { --frame: rgba(232, 135, 74, .7); }
.card > :not(.card__photo) { padding-inline: var(--s5); }

/* the photo prints through the hero's dot screen, on the page's pitch; hovering the card shows it whole */
.card__photo { position: relative; aspect-ratio: 1.618 / 1; overflow: hidden; background: var(--ghost) center / cover no-repeat;
  margin: var(--grid-dt, 0px) var(--grid-dr, 0px) 0 var(--grid-dl, 0px); }   /* out to the frame, which sits on the grid round the card */
.card__photo img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.3) saturate(1.1);
  mask: radial-gradient(circle closest-side, #000 calc(76% - .5px), transparent calc(76% + .5px)) 0 0 / var(--dot) var(--dot) repeat; }
.card:hover .card__photo img { filter: brightness(1); mask: none; }
/* with site.js the screen is a canvas over the whole photo that dissolves cell by cell; the lift fades with it */
.card.has-dissolve .card__photo img { mask: none; transition: filter .48s, opacity .4s; }
.card.has-dissolve:hover .card__photo img { filter: brightness(1.3) saturate(1.1); }
.card.has-dissolve.is-open .card__photo img { filter: brightness(1); }
.card__screen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--panel) 0%, rgba(20, 16, 12, .85) 23.6%, rgba(20, 16, 12, 0) 61.8%); }

/* the number in the mark's own dot-matrix capitals: 16 dots tall like the letters of GADGET-LAB */
.card__no { position: absolute; z-index: 1; left: var(--s5); bottom: 0; display: flex; align-items: flex-end; gap: calc(var(--dot) * 3); }
.card__no img { height: calc(var(--dot) * 16); width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .7)); }
.card__no-label { margin-right: var(--s2); font: italic 300 var(--t1)/1 var(--sans); color: var(--dim); }
h3 { padding-top: var(--s4); font: 500 var(--t3)/1.1 var(--sans); font-stretch: var(--narrow); letter-spacing: -.005em; text-wrap: balance; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 6px; }
.card__tag { padding-top: var(--s2); font: italic 300 var(--t1)/1.27 var(--sans); color: var(--soft); text-wrap: balance; }
.card__text { padding-top: var(--s4); font-size: calc(var(--t0) * .9); line-height: 1.618; color: var(--dim); }
.chips { list-style: none; display: flex; flex-wrap: wrap; align-content: start; gap: var(--s2); padding-top: var(--s4); }
/* chips: dots above and below, like a strip of tape on the grid */
.chips li { padding: calc(var(--dot) + 2px) var(--s2); font: 400 var(--t-1)/1.618 var(--mono); color: var(--soft); background: rgba(255, 140, 60, .05); }
.repos { list-style: none; padding-top: var(--s4); font: 400 calc(var(--t0) * .8125)/1.618 var(--mono); }
.repos li { display: flex; justify-content: space-between; gap: var(--s3); padding-block: var(--s1) calc(var(--s1) + var(--dot)); }
.repos a { color: var(--cold); text-decoration: none; overflow-wrap: anywhere; }
.repos a:hover { text-decoration: underline; }
.repos__stat { color: var(--dim); white-space: nowrap; }
.card__foot { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s2) var(--s4);
  padding-block: var(--s4) var(--s5); font: 400 var(--t-1) var(--mono); color: var(--dim); }
.card__foot a { color: var(--accent); text-decoration: none; }
.card__total { margin-left: auto; }

/* footer */
.foot { padding: var(--s6) var(--edge) var(--s5); color: var(--dim); font-size: var(--t-1); background: var(--bg); }
.foot__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: var(--s5); padding-bottom: var(--s6); }
.foot__lab img { height: var(--s4); width: auto; }
.foot__lab p { margin-top: var(--s3); font: italic 300 var(--t1)/1.27 var(--sans); color: var(--soft); }
/* the count in the mark's dot digits, 16 dots tall: digits 3 dots apart, thousands 8 */
.foot__stat { text-align: center; }
.foot__count { display: inline-flex; gap: calc(var(--dot) * 8); }
.foot__group { display: flex; gap: calc(var(--dot) * 3); }
.foot__group img { height: calc(var(--dot) * 16); width: auto; }
.foot__label { margin-top: var(--s3); font: 400 var(--t-1)/1.5 var(--mono); }
.foot__links { display: flex; justify-content: flex-end; gap: var(--s5); font: 500 var(--t-1) var(--sans); letter-spacing: .04em; }
.foot__links a { color: var(--soft); text-decoration: none; }
.foot__links a:hover { color: #fff; }
.foot__fine { padding-top: var(--s4); text-align: center; }

@media (max-width: 720px) {
  .hero::after { background: linear-gradient(180deg, rgba(13, 10, 8, .72) 0, rgba(13, 10, 8, 0) var(--s7)),
                              linear-gradient(0deg, var(--bg) 0%, rgba(13, 10, 8, .72) 50%, rgba(13, 10, 8, .25) 100%); }
  /* the mark centred across, its middle on the golden section of the screen's height, below the photo's horizon:
     it is 60 of its dots tall, so its top sits 30 of them above that line, on a whole pixel so its dots stay crisp;
     the line follows under it */
  .hero__text { inset: calc(61.8% - var(--mark-dot) * 30) var(--edge) auto;
    inset: calc(round(61.8%, 1px) - var(--mark-dot) * 30) var(--edge) auto; }
  /* the mark centred (on a whole device pixel: pitch.js), its pool with it, and the line under it */
  h1 { margin-top: 0; width: var(--mark); margin-left: var(--mark-left, calc((100% - var(--mark)) / 2)); }
  .lede { font-size: var(--t1); margin-inline: auto; text-align: center; }
  .bar nav a:not(:first-child, .contact) { display: none; }
  /* the white block keeps its size; a clear layer round it makes the tap area 44px */
  .bar nav a.contact { position: relative; }
  .bar nav a.contact::after { content: ""; position: absolute; inset: -7px -4px; }
  .mark img { --h: calc(var(--s5) + var(--s2)); margin-block: calc((var(--s3) - var(--h)) / 2); }
  .work, .work--flip { grid-template-columns: 1fr; gap: var(--s4); padding-top: var(--s7); }
  .works__spine { display: none; }   /* one column: a line down the middle would run through it */
  .work__text { width: auto; justify-self: stretch; }
  .work + .work { padding-top: var(--s6); }
  .work--flip .work__visual { order: 0; }
  .catalog { padding-top: var(--s5); }
  h2 { font-size: var(--t5); }
  .card > :not(.card__photo) { padding-inline: var(--s4); }
  .card__no { left: var(--s4); }
  .foot__row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot__links { justify-content: center; }
  /* fingers, not a cursor: every link gets a tap area at least 44px tall, grown with padding and given back with a
     negative margin, so nothing moves; the repo rows get the room for theirs not to overlap */
  .bar nav a, .mark, .card__foot a, .foot__lab a, .foot__links a, .foot__fine a { padding-block: 14px; margin-block: -14px; }
  .foot__lab a { display: inline-block; }
  .repos li { padding-block: var(--s3) calc(var(--s3) + var(--dot)); }
  .repos a { padding-block: var(--s3); margin-block: calc(-1 * var(--s3)); }
}

/* touch screens: no hover, so site.js opens a card's photo as it crosses the middle of the screen, and the card's
   frame lights up with it; a tap flashes in the accent, not the system blue */
@media (hover: none) {
  .card.is-open { --frame: rgba(232, 135, 74, .7); }
  a { -webkit-tap-highlight-color: rgba(232, 135, 74, .22); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none; }
  .card__photo img { transition: none; }
}
