/* The Atlas tour: one feature per screen. On a wide screen the stage is pinned and scrolling drives a
   red thread along the track at the bottom; when its head reaches a tick, that feature's screenshot is
   wiped open in step with the head and its sentence is written by the line (tour.js). On a phone, and
   without JS, the features simply follow each other, one per screen. Shared by / and /atlas/. */
.tour-frame { position: relative; }
.tour-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.tour-head .label { margin-bottom: 0; }
.tour-count { font: 400 var(--step--1) var(--mono); letter-spacing: .08em; color: var(--mist); font-variant-numeric: tabular-nums; }
.tour-count b { color: var(--fog); font-weight: 400; }

.tf { position: relative; display: grid; gap: var(--space-s); align-content: center; padding-block: var(--space-l); }
.tf .label { margin-bottom: .6em; }
.tf-n { color: var(--steel); }
.tf-say { font-weight: 800; font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.5rem); line-height: 1.04; letter-spacing: -.035em; max-width: 20ch; color: var(--fog); margin: 0; }
.tf-shot { position: relative; margin: 0; width: 100%; aspect-ratio: 16 / 10; }
.tf-shot img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: clamp(.45rem, .3rem + .5vw, .8rem); background: #0A0B0D; box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .8); }
/* the wipe's front edge: the thread stands up and pulls the picture open behind it */
.tf-edge { position: absolute; top: -.6rem; bottom: -.6rem; left: 0; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--red); opacity: 0; pointer-events: none; z-index: 2; box-shadow: 0 0 18px rgba(224, 40, 46, .55); }

.tour-track { display: none; }
.tour-bridge { display: flex; align-items: baseline; gap: .55em; margin: 0; font-weight: 600; font-size: var(--step-1); letter-spacing: -.015em; color: var(--mist); }
.tour-bridge b { color: var(--red); font-weight: 600; }
.lead + .tour-bridge { margin-top: var(--space-m); } /* /atlas/: the bridge from the hero into the tour */

/* JS: text is written by the line, pictures are wiped open */
.js [data-tw] { opacity: 0; }
.js .tf:not(.shown) .tf-shot img { clip-path: inset(0 100% 0 0); }
.tw-w { display: inline-block; }
.tw-bar { position: absolute; left: 0; top: 0; width: 0; border-radius: 9px; background: var(--red); pointer-events: none; z-index: 40; }

@media (min-width: 761px) {
  .tf { grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr); gap: var(--space-l); align-items: center; }
  .tf-copy { order: 0; }
  .tf-shot { width: min(100%, calc((100svh - 19rem) * 1.6)); justify-self: end; }

  /* pinned: the section is tall, its stage stays on screen while the scroll scrubs the thread */
  .js .tour { height: 340svh; } /* was 640svh: 8 features in ~3.4 screens of scroll, so nobody feels held */
  .js .tour-pin { position: sticky; top: 0; height: 100svh; min-height: 0; overflow: hidden; padding-block: 0; }
  .js .tour-frame { flex: 1; height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: var(--space-s); padding-top: 6.2rem; padding-bottom: var(--space-m); }
  .js .tour:not(.scene) .tour-frame { padding-top: var(--space-m); } /* /atlas/ has no fixed nav above it */
  .js .tour-stage { position: relative; min-height: 0; }
  .js .tf { position: absolute; inset: 0; min-height: 0; padding: 0; visibility: hidden; will-change: transform, opacity; }
  .js .tf.vis { visibility: visible; }
  .js .tf-n { display: none; }

  .js .tour-track { display: block; position: relative; height: 2.6rem; }
  .tt-line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-d, rgba(234, 237, 240, .14)); }
  .tt-thread { position: absolute; left: 0; top: -1px; width: 0; height: 3px; border-radius: 3px; background: var(--red); }
  .tt-thread::after { content: ""; position: absolute; right: -4px; top: -3.5px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 14px 2px rgba(224, 40, 46, .6); }
  .tt-tick { position: absolute; top: 0; left: calc((var(--k) + .15) / 8 * 100%); }
  .tt-tick::before { content: ""; position: absolute; left: -.5px; top: -5px; width: 1px; height: 11px; background: var(--steel); transition: background .4s var(--ease); }
  .tt-tick b { position: absolute; left: 0; top: .9rem; transform: translateX(-50%); font: 400 var(--step--1) var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--steel); transition: color .4s var(--ease); }
  .tt-tick.on::before { background: var(--red); }
  .tt-tick.on b { color: var(--mist); }
  .tt-tick.now b { color: var(--fog); }
}
@media (max-width: 760px) {
  .tour-count { display: none; }
  .tf-shot { order: -1; }
}

/* jump around the tour: the ticks take you to a feature, "skip" takes you past it */
.tt-tick { cursor: pointer; }
.tour-skip { font: inherit; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .3em; }
.tour-skip:hover { color: var(--fog); }
