/* ------------------------------------------------------------------
   Every Thing Computer
   Typeset in the booklet with FC Nib + ABC Areal. Those are licensed
   fonts, so until the webfont files are dropped into /fonts the stack
   falls back to close neutral equivalents.
   ------------------------------------------------------------------ */

:root{
  /* the exhibition's palette, expressed in ERA design-system tokens
     (css/era-ui.css); the paper is the booklet's, warmer than --era-canvas */
  --paper:#f7f6f3;
  --ink:var(--era-primary);
  --ink-soft:#5d5b57;
  --line:var(--era-primary);
  --rule:#d8d5cf;
  --accent:var(--era-brand-red);

  --sans:"ABC Areal",var(--font-figtree),"Figtree","Helvetica Neue",Helvetica,Arial,sans-serif;
  --mono:"ABC Areal Mono","ABC Areal Semi Mono","SFMono-Regular",ui-monospace,Menlo,monospace;
  --display:"FC Nib","IvyOra Display",Georgia,"Times New Roman",serif;

  --gut:clamp(16px,4vw,48px);
  --bar-top:clamp(26px,4.6vh,52px);   /* About and Close share this line */
}
/* On a narrow page the margin is the only white space the type has, so the
   paper is given a little more of it at the edges than the wide layout needs. */
@media (max-width:900px){
  :root{--gut:clamp(22px,6.5vw,44px);}
}

/* The booklet is printed on paper, so the site stays on paper too —
   no dark mode, whatever the viewer's system is set to. */
:root{color-scheme:light;}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
  font-size:16px;
  line-height:1.5;
}
img{display:block;max-width:100%;}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;}
a{color:inherit;}

/* ============================= LANDING ============================= */

.landing{
  position:relative;
  min-height:100svh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:var(--gut);
  gap:clamp(32px,6vh,64px);
}
/* The lockup keeps the place it holds on the exhibition's masthead. Both
   classes are carried, so this is pinned by specificity rather than by order:
   .bar-lockup sets position:relative further down the file and would
   otherwise win and stretch this to the full width of the page. */
.bar-lockup.landing-lockup{
  position:absolute;
  top:var(--bar-top);
  left:50%;
  transform:translateX(-50%);
}

/* the mark stands on the left, the dedication reads down the right */
.landing-inner{
  flex:1;
  display:grid;
  grid-template-columns:minmax(200px,0.9fr) minmax(0,1.1fr);
  gap:clamp(30px,6vw,96px);
  align-items:center;
  text-align:left;
  max-width:1180px;
  margin:0 auto;
  width:100%;
}
.wordmark{margin:0;}
.wordmark img{
  width:100%;
  max-width:min(460px,46vh);
  height:auto;
}
.landing-col{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:clamp(26px,4.5vh,48px);
}
.dedication{
  margin:0;
  font-size:clamp(14px,1.4vw,16.5px);
  line-height:1.65;
  color:var(--ink);
  max-width:46ch;
  display:flex;
  flex-direction:column;
  gap:1em;
  text-wrap:pretty;
}
/* No border and no radius: the way in is circled by hand instead, by the
   script in index.html, around whatever room the words take. */
.enter{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  padding:15px 30px;
  font-size:14px;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--ink);
  transition:gap .2s ease;
  outline:none;
}
.enter:hover,.enter:focus-visible{gap:21px;}
/* an svg left to its own devices takes its intrinsic 300x150, so the box is
   stated outright rather than left to the four insets */
.enter-ring{
  position:absolute;
  left:-14px;
  top:-11px;
  width:calc(100% + 28px);
  height:calc(100% + 22px);
  overflow:visible;
  pointer-events:none;
}
.enter-arrow{width:44px;height:11px;flex:none;overflow:visible;}
.enter path{
  fill:none;
  stroke:var(--ink);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.enter-arrow path{stroke-width:1.6;}

/* The dash that draws each stroke is set and walked back in index.html, not
   here: a CSS transition only runs if the browser has painted the value it
   starts from, and the ring is rebuilt the moment the webfonts change the
   width of the words it is drawn around.

   Pointing at the way in presses the pen harder: a heavier line, and a
   livelier boil — the displacement the strokes are redrawn through is swapped
   for one that throws them further. */
.enter:hover .ring,
.enter:focus-visible .ring{stroke-width:2.45;}
.enter:hover .ring-ink,
.enter:focus-visible .ring-ink{filter:url(#boil-ring-live);}
.enter:hover .arrow-ink,
.enter:focus-visible .arrow-ink{filter:url(#boil-arrow-live);}
.enter .ring,.enter .ring-ink,.enter .arrow-ink{transition:stroke-width .2s ease;}

/* Below this the page is not wide enough to set the mark against the words:
   each column would be too narrow to hold its own measure. So the landing
   reads as one column instead — mark, dedication and the way in stacked and
   all ranged on the same left margin, the button unchanged. The lockup keeps
   the centre of the masthead, as it does on the exhibition, so the column is
   started clear of it. */
@media (max-width:900px){
  .landing{padding-top:calc(var(--bar-top) + 42px);}
  .landing-inner{
    grid-template-columns:1fr;
    gap:clamp(24px,4vh,36px);
    align-items:start;
    align-content:center;
    justify-items:start;
    max-width:min(620px,100%);
    margin:0;
  }
  .wordmark{width:100%;}
  .wordmark img{max-width:min(340px,72vw,34vh);}
  .landing-col{gap:clamp(22px,3.6vh,34px);}
  .dedication{font-size:15px;line-height:1.6;}
  /* The circle is drawn by hand and so runs wide of what it circles — on a
     narrow page that overhang would be cut off by the edge of the paper, so
     the way in is set in far enough for the whole stroke to land. */
  .landing .enter{margin-left:24px;}
  /* and on the narrowest screens the words are kept on one line: broken over
     two, the circle has to swell into a hoop to go round them */
  @media (max-width:430px){
    .landing .enter{
      white-space:nowrap;
      margin-left:16px;
      padding:14px 20px;
      font-size:13px;
      letter-spacing:.07em;
      gap:11px;
    }
    .landing .enter:hover,.landing .enter:focus-visible{gap:16px;}
    .landing .enter-arrow{width:36px;}
  }
  /* the note at the foot ranges on the same margin as the column above it
     (stated through .landing, which later rules in this file would otherwise
     win on order alone) */
  .landing .landing-foot{align-items:flex-start;}
  .landing .foot-note{text-align:left;}
}

.landing-foot{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}
.lockup{width:min(220px,50vw);height:auto;}
.foot-note{
  margin:0;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.06em;
  color:var(--ink-soft);
  text-align:center;
}

/* ============================= EXHIBIT ============================= */

.exhibit{
  height:100svh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* Dragging the line is a drag, not a selection, so the page does not take
   the blue: nothing on the exhibition can be swept up by the cursor except
   a section's name and the line of description under it, which are the only
   words on it anyone would want to carry off. Nor can a photograph be picked
   up and dragged out of the page, which is the other thing a held mouse
   does by default. */
.exhibit{user-select:none;-webkit-user-select:none;}
.sec-label h2,.sec-label p,
/* and a work is there to be read, so its page can be swept up and carried
   off — the statement, the bio, the credit line, printed or reflowed */
.spread .sp-txt,
.spread.is-reflow .page-left{
  user-select:text;
  -webkit-user-select:text;
  cursor:text;
}
.exhibit img{-webkit-user-drag:none;user-drag:none;}

.bar{
  flex:none;
  display:grid;                       /* mark | lockup | about */
  grid-template-columns:1fr auto 1fr;
  align-items:start;
  gap:clamp(12px,3vw,32px);
  padding:var(--bar-top) var(--gut) 14px;
  z-index:5;
}
.bar-home{justify-self:start;transition:opacity .3s ease;}
.bar-home.is-hidden{opacity:0;pointer-events:none;}
/* The mark is a drawing, so it is fitted to the room it has rather than
   fixed to a height: on a narrow masthead the column is slimmer than the
   mark is wide, and a fixed height against the page's max-width would
   squeeze it out of shape. Given both as maxima, it keeps its proportions
   and takes whichever bound it meets first. */
.bar-home img{max-height:clamp(64px,10vh,112px);max-width:100%;height:auto;width:auto;}
.bar-lockup{
  justify-self:center;
  position:relative;
  display:inline-block;
  height:clamp(15px,2.2vh,24px);
  width:auto;
}
.bar-lockup img{height:100%;width:auto;}

/* Each half of the lockup goes where it belongs. The split is at 62%, the
   centre of the heart, measured off the artwork: the era mark and wordmark
   occupy 8.4–48.2% of it, the heart 56.6–67.3%, tiat 75.6–92.2%. Half the
   heart to each, so the whole lockup is live and nothing reads as dead. */
.bar-lockup a{
  position:absolute;
  top:-7px;
  bottom:-7px;
  display:block;
}
.lock-era { left:0;    right:38%; }
.lock-tiat{ left:62%;  right:0;   }

.bar-about{justify-self:end;}
/* the section tracker lives along the bottom edge */
.secbar{
  flex:none;
  padding:13px var(--gut);
  background:var(--paper);
  z-index:5;
}
.bar-sections{
  display:flex;
  justify-content:center;
  gap:clamp(10px,2vw,26px);
  overflow-x:auto;
  scrollbar-width:none;
}
.bar-sections::-webkit-scrollbar{display:none;}

.sec-link{
  flex:none;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--ink-soft);
  white-space:nowrap;
  padding:2px 0;
  text-decoration:none;
  transition:color .15s ease;
}
.sec-link:hover{color:var(--ink);}
.sec-link[aria-current="true"]{color:var(--ink);font-weight:700;}
/* reserve the bold width up front so the row doesn't shuffle
   as the active section changes under the scroll */
.sec-link::after{
  content:attr(data-label);
  display:block;
  height:0;
  overflow:hidden;
  visibility:hidden;
  font-weight:700;
}
.bar-about{
  flex:none;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--ink-soft);
}
.bar-about:hover{color:var(--ink);}

.hint{
  position:absolute;
  right:var(--gut);
  bottom:70px;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.07em;
  color:var(--ink-soft);
  pointer-events:none;
  z-index:4;
  transition:opacity .5s ease;
}
.hint.gone{opacity:0;}

/* ---- the ribbon ---- */
.ribbon{
  flex:1;
  position:relative;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  cursor:grab;
  outline:none;
  overscroll-behavior-x:contain;
}
.ribbon::-webkit-scrollbar{display:none;}
.ribbon.dragging{cursor:grabbing;}
.ribbon.dragging .thumb{pointer-events:none;}

.ribbon-track{
  position:relative;
  height:100%;
}
.ribbon-line{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:visible;
}
.ribbon-line path{
  fill:none;
  stroke:var(--line);
  stroke-width:1.6;
  vector-effect:non-scaling-stroke;
  stroke-linecap:round;
}
/* joins between the five booklet lines — solid, so the ribbon
   reads as one continuous drawn line end to end */
.ribbon-line path.conn{
  stroke-width:1.6;
  opacity:1;
}

.ribbon-labels{position:absolute;inset:0;pointer-events:none;}
.sec-label{
  position:absolute;
  text-align:left;
}
.sec-label h2{
  margin:0 0 .45em;
  color:var(--sec,var(--ink));
  font-family:var(--display);
  font-weight:400;
  font-size:2.25em;
  line-height:1.05;
  letter-spacing:-.01em;
}
.sec-label p{
  margin:0;
  font-size:1em;
  line-height:1.5;
  color:var(--ink-soft);
  text-wrap:pretty;
}

.ribbon-thumbs{position:absolute;inset:0;}
.thumb{
  position:absolute;
  padding:0;
  display:block;
  overflow:hidden;
  background:var(--rule);
  transition:transform .22s cubic-bezier(.2,.7,.3,1),box-shadow .22s ease;
  transform-origin:center;
  will-change:transform;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.thumb:hover,.thumb:focus-visible{
  transform:scale(1.09);
  box-shadow:0 10px 32px rgba(0,0,0,.22);
  z-index:3;
  outline:none;
}
.thumb-cap{
  position:absolute;
  left:50%;
  top:calc(100% + 7px);
  transform:translateX(-50%);
  white-space:nowrap;
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.04em;
  color:var(--ink);
  background:var(--paper);
  padding:2px 6px;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  z-index:4;
}
.thumb:hover .thumb-cap,.thumb:focus-visible .thumb-cap{opacity:1;}

/* page numbers, lifted from the booklet's own labels */
.thumb-num{
  position:absolute;
  transform:translate(-50%,-50%);
  font-family:var(--mono);
  line-height:1;
  color:var(--ink);
  pointer-events:none;
  z-index:3;
  text-shadow:0 0 3px var(--paper),0 0 2px var(--paper),0 0 6px var(--paper);
}

.progress{display:none;}
.progress-fill{
  height:100%;
  width:0;
  background:var(--ink);
  transition:width .08s linear;
}

/* ---- the work, full screen ---- */

/* author display rules outrank the UA sheet's [hidden], so overlays
   stayed on screen while marked hidden — this puts them away */
[hidden]{display:none !important;}

.spread,.sheet{
  position:fixed;
  inset:0;
  z-index:30;
  background:var(--paper);
  opacity:0;
  transition:opacity .42s ease;
}
.spread.is-open,.sheet.is-open{opacity:1;}
.spread{background:var(--paper);overflow:hidden;}
.sheet{overflow-y:auto;}
.sheet-inner{max-width:620px;margin:0 auto;padding:clamp(72px,12vh,140px) var(--gut) 140px;}

/* about: the mark stands on the left, everything else reads down one column */
#aboutScroll{max-width:1180px;}
.ab{
  display:grid;
  grid-template-columns:minmax(200px,0.8fr) minmax(0,1.1fr);
  gap:clamp(30px,6vw,96px);
  align-items:start;
}
.ab-mark{position:sticky;top:clamp(72px,12vh,140px);}
.ab-mark img{width:100%;max-width:460px;height:auto;}
.ab-col{min-width:0;}
.ab-col .w-title{margin-top:0;}
/* the about sheet's section heads are set in the booklet's display face */
.ab-col .w-h{
  font-family:var(--display);
  font-size:clamp(19px,2.2vw,26px);
  line-height:1.15;
  letter-spacing:0;
  text-transform:none;
  color:var(--ink);
  margin:38px 0 14px;
  padding-top:22px;
}
/* the questions read on in the body face; four of their words are drawn by
   hand, and those sit in the line as pictures */
.hand{
  display:inline-block;
  height:var(--hand,1.85em);
  vertical-align:-.46em;
  margin:0 .08em;
  overflow:visible;
}
.hand svg{height:100%;width:auto;overflow:visible;}
.hand img{height:100%;width:auto;}        /* if the artwork cannot be fetched */
/* the dashes are set per stroke by js/ribbon.js (arm) */

/* once written, each word keeps a little life of its own — pinned at the
   baseline and rocking, on its own clock so the four never fall into step */
@keyframes sway{
  0%  {transform:rotate(-1.5deg) translateY(.4px);}
  50% {transform:rotate(1.3deg)  translateY(-.9px);}
  100%{transform:rotate(-1.5deg) translateY(.4px);}
}
.hand.is-written svg{
  transform-origin:50% 88%;
  animation:sway var(--sway,3.6s) ease-in-out var(--swayin,0s) infinite;
}

.ab-more{margin:14px 0 0;}
.w-body .ab-more a{
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}
.w-body .ab-more a:hover{opacity:.7;color:var(--accent);}
/* and the prelude, for the same reason, on the same line: the mark comes
   down off the left and the sheet reads as one column */
@media (max-width:900px){
  #aboutScroll{max-width:640px;}
  .ab{grid-template-columns:1fr;gap:26px;}
  .ab-mark{position:static;}
  .ab-mark img{max-width:min(300px,68vw);}
  .ab-col .w-h{margin-top:32px;}
}

/* Over a work, only the era-tiat lockup stays: it keeps its place on the
   masthead, above the photograph. The exhibition's own mark steps away with
   everything else — the work is the page now, and the title above it would
   only be a second one. */
/* The masthead is lifted over the work so the lockup can keep its place on
   it, but a lifted masthead is a lifted sheet of glass: its box runs the
   full width of the paper, and over a work that box lies across the Close.
   So the bar is lifted for the eye only, and the one thing on it that is
   still live says so itself. */
.in-spread .bar{z-index:31;pointer-events:none;}
.in-spread .bar-lockup{pointer-events:auto;}
/* it keeps the centre of the masthead, which is now over the photograph:
   the same scrap of paper the Close is set on carries it, whatever the
   picture underneath happens to be */
.in-spread .bar-lockup::before{
  content:"";
  position:absolute;
  inset:-9px -14px;
  z-index:-1;
  background:rgba(247,246,243,.84);
  backdrop-filter:blur(7px);
}

.reading .ribbon,.reading .secbar,.reading .hint,
.reading .bar-about,.in-spread .bar-home{
  opacity:0;
  pointer-events:none;
  transition:opacity .42s ease;
}

/* The booklet's spread, one page to a column. Nothing is framed and nothing
   is centred on paper: each page is set to the width of its own column, so
   the margins print gave it are what stands between the type and the edge of
   the screen, and the two pages meet in the middle on the booklet's own
   gutter. The band between the lockup and the arrows is set in js/ribbon.js,
   which measures both. */
.work{
  position:absolute;
  left:0;right:0;
  top:0;bottom:0;                 /* js/ribbon.js sets the band */
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
}
.work::-webkit-scrollbar{display:none;}
.spread-pages{
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:stretch;
}
.page{position:relative;min-width:0;}
.page-in{position:relative;margin:0 auto;}
/* The photographs are never worth a scroll: their page is scaled to stand
   in the band whole, and it is pinned there, so a left column long enough
   to scroll cannot drag the work out of view with it. */
.page-right .page-in{position:sticky;top:0;}

.sp-img{
  position:absolute;
  object-fit:cover;               /* the frame crops the photograph, as it did in print */
  background:var(--rule);
}
.sp-txt{position:absolute;}
.sp-txt p{margin:0;text-wrap:pretty;overflow-wrap:anywhere;}
.sp-txt a{color:inherit;text-decoration:none;}
.sp-txt a:hover{opacity:.55;}
/* a work's own address, standing under its @handle in the margin: the one
   line of the foot block the booklet does not set, because a link is the
   one thing a printed page cannot carry */
.sp-txt .sp-link{margin-top:.5em;}
/* a frame is the depth print set it to, and no less; text longer than the
   one print set runs on rather than being shrunk out of step with the rest,
   and only where it would run into the foot of the page does the frame take
   the room that is left and carry the rest on a scroll of its own */
.sp-txt{height:auto;}
.sp-txt.is-scroll{
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--rule) transparent;
  -webkit-mask-image:linear-gradient(#000 calc(100% - 20px),transparent);
          mask-image:linear-gradient(#000 calc(100% - 20px),transparent);
}
.sp-txt.is-scroll::-webkit-scrollbar{width:4px;}
.sp-txt.is-scroll::-webkit-scrollbar-thumb{background:var(--rule);border-radius:2px;}
.sp-txt.is-scroll::-webkit-scrollbar-track{background:transparent;}

/* the foot: the arrows, and under them the section's rule — which the
   booklet runs full bleed along the foot of every spread in the section */
.work-foot{
  position:absolute;
  left:0;right:0;bottom:0;
  z-index:2;
  background:var(--paper);
}
.spread-bar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  /* air above the arrows, so the foot of the page is not read as part of
     the navigation; the band the pages are fitted to shrinks with it */
  padding:clamp(24px,4vh,40px) var(--gut) 16px;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.05em;
  color:var(--ink-soft);
}
.spread-bar button{color:var(--ink-soft);font-size:15px;line-height:1;padding:4px 10px;}
.spread-bar button:hover{color:var(--ink);}
.spread-bar button:disabled{opacity:.25;cursor:default;}
.spread-meta{
  display:flex;
  align-items:baseline;
  gap:14px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
/* the section's name, in the colour of the rule it stands over */
.sp-sec{color:var(--sec,var(--ink));}
.sp-count{color:var(--ink-soft);}
.sp-rule{height:13px;}

/* Close, on the masthead's line — shared with the about sheet */
.sheet-close{
  position:absolute;
  top:var(--bar-top);
  right:var(--gut);
  z-index:3;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--ink-soft);
}
.sheet-close:hover{color:var(--ink);}
/* over a photograph it needs its own ground to be read against */
.spread .sheet-close{
  padding:5px 9px;
  margin:-5px -9px 0 0;
  background:rgba(247,246,243,.84);
  backdrop-filter:blur(7px);
}

/* ---- one column: a screen too narrow to hold a page of A5 ----
   The two pages are read as one column, set in the order js/ribbon.js
   casts it (reflow): the work's name and whose it is, the photographs,
   the caption they carry, then the statement and the bio. The column is
   held to a measure a line of 15px type can be read across, and ranges
   on the same margin as everything else on the paper. */
.spread.is-reflow .spread-pages{
  display:block;
  max-width:620px;
  margin:0 auto;
  padding:clamp(14px,3vh,30px) var(--gut) clamp(28px,6vh,56px);
}
.spread.is-reflow .page-right{display:none;}

/* The column runs under the lockup and over the arrows, so its ends are
   feathered rather than cut: a line of type leaves the page by fading into
   the paper instead of being sliced through the middle of its letters.

   Each fade is only there when it has something to say. The one at the foot
   means there is more to read, and lifts on the last line so the bio does
   not end as a ghost; the one at the head appears only once something has
   gone up past it. js/ribbon.js (tails) does the watching. The depths are
   registered properties so the two can ease in and out rather than snap. */
@property --fade-head{syntax:'<length>';inherits:false;initial-value:0px;}
@property --fade-foot{syntax:'<length>';inherits:false;initial-value:0px;}

.spread.is-reflow .work{
  --fade-head:0px;
  --fade-foot:0px;
  transition:--fade-head .3s ease,--fade-foot .3s ease;
  -webkit-mask-image:linear-gradient(to bottom,
          transparent 0,#000 var(--fade-head),
          #000 calc(100% - var(--fade-foot)),transparent 100%);
          mask-image:linear-gradient(to bottom,
          transparent 0,#000 var(--fade-head),
          #000 calc(100% - var(--fade-foot)),transparent 100%);
}
.spread.is-reflow .work.has-head{--fade-head:34px;}
.spread.is-reflow .work.has-foot{--fade-foot:76px;}

/* The plate block, at print's own arrangement: every frame is placed as a
   fraction of the block, so the composition holds at whatever width the
   column happens to be. The aspect ratio is the block's, set inline, and
   it is what gives the block its height. */
.rf-plate{
  position:relative;
  width:100%;
  margin:clamp(20px,3.4vh,30px) 0 0;
}
.rf-fig{
  position:absolute;
  object-fit:cover;               /* the frame crops the photograph, as it did in print */
  background:var(--rule);
}
/* a work the catalogue holds no printed spread for, one picture to a line */
.rf-img{width:100%;height:auto;background:var(--rule);}
.rf-img + .rf-img{margin-top:6px;}
/* the caption stands under the photographs it belongs to */
.work-credit.rf-cap{margin-top:11px;}

.work-title{
  margin:0 0 .3em;
  font-family:var(--display);
  font-weight:400;
  font-size:clamp(28px,7vw,44px);
  line-height:1.015;
  letter-spacing:-.016em;
  text-wrap:balance;
}
.work-artist{margin:0 0 7px;font-size:17px;}
.work-credit{
  margin:0;
  font-family:var(--mono);
  font-size:11.5px;
  line-height:1.55;
  color:var(--ink-soft);
}
.work-handles{
  margin:12px 0 0;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  font-family:var(--mono);
  font-size:11.5px;
}
.work-link{margin-top:4px;}
.work-handles a{color:var(--ink-soft);text-decoration:none;}
.work-handles a:hover{color:var(--ink);}
.work-body{
  margin-top:clamp(20px,3vh,30px);
  padding-top:clamp(18px,2.6vh,26px);
  border-top:1px solid var(--rule);
}
.work-body p{margin:0 0 1.1em;font-size:15px;line-height:1.62;text-wrap:pretty;}
.work-body p:last-child{margin-bottom:0;}
.work-body a{color:inherit;}

.w-sec{
  font-family:var(--mono);
  font-size:10.5px;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--ink-soft);
  margin:0 0 18px;
}
.w-title{
  font-family:var(--display);
  font-weight:400;
  font-size:clamp(28px,3.4vw,42px);
  line-height:1.08;
  letter-spacing:-.015em;
  margin:0 0 10px;
  text-wrap:balance;
}
.w-figs{display:flex;flex-direction:column;gap:12px;margin:0 0 28px;}
.w-figs img{width:100%;height:auto;background:var(--rule);}
.w-figs.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.w-body p{
  margin:0 0 1.15em;
  font-size:15.5px;
  line-height:1.62;
  text-wrap:pretty;
}
.w-h{
  font-family:var(--mono);
  font-size:10.5px;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--ink-soft);
  margin:30px 0 12px;
  padding-top:18px;
  border-top:1px solid var(--rule);
}
.w-body a{color:inherit;}

.w-sub{
  border-top:1px solid var(--rule);
  padding-top:16px;
  margin-top:16px;
}
.w-sub h4{
  margin:0 0 6px;
  font-size:15px;
  font-weight:600;
}
.w-sub p{margin:0;font-size:14.5px;line-height:1.55;color:var(--ink-soft);}

.w-nav{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-top:36px;
  padding-top:18px;
  border-top:1px solid var(--rule);
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.w-nav button{color:var(--ink-soft);text-align:left;}
.w-nav button:hover{color:var(--ink);}
.w-nav button:disabled{opacity:.3;cursor:default;}
.w-nav button:last-child{text-align:right;}

/* ---- a phone: the ribbon stands on its end ----
   The line is turned a quarter turn in js/ribbon.js (buildVertical) and the
   page scrolls down it. The works, their numbers and the headings are placed
   by the same turn but left upright, so the only thing read sideways is the
   drawing. */
@media (max-width:760px){
  .exhibit{height:auto;overflow:visible;}
  .bar{position:sticky;top:0;z-index:6;background:var(--paper);}
  /* the masthead is a sheet of paper the line passes under, and it lets the
     line go rather than cutting it off. It belongs to the line alone: over
     an opened work the masthead is lifted and carries only the lockup, and
     a fade under it would lie across the reading. */
  .reading .bar::after{display:none;}
  .bar::after{
    content:"";
    position:absolute;
    left:0;right:0;top:100%;
    height:26px;
    background:linear-gradient(var(--paper),rgba(247,246,243,0));
    pointer-events:none;
  }
  /* the row of sections goes: the headings name them as they come, and a
     phone has the foot of its own screen to give back */
  .secbar{display:none;}
  .hint{display:none;}
  .ribbon{overflow:visible;cursor:default;}
  .ribbon-track{height:auto;}
  .ribbon-line{inset:auto;left:0;top:0;width:auto;height:auto;}

  /* a work is small on a phone however it is turned, so the tap is given
     the room the picture does not need */
  .thumb{overflow:visible;}
  .thumb::after{content:"";position:absolute;inset:-7px;}
  .thumb:hover{transform:none;box-shadow:none;}
  .thumb:active{transform:scale(.96);}
  .thumb-cap{display:none;}

  /* a heading is read before the works it names, so it stands over them,
     on the same scrap of paper the lockup carries over a photograph */
  .ribbon-labels{z-index:4;}
  .sec-label{
    /* the section's name is sent for from the foot of the paper, so it
       stops clear of the masthead rather than under it */
    scroll-margin-top:150px;
    padding:8px 11px 10px;
    background:rgba(247,246,243,.92);
    backdrop-filter:blur(7px);
  }
  /* set to a narrow measure, so a heading can stand in a nook the drawing
     actually leaves clear rather than across the whole sheet */
  .sec-label h2{font-size:1.85em;line-height:1.08;}
  .sec-label p{font-size:1em;line-height:1.42;}

  .progress{display:none;}
  .panel{width:100vw;border-left:0;}
  .w-figs.grid{grid-template-columns:repeat(2,1fr);}
}

/* Below this the screen cannot hold a page of A5 at a readable size, so the
   spread is reflowed instead: the photographs across the top, the label
   reading on underneath, the whole thing scrolling as one. The renderer
   switches with it (js/ribbon.js, isNarrow). */
@media (max-width:900px){
  /* the lockup keeps its line on the paper; the work starts under it */
  .in-spread .bar{background:none;}
  .spread .sheet-close{position:fixed;}
}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms !important;transition-duration:.01ms !important;}
}

/* ============================ ARRIVAL =============================
   The landing lifts in, hands over to the exhibition on a fade, and the
   exhibition then draws its own line — each work and heading popping in
   as the drawing reaches it. Timings are held in js/ribbon.js (intro). */

@keyframes rise   {from{opacity:0;transform:translateY(16px)}              to{opacity:1;transform:none}}
@keyframes rise-c {from{opacity:0;transform:translate(-50%,16px)}          to{opacity:1;transform:translateX(-50%)}}
@keyframes fade-in{from{opacity:0}                                         to{opacity:1}}

.landing .wordmark,
.landing .dedication,
.landing .enter > span,
.landing .enter > .enter-arrow,
.landing .landing-foot{animation:rise .95s cubic-bezier(.2,.7,.3,1) both;}
.landing .landing-lockup{animation:rise-c .95s cubic-bezier(.2,.7,.3,1) both;}

.landing .landing-lockup{animation-delay:.06s;}
.landing .wordmark      {animation-delay:.20s;}
.landing .dedication    {animation-delay:.50s;}
.landing .enter > span,
.landing .enter > .enter-arrow{animation-delay:.76s;}
.landing .landing-foot  {animation-delay:.92s;}

/* on the way out, so the exhibition's own fade reads as one move */
.landing.leaving{opacity:0;transition:opacity .36s ease;}

/* works from the collection, dropped along the cursor's path and let go */
.trail{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;}
/* The trail sits at 0, the page's content at 1. The lockup goes above both:
   .landing-inner fills the page and comes later in the document, so at an
   equal z-index it would paint over the lockup and swallow its links. */
.bar-lockup.landing-lockup{z-index:2;}
.landing-inner,.landing-foot{position:relative;z-index:1;}
.trail-img{
  position:absolute;
  width:var(--w,92px);
  height:auto;
  margin:0;
  will-change:transform,opacity;
  animation:trail-go 1.3s linear both;     /* linear: the keyframes keep the clock */
}
/* in fast, a full second on the paper, then gone in two tenths */
@keyframes trail-go{
  0%  {opacity:0;   transform:translate(-50%,-50%) rotate(var(--r)) scale(.72);
       animation-timing-function:cubic-bezier(.2,.9,.3,1);}
  8%  {opacity:.95; transform:translate(-50%,-50%) rotate(var(--r)) scale(1);}
  85% {opacity:.95; transform:translate(-50%,-51%) rotate(var(--r)) scale(1.01);
       animation-timing-function:cubic-bezier(.5,0,.85,.4);}
  100%{opacity:0;   transform:translate(-50%,-51.6%) rotate(var(--r)) scale(.99);}
}
/* A tap is a deliberate thing, not a cursor going past, so the work it puts
   down stays on the paper a little longer before it lets go. */
.trail-img.is-tap{animation-duration:2.1s;}
.exhibit{animation:fade-in .5s ease both;}

/* while the line is drawing. the dash geometry is set inline, per path */
.intro .thumb,
.intro .sec-label,
.intro .thumb-num{opacity:0;}
.intro .thumb   {transform:scale(.84);}
.intro .sec-label{transform:translateY(12px);}
.intro .thumb-num{transform:translate(-50%,-50%) scale(.7);}

.intro .thumb,
.intro .thumb-num{transition:opacity .4s ease,transform .6s cubic-bezier(.22,1.4,.4,1);}
.intro .sec-label{transition:opacity .6s ease,transform .6s cubic-bezier(.2,.8,.3,1);}

.intro .thumb.is-in    {opacity:1;transform:none;}
.intro .sec-label.is-in{opacity:1;transform:none;}
.intro .thumb-num.is-in{opacity:1;transform:translate(-50%,-50%);}
