/* FEATURED WORK: the section, its title, the cards and what is written under them, the two that are still to come, and the ball that lands on the title. */

/* ---------- the ending, and the work. The blue lets go of the screen and is wound into a ball, and the ball drops onto this title.
   The section has no background of its own: the paper behind it is the same fixed screen, so the title simply rises into the picture ---------- */
.work {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  pointer-events: none;
  --col: min(1000px, 72vw);
} /* one column in the middle of the page, with clear paper either side of it: never wider than about three quarters of the screen */
@media (max-width: 760px) {
  .work {
    --col: calc(100vw - 32px);
    --tk: 0.0806;
  }
} /* on a phone the title keeps its fuller size, or it would be smaller than the card names */
/* the title starts at the column's left edge, and its size is tied to the column's width so that the middle of the screen, where the ball comes down, is over the "o" of "work" */
.wt {
  width: var(--col);
  margin: 0 auto;
  text-align: left;
  white-space: nowrap;
  color: var(--ink);
  font:
    800 calc(var(--col) * var(--tk, 0.062)) / 1 Archivo,
    'Arial Narrow',
    Arial,
    sans-serif;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  will-change: transform;
}
.wt i {
  display: inline-block;
  width: 0;
  height: 0;
} /* marks the line the letters stand on */
/* THE WORK. The most valuable part of the page, so it is given the most room: a wider column than anything before it, one tall cover to a piece of work,
   and its name always UNDER the cover, in a lighter voice than the section's title. The main piece is the full width; the two after it share a row.
   Each cover lives in its own product's colour, never a flat fill: a slow-flowing gradient with depth, film grain over it, and a faint pattern taken from that brand.
   On it, a few pieces of the real product, rebuilt here so that they move by themselves while the cover is on screen. No thread in here but the frame round each cover */
.cards {
  width: var(--col);
  margin: clamp(64px, 11vh, 120px) auto 0;
  padding-bottom: 20vh;
  display: flex;
  flex-direction: column;
  gap: clamp(96px, 16vh, 150px);
  pointer-events: auto;
}
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
}
.card {
  display: block;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 30px;
}
.card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 14px;
}
.pic {
  position: relative;
}
.shot {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
}
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  mix-blend-mode: overlay;
  pointer-events: none;
} /* film grain: what stops a gradient looking like plastic */
.frame {
  position: absolute;
  left: -10px;
  top: -10px;
  overflow: visible;
  pointer-events: none;
}
.frame path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.45, 0, 0.15, 1);
}
.card:hover .frame path,
.card:focus-visible .frame path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.45, 0, 0.15, 1);
} /* no thread round a card until the pointer is on it: then it draws itself round, in blue, and slips away again on leaving */
.frame.st .stm {
  stroke: #fff;
  stroke-width: 9;
  stroke-linecap: butt;
}
.frame.st .stv {
  stroke-dasharray: 9 8;
  stroke-dashoffset: 0;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.01s linear 0.7s;
}
.card:hover .frame.st .stv,
.card:focus-visible .frame.st .stv {
  opacity: 1;
  transition-delay: 0s;
} /* round a piece of work that is not written up yet the thread is a row of stitches. A white line drawn round under a mask,
     in the same time as the solid thread, uncovers them; once it has slipped away again the stitches are hidden */
/* UNDER A COVER. Three voices, each with one job, and three sizes that are clearly apart:
   the name in the page's own headline voice (Archivo, heavy and wide, the same tracking as "Featured work");
   what the work is, one line in the mono the rest of the page speaks in;
   the facts, as a small label in capitals, the same style as the chips.
   The main piece has the facts to the right, on the lines of the name and the sentence. The half-width pieces stack them.
   The left block starts at the cover's left edge and the facts end at its right edge, so nothing floats */
.cap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 40px;
  row-gap: 0;
  align-items: baseline;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.7s ease 0.3s,
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s;
}
.card.in .cap {
  opacity: 1;
  transform: none;
}
.card h3 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.34em;
  font:
    800 34px/1 Archivo,
    'Arial Narrow',
    Arial,
    sans-serif;
  font-stretch: 112%;
  letter-spacing: -0.035em;
}
.what {
  grid-column: 1;
  grid-row: 2;
  margin: 12px 0 0;
  font:
    400 14px/1.5 'Geist Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.meta {
  grid-column: 2;
  margin: 0;
  text-align: right;
  white-space: nowrap;
  font:
    500 11.5px/1.5 'Geist Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6a6b70;
}
.meta.m1 {
  grid-row: 1;
}
.meta.m2 {
  grid-row: 2;
  margin-top: 12px;
}
.go {
  flex: none;
  width: 0.56em;
  height: 0.56em;
  overflow: visible;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.go path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s ease;
} /* the arrow belongs to the name: this one opens */
.card:hover .go {
  transform: translate(3px, -3px);
}
.card:hover .go path {
  stroke: var(--blue);
}
/* the two that share a row, and that are not written up yet: they lead nowhere, so no pointer */
.soon {
  cursor: default;
}
.pair .cap {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 22px;
}
.pair h3 {
  font-size: 28px;
}
.pair .what {
  margin-top: 11px;
}
.pair .meta {
  grid-column: 1;
  grid-row: 3;
  margin-top: 9px;
  text-align: left;
  white-space: normal;
}
.soon .shot {
  height: clamp(280px, min(calc(var(--col) * 0.46), calc(100vh - 230px)), 560px);
}
/* a cover still to come ("blank"): a plain textured field with two slow lights, and a few soft panes waiting for the product's screens */
.blank::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: radial-gradient(closest-side at 62% 38%, var(--hi), transparent 70%),
    radial-gradient(closest-side at 28% 74%, var(--lo), transparent 72%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  to {
    transform: translate(6%, -5%) rotate(8deg) scale(1.08);
  }
}
.s2 .blank {
  background: #ddd9ce;
  --hi: #f3f0e8;
  --lo: #c5c0b2;
}
.sk {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9%;
  padding: 0 7%;
  border-radius: 18px;
  background: var(--pn);
  box-shadow:
    0 34px 70px -30px var(--sh),
    0 0 0 1px var(--ed);
  animation: bob var(--d, 8s) ease-in-out var(--dl, 0s) infinite alternate;
}
.sk i {
  display: block;
  height: 11px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ln) 0 40%, var(--lh) 50%, var(--ln) 60% 100%) 0 0/300% 100%;
  animation: shim 3.2s linear infinite;
}
.sk i:nth-child(1) {
  width: 46%;
}
.sk i:nth-child(2) {
  width: 86%;
}
.sk i:nth-child(3) {
  width: 64%;
}
@keyframes bob {
  to {
    transform: translate3d(0, -7px, 0);
  }
} /* the panes float a little, each at its own pace (it was asked for from the start, but never written) */
@keyframes shim {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -60% 0;
  }
}
.sk.a {
  left: 11%;
  top: 25%;
  width: 48%;
  height: 33%;
}
.sk.b {
  left: 43%;
  top: 47%;
  width: 45%;
  height: 34%;
  --d: 9.5s;
  --dl: -3s;
}
.sk.c {
  left: 34%;
  top: 13%;
  width: 38%;
  height: 9.5%;
  border-radius: 99px;
  --d: 6.5s;
  --dl: -2s;
}
.sk.c i:nth-child(n + 2) {
  display: none;
}
.sk.c i {
  width: 60%;
}
.s2 {
  --pn: #f5f2ea;
  --ln: #ddd8ca;
  --lh: #ece8dd;
  --sh: rgba(60, 50, 20, 0.45);
  --ed: rgba(60, 50, 20, 0.06);
}
.chip {
  position: absolute;
  z-index: 3;
  left: 26px;
  top: 24px;
  padding: 7px 11px 6px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1.3px currentColor;
  font:
    500 11.5px/1 'Geist Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.s2 .chip {
  color: var(--ink);
}
/* how long it takes to read: a small pane of frosted glass that follows the pointer over a cover */
.tip {
  position: fixed;
  z-index: 8;
  left: 0;
  top: 0;
  padding: 11px 15px 10px;
  border-radius: 99px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  scale: 0.82;
  transform: translate3d(-200px, -200px, 0);
  font:
    500 13px/1 'Geist Mono',
    ui-monospace,
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: rgba(246, 244, 239, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 12px 28px -12px rgba(6, 12, 80, 0.55);
  transition:
    opacity 0.22s ease,
    scale 0.38s cubic-bezier(0.2, 0.9, 0.25, 1.25);
}
.tip.on {
  opacity: 1;
  scale: 1;
}
@media (max-width: 760px) {
  .cards {
    gap: 76px;
  }
  .pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
  }
  .shot {
    border-radius: 22px;
  }
} /* on a phone it is one column: name, description, then the facts */
@media (max-width: 760px) {
  .soon .shot {
    height: auto;
    aspect-ratio: 1/1;
  }
  .cap {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 20px;
  }
  .card h3 {
    font-size: 28px;
  }
  .pair h3 {
    font-size: 25px;
  }
  .meta {
    grid-column: 1;
    text-align: left;
    white-space: normal;
  }
  .meta.m1 {
    grid-row: 3;
    margin-top: 12px;
  }
  .meta.m2 {
    grid-row: 4;
    margin-top: 3px;
  }
  .tip {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .frame path,
  .cap,
  .go,
  .tip {
    transition: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .blank::before,
  .sk,
  .sk i {
    animation: none;
  }
}
#orbLay {
  position: fixed;
  z-index: 6;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
} /* the ball of blue thread, once it is wound, and the spot where it can be taken hold of */
#orbLay.page {
  position: absolute;
} /* once it is down, it lives on the page itself (this layer is then as tall as the page): it scrolls with the words, never a frame behind them */
#orb {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  visibility: hidden;
  will-change: transform;
}
#rope {
  position: fixed;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  visibility: hidden;
} /* the falling ball's loose end and the threads it falls past, on a sheet the size of the screen while the page rushes by */
#orbHit {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  border-radius: 50%;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#orbHit.held {
  cursor: grabbing;
} /* where the ball can be taken hold of */
