:root {
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #5f5f58;
  --accent: #e8c547;
  --wall: #0a0a0c;
  --wall-text: #ffffff;
  --clay: #c4472d;
  --display: "Syne", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--wall);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Paper pieces: every button is a white scrap with slightly uneven cut edges */

.paper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: lowercase;
  text-decoration: none;
  clip-path: polygon(0 4%, 100% 0, 99% 100%, 1.5% 96%);
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.12s;
}

.paper:hover {
  background: var(--accent);
}

.paper:active {
  transform: translateY(1px) scale(0.97);
}

.paper:focus-visible,
.filter:focus-visible {
  outline-color: var(--text);
  outline-offset: -3px;
}

/* Top bar: name on the left, About on the right, straight on the wall */

.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 0;
  pointer-events: none;
}

.chrome > * {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--wall-text);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.2vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  text-decoration: none;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.55);
}

.brand-mark {
  width: 0.62em;
  height: 0.62em;
  fill: var(--accent);
  transition: transform 0.9s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(180deg);
}

/* Dock: filters and Shuffle. Bottom of the screen on phones (thumb reach),
   top center on larger screens. */

.dock {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: stretch;
  gap: 8px;
  transform: translateX(-50%);
}

.filters {
  position: relative;
  display: flex;
  padding: 4px;
  background: var(--surface);
  clip-path: polygon(0 0, 100% 5%, 98.8% 100%, 0.8% 95%);
}

.filter-mark {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  background: var(--accent);
  transition:
    transform 0.28s var(--ease),
    width 0.28s var(--ease);
}

.filter {
  position: relative;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 1rem;
  text-transform: lowercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.12s;
}

.filter:hover,
.filter[aria-pressed="true"] {
  color: var(--text);
}

.filter:active {
  transform: translateY(1px) scale(0.97);
}

.shuffle {
  min-width: 52px;
  padding: 0 14px;
}

.shuffle svg {
  width: 20px;
  height: 20px;
  flex: none;
  transition: transform 0.35s var(--ease);
}

.shuffle:active svg {
  transform: rotate(180deg);
}

.shuffle-label {
  display: none;
}

@media (min-width: 720px) {
  .dock {
    top: 12px;
    bottom: auto;
  }

  .filter {
    padding: 0 14px;
    font-size: 0.95rem;
  }

  .shuffle-label {
    display: inline;
  }
}

/* The wall: the whole screen, dragged with physics */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--wall);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}

.stage.is-dragging {
  cursor: grabbing;
}

.wall {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  isolation: isolate;
}

/* script.js sets each tile's size, transform (the dome) and curved outline */

.tile {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--tile-color, #26262a);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.tile:inert {
  pointer-events: none;
}

.tile:focus-visible {
  outline-offset: -4px;
}

/* The tiny preview is stretched to fill the tile, which blurs it. The real
   image sits on top and fades in once it has loaded. */

.tile-thumb,
.tile-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.tile-thumb {
  transform: scale(1.12);
}

.tile-full {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.tile.is-loaded .tile-full {
  opacity: 1;
}

/* Video tiles play in place, muted. The clip fades in over the poster once it plays. */

.tile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.tile.is-playing .tile-video {
  opacity: 1;
}

.tile-thumb:not([src]),
.tile-full:not([src]) {
  visibility: hidden;
}

/* Marks a video */

.tile-play {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgb(10 10 12 / 0.6);
}

.tile.is-video .tile-play {
  display: none;
}

.tile-play::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 10px;
  border-left: 8px solid #ffffff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* Darkens a tile: more toward the screen edges, and when another tile is hovered */

.tile-shade {
  position: absolute;
  inset: 0;
  background: var(--wall);
  opacity: 0;
  pointer-events: none;
}

/* Caption: the hovered card's title and details, bottom left, straight on the wall */

.caption {
  position: absolute;
  inset-inline-start: 20px;
  inset-block-end: 20px;
  z-index: 2;
  max-width: min(80vw, 520px);
  color: var(--wall-text);
  text-shadow: 0 1px 14px rgb(0 0 0 / 0.7);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.25s,
    transform 0.4s var(--ease);
  pointer-events: none;
}

.caption.is-on {
  opacity: 1;
  transform: none;
}

.caption-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.caption-meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  opacity: 0.85;
}

.empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--wall-text);
  pointer-events: none;
}

/* Overlays (project viewer and About): full-screen dialogs that script.js animates */

.overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wall-text);
  overflow: hidden;
}

.overlay::backdrop {
  background: transparent;
}

.overlay-shade {
  position: absolute;
  inset: 0;
  background: rgb(10 10 12 / 0.94);
}

.overlay-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 16px;
  z-index: 3;
}

/* Project viewer: media at its own shape, details beside it (below on phones) */

.viewer-body {
  position: relative;
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-height: calc(100% - 96px - env(safe-area-inset-top));
  margin: calc(72px + env(safe-area-inset-top)) auto 12px;
  display: grid;
  grid-template-rows: minmax(0, 50dvh) auto;
  align-content: start;
  gap: 20px;
  padding: 16px;
  color: var(--card-text, #ffffff);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.viewer-frame {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}

.viewer-media {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: var(--tile-color, #26262a);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.55);
  transform-origin: 0 0;
  will-change: transform;
}

.viewer-media > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The piece fades in over the preview once it is ready. A video loops silently
   in the card; tapping the piece opens it full screen. */
.viewer-media {
  cursor: zoom-in;
}

.viewer-media:focus-visible {
  outline: 3px solid var(--paper, #f3efe6);
  outline-offset: 6px;
}

.viewer-media > .viewer-full,
.viewer-media > .viewer-clip {
  opacity: 0;
  transition: opacity 0.42s var(--ease);
  pointer-events: none;
  background: var(--tile-color, #26262a);
}

.viewer-media > .viewer-full.is-ready,
.viewer-media > .viewer-clip.is-ready {
  opacity: 1;
}

.viewer-meta {
  margin: 0;
  color: inherit;
  opacity: 0.75;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.viewer-info h2 {
  margin: 10px 0 16px;
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.viewer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.viewer-tags li {
  padding: 6px 11px 7px;
  border: 0;
  background: #f2f0ec;
  color: #101012;
  font-size: 13px;
  line-height: 1.2;
  text-transform: none;
  clip-path: polygon(2% 1.2%, 98% 2.1%, 98.8% 97.5%, 1.8% 98%);
}

.viewer-summary {
  margin: 0 0 14px;
  max-width: 46ch;
  color: inherit;
  opacity: 0.9;
  font-size: 1.05rem;
  line-height: 1.6;
}

.viewer-credits {
  margin: 0 0 20px;
  color: inherit;
  opacity: 0.65;
  font-size: 0.875rem;
}

.viewer-link::after,
.about-links a::after {
  content: "\2197";
}

@media (min-width: 720px) {
  .viewer-body {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    align-content: stretch;
    gap: 40px;
    padding: 84px 56px 56px;
    overflow: hidden;
    /* Clicks on the empty area fall through to the shade, which closes. */
    pointer-events: none;
  }

  .viewer-media,
  .viewer-info {
    pointer-events: auto;
  }

  /* Desktop: one card in the media's colour, details on the left, media on the right. */
  .viewer[open] {
    display: grid;
    place-items: center;
  }

  .viewer-body {
    pointer-events: auto;
    width: min(1180px, calc(100% - 112px));
    height: min(680px, calc(100% - 140px));
    max-height: none;
    margin: 0 auto;
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    align-content: stretch;
    align-items: stretch;
    gap: 48px;
    padding: 48px;
    transform: rotate(-1deg);
    overflow: visible;
  }

  .viewer-info {
    order: -1;
    align-self: center;
    max-height: 100%;
    overflow-y: auto;
  }
}

/* About: a clay-red paper card with a photo pinned on it */

.about[open] {
  display: grid;
  place-items: center;
  padding: 12px;
}

.about-card {
  position: relative;
  display: grid;
  gap: 24px;
  width: min(900px, 100%);
  max-height: 100%;
  padding: 64px 24px 32px;
  background: var(--clay);
  clip-path: polygon(0 0.8%, 100% 0, 99.3% 100%, 0.5% 99.2%);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: rotate(-0.6deg);
}

.about-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about-text h2 {
  margin: 6px 0 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 11vw, 6.5rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  text-transform: lowercase;
}

.about-bio p {
  margin: 0 0 12px;
  max-width: 48ch;
  font-size: 1.05rem;
  line-height: 1.6;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 8px 0 20px;
  padding: 0;
  list-style: none;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--wall-text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.about-links a:hover {
  color: var(--accent);
}

.about-email {
  text-transform: none;
}

.about-photo {
  order: -1;
  width: 150px;
  padding: 8px 8px 28px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
  transform: rotate(5deg);
}

.about-photo-inner {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background: var(--accent);
  overflow: hidden;
}

.about-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-initial {
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 5rem;
  line-height: 1;
  text-transform: lowercase;
}

@media (min-width: 720px) {
  .about-card {
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: center;
    gap: 48px;
    padding: 64px;
    transform: rotate(-1.2deg);
  }

  .about-photo {
    order: 0;
    width: auto;
    padding: 10px 10px 38px;
  }

  .about-initial {
    font-size: 8rem;
  }
}

/* Custom cursor (mouse only): an arrow with a yellow tail. script.js moves it. */

.cursor {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
}

.has-cursor .cursor {
  display: block;
}

.has-cursor,
.has-cursor * {
  cursor: none !important;
}

.cursor-tail {
  position: absolute;
  top: 9px;
  left: 6px;
  width: 1px;
  height: 6px;
  background: var(--accent);
  border-radius: 3px;
  transform-origin: 0 50%;
  opacity: 0;
}

.cursor-arrow {
  position: absolute;
  top: -2px;
  left: -2px;
}

.cursor-arrow svg {
  display: block;
  overflow: visible;
  transform-origin: 2px 2px;
  transition: transform 0.18s var(--ease);
}

.cursor-arrow path {
  fill: #ffffff;
  stroke: #111111;
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: fill 0.18s;
}

.cursor.is-link .cursor-arrow svg {
  transform: scale(1.25);
}

.cursor.is-link .cursor-arrow path {
  fill: var(--accent);
}

.cursor.is-grab .cursor-arrow svg {
  transform: scale(0.85);
}

@media (prefers-reduced-motion: reduce) {
  .filter-mark,
  .shuffle svg,
  .brand-mark,
  .cursor-arrow svg,
  .caption {
    transition: none;
  }

  .tile-full {
    transition-duration: 0.2s;
  }
}

/* First-load screen: a star hops on its shadow, squashes on landing and turns a quarter each hop. */

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wall);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-hop {
  position: relative;
  width: 96px;
  height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.loader-shadow,
.loader-puff {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 56px;
  border-radius: 50%;
}

.loader-shadow {
  height: 10px;
  background: var(--clay);
  animation: loader-shadow 1.2s linear infinite;
}

.loader-puff {
  height: 12px;
  border: 2px solid var(--clay);
  opacity: 0;
  animation: loader-puff 1.2s linear infinite;
}

.loader-body {
  position: relative;
  transform-origin: 50% 100%;
  animation: loader-hop 1.2s linear infinite;
}

.loader-mark {
  display: block;
  width: 56px;
  height: 56px;
  fill: var(--accent);
  animation: loader-turn 1.2s linear infinite;
}

/* One hop per cycle. Each keyframe's timing sets how that part of the hop moves:
   ease-out on the way up, ease-in on the way down. */
@keyframes loader-hop {
  0% { transform: translateY(0) scale(1.16, 0.82); animation-timing-function: cubic-bezier(0.3, 0, 0.5, 1); }
  14% { transform: translateY(0) scale(1.16, 0.82); animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
  50% { transform: translateY(-74px) scale(0.9, 1.1); animation-timing-function: cubic-bezier(0.6, 0, 0.9, 0.6); }
  86% { transform: translateY(0) scale(1.16, 0.82); animation-timing-function: cubic-bezier(0.3, 0, 0.5, 1); }
  100% { transform: translateY(0) scale(1.16, 0.82); }
}

@keyframes loader-shadow {
  0%, 14%, 86%, 100% { transform: scaleX(1.12); opacity: 0.6; }
  50% { transform: scaleX(0.45); opacity: 0.16; }
}

@keyframes loader-puff {
  0%, 84% { opacity: 0; transform: scale(0.3); }
  86% { opacity: 0.9; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* Quarter turn per hop: the star has four-fold symmetry, so it lands looking the same. */
@keyframes loader-turn {
  from { transform: rotate(0deg); }
  to { transform: rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
  .loader * {
    animation: none !important;
  }
}

/* The About card and its photo get their own layer, so the dialog opens without stutter. */

.about-card,
.about-photo-frame {
  will-change: transform, opacity;
}

/* Viewer, as on the target: a flat card, light paper tags, a grotesk title, angled
   copies behind the media, and a plain white close mark. */

.viewer {
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.viewer-star {
  margin-left: 0.08em;
  font-size: 0.45em;
  vertical-align: top;
  opacity: 0.75;
}

.viewer-tags li:nth-child(odd) {
  transform: rotate(-1.2deg);
}

.viewer-tags li:nth-child(even) {
  transform: rotate(1deg);
}

.viewer-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #0c0c0e;
  transform: translate(-3.5%, 4%) rotate(-2.2deg);
}

.viewer-media > .viewer-ghost {
  inset: auto;
  top: -9%;
  right: -13%;
  width: 40%;
  height: auto;
  aspect-ratio: 1;
  z-index: -1;
  object-fit: cover;
  pointer-events: none;
  transform: perspective(700px) rotateY(-24deg) rotate(6deg);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
}

.viewer-media > .viewer-ghost.second {
  top: auto;
  right: auto;
  bottom: -11%;
  left: -12%;
  width: 34%;
  transform: perspective(600px) rotateX(20deg) rotate(-8deg);
}

.viewer-x {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  cursor: pointer;
}

.viewer-x::before,
.viewer-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.viewer-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.viewer-x:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
  border-radius: 50%;
}

/* The card's colour and hand-cut edge are their own layer, so the media copies can reach past it. */
.viewer-body {
  isolation: isolate;
}

.viewer-body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--tile-color, #26262a);
  clip-path: polygon(0 0.6%, 100% 0, 99.4% 100%, 0.6% 99.4%);
}

/* The viewer scrim lets the wall show through, as on the target. */

.viewer .overlay-shade {
  background: rgb(6 6 8 / 0.6);
}

/* Video tiles fade over their poster a little quicker than images. */

.tile-video {
  transition-duration: 0.45s;
}

/* Full screen: the piece alone on a dark screen, with a caption underneath. */

.shot {
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.shot[open] {
  display: block;
}

.shot-scrim {
  position: absolute;
  inset: 0;
  background: rgb(5 5 6 / 0.94);
  opacity: 0;
  transition: opacity 0.26s var(--ease);
}

.shot.is-open .shot-scrim {
  opacity: 1;
}

.shot-frame {
  position: absolute;
  inset: clamp(20px, 4vw, 64px) clamp(20px, 7vw, 120px);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 0.26s var(--ease) 0.04s,
    transform 0.4s var(--ease);
}

.shot.is-open .shot-frame {
  opacity: 1;
  transform: none;
}

.shot-frame:focus {
  outline: none;
}

.shot-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.shot-item {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  transition: filter 0.5s var(--ease);
}

/* An image is a small blurred copy until the sharp file has decoded. */
.shot-item.is-soft {
  filter: blur(14px);
}

.shot-cap {
  flex: none;
  color: rgb(255 255 255 / 0.55);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.shot-close {
  position: absolute;
  top: clamp(14px, 1.6vw, 24px);
  right: clamp(14px, 1.6vw, 24px);
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: #f2f0ec;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.26s var(--ease) 0.1s,
    background-color 0.2s,
    color 0.2s;
}

.shot.is-open .shot-close {
  opacity: 1;
}

.shot-close:hover {
  background: #f2f0ec;
  color: #0b0b0c;
}

.shot-close svg {
  width: 18px;
  height: 18px;
}

.shot-step {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 64px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: rgb(255 255 255 / 0.5);
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0;
  transition:
    color 0.2s,
    opacity 0.26s var(--ease) 0.1s;
}

.shot.is-open .shot-step {
  opacity: 1;
}

.shot-step:hover {
  color: #f2f0ec;
}

.shot-step svg {
  width: 26px;
  height: 26px;
}

.shot-step[data-dir="-1"] {
  left: clamp(4px, 1.4vw, 22px);
}

.shot-step[data-dir="1"] {
  right: clamp(4px, 1.4vw, 22px);
}

/* After a video ends, the arrow to the next piece nudges to point the way. */
.shot-step.is-cued {
  color: #f2f0ec;
  animation: shot-nudge 1.6s var(--ease) infinite;
}

@keyframes shot-nudge {
  50% {
    transform: translateY(-50%) translateX(4px);
  }
}

@media (max-width: 760px) {
  .shot-frame {
    inset: 44px 10px 72px;
  }

  .shot-step {
    top: auto;
    bottom: max(20px, env(safe-area-inset-bottom));
    transform: none;
    width: 64px;
  }

  .shot-step.is-cued {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shot-scrim,
  .shot-frame,
  .shot-close,
  .shot-step,
  .viewer-media > .viewer-full,
  .viewer-media > .viewer-clip {
    transition-duration: 0.01s;
  }

  .shot-step.is-cued {
    animation: none;
  }
}

/* Play mark on a video in the viewer. The tap goes through to the piece. */

.viewer-media > .viewer-play {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0c;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.35);
  pointer-events: none;
  transition: transform 0.3s var(--ease);
}

.viewer-media:hover > .viewer-play {
  transform: scale(1.08);
}

.viewer-play svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  fill: currentColor;
}

/* Credit: a paper scrap signing the site, bottom right. On desktop it also
   sits inside the About card. */

.credit {
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  text-transform: lowercase;
  transform: rotate(-2.5deg);
  transform-origin: 100% 100%;
  transition:
    background-color 0.2s,
    transform 0.5s var(--ease);
}

.credit:hover {
  transform: rotate(0deg) translateY(-3px) scale(1.06);
}

.credit-by {
  font-size: 0.8em;
  font-weight: 500;
  opacity: 0.6;
}

.credit-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2em;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: underline wavy var(--clay);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* The wall scrap is desktop only. On phones the credit is a small plain line
   at the bottom of the About card instead of a paper scrap. */
.credit:not(.credit--about) {
  display: none;
}

.credit--about {
  display: inline-flex;
  min-height: 28px;
  padding: 0;
  gap: 5px;
  background: none;
  clip-path: none;
  color: inherit;
  font-size: 0.8rem;
  transform: none;
}

.credit--about:hover {
  background: none;
  transform: none;
}

.credit--about .credit-by {
  opacity: 0.75;
}

.credit--about .credit-name {
  text-decoration-color: var(--accent);
}

@media (min-width: 720px) {
  .credit:not(.credit--about) {
    display: inline-flex;
    position: fixed;
    z-index: 20;
    right: 18px;
    bottom: 18px;
    min-height: 40px;
    animation: credit-in 0.9s var(--ease) 2.4s backwards;
  }

  .credit--about {
    display: none;
  }
}

.credit--about {
  justify-self: start;
  margin-top: 4px;
}

@keyframes credit-in {
  from {
    opacity: 0;
    transform: translateY(-14px) rotate(-8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .credit {
    transition: none;
    animation: none !important;
  }
}
