/* who-we-help.css: Who we help (plan.md, "Who we help": 9. The breadth), with the tokens of system.css only. */

/* ---------- #hero: a town at blue hour bleeding off the left edge, "I run a" typing over it; the words at the right ---------- */
.ph--who { display: grid; align-items: center; min-height: max(720px, 100svh); padding-top: 140px; padding-bottom: 170px; background: var(--bg-1); }
/* the reel reaches 2 px past its stage on the right, where its grade is the page's own ground, so no edge shows */
.wh-hero__reel {
  inset: 0 auto 0 0; width: calc(63% + 2px); z-index: 1;
  --deep-shade: linear-gradient(90deg, rgb(5 13 26 / 0.06) 0%, rgb(5 13 26 / 0) 44%, rgb(5 13 26 / 0.62) 80%, var(--bg-1) 100%), linear-gradient(180deg, rgb(5 13 26 / 0.5) 0%, rgb(5 13 26 / 0) 18%, rgb(5 13 26 / 0) 76%, var(--bg-1) 100%);
}
/* a town at blue hour is dark already: graded lighter than the site's day footage, so its lit streets still read */
.ph--who .wh-hero__reel [data-kit-slide] video { filter: saturate(0.92) contrast(1.04) brightness(1.12); }
.wh-hero__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); align-items: center; gap: clamp(40px, 5vw, 80px); }
/* the typing card low in the frame, so the town shows above it */
.wh-hero__in > .wh-hero__scene { display: block; width: 100%; max-width: 680px; height: 420px; align-self: end; margin-bottom: -56px; }
.wh-hero__words .ph__title { max-width: 15ch; }
@media (max-width: 1199px) { .wh-hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); } }
@media (max-width: 899px) {
  .ph--who { display: block; min-height: 0; padding-top: 100px; padding-bottom: 96px; }
  .wh-hero__in { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wh-hero__words { order: -1; }
  .wh-hero__in > .wh-hero__scene { height: 340px; margin: 56px 0 0; }
  /* on a phone the reel lies behind the typing card, under the words */
  .wh-hero__reel {
    inset: auto 0 0 0; width: auto; height: 520px;
    --deep-shade: linear-gradient(180deg, var(--bg-1) 0%, rgb(5 13 26 / 0.25) 24%, rgb(5 13 26 / 0.1) 62%, var(--bg-1) 100%);
  }
}

/* ---------- #every: the currents, full width on the designed ground ---------- */
.wh-every { padding-left: 0; padding-right: 0; }
.wh-every > .wh-every__scene { display: block; height: clamp(440px, calc(310px + 18vw), 600px); }
.wh-every__stop, .wh-kinds__stop, .wh-buyers__stop, .wh-anyway__stop { position: absolute; z-index: 3; top: 26px; right: var(--gutter); }
/* on a phone the header's stop icon sits at its foot, right above this part: this part's own sits at its foot instead,
   so the two never read as a pair */
@media (max-width: 899px) { .wh-every__stop { top: auto; bottom: 22px; right: auto; left: var(--gutter); } }
/* the booking's time stays on one line with its dot: "· Wed 2 pm" never breaks after the dot */
.ph--who [data-scene="trade-type"] .tt-in b i { white-space: nowrap; }
@media (max-width: 599px) { .wh-every > .wh-every__scene { height: 460px; } }

/* ---------- #kinds: the six and many more; the lit row's photo at the right ---------- */
.kd {
  --kd-gap: clamp(32px, 4vw, 64px);
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--kd-gap);
  max-width: var(--max-w); margin: 0 auto; padding: 0; list-style: none;
}
.kd__item { grid-column: 1; }
.kd__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 18px; padding: 15px 18px 15px 22px;
  border-radius: var(--radius-m); color: inherit; text-decoration: none; box-shadow: inset 0 -1px 0 var(--border);
  transition: background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.kd__name { font: 600 clamp(1.125rem, 0.98rem + 0.5vw, 1.375rem)/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--text-bright); }
.kd__fields { grid-column: 1; font: 400 var(--fs-small)/1.45 var(--font-text); color: var(--text-muted); }
.kd__go {
  grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  color: var(--accent-bright); box-shadow: inset 0 0 0 1px var(--border-strong); opacity: 0.55;
  transition: opacity var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.kd__item.is-on .kd__link { background-color: var(--glass); box-shadow: inset 0 1px 0 var(--edge-light), inset 0 0 0 1px var(--border-strong); }
.kd__item.is-on .kd__go { opacity: 1; color: var(--bg-0); background: linear-gradient(105deg, var(--accent-bright), var(--accent)); box-shadow: 0 0 22px -6px var(--glow); }
.kd__item--more .kd__name { background: var(--grad-words); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kd__link:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
/* one frame at the right: every kind's photo in it, the lit one shown */
.kd__pic {
  position: absolute; top: 0; right: 0; width: calc((100% - var(--kd-gap)) * 7 / 12); height: 100%; margin: 0;
  opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease-out), visibility 0s linear 0.5s;
  --deep-shade: linear-gradient(180deg, rgb(2 8 16 / 0.12) 0%, rgb(2 8 16 / 0.04) 45%, rgb(2 8 16 / 0.7) 100%);
}
.kd__item.is-on .kd__pic { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease-out); }
.kd__seq { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 20px; display: grid; justify-items: start; gap: 10px; }
.kd__seq [data-kit-at] { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
.kd__card { order: -1; }
.kd__means {
  max-width: 25rem; margin: 0; padding: 12px 16px; border-radius: 14px;
  font: 600 1.0625rem/1.4 var(--font-display); color: var(--text-bright);
  background: rgb(5 13 26 / 0.6); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 0 var(--edge-light), inset 0 0 0 1px var(--border);
}
/* each photo kept on its people */
.kd__item:nth-child(2) .kd__pic > img { object-position: 62% 40%; }
.kd__item:nth-child(5) .kd__pic > img { object-position: 64% 50%; }
@media (max-width: 899px) {
  /* on a phone each kind is a card with its photo, side by side in a row the thumb swipes */
  .kd {
    display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px; scroll-padding: 0 var(--gutter); scrollbar-width: none;
  }
  .kd::-webkit-scrollbar { display: none; }
  .kd__item { flex: 0 0 min(84%, 340px); display: flex; flex-direction: column; scroll-snap-align: start; border-radius: var(--radius-l); overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
  .kd__pic { position: relative; order: -1; width: auto; height: auto; aspect-ratio: 1 / 1; opacity: 1; visibility: visible; border-radius: 0; box-shadow: none; transition: none; }
  .kd__link, .kd__item.is-on .kd__link { flex: 1; align-items: start; border-radius: 0; background: none; box-shadow: none; padding: 16px 16px 18px 18px; }
  .kd__item .kd__go { opacity: 1; color: var(--bg-0); background: linear-gradient(105deg, var(--accent-bright), var(--accent)); box-shadow: none; }
  .kd__seq { left: 12px; right: 12px; bottom: 12px; gap: 8px; }
  .kd__means { font-size: 0.9375rem; padding: 10px 13px; }
}

/* ---------- #buyers: three depths of one sea on the designed ground: the three buyers' cards hang from one glowing
   waterline on lines of three lengths (just under the surface, further down, the deep); its stars gold ---------- */
.wh-buyers > .wh-buyers__scene { display: block; max-width: 1180px; margin: 0 auto; background: none; }
.wh-buyers [data-scene="three-buyers"] .tb-st2 svg, .wh-buyers [data-scene="three-buyers"] .tb-five svg { fill: var(--gold); }
@container (width >= 760px) {
  .wh-buyers [data-scene="three-buyers"] .tb {
    padding-top: 78px; padding-bottom: 150px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0 14C100 6 200 6 300 14S500 22 600 14S800 6 900 14S1100 22 1200 14' fill='none' stroke='%235dade2' stroke-opacity='.16' stroke-width='12' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 14C100 6 200 6 300 14S500 22 600 14S800 6 900 14S1100 22 1200 14' fill='none' stroke='%235dade2' stroke-opacity='.9' stroke-width='1.6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 20px / 100% 28px no-repeat;
  }
  .wh-buyers [data-scene="three-buyers"] .tb-cards { align-items: start; }
  .wh-buyers [data-scene="three-buyers"] .tb-card { --hang: 44px; }
  .wh-buyers [data-scene="three-buyers"] .tb-card:nth-child(2) { translate: 0 64px; --hang: 108px; }
  .wh-buyers [data-scene="three-buyers"] .tb-card:nth-child(3) { translate: 0 128px; --hang: 172px; }
  .wh-buyers [data-scene="three-buyers"] .tb-card::before {
    content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: var(--hang); margin-left: -1px; border-radius: 2px;
    background: linear-gradient(180deg, rgb(93 173 226 / 0.9), rgb(93 173 226 / 0.2)); box-shadow: 0 0 10px rgb(93 173 226 / 0.45);
  }
  /* the depths say which card leads; the piece's own focus dots are left out */
  .wh-buyers [data-scene="three-buyers"] .tb-foot { display: none; }
}
/* in one column (a phone) every card stays open on its story, so the stack never changes height under the reader and
   the comparison always shows */
.wh-buyers [data-scene="three-buyers"] .tb-pre { grid-template-rows: minmax(0, 1fr) !important; }

/* ---------- #anyway: the groomer at work, the chat reading her website ---------- */
.wh-anyway__pic { position: relative; max-width: var(--max-w); margin: 0 auto; aspect-ratio: 16 / 9; --deep-shade: linear-gradient(90deg, rgb(2 8 16 / 0) 40%, rgb(2 8 16 / 0.5) 100%), linear-gradient(180deg, rgb(2 8 16 / 0) 60%, rgb(2 8 16 / 0.45) 100%); }
/* a daylight salon with a blue wall of its own, graded into the site's night by light, not by color: the deep's color
   wash nearly off, so her skin and the dog keep their own tones */
.wh-anyway__pic > img { object-position: 50% 30%; filter: saturate(0.85) contrast(1.08) brightness(0.64); }
.wh-anyway__pic::before { opacity: 0.1; }
/* the messages float over the photo's free side, each on its own glass, growing up from the foot (no empty box) */
.wh-chat {
  position: absolute; z-index: 2; top: 7%; bottom: 7%; right: clamp(16px, 3vw, 44px); width: min(340px, 32%);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; overflow: hidden;
}
.wh-chat .msg { box-shadow: inset 0 0 0 1px var(--border-strong), 0 18px 40px -18px rgb(0 0 0 / 0.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.wh-chat .msg { opacity: calc(var(--kit-in, 1) * (1 - var(--kit-out, 0))); }
/* its first message holds through the turn: the chat is never empty at its seam */
.wh-chat .msg:first-child { opacity: 1; transform: none; }
.msg { max-width: 88%; margin: 0; padding: 10px 14px; border-radius: 18px; font: 400 15px/1.42 var(--font-ui); transform: translateY(calc((1 - var(--kit-in, 1)) * 10px)); }
.msg--in { align-self: flex-start; color: var(--text); background: rgb(15 30 55 / 0.92); box-shadow: inset 0 0 0 1px var(--border); border-bottom-left-radius: 6px; }
.msg--out { align-self: flex-end; color: var(--bg-0); font-weight: 600; background: linear-gradient(105deg, var(--accent-bright), var(--accent)); border-bottom-right-radius: 6px; }
.msg--typing { display: flex; gap: 5px; padding: 14px 16px; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: wh-dot 1.1s ease-in-out infinite; }
.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes wh-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.55; } 30% { transform: translateY(-4px); opacity: 1; } }
.msg--check { display: grid; gap: 9px; min-width: 76%; }
.msg__bar { display: block; height: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright)) 0 0 / calc(var(--kit-fill, 0) * 100%) 100% no-repeat, rgb(52 152 219 / 0.16); }
.msg--done { align-self: stretch; max-width: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: linear-gradient(160deg, rgb(15 30 55 / 0.96), rgb(10 22 40 / 0.96)); box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 40px -12px var(--glow); }
.msg__mark { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: var(--bg-0); background: linear-gradient(135deg, var(--accent-bright), var(--accent)); }
.msg--done b { display: block; font: 600 15px/1.25 var(--font-ui); color: var(--text-bright); }
.msg--done small { display: block; margin-top: 2px; font: 400 13px/1.3 var(--font-ui); color: var(--text-muted); }
.wh-anyway__cta { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-top: 44px; }
@media (prefers-reduced-motion: reduce) { .msg--typing i { animation: none; } }
@media (max-width: 899px) {
  .wh-anyway__pic { aspect-ratio: auto; overflow: visible; background: none; box-shadow: none; border-radius: 0; }
  .wh-anyway__pic { --deep-shade: linear-gradient(180deg, rgb(2 8 16 / 0) 36%, rgb(2 8 16 / 0.74) 100%); }
  .wh-anyway__pic > img { position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: var(--radius-l); object-position: 40% 0%; }
  .wh-anyway__pic::before, .wh-anyway__pic::after { border-radius: var(--radius-l); bottom: auto; aspect-ratio: 3 / 4; }
  /* on a phone the chat stays on the photo, over its foot (the table), clear of her face and the dog's; its older
     messages fade out at its top as the new ones come */
  .wh-chat { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; height: 50%; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }
}

/* ---------- #close: the florist at her counter; the glass box at the right, clear of her face ---------- */
.wh-close { justify-items: end; }
.wh-close > img { object-position: 30% 40%; }
.wh-close .band__box { margin-right: max(0px, calc((100% - var(--max-w)) / 2)); }
.wh-close__cards { position: absolute; z-index: 2; left: max(var(--gutter), 6vw); bottom: 7%; display: grid; justify-items: start; gap: 10px; }
.wh-close__cards [data-kit-at] { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
.wh-close__cards .notice { text-align: left; }
@media (max-width: 899px) {
  .band.wh-close { display: block; padding: 0 var(--gutter) 96px; background: var(--bg-1); --deep-shade: linear-gradient(180deg, rgb(5 13 26 / 0) 0, rgb(5 13 26 / 0) 40vw, var(--bg-1) 76vw, var(--bg-1) 100%); }
  .wh-close > img { position: relative; display: block; inset: auto; width: calc(100% + var(--gutter) * 2); height: auto; margin: 0 calc(var(--gutter) * -1); aspect-ratio: 4 / 3.1; object-position: 30% 40%; }
  .wh-close__cards { position: relative; left: auto; bottom: auto; z-index: 2; margin: -84px 0 26px auto; justify-items: end; }
  .band.wh-close .band__box { margin: 0 auto; }
}
