/* Explore TrustyDr — public product tour.
   ---------------------------------------------------------------------------
   A provider should be able to see what they are signing up for before they
   create an account. This page is a guided walk through real screens, grouped
   by platform, with a CTA at the end of each track.

   Generated by scripts/build_explore.py from content/tour.json — the layout
   here never needs to change when a screenshot is added or replaced.

   Uses the site tokens in styles.css. No build step, no framework. */

.tourIntro { padding-bottom: 8px; }

.tourEyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--g2);
}

.tourTitle { margin: 0; font-size: 40px; letter-spacing: -.5px; }
.tourLead { margin: 10px 0 0; color: var(--muted); font-size: 17px; max-width: 60ch; }

.tourPick {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  margin: 8px 0 12px;
}

/* ── Platform picker ──────────────────────────────────────────────────── */

.tourTabs {
  display: grid;
  /* auto-fit, not a hard 3: tracks without published screenshots are not
     rendered, so the picker has to look right with one or two as well. */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.tourTab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: start;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.tourTab:hover { border-color: var(--g1); transform: translateY(-1px); }
.tourTab:focus-visible { outline: 2px solid var(--g2); outline-offset: 2px; }

.tourTab.is-active {
  border-color: var(--g1);
  box-shadow: 0 0 0 1px var(--g1) inset, var(--shadow);
}

.tourTabNote {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Steps ────────────────────────────────────────────────────────────── */

.tourSingleHead { margin: 4px 0 22px; }
.tourSingleName { margin: 0; font-size: 22px; letter-spacing: -.2px; }
.tourSingleNote { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.tourPanel[hidden] { display: none; }

.tourSteps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 26px;
}

.tourStep {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.tourStepHead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.tourStepNum {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--g2);
}

.tourStepTitle { margin: 0; font-size: 20px; letter-spacing: -.2px; }
.tourStepText { margin: 8px 0 16px; color: var(--muted); max-width: 70ch; }

/* Screenshots are wide UI captures: a fixed ratio keeps the page from
   jumping around as images load one after another. */
.tourShot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}

/* ── Zoom control ─────────────────────────────────────────────────────── */
/* A button, not a div with a click handler: screenshots are the substance of
   this page, and on a phone the scaled-down capture is unreadable without
   opening it. Keyboard and screen-reader users get the same affordance. */

.tourShotBtn {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
}

.tourShotBtn:focus-visible { outline: 2px solid var(--g2); outline-offset: 3px; }

.tourZoomHint {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.tourShotBtn:hover .tourZoomHint,
.tourShotBtn:focus-visible .tourZoomHint { opacity: 1; }

/* Touch devices have no hover, and the hint is the only cue that the image
   opens — so show it permanently there. */
@media (hover: none) {
  .tourZoomHint { opacity: 1; }
}

/* ── Lightbox ─────────────────────────────────────────────────────────── */

.tourLightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .82);
}

.tourLightbox[hidden] { display: none; }

.tourLightboxInner {
  position: relative;
  max-width: min(1400px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tourLightboxImg {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.tourLightboxCaption {
  margin: 0;
  color: #E2E8F0;
  font-size: 13px;
  text-align: center;
}

.tourLightboxClose {
  position: absolute;
  inset-block-start: -14px;
  inset-inline-end: -14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

.tourLightboxClose:focus-visible { outline: 2px solid var(--g2); outline-offset: 2px; }

body.tourLightboxOpen { overflow: hidden; }

@media (max-width: 520px) {
  .tourLightbox { padding: 12px; }
  .tourLightboxClose { inset-block-start: -6px; inset-inline-end: -6px; }
}

/* ── CTA ──────────────────────────────────────────────────────────────── */

.tourCta {
  margin: 32px 0 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(78, 198, 198, .16), rgba(74, 144, 226, .16));
  border: 1px solid var(--border);
  text-align: center;
}

.tourCtaTitle { margin: 0; font-size: 24px; }
.tourCtaText { margin: 8px auto 18px; color: var(--muted); max-width: 52ch; }
.tourCtaRow { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* The site's .btn styles assume the coloured header behind them; on this
   light background they need real borders. */
.tourCtaRow .btn.primary { background: var(--g2); color: #fff; }
.tourCtaRow .btn.ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .tourTitle { font-size: 32px; }
  .tourTabs { grid-template-columns: 1fr; gap: 10px; }
  .tourStep { padding: 16px; }
  .tourStepTitle { font-size: 18px; }
}

@media (max-width: 520px) {
  .tourTitle { font-size: 27px; }
  .tourLead { font-size: 15px; }
  .tourShot { aspect-ratio: 4 / 3; }
  .tourCta { padding: 20px; }
  .tourCtaTitle { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .tourTab { transition: none; }
  .tourTab:hover { transform: none; }
  .tourZoomHint { transition: none; }
}
