/* covers.css: /portfolio's covers, two across, and the archive in the sea.
   One subject a frame, on its own colour; a receipt only where there is one. */
.works.works--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.works--pair .work__media { aspect-ratio: 16 / 10; background: var(--cover, #111); border-color: transparent; }
.works--pair .work--wide .work__media { aspect-ratio: 2.2; }
.hands { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3%; }
.work__media .hands img { width: 23%; height: auto; object-fit: contain; transform: none; }
.work__media .hands img:first-child { transform: rotate(-8deg) translateY(5%); }
.work__media .hands img:last-child { transform: rotate(7deg) translateY(3%); }
.plate { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 7px 11px 8px; border-radius: 8px; background: var(--bg); color: var(--ink); font: 400 clamp(15px, 1.25vw, 19px)/1 var(--font-display); }
@media (max-width: 700px) {
  .works.works--pair { grid-template-columns: minmax(0, 1fr); row-gap: 34px; }
  .works--pair .work--wide { grid-column: auto; }
  .works--pair .work--wide .work__media { aspect-ratio: 16 / 10; }
}

/* What went overboard: two archived cases afloat on the sea the canvas draws.
   Each is a container with its name on the side and an arrow at its end, so it
   reads as a door. The sea line is fixed and the box bobs through it: the
   part under water is cut away, not greyed. */
.bye { --pad: 0px; position: relative; overflow-x: clip; padding-top: var(--pad); }
.bye canvas { height: 100%; }
.overboard { position: absolute; inset: 0; pointer-events: none; }
.overboard__line { position: absolute; left: var(--inset); top: calc(var(--pad) + 12%); max-width: 16ch; color: var(--ink); font: 400 clamp(16px, 1.6vw, 24px)/1.15 var(--font-display); }
.lost {
  --w: clamp(168px, 20vw, 292px); --h: calc(var(--w) / 2.45); --cell: 8px;
  --word: #111; --tile: #111; --arrow: var(--bg);
  position: absolute; left: calc(27% + var(--i) * 46%); bottom: calc((100% - var(--pad)) * 0.42 - var(--cell));
  width: var(--w); translate: -50% 0; pointer-events: auto; color: var(--word);
}
.lost + .lost { --word: var(--bg); --tile: var(--accent); --arrow: #111; }
/* Above the sea line only; the top and sides stay open so the box can lift and tilt. */
.lost__sea { display: block; height: calc(var(--h) * 0.8 + var(--cell)); clip-path: inset(-120% -30% 0 -30%); }
.lost__box {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6%;
  height: var(--h); padding: 0 9% 0 10%; border-radius: 3px; rotate: -4deg;
  background:
    linear-gradient(rgba(17, 17, 17, 0.24), rgba(17, 17, 17, 0.24)) top / 100% 9% no-repeat,
    linear-gradient(rgba(17, 17, 17, 0.24), rgba(17, 17, 17, 0.24)) bottom / 100% 11% no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.14) 0 2px, transparent 2px 9px, rgba(255, 255, 255, 0.12) 9px 11px, transparent 11px 18px),
    var(--ink-b);
  box-shadow: 0 10px 18px -12px rgba(17, 17, 17, 0.6);
  animation: bob calc(2.6s + var(--i) * 0.7s) ease-in-out calc(var(--i) * -1.1s) infinite;
  transition: translate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lost + .lost .lost__box { rotate: 3deg; }
/* The corner posts, dark, as on every box on the site. */
.lost__box::before, .lost__box::after { content: ""; position: absolute; top: 0; bottom: 0; width: 5.5%; background: #2a2a28; }
.lost__box::before { left: 0; border-radius: 3px 0 0 3px; }
.lost__box::after { right: 0; border-radius: 0 3px 3px 0; }
.lost__word { min-width: 0; padding-bottom: 8%; font: 800 clamp(13px, 1.45vw, 21px)/0.95 'Inter Tight', 'Helvetica Neue', Arial, sans-serif; text-transform: uppercase; letter-spacing: -0.01em; text-wrap: balance; }
.lost__go { flex: none; display: grid; place-items: center; width: calc(var(--h) * 0.46); aspect-ratio: 1; margin-bottom: 8%; border-radius: 6px; background: var(--tile); color: var(--arrow); }
.lost__go svg { width: 58%; height: 58%; transition: translate 0.2s ease; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(calc(var(--h) * 0.1)) rotate(2.5deg); }
}
.lost__tag { position: absolute; left: 50%; bottom: calc(var(--h) * 0.8 + var(--cell) + 14px); width: max-content; max-width: 220px; padding: 9px 12px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 400 15px/1.35 var(--font-sans); opacity: 0; translate: -50% 6px; transition: opacity 0.2s ease, translate 0.2s ease; pointer-events: none; z-index: 1; }
.lost__tag b { display: block; font: 400 17px/1.15 var(--font-display); }
.lost:focus-visible { outline: none; }
.lost:focus-visible .lost__box { outline: 2px solid var(--green); outline-offset: 5px; }
.lost:is(:focus-visible, :active, .is-held) .lost__box { translate: 0 -24%; }
.lost:is(:focus-visible, :active, .is-held) .lost__tag { opacity: 1; translate: -50% 0; }
@media (hover: hover) {
  .lost:hover .lost__box { translate: 0 -24%; }
  .lost:hover .lost__go svg { translate: 3px 0; }
  .lost:hover .lost__tag { opacity: 1; translate: -50% 0; }
}
@media (max-width: 700px) {
  /* The line takes its own row above the words, so nothing lies on the water but the boxes. */
  .bye { --pad: 40px; height: 300px; }
  .overboard__line { top: 12px; max-width: none; font-size: 16px; }
  .lost { --w: clamp(136px, 37vw, 176px); --cell: 6px; left: calc(25% + var(--i) * 50%); }
  .lost__word { font-size: clamp(11px, 3.1vw, 14px); hyphens: manual; }
  /* A tag opens inwards, so it stays on the screen. */
  .lost__tag { left: 0; max-width: 44vw; translate: 0 6px; }
  .lost + .lost .lost__tag { left: auto; right: 0; }
  .lost:is(:focus-visible, :active, .is-held) .lost__tag { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) { .lost__box { animation: none; } .lost__box, .lost__tag, .lost__go svg { transition: none; } }
