/* ---------- The opening ----------
   After the film, the person, and then the work. Two kinds of type only: the sentence in
   the page's serif at one size, and the rest in the page's small upright type. The sentence
   and the supporting paragraph share one row, top to top; the deck follows directly, with
   nothing between them. One vertical interval (--step) separates everything. */
.opening{
  --col:min(25rem,40%);                          /* the supporting column */
  --gutter:clamp(32px,6.4cqw,88px);
  --step:clamp(24px,2.6cqw,32px);
  container-type:inline-size;
  display:grid;
  grid-template-columns:minmax(0,1fr) var(--col);
  column-gap:var(--gutter);
  align-items:start;
  padding:clamp(44px,4.6vw,60px) 0 0;            /* close under the film, like its caption */
  scroll-margin-top:0;
  color:var(--ink);
}
/* His name has the first line to itself; the second sentence takes two. The size follows
   the column, so those three lines hold at every width down to a tablet. */
.opening-say{
  margin:0 0 0 -.02em;
  font-family:var(--font-serif);
  font-size:clamp(2rem,calc((100cqw - min(25rem,40cqw) - var(--gutter)) / 14.3),4rem);
  line-height:1.06;
  letter-spacing:-.02em;
}
.say-line{display:block;text-wrap:balance}
.say-name{white-space:nowrap}

.opening-side{margin-top:.55em}                  /* its first line level with the sentence's */
.side-copy{
  margin:0;
  font-size:clamp(15.5px,.9rem + .18vw,17px);
  line-height:1.58;
  letter-spacing:var(--type-body-track,0);
  color:var(--muted-strong);
  text-wrap:pretty;
}
.side-credit{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:6px 20px;
  margin:18px 0 0;
}
.credit-role{font-size:13px;line-height:1.4;color:var(--muted-strong)}
.credit-link{
  display:inline-flex;
  align-items:baseline;
  gap:.35em;
  padding-bottom:3px;
  font-size:14px;
  font-weight:500;
  letter-spacing:-.01em;
  color:var(--ink);
  text-decoration:none;
  background-image:linear-gradient(currentColor,currentColor),linear-gradient(rgba(41,42,40,.7),rgba(41,42,40,.7));
  background-repeat:no-repeat;
  background-position:100% 100%,0 100%;
  background-size:0 1px,100% 1px;
  transition:background-size var(--dur-move) var(--ease);
}
.credit-arrow{display:inline-block;font-weight:700;transition:transform var(--dur-move) var(--ease)}
/* The place, named in the paragraph, is a way there: in ink, underlined, in the paragraph's own type. */
.side-hn{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:.2em;
  text-decoration-color:rgba(41,42,40,.55);
  transition:text-decoration-color var(--dur-quick) ease;
}
.side-hn:hover,
.side-hn:focus-visible{text-decoration-color:var(--ink)}
.side-hn:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.side-hn .credit-note{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
/* After the work: one quiet line on where more of it lives. Sits under the deck's controls. */
.deck-more{max-width:420px;margin:22px auto 0;font-size:14px}
@media(max-width:900px){.deck-more{max-width:400px}}
@media(max-width:600px){.deck-more{max-width:min(330px,78vw);margin-top:18px}}
.deck-more .credit-link{font-weight:500}
.credit-link:hover,
.credit-link:focus-visible{background-position:0 100%,0 100%;background-size:100% 1px,100% 1px}
.credit-link:hover .credit-arrow,
.credit-link:focus-visible .credit-arrow{transform:translate(2px,-2px)}
.credit-link:focus-visible{outline:2px solid var(--ink);outline-offset:5px}
.credit-link .credit-note,
.opening-hidden{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* The work follows across the page. */
.opening > .deck-section{grid-column:1 / -1;padding-top:var(--step)}

/* ---------- Wide screens: one row ----------
   With room for it, nothing is stacked and nothing floats. The introduction is a column
   at the left, as tall as the deck: the sentence starts level with the top card and the
   credit ends level with its foot. The deck stands at the right. The space between them
   is the table: it is where seen cards are put down.
   (980px = the deck and its fan, 508, plus the pile's place and air either side of it, 472.) */
@media(min-width:1400px){
  .opening{
    --textcol:calc(100cqw - 980px);
    grid-template-columns:calc(100% - 980px) minmax(0,1fr);
    grid-template-rows:auto 1fr;
    column-gap:0;
    padding-top:clamp(20px,2vw,28px);
  }
  .opening-say,
  .opening-side{position:relative;z-index:2;grid-column:1}
  .opening-say{
    grid-row:1;
    margin-top:39px;                              /* its first line level with the top card */
    font-size:clamp(2.5rem,calc(var(--textcol) / 7.3),3.3rem);
    line-height:1.07;
  }
  .say-name{display:block}                        /* his name has a line to itself */
  .opening-side{grid-row:2;align-self:end;margin:28px 0 126px}   /* its last line level with the card's foot (under it: the controls and the line under them) */
  .opening > .deck-section{grid-column:1 / -1;grid-row:1 / 3;padding-top:0}
  .opening .deck-wrap{max-width:none;margin:0;justify-content:flex-end;padding-right:88px}
  .opening .deck-controls{margin-left:auto;margin-right:88px}
  .opening .deck-more{max-width:420px;margin-left:auto;margin-right:88px;padding:0}
  /* The place on the table where seen cards are put down, drawn as a hairline until the
     first one lands on it (same place and tilt as deck.js gives the pile). */
  .js-motion .opening .deck::before{
    content:"";
    position:absolute;
    inset:0;
    border:1px solid rgba(41,42,40,.17);
    border-radius:18px;
    transform-origin:center 60%;
    transform:translate(calc(-93% - 36px),24px) rotate(-5.5deg) scale(.86);
    pointer-events:none;
    transition:opacity var(--dur-move) ease;
  }
  .js-motion .opening .deck:has(.project-card.in-pile)::before{opacity:0}
}
/* ---------- One column ---------- */
@media(max-width:700px){
  .opening{display:block;padding-top:44px}
  .opening-say{font-size:clamp(2rem,9.4cqw,2.6rem);line-height:1.1}
  .say-line + .say-line{margin-top:.14em}
  .opening-side{margin-top:26px}
  .side-copy{font-size:16.5px;line-height:1.55}
  .credit-link{font-size:15px}
  .opening > .deck-section{padding-top:0}
}
@media(max-width:600px){
  .opening{padding-top:6px}                       /* a phone's settled film already leaves a margin under itself */
}
@media(prefers-reduced-motion:reduce){
  .credit-arrow{transition:none}
}
