/* who-we-help.css: the Who we help page's own parts; the closing band is in components.css. */

/* ---------- the header: three businesses side by side, a booking landing on each in turn ---------- */
.who-hero { position: relative; padding: 12px clamp(12px, 1.6vw, 24px) 0; }
.who-hero__panels { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; height: clamp(620px, 54vw, 820px); }
.who-hero__panel { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius-l); background: var(--c-paper-alt); }
.who-hero__panel video, .who-hero__panel .kit-first { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.who-hero__panel video { clip-path: inset(2px); }
.who-hero__panel video[data-kit-shown] { clip-path: none; }
.who-hero__panel--plumber video, .who-hero__panel--plumber .kit-first { object-position: 72% 50%; }
.who-hero__panel--lawyer video, .who-hero__panel--lawyer .kit-first { object-position: 60% 50%; }
.who-hero__panel--cafe video, .who-hero__panel--cafe .kit-first { object-position: 74% 50%; }
.who-hero__chip { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-m); background: var(--c-paper); box-shadow: var(--shadow-l); opacity: var(--kit-in, 0); transform: translateY(calc((1 - var(--kit-in, 0)) * 14px)); }
.who-hero__panel--lawyer .who-hero__chip { top: 14px; bottom: auto; }
.who-hero__chip b { display: block; font: 700 1.0625rem/1.2 var(--font-ui); color: var(--c-ink); }
.who-hero__chip small { display: block; font: 500 0.9375rem/1.3 var(--font-ui); color: var(--c-ink-soft); }
.who-hero__node { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--tone); color: var(--tone-ink); }
.who-hero__node svg { width: 22px; height: 22px; }
.who-hero__card { position: absolute; z-index: 3; left: 50%; bottom: 26px; display: grid; justify-items: center; gap: 12px; box-sizing: border-box; width: min(450px, calc(33.3vw - 40px)); padding: 26px 26px 22px; border-radius: var(--radius-l); background: var(--c-paper); box-shadow: var(--shadow-l); text-align: center; transform: translateX(-50%); }
.who-hero__card h1 { font-size: clamp(2rem, 0.9rem + 2.1vw, 3rem); line-height: 1.03; }
.who-hero__card > p { color: var(--c-ink-soft); font-size: 1.0625rem; line-height: 1.4; }
.who-hero__card .cta-note { justify-content: center; }
.who-hero__stop { top: 14px; right: 14px; }
@media (max-width: 1040px) {
  /* the three take turns in one frame under the words, as the kit's header does */
  .who-hero { display: flex; flex-direction: column-reverse; padding: 0 var(--gutter); }
  .who-hero__card { position: static; justify-items: start; width: auto; max-width: 640px; padding: 18px 0 22px; border-radius: 0; background: none; box-shadow: none; text-align: left; transform: none; }
  .who-hero__card h1 { font-size: clamp(2.4rem, 10vw, 3.4rem); }
  .who-hero__card .cta-note { justify-content: flex-start; }
  .who-hero__panels { display: block; height: 500px; border-radius: var(--radius-l); overflow: hidden; }
  .who-hero__panel { position: absolute; inset: 0; visibility: hidden; border-radius: 0; }
  .who-hero__panel[data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
  .who-hero:not(:has([data-kit-slide][data-prev])) .who-hero__panel[data-kit-on] { transform: none; opacity: 1; }
  .who-hero__panel[data-prev] { visibility: visible; z-index: 1; opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
  .who-hero:not(:has([data-kit-slide][data-kit-on])) .who-hero__panel:first-of-type { visibility: visible; }
  .who-hero__panel--lawyer .who-hero__chip { top: auto; bottom: 14px; }
  .who-hero__stop { z-index: 6; top: 12px; right: 12px; }
}

/* ---------- every kind at once: the hub, full width ---------- */
.who-trades { padding-block: var(--section-y) 0; }
.who-trades__head { margin-inline: auto; justify-items: center; text-align: center; }
.who-trades__ground { border-radius: 0; }
.who-trades__scene { height: 460px; }
.who-trades__stop { top: 14px; right: max(var(--gutter), calc((100vw - var(--max-w)) / 2)); }
@media (max-width: 760px) { .who-trades__scene { height: 480px; } .who-trades__stop { top: auto; bottom: 10px; right: 10px; } }

/* ---------- the kinds: a list of tabs beside one big photo ---------- */
.who-kinds { padding-block: var(--section-y); }
.who-kinds__box { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: var(--space-4); align-items: stretch; }
.who-kinds__tabs { display: grid; gap: 8px; align-content: center; }
.who-kinds__tab { position: relative; display: block; width: 100%; min-height: 62px; padding: 0 20px; border: 1.5px solid var(--c-line); border-radius: var(--radius-m); background: var(--c-paper); color: var(--c-ink); font: 700 1.125rem/1.2 var(--font-ui); text-align: left; cursor: pointer; overflow: hidden; }
.who-kinds__tab span { position: relative; z-index: 1; }
.who-kinds__tab:hover { border-color: var(--c-brand); }
.who-kinds__tab[aria-selected="true"] { border-color: var(--c-ink); background: var(--c-ink); color: var(--c-paper); }
.who-kinds__tab:focus-visible { outline: 3px solid var(--c-brand-text); outline-offset: 2px; }
.who-kinds__fill { position: absolute; left: 0; bottom: 0; width: 100%; height: 4px; background: var(--c-brand); transform: scaleX(var(--kit-fill, 0)); transform-origin: left; }
.who-kinds__tab:not([aria-selected="true"]) .who-kinds__fill { display: none; }
.who-kinds__stage { position: relative; height: 620px; border-radius: var(--radius-l); overflow: hidden; background: var(--c-line); }
.who-kinds__panel { position: absolute; inset: 0; }
.who-kinds__panel:focus-visible { outline: 3px solid var(--c-brand-text); outline-offset: -3px; }
.who-kinds__panel img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }
.who-kinds__card { position: absolute; left: 18px; bottom: 18px; display: grid; gap: 8px; box-sizing: border-box; width: min(400px, calc(100% - 36px)); padding: 22px 24px; border-radius: var(--radius-m); background: var(--c-paper); box-shadow: var(--shadow-l); }
.who-kinds__card h3 { font-size: clamp(1.35rem, 1.1rem + 0.7vw, 1.75rem); line-height: 1.12; }
.who-kinds__card p { color: var(--c-ink-soft); font-size: var(--fs-small); line-height: 1.4; }
.who-kinds__panel--more { display: grid; place-items: center; padding: 24px; border-radius: 0; }
.who-kinds__hub { display: grid; justify-items: center; gap: 14px; max-width: 480px; text-align: center; }
.who-kinds__hub h3 { font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.5rem); }
.who-kinds__hub p { color: var(--c-ink-soft); font-size: 1.0625rem; }
.who-kinds__mark { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); }
.who-kinds__mark-svg { width: 46px; height: 46px; fill: currentColor; }
.who-kinds__stop { top: 14px; right: 14px; }
.who-kinds__stop[aria-pressed="true"] .stop__pause, .who-kinds__stop:not([aria-pressed="true"]) .stop__play { display: none; }
@media (max-width: 960px) {
  .who-kinds__box { grid-template-columns: minmax(0, 1fr); }
  .who-kinds__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who-kinds__tab { min-height: 56px; padding: 6px 14px; font-size: 1rem; }
  .who-kinds__tab:last-of-type { grid-column: 1 / -1; }
  .who-kinds__stage { height: 560px; }
}

/* ---------- however customers buy ---------- */
.who-buyers { padding-block: 0 var(--section-y); }
.who-buyers__head { margin-inline: auto; justify-items: center; text-align: center; }
.who-buyers__ground { padding: clamp(14px, 2.4vw, 34px); }
.who-buyers__scene { min-height: 490px; }
.who-buyers__stop { top: 8px; right: 8px; }
@media (max-width: 760px) { .who-buyers__scene { min-height: 830px; } .who-buyers__stop { top: 18px; right: 18px; } }

/* ---------- a way in for everyone else: the chat over a real studio ---------- */
.who-anyway { padding-block: 0 var(--section-y); }
.who-anyway__head { margin-inline: auto; justify-items: center; text-align: center; }
.who-anyway__stage { position: relative; height: 620px; border-radius: var(--radius-l); overflow: hidden; background: var(--c-line); }
.who-anyway__stage > img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 30% 50%; }
#close .band__media video { object-position: 50% 0; }
.who-chat { position: absolute; z-index: 2; right: 20px; bottom: 20px; height: 390px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; box-sizing: border-box; width: min(400px, calc(100% - 40px)); padding: 20px; border: 1px solid color-mix(in srgb, var(--c-paper) 60%, transparent); border-radius: var(--radius-l); background: color-mix(in srgb, var(--c-paper) 70%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: var(--shadow-l); overflow: hidden; }
.who-chat__msg { align-self: flex-start; max-width: 86%; margin: 0; padding: 12px 16px; border-radius: 18px 18px 18px 6px; background: var(--c-paper); color: var(--c-ink); font: 600 1.0625rem/1.35 var(--font-ui); box-shadow: var(--shadow-s); opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.who-chat__msg--me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--c-brand); color: var(--c-on-brand); }
.who-chat__typing { display: flex; gap: 5px; padding: 15px 16px; }
.who-chat__typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink-soft); animation: who-dot 1s ease-in-out infinite; }
.who-chat__typing i:nth-child(2) { animation-delay: 0.15s; }
.who-chat__typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes who-dot { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .who-chat__typing i { animation: none; } }
@media (max-width: 760px) {
  /* the studio on top, the chat over its foot and on down the pale ground, more than half of it on the photo */
  .who-anyway__stage { height: 660px; }
  .who-anyway__stage > img { object-position: 24% 0; height: 500px; bottom: auto; }
  .who-chat { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; height: 330px; padding: 14px; }
}
