/*
 * Hand-written polish on top of the imported Readymag pages: navigation,
 * background, captions, project details and the collaborators panel.
 * Sizes are canvas pixels, like the rest of the page.
 */

/* --- navigation ------------------------------------------------------------ */

/* Each nav link is a small Photoshop work with its label on top (after
   antoninwattel.com): grey at rest, colour and spinning on hover. The page
   you're on stays in colour and keeps spinning. */
.nav-obj {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 300px;
}

.nav-art {
  position: relative;
  height: 68px;
}

/* Dithered like the reference: one dot per canvas pixel, kept hard-edged. */
.nav-art img {
  display: block;
  width: auto !important;
  height: 68px !important;
  image-rendering: pixelated;
}

/* The colour version sits on top of the grey one and fades in. */
.nav-art .nav-color {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

/* js/ux.js adds .is-spinning on hover and removes it at the end of a full
   turn, so the picture always comes to rest facing forward. */
.nav-obj.is-spinning .nav-art,
[aria-current="page"] .nav-art {
  animation: nav-spin 1.6s linear infinite;
}

a:hover > .nav-obj .nav-color,
a:focus-visible > .nav-obj .nav-color,
[aria-current="page"] .nav-color {
  opacity: 1;
}

/* js/nav3d.js draws 3D models in their place once they've loaded. */
.nav-3d .nav-art {
  visibility: hidden;
}

@keyframes nav-spin {
  to { transform: rotateY(360deg); }
}

.nav-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font: 400 21px/1 Oswald, sans-serif;
  letter-spacing: 2px;
  white-space: nowrap;
  pointer-events: none;
  text-shadow:
    -2px -2px 0 #000, 0 -2px 0 #000, 2px -2px 0 #000, 2px 0 0 #000,
    2px 2px 0 #000, 0 2px 0 #000, -2px 2px 0 #000, -2px 0 0 #000;
}

/* --- background ------------------------------------------------------------ */

/* Dim the wallpaper so the work in front of it stands out. */
.page-fixed-bg-container .picture-background {
  filter: brightness(0.38) saturate(0.85);
}

/* --- captions ---------------------------------------------------------------- */

/* One style for every image caption: Title · Context · Year. */
.caption .text-viewer > h1 {
  font: 300 13px/17px Oswald, sans-serif !important;
  text-align: left !important;
}

.caption .text-viewer span {
  font: inherit !important;
  letter-spacing: 0.5px !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* --- project details (Works page) ------------------------------------------- */

/* Type · tools · year, next to the short bar under each project title. */
.project-meta {
  height: 18px;
  color: rgba(255, 255, 255, 0.7);
  font: 300 11px/18px Oswald, sans-serif;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- selected collaborators (home page) -------------------------------------- */

.collab {
  box-sizing: border-box;
  padding: 18px 22px 22px;
  border-radius: 32px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-family: Oswald, sans-serif;
}

.collab-title {
  margin: 0;
  font-size: 27px;
  font-weight: 400;
  line-height: 36px;
  letter-spacing: 1.91px;
  text-decoration: underline;
}

.collab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.collab-list li {
  padding: 4px 14px;
  border: 2px solid #fff;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 1px;
  line-height: 24px;
}

.collab-list small {
  font-size: 13px;
  opacity: 0.7;
}

/* --- reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .nav-obj .nav-art {
    animation: none !important;
  }
}
