/* Crewvector guided tour player — self-hosted replacement for Supademo demos. */
:root {
  --tour-accent: #4a8192;
  --tour-cta: #0693e3;
  --tour-bg: #0b1220;
  --tour-chrome: #ffffff;
  --tour-text: #1f2937;
  --tour-muted: #6b7280;
  --tour-radius: 12px;
  --tour-font: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #f3f4f6;
  color: var(--tour-text);
  font-family: var(--tour-font);
  font-size: 15px;
  line-height: 1.5;
}

.tour-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.tour-back {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--tour-muted);
  text-decoration: none;
  font-size: 14px;
}
.tour-back:hover { color: var(--tour-text); }

/* ---- top bar -------------------------------------------------------- */
.tour-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--tour-chrome);
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: var(--tour-radius) var(--tour-radius) 0 0;
}
.tour-topbar img { height: 28px; width: auto; }
.tour-topbar .tour-title { font-weight: 600; font-size: 16px; flex: 1; }
.tour-cta {
  background: var(--tour-cta);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
}
.tour-cta:hover { filter: brightness(1.08); }

/* ---- stage ---------------------------------------------------------- */
.tour-stage {
  background: var(--tour-bg);
  border: 1px solid #e5e7eb;
  border-radius: 0 0 var(--tour-radius) var(--tour-radius);
  overflow: hidden;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tour-stage:fullscreen {
  border: none;
  border-radius: 0;
  justify-content: center;
  width: 100vw;
  height: 100vh;
}

.tour-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--tour-bg);
  overflow: hidden;
  user-select: none;
}
.tour-stage:fullscreen .tour-frame {
  width: min(100vw, calc((100vh - 52px) * var(--tour-ratio, 1.6)));
}

.tour-progress {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: rgba(255,255,255,.15);
  z-index: 5;
}
.tour-progress-bar {
  height: 100%;
  width: 0;
  background: var(--tour-accent);
  transition: width .35s ease;
}

.tour-media { position: absolute; inset: 0; }
.tour-box {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: #000;
}
.tour-canvas {
  position: absolute; inset: 0;
  transform-origin: 0 0;
  transition: transform .5s ease;
}
.tour-canvas img,
.tour-canvas video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  object-fit: fill;
}

/* ---- hotspots ------------------------------------------------------- */
/* Highlighted area: dashed frame around the element, no dimming (matches the original demo). */
.tour-area {
  position: absolute;
  border: 2px dashed var(--tour-cta);
  border-radius: 8px;
  outline: 4px solid transparent;
  cursor: pointer;
  animation: tour-area-pulse 1.6s ease-in-out infinite;
}
@keyframes tour-area-pulse {
  0%, 100% { border-color: var(--tour-cta); }
  50% { border-color: #7cc6f2; }
}

.tour-dot {
  position: absolute;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--tour-accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  cursor: pointer;
}
.tour-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--tour-accent);
  animation: tour-ripple 1.6s ease-out infinite;
}
@keyframes tour-ripple {
  0%   { transform: scale(1);   opacity: .9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.tour-overlay { position: absolute; inset: 0; pointer-events: none; }

.tour-tip {
  position: absolute;
  pointer-events: auto;
  max-width: min(340px, 80%);
  background: var(--tour-accent);
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.tour-tip.is-visible { opacity: 1; transform: none; }
.tour-tip h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.tour-tip p { margin: 0; }
.tour-tip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  opacity: .95;
}
.tour-tip-arrows { display: inline-flex; gap: 6px; }
.tour-tip-prev, .tour-tip-next {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 34px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tour-tip-prev svg, .tour-tip-next svg { width: 18px; height: 18px; fill: currentColor; }
.tour-tip-prev:hover, .tour-tip-next:hover { background: rgba(255,255,255,.35); }

/* ---- cover / outro cards ------------------------------------------- */
.tour-card {
  position: absolute; inset: 0;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.tour-card-bg {
  position: absolute; inset: -30px;
  background-size: cover;
  background-position: top center;
  filter: blur(18px) brightness(.45);
}
.tour-card-body {
  position: relative;
  padding: 6% 8%;
  max-width: 62%;
}
.tour-card.is-center { justify-content: center; text-align: center; }
.tour-card.is-center .tour-card-body { max-width: 70%; }
.tour-card-logo { height: 56px; width: auto; margin-bottom: 20px; }
.tour-card h1 {
  margin: 0 0 14px;
  font-size: clamp(20px, 3.4vw, 38px);
  line-height: 1.15;
}
.tour-card p, .tour-card li { font-size: clamp(14px, 1.6vw, 18px); }
.tour-card ul { padding-left: 1.2em; margin: .4em 0; text-align: left; }
.tour-card .tour-card-btn {
  display: inline-block;
  margin-top: 18px;
  background: var(--tour-cta);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(14px, 1.5vw, 17px);
  padding: 12px 26px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.tour-card .tour-card-btn.is-accent { background: var(--tour-accent); }
.tour-card .tour-card-btn.is-skip { background: rgba(255,255,255,.18); }
.tour-card .tour-card-btn:hover { filter: brightness(1.08); }

/* ---- controls ------------------------------------------------------- */
.tour-nav {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #111827;
  color: #e5e7eb;
  border-top: 1px solid rgba(255,255,255,.08);
}
.tour-stage:fullscreen .tour-nav { width: min(100vw, calc((100vh - 52px) * var(--tour-ratio, 1.6))); }
.tour-nav .tour-spacer { flex: 1; }
.tour-counter { font-size: 13px; min-width: 56px; text-align: center; color: #cbd5e1; }
.tour-btn {
  background: transparent;
  border: none;
  color: #e5e7eb;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tour-btn:hover { background: rgba(255,255,255,.1); }
.tour-btn:disabled { opacity: .3; cursor: default; background: transparent; }
.tour-btn svg { width: 20px; height: 20px; fill: currentColor; }
.tour-btn.is-off { color: #94a3b8; }

/* ---- step index below the player ------------------------------------ */
.tour-steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.tour-steps li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.tour-steps li:hover { background: #fff; }
.tour-steps li.is-active { background: #fff; box-shadow: inset 3px 0 0 var(--tour-accent); }
.tour-steps li::before {
  content: counter(step);
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tour-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tour-steps b { display: block; }
.tour-steps span { color: var(--tour-muted); font-size: 14px; }

@media (max-width: 640px) {
  .tour-page { padding: 8px; }
  .tour-topbar .tour-title { font-size: 14px; }
  .tour-tip { font-size: 12px; padding: 10px 12px 8px; }
  .tour-tip h3 { font-size: 13px; }
  .tour-card-body { max-width: 90%; }
}
