/* tour.html: the guided demo. Uses the tokens in site.css and the fonts in brand.css. */

body.tour { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

.tour-top {
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-3) var(--s-5);
  background: var(--bg); border-bottom: 1px solid var(--line);
  flex: none;
}
.tour-brand img { width: 30px; height: 30px; }
.tour-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--heading); text-decoration: none; }
.tour-brand .wordmark--bar { font-size: 14px; }
.tour-title {
  flex: 1; margin: 0;
  font-family: var(--font-heading); font-weight: 500;
  font-size: 1rem; letter-spacing: -0.01em; color: var(--heading);
  padding-left: var(--s-5); border-left: 1px solid var(--line-2);
}
.tour-site { flex: none; }
body.tour > .mode-banner { flex: none; }
body.tour > .mode-banner.mode-demo { display: none; }   /* each page in the pane shows its own */

.tour-main {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 360px minmax(0, 1fr);
}

/* --- step list ------------------------------------------------------------ */

.tour-side {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-2); border-right: 1px solid var(--line);
}
.tour-list { list-style: none; margin: 0; padding: var(--s-4); overflow-y: auto; flex: 1; min-height: 0; }
.tour-step { margin: 0 0 var(--s-1); border-radius: var(--radius); border: 1px solid transparent; }
.tour-step-btn {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: var(--s-2) var(--s-3); background: none; border: 0; cursor: pointer;
  color: var(--text-dim); text-align: left; font: inherit;
}
.tour-step-btn:hover { color: var(--heading); }
.tour-step-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); }
.tour-step-num {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border: 1px solid var(--line-3); border-radius: 50%;
  font-family: var(--font-heading); font-weight: 500; font-size: 0.8rem; color: var(--text-dim);
}
.tour-step-title { font-family: var(--font-heading); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.02em; }
.tour-step-text { display: none; margin: 0; padding: 0 var(--s-3) var(--s-3) calc(28px + var(--s-3) * 2); color: var(--text-dim); font-size: 0.875rem; line-height: 1.6; }
.tour-step.is-done .tour-step-num { border-color: var(--accent-line); color: var(--accent); }
.tour-step.is-current { background: var(--surface); border-color: var(--line-2); }
.tour-step.is-current .tour-step-btn { color: var(--heading); }
.tour-step.is-current .tour-step-num { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tour-step.is-current .tour-step-text { display: block; }

.tour-nav {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4); border-top: 1px solid var(--line);
}
.tour-nav .btn { min-width: 84px; justify-content: center; }
.tour-nav .btn-primary::after { content: none; }
.tour-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tour-dot {
  width: 10px; height: 10px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--line-3);
}
.tour-dot[aria-current="step"] { background: var(--accent); border-color: var(--accent); }
.tour-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tour-keys { flex: none; margin: 0; padding: 0 var(--s-4) var(--s-3); text-align: center; }

/* --- pane ----------------------------------------------------------------- */

.tour-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: var(--s-4); gap: var(--s-2); outline: none; }
.tour-pane-bar { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.tour-pane-label { font-family: var(--font-heading); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tour-pane-open { font-size: var(--fs-sm); }
.tour-stage {
  position: relative; flex: 1; min-height: 0;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tour-stage > [hidden] { display: none !important; }
.tour-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.tour-frame.is-loading { visibility: hidden; }
.tour-wait, .tour-fail { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s-6); text-align: center; }
.tour-fail { color: var(--red); background: var(--red-tint); }

.tour-video { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.tour-video video { display: block; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }

.tour-sponsors { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s-6); overflow-y: auto; background: var(--bg); }
.tour-sponsors-card { max-width: 560px; padding: var(--s-6); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); }
.tour-sponsors-card h2 { margin-top: var(--s-2); }
.tour-sponsors-card p { font-size: 1rem; }
.tour-sponsor-line { color: var(--text-dim); }

/* --- narrow screens: steps on top, the page below -------------------------- */

@media (max-width: 900px) {
  body.tour { height: auto; overflow: visible; }
  .tour-top { flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4); }
  .tour-brand img { width: 52px; height: 52px; }
  .tour-site { display: none; }
  .tour-title { flex-basis: 100%; order: 3; padding-left: 0; border-left: 0; font-size: 0.95rem; }
  .tour-main { display: block; }
  .tour-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .tour-list { padding: var(--s-3) var(--s-3) 0; overflow: visible; }
  .tour-step:not(.is-current) { display: none; }
  .tour-step-text { padding-left: var(--s-3); }
  .tour-nav { padding: var(--s-3); border-top: 0; }
  .tour-keys { display: none; }
  .tour-pane { padding: var(--s-3); }
  .tour-pane-bar { flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
  .tour-stage { flex: none; height: 75vh; height: 75dvh; }
  .tour-stage[data-kind="video"] { height: auto; aspect-ratio: 16 / 9; }
  .tour-stage[data-kind="sponsors"] { height: auto; }
  .tour-sponsors { position: static; padding: 0; }
  .tour-sponsors-card { border: 0; padding: var(--s-5); }
  .tour-sponsors-card p { font-size: 0.95rem; }
}
