:root {
  --paper: #ffffff;
  --ink: #141414;
  --muted: #767676;
  --gutter: 14px;
  --bar: 50px;
  --fade: 520ms;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: "Unbounded", "Helvetica Neue", Arial, sans-serif; /* headings, prices and small labels */
}

/* Small labels: navigation, captions, counters */
.links, .close, .caption, .count, .cursor, .hint, .chapter h2 {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Bars ---------- */

.bar {
  position: fixed;
  left: 0; right: 0;
  height: var(--bar);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}
.bar--top { top: 0; padding-top: env(safe-area-inset-top); }
.bar--bottom { bottom: 0; padding-bottom: env(safe-area-inset-bottom); }

.logo img { display: block; height: 17px; width: auto; }

.links { display: flex; gap: 28px; }
.links button,
.links a,
.close {
  position: relative;
}
.links button::after,
.links a::after,
.close::after,
.actions a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.links button:hover::after,
.links a:hover::after,
.links a[aria-current="page"]::after,
.close:hover::after,
.actions a:hover::after { transform: scaleX(1); }

.caption { transition: opacity .3s ease; }
.count { font-variant-numeric: tabular-nums; color: var(--muted); transition: opacity .6s ease; }

/* While the opening sequence runs, only the logo and the pictures */
body.intro .caption,
body.intro .count,
body.intro .links,
body.intro .hint { opacity: 0; }
.links { transition: opacity .6s ease; }
.count b { font-weight: 400; color: var(--ink); }

/* ---------- Stage ---------- */

.stage {
  position: fixed;
  inset: var(--bar) var(--gutter);
}
.frame {
  position: absolute;
  inset: 0;
  container-type: size;
}
.layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--fade) ease;
}
.layer.is-in { opacity: 1; }
.layer.cover img { object-fit: cover; }
.layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.layer .film {
  /* Same frame as the photos: fit a 1.9:1 film inside the stage. */
  width: min(100cqw, 100cqh * 1.9);
  aspect-ratio: 1.9;
  position: relative;
  background: #f2f2f2;
  overflow: hidden;
}
.layer .film iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  pointer-events: none;
}

.hit {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  z-index: 2;
  cursor: none;
}
.hit--prev { left: 0; }
.hit--next { right: 0; }
.hit:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; }

/* Text cursor that follows the pointer over the image */
.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 20;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .2s ease;
  mix-blend-mode: difference;
  color: #fff;
}
.cursor.is-on { opacity: 1; }

.hint {
  display: none;
  pointer-events: none;
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  margin: 0;
  text-align: center;
  color: #fff;
  mix-blend-mode: difference;
  transition: opacity .4s ease;
}
.hint.is-gone { opacity: 0; }

@media (hover: none) {
  .hit { cursor: default; }
  .cursor { display: none; }
  .hint { display: block; }
}

/* ---------- Panels ---------- */

.panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--paper);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--bar) var(--gutter) calc(var(--bar) + 20px);
  opacity: 0;
  transition: opacity .35s ease;
}
.panel:not(.is-open) { pointer-events: none; }
.panel.is-open { opacity: 1; }
body.panel-open .bar--top { z-index: 35; background: var(--paper); }
.panel[hidden] { display: none; }

.close {
  position: fixed;
  top: calc(env(safe-area-inset-top) + var(--bar) / 2);
  right: var(--gutter);
  transform: translateY(-50%);
  z-index: 40;
}
.close[hidden] { display: none; }
body.panel-open .links { visibility: hidden; }

/* Index */
.chapter { margin: 0 0 44px; }
.chapter h2 {
  font-weight: 400;
  margin: 0 0 12px;
}
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.thumbs button { position: relative; }
.thumbs img {
  height: 118px;
  width: auto;
  display: block;
  transition: opacity .25s ease;
}
.thumbs button:hover img { opacity: .72; }
.thumbs button[aria-current="true"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--ink);
}

/* Enquire */
.panel--enquire .panel__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 980px;
}
.lede {
  font-family: var(--display);
  font-size: clamp(26px, 3.7vw, 52px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.03em;
  margin: 0 0 28px;
  max-width: 16em;
}
.body {
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 30em;
  margin: 0 0 40px;
}
.actions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 36px; font-size: 17px; }
.actions a { position: relative; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  :root { --gutter: 10px; --bar: 46px; }
  .logo img { height: 15px; }
  .logo { flex: none; margin-right: 12px; }
  .links { gap: 12px; font-size: 10px; letter-spacing: .03em; }
  .thumbs img { height: 84px; }
  .caption { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --fade: 0ms; }
  .panel, .caption, .count, .links, .cursor { transition: none; }
}
