/* 04 WESTPUNT — the road camera.
   The only push-in on the site: the frame is pinned and the photograph is
   driven forward, as if the camera were mounted between the seats. The route
   read-out sits beside it as editorial type, not as a fake navigation app. */

.camera {
  position: relative;
  z-index: 1;
}
.camera__track { height: 220vh; }

/* The photograph and the read-out are two sticky layers, one over the other,
   so the road can run between them: over the interior photograph, under the
   headline and the read-out (see route.css). */
.camera__over {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  color: var(--offwhite);
  pointer-events: none;
}
.camera__pin {
  margin-top: -100svh;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: #06222d;
  color: var(--offwhite);
  display: grid;
}
.camera__shot {
  position: absolute;
  inset: -6%;
  z-index: 0;
  will-change: transform;
}
.camera__shot img { width: 100%; height: 100%; object-fit: cover; }
.camera__pin::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(4,26,35,0) 38%, rgba(4,26,35,.62) 100%),
    linear-gradient(to top, rgba(4,26,35,.7), rgba(4,26,35,0) 46%);
}

.camera__body {
  position: relative;
  z-index: 2;
  align-self: end;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--gut) clamp(2.4rem, 8vh, 5rem);
  display: grid;
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: end;
}
.camera__body h2 {
  font-size: var(--t-xl);
  line-height: .84;
  text-shadow: 0 16px 50px rgba(4,26,35,.5);
}
.camera__body h2 span { display: block; }
.camera__body h2 span:nth-child(2) { padding-inline-start: .3em; }
.camera__body h2 span:nth-child(3) { padding-inline-start: .6em; color: var(--sun); }

/* the read-out — deliberately typographic */
.readout {
  display: grid;
  gap: .9rem;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: rgba(6, 34, 45, .5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(205, 239, 255, .18);
  min-width: min(100%, 280px);
}
.readout__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--t-micro);
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(205, 239, 255, .72);
}
.readout__row b {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: -.01em;
  color: var(--offwhite);
}
.readout__km b { color: var(--sun); }
.readout__bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(205, 239, 255, .22);
  overflow: hidden;
}
.readout__bar i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: 2px;
  background: var(--sun);
  transition: width .25s linear;
}

@media (min-width: 900px) {
  .camera__body { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  .camera__track { height: auto; }
  .camera__pin { position: static; height: 82svh; }
  .camera__shot { inset: 0; transform: none !important; }
}
