/* Marketing product tour.
 * .pt-*  the tour shell (marketing tokens from landing.css)
 * .pa-*  the staff-app recreation inside the scaled canvas. It mirrors the
 *        real staff UI (Tailwind slate palette, system font) on purpose, so
 *        it deliberately does NOT use the marketing fonts. */

/* ════════ Tour shell ════════ */
.pt-section { padding-bottom: 72px; overflow: clip; }
.pt-sh { margin-bottom: 36px; }
.pt-wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

.pt-stage {
  display: grid;
  grid-template-columns: 292px minmax(0, calc((100vh - 316px) * 1.6));
  justify-content: center; gap: 28px;
  align-items: start; position: relative; outline: none;
}
#tour { scroll-margin-top: 40px; }
.pt-anchor { display: block; height: 0; scroll-margin-top: 84px; }

.pt-rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 18px; }
.pt-chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-chap-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; cursor: pointer; text-align: left;
  padding: 9px 12px; border-radius: 11px;
  font: 600 15px/1.2 var(--f-sans); color: var(--ink); letter-spacing: -0.01em;
}
.pt-chap-btn:hover { background: var(--paper-2); }
.pt-chap-num { font: 500 11px var(--f-mono); color: var(--ink-4); width: 18px; }
.pt-chap.is-on .pt-chap-btn { background: var(--ink); color: var(--paper); }
.pt-chap-steps { list-style: none; margin: 4px 0 8px; padding: 0 0 0 40px; display: none; }
.pt-chap.is-on .pt-chap-steps { display: block; }
.pt-step-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: none; cursor: pointer; text-align: left;
  padding: 5px 8px; border-radius: 8px;
  font: 450 13px/1.3 var(--f-sans); color: var(--ink-3);
}
.pt-step-btn:hover { background: var(--paper-2); color: var(--ink); }
.pt-step-btn::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--ink-4);
}
.pt-step.is-done .pt-step-btn::before { background: var(--accent); border-color: var(--accent); }
.pt-step.is-on .pt-step-btn { color: var(--ink); font-weight: 600; background: var(--paper-3); }
.pt-step.is-on .pt-step-btn::before { border-color: var(--ink); background: var(--ink); }

.pt-caption {
  background: var(--white); border: 1px solid var(--paper-3); border-radius: var(--radius);
  padding: 18px 18px 20px; box-shadow: var(--shadow-md); min-height: 176px;
}
.pt-caption-kicker { font: 500 10.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-caption-title { font: 600 21px/1.15 var(--f-display); letter-spacing: -0.018em; margin: 8px 0 8px; text-wrap: balance; }
.pt-caption-body { font-size: 14.5px; line-height: 1.55; color: var(--ink-3); margin: 0; }
.pt-caption-hint {
  margin-top: 14px; padding: 9px 11px; border-radius: 10px;
  background: color-mix(in oklab, var(--accent) 9%, white);
  color: #065F46; font-size: 13px; line-height: 1.45;
}
.pt-caption.is-swap .pt-caption-title, .pt-caption.is-swap .pt-caption-body { animation: pt-fade .35s ease both; }
@keyframes pt-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.pt-main { min-width: 0; }
.pt-window {
  background: var(--white); border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 40px 80px -36px rgba(15,23,42,.35), 0 12px 24px -12px rgba(15,23,42,.12);
}
.pt-window-bar {
  display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px;
  background: #F1EDE4; border-bottom: 1px solid rgba(15,23,42,.08);
}
.pt-dots { display: flex; gap: 6px; }
.pt-dots i { width: 10px; height: 10px; border-radius: 50%; background: #D8D0BF; display: block; }
.pt-url {
  flex: 1; max-width: 460px; margin: 0 auto; text-align: center;
  font: 450 12px var(--f-mono); color: var(--ink-3);
  background: rgba(255,255,255,.7); border-radius: 7px; padding: 4px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-url-lock { color: var(--accent); font-size: 8px; vertical-align: 2px; }
.pt-live-tag { font: 500 10.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

.pt-viewport { position: relative; overflow: hidden; background: #F8FAFC; aspect-ratio: 1280 / 800; }
.pa-canvas { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; transform-origin: 0 0; }
.pt-paused-badge {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px 12px;
  font: 500 12px var(--f-sans); box-shadow: var(--shadow-md); pointer-events: none;
}

.pt-controls { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pt-ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font: 500 14.5px var(--f-sans); color: var(--ink);
  background: var(--white); border: 1px solid rgba(15,23,42,.16);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pt-ctl:hover { border-color: var(--ink); }
.pt-ctl:disabled { opacity: .4; cursor: default; border-color: rgba(15,23,42,.16); }
.pt-ctl svg { width: 17px; height: 17px; flex: none; }
.pt-ctl-icon { width: 40px; padding: 0; }
.pt-ctl-next { background: var(--ink); color: var(--paper); border-color: var(--ink); padding-right: 12px; }
.pt-ctl-next:hover { background: var(--accent); border-color: var(--accent); }
.pt-ctl-next.is-pulse { animation: pt-pulse 1.8s ease-in-out infinite; }
@keyframes pt-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); } 50% { box-shadow: 0 0 0 6px rgba(5,150,105,.18); } }
.pt-ctl-play { min-width: 96px; }
.pt-ctl-play .pt-i-pause, .pt-stage.is-playing .pt-ctl-play .pt-i-play { display: none; }
.pt-stage.is-playing .pt-ctl-play .pt-i-pause { display: block; }
.pt-stage.is-playing .pt-ctl-play { border-color: var(--accent); color: #065F46; }
.pt-i-shrink { display: none; }
.pt-stage.is-fullscreen .pt-i-shrink { display: block; }
.pt-stage.is-fullscreen .pt-i-expand { display: none; }

.pt-progress { flex: 1; min-width: 120px; display: flex; gap: 4px; margin: 0 8px; }
.pt-seg { flex: 1; height: 4px; border-radius: 4px; background: rgba(15,23,42,.1); overflow: hidden; position: relative; cursor: pointer; }
.pt-seg.is-gap { margin-left: 8px; }
.pt-seg-fill { position: absolute; inset: 0; width: 0; background: var(--ink); border-radius: 4px; }
.pt-seg.is-done .pt-seg-fill { width: 100%; background: var(--accent); }
.pt-seg.is-on .pt-seg-fill { width: 100%; }
.pt-stage.is-playing .pt-seg.is-on.is-dwell .pt-seg-fill { width: 0; animation: pt-dwell var(--dwell, 4s) linear forwards; }
@keyframes pt-dwell { to { width: 100%; } }
.pt-count { font: 500 12px var(--f-mono); color: var(--ink-3); min-width: 46px; text-align: right; }
.pt-keys { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-4); }
.pt-keys kbd {
  font: 500 11px var(--f-mono); color: var(--ink-3); background: var(--white);
  border: 1px solid var(--paper-3); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px;
}

.pt-end {
  position: absolute; inset: 0; z-index: 30; display: grid; place-items: start center; padding-top: 120px;
  background: color-mix(in oklab, var(--paper) 72%, transparent); backdrop-filter: blur(3px);
  border-radius: 16px;
}
.pt-end[hidden] { display: none; }
.pt-end-card {
  max-width: 520px; background: var(--white); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--paper-3);
}
.pt-end-card h3 { font: 600 30px/1.1 var(--f-display); letter-spacing: -0.02em; margin: 12px 0 10px; }
.pt-end-card p { color: var(--ink-3); margin: 0 0 22px; }
.pt-end-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pt-between [data-tour-between-done] { text-transform: uppercase; }
.pt-between-go { position: relative; overflow: hidden; }
/* On autoplay the button fills up while the next tab is about to start. */
.pt-between-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
.pt-between.is-counting .pt-between-bar { animation: pt-between-fill 6.5s linear forwards; }
@keyframes pt-between-fill { to { width: 100%; } }
.pt-end-close { border: 0; background: none; color: var(--ink-3); font: 500 14px var(--f-sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Present mode: the stage fills the screen like a slide deck. */
.pt-stage.is-fullscreen {
  background: var(--paper); padding: 28px 32px; height: 100vh; overflow: hidden;
  grid-template-columns: 320px minmax(0, 1fr); align-items: center;
}
.pt-stage.is-fullscreen .pt-rail { position: static; }
.pt-stage.is-fullscreen .pt-main { max-width: calc((100vh - 150px) * 1.6); width: 100%; margin: 0 auto; }
.pt-stage.is-fullscreen .pt-caption-title { font-size: 26px; }
.pt-stage.is-fullscreen .pt-caption-body { font-size: 16px; }
.pt-stage.is-fullscreen .pt-keys { display: none; }

@media (max-width: 1080px) {
  .pt-stage { grid-template-columns: minmax(0, 1fr); }
  .pt-rail { position: static; order: 2; }
  .pt-chapters { flex-direction: row; gap: 6px; overflow-x: auto; }
  .pt-chap-steps { display: none !important; }
  .pt-chap-btn { white-space: nowrap; border: 1px solid var(--paper-3); }
  .pt-caption { min-height: 0; }
  .pt-main { order: 1; }
}
@media (max-width: 640px) {
  .pt-wrap { padding: 0 16px; }
  .pt-url { display: none; }
  .pt-progress { order: 10; flex-basis: 100%; margin: 6px 0 0; }
  .pt-keys { display: none; }
  .pt-ctl-play { min-width: 0; }
  [data-tour-restart] { display: none; }
}

.pt-stage.is-fullscreen { position: fixed; inset: 0; z-index: 100; }
.pt-stage.is-fullscreen .pt-end { border-radius: 0; }

/* ════════ Recorded app frame ════════ */
.pa-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.pa-cursor {
  position: absolute; left: 0; top: 0; z-index: 5; width: 26px; height: 30px; pointer-events: none;
  transition: transform .7s cubic-bezier(.45,.05,.25,1), opacity .3s ease; opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(15,23,42,.35));
}
.pa-cursor.is-on { opacity: 1; }

.pt-stage.is-loading .pt-viewport::before,
.pt-stage.is-failed .pt-viewport::before {
  content: "Loading the tour…"; position: absolute; inset: 0; z-index: 6; display: grid; place-items: center;
  font: 500 13px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4);
  background: linear-gradient(100deg, #F8FAFC 30%, #EEF2F6 50%, #F8FAFC 70%) 0 0 / 200% 100%;
  animation: pt-shimmer 1.4s linear infinite;
}
.pt-stage.is-failed .pt-viewport::before { content: "The tour couldn't load right now. Please refresh to try again."; animation: none; }
@keyframes pt-shimmer { to { background-position: -200% 0; } }

/* ════════ Product tabs ════════ */
.pt-products {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px;
}
.pt-product {
  text-align: left; cursor: pointer; border-radius: 12px; padding: 10px 14px;
  background: var(--white); border: 1px solid var(--paper-3); color: var(--ink);
  display: flex; flex-direction: column; gap: 3px; font-family: var(--f-sans);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pt-products.has-quick { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pt-product.is-quick { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pt-product.is-quick .pt-product-blurb, .pt-product.is-quick .pt-product-meta { color: rgba(255,255,255,.7); }
.pt-product.is-quick.is-on { box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.pt-product:hover { border-color: rgba(15,23,42,.35); }
.pt-product.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow-md); }
.pt-product-module { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pt-product.is-planned .pt-product-module { color: var(--ink-4); }
.pt-product-title { font: 600 16px/1.2 var(--f-display); letter-spacing: -0.012em; }
.pt-product-blurb { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-product-meta { position: absolute; top: 10px; right: 12px; font: 500 10.5px var(--f-mono); color: var(--ink-4); }
.pt-product { position: relative; }
.pt-product.is-planned { background: transparent; border-style: dashed; }
.pt-chap.is-planned .pt-chap-btn { cursor: default; color: var(--ink-4); font-weight: 500; }
.pt-chap.is-planned .pt-chap-btn:hover { background: none; }
.pt-chap.is-planned small { margin-left: auto; font: 500 10px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); border: 1px dashed var(--paper-3); border-radius: 999px; padding: 1px 7px; }

/* Planned-only product: the outline replaces the window. */
.pt-stage.is-planned-only .pt-window, .pt-stage.is-planned-only .pt-controls, .pt-stage.is-planned-only .pt-keys { display: none; }
.pt-planned[hidden] { display: none; }
.pt-planned-card {
  border: 1px dashed rgba(15,23,42,.25); border-radius: 16px; padding: 40px; background: var(--paper);
  min-height: 420px;
}
.pt-planned-card h3 { font: 600 32px/1.1 var(--f-display); letter-spacing: -0.02em; margin: 14px 0 8px; }
.pt-planned-card p { color: var(--ink-3); margin: 0 0 22px; max-width: 52ch; }
.pt-planned-card ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; counter-reset: pl; }
.pt-planned-card li { counter-increment: pl; background: var(--white); border: 1px solid var(--paper-3); border-radius: 12px; padding: 14px 16px; font-weight: 500; }
.pt-planned-card li::before { content: counter(pl, decimal-leading-zero) "  "; font: 500 11px var(--f-mono); color: var(--ink-4); }

/* ════════ Phone tours ════════ */
.pt-phone-status { display: none; }
.pt-stage.is-phone .pt-main { display: flex; flex-direction: column; align-items: center; }
.pt-stage.is-phone .pt-window {
  position: relative; padding: 12px; border-radius: 52px; background: #0F172A; border: 0;
  box-shadow: 0 0 0 2px #334155 inset, 0 40px 80px -30px rgba(15,23,42,.5), 0 14px 30px -14px rgba(15,23,42,.35);
}
.pt-stage.is-phone .pt-window-bar { display: none; }
.pt-stage.is-phone .pt-viewport { border-radius: 0 0 40px 40px; overflow: hidden; }
/* The app lays out under a real status bar via safe-area insets, which are 0
   in an iframe; this strip stands in for it at the same scale as the app. */
.pt-stage.is-phone .pt-phone-status {
  display: flex; align-items: center; justify-content: space-between; position: relative;
  height: calc(50px * var(--pt-scale, .8)); padding: 0 calc(30px * var(--pt-scale, .8));
  background: #fff; border-radius: 40px 40px 0 0; color: #0F172A;
  font: 600 calc(15px * var(--pt-scale, .8)) -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}
.pt-phone-island {
  position: absolute; left: 50%; top: calc(11px * var(--pt-scale, .8)); transform: translateX(-50%);
  width: calc(110px * var(--pt-scale, .8)); height: calc(30px * var(--pt-scale, .8)); border-radius: 999px; background: #0F172A;
}
.pt-phone-icons { display: flex; align-items: flex-end; gap: calc(2px * var(--pt-scale, .8)); }
.pt-phone-icons i { width: calc(3px * var(--pt-scale, .8)); background: #0F172A; border-radius: 1px; }
.pt-phone-icons i:nth-child(1) { height: calc(5px * var(--pt-scale, .8)); }
.pt-phone-icons i:nth-child(2) { height: calc(8px * var(--pt-scale, .8)); }
.pt-phone-icons i:nth-child(3) { height: calc(11px * var(--pt-scale, .8)); }
.pt-phone-icons b { margin-left: calc(6px * var(--pt-scale, .8)); width: calc(22px * var(--pt-scale, .8)); height: calc(11px * var(--pt-scale, .8)); border: 1.5px solid #0F172A; border-radius: 3px; box-shadow: inset 0 0 0 1.5px #fff; background: #0F172A; }
.pt-stage.is-phone .pt-controls { width: 100%; }

@media (max-width: 1080px) {
  .pt-products, .pt-products.has-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-product.is-quick { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .pt-products { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 16px; padding: 0 16px; }
  .pt-product { flex: 0 0 72%; scroll-snap-align: start; }
  .pt-product-blurb { display: none; }
  .pt-planned-card { padding: 24px; }
  .pt-planned-card ol { grid-template-columns: 1fr; }
}
