* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f7f6f2;
  color: #151515;
  font-family: Arial,Helvetica,sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(22px,4vw,76px);
}

.brand {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -.06em;
}

.masthead span,.overline,.below,footer {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.heading {
  max-width: 1680px;
  margin: auto;
  padding: clamp(36px,6vw,84px) clamp(22px,4vw,76px) clamp(36px,5vw,68px);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 36px;
}

.overline {
  margin: 0 0 20px;
}

.heading h1 {
  font-size: clamp(50px,8.2vw,148px);
  line-height: .85;
  letter-spacing: -.088em;
  margin: 0;
  font-weight: 900;
}

.heading h1 i {
  font-style: normal;
}

.instruction {
  max-width: 240px;
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.5;
}

.exhibition {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

.photo-frame {
  width: min(100%,1280px);
  position: relative;
  line-height: 0;
}

.photo-frame>img {
  width: 100%;
  height: auto;
  display: block;
}

.hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  inset: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
  padding: 0;
  pointer-events: auto;
  clip-path: polygon(var(--polygon));
  transition: background .12s;
}

.hotspot:hover,.hotspot:focus-visible {
  background: rgba(255,240,130,.12);
  outline: none;
}

.below {
  width: min(100%,1280px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 30px;
}

.below span:last-child {
  color: #D0212B;
}

footer {
  border-top: 1px solid #bbb;
  display: flex;
  justify-content: space-between;
  margin: 10vh clamp(22px,4vw,76px) 24px;
  padding: 18px 0;
}

.viewer {
  display: none;
  position: fixed;
  z-index: 99;
  inset: 0;
  background: rgba(10,10,10,.985);
  color: #fff;
  align-items: center;
  justify-content: center;
}

.viewer.open {
  display: flex;
}

.viewer figure {
  margin: 0;
  width: min(83vw,1400px);
  height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.viewer figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100% - 36px);
  object-fit: contain;
}

.viewer figcaption {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.viewer button {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.viewer button:hover {
  color: #ffdb24;
}

.close {
  position: absolute;
  right: 24px;
  top: 12px;
  font-size: 48px;
  z-index: 3;
}

.arrow {
  font-size: 34px;
  padding: 14px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width:780px) {
  .heading {
    display: block;
  }
  .heading h1 {
    font-size: clamp(42px,10vw,75px);
  }
  .instruction {
    margin-top: 28px;
  }
  .exhibition {
    padding: 0 8px;
  }
  .below {
    font-size: 9px;
  }
  .masthead span {
    font-size: 9px;
  }
  .viewer figure {
    width: 90vw;
    height: 83vh;
  }
  .arrow {
    position: absolute;
    bottom: 3vh;
  }
  .prev {
    left: 15px;
  }
  .next {
    right: 15px;
  }
  .close {
    right: 16px;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  .hotspot {
    transition: none;
  }
}

.viewer figure {
  gap: 0;
  height: 94vh;
}

.viewer figure img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.viewer figcaption {
  display: none !important;
}

.hotspot:hover,.hotspot:focus-visible {
  background: transparent !important;
  outline: none !important;
}

.hotspot:focus-visible {
  filter: drop-shadow(0 0 1px white);
}

.viewer .arrow {
  position: absolute !important;
  top: 50%;
  transform: translateY(-50%) !important;
  z-index: 4 !important;
}

.viewer .arrow.prev {
  left: clamp(8px,2vw,32px) !important;
}

.viewer .arrow.next {
  right: clamp(8px,2vw,32px) !important;
}

.viewer .close {
  top: 18px !important;
  right: 22px !important;
}

.viewer figure {
  width: min(82vw,1400px) !important;
}

@media (max-width:780px) {
  .viewer .arrow {
    top: auto !important;
    bottom: 3vh !important;
    transform: none !important;
  }
  .viewer figure {
    width: 90vw !important;
    height: 82vh !important;
  }
}

.heading h1 .title-dot {
  color: var(--tildaso-red,#D0212B);
}

.heading h1 .title-dot {
  display: inline-block;
  width: .115em;
  height: .115em;
  vertical-align: baseline;
  background: #D0212B;
  margin: 0 0 .02em .085em;
  border-radius: 0;
}

/* Prints lift off the wall on hover */
.photo-frame {
  overflow: visible;
}

.print-lift {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: var(--origin);
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  transition: transform .45s cubic-bezier(.3,1.6,.5,1), filter .35s ease;
  z-index: 1;
}

.print-face {
  position: absolute;
  inset: 0;
  background: url("images/installation.jpg") 0 0 / 100% 100% no-repeat;
  clip-path: polygon(var(--polygon));
  opacity: 0;
  transition: opacity .15s ease;
}

.print-lift.is-up {
  z-index: 3;
  transform: scale(1.04) rotate(-.6deg);
  filter: drop-shadow(6px 14px 14px rgba(0,0,0,.45));
  animation: printWobble .6s ease .05s;
}

.print-lift.is-up .print-face,
.print-lift.is-nudge .print-face {
  opacity: 1;
}

.print-lift.is-nudge {
  animation: printNudge .9s ease;
}

@keyframes printWobble {
  0% { rotate: 0deg; }
  30% { rotate: 2.2deg; }
  60% { rotate: -1.2deg; }
  100% { rotate: 0deg; }
}

@keyframes printNudge {
  0%,100% { transform: none; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
  25% { transform: scale(1.04) rotate(1.6deg); filter: drop-shadow(3px 7px 8px rgba(0,0,0,.35)); }
  55% { transform: scale(1.04) rotate(-1.4deg); filter: drop-shadow(3px 7px 8px rgba(0,0,0,.35)); }
}

.hotspot {
  z-index: 4;
  cursor: zoom-in !important;
}

.view-cursor {
  position: absolute;
  left: -32px;
  top: -32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 10px/1 Arial,Helvetica,sans-serif;
  letter-spacing: .14em;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  scale: .4;
  transition: opacity .2s ease, scale .25s cubic-bezier(.3,1.6,.5,1);
}

.photo-frame.is-over .view-cursor {
  opacity: 1;
  scale: 1;
}

@media (hover: none) {
  .view-cursor { display: none; }
  .hotspot { cursor: pointer !important; }
}

@media (prefers-reduced-motion:reduce) {
  .print-lift, .print-lift.is-up { animation: none; transition: none; }
}

.view-cursor { display: none !important; }
