/* ==========================================================================
   Corridor — a wall of work, walked sideways.
   ========================================================================== */

.wl-corridor {
  position: relative;
  overflow: hidden;
  background: var(--wl-ink);
  color: var(--wl-on-ink);
  /*
   * This band sets its own height, so the section padding every other band
   * takes would be added to it and then eaten out of the track — which is
   * what clipped the titles off the bottom of the plates the first time.
   */
  padding-block: 0;
  /*
   * Not 100vh. A strip of the page stays visible above and below, so a
   * visitor can always get past this band whatever their input device.
   */
  height: min(84svh, 820px);
  user-select: none;
}

/*
 * The wall dissolves at both ends instead of being cut off by the frame, so
 * nothing is guillotined under an arrow and both edges say there is more
 * this way.
 */
.wl-corridor::before,
.wl-corridor::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: clamp(72px, 8vw, 150px);
  pointer-events: none;
}

.wl-corridor::before {
  left: 0;
  background: linear-gradient(to right, var(--wl-ink) 18%, transparent);
}

.wl-corridor::after {
  right: 0;
  background: linear-gradient(to left, var(--wl-ink) 18%, transparent);
}

.wl-corridor__bar {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wl-space-md);
  padding: var(--wl-space-md) var(--wl-gutter);
  pointer-events: none;
}

.wl-corridor__where {
  font-size: var(--wl-text-xs);
  letter-spacing: var(--wl-tracking-wide);
  text-transform: uppercase;
  color: var(--wl-on-ink-soft);
}

/*
 * The type behind the wall. Set enormous and almost out, so the dark space
 * reads as designed rather than empty — and it carries the beach names,
 * which is the one column no competitor can fill, rather than a slogan. It
 * travels slower than the plates, which is what gives the band depth, and
 * it only moves while the wall moves.
 */
.wl-corridor__drift {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
}

.wl-corridor__drift p {
  white-space: nowrap;
  font-family: var(--wl-font-display);
  font-weight: 400;
  font-size: clamp(130px, 29vw, 400px);
  line-height: 0.78;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--wl-on-ink);
  opacity: 0.068;
  will-change: transform;
}

/* ---- the track ---------------------------------------------------------- */

.wl-corridor__track {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 100%;
  gap: clamp(28px, 4vw, 72px);
  /* Wide enough that the arrows never sit on top of a title or a button. */
  padding-inline: clamp(80px, 7vw, 118px);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
}

.wl-corridor__track::-webkit-scrollbar { display: none; }

.wl-corridor__track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.wl-corridor__track:focus-visible {
  outline: 2px solid var(--wl-highlight);
  outline-offset: -4px;
}

/* ---- one plate ---------------------------------------------------------- */

.wl-corridor__plate {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: center;
}

.wl-corridor__plate-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.wl-corridor__plate-link:focus-visible {
  outline: 3px solid var(--wl-highlight);
  outline-offset: 6px;
}

/*
 * The mount and the drop are not decoration. The whole claim is that this
 * work is a physical object with real sand standing off the surface, and a
 * picture lying flat on a dark field reads as a print. The mat and the
 * shadow are what make it read as something hanging on a wall.
 */
.wl-corridor__mount {
  padding: clamp(10px, 1.1vw, 22px);
  background: rgb(0 0 0 / 42%);
  box-shadow: 0 34px 64px -26px rgb(0 0 0 / 80%);
  transition: transform 700ms var(--wl-ease);
}

.wl-corridor__plate:hover .wl-corridor__mount { transform: translateY(-4px); }

.wl-corridor__frame {
  position: relative;
  overflow: hidden;
  background: rgb(0 0 0 / 55%);
}

.wl-corridor__frame img {
  height: clamp(250px, 52svh, 540px);
  object-fit: cover;
}

.wl-corridor__plate.is-wide .wl-corridor__frame img { width: clamp(320px, 62vw, 880px); }
.wl-corridor__plate.is-tall .wl-corridor__frame img { width: clamp(240px, 38vw, 520px); }

/* The gallery spotlight, raking down the surface. */
.wl-corridor__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgb(255 255 255 / 12%) 0%,
    rgb(255 255 255 / 0%) 34%,
    rgb(0 0 0 / 18%) 70%,
    rgb(0 0 0 / 55%) 100%
  );
}

.wl-corridor__label {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wl-space-xs) var(--wl-space-xl);
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--wl-space-md);
}

.wl-corridor__name {
  font-family: var(--wl-font-display);
  font-weight: 400;
  font-size: var(--wl-text-xl);
  line-height: 1.1;
  letter-spacing: var(--wl-tracking-tight);
}

.wl-corridor__where-from {
  margin-top: var(--wl-space-2xs);
  font-size: var(--wl-text-sm);
  color: var(--wl-on-ink-soft);
}

.wl-corridor__facts {
  font-size: var(--wl-text-xs);
  letter-spacing: 0.04em;
  color: var(--wl-on-ink-soft);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wl-corridor__price { color: var(--wl-on-ink); }

/* ---- the blocks at either end ------------------------------------------- */

.wl-corridor__pylon {
  flex: 0 0 clamp(250px, 32vw, 380px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--wl-space-md);
  scroll-snap-align: center;
}

.wl-corridor__kicker {
  font-size: var(--wl-text-xs);
  letter-spacing: var(--wl-tracking-wide);
  text-transform: uppercase;
  color: var(--wl-highlight);
}

.wl-corridor__heading {
  font-family: var(--wl-font-display);
  font-weight: 400;
  font-size: var(--wl-text-2xl);
  line-height: 0.96;
  letter-spacing: var(--wl-tracking-tight);
  text-transform: uppercase;
}

.wl-corridor__heading em {
  display: block;
  font-style: italic;
  text-transform: none;
  color: var(--wl-on-ink-soft);
}

.wl-corridor__intro {
  font-size: var(--wl-text-sm);
  line-height: 1.55;
  color: var(--wl-on-ink-soft);
}

.wl-corridor__cta { align-self: flex-start; }

.wl-corridor__quiet {
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid currentcolor;
  font-size: var(--wl-text-sm);
  color: var(--wl-on-ink-soft);
  text-decoration: none;
  transition: color var(--wl-duration) var(--wl-ease);
}

.wl-corridor__quiet:hover,
.wl-corridor__quiet:focus-visible { color: var(--wl-highlight); }

/*
 * An interlude between paintings. Narrow, so it reads as a breath in the
 * wall rather than a stop in it.
 */
.wl-corridor__aside {
  flex: 0 0 clamp(210px, 22vw, 290px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--wl-space-md);
  scroll-snap-align: center;
}

.wl-corridor__aside-rule {
  width: 46px;
  height: 2px;
  background: var(--wl-highlight);
}

.wl-corridor__aside p {
  font-family: var(--wl-font-display);
  font-weight: 400;
  font-style: italic;
  font-size: var(--wl-text-xl);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--wl-on-ink);
}

/* ---- the arrows, deliberately loud -------------------------------------- */

.wl-corridor__nav {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 5vw, 68px);
  height: clamp(52px, 5vw, 68px);
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--wl-on-ink);
  color: var(--wl-ink);
  transition:
    background var(--wl-duration) var(--wl-ease),
    opacity var(--wl-duration) var(--wl-ease);
}

.wl-corridor__nav.is-prev { left: clamp(10px, 1.6vw, 22px); }
.wl-corridor__nav.is-next { right: clamp(10px, 1.6vw, 22px); }

.wl-corridor__nav:hover { background: var(--wl-highlight); }

.wl-corridor__nav:focus-visible {
  outline: 3px solid var(--wl-highlight);
  outline-offset: 3px;
}

.wl-corridor__nav[disabled] {
  opacity: 0.22;
  cursor: default;
  background: var(--wl-on-ink);
}

/* ---- progress ----------------------------------------------------------- */

.wl-corridor__meter {
  position: absolute;
  z-index: 3;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: var(--wl-space-md);
  padding: 0 var(--wl-gutter) var(--wl-space-lg);
  pointer-events: none;
}

.wl-corridor__rail {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  background: rgb(255 255 255 / 18%);
}

.wl-corridor__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--wl-highlight);
  transition: width var(--wl-duration) var(--wl-ease);
}

.wl-corridor__count {
  font-size: var(--wl-text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wl-on-ink-soft);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .wl-corridor__track { scroll-behavior: auto; }

  .wl-corridor__nav,
  .wl-corridor__fill,
  .wl-corridor__mount { transition: none; }
}
