/* Product tour (js/tour.js): step tabs, a browser frame with crossfading screenshots, and the caption. */

.tour { margin-top: 56px; min-width: 0; }

.tour-tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 0 auto; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tour-tabs::-webkit-scrollbar { display: none; }

.tour-tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--soft); font-family: var(--sans); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; overflow: hidden; transition: background 0.2s ease, color 0.2s ease; }
.tour-tab:hover { color: var(--ink); background: var(--panel); }
.tour-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tour-tab.is-active { color: var(--ink); background: var(--accent-soft); }
.tour-num { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--mute); transition: color 0.2s ease; }
.tour-tab.is-active .tour-num { color: var(--accent); }

.tour-progress { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px; background: transparent; overflow: hidden; }
.tour-tab.is-active .tour-progress { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tour-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(var(--p, 0)); }

.tour-frame { margin-top: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }

.tour-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tour-dots { display: flex; gap: 7px; }
.tour-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.tour-url { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 14px; border-radius: 8px; background: var(--panel); color: var(--soft); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.tour-url svg { width: 12px; height: 12px; stroke: var(--ok); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tour-count { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tour-count::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tour.is-paused .tour-count::before { background: var(--mute); box-shadow: 0 0 0 3px var(--panel); }

.tour-view { position: relative; aspect-ratio: 1800 / 1012; background: var(--panel); overflow: hidden; }
.tour-view:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tour-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transform: scale(1.012); transition: opacity 0.7s ease, transform 6s cubic-bezier(0.2, 0.6, 0.2, 1); }
.tour-img.is-active { opacity: 1; transform: scale(1); }

.tour-caption { max-width: 760px; min-height: 3.1em; margin: 22px auto 0; text-align: center; font-size: 17px; line-height: 1.55; color: var(--soft); }

@media (max-width: 720px) {
  .tour { margin-top: 40px; }
  /* The row scrolls inside itself; the faded edges say there is more. */
  .tour-tabs { width: auto; margin: 0 -24px; padding: 4px 24px; background: transparent; border: 0; border-radius: 0; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
  .tour-tab { border: 1px solid var(--line); background: var(--surface); }
  .tour-tab.is-active { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
  .tour-tab { height: 38px; padding: 0 14px; font-size: 13.5px; }
  .tour-frame { margin-top: 16px; border-radius: 12px; }
  .tour-bar { grid-template-columns: auto 1fr; gap: 12px; height: 36px; padding: 0 12px; }
  .tour-dots { gap: 5px; }
  .tour-dots i { width: 8px; height: 8px; }
  .tour-url { justify-self: center; height: 22px; padding: 0 10px; font-size: 10.5px; }
  .tour-count { display: none; }
  .tour-caption { margin-top: 16px; font-size: 15.5px; text-align: left; min-height: 4.65em; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-progress { display: none; }
  .tour-img { transform: none; }
}
