/* 02 WILLEMSTAD — the sideways chapter.
   The visitor keeps scrolling vertically; the scene is pinned and the whole
   city rail is driven horizontally past them, with the landmark words entering
   from the opposite side. Nothing here fades. */

.city {
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, var(--paper) 0%, #eef6fb 22%, #eef6fb 78%, var(--paper) 100%);
}

/* Two sticky layers share the pinned screen, one exactly over the other: the
   photo rail below the road, the landmark words above it. A single sticky frame
   is one stacking layer, so it could only put words AND photographs on the same
   side of the road. Each layer keeps a spacer where the other one's content
   sits, so the words land exactly where they were — above the rail. */
.city__over,
.city__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: clamp(1rem, 3vh, 2.2rem);
}
.city__over { pointer-events: none; }
.city__pin { margin-top: -100svh; }
/* one line of words: the font size below times the .82 line-height */
.city__words-space { height: calc(clamp(2.8rem, 9vw, 8.5rem) * .82); }
/* the rail is as tall as its tall frame plus the figures' 1em margins */
.city__rail-space { height: calc(clamp(260px, 56vh, 560px) + 2rem); }

/* the horizontal rail of frames */
.city__rail {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.6rem);
  padding-inline: var(--gut);
  width: max-content;
  will-change: transform;
}

.city__frame {
  position: relative;
  flex: none;
  border-radius: 16px;
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--shadow-card);
  height: clamp(220px, 46vh, 460px);
  aspect-ratio: 16 / 10;
}
.city__frame img { width: 100%; height: 100%; object-fit: cover; }
.city__frame--tall { aspect-ratio: 4 / 5; height: clamp(260px, 56vh, 560px); }

.city__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.6rem 1.1rem .95rem;
  background: linear-gradient(to top, rgba(6,44,58,.72), rgba(6,44,58,0));
  color: var(--offwhite);
  font-size: var(--t-micro);
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* the three words travel the other way */
.city__words {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 5vw, 4.5rem);
  width: max-content;
  padding-inline: var(--gut);
  font-family: var(--display);
  font-size: clamp(2.8rem, 9vw, 8.5rem);
  line-height: .82;
  text-transform: uppercase;
  letter-spacing: -.045em;
  will-change: transform;
}
.city__words span:nth-child(1) { color: var(--ink); }
.city__words span:nth-child(2) { color: var(--coral); }
.city__words span:nth-child(3) {
  color: transparent;
  -webkit-text-stroke: 2px var(--deep);
}

.city__intro {
  position: relative;
  z-index: 2;
  padding: var(--chapter) 0 0;
}
.city__intro .wrap { display: grid; gap: 1.4rem; max-width: 900px; }
.city__intro h2 { font-size: var(--t-xl); }
.city__intro h2 em { font-style: normal; color: var(--coral); }

.city__outro {
  position: relative;
  z-index: 2;
  padding: 0 0 var(--chapter);
}
.city__outro .wrap {
  display: grid;
  gap: 1.2rem;
  justify-items: start;
  max-width: 720px;
  margin-inline-start: auto;
  text-align: left;
}

/* the scroll length that the lateral move consumes */
.city__track { height: 260vh; }
@media (max-width: 767px) { .city__track { height: 190vh; } }

@media (prefers-reduced-motion: reduce) {
  .city__over, .city__pin { position: static; height: auto; }
  .city__over { padding-top: var(--chapter); }
  .city__pin { margin-top: 0; padding-block: clamp(1rem, 3vh, 2.2rem) var(--chapter); }
  .city__words-space, .city__rail-space { display: none; }
  .city__rail, .city__words {
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    transform: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .city__frame { scroll-snap-align: center; }
}
