/* css/tour.css — the guided tour (tour/tour.html, js/tour.js). Tokens only. */

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
}

/* The app, full screen, exactly as it looks (CEO: nothing dimmed). */
#tour-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Takes every click and tap; the wheel and touch moves scroll the app. */
#tour-shield {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  touch-action: none;
}

/* The drawn mouse pointer (computers) and the tap circle (every click). */
#tour-pointer {
  position: fixed;
  left: 0;
  top: 0;
  width: calc(var(--sp-5) + var(--sp-row));
  height: calc(var(--sp-5) + var(--sp-row));
  z-index: var(--z-popover);
  fill: var(--c-black);
  stroke: var(--c-white);
  stroke-width: 1.5;
  stroke-linejoin: round;
  pointer-events: none;
  transition: transform var(--t-slow);
  will-change: transform;            /* the same reason as #tour-box */
}
#tour-pointer.is-quick { transition: transform var(--t-med); }   /* menu rows */
#tour-pointer.no-anim { transition: none; }

#tour-tap {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sp-6);
  height: var(--sp-6);
  margin: calc(var(--sp-6) / -2) 0 0 calc(var(--sp-6) / -2);
  box-sizing: border-box;
  border-radius: var(--r-pill);
  border: var(--sp-row) solid var(--primary);
  z-index: var(--z-popover);
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;   /* the same reason as #tour-box */
}
#tour-tap.is-on { animation: tour-tap var(--t-slow); }
@keyframes tour-tap {
  from { opacity: 1; transform: scale(0.4); }
  to   { opacity: 0; transform: scale(1); }
}

/* The step box, in the look of the prompt panel. js/tour.js places it beside the feature. */
/* Computers: js/tour.js places the box with transform (translate, then the
   25 % to 100 % grow), from the top-left corner of the screen. */
#tour-box {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--z-modal);
  width: var(--tour-box-w);
  max-width: calc(100vw - 2 * var(--sp-5));
  box-sizing: border-box;
  padding: var(--sp-5);
  background: var(--bg2);
  color: var(--fg);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-menu);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fade), transform var(--t-fade);
  /* Its own layer for good: else Chrome gives it one only while it animates
     and takes it back after, and each change repaints the app under it. */
  will-change: transform, opacity;
}
/* Fades in and out over 1 s (js/tour.js adds and removes the class). */
#tour-box.is-shown { opacity: 1; pointer-events: auto; }
/* The fast move from the middle to the step's place. */
#tour-box.is-moving { transition: opacity var(--t-fade), transform var(--t-med); }
#tour-box.no-anim { transition: none; }
.tour-box-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
}
/* The same close button as the "How to use the prompt" panel (.pp-close). */
#tour-close {
  margin: calc(var(--sp-4) * -1) calc(var(--sp-4) * -1) 0 0;
  padding: var(--sp-4);
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  line-height: var(--lh-none);
  cursor: pointer;
}
#tour-close:hover { color: var(--fg); }
#tour-close svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
#tour-title {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}
#tour-text { margin: 0 0 var(--sp-4); }

.tour-box-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
}
.tour-nav { display: flex; gap: var(--sp-4); }
.tour-btn, .tour-signup { white-space: nowrap; }
/* The last box ("That's GammaLab"): as wide as its row of links needs.
   It stays in the middle (js/tour.js). */
#tour-box.is-end {
  width: max-content;
  min-width: var(--tour-box-w);
}
.tour-foot-left { display: flex; align-items: baseline; gap: var(--sp-5); }
#tour-count { font-size: var(--fs-xs); color: var(--muted); }
/* The last box has no count: the empty count would still take the gap and
   push "Sign up" off the left edge. */
#tour-count:empty { display: none; }

/* The site button (base.css), sized to its label. */
.tour-btn {
  padding: var(--sp-4) var(--sp-5);
  border: 0;
  border-radius: var(--r-btn);   /* the same corner as the landing page's trial button (CEO, 2026-11-17) */
  background: var(--button-bg);
  color: var(--button-fg);
  font: inherit;
  cursor: pointer;
}
.tour-btn:focus { outline: none; }
.tour-btn:hover { background: var(--button-ho); }
.tour-btn:disabled { opacity: var(--fade-near); cursor: default; }
.tour-primary { background: var(--primary); color: var(--on-primary); }
.tour-primary:hover { background: color-mix(in srgb, var(--primary), var(--c-black) 10%); }

.tour-signup {
  color: var(--c-landing-link);
  font-weight: var(--fw-bold);
  text-decoration: none;
}
.tour-signup:hover { text-decoration: underline; }

/* After Close: the app stays blocked, with a way back in, in the middle of the screen. */
#tour-closed {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-menu);
  white-space: nowrap;
}

#tour-error {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-modal);
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* Phones: the box is a sheet along the bottom of the screen. */
@media (max-width: 800px) {
  #tour-box,
  #tour-box.is-end {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    border-radius: var(--r-md) var(--r-md) 0 0;
  }
}
