/* The tour under Ask. It reuses Ask's tokens (ask.css :root): the light page,
   the dark island and the pink action colour. One player is the lead element;
   the list is its chapter index and carries every feature's release status. */

/* Ask stays a full first screen; the tour starts below it. */
.stage { min-height: 100vh; min-height: 100svh; }

.tour-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  color: var(--page-muted); font-size: 13px; font-weight: 600; text-decoration: none; pointer-events: auto;
  transition: color 160ms, background-color 160ms, opacity 300ms var(--ease);
}
.tour-hint:hover, .tour-hint:focus-visible { color: var(--page-ink); background: rgba(255, 255, 255, .7); }
.tour-hint:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.tour-hint svg { transition: transform 200ms var(--ease); }
.tour-hint:hover svg { transform: translateY(2px); }
.stage.answered .tour-hint, .stage.capsule .tour-hint, .busy .tour-hint { opacity: 0; pointer-events: none; }

.tour {
  position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 104px 24px 96px; scroll-margin-top: 0;
}
.tour-head { max-width: 720px; margin: 0 0 48px; }
.tour-kicker { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--page-muted); }
.tour h2 {
  margin: 0; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400;
  font-size: clamp(40px, 5.6vw, 68px); line-height: 1; letter-spacing: -.01em; color: var(--page-ink);
}
.tour-lede { margin: 18px 0 0; max-width: 560px; font-size: 17px; line-height: 1.55; color: var(--page-muted); }

.tour-body { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 40px; align-items: start; }

/* The index: plain rows, no boxes. The selected row becomes a white pill. */
.tour-list { list-style: none; margin: 0; padding: 0; }
.tour-group {
  margin: 22px 0 6px; padding: 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--page-muted);
}
.tour-group:first-child { margin-top: 0; }
.tour-item {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  padding: 8px 12px; border: 0; border-radius: 12px; overflow: hidden;
  background: transparent; color: var(--page-ink); text-align: left; font-size: 15px; font-weight: 500;
  transition: background-color 140ms, box-shadow 140ms;
}
.tour-item-name { flex: 1; min-width: 0; }
.tour-item:hover { background: rgba(255, 255, 255, .55); }
.tour-item:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
.tour-item.on {
  background: #FFF; font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 18, 15, .05), 0 8px 22px rgba(20, 18, 15, .08);
}
/* How far the current video has played: tells that the tour moves on by itself. */
.tour-progress {
  position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px;
  background: var(--action); transform-origin: left; transform: scaleX(var(--p, 0)); opacity: 0;
}
.tour-item.on.has-video .tour-progress { opacity: 1; }

/* Status marks: filled = available, half = next release, ring = in development. */
.mark { flex: none; width: 9px; height: 9px; border-radius: 50%; box-sizing: border-box; }
.mark-ready { background: var(--page-ink); }
.mark-next { border: 1.5px solid var(--action); background: linear-gradient(90deg, var(--action) 50%, transparent 50%); }
.mark-dev { border: 1.5px solid var(--page-muted); }
.tour-legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 22px 0 0; padding: 0 12px; list-style: none;
  font-size: 13px; color: var(--page-muted);
}
.tour-legend li { display: flex; align-items: center; gap: 7px; }

/* The player: the dark island again, holding a Mac screen. */
.tour-screen {
  position: sticky; top: 80px; margin: 0; padding: 10px; /* top clears the fixed corner links */ border-radius: 30px; background: var(--bg); color: var(--ink);
  box-shadow: 0 2px 4px rgba(20, 18, 15, .06), 0 24px 60px rgba(20, 18, 15, .16);
}
.tour-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 21px; overflow: hidden; background: #0D0D0F; }
.tour-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tour-still {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(70% 80% at 50% 40%, #232329 0%, #0D0D0F 100%); text-align: center; padding: 24px;
}
.tour-still-name { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; color: var(--ink); }
.tour-still-note { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.tour-caption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; padding: 18px 16px 12px; }
.tour-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.tour-pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.pill-ready { background: rgba(255, 255, 255, .1); color: var(--ink2); }
.pill-next { background: rgba(201, 51, 132, .22); color: var(--link); }
.pill-dev { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); }
.tour-text { grid-column: 1; margin: 0; max-width: 620px; font-size: 15px; line-height: 1.55; color: var(--ink2); }
.tour-keys { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tour-keys kbd {
  min-width: 34px; padding: 6px 10px; border-radius: 8px; background: var(--kbd); color: var(--ink);
  font: 600 13px/1 var(--sans); text-align: center; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06), 0 1px 0 rgba(0, 0, 0, .4);
}

/* The way out: download and source. */
.tour-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 72px; justify-content: center; }
.tour-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color 160ms, box-shadow 160ms;
}
.tour-btn:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.tour-btn.primary { background: var(--bg); color: var(--ink); box-shadow: 0 8px 24px rgba(20, 18, 15, .18); }
.tour-btn.primary:hover { background: #000; }
.tour-btn.quiet { color: var(--page-ink); background: rgba(255, 255, 255, .72); border: 1px solid rgba(20, 20, 25, .08); }
.tour-btn.quiet:hover { background: #FFF; }
.tour-fine { flex-basis: 100%; margin: 4px 0 0; text-align: center; font-size: 13px; color: var(--page-muted); }

/* Phones and narrow windows: the player comes first, the index becomes a row of
   chips under it, so picking a feature never scrolls the video away. */
@media (max-width: 859px) {
  .tour { padding: 72px 16px 72px; }
  .tour-head { margin-bottom: 28px; }
  .tour-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tour-screen { position: relative; top: 0; order: -1; padding: 6px; border-radius: 22px; }
  .tour-frame { border-radius: 17px; }
  .tour-caption { grid-template-columns: minmax(0, 1fr); padding: 14px 10px 8px; }
  .tour-keys { grid-column: 1; grid-row: auto; }
  .tour-title { font-size: 19px; }
  .tour-list {
    display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px;
    margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding-inline: 16px; scrollbar-width: none;
  }
  .tour-list::-webkit-scrollbar { display: none; }
  .tour-group { display: none; }
  .tour-list li { flex: none; scroll-snap-align: start; }
  .tour-item { width: auto; min-height: 40px; border-radius: 999px; padding: 8px 14px; background: rgba(255, 255, 255, .5); white-space: nowrap; }
  .tour-progress { left: 14px; right: 14px; bottom: 4px; }
  .tour-legend { padding: 0; }
  .tour-cta { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-hint, .tour-hint svg, .tour-item, .tour-btn { transition: none; }
  .tour-progress { display: none; }
}
