/*
  Product tour — the dark "studio" page between the app reveal and the
  waitlist. The device does the explaining: it writes, highlights and
  erases on its own screen, shows its apps and opens one, hides the feed
  and brings it back, and turns to show its bare edge. Words are kept to
  one quiet line for the section, one small caption per chapter, and short
  labels pinned to the real part they name.

  Two forms share this file:
    .tour--live    pinned scene driven by scroll, real-time 3D
                   (.tour--wide on desktop, .tour--tall on phones and
                   upright tablets)
    .tour--static  stacked cards with pre-rendered images (reduced motion,
                   old browsers, very short screens)
*/

.tour {
  --tour-bg: #060d19;
  --tour-ink: #f2f6ff;
  --tour-ink-2: rgba(208, 221, 244, 0.8);
  --tour-ink-3: rgba(170, 188, 220, 0.56);
  --tour-line: rgba(160, 185, 230, 0.16);
  --tour-radius: 36px;
  --tour-gutter: clamp(40px, 6vw, 104px);
  position: relative;
  z-index: 36; /* above the fixed white panel (25) and the sticky hero stage (30) */
  background: var(--tour-bg);
  color: var(--tour-ink);
  border-radius: var(--tour-radius) var(--tour-radius) 0 0;
}

/* The waitlist slides over the end of the tour as a rounded sheet. */
.tour + .waitlist-anchor {
  z-index: 37;
  margin-top: calc(var(--tour-radius, 36px) * -1);
  border-radius: 36px 36px 0 0;
}

/* The status line doubles as a link to the waitlist form. */
a.nav-corner { text-decoration: none; }
a.nav-corner:hover { color: var(--ink); }
body.nav-on-dark a.nav-corner:hover { color: #f2f6ff; }
a.nav-corner:focus-visible { outline: 2px solid var(--pop); outline-offset: 4px; border-radius: 4px; }

/* Wordmark and status flip to light while the dark page is under them. */
.nav .wordmark,
.nav .nav-corner {
  transition: color 0.35s ease;
}
body.nav-on-dark .nav .wordmark { color: #f2f6ff; }
body.nav-on-dark .nav .wordmark::after {
  background: linear-gradient(90deg, #f2f6ff 0%, #f2f6ff 78%, var(--pop) 78%, var(--pop) 100%);
}
body.nav-on-dark .nav .nav-corner { color: rgba(208, 221, 244, 0.72); }

/* ── Words ───────────────────────────────────────────────── */
/* one quiet line for the whole section */
.tour-head {
  margin: 0;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 1.9vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--tour-ink);
}
/* a caption: a lead-in, then a plain sentence or two */
.tour-cap {
  margin: 0;
  max-width: 24em;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tour-ink-2);
  text-wrap: pretty;
}
.tour-cap b {
  color: var(--tour-ink);
  font-weight: 600;
}

/* ── Live: pinned scene ──────────────────────────────────── */
.tour-track { height: calc(100vh + 3 * 88vh); }
.tour-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-radius: var(--tour-radius) var(--tour-radius) 0 0;
}
.tour-canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.tour-canvas.is-ready { opacity: 1; }
/* the floor fades out at the bottom, so the scene hands over to what follows without an edge */
.tour-pin::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18vh;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 13, 25, 0), var(--tour-bg));
}
/* film grain keeps the dark gradients from banding */
.tour-pin::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.03;
}

/* the section's line sits under the wordmark for the whole tour (on a desktop it is about as wide
   as the caption's column, so it too is clear of the device) */
.tour--live .tour-head {
  position: absolute;
  z-index: 3;
  left: var(--tour-gutter);
  top: clamp(84px, 12vh, 124px);
  max-width: min(70vw, 22em);
}

/* The caption sits low on the left, above the steps, like a lower third. On a desktop the device
   is kept to the right of this column (see frames() in zeeb-tour.jsx), so the column gives way
   a little in a narrow window. */
.tour-caps {
  position: absolute;
  z-index: 3;
  left: var(--tour-gutter);
  bottom: calc(clamp(16px, 4.6vh, 42px) + 62px);
  width: min(24em, 30vw);
  font-size: 15px;
}
.tour--live .tour-cap {
  position: absolute;
  left: 0;
  bottom: 0;
  /* faded, not removed: every caption stays readable to screen readers */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tour--live .tour-cap.is-active {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease 0.15s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
}

.tour-steps {
  position: absolute;
  z-index: 3;
  left: var(--tour-gutter);
  bottom: clamp(16px, 4.6vh, 42px);
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tour-steps button {
  display: block;
  padding: 12px 0 14px;
  min-width: 64px;
  border: 0;
  border-top: 2px solid rgba(160, 185, 230, 0.22);
  background: none;
  color: var(--tour-ink-3);
  font: 500 13px/1 'Geist', system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.tour-steps button:hover { color: var(--tour-ink-2); }
.tour-steps button[aria-current="step"] {
  color: var(--tour-ink);
  border-top-color: var(--tour-ink);
}
.tour-steps li { padding-right: 14px; }
.tour-steps button:focus-visible,
.tour-ring:focus-visible {
  outline: 2px solid #8fb6ff;
  outline-offset: 3px;
}

/* ── Labels pinned to the device ─────────────────────────────
   Each is placed by a transform from a point on the device, projected to
   the screen every frame, and shown only while its part is the subject. */
.tour-pane,
.tour-tools,
.tour-ring,
.tour-callout {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  will-change: transform, opacity;
}
.tour-pane.is-on,
.tour-tools.is-on,
.tour-ring.is-on,
.tour-callout.is-on { opacity: 1; }

/* the app in the right-hand pane, named on the device's top edge */
.tour-pane {
  z-index: 2;
  margin: -36px 0 0 -70px;
  width: 140px;
  text-align: center;
  font: 500 13px/1 'Geist', system-ui, sans-serif;
  color: var(--tour-ink);
  white-space: nowrap;
}
.tour-pane::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 20px;
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.4);
}

/* the page's tool palette, lifted out: three tools, the one in use picked out and named.
   The name is on the left, so the copy never reaches past the device toward the window's edge. */
.tour-tools {
  z-index: 2;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  margin: -104px 0 0 -149px; /* hangs above the palette it copies, its three tools centred on it */
}
.tour-tools::after {
  content: "";
  position: absolute;
  left: 149px;
  top: 100%;
  width: 1px;
  height: 52px;
  margin-top: 8px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12));
}
.tour-tools-row {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.7);
}
.tour-tools-row .sel {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e6ecff;
  transition: transform 0.24s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.tour-tools-row svg {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 8px;
  color: #77777d;
  transition: color 0.2s ease;
}
.tour-tools-row svg.is-on { color: #1e3a8a; }
.tour-tools-name {
  width: 82px;
  text-align: right;
  font: 500 14px/1 'Geist', system-ui, sans-serif;
  color: var(--tour-ink);
}

/* a ring on the next thing to tap on the device: Hide, then the zeeb mark. It is a button. */
.tour-ring {
  z-index: 4;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tour-ring.is-on { pointer-events: auto; }
.tour-ring::before,
.tour-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  animation: tourRing 1.8s ease-out infinite;
}
.tour-ring::after { animation-delay: 0.9s; }
@keyframes tourRing {
  0% { transform: scale(0.35); opacity: 0.9; }
  100% { transform: scale(1.15); opacity: 0; }
}
/* its name sits clear of the screen: above the device for Hide, below it for the mark */
.tour-ring-name {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 34px);
  transform: translateX(-50%);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 16, 30, 0.9);
  font: 500 13px/1 'Geist', system-ui, sans-serif;
  color: var(--tour-ink);
  white-space: nowrap;
}
.tour-ring.is-mark .tour-ring-name {
  bottom: auto;
  top: calc(100% + 34px);
}

/* a callout on the bare edge */
.tour-callout {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--tour-ink);
}
.tour-callout .label {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 16, 30, 0.9);
}
.tour-callout .lead {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.75));
}
.tour-callout .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
}

/* ── Live, portrait ("tall"): phones and upright tablets ─────
   The same pinned scene with the device given most of the screen: the 3D
   takes the top 84% and the device sits in the middle of the phone, with the
   section's line above it and the caption and the steps below. Heights use
   svh so the layout holds still while a phone's browser bars slide in and out. */
.tour--tall { --tour-gutter: 20px; }
.tour--tall .tour-track {
  height: calc(100vh + 3 * 78vh);
  height: calc(100svh + 3 * 78svh);
}
.tour--tall .tour-pin {
  height: 100vh;
  height: 100svh;
}
.tour--tall .tour-pin::before { display: none; }
/* no film grain here: blending it over a canvas that changes every frame is costly on a phone */
.tour--tall .tour-pin::after { display: none; }
.tour--tall .tour-canvas {
  inset: 0 0 auto 0;
  height: 84%;
}
/* the floor fades out under the device instead of ending on a line */
.tour--tall .tour-canvas::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 30%;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 13, 25, 0), var(--tour-bg) 78%);
}
.tour--tall .tour-head {
  top: 72px;
  font-size: clamp(16px, 4.4vw, 22px);
}
.tour--tall .tour-caps {
  right: var(--tour-gutter);
  width: auto;
  bottom: 62px;
}
.tour--tall .tour-cap {
  max-width: 30em;
  font-size: 14px;
  line-height: 1.45;
}
.tour--tall .tour-steps {
  right: var(--tour-gutter);
  bottom: 6px;
  gap: 8px;
}
.tour--tall .tour-steps li { flex: 1 1 0; padding-right: 0; }
.tour--tall .tour-steps li:last-child { flex: 1.5 1 0; }
.tour--tall .tour-steps button { width: 100%; min-width: 0; padding: 12px 0 14px; white-space: nowrap; }
/* the palette's copy has a fixed place at the top right: the real one is small, or out of frame */
.tour--tall .tour-tools {
  left: auto;
  right: var(--tour-gutter);
  top: 112px;
  margin: 0;
  gap: 10px;
}
.tour--tall .tour-tools::after { display: none; }
.tour--tall .tour-tools-name { width: auto; font-size: 13px; }
.tour--tall .tour-tools-row .sel,
.tour--tall .tour-tools-row svg { width: 30px; height: 30px; }
.tour--tall .tour-tools-row svg { padding: 7px; }
.tour--tall .tour-ring-name { bottom: calc(100% + 18px); font-size: 12px; padding: 6px 10px; }
.tour--tall .tour-ring.is-mark .tour-ring-name { bottom: auto; top: calc(100% + 18px); }
/* the edge label sits on the back plate, pointing out to the edge */
.tour--tall .tour-callout { flex-direction: row-reverse; }
.tour--tall .tour-callout .lead {
  width: 34px;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.75));
}
/* The shortest screens (classes set by zeeb-tour.jsx from the height of the pinned box, which
   holds still, and not from a height media query, which on an iPhone flips as the browser's
   bars slide away). */
.tour--tall.tour--tiny .tour-cap { font-size: 13.5px; line-height: 1.4; }
.tour--tall.tour--tiny .tour-head { top: 66px; }
.tour--tall.tour--tiny .tour-tools { top: 100px; }
@media (min-width: 600px) {
  /* upright tablets: more air */
  .tour--tall { --tour-gutter: 9vw; }
  .tour--tall .tour-cap { font-size: 15px; }
}

/* ── Static: stacked cards ───────────────────────────────── */
.tour-cards {
  max-width: calc(1040px + 2 * clamp(20px, 5vw, 72px));
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) clamp(20px, 5vw, 72px) 0;
}
.tour-cards .tour-head { margin-bottom: clamp(28px, 4.5vw, 56px); }
.tour-card + .tour-card { margin-top: clamp(56px, 8vw, 104px); }
.tour-card .tour-cap { margin-top: 18px; }
.tour-shot {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
  border-radius: 22px;
  overflow: hidden;
  background: #0a1424;
  box-shadow: 0 0 0 1px rgba(160, 185, 230, 0.1);
}
.tour-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Hide is shown as a pair: before and after */
.tour-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 16px);
}

/* ── Three close-ups under the tour ──────────────────────── */
.tour-details {
  max-width: calc(1180px + 2 * var(--tour-gutter));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 136px) var(--tour-gutter) calc(clamp(72px, 9vw, 128px) + var(--tour-radius));
}
.tour-details-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tour-details figure { margin: 0; }
.tour-details img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 20px;
  background: #0a1424;
  box-shadow: 0 0 0 1px rgba(160, 185, 230, 0.1);
}
.tour-details figcaption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tour-ink-2);
}

@media (max-width: 768px) {
  .tour { --tour-radius: 28px; --tour-gutter: 20px; }
  .tour-cards { padding: 64px 20px 0; }
  .tour-card + .tour-card { margin-top: 56px; }
  .tour-shot { border-radius: 16px; }
  .tour-pair { gap: 8px; }
  .tour-pair .tour-shot { border-radius: 12px; }
  /* close-ups become a row you swipe through */
  .tour-details { padding: 64px 0 calc(72px + var(--tour-radius)); }
  .tour-details-list {
    display: flex;
    gap: 14px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tour-details-list::-webkit-scrollbar { display: none; }
  .tour-details-list li {
    flex: 0 0 74%;
    scroll-snap-align: start;
  }
  .tour-details img { border-radius: 16px; }
  .tour-details figcaption { margin-top: 12px; font-size: 13.5px; }
  .tour + .waitlist-anchor { border-radius: 28px 28px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-cap,
  .tour--live .tour-cap.is-active,
  .tour-canvas { transition: none; }
  .tour-ring::before,
  .tour-ring::after { animation: none; opacity: 0.6; transform: scale(0.8); }
}
