/* =====================================================================
   FlyForms — product tour with the real app screenshots
   Design 1 is on the home page; tour-variations.html shows designs 1–7.
   ===================================================================== */

.tv { --tv-primary: #7147eb; --tv-ink: #17131f; --tv-grey: #6f6a66; --tv-ease: cubic-bezier(.2, .7, .2, 1); color: var(--tv-ink); }
.tv-ico { width: 16px; height: 16px; flex: none; }
.tv-shot { display: block; width: 100%; height: auto; }

/* Tabs: the site's pill switcher */
.tv-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: fit-content; max-width: 100%;
  margin-inline: auto; padding: 4px; border-radius: 12px; background: #fff;
  box-shadow: 0 3px 3px rgb(209 205 199 / .24), inset 0 -2px 0 rgb(240 240 239 / .7), 0 1px 2px rgb(178 170 158 / .32), 0 0 0 1px #efede8;
}
.tv-tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--tv-grey); transition: background-color .2s, color .2s;
}
.tv-tabs button:hover { color: var(--tv-ink); }
.tv-tabs button[aria-selected=true] { background: #2d2d2d; color: #fbfaf9; box-shadow: 0 12px 24px -6px rgb(45 32 17 / .4), inset 0 -2px 0 #000; }

/* Panels share one grid cell and cross-fade */
.tv-stage { display: grid; margin-top: 28px; }
.tv-panel {
  grid-area: 1 / 1; margin: 0; min-width: 0;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .5s ease, transform .7s var(--tv-ease), visibility 0s linear .5s;
}
.tv-panel[data-active] { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.tv-cap { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 14.5px; color: var(--tv-grey); }
.tv-cap .tv-ico { color: var(--tv-primary); }

/* ---------- 1 · full-colour panel ---------- */
.tv-1 .tv-canvas {
  position: relative; overflow: hidden; isolation: isolate;
  height: clamp(300px, 44vw, 600px); padding: clamp(28px, 5vw, 64px) clamp(18px, 6vw, 84px) 0;
  border-radius: clamp(20px, 2.4vw, 32px);
  background: radial-gradient(80% 70% at 50% 0%, rgb(255 255 255 / .22), transparent 60%), linear-gradient(160deg, #8462f0 0%, #7147eb 45%, #4f2cc9 100%);
}
.tv-1 .tv-canvas::before {      /* a faint grid, fading downward */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgb(255 255 255 / .08) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(#000, transparent 75%); mask-image: linear-gradient(#000, transparent 75%);
}
.tv-1 .tv-shot {
  border-radius: 14px 14px 0 0; border: 1px solid rgb(255 255 255 / .35); border-bottom: 0;
  box-shadow: 0 40px 90px -30px rgb(20 8 60 / .75), 0 0 0 6px rgb(255 255 255 / .1);
  transform: translateY(30px); transition: transform .9s var(--tv-ease);
}
.tv-1 .tv-panel[data-active] .tv-shot { transform: none; }

/* ---------- 2 · a colour for each screen ---------- */
.tv-tabs-line { background: none; box-shadow: none; gap: 6px 26px; padding: 0; border-radius: 0; }
.tv-tabs-line button { padding: 10px 2px; border-radius: 0; border-bottom: 2px solid transparent; }
.tv-tabs-line button[aria-selected=true] { background: none; box-shadow: none; color: var(--tv-ink); border-color: var(--tv-primary); }
.tv-tabs-line button[aria-selected=true] .tv-ico { color: var(--tv-primary); }
.tv-tone-violet  { --tone-a: #8b6cf2; --tone-b: #5a34d6; --tone-soft: #f2eeff; --tone-ink: #5732d4; }
.tv-tone-sky     { --tone-a: #38bdf8; --tone-b: #0369a1; --tone-soft: #e5f4fd; --tone-ink: #0369a1; }
.tv-tone-amber   { --tone-a: #fbbf24; --tone-b: #d97706; --tone-soft: #fef5e3; --tone-ink: #b45309; }
.tv-tone-emerald { --tone-a: #34d399; --tone-b: #047857; --tone-soft: #e4f7ee; --tone-ink: #047857; }
.tv-2 .tv-canvas {
  overflow: hidden; height: clamp(300px, 44vw, 600px); perspective: 1600px;
  padding: clamp(28px, 5vw, 60px) clamp(18px, 7vw, 96px) 0; border-radius: clamp(20px, 2.4vw, 32px);
  background: radial-gradient(70% 60% at 30% 0%, rgb(255 255 255 / .28), transparent 65%), linear-gradient(150deg, var(--tone-a), var(--tone-b));
}
.tv-2 .tv-shot {
  border-radius: 14px 14px 0 0; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .45);
  transform-origin: 50% 0; transform: rotateX(16deg) scale(.94); transition: transform 1s var(--tv-ease);
}
.tv-2 .tv-panel[data-active] .tv-shot { transform: none; }

/* ---------- 3 · step list ---------- */
.tv3-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.6fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.tv3-list { display: flex; flex-direction: column; gap: 6px; }
.tv3-step {
  display: flex; gap: 16px; padding: 18px 20px; border-radius: 18px; text-align: left;
  color: var(--tv-ink); transition: background-color .25s, box-shadow .25s;
}
.tv3-step:hover { background: rgb(255 255 255 / .6); }
.tv3-step[aria-selected=true] { background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 14px 30px -18px rgb(29 24 48 / .3), 0 0 0 1px #efede8; }
.tv3-num { font-family: var(--wh-display); font-size: 15px; font-weight: 600; color: #b6b0c6; padding-top: 2px; }
.tv3-step[aria-selected=true] .tv3-num { color: var(--tv-primary); }
.tv3-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.tv3-body strong { font-family: var(--wh-display); font-size: 19px; font-weight: 500; }
.tv3-body small { font-size: 14.5px; color: var(--tv-grey); }
.tv3-progress { display: block; height: 2px; margin-top: 12px; border-radius: 2px; background: #ece9f3; overflow: hidden; visibility: hidden; position: relative; }
.tv3-step[aria-selected=true] .tv3-progress { visibility: visible; }
.tv3-progress::after { content: ""; position: absolute; inset: 0; background: var(--tv-primary); transform-origin: 0 50%; transform: scaleX(1); }
.tv-tick .tv3-step[aria-selected=true] .tv3-progress::after { animation: tv3-fill 6s linear both; }
@keyframes tv3-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tv-3 .tv-stage { margin-top: 0; }
.tv-3 .tv-canvas {
  overflow: hidden; height: clamp(300px, 36vw, 520px); padding: clamp(28px, 4vw, 52px) 0 0 clamp(28px, 4vw, 52px);
  border-radius: clamp(20px, 2.4vw, 32px); background-color: #eee9fd;
  background-image: radial-gradient(rgb(113 71 235 / .22) 1.2px, transparent 1.5px); background-size: 18px 18px;
}
.tv-3 .tv-shot { width: 135%; max-width: none; border-radius: 14px 0 0 0; box-shadow: 0 30px 70px -28px rgb(60 30 160 / .45), 0 0 0 1px rgb(113 71 235 / .12); }

/* ---------- 4 · bento ---------- */
.tv4-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tv4-tile { grid-column: span 2; margin: 0; overflow: hidden; border-radius: 26px; background: var(--tone-soft); display: flex; flex-direction: column; transition: transform .3s var(--tv-ease); }
.tv4-tile.tv4-wide { grid-column: span 3; }
.tv4-tile:hover { transform: translateY(-4px); }
.tv4-tile figcaption { display: flex; gap: 14px; align-items: flex-start; padding: 24px 26px 18px; }
.tv4-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--tone-ink); flex: none; }
.tv4-ico .tv-ico { width: 19px; height: 19px; }
.tv4-tile strong { display: block; font-family: var(--wh-display); font-size: 19px; font-weight: 500; }
.tv4-tile small { display: block; margin-top: 3px; font-size: 14px; color: var(--tv-grey); }
.tv4-shot { margin-top: auto; height: clamp(200px, 21vw, 290px); overflow: hidden; padding-left: 26px; }
.tv4-shot .tv-shot { width: 150%; max-width: none; border-radius: 12px 0 0 0; box-shadow: 0 24px 50px -24px rgb(29 24 48 / .4), 0 0 0 1px rgb(0 0 0 / .05); }

/* ---------- 5 · stacked deck ---------- */
.tv5-stage { position: relative; margin-top: 28px; overflow: hidden; height: clamp(300px, 42vw, 560px); border-radius: clamp(20px, 2.4vw, 32px); background: #f2f2f3; }
.tv5-deck { position: absolute; inset: 0; }
.tv5-card {
  --p: var(--pos, var(--k)); position: absolute; left: 50%; top: clamp(96px, 11vw, 150px); width: min(80%, 900px); margin: 0;
  transform: translate(-50%, calc(var(--p) * -34px)) scale(calc(1 - var(--p) * .06));
  z-index: calc(10 - var(--p)); opacity: calc(1 - var(--p) * .22);
  transition: transform .7s var(--tv-ease), opacity .5s ease;
}
.tv5-card .tv-shot { border-radius: 14px; box-shadow: 0 30px 70px -26px rgb(29 24 48 / .5), 0 0 0 1px rgb(0 0 0 / .06); }
.tv5-caps { display: grid; }
.tv5-cap { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 14.5px; color: var(--tv-grey); opacity: 0; transition: opacity .4s; }
.tv5-cap[data-active] { opacity: 1; }
.tv5-cap .tv-ico { color: var(--tv-primary); }

/* ---------- 6 · dark showcase ---------- */
.tv6-band {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 6vw, 84px) clamp(28px, 4vw, 44px);
  border-radius: clamp(20px, 2.4vw, 32px); background: #0e0b1a;
}
.tv6-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 55% at 50% 100%, rgb(113 71 235 / .55), transparent 70%),
              linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 48px 48px,
              linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 48px 48px;
}
.tv-6 .tv-stage { margin-top: 0; }
.tv6-window { overflow: hidden; max-height: clamp(260px, 36vw, 500px); border-radius: 14px; background: #1b1728; border: 1px solid rgb(255 255 255 / .12); box-shadow: 0 40px 90px -30px rgb(113 71 235 / .6); }
.tv6-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.tv6-bar i { width: 10px; height: 10px; border-radius: 999px; background: rgb(255 255 255 / .18); }
.tv6-bar span { margin-inline: auto; padding: 3px 14px; border-radius: 7px; background: rgb(255 255 255 / .07); color: rgb(255 255 255 / .6); font-size: 12px; }
.tv-6 .tv-cap { color: rgb(255 255 255 / .72); }
.tv-6 .tv-cap .tv-ico { color: #b9a6ff; }
.tv6-tabs { margin-top: 26px; background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
.tv6-tabs button { color: rgb(255 255 255 / .7); }
.tv6-tabs button:hover { color: #fff; }
.tv6-tabs button[aria-selected=true] { background: #fff; color: var(--tv-ink); box-shadow: none; }

/* ---------- 7 · the CartPilot agent section ---------- */
.tv-7 { --cw: min(var(--wh-content, 1495px), calc(100vw - 48px)); color: #e4e4e7; }
.tv7-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: end; gap: 24px 64px; max-width: calc(var(--wh-content, 1495px) + 48px); margin-inline: auto; padding-inline: 24px; }
.tv7-head h2 { font-family: var(--wh-display); font-size: clamp(32px, 4vw, 52px); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.tv7-head p { justify-self: end; font-size: 18px; line-height: 1.5; color: #a1a1aa; text-wrap: balance; }
.tv7-pin { margin-top: clamp(40px, 6vw, 88px); }
.tv-7[data-pinned] .tv7-stage { position: sticky; top: var(--st, 0px); overflow: hidden; padding-block: 8px; }
.tv7-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 40px; padding-inline: 24px; }
.tv7-tabs button { display: inline-flex; align-items: center; gap: 10px; padding: 8px 2px; font-size: 17px; font-weight: 500; color: #a1a1aa; white-space: nowrap; transition: color .25s; }
.tv7-tabs button .tv-ico { width: 20px; height: 20px; }
.tv7-tabs button:hover { color: #fff; }
.tv7-tabs button[aria-current=true] { color: #a48bff; }
.tv7-viewport { margin-top: 36px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.tv7-viewport::-webkit-scrollbar { display: none; }
.tv-7[data-pinned] .tv7-viewport { overflow: visible; scroll-snap-type: none; }
.tv7-track { display: flex; gap: 48px; width: max-content; padding-inline: calc((100vw - var(--cw)) / 2); }
.tv-7[data-pinned] .tv7-track { will-change: transform; }
.tv7-card {
  --mw: min(560px, 42vw); flex: 0 0 var(--cw); scroll-snap-align: center;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--mw); overflow: hidden;
  border-radius: 12px; outline: 1px solid rgb(255 255 255 / .08); outline-offset: -1px;
}
.tv7-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 48px clamp(32px, 6vw, 88px); background: #121214; }
.tv7-copy h3 { max-width: 600px; font-family: var(--wh-display); font-size: clamp(28px, 2.8vw, 40px); line-height: 1.15; font-weight: 500; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.tv7-copy p { margin-top: 24px; max-width: 540px; font-size: 18px; line-height: 1.55; color: #a1a1aa; }
.tv7-copy ul { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; list-style: none; padding: 0; }
.tv7-copy li { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 7px 22px 7px 7px; border-radius: 999px; background: #1e1e22; font-size: 15.5px; line-height: 1.4; color: #e4e4e7; }
.tv7-tick { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 999px; background: #10b981; color: #fff; }
.tv7-tick .tv-ico { width: 14px; height: 14px; stroke-width: 3; }
.tv7-shot { margin: 0; aspect-ratio: 1168 / 1242; background: #0b0b0f; overflow: hidden; }
.tv7-shot .tv-shot { width: 100%; height: 100%; object-fit: cover; object-position: left top; }

/* ---------- comparison page frame ---------- */
.tvp { padding: clamp(56px, 7vw, 96px) 24px; }
.tvp > .tv:not(.tv-7) { max-width: var(--wh-content, 1495px); margin-inline: auto; }
.tvp-dark { background: #000; padding-inline: 0; }   /* the CartPilot band runs edge to edge */

/* ---------- home: the section keeps its band and spacing ---------- */
.tv-home .tv { max-width: var(--wh-content, 1495px); margin-inline: auto; }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .tv3-grid { grid-template-columns: minmax(0, 1fr); }
  .tv4-grid { grid-template-columns: minmax(0, 1fr); }
  .tv4-tile, .tv4-tile.tv4-wide { grid-column: auto; }
  .tv7-head { grid-template-columns: minmax(0, 1fr); }
  .tv7-head p { justify-self: start; }
  .tv7-card { grid-template-columns: minmax(0, 1fr); }
  .tv7-shot { aspect-ratio: 16 / 11; }
}
@media (max-width: 640px) {
  .tv-tabs button { padding: 7px 12px; font-size: 13.5px; white-space: nowrap; }
  /* One row of tabs that scrolls, rather than a wrapped second line. */
  .tv-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .tv-tabs::-webkit-scrollbar { display: none; }
  /* On a phone the panel fits the screenshot, so no empty colour sits under it. */
  .tv-1 .tv-canvas, .tv-2 .tv-canvas { height: auto; }
  .tv-1 .tv-shot, .tv-2 .tv-shot { margin-bottom: -1px; }
  .tv7-card { --cw: calc(100vw - 48px); }
  .tv7-track { gap: 16px; }
  .tv7-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 26px; }
  .tv7-copy { padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .tv-panel, .tv-1 .tv-shot, .tv-2 .tv-shot, .tv5-card, .tv5-cap { transition: none; }
}

/* =====================================================================
   Design 1, revised: heading, image panels, scroll to switch
   ===================================================================== */

.tv1-head { max-width: 760px; margin: 0 auto clamp(28px, 3.5vw, 44px); padding-inline: 8px; text-align: center; }
.tv1-head h2 {
  font-family: var(--wh-display); font-size: clamp(32px, 3.6vw, 50px); line-height: 1.1; font-weight: 500;
  letter-spacing: -.015em; color: var(--tv-ink); text-wrap: balance;
}
.tv1-head p { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--tv-grey); text-wrap: balance; }

/* Each step's own background image, with 20px corners; taller than before, up to nearly the window. */
.tv-1 .tv-canvas {
  height: max(360px, min(clamp(380px, 52vw, 780px), calc(100vh - 230px)));
  padding: clamp(32px, 5vw, 72px) clamp(18px, 7vw, 110px) 0;
  border-radius: 20px;
  /* The image itself is set inline on each panel: a relative url() kept in a custom property would
     resolve against this stylesheet's folder, not the page. */
  background-color: #1b1530; background-position: center; background-size: cover; background-repeat: no-repeat;
}
.tv-1 .tv-canvas::before { display: none; }
/* The screenshot: 10px corners, a thin light rim, and a soft shadow on the image below it. */
.tv-1 .tv-shot {
  border-radius: 10px; border: 1px solid rgb(255 255 255 / .45);
  box-shadow: 0 40px 90px -30px rgb(10 6 30 / .65), 0 0 0 5px rgb(255 255 255 / .14);
}

/* Pinned: the tabs and panel hold still while the section scrolls past. */
.tv-1[data-pinned] .tv-sticky { position: sticky; top: var(--st, 92px); }
.tv-1[data-pinned] .tv-panel { transition-duration: .45s, .55s, 0s; }

/* On the home page the section now opens with its own heading, so it gets normal top spacing. */
.theme-whistler #tour.tv-home { margin-top: 0; padding-top: clamp(4rem, 7vw, 6.5rem); }

@media (max-width: 767px) {
  .tv-1 .tv-canvas { height: auto; }
}
/* The site gives every screenshot image 18px corners; this tour's screenshots are 10px. */
.theme-whistler .tv-1 img.tv-shot { border-radius: 10px; }

/* Paragraph scale: the description is a normal paragraph (18px), captions are helper text (14px). */
.tv1-head p, .tv7-copy p { font-size: 18px; line-height: 1.6; }
.tv-cap, .tv5-cap, .tv3-body small, .tv4-tile small { font-size: 14px; }

/* Smaller screenshots in the same panels: about three quarters of the panel width, centred,
   with a little more of the background image showing above. Phones keep the full width. */
@media (min-width: 768px) {
  .tv-1 .tv-canvas { padding-top: clamp(44px, 6vw, 92px); }
  .tv-1 .tv-shot { width: 86%; margin-inline: auto; }   /* 86% of the padded area = about 74% of the panel */
}

/* =====================================================================
   Design 1: a narrower panel, slides that travel right to left, an off-white band
   ===================================================================== */

/* The panel is a little narrower than the content column, centred. */
@media (min-width: 768px) {
  .tv-1 .tv-stage { width: min(90%, 1280px); margin-inline: auto; }
  .tv-1 .tv-canvas { padding-inline: clamp(18px, 4vw, 64px); }
}

/* Slides: the next step comes in from the right and the current one leaves to the left;
   scrolling back up runs it the other way. The stage clips them to the panel's width. */
.tv-1 .tv-stage { overflow-x: clip; }
.tv-1 .tv-panel {
  opacity: 1; transform: translateX(calc(100% + 32px));
  transition: transform .75s var(--tv-ease), visibility 0s linear .75s;
}
.tv-1 .tv-panel[data-before] { transform: translateX(calc(-100% - 32px)); }
.tv-1 .tv-panel[data-active] { transform: none; transition-delay: 0s, 0s; }
.tv-1[data-pinned] .tv-panel { transition-duration: .75s, 0s; }
.tv-1 .tv-shot, .tv-1 .tv-panel[data-active] .tv-shot { transform: none; transition: none; }

/* The section sits on the site's off-white instead of white. */
.theme-whistler #tour.tv-home { --band: var(--wh-warm); }

@media (prefers-reduced-motion: reduce) {
  .tv-1 .tv-panel, .tv-1[data-pinned] .tv-panel { transition: none; }
}

/* Track mode (wide screens, pinned): the panels sit side by side in one row that runs off both
   edges of the window, and the whole row travels right to left as the page scrolls, like the
   CartPilot section. Nothing is cut at the panel's edge; the window's edge is the only clip. */
.tv-1[data-track] .tv-stage {
  display: flex; gap: 40px; overflow: visible; will-change: transform;
}
.tv-1[data-track] .tv-panel {
  flex: 0 0 100%; opacity: 1; visibility: visible; transform: none; transition: none;
}
/* Only the panel in front shows its caption. */
.tv-1[data-track] .tv-cap { transition: opacity .3s; }
.tv-1[data-track] .tv-panel:not([data-active]) .tv-cap { opacity: 0; }
