/* Why DealOn: an optional carousel of four cards. Native scroll snap does the work; why.js adds arrows, mouse drag and keys. */

/* ---------- carousel ---------- */
.wy {
  --lab: #39405a;
  /* The left edge of .container, so the first card lines up with the heading while the track runs full bleed. */
  --edge: max(var(--pad-l), (100% - var(--content-max)) / 2);
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .281 6.7%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.077, 1.101 26.6%, 1.095 30.5%, 1.04 39.7%, 1.012 46%, .995 54%, .998 66%, 1);
  --ease-hero: var(--ease-out-quart);
}
.wy .wy__track {
  /* The gap outgrows the gutter on phones and tablets, so a card scrolled past leaves no sliver at the viewport edge. */
  --g: calc(var(--edge) + 4px);
  display: flex; gap: var(--g);
  margin: -24px 0 -40px; padding: 24px var(--edge) 40px;
  list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}
@media (min-width: 1100px) { .wy .wy__track { --g: var(--gap-card); } }
.wy__track::-webkit-scrollbar { display: none; }
.wy__track:focus-visible { outline: none; }
.wy__track:focus-visible .is-cur .wy-card { box-shadow: 0 0 0 2px var(--focus-ring); }
/* The neighbour only ever peeks as a cue at the viewport edge, never as half a card. */
.wy__item { flex: 0 0 min(1240px, 100% + var(--edge) - var(--g) - clamp(28px, 7vw, 132px)); scroll-snap-align: start; }
.wy__item:last-child { scroll-snap-align: end; }
/* A neighbour's copy shows only once most of its column is in view, so a peek at any width shows the card and its art,
   never half a word. */
@supports (animation-timeline: view()) {
  .wy-card__text { animation: wy-copy linear both; animation-timeline: view(inline 0px); }
}
@keyframes wy-copy {
  0%, entry 80%, exit 20%, 100% { opacity: 0; }
  entry 100%, exit 0% { opacity: 1; }
}
@media (hover: hover) and (pointer: fine) {
  .wy__track { cursor: grab; }
  /* Snap stays off while the mouse drags and until the release animation lands, or Chromium re-snaps mid-glide. */
  .wy__track.is-free { scroll-snap-type: none; cursor: grabbing; user-select: none; -webkit-user-select: none; }
}

.wy__nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.wy__btn {
  display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--page); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 8px 20px -12px rgb(17 23 44 / .3);
  font-size: 20px; cursor: pointer;
  transition: opacity var(--dur-base) var(--ease-out-quart), box-shadow var(--dur-fast) var(--ease-out-quart), scale var(--dur-press) var(--ease-out-quart);
}
.wy__btn:disabled { opacity: .3; cursor: default; }
.wy__btn:not(:disabled):active { scale: .94; }
@media (hover: hover) and (pointer: fine) {
  .wy__btn:not(:disabled):hover { box-shadow: 0 0 0 1px rgb(17 23 44 / .2), 0 10px 24px -12px rgb(17 23 44 / .4); }
}

/* ---------- card ---------- */
.wy-card {
  container: wycard / inline-size;
  height: 100%;
  border-radius: var(--r-card);
  background: var(--page);
  box-shadow: 0 0 0 1px var(--line);
}
.wy-card__in { display: flex; flex-direction: column; height: 100%; }
.wy-card__text { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 26px; }
.wy-card__copy { display: grid; gap: 10px; }
.wy-card__ix { font: 500 13px/1 var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink-chip); }
.wy-card__text .t-body { max-width: 34ch; }
/* The claim, set like the Deal Velocity day counter: plain type in the text column, never on the art. */
.wy-fig { display: grid; justify-items: start; gap: 8px; margin: 6px 0 0; color: var(--ink-muted); font-size: 14px; line-height: 1.2; }
.wy-fig b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4cqi, 64px);
  font-weight: 300;
  line-height: .9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vz {
  /* One recipe for every panel: the hue shifts, the inset and token size do not. */
  --h: 260;
  --in: clamp(14px, 5cqmin, 26px);
  --tok: clamp(22px, 7.4cqmin, 40px);
  order: -1;
  position: relative;
  aspect-ratio: 1;
  container-type: size;
  --vz-in: 8px;
  margin: var(--vz-in) var(--vz-in) 0;
  border-radius: calc(var(--r-card) - var(--vz-in));
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 70% at 10% 6%, oklch(83% .1 var(--h)), oklch(83% .1 var(--h) / 0) 70%),
    radial-gradient(60% 65% at 96% 10%, oklch(87% .085 calc(var(--h) + 55)), oklch(87% .085 calc(var(--h) + 55) / 0) 70%),
    radial-gradient(75% 55% at 64% 104%, oklch(97.5% .025 calc(var(--h) - 40)), oklch(97.5% .025 calc(var(--h) - 40) / 0) 75%),
    linear-gradient(180deg, oklch(89% .06 var(--h)), oklch(94.5% .035 calc(var(--h) + 25)));
}
@container wycard (min-width: 480px) { .vz { aspect-ratio: 16 / 10; } }
@container wycard (min-width: 720px) {
  .wy-card__in { flex-direction: row; min-height: clamp(360px, 28vw, 420px); }
  /* Copy at the top of the column, the figure at its foot. */
  .wy-card__text { flex: 0 0 38%; gap: 18px; padding: 34px 36px 38px 40px; }
  .wy-fig { margin-top: auto; }
  .wy-card__copy { gap: 14px; }
  .wy-card__text .t-body { max-width: 31ch; }
  .vz { order: 0; flex: 1; aspect-ratio: auto; margin: var(--vz-in) var(--vz-in) var(--vz-in) 0; }
}

/* ---------- the kit: the glass token, used by Reach ---------- */
.vz-tok {
  position: relative; display: grid; place-items: center;
  width: var(--tok); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(90% 70% at 32% 20%, rgb(255 255 255 / .6), rgb(255 255 255 / 0) 50%),
    linear-gradient(145deg, #8b6dff 8%, #7c5cfc 38%, #e64d86 96%);
  box-shadow:
    0 0 0 max(2px, calc(var(--tok) * .085)) rgb(255 255 255 / .94),
    inset 0 -3px 6px -1px rgb(70 20 110 / .35),
    0 10px 22px -8px rgb(124 60 200 / .7);
}
/* A drawn stroke with round caps and joins; a rotated border corner read blocky. */
.vz-tok--ok::after {
  content: ""; width: 64%; aspect-ratio: 1; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.6 4.6 9.4-10' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.6 4.6 9.4-10' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.vz-tok::before {
  content: ""; position: absolute; inset: calc(var(--tok) * -.085 - 1.5px); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgb(124 92 252 / .5); opacity: 0;
}


/* ---------- Speed: the Precision chart's two lines, flat; DealOn stops at ~28% of the industry's run ---------- */
.vz--speed { --h: 262; }
/* A bar, not an SVG stroke: a gradient on a non-scaling stroke is measured in screen pixels and lost its pink end. */
.vz-cv__bar { position: absolute; left: 0; top: 70%; width: 28%; height: clamp(5px, 1.6cqmin, 8px); translate: 0 -50%; border-radius: 99px; background: linear-gradient(90deg, #00e5bf, #7c5cfc 55%, #ff6b9d); }
.vz-cv__name { position: absolute; left: 0; translate: 0 calc(-100% - 14px); font: 500 clamp(12px, 3.4cqmin, 14px)/1.2 var(--font-display); color: var(--ink-muted); white-space: nowrap; }
.vz-cv__name--t { top: 34%; }
.vz-cv__name--d { top: 70%; color: var(--ink); }
.vz-cv--speed .vz-cv__lab--t { top: 34%; }
.vz-cv--speed .vz-cv__lab--d { top: 70%; left: calc(28% + 14px); }
/* The film (why.js) plays over the static chart, which waits hidden and fades back in as the film's last frame. */
.vz-film { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: opacity 300ms var(--ease-in-out); }
.vz-cv--speed:not(.is-film) .vz-film { opacity: 0; }
.vz-cv--speed > :not(.vz-film) { transition: opacity 300ms var(--ease-in-out); }
.vz-cv--speed.is-film > :not(.vz-film) { opacity: 0 !important; transition: none !important; }
/* The hand back from the film is one quick crossfade, never the static chart's own delayed entrance. */
html.wy-anim .is-play .vz-cv--speed > :not(.vz-film) { transition: opacity 300ms var(--ease-in-out); }
.vz-cv .vz-film :is(path, .k) { fill: none; stroke-linecap: round; vector-effect: none; }
.vz-film .fd { stroke: url(#wy-film-g); }
.vz-film .ft { stroke: rgb(17 23 44 / .28); }
.vz-film text { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; fill: var(--ink-muted); }
.vz-film .i { fill: var(--ink); }

/* ---------- Precision: two curves from one start; DealOn ends three times as high as traditional outreach ---------- */
.vz--curve { --h: 296; }
/* The plot stretches to the panel; strokes stay true with non-scaling-stroke, so the curves keep their weight. */
.vz-cv { position: absolute; left: 12%; right: max(24%, 112px); top: 16%; bottom: 16%; }
.vz-cv svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vz-cv path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.vz-cv .d { stroke: url(#wy-cv-g); stroke-width: clamp(5px, 1.6cqmin, 8px); }
.vz-cv .t { stroke: rgb(17 23 44 / .28); stroke-width: clamp(3px, 1cqmin, 5px); }
.vz-cv__lab { position: absolute; left: calc(100% + 14px); translate: 0 -50%; font: 500 clamp(13px, 3.8cqmin, 17px)/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
.vz-cv__lab--d { top: 4%; color: var(--ink); }
.vz-cv__lab--t { top: 71.3%; color: var(--ink-muted); }

/* ---------- Trust: typical retainers climb in columns of dots, one more each step; DealOn is the single first dot ---------- */
.vz--steps { --h: 190; }
.vz-st { position: absolute; inset: 14% 10% 22% 10%; display: grid; grid-template: repeat(12, 1fr) / repeat(12, 1fr); }
.vz-st i { grid-area: var(--r) / var(--c); place-self: center; --s: calc(min(80cqw, 62cqh) / 12 * .62); width: var(--s); height: var(--s); border-radius: 50%; background: rgb(40 96 104 / .42); }
/* The DealOn dot takes the panel's teal end of the brand gradient. */
.vz-st i:first-of-type { background: linear-gradient(135deg, #00e5bf, #009f86 55%, #7c5cfc); box-shadow: 0 6px 18px rgb(0 159 134 / .32); }
.vz-st__lab { position: absolute; right: 0; font: 500 clamp(13px, 3.8cqmin, 17px)/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
.vz-st__lab--t { top: calc(100% + 10px); color: var(--ink-muted); }
.vz-st__lab--d { left: 0; right: auto; top: calc(100% + 10px); color: var(--ink); }

/* ---------- Reach: one seller, a field of buyers spreading out from it, the best ones scored ---------- */
.vz--reach { --h: 318; }
.vz-net { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.vz-seed, .vz-top { position: absolute; left: 0; top: 0; }
.vz-seed { --tok: clamp(26px, 8.4cqmin, 44px); translate: -50% -50%; }
.vz-seed::after { content: ""; width: 34%; aspect-ratio: 1; border-radius: 50%; background: #fff; }
.vz-you { position: absolute; left: 0; top: 0; padding: 5px 10px; border-radius: 99px; background: rgb(255 255 255 / .9); box-shadow: 0 6px 16px -8px rgb(60 30 110 / .45), 0 0 0 1px rgb(255 255 255 / .9); font: 600 13px/1 var(--font-sans); white-space: nowrap; color: var(--ink); }
.vz-top { --tok: clamp(18px, 5.4cqmin, 28px); display: flex; align-items: center; gap: 8px; translate: calc(var(--tok) / -2) -50%; }
.vz-top.is-flip { flex-direction: row-reverse; translate: calc(var(--tok) / 2 - 100%) -50%; }
.vz-top[hidden] { display: none; }
.vz-score {
  padding: 5px 10px 5px 9px; border-radius: 99px;
  background: rgb(255 255 255 / .9);
  box-shadow: 0 6px 16px -8px rgb(60 30 110 / .45), 0 0 0 1px rgb(255 255 255 / .9);
  font: 600 13px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink);
}

/* ---------- motion, only when allowed (why.js adds .wy-anim) ----------
   Idle loops run only while .is-vis. */
@keyframes wy-ping { 0% { opacity: .9; scale: 1; } 100% { opacity: 0; scale: 1.6; } }

/* Speed and Precision: the lines draw in once from the left, then their labels land. */
html.wy-anim .vz-cv svg:not(.vz-film) { clip-path: inset(-12px -12px -12px -12px); transition: clip-path 1200ms var(--ease-out-quart) 250ms; }
html.wy-anim .wy-card:not(.is-play) .vz-cv svg:not(.vz-film) { clip-path: inset(-12px 100% -12px -12px); }
/* Precision draws by dash, not clip, so the moving ends stay round (why.js lays the curves out in pixels). */
html.wy-anim .vz--curve .vz-cv svg { clip-path: none !important; }
html.wy-anim .vz--curve .vz-cv svg.is-px path { stroke-dasharray: 1 1; vector-effect: none; }
html.wy-anim .is-play .vz--curve .vz-cv svg.is-px path { transition: stroke-dashoffset 1200ms var(--ease-out-quart) 250ms; }
html.wy-anim .wy-card:not(.is-play) .vz--curve .vz-cv svg.is-px path { stroke-dashoffset: 1; }
html.wy-anim .is-play .vz-cv__lab { transition: opacity 500ms var(--ease-out-quart) 1300ms; }
html.wy-anim .wy-card:not(.is-play) .vz-cv__lab { opacity: 0; }
html.wy-anim .is-play .vz-cv__name { transition: opacity 500ms var(--ease-out-quart) 120ms; }
html.wy-anim .wy-card:not(.is-play) .vz-cv__name { opacity: 0; }
/* Trust: the dots pop in from the DealOn corner outward, then the labels land. */
html.wy-anim .is-play .vz-st i { transition: opacity 200ms calc(150ms + var(--d) * 45ms), scale 600ms cubic-bezier(.34, 1.56, .64, 1) calc(150ms + var(--d) * 45ms); }
html.wy-anim .wy-card:not(.is-play) .vz-st i { opacity: 0; scale: .3; }
html.wy-anim .is-play .vz-st__lab { transition: opacity 500ms var(--ease-out-quart) 1600ms; }
html.wy-anim .wy-card:not(.is-play) .vz-st__lab { opacity: 0; }

/* Reach: the field spreads on the canvas, then the seller, the threads and the top buyers land (delays from why.js). */
html.wy-anim .is-play .vz-seed { transition: opacity 200ms, scale 800ms var(--spring); }
html.wy-anim .wy-card:not(.is-play) .vz-seed { opacity: 0; scale: .3; }
html.wy-anim .is-play .vz-you { transition: opacity 500ms var(--ease-out-quart) 300ms; }
html.wy-anim .wy-card:not(.is-play) .vz-you { opacity: 0; }
html.wy-anim .is-play .vz-top .vz-tok { transition: opacity 200ms var(--d), scale 800ms var(--spring) var(--d); }
html.wy-anim .wy-card:not(.is-play) .vz-top .vz-tok { opacity: 0; scale: .3; }
html.wy-anim .is-play .vz-score { transition: opacity 400ms var(--ease-out-quart) calc(var(--d) + 150ms), translate 700ms var(--ease-out-expo) calc(var(--d) + 150ms); }
html.wy-anim .wy-card:not(.is-play) .vz-score { opacity: 0; translate: -6px 0; }
html.wy-anim .wy-card:not(.is-play) .is-flip .vz-score { translate: 6px 0; }
html.wy-anim .is-vis .vz-seed::before { animation: wy-ping 2600ms var(--ease-out-quart) 2.4s infinite; }
