/* ---------- Typography ---------- */
@font-face {
  font-family: "Burgess";
  src: url("https://files.cargocollective.com/c354012/burgess-regular.woff?1556997278") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Use Burgess across the site */
body,
.site-header,
.site-header a,
.gallery_image_caption,
.quick-view-caption {
  font-family: "Burgess", "Times New Roman", serif !important;
}

/* ---------- Links ---------- */
a {
  color: #000000 !important;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  color: #000000 !important;
  text-decoration: none !important;
  opacity: 0.6;
}

/* Keep gallery photos from fading on hover */
.image-gallery a:hover {
  opacity: 1 !important;
}

/* ---------- Images ---------- */

/* Responsive, no hover effects */
img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 2.5rem;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* Gallery images: no tap highlight, no darkening/scaling */
.image-gallery img,
.image-gallery a {
  -webkit-tap-highlight-color: transparent;
}

.image-gallery img:hover,
.image-gallery img:active,
.image-gallery a:hover img,
.image-gallery a:active img {
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
}

/* Fade in top images when the site opens */
.image-gallery .gallery_card {
  transition: opacity 0.9s ease;
}

html:not(.intro-done) .image-gallery .gallery_card:not(.intro-in) {
  opacity: 0;
}

/* Smoother scrolling: each photo stays hidden until it has fully downloaded
   and decoded (the script adds "img-ready"), then fades in. No half-drawn
   photos, and Cargo's slide-up motion is replaced with a simple fade. */
.content .image-gallery .scroll-transition-fade,
.image-gallery .gallery_card_image {
  transform: none !important;
}

.content .image-gallery .scroll-transition-fade {
  transition: opacity 0.6s ease !important;
}

.image-gallery .gallery_card {
  transition: opacity 0.6s ease;
}

.image-gallery .gallery_card:not(.img-ready) {
  opacity: 0 !important;
}

/* Captions */
.image_caption,
figure figcaption,
figcaption {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.3rem;
  line-height: 1.4;
  opacity: 0.8;
  text-align: left;
}

/* ---------- Layout ---------- */
body {
  margin: 0;
}

.page,
.content,
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Desktop: bring the gallery closer to the header (homepage only) */
@media (min-width: 769px) {
  .homepage [data-view="Content"] .page {
    padding-top: 0 !important;
  }
  .homepage [data-view="Content"] .page > .bodycopy {
    padding-top: 0 !important;
  }
}

/* ---------- Header ---------- */

/* One row, name left, links right, all on the same baseline */
.site-header {
  display: flex !important;
  justify-content: space-between;
  align-items: baseline !important;
  flex-wrap: nowrap;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
}

.site-header > [grid-col] {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto;
  line-height: 1.2 !important;
}

.site-header.header-hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.site-header h2 {
  display: inline !important;
  margin: 0;
  font-size: 1.92rem;
  line-height: 1.2 !important;
  /* Nudge the name down so its visual centre matches "INFO" and the icon
     (the name is larger, so on a shared baseline it looks like it floats).
     0.357 = half of Burgess's capital height; the sizes are name and Info. */
  position: relative;
  top: calc(0.357 * (1.92rem - 1.3rem));
}

.site-header h2 a {
  display: inline !important;
  line-height: 1.2 !important;
}

.site-header .nav-links {
  display: inline !important;
  line-height: 1.2 !important;
}

.site-header .nav-links a {
  display: inline !important;
  line-height: 1.2 !important;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header .nav-links a + a {
  margin-left: 1.75rem;
}

/* Instagram icon: sized to the text so it scales with it, centred on the
   capital letters of "Info", about one letter's width away, with a larger
   invisible tap area */
.site-header .nav-links .ig-link,
.site-header .nav-links a + a.ig-link {
  display: inline-block !important;
  padding: 8px;
  margin: -8px -8px -8px calc(0.45em - 8px) !important;
}

.site-header .nav-links .ig-link .ig-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.193em;
}

/* Finer outline, closer to the weight of Burgess */
.site-header .ig-icon rect,
.site-header .ig-icon circle:not([fill="currentColor"]) {
  stroke-width: 1.25px;
}

.icon-link {
  font-family: inherit;
  font-style: normal;
  font-weight: normal;
  text-decoration: none;
}

/* Phones: fixed, readable sizes (Cargo shrinks text on small screens) */
@media (max-width: 600px) {
  .site-header h2 {
    font-size: 19.8px !important;
    top: calc(0.357 * (19.8px - 15px));
  }
  .site-header .nav-links a {
    font-size: 15px !important;
    letter-spacing: 0.1em !important;
  }
  .site-header .nav-links a + a {
    margin-left: 16px;
  }
}

/* Line the header up with the photos' left and right edges.
   Cargo gives the header page 2.5 side padding but the homepage 2
   (1.6 on phones), so match the header to the homepage. */
.pinned_top .content_padding {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

body.mobile .pinned_top .content_padding {
  padding-left: 1.6rem !important;
  padding-right: 1.6rem !important;
}

/* White behind the header, so it doesn't sit over photos when it slides back in */
.site-header {
  position: relative;
  z-index: 0;
}

.site-header::before {
  content: "";
  position: absolute;
  top: -80px;
  bottom: 0;
  left: -60px;
  right: -60px;
  background: #fff;
  z-index: -1;
  pointer-events: none;
}

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

/* Category ("Editorial", "Personal Work") in a lighter grey */
.gallery_image_caption .cap-sep,
.gallery_image_caption .cap-cat,
.quick-view-caption .cap-sep,
.quick-view-caption .cap-cat {
  color: #8a8a8a;
}

/* Phones: category on its own line, more space before the next photo */
@media (max-width: 768px) {
  .image-gallery .gallery_image_caption {
    padding-top: 6px;
    line-height: 1.35;
  }
  .gallery_image_caption .cap-sep {
    display: none;
  }
  .gallery_image_caption .cap-cat {
    display: block;
  }
  .image-gallery .gallery_card {
    margin-bottom: 14px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  clear: both;
  margin: 4rem 0 1.5rem;
  font-size: 0.8rem;
  color: #8a8a8a;
  text-align: left;
}

/* ---------- Photo viewer ---------- */

@keyframes qvFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* No zoom motion */
.quick-view .pswp__zoom-wrap {
  transition: none !important;
}

/* Faded backdrop, fades in on open */
.quick-view .pswp__bg {
  background: rgba(255, 255, 255, 0.9) !important;
}

.quick-view.pswp--open .pswp__bg {
  animation: qvFadeIn 0.45s ease both;
}

/* Hide Cargo's stand-in copy so it can't flash before the real photo */
.quick-view .pswp__img--placeholder {
  opacity: 0 !important;
}

/* Full-size photo stays hidden until downloaded, then always fades in */
.quick-view .pswp__img:not(.pswp__img--placeholder) {
  opacity: 0;
  transition: none;
}

.quick-view .pswp__img.is-loaded {
  opacity: 1;
  animation: qvFadeIn 0.45s ease both;
}

/* Caption fades in with the viewer */
.quick-view.pswp--open .quick-view-caption-wrapper {
  animation: qvFadeIn 0.45s ease both;
}

/* Fade out on close */
.quick-view.pswp {
  transition: opacity 0.45s ease !important;
}

/* Breathing room around the enlarged photo */
.quick-view .pswp__img {
  scale: 0.88;
  transform-origin: center center;
  margin: 0 !important;
}

/* Caption directly under the enlarged photo */
.quick-view .quick-view-caption-wrapper {
  left: var(--cap-left, 0) !important;
  width: var(--cap-width, 100%) !important;
  top: var(--cap-top, auto) !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
}

.quick-view .quick-view-caption-wrapper .quick-view-caption {
  position: absolute !important;
  top: 0 !important;
  bottom: auto !important;
  left: 0;
  right: 0;
  text-align: left;
}

/* Close / Prev / Next as words in Burgess, replacing Cargo's icons.
   The words sit on Cargo's own buttons, so clicking works as before.
   CLOSE lines up with "INFO" in the header, which fades out while a photo
   is open. (On phones Cargo hides these; visitors swipe or tap instead.) */
.quick-view-navigation svg.left-arrow,
.quick-view-navigation svg.right-arrow,
.quick-view-navigation svg.close-button {
  opacity: 0 !important;
}

.quick-view-navigation .pswp__group-close {
  position: fixed !important;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
}

.quick-view-navigation .pswp__button-prev::after,
.quick-view-navigation .pswp__button-next::after,
.quick-view-navigation .pswp__group-close .pswp__button-close::after {
  position: absolute;
  font-family: "Burgess", "Times New Roman", serif;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
  padding: 8px;
  pointer-events: auto;
  transition: opacity 0.2s ease;
}

.quick-view-navigation .pswp__button-prev::after {
  content: "Prev";
  left: calc(3.5rem - 8px);
  top: 50%;
  transform: translateY(-50%);
}

.quick-view-navigation .pswp__button-next::after {
  content: "Next";
  right: calc(3.5rem - 8px);
  top: 50%;
  transform: translateY(-50%);
}

.quick-view-navigation .pswp__group-close .pswp__button-close::after {
  content: "Close";
  right: calc(3.5rem - 8px - 0.12em);
  top: 4rem;
}

.quick-view-navigation .pswp__button:hover::after {
  opacity: 0.6;
}

/* Keep CLOSE / PREV / NEXT visible the whole time (Cargo normally fades
   them out when the mouse is still, e.g. while clicking through photos) */
.pswp .quick-view-navigation,
.pswp .quick-view-navigation.pswp__ui--idle {
  opacity: 1 !important;
}

.pswp .quick-view-navigation.pswp__ui--hidden .pswp__button {
  opacity: 1 !important;
}

/* Crossfade between photos: the script adds "qv-switching" while it
   swaps to the next photo, fading the photo and its caption out and in */
.pswp .pswp__container,
.pswp .quick-view-caption-wrapper {
  transition: opacity 0.25s ease;
}

.pswp.qv-switching .pswp__container,
.pswp.qv-switching .quick-view-caption-wrapper {
  opacity: 0 !important;
}

/* Fade the header out while a photo is open, so CLOSE takes its place */
html.qv-open .site-header {
  opacity: 0 !important;
  pointer-events: none;
}

/* ---------- Custom cursor ---------- */

/* Hide the normal cursor everywhere, including over photos and in the
   enlarged view (mouse/trackpad only, not phones).
   ".pswp.quick-view" is deliberately specific to beat Cargo's own
   "cursor: default !important" on enlarged photos. */
@media (hover: hover) and (pointer: fine) {
  html,
  body,
  body *,
  .image-gallery img,
  .image-gallery a,
  .image-gallery .gallery_card_image img,
  .pswp.quick-view .pswp__img,
  .pswp.quick-view .pswp__img--placeholder {
    cursor: none !important;
  }
}

/* The outer element only moves (pinned to the pointer);
   the inner dot handles size, colour and the press effect */
.photo-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2147483647;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.25s ease;
  will-change: transform;
  contain: layout style;
}

.photo-cursor.is-visible {
  opacity: 1;
}

/* Default: small black dot */
.photo-cursor__dot {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: 17px;
  height: 17px;
  margin: -8.5px 0 0 -8.5px;
  border-radius: 50%;
  background: #000;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    width 0.25s ease,
    height 0.25s ease,
    margin 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

/* Shrinks slightly while clicking */
.photo-cursor.is-pressed .photo-cursor__dot {
  transform: scale(0.75);
}

/* Over links: a thin black ring, so the text stays readable */
.photo-cursor.is-link .photo-cursor__dot {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  background: transparent;
  border-color: #000;
}

/* Over photos: same size as the black dot, but white
   (faint shadow keeps it visible on very light photos) */
.photo-cursor.is-photo .photo-cursor__dot {
  background: #fff;
  border-color: transparent;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
}
