/* ==========================================================================
   Parallel Machines / pages / research.css
   The issue index (Plate III): a short sky head (scattered "Read the record.", the intro and the cadence line;
   beside it the sources as a dot chart and the series in numbers), then one editorial row per issue (No., tags,
   serif title, abstract, meta, the treated cover plate), and a dotted row for the issue that is not written yet.
   Every number comes from data/issues.json, baked into the page by tools/build-atlas.mjs.
   System rule: solid = published (the machine); dots = what is still to come (the record).
   ========================================================================== */

/* ---------- head ---------- */
.research-head { overflow: hidden; }
.research-head .grain { z-index: -1; }
.research-head__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 44px);
  align-items: end;
}
@media (min-width: 1024px) {
  /* about three quarters of a screen: the copy on the left, the sources and the numbers on the right */
  .research-head { display: flex; flex-direction: column; justify-content: flex-end; min-height: 72vh; min-height: 72svh; padding-top: calc(var(--header-h) + clamp(40px, 4.4vw, 72px)); padding-bottom: clamp(44px, 4.4vw, 64px); }
  .research-head__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(48px, 5vw, 96px); }
}
.research-head__copy { display: flex; flex-direction: column; gap: clamp(18px, 2vw, 26px); }
/* the page folio, one format across the site: "Plate III · Research" in .folio mono, as written */
.research-head__folio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; max-width: 26rem; padding-top: var(--space-3); border-top: var(--hair) solid var(--line-strong); color: var(--fg-2); }
.research-head__folio .sep { opacity: .45; }
.research-head__title {
  --scatter-size: clamp(3.5rem, 7.2vw, 6.75rem);
  --scatter-col: 1.12em;
  --scatter-row: .98em;
  margin: 4px 0 0 -.04em;
}
.research-head__intro {
  max-width: 44ch;
  font-size: var(--fs-lead);
  line-height: 1.42;
  color: var(--fg);
  text-wrap: pretty;
}
.research-head__cadence {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg);
}
.research-head__side { display: flex; flex-direction: column; gap: clamp(22px, 2.4vw, 32px); min-width: 0; }
.research-head__series {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: var(--hair) solid var(--line-strong);
}
.research-head__series div {
  padding: 14px 0 16px;
  border-bottom: var(--hair) solid var(--line);
}
.research-head__series div:nth-child(odd) { padding-right: 16px; }
.research-head__series div:nth-child(even) { padding-left: 16px; border-left: var(--hair) solid var(--line); }
.research-head__series dt {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-2);
}
.research-head__q { color: var(--fg-3); }
.research-head__q::before { content: "\00B7"; margin: 0 .5em; }
.research-head__series dd {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--fg);
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .research-head__series dd { font-size: 2rem; }
}

/* ---------- the sources as a dot chart: one square per unique source, a bar per issue (the issue that cites it
   first), solid when more than one issue cites it, the brand's 3 x 3 dot square when only one does ---------- */
.research-field { margin: 0; color: var(--white); }
.research-field__cap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tr-mono);
  color: var(--fg-2);
}
.research-field__fig { font-weight: 500; color: var(--fg); }
.research-field__plot { position: relative; }
.research-field__svg { display: block; width: auto; max-width: 100%; height: auto; overflow: visible; }   /* drawn at its own size: whole-pixel squares */
.research-field__svg--strip { display: none; }
.rf-sq { fill: currentColor; }
.rf-sq--dots { opacity: .82; }
.rf-base { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; fill: none; }
.rf-label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; fill: var(--fg-2); }
.rf-count { font-family: var(--font-serif); font-size: 21px; fill: var(--fg); font-variant-numeric: tabular-nums lining-nums; }
.research-field__key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: var(--fg-2);
}
.research-field__key span { display: inline-flex; align-items: center; gap: 7px; }
.rf-key { display: inline-block; width: 9px; height: 9px; flex: none; }
.rf-key--solid { background: currentColor; color: var(--fg); }
.rf-key--dots {
  color: var(--fg);
  background-image: radial-gradient(currentColor 0 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath d='M0 0h1.8v1.8H0zM3.6 0h1.8v1.8H3.6zM7.2 0H9v1.8H7.2zM0 3.6h1.8v1.8H0zM3.6 3.6h1.8v1.8H3.6zM7.2 3.6H9v1.8H7.2zM0 7.2h1.8V9H0zM3.6 7.2h1.8V9H3.6zM7.2 7.2H9V9H7.2z'/%3E%3C/svg%3E") 0 0 / 9px 9px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath d='M0 0h1.8v1.8H0zM3.6 0h1.8v1.8H3.6zM7.2 0H9v1.8H7.2zM0 3.6h1.8v1.8H0zM3.6 3.6h1.8v1.8H3.6zM7.2 3.6H9v1.8H7.2zM0 7.2h1.8V9H0zM3.6 7.2h1.8V9H3.6zM7.2 7.2H9V9H7.2z'/%3E%3C/svg%3E") 0 0 / 9px 9px no-repeat;
}
/* the bars print in from the baseline, row by row and left to right, so the issues arrive one after another: a
   stepped wipe of the plot (an HTML box), opening from its bottom-left corner and ending 24 px outside it, so nothing
   stays clipped. Not on the SVG groups: in Chrome 157 an animated <g> inside an svg that a media rule can hide (the
   block/strip swap below) is never painted, and the chart read as empty (docs/shots/phase3/verifier). */
@media (prefers-reduced-motion: no-preference) {
  html.js .research-field__plot { animation: rf-print 1080ms steps(9, end) 360ms both; }
}
@keyframes rf-print { from { clip-path: inset(100% 100% -24px -24px); } to { clip-path: inset(-24px); } }
/* tablets: the chart under the intro, at its own size; phones: a compact strip of the same chart */
@media (max-width: 599.98px) {
  .research-field__svg--block { display: none; }
  .research-field__svg--strip { display: block; }
  .research-field__cap { margin-bottom: 8px; font-size: var(--fs-micro); }
  .rf-label { font-size: 10px; }
  .rf-count { font-size: 16px; }
  .research-field__key { margin-top: 8px; }
}

/* ---------- index rows ---------- */
.research-list { padding-block: clamp(48px, 6vw, 88px) clamp(72px, 9vw, 128px); }
.issue-index { list-style: none; margin: 0; padding: 0; }
.issue-row {
  border-top: var(--hair) solid var(--line-strong);
}
.issue-row:last-child { border-bottom: var(--hair) solid var(--line-strong); }
.issue-row__card,
.issue-row--next {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: clamp(28px, 3.6vw, 48px) 0;
}
@media (min-width: 1024px) {
  .issue-row__card,
  .issue-row--next {
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 5fr) minmax(0, 4.6fr);
    column-gap: clamp(28px, 3.4vw, 56px);
    align-items: start;
  }
}
.issue-row__no { display: flex; flex-direction: column; gap: 10px; }
.issue-row__label {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--fg);
}
.issue-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.issue-row__body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.issue-row__title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 3.6vw, 3.5rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.012em;
  text-wrap: balance;
  color: var(--fg);
}
.issue-row__title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 94%;
  background-repeat: no-repeat;
  transition: background-size var(--dur-2) var(--ease);
}
.issue-row__card:hover .issue-row__title a { background-size: 100% 1px; }
.issue-row__abstract { max-width: 46ch; font-size: 1rem; line-height: 1.55; color: var(--fg-2); }
.issue-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.issue-row__meta > * + *::before { content: "\00B7"; margin: 0 .7em; opacity: .6; }
.issue-row__go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg);
}
.issue-row__go .i { width: 14px; height: 14px; transition: transform var(--dur-2) var(--ease); }
.issue-row__card:hover .issue-row__go .i { transform: translateX(4px); }

/* the cover plate; on hover its dotted twin steps out behind it (the record follows) */
.issue-row__plate {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-1);
}
.issue-row__plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-1);
  background: var(--print-1);
  transition: transform var(--dur-3) var(--ease);
}
.issue-row__plate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--r-1);
  background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Crect width='2' height='2'/%3E%3C/svg%3E") 0 0 / 5px 5px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Crect width='2' height='2'/%3E%3C/svg%3E") 0 0 / 5px 5px repeat;
  opacity: 0;
  transform: translate(0, 0);
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}
/* the twin moves up and to the right (the site's one hover direction), the print lifts */
.issue-row__card:hover .issue-row__plate::before,
.issue-row__card:focus-within .issue-row__plate::before { opacity: .55; transform: translate(var(--twin-step-lg, 10px), calc(-1 * var(--twin-step-lg, 10px))); }
.issue-row__card:hover .issue-row__plate img { transform: translateY(-2px); }
@media (max-width: 1023.98px) {
  .issue-row__plate { order: -1; }
}

/* the issue that is not written yet: a dotted plate, the cadence line in serif italic */
.issue-row--next { border-top: var(--hair) dashed var(--line-strong); }
.issue-row__title--ghost { font-style: italic; color: var(--fg-2); }
.issue-row__cta { margin-top: 6px; }
.issue-row__plate--ghost {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 6px) 0 0 / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 6px) 0 100% / 100% 2px no-repeat,
    repeating-linear-gradient(180deg, var(--ink) 0 2px, transparent 2px 6px) 0 0 / 2px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--ink) 0 2px, transparent 2px 6px) 100% 0 / 2px 100% no-repeat;
  opacity: .5;
}
.ghost-no { display: inline-flex; align-items: baseline; gap: .3em; color: var(--ink); }
.ghost-no small { font-family: var(--font-mono); font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 500; letter-spacing: .06em; }
.ghost-no b { font-family: var(--font-dots); font-weight: 700; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
@media (max-width: 1023.98px) {
  .issue-row__plate--ghost { order: -1; aspect-ratio: 21 / 9; }
}
