/* SPOT case study: the drawn graphics (results funnel, problem bento, rollout tiles).
   Site branding only: DM Sans 400, --ink / --caption / --accent, 12px tiles,
   thin rules, soft shadows. Nothing here is a slide screenshot. */

.viz-tile {
  position: relative;
  border-radius: 12px;
  background: rgb(252, 252, 252);
  border: 1px solid var(--rule);
  font-family: "DM Sans", sans-serif;
}
:root[data-theme="dark"] .viz-tile { background: rgb(26, 26, 28); }

.viz-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--faint); }

/* ===================== results: the funnel ===================== */
.fn { margin-top: 32px; overflow: hidden; }
.fn-stage { position: relative; aspect-ratio: 16 / 5.2; }
.fn-dot {
  position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--num);
  transition: transform .95s cubic-bezier(.2, .8, .2, 1), opacity .6s ease, background-color .5s ease;
  will-change: transform;
}
.fn-dot.is-in { background: var(--ink); }
.fn-dot.is-dim { background: var(--num); opacity: .45; }
.fn-dot.is-us { background: var(--accent); }
.fn-us {
  position: absolute; left: 0; top: 0; transform: translate(-50%, 0);
  font-size: 13px; line-height: 1; white-space: nowrap; color: var(--accent);
  opacity: 0; transition: opacity .5s ease .5s;
}
.fn-us.is-on { opacity: 1; }
:root:not([data-theme="dark"]) .fn-us { color: var(--accent); }
.fn.no-anim .fn-dot, .fn.no-anim .fn-us { transition: none !important; }

.fn-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.fn-step {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 22px 24px 24px; margin: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
}
.fn-step + .fn-step { border-left: 1px solid var(--rule); }
.fn-step::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.fn-step.is-cur::before { transform: scaleX(1); }
.fn-n {
  font-size: clamp(30px, 3.4vw, 44px); line-height: 1; font-weight: 400; letter-spacing: -.03em;
  color: var(--faint); transition: color .4s ease; font-variant-numeric: tabular-nums;
}
.fn-l { font-size: 14px; line-height: 1.4; color: var(--faint); transition: color .4s ease; }
.fn-step.is-past .fn-n, .fn-step.is-cur .fn-n { color: var(--ink); }
.fn-step.is-past .fn-l, .fn-step.is-cur .fn-l { color: var(--caption); }
.fn-step:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the two small results under the funnel */
.res-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; margin-top: 16px; }
.res-row .viz-tile { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; }
.res-big { margin: 0; font-size: clamp(30px, 3.2vw, 40px); line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.res-big .st-unit { font-size: 22px; margin-left: 2px; }
.res-lab { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--caption); }
.res-row .res-oti { flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; }
.res-oti .oti-mark {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--rule); color: var(--accent);
}
.res-oti .res-lab { margin: 0; color: var(--body); font-size: 16px; }

/* ===================== problem: the bento ===================== */
.pb { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 16px; margin-top: 32px; }
.pb .viz-tile { padding: 30px 30px 28px; display: flex; flex-direction: column; }
.pb-waffle { grid-row: span 2; }
.pb .st-num .count { font-size: clamp(38px, 4vw, 54px); }

.waffle {
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: clamp(5px, .7vw, 8px);
  width: 100%; max-width: 330px; margin: 28px 0 22px;
}
.waffle i {
  display: block; aspect-ratio: 1; border-radius: 50%;
  background: rgba(0, 0, 0, .09);
  transition: background-color .35s ease, transform .45s cubic-bezier(.3, 1.6, .5, 1);
  transition-delay: var(--d, 0s);
}
:root[data-theme="dark"] .waffle i { background: rgba(255, 255, 255, .12); }
.waffle i.is-on { background: var(--accent); transform: scale(1.08); }
.viz-key { margin: auto 0 0; font-size: 15px; line-height: 1.45; color: var(--body); }
.viz-key .key-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.viz-key + .viz-note { margin-top: 4px; }

/* six agencies as stops on one line */
.route { position: relative; height: 34px; margin: 30px 10px 6px; }
.route-line, .route-fill { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; }
.route-line { background: var(--rule); }
.route-fill { background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
.route-node {
  position: absolute; top: 50%; left: calc(var(--x) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: rgb(252, 252, 252); border: 2px solid var(--num);
  transition: border-color .3s ease, background-color .3s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
:root[data-theme="dark"] .route-node { background: rgb(26, 26, 28); }
.route-node.is-hit { border-color: var(--accent); background: var(--accent); transform: scale(1.15); }
.route-dot {
  position: absolute; top: 50%; left: calc(var(--p, 0) * 100%); width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; background: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  transition: left .7s cubic-bezier(.4, 0, .2, 1);
}
.route.no-anim .route-dot, .route.no-anim .route-fill, .route.no-anim .route-node { transition: none; }
.route-ends { display: flex; justify-content: space-between; margin: 0 0 0; font-size: 13px; color: var(--faint); }

/* tickets as a tally, one line per thousand */
.tally { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 4px 3px; margin: 26px 0 12px; }
.tally i {
  display: block; width: 3px; height: 26px; border-radius: 2px; background: var(--ink);
  transform: scaleY(0); transform-origin: bottom; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); transition-delay: var(--d, 0s);
}
.tally i.gap { margin-right: 7px; }
.tally i.is-on { transform: scaleY(1); }
.pb-tally .viz-note, .pb-route .viz-note { margin-top: auto; }

/* the price gap, after the quote */
.price { margin-top: 26px; padding: 30px 30px 26px; }
.price-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; column-gap: 20px; row-gap: 8px; }
.price-row + .price-row { margin-top: 22px; }
.price-l { margin: 0; font-size: 15px; color: var(--caption); grid-column: 1; grid-row: 1 / span 2; }
.price-v { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-bar { position: relative; height: 14px; border-radius: 8px; background: rgba(0, 0, 0, .05); overflow: hidden; }
:root[data-theme="dark"] .price-bar { background: rgba(255, 255, 255, .07); }
.price-fill, .price-range {
  position: absolute; top: 0; bottom: 0; left: var(--l, 0); width: var(--w); min-width: 4px; border-radius: 8px;
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
}
.price-fill { background: var(--ink); }
.price-fill.is-acc { background: var(--accent); border-radius: 8px 0 0 8px; }
.price-range {
  border-radius: 0 8px 8px 0;
  background: repeating-linear-gradient(135deg, var(--accent) 0 3px, transparent 3px 7px);
  opacity: .7; transition-delay: .5s;
}
.price.is-in .price-fill, .price.is-in .price-range { transform: scaleX(1); }
.price .viz-note { margin-top: 20px; }

/* the price gap (Jen, Nov 28): one compartment in Clarus's ".cmp" card style, both
   prices in the same block. Big number + small grey unit, one grey line, source note
   under the card. spot-viz.js adds s1, s2, s3, erasing, typing, done in order:
   s1 a line strikes through $200, s2 $200 greys out, s3 $18K to $25K slides in beside
   it from the right (the card clips it), then the caption erases and retypes. */
.pc { margin-top: 26px; }
.pc-card {
  border: 1px solid var(--rule); border-radius: 12px; background: rgb(252, 252, 252);
  padding: 40px 48px 44px; overflow: hidden;
}
:root[data-theme="dark"] .pc-card { background: rgb(26, 26, 28); }
.pc-label { margin: 0 0 22px; font-size: 15px; line-height: 1.3; color: var(--caption); }
.pc-num { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 36px; margin: 0; }
.pc-new { display: inline-flex; align-items: baseline; gap: 10px; }
.pc-big { font-size: clamp(40px, 6vw, 64px); line-height: 1; font-weight: 400; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-new .pc-big { color: var(--accent); }
.pc-unit { font-size: 18px; font-weight: 400; color: var(--caption); }
.pc-desc { margin: 14px 0 0; font-size: 16px; line-height: 1.45; color: var(--caption); max-width: 34em; }
.pc-note { margin: 12px 2px 0; font-size: 12px; line-height: 1.5; color: var(--caption); }
.pc-strike { position: relative; display: inline-block; }
.pc-strike::after {
  content: ""; position: absolute; left: -5%; right: -5%; top: 54%; height: 4px; margin-top: -2px;
  border-radius: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left center; transition: transform .45s cubic-bezier(.6, 0, .2, 1), background .45s ease;
}
.pc.s1 .pc-strike::after { transform: scaleX(1); }
.pc-old { transition: color .45s ease; }
.pc.s2 .pc-old { color: var(--caption); }
.pc-new { opacity: 0; transform: translateX(72px); transition: opacity .5s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.pc.s3 .pc-new { opacity: 1; transform: none; }
.pc-typed { position: relative; }
.pc-ghost { visibility: hidden; }
.pc-type { position: absolute; inset: 0; }
.pc-caret {
  display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -.17em;
  background: currentColor; opacity: 0;
}
.pc.erasing .pc-caret, .pc.typing:not(.done) .pc-caret { opacity: 1; }
.pc.typing:not(.done) .pc-caret { animation: pc-blink 1s steps(1) infinite; }
@keyframes pc-blink { 50% { opacity: 0; } }
.pc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .pc-card { padding: 24px 20px 26px; }
  .pc-label { font-size: 13px; margin-bottom: 14px; }
  .pc-num { column-gap: 22px; }
  .pc-big { font-size: 38px; }
  .pc-unit { font-size: 14px; }
  .pc-desc { font-size: 14px; margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .pc-new, .pc-old, .pc-strike::after { transition: none; } }
/* ===================== rollout: two drawn tiles ===================== */
.ro-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.ro { margin: 0; }
.ro-tile {
  position: relative; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 12px;
  border: 1px solid var(--rule);
  background-color: rgb(245, 245, 247);
  background-image: radial-gradient(circle, rgba(0, 0, 0, .09) 1px, transparent 1.4px);
  background-size: 18px 18px;
  font-family: "DM Sans", sans-serif;
}
:root[data-theme="dark"] .ro-tile {
  background-color: rgb(26, 26, 28);
  background-image: radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 1.4px);
}

/* SVP tile as a real photo (Jen, Nov 28): from streetvendor.org, credited at the end of the caption */
.ro-tile.ro-photo { background: rgb(245, 245, 247); }
.ro-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.ro-credit { display: block; margin-top: 4px; font-size: 12px; opacity: .75; }

/* the letter */
.ro-letter {
  /* Nudged right (Jen, Nov 29) so the phone overlaps the letter a bit more. */
  position: absolute; left: 16%; top: 14%; width: 44%; aspect-ratio: 8.5 / 11;
  padding: 7% 7%; box-sizing: border-box; border-radius: 4px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 18px 40px rgba(0, 0, 0, .10);
  display: flex; flex-direction: column; gap: 7%;
  transform: translateY(24px) rotate(-4deg); opacity: 0;
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .6s ease;
}
:root[data-theme="dark"] .ro-letter { background: rgb(44, 44, 48); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .4); }
.ro-tile.is-in .ro-letter { transform: rotate(-4deg); opacity: 1; }
/* Simple, uniform body lines (Jen, Nov 29): one group, same width, same height, even spacing. */
.lt-row { display: flex; flex-direction: column; gap: 9px; }
.lt-line { display: block; width: 100%; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .12); }
:root[data-theme="dark"] .lt-line { background: rgba(255, 255, 255, .16); }
.lt-line.head { height: 8px; width: 42%; background: rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .lt-line.head { background: rgba(255, 255, 255, .6); }
/* No blue on this tile (Jen, Nov 29): the line highlight is gone, and the scan line and
   corner brackets use the ink color instead of the site blue. */
.lt-qr { position: relative; align-self: flex-end; margin-top: auto; margin-right: 12%; width: 38%; aspect-ratio: 1; color: rgb(16, 16, 17); --qbg: #fff; --qmark: rgb(16, 16, 17); }
:root[data-theme="dark"] .lt-qr { color: #f2f2f2; --qbg: rgb(44, 44, 48); --qmark: #f2f2f2; }
.lt-qr svg { display: block; width: 100%; height: 100%; }
.lt-scan {
  position: absolute; left: -10%; right: -10%; top: 0; height: 2px; border-radius: 2px;
  background: var(--qmark); box-shadow: 0 0 10px 1px rgba(0, 0, 0, .18); opacity: 0;
}
.ro-tile.is-in .lt-scan { animation: ro-scan 1.1s ease-in-out .8s 2; }
@keyframes ro-scan {
  0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; }
}
/* corner brackets around the code while it scans */
.lt-qr::before {
  content: ""; position: absolute; inset: -14%;
  background:
    linear-gradient(var(--qmark), var(--qmark)) top left / 22% 2px no-repeat,
    linear-gradient(var(--qmark), var(--qmark)) top left / 2px 22% no-repeat,
    linear-gradient(var(--qmark), var(--qmark)) top right / 22% 2px no-repeat,
    linear-gradient(var(--qmark), var(--qmark)) top right / 2px 22% no-repeat,
    linear-gradient(var(--qmark), var(--qmark)) bottom left / 22% 2px no-repeat,
    linear-gradient(var(--qmark), var(--qmark)) bottom left / 2px 22% no-repeat,
    linear-gradient(var(--qmark), var(--qmark)) bottom right / 22% 2px no-repeat,
    linear-gradient(var(--qmark), var(--qmark)) bottom right / 2px 22% no-repeat;
  opacity: 0; transform: scale(1.25); transition: opacity .4s ease .6s, transform .6s cubic-bezier(.2, .8, .2, 1) .6s;
}
.ro-tile.is-in .lt-qr::before { opacity: 1; transform: scale(1); }

/* the phone it opens */
.ro-phone {
  position: absolute; right: 15%; bottom: -6%; width: 30%; height: auto; border-radius: clamp(12px, 1.8vw, 22px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 24px 50px rgba(0, 0, 0, .16);
  transform: translateY(40%) rotate(4deg); opacity: 0;
  transition: transform 1s cubic-bezier(.2, .8, .2, 1) 2.7s, opacity .5s ease 2.7s;
}
.ro-tile.is-in .ro-phone { transform: translateY(0) rotate(4deg); opacity: 1; }

/* Street Vendor Project: drop-in visits, with SPOT in between */
.svp-head { position: absolute; left: 8%; top: 10%; right: 8%; }
.svp-num { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.svp-num .count { font-size: clamp(36px, 4vw, 54px); line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.svp-label { margin: 10px 0 0; font-size: 15px; line-height: 1.4; color: var(--caption); max-width: 260px; }
.svp-line { position: absolute; left: 12%; right: 12%; top: 70%; height: 0; }
.svp-track, .svp-fill { position: absolute; left: 0; right: 0; top: -1px; height: 2px; border-radius: 2px; }
.svp-track { background: var(--rule); }
.svp-fill { background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1.8s cubic-bezier(.45, 0, .2, 1) .7s; }
.ro-tile.is-in .svp-fill { transform: scaleX(1); }
.svp-node {
  position: absolute; left: calc(var(--x) * 100%); top: 0; transform: translate(-50%, -50%) scale(.6); opacity: 0;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; line-height: 1; color: var(--ink);
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .07), 0 6px 16px rgba(0, 0, 0, .08);
  transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), opacity .3s ease; transition-delay: var(--d, 0s);
}
:root[data-theme="dark"] .svp-node { background: rgb(44, 44, 48); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 16px rgba(0, 0, 0, .3); }
.svp-node svg { display: block; flex: none; }
.ro-tile.is-in .svp-node { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.svp-chip {
  position: absolute; left: calc(var(--x) * 100%); bottom: var(--b, 22px); transform: translate(-50%, 10px); opacity: 0;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px; white-space: nowrap;
  font-size: 13px; line-height: 1; color: var(--ink);
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 10px 24px rgba(0, 0, 0, .10);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .4s ease; transition-delay: var(--d, 0s);
}
.svp-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.svp-chip::after {
  content: ""; position: absolute; left: 50%; bottom: calc(-1 * var(--b, 22px)); width: 1px; height: calc(var(--b, 22px) - 1px); background: var(--accent); opacity: .5;
}
:root[data-theme="dark"] .svp-chip { background: rgb(44, 44, 48); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 24px rgba(0, 0, 0, .3); }
.ro-tile.is-in .svp-chip { transform: translate(-50%, 0); opacity: 1; }
.svp-key {
  position: absolute; left: 0; right: 0; top: calc(70% + 30px); margin: 0; text-align: center;
  font-size: 13px; color: var(--caption); opacity: 0; transition: opacity .5s ease 2.4s;
}
.svp-key b { font-weight: 400; color: var(--accent); }
.ro-tile.is-in .svp-key { opacity: 1; }

/* ===================== small screens ===================== */
@media (max-width: 760px) {
  .fn-stage { aspect-ratio: 4 / 3.4; }
  .fn-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-step { padding: 16px 16px 18px; }
  .fn-step:nth-child(3) { border-left: 0; }
  .fn-step:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .res-row, .pb, .ro-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pb-waffle { grid-row: auto; }
  .pb .viz-tile, .price { padding: 22px 20px; }
  .price-row { grid-template-columns: minmax(0, 1fr); }
  .price-l { grid-row: auto; }
  .ro-tile { aspect-ratio: 1 / 1; }
  .svp-line { left: 16%; right: 16%; }
  .svp-chip { font-size: 12px; padding: 7px 9px; }
  .svp-chip + .svp-chip { --b: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .fn-dot, .fn-us, .waffle i, .tally i, .route *, .price-fill, .price-range,
  .ro-letter, .ro-phone, .lt-qr::before, .svp-fill, .svp-node, .svp-chip, .svp-key { transition: none !important; }
  .ro-tile.is-in .lt-scan { animation: none; }
}
